/* TapInRoom · clean, light UI */
:root {
  --ink: #15161c; --ink-2: #3b3d48; --muted: #6c6f7c; --line: #e6e3dd; --line-2: #d6d2ca;
  --paper: #f4f1ec; --paper-2: #faf8f5; --white: #fff;
  --brand: #ff5a36; --brand-ink: #e0431f; --blue: #2b3fd6; --ok: #12a37a; --bad: #e5484d;
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(20,20,30,.04), 0 8px 24px rgba(20,20,30,.06);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 30px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
p { margin: 0 0 .8em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.hidden { display: none !important; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration-color: var(--ink); }
.link-plain { text-decoration: none; font-weight: 500; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 11px 22px; font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-dark { background: var(--ink); color: #fff; } .btn-dark:hover:not(:disabled) { background: #2b2d36; }
.btn-brand { background: var(--brand); color: #fff; } .btn-brand:hover { background: var(--brand-ink); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--ink); } .btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost-dark { background: transparent; border-color: var(--line-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-pill { min-width: 140px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); text-decoration: none; }
.icon-btn:hover { background: var(--paper); } .icon-btn.sm { width: 28px; height: 28px; font-size: 13px; } .icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.danger-text { color: var(--bad); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Forms */
input[type=text], input[type=email], input[type=password], input:not([type]), textarea, select {
  width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 11px 13px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,22,28,.08); }
textarea { resize: vertical; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.form label.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--ink); }
.form-row-end { display: flex; justify-content: flex-end; margin-top: -6px; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 6px; font-weight: 500; font-size: 14px; margin-bottom: 18px; }
.field-err { color: var(--bad); font-size: 13px; margin: 8px 0 0; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecec; color: #9b1c1f; } .alert-ok { background: #e6f6ef; color: #0d6b4f; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.brand b { color: var(--brand); font-weight: 600; }
.logo-mark { display: block; flex: none; }

/* Landing */
.site-head { display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(16px, 4vw, 48px); }
.site-head nav { display: flex; align-items: center; gap: 18px; }
.banner { background: var(--paper); text-align: center; padding: 10px; font-size: 14px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 40px clamp(16px, 4vw, 48px) 64px; max-width: 1280px; margin: 0 auto; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); letter-spacing: -.035em; margin-bottom: 18px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 520px; margin-bottom: 26px; }
.hero-ctas { margin-bottom: 30px; }
.join-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-width: 440px; }
.join-card label { display: block; font-weight: 500; margin-bottom: 10px; }
.join-row { display: flex; gap: 8px; }
.join-row input { font-size: 22px; letter-spacing: .14em; text-align: center; font-weight: 600; padding: 10px; }
.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.hero-art { background: var(--paper); border-radius: 24px; min-height: 480px; position: relative; overflow: hidden; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 64px; }
.features article { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.features p { color: var(--muted); margin: 0; }
.f-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.f-poll { background: #ffe9e3; color: var(--brand-ink); } .f-cloud { background: #e7eaff; color: var(--blue); } .f-quiz { background: #fff3d6; color: #b07400; }
.how { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 72px; }
.how ol { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.how li { counter-increment: s; display: grid; gap: 4px; padding-top: 14px; border-top: 2px solid var(--ink); }
.how li::before { content: "0" counter(s); font-size: 13px; color: var(--muted); font-weight: 600; }
.how span { color: var(--muted); }
.site-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-foot nav { display: flex; gap: 18px; } .site-foot a { text-decoration: none; }

/* Illustration (phone + screen) */
.art { position: absolute; inset: 0; }
.art-screen { position: absolute; left: 38%; right: -6%; top: 22%; height: 52%; background: #fff; border: 10px solid #15161c; border-radius: 18px 0 0 18px; border-right: 0; padding: 22px 24px; }
.art-q { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.art-bars { position: absolute; left: 24px; right: 24px; bottom: 18px; top: 64px; display: flex; gap: 16px; align-items: flex-end; }
.art-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; font-size: 12px; }
.art-col span { font-size: 16px; } .art-col i { display: block; border-radius: 6px 6px 0 0; } .art-col em { font-style: normal; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-phone { position: absolute; left: 7%; top: 34%; width: 158px; height: 300px; background: #fff; border: 7px solid #15161c; border-radius: 28px; padding: 22px 12px 12px; box-shadow: 0 20px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; align-items: center; gap: 7px; }
.art-notch { position: absolute; top: 6px; width: 46px; height: 6px; border-radius: 6px; background: #15161c; }
.art-pq { font-size: 12px; font-weight: 600; align-self: stretch; margin: 6px 0 2px; line-height: 1.25; }
.art-opt { align-self: stretch; font-size: 10.5px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; position: relative; }
.art-opt.on { border-color: var(--ink); } .art-opt b { position: absolute; right: 7px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.art-btn { margin-top: 6px; background: var(--ink); color: #fff; font-size: 10.5px; padding: 6px 16px; border-radius: 99px; }
.art-label { position: absolute; font-size: 14px; color: var(--ink-2); }
.art-label-screen { top: 13%; left: 60%; } .art-label-phone { top: 26%; left: 7%; }

/* Auth pages */
.auth-wrap { display: grid; grid-template-columns: minmax(380px, 1fr) 1fr; min-height: 100vh; }
.auth-main { display: flex; flex-direction: column; padding: 22px clamp(20px, 5vw, 64px); }
.auth-form { width: 100%; max-width: 400px; margin: auto 0; padding: 40px 0; }
.auth-form h1 { font-size: 30px; }
.auth-form > p.muted { margin-bottom: 24px; }
.auth-foot { display: flex; gap: 18px; font-size: 13px; color: var(--muted); } .auth-foot a { text-decoration: none; }
.auth-art { background: var(--paper); position: relative; overflow: hidden; }

/* App chrome */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.menu { position: relative; } .menu summary { list-style: none; cursor: pointer; } .menu summary::-webkit-details-marker { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; }
.menu-pop { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; z-index: 30; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; text-decoration: none; background: none; border: 0; cursor: pointer; font-size: 14px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--paper); }
.menu-who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; font-size: 14px; } .menu-who span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.narrow { max-width: 640px; margin: 0 auto; padding: 32px 20px 64px; }
.back-link { display: inline-block; margin-bottom: 18px; font-size: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card.danger { border-color: #f3c9c9; }

/* Dashboard */
.dash { max-width: 1040px; margin: 0 auto; padding: 36px clamp(16px, 3vw, 32px) 64px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.plist { display: grid; gap: 10px; }
.prow { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 14px 20px; transition: border-color .15s, box-shadow .15s; }
.prow:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.prow-main { flex: 1; min-width: 0; display: grid; text-decoration: none; }
.prow-main b { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-main span { font-size: 13px; }
.prow-act { display: flex; gap: 8px; align-items: center; }
.live-dot { font-style: normal; color: var(--ok); font-weight: 600; } .live-dot::before { content: "● "; }
.empty { text-align: center; border: 1px dashed var(--line-2); border-radius: 18px; padding: 56px 24px; }
.empty-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--paper); display: grid; place-items: center; margin: 0 auto 16px; }
.skeleton { height: 70px; border-radius: var(--radius); background: linear-gradient(90deg, var(--paper) 0%, #fbfaf8 50%, var(--paper) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(21,22,28,.35); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; padding: 28px; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.2); max-height: 92vh; overflow: auto; }
.modal h2 { font-size: 22px; margin-bottom: 14px; }
.modal-x { position: absolute; right: 14px; top: 12px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
.type-list { display: grid; gap: 10px; }
.type-card { display: flex; align-items: center; gap: 16px; text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.type-card:hover { border-color: var(--line-2); }
.type-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,90,54,.15); }
.type-card b { display: block; font-weight: 500; } .type-card small { color: var(--muted); font-size: 13px; }
.tc-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--paper); }

/* Editor */
.editor-root { display: flex; flex-direction: column; height: 100vh; }
.edbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.edbar .grow { flex: 1; }
.title-input { border: 1px solid transparent !important; font-weight: 500; font-size: 16px; max-width: 360px; padding: 7px 10px !important; box-shadow: none !important; }
.title-input:hover, .title-input:focus { border-color: var(--line-2) !important; }
.save-state { font-size: 13px; color: var(--muted); min-width: 60px; }
.code-pill { font-size: 13px; background: var(--paper); border-radius: 99px; padding: 6px 12px; color: var(--ink-2); } .code-pill b { letter-spacing: .05em; }
.editor { flex: 1; display: grid; grid-template-columns: 250px 1fr 330px; min-height: 0; }
.slides-col { border-right: 1px solid var(--line); padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.slist { display: grid; gap: 8px; }
.sitem { position: relative; display: grid; grid-template-columns: 18px 26px 1fr; gap: 8px; align-items: start; padding: 11px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.sitem:hover { border-color: var(--line-2); } .sitem.on { padding-bottom: 32px;  border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.snum { font-size: 12px; color: var(--muted); padding-top: 3px; } .sico { color: var(--ink-2); }
.stext { font-size: 13px; min-width: 0; }
.stext .sq { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stext small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.smove { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 2px; }
.smove button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 22px; height: 22px; font-size: 12px; cursor: pointer; padding: 0; }
.smove button:disabled { opacity: .3; cursor: default; }
.canvas { background: var(--paper); padding: 28px; overflow: auto; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.preview-frame { width: 100%; max-width: 860px; margin: 0 auto; aspect-ratio: 16/9; background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.preview { height: 100%; padding: 4% 5%; display: flex; flex-direction: column; }
.pv-top { font-size: 12px; color: var(--muted); margin-bottom: 4%; } .pv-top b { color: var(--ink); }
.pv-q { font-size: clamp(18px, 2.4vw, 30px); margin-bottom: 4%; }
.pv-viz { flex: 1; min-height: 0; display: flex; } .pv-viz.ghost { opacity: .35; }
.pv-viz .bars { font-size: 12px; }
.panel { border-left: 1px solid var(--line); padding: 18px; overflow: auto; }
.pgroup { margin-bottom: 22px; } .pgroup.end { border-top: 1px solid var(--line); padding-top: 16px; }
.pgroup.note { background: var(--paper-2); border-radius: 10px; padding: 12px; font-size: 13px; color: var(--ink-2); }
.plabel { display: block; font-weight: 500; font-size: 14px; margin-bottom: 8px; }
.count { text-align: right; margin-top: 4px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 12px; }
.seg button.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(255,90,54,.18); }
.opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.opt-row input { padding: 9px 11px; }
.opt-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 4px; }
.correct { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); background: #fff; color: transparent; cursor: pointer; font-size: 13px; }
.correct.on { background: var(--ok); border-color: var(--ok); color: #fff; } .correct:hover:not(.on) { color: var(--line-2); }
.add-opt { font-size: 14px; margin-top: 4px; text-decoration: none; font-weight: 500; }

/* Charts (shared) */
.bars { display: flex; gap: 3%; align-items: stretch; justify-content: center; width: 100%; height: 100%; min-height: 160px; }
.bar-col { flex: 1; max-width: 300px; display: flex; flex-direction: column; min-width: 0; transition: opacity .3s; }
.bar-col.dim { opacity: .35; }
.bar-num { font-size: 1.6em; display: flex; align-items: center; gap: 8px; height: 1.375em; margin-bottom: 4px; }
.bar-track { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 40px; }
.bar-fill { width: 100%; border-radius: 10px 10px 0 0; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.bar-label { margin-top: 8px; font-size: 1.05em; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; border-top: 1px solid var(--line); padding-top: 8px; }
.badge { font-style: normal; display: inline-grid; place-items: center; width: 1.1em; height: 1.1em; border-radius: 50%; font-size: .6em; color: #fff; }
.badge.ok { background: var(--ok); } .badge.no { background: #f2b8b8; }
.cloud { width: 100%; max-width: 1100px; margin: 0 auto; height: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 4px 22px; padding: 10px; }
.cw { font-weight: 600; line-height: 1.05; letter-spacing: -.02em; animation: pop .4s; cursor: default; }
.cw.vert { writing-mode: vertical-rl; transform: rotate(180deg); }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
.cloud-empty { margin: auto; color: var(--muted); font-size: 1.3em; }

/* Present */
.present-page { background: #fff; }
.pres { height: 100vh; display: flex; flex-direction: column; padding: 2.4vh 3.4vw; font-size: clamp(14px, 1.3vw, 22px); }
.pres-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--ink-2); }
.joinline { display: flex; align-items: center; gap: 12px; font-size: 1.05em; flex-wrap: wrap; } .joinline b { color: var(--ink); }
.joinline .sep { width: 1px; height: 1.2em; background: var(--line-2); }
.bigcode { letter-spacing: .08em; font-weight: 700; }
.mini-qr { width: 4.6em; height: 4.6em; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; }
.mini-qr svg, .qr-big svg { width: 100%; height: 100%; display: block; }
.pres-body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 3vh 0 1vh; }
.pres-q { font-size: 2.3em; margin-bottom: 3vh; max-width: 90%; }
.pres-viz { flex: 1; min-height: 0; display: flex; }
.pres-viz .cloud .cw { cursor: pointer; } .pres-viz .cloud .cw:hover { text-decoration: line-through; opacity: .6; }
.quiz-bar { display: flex; align-items: center; gap: 16px; margin: -1vh 0 3vh; }
.qtime { font-size: 1.6em; font-weight: 700; min-width: 2ch; }
.qtrack { flex: 1; height: 10px; background: var(--paper); border-radius: 99px; overflow: hidden; } .qtrack i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .2s linear; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 2vh 2vw; width: 100%; align-content: center; }
.tile { display: flex; align-items: center; gap: .8em; border: 1px solid var(--line); border-radius: 16px; padding: 1.2em; font-size: 1.3em; }
.lt { width: 1.8em; height: 1.8em; flex: none; border-radius: 10px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85em; }
.board { list-style: none; margin: 0 auto; padding: 0; width: 100%; max-width: 900px; display: grid; gap: 1.4vh; align-content: start; }
.board li { display: grid; grid-template-columns: 2em minmax(6em, 14em) 1fr 4em; gap: 1em; align-items: center; font-size: 1.2em; }
.board .rk { font-weight: 700; color: var(--muted); } .board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .track { height: .9em; background: var(--paper); border-radius: 99px; overflow: hidden; } .board .track i { display: block; height: 100%; border-radius: 99px; }
.board b { text-align: right; }
.board .board-h { display: block; font-size: .8em; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: .6em; }
.pres-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .9em; }
.pres-count b { font-size: 1.15em; }
.pres-ctrl { display: flex; align-items: center; gap: 6px; opacity: .55; transition: opacity .2s; } .pres-ctrl:hover, .pres-ctrl:focus-within { opacity: 1; }
#qbtns { display: inline-flex; gap: 6px; margin-right: 8px; }
.ctl { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 20px; line-height: 1; }
.ctl.txt { width: auto; border-radius: 99px; padding: 0 14px; font-size: 14px; } .ctl:disabled { opacity: .3; cursor: default; }
.pos { font-size: 14px; color: var(--muted); min-width: 52px; text-align: center; }
.qr-over { position: fixed; inset: 0; background: rgba(244,241,236,.97); display: grid; place-items: center; z-index: 40; }
.qr-card { text-align: center; } .qr-big { width: min(42vh, 70vw); height: min(42vh, 70vw); margin: 0 auto 2vh; background: #fff; padding: 14px; border-radius: 16px; }
.qr-card p { font-size: clamp(16px, 1.6vw, 24px); margin: 0 0 1vh; } .bigcode.xl { font-size: clamp(34px, 5vw, 72px); margin-bottom: 3vh; }

/* Audience */
.join-page { background: var(--paper-2); }
.aud { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: 0 18px; }
.aud-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.aud-top .brand { font-size: 17px; }
.aud-code { font-size: 13px; color: var(--muted); letter-spacing: .06em; background: #fff; border: 1px solid var(--line); padding: 4px 10px; border-radius: 99px; }
.aud-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 16px 0 28px; }
.aud-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 14px 0 20px; } .aud-foot a { color: inherit; }
.aud-q { font-size: 24px; font-weight: 500; margin-bottom: 22px; }
.aud-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; }
.aud-card h2 { font-size: 22px; }
.aud-opts { display: grid; gap: 10px; }
.aud-opt { position: relative; display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 15px 16px; cursor: pointer; font-weight: 500; transition: border-color .15s; }
.aud-opt input { position: absolute; opacity: 0; pointer-events: none; }
.aud-opt span { flex: 1; }
.aud-opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.aud-opt:has(input:checked) { border-color: var(--ink); } .aud-opt:has(input:checked) .radio { border: 6px solid var(--ink); }
.aud-opt:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.aud-opts .btn, .aud-form .btn { justify-self: center; margin-top: 10px; }
.aud-form { display: grid; gap: 10px; } .aud-form input { font-size: 18px; padding: 14px; } .aud-form .link { justify-self: center; font-size: 14px; }
.aud-done { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 20px; }
.tick { width: 52px; height: 52px; border-radius: 50%; background: #e6f6ef; color: var(--ok); display: grid; place-items: center; font-size: 24px; margin: 0 auto 12px; }
.aud-timer { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 8px; } .aud-timer i { display: block; height: 100%; background: var(--ink); width: 100%; }
.aud-pts { font-size: 13px; color: var(--muted); margin-bottom: 14px; } .aud-pts span { color: var(--ink); font-weight: 600; }
.aud-tiles { display: grid; gap: 10px; }
.aud-tile { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 500; font-size: 16px; }
.aud-tile:disabled { cursor: default; opacity: .5; } .aud-tile.on { opacity: 1; border-color: var(--ink); }
.aud-result { text-align: center; border-radius: 18px; padding: 28px 20px; background: #fff; border: 1px solid var(--line); }
.aud-result.good { background: #e8f7f0; border-color: #bfe8d6; } .aud-result.bad { background: #fdf0ef; border-color: #f4cfcc; }
.aud-result .big { font-size: 44px; font-weight: 700; letter-spacing: -.03em; }
.aud-wait { display: grid; place-items: center; padding: 40px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); margin: 18px auto 0; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,54,.5); } 70% { box-shadow: 0 0 0 18px rgba(255,90,54,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,54,0); } }

/* Docs */
.doc { max-width: 720px; margin: 0 auto; padding: 24px 20px 64px; } .doc h2 { font-size: 19px; margin-top: 28px; } .doc p { color: var(--ink-2); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.err { background: var(--bad); }

/* Responsive */
@media (max-width: 1000px) {
  .editor { grid-template-columns: 210px 1fr; } .panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .editor-root { height: auto; min-height: 100vh; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; } .hero-art { min-height: 380px; }
  .features, .how ol { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; }
}
@media (max-width: 700px) {
  .editor { grid-template-columns: 1fr; } .slides-col { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; }
  .canvas { padding: 14px; }
  .prow { flex-wrap: wrap; } .prow-act { width: 100%; justify-content: flex-end; }
  .code-pill, #clear { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .pres-q { font-size: 1.7em; } .board li { grid-template-columns: 2em 1fr 3.5em; } .board .track { display: none; }
  .art-phone { left: 5%; transform: scale(.85); transform-origin: top left; } .art-screen { left: 36%; }
}

/* Leaderboard podium (staged reveal) */
.board-wrap { position: relative; width: 100%; height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2.4vh; overflow: hidden; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.4vw; width: 100%; max-width: 900px; flex: 1; min-height: 0; }
.pod { flex: 1; max-width: 260px; display: flex; flex-direction: column; align-items: stretch; height: 100%; justify-content: flex-end; }
.pod-who { text-align: center; padding-bottom: 1.2vh; min-height: 3.4em; display: flex; flex-direction: column; justify-content: flex-end; }
.pod-name { font-size: 1.35em; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: rise .5s ease both; }
.pod-pts { color: var(--muted); font-size: .95em; animation: rise .5s .1s ease both; }
.pod-q { font-size: 2em; color: var(--line-2); font-weight: 700; }
.pod-block { border-radius: 16px 16px 0 0; display: flex; justify-content: center; padding-top: 1.4vh; background: var(--paper); transition: background .4s; }
.pod-1 .pod-block { height: 62%; } .pod-2 .pod-block { height: 46%; } .pod-3 .pod-block { height: 34%; }
.pod-medal { width: 2.4em; height: 2.4em; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.1em; background: #fff; color: var(--muted); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.pod-1.on .pod-block { background: linear-gradient(180deg, #ffd65a, #ffb21e); } .pod-1.on .pod-medal { color: #9a6400; }
.pod-2.on .pod-block { background: linear-gradient(180deg, #e9ecf2, #c9cfd9); } .pod-2.on .pod-medal { color: #59606e; }
.pod-3.on .pod-block { background: linear-gradient(180deg, #f6c7a6, #e0955f); } .pod-3.on .pod-medal { color: #8a4a1b; }
.pod.on .pod-block { animation: grow .6s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.pod-1.on .pod-name { font-size: 1.6em; }
.board-rest { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 900px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1vh 2vw; }
.board-rest li { display: grid; grid-template-columns: 2em 1fr auto; gap: .8em; align-items: center; padding: .6em .9em; border: 1px solid var(--line); border-radius: 12px; font-size: 1.05em; animation: rise .4s ease both; }
.board-rest .rk { color: var(--muted); font-weight: 700; } .board-rest .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-hint { font-size: .85em; margin: 0; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 16px; border-radius: 2px; animation: fall 2.6s ease-in forwards; opacity: .9; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes grow { from { transform: scaleY(.2); } }
@keyframes fall { to { transform: translateY(90vh) rotate(540deg); opacity: 0; } }
.quiz-bar.lead .qtime { font-size: 1.2em; color: var(--brand-ink); min-width: 9ch; }
.quiz-bar.lead .qtrack i { background: var(--brand); }
@media (max-width: 700px) { .board-rest { grid-template-columns: 1fr; } }

/* Audience: get-ready, nickname inline, podium wait */
.aud-ready { text-align: center; font-weight: 600; color: var(--brand-ink); margin-bottom: 12px; font-size: 15px; }
.aud-tile:disabled.wait { opacity: .55; }
.nick-inline { margin-top: 14px; display: grid; gap: 8px; text-align: left; }
.nick-inline .row { display: flex; gap: 8px; } .nick-inline input { padding: 11px 12px; }
.drum { font-size: 40px; animation: pulse-s 1s infinite; } @keyframes pulse-s { 50% { transform: scale(1.12); } }

.swarn { display: block; font-style: normal; color: #b45309; font-size: 11.5px; margin-top: 2px; }
.hero-ctas { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
