/* ==========================================================================
   Riuhly
   01 Tokens        06 Editor          11 Gift exchange    16 Responsive
   02 Base          07 Answer tiles    12 Branding
   03 Controls      08 Results         13 Landing
   04 Layout        09 Host screen     14 Themes
   05 Components    10 Phone           15 Motion
   Every colour, radius, shadow and easing comes from a token in section 01.
   Themes in section 14 only change tokens, plus a few rules for their mood.
   ========================================================================== */

/* ---------- 01 Tokens ---------- */
:root {
  /* colour */
  --bg: #0f0c1d; --panel: #1a1630; --panel-2: #262045; --line: #373060;
  --text: #f6f4ff; --muted: #aaa4cd;
  --brand: #ff6a3d; --brand-2: #ffc24b; --on-brand: #1a0f08; --on-brand-2: #1a1304; --on-tile: #14101f;
  --ok: #2fd18c; --bad: #ff5470; --info: #7fb0ff;
  --t0: #ff6a3d; --t1: #3d8bff; --t2: #f5b700; --t3: #20c997; --t4: #b266ff; --t5: #ff5fa2; --t6: #00b8d9; --t7: #8bc34a;
  --sheen: rgba(255, 255, 255, .04);
  --wash: radial-gradient(60rem 40rem at 8% -10%, rgba(124, 77, 255, .24), transparent 60%),
          radial-gradient(52rem 36rem at 100% 0, rgba(255, 106, 61, .14), transparent 60%);
  /* shape */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-btn: 999px; --radius: var(--r-lg);
  /* depth */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 14px 34px rgba(0, 0, 0, .35);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, .55);
  --press: 0 4px 0 rgba(0, 0, 0, .28);
  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --fast: .15s; --med: .3s; --slow: .6s;
  /* type */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', var(--font);
}

/* ---------- 02 Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--wash), var(--bg); background-attachment: fixed; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; scrollbar-color: var(--line) transparent; }
#app { min-height: 100%; }
h1, h2, h3 { margin: 0 0 .4em; font-family: var(--display); font-weight: 800; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.12rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand-2); }
::selection { background: var(--brand); color: var(--on-brand); }
.muted { color: var(--muted); } .small { font-size: .875rem; } .grow { flex: 1; min-width: 0; } .break { word-break: break-all; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: 4rem 1rem; text-align: center; color: var(--muted); }

/* ---------- 03 Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .65em 1.25em; border: 0; border-radius: var(--r-btn); background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(0, 0, 0, .12); transition: transform var(--fast) var(--ease), filter var(--fast), box-shadow var(--fast), background var(--fast); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover, .btn.ghost.on { background: var(--panel-2); filter: none; }
.btn.danger { color: var(--bad); }
.btn.small { padding: .45em .95em; font-size: .875rem; }
.btn.big { padding: .8em 1.7em; font-size: 1.1rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), var(--press); }
.btn.wide { width: 100%; }
.icon-btn { width: 2.25rem; height: 2.25rem; border: 0; border-radius: var(--r-sm); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; transition: background var(--fast), transform var(--fast); }
.icon-btn:hover { transform: translateY(-1px); } .icon-btn:disabled { opacity: .35; cursor: default; transform: none; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select { width: 100%; padding: .65em .85em; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--bg); color: var(--text); font: inherit; transition: border-color var(--fast), box-shadow var(--fast); }
input:hover, textarea:hover, select:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
textarea { resize: vertical; }
select { width: auto; max-width: 100%; padding-right: 2.2em; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a86a8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8em center; cursor: pointer; }
input[type=color] { width: 3.2rem; height: 2.8rem; padding: .2rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--bg); cursor: pointer; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2.5px solid var(--brand-2); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: .35em; margin-bottom: .9em; }
.field > span { color: var(--muted); font-size: .875rem; font-weight: 600; }
.field.inline { flex-direction: row; align-items: center; gap: .6em; margin-bottom: 0; } .field.inline input { width: 7em; }
.check { display: inline-flex; align-items: center; gap: .5em; font-size: .95rem; cursor: pointer; }
.check input, .pick input { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); }
.check.pill { padding: .5em 1em; border-radius: var(--r-btn); background: var(--panel-2); }
.form-msg { min-height: 1.2em; margin: 0 0 .6em; color: var(--bad); font-size: .9rem; } .form-msg.good { color: var(--ok); }
.save-state { color: var(--muted); font-size: .85rem; }

/* ---------- 04 Layout ---------- */
.shell { min-height: 100vh; background: var(--wash), var(--bg); color: var(--text); }
.topnav { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topnav.clear { position: relative; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topnav nav { display: flex; flex: 1; gap: .25rem; }
.nav-link { padding: .42em .9em; border-radius: var(--r-btn); color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; transition: color var(--fast), background var(--fast); }
.nav-link:hover { background: var(--panel-2); color: var(--text); }
.nav-link.on { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--text); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 55%, transparent); }
.nav-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-family: var(--display); font-size: 1.3rem; font-weight: 800; text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); font-weight: 800; transform: rotate(-6deg); transition: transform var(--med) var(--spring); }
.logo:hover .logo-mark { transform: rotate(8deg) scale(1.1); }

.page { max-width: 1080px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-head p { max-width: 46em; margin: 0; }
.section-title { margin: 2.4rem 0 .8rem; font-size: 1.1rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; } .row.between { justify-content: space-between; } .row.tight { gap: .35rem; }
.stack { display: flex; flex-direction: column; gap: .9rem; } .stack.tight { gap: .5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.center-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 2rem 1rem; text-align: center; }
.center-page.top { justify-content: flex-start; padding-top: 3rem; }
.center-page.theme-fun, .center-page.theme-pro { background: var(--wash), var(--bg); color: var(--text); }
.center-page .card { text-align: left; } .center-page .card h2 { margin-bottom: .6em; }

/* ---------- 05 Components ---------- */
.card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--sheen), transparent 40%), var(--panel); box-shadow: var(--shadow-1); }
.card.narrow { width: 100%; max-width: 420px; box-shadow: var(--shadow-2); }
.card.empty { padding: 3rem 1.25rem; border-style: dashed; text-align: center; } .card.empty .row { justify-content: center; }
.card.center { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.card.stat { display: flex; flex-direction: column; } .card.stat b { font-family: var(--display); font-size: 2rem; line-height: 1.1; }
.card.deck { position: relative; overflow: hidden; padding-top: 1.5rem; transition: transform var(--med) var(--ease), border-color var(--med), box-shadow var(--med); }
.card.deck::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.card.deck:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); box-shadow: var(--shadow-2); }
.deck-title { display: block; margin-bottom: .2rem; color: var(--text); font-family: var(--display); font-size: 1.2rem; font-weight: 800; text-decoration: none; }
.list { display: flex; flex-direction: column; gap: .5rem; }
.list-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.list-row.slim { padding: .5rem .8rem; background: var(--bg); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: .92rem; }
.table th, .table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table th { color: var(--muted); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; } .table tr:last-child td { border-bottom: 0; }
.chip { display: inline-flex; align-items: center; gap: .3em; padding: .2em .75em; border-radius: var(--r-btn); background: var(--panel-2); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.chip.live, .chip.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.chip.live::before { content: ''; width: .5em; height: .5em; border-radius: 50%; background: var(--ok); animation: blink 1.4s ease-in-out infinite; }
.chip.big { padding: .35em .9em; font-size: 1.05rem; } .chip.dim { opacity: .5; }
.chip.score { background: var(--brand-2); color: var(--on-brand-2); font-size: .9rem; }
a.chip { color: var(--text); text-decoration: none; transition: background var(--fast); } a.chip:hover, a.chip.on { background: color-mix(in srgb, var(--brand) 22%, var(--panel-2)); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; } .chips.center { justify-content: center; }
.badge { margin-left: .3em; padding: 0 .5em; border-radius: var(--r-btn); background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 800; }
.tag { padding: .2em .6em; border-radius: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tag.quiz { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }
.tag.poll { background: color-mix(in srgb, var(--info) 18%, transparent); color: var(--info); }
.big-emoji { margin-bottom: .5rem; font-size: 3rem; line-height: 1; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; } .facts p { width: 100%; margin: 0; white-space: pre-wrap; }
.qr { width: 180px; height: 180px; padding: 6px; border-radius: var(--r-md); background: #fff; image-rendering: pixelated; }
#toasts { position: fixed; left: 50%; bottom: 5.5rem; z-index: 50; display: flex; flex-direction: column; gap: .5rem; width: max-content; max-width: 90vw; transform: translateX(-50%); pointer-events: none; }
.toast { padding: .7em 1.1em; border-radius: var(--r-md); background: #fff; color: #17142a; font-weight: 600; box-shadow: var(--shadow-2); transition: opacity .4s; }
.toast.bad { background: var(--bad); color: #fff; } .toast.out { opacity: 0; }
.net-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; padding: .5em 1em; background: var(--bad); color: #fff; font-size: .9rem; font-weight: 700; text-align: center; transform: translateY(-100%); transition: transform var(--med) var(--ease); }
.net-bar.show { transform: none; }

/* ---------- 06 Editor ---------- */
.editor { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.ed-list { display: flex; flex-direction: column; gap: .4rem; }
.ed-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .7rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--fast), background var(--fast), transform var(--fast); }
.ed-item:hover { transform: translateX(3px); }
.ed-item.on { border-color: var(--brand); background: var(--panel-2); }
.ed-num { display: grid; place-items: center; min-width: 1.8rem; height: 1.8rem; border-radius: 8px; background: var(--bg); font-size: .85rem; font-weight: 700; }
.ed-item.on .ed-num { background: var(--brand); color: var(--on-brand); }
.ed-text { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-width: 0; }
.ed-text > span { max-width: 100%; overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.add-select { width: 100%; margin-top: .3rem; border-style: dashed; font-weight: 700; }
.ed-form .card { display: flex; flex-direction: column; gap: 1rem; } .ed-form .field { margin: 0; }
.opt-row { display: flex; align-items: center; gap: .5rem; }
.opt-letter { display: grid; place-items: center; min-width: 2.2rem; height: 2.2rem; border-radius: var(--r-sm); color: var(--on-tile); font-weight: 800; }
input.title-input { padding: .2em 0; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; background: transparent; font-family: var(--display); font-size: 1.7rem; font-weight: 800; }
input.title-input:focus-visible { outline: 0; border-bottom-color: var(--brand); }

/* ---------- 07 Answer tiles ---------- */
.tile-0 { background-color: var(--t0); } .tile-1 { background-color: var(--t1); } .tile-2 { background-color: var(--t2); } .tile-3 { background-color: var(--t3); }
.tile-4 { background-color: var(--t4); } .tile-5 { background-color: var(--t5); } .tile-6 { background-color: var(--t6); } .tile-7 { background-color: var(--t7); }
.tint-0 { color: var(--t0); } .tint-1 { color: var(--info); } .tint-2 { color: var(--t2); } .tint-3 { color: var(--t3); }
.tint-4 { color: #cf9bff; } .tint-5 { color: var(--t5); } .tint-6 { color: var(--t6); } .tint-7 { color: var(--t7); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; width: 100%; }
.tiles.phone { grid-template-columns: 1fr; }
.tile { display: flex; align-items: center; gap: .9rem; min-height: 4.5rem; padding: 1.1rem 1.2rem; border: 0; border-radius: var(--r-lg); background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 55%); color: var(--on-tile); font: inherit; font-size: clamp(1.1rem, 2.2vw, 1.7rem); font-weight: 700; text-align: left; }
.tile b { display: grid; place-items: center; min-width: 2.4rem; height: 2.4rem; border-radius: var(--r-sm); background: rgba(20, 16, 31, .16); }
button.tile { cursor: pointer; transition: transform var(--fast) var(--ease), box-shadow var(--fast); } button.tile:active { transform: scale(.97); }

/* ---------- 08 Results ---------- */
.bars { display: flex; flex-direction: column; gap: .6rem; width: 100%; }
.bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.2rem; padding: .85rem 1rem; overflow: hidden; border-radius: var(--r-md); background: var(--panel-2); }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-md); opacity: .55; transition: width .5s var(--ease); }
.bar-label, .bar-num { position: relative; font-weight: 700; }
.bar-label { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; } .bar-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar.ok { box-shadow: inset 0 0 0 3px var(--ok); } .bar.ok .bar-fill { opacity: .8; } .bar.dim { opacity: .45; }
.tick { padding: 0 .5em; border-radius: 6px; background: var(--ok); color: #06281a; font-size: .8em; }
.answer-key { font-size: 1.3rem; } .answer-key b { color: var(--ok); }
.cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3em 1em; padding: 1rem; font-size: clamp(1rem, 2vw, 1.6rem); line-height: 1.1; }
.cloud-word { font-family: var(--display); font-weight: 800; transition: font-size .4s var(--ease); animation: pop var(--med) var(--spring); }
.rating-avg { color: var(--brand-2); font-family: var(--display); font-size: 4.4rem; font-weight: 800; line-height: 1; text-align: center; } .rating-avg small { color: var(--muted); font-size: .35em; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; width: 100%; }
.note { padding: .8rem 1rem; border-radius: var(--r-md); background: var(--panel-2); overflow-wrap: anywhere; white-space: pre-wrap; animation: pop var(--med) var(--spring); }
.board { display: flex; flex-direction: column; gap: .5rem; width: 100%; max-width: 640px; margin: 0; padding: 0; list-style: none; }
.board-row { display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; border-radius: var(--r-md); background: var(--panel-2); font-size: 1.15rem; font-weight: 700; }
.board-row.me { box-shadow: inset 0 0 0 2.5px var(--brand-2); }
.board-row.top1 { background: linear-gradient(90deg, color-mix(in srgb, var(--brand-2) 38%, transparent), var(--panel-2)); }
.board-pos { min-width: 1.8em; color: var(--muted); } .board-name { flex: 1; overflow: hidden; text-align: left; text-overflow: ellipsis; } .board-score { font-variant-numeric: tabular-nums; }
.streak { margin-left: .6em; font-size: .8em; }
.avatar { display: inline-block; width: 1.5em; height: 1.62em; margin-right: .35em; vertical-align: -.42em; }
.avatar-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.avatar-pick { display: flex; align-items: center; gap: 1rem; margin-bottom: .9rem; } .avatar-pick .field { margin-bottom: .5rem; }
.avatar-big { flex: none; width: 6.2rem; height: 6.7rem; }
.avatar-tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.phone-top .avatar { width: 2.1rem; height: 2.3rem; margin: 0; }
.big-emoji .avatar-svg { width: 5.4rem; height: 5.8rem; }

/* ---------- 09 Host screen ---------- */
.host { height: 100vh; display: flex; flex-direction: column; background: var(--wash), var(--bg); color: var(--text); }
.host-top, .host-bar { display: flex; align-items: center; background: color-mix(in srgb, var(--bg) 80%, transparent); }
.host-top { flex-wrap: wrap; gap: .6rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.host-bar { justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.host-title { max-width: 22ch; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.join-pill { padding: .35em 1em; border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; } .join-pill b { color: var(--brand-2); letter-spacing: .06em; }
.host-body { flex: 1; display: flex; min-height: 0; }
.stage { flex: 1; display: flex; justify-content: center; padding: 2rem clamp(1rem, 4vw, 3.5rem); overflow-y: auto; }
.stage-col { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; width: 100%; max-width: 760px; margin: auto 0; text-align: center; }
.stage-col.wide { max-width: 1100px; }
.stage-meta { display: flex; align-items: center; gap: .8rem; }
.stage-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem; }
.drawer { width: 340px; max-width: 85vw; overflow-y: auto; border-left: 1px solid var(--line); background: var(--panel); }
.drawer-body { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; }
.join-panel { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(180deg, var(--sheen), transparent 40%), var(--panel); box-shadow: var(--shadow-2); text-align: left; }
.join-panel.big { padding: 1.5rem 2rem; } .join-panel.big .qr { width: 230px; height: 230px; } .join-panel:not(.big) .qr { width: 110px; height: 110px; }
.join-host { font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 800; }
.join-code { color: var(--brand-2); font-family: var(--display); font-size: clamp(2.8rem, 6.4vw, 5rem); font-weight: 800; line-height: 1.05; letter-spacing: .05em; }
.lobby-count { font-size: 1.3rem; font-weight: 700; }
.prompt { font-size: clamp(1.8rem, 3.8vw, 3.2rem); }
.timer { display: grid; place-items: center; width: 4.6rem; height: 4.6rem; border-radius: 50%; background: var(--brand-2); color: var(--on-brand-2); font-family: var(--display); font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer.low { background: var(--bad); color: #fff; animation: pulse .5s infinite alternate; }
.answered { color: var(--muted); font-size: 1.15rem; } .answered b { color: var(--text); font-size: 1.5em; }
.type-hint { width: 100%; padding: 2rem; border-radius: var(--r-lg); background: var(--panel); font-size: 1.6rem; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; width: 100%; }
.podium-step { display: flex; flex-direction: column; align-items: center; width: 30%; max-width: 200px; }
.podium-name { font-family: var(--display); font-size: 1.35rem; font-weight: 800; overflow-wrap: anywhere; } .podium-score { margin-bottom: .4rem; color: var(--muted); }
.podium-step.wait { visibility: hidden; }
.podium-step.new { animation: tile-in .7s var(--spring); } .podium-step.new .podium-block { animation: rise .7s var(--ease); }
.podium-face { position: relative; margin-bottom: .2rem; font-size: 3.4rem; line-height: 1.1; } .p1 .podium-face { font-size: 4.6rem; }
.podium-face .avatar-svg { width: 1.25em; height: 1.35em; }
.crown { position: absolute; top: -.62em; left: 50%; font-size: .55em; transform: translateX(-50%) rotate(-8deg); animation: wiggle 1.6s ease-in-out infinite; }
.awards { margin-top: .2rem; }
.podium-block { display: grid; place-items: center; width: 100%; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--panel-2); font-size: 2.6rem; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25); }
.p1 .podium-block { height: 170px; background: linear-gradient(180deg, #ffd76a, #b8860b); }
.p2 .podium-block { height: 120px; background: linear-gradient(180deg, #d9dce8, #7d8296); }
.p3 .podium-block { height: 85px; background: linear-gradient(180deg, #e7a877, #8a5330); }
.qa-big { display: flex; flex-direction: column; gap: .8rem; width: 100%; text-align: left; }
.qa-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); font-size: clamp(1.1rem, 2vw, 1.5rem); }
.qa-card.pinned, .qa-row.pinned { border-color: var(--brand-2); }
.qa-votes { color: var(--brand-2); font-weight: 800; white-space: nowrap; }
.qa-row { display: flex; flex-wrap: wrap; gap: .7rem; padding: .7rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.drawer .qa-row { flex-direction: column; gap: .4rem; }
.qa-row.hidden, .qa-row.answered { opacity: .6; } .qa-row.pending { border-style: dashed; }
.qa-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; } .qa-body { overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- 10 Phone ---------- */
.phone { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--wash), var(--bg); color: var(--text); }
.phone > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.phone-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.phone-title { font-weight: 800; }
.phone-main { flex: 1; padding: 1.25rem 1rem 6rem; }
.phone-tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--panel); }
.phone-tabs button { flex: 1; padding: .9rem; border: 0; border-top: 3px solid transparent; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.phone-tabs button.on { border-top-color: var(--brand); color: var(--text); }
.p-center { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding-top: 12vh; text-align: center; }
.p-center .lead { margin-bottom: .6rem; } .p-center .board { margin: 1rem 0; }
.p-prompt { font-size: 1.4rem; }
.rank-big { color: var(--brand-2); font-family: var(--display); font-size: 4.8rem; font-weight: 800; line-height: 1; }
.verdict.good h2 { color: var(--ok); } .verdict.bad h2 { color: var(--bad); }
.timebar { height: 8px; overflow: hidden; border-radius: 99px; background: var(--panel-2); }
.timebar-fill { width: 100%; height: 100%; border-radius: 99px; background: var(--brand-2); transition: width .2s linear; } .timebar.low .timebar-fill { background: var(--bad); }
.pick { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--panel); font-weight: 600; cursor: pointer; transition: border-color var(--fast), background var(--fast); }
.pick.on { border-color: var(--brand); background: var(--panel-2); }
.stars { display: flex; justify-content: center; gap: .4rem; } .stars.ten { flex-wrap: wrap; }
.star { width: 3.4rem; height: 3.4rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--muted); font-size: 1.7rem; font-weight: 800; cursor: pointer; transition: transform var(--fast) var(--spring), background var(--fast); }
.stars.ten .star { width: 2.9rem; height: 2.9rem; font-size: 1.1rem; }
.star.on { border-color: var(--brand-2); background: var(--brand-2); color: var(--on-brand-2); transform: scale(1.06); }
.rank-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.rank-row > b { min-width: 1.6em; color: var(--brand-2); }
.vote { display: flex; flex-direction: column; align-items: center; min-width: 3rem; padding: .3rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.phone > .react-bar { position: fixed; left: 50%; bottom: calc(.8rem + env(safe-area-inset-bottom)); z-index: 5; display: flex; gap: .2rem; width: auto; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: var(--r-btn); background: rgba(15, 9, 38, .82); box-shadow: var(--shadow-2); transform: translateX(-50%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.react-bar button { width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; background: transparent; font-size: 1.5rem; cursor: pointer; transition: transform var(--fast) var(--spring), background var(--fast); }
.react-bar button:hover { background: var(--panel-2); } .react-bar button:active { transform: scale(1.45) translateY(-8px); }
.vote.on { border-color: var(--brand); background: var(--brand); color: var(--on-brand); } .vote:disabled { opacity: .5; cursor: default; }

/* ---------- 11 Gift exchange ---------- */
.theme-gift { position: relative; overflow: hidden; background: var(--wash), var(--bg); color: var(--text); }
.theme-gift > * { position: relative; }
.floaters, .hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.floaters span, .hero-bg span { position: absolute; bottom: 0; font-size: 1.8rem; opacity: 0; animation: float-up linear infinite; }
.sound-toggle, .theme-gift > .sound-toggle { position: absolute; top: 1rem; right: 1rem; }
.gift-box { display: inline-block; font-size: 3.2rem; transform-origin: 50% 80%; animation: wiggle 1.4s ease-in-out infinite; }
.gift-box.big { margin: .4rem 0 .8rem; font-size: 5.5rem; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .4)); } .gift-box.shake { animation: shake 1.1s ease-in forwards; }
.match { margin-top: .5rem; padding: 1.25rem; border-radius: var(--r-md); background: var(--bg); text-align: center; }
.match.shown { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 32%, transparent), color-mix(in srgb, var(--brand-2) 26%, transparent)); animation: tile-in var(--slow) var(--spring); }
.match-name { margin: .2rem 0 .8rem; background: linear-gradient(90deg, var(--brand-2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: var(--display); font-size: 2.7rem; font-weight: 800; line-height: 1.1; }
.wish { margin-bottom: .8rem; padding: .8rem; border-radius: var(--r-sm); background: var(--panel); text-align: left; } .wish p { margin: .3rem 0 0; white-space: pre-wrap; }

/* ---------- 12 Branding ---------- */
.brand-logo { height: 2rem; max-width: 9rem; border-radius: 6px; object-fit: contain; }
.brand-logo.large { height: 3.2rem; max-width: 12rem; padding: .3rem; background: var(--panel-2); }
.brand-mark { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-size: 1.25rem; font-weight: 800; }
.center-page .brand-mark .brand-logo { height: 2.8rem; max-width: 12rem; }
.join-text .brand-mark { margin-bottom: .5rem; }
.brand-preview { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: .6rem; }
.preview-screen { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); text-align: center; transition: all var(--med); }
.preview-top { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.preview-code { color: var(--brand); font-family: var(--display); font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: .06em; }
.preview-bar { position: relative; display: flex; justify-content: space-between; width: 100%; padding: .6rem .9rem; overflow: hidden; border-radius: var(--r-sm); background: var(--panel-2); font-weight: 700; }
.preview-bar i { position: absolute; inset: 0 auto 0 0; width: 62%; background: var(--brand); opacity: .5; } .preview-bar span, .preview-bar b { position: relative; }

/* Riuhlings parade */
.riuhlings { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1rem; cursor: pointer; }
.riuhlings span { width: 5.2rem; height: 5.6rem; animation: bob 2.4s ease-in-out infinite, tile-in .5s var(--spring) backwards; transition: transform var(--med) var(--spring); }
.riuhlings span:hover { transform: scale(1.2) rotate(-6deg); }

/* Plans and pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; align-items: stretch; text-align: left; }
.price-card { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.4rem 1.2rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(180deg, var(--sheen), transparent 40%), var(--panel); transition: transform var(--med) var(--ease), box-shadow var(--med); }
.price-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.price-card h3 { margin: 0; } .price-blurb { min-height: 2.6em; margin: 0; color: var(--muted); font-size: .875rem; }
.price { margin-top: .4rem; font-family: var(--display); font-size: 2.3rem; font-weight: 800; line-height: 1; } .price small { color: var(--muted); font-family: var(--font); font-size: .9rem; font-weight: 600; }
.price-note { color: var(--muted); font-size: .82rem; }
.price-list { display: flex; flex: 1; flex-direction: column; gap: .5rem; margin: .9rem 0 1rem; padding: .9rem 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .88rem; }
.price-list li { display: flex; flex-direction: column; color: var(--muted); } .price-list li b { color: var(--text); }
.price-list li.hi span { color: var(--brand-2); font-weight: 700; }
.price-card.plan-quiz { border-top: 4px solid var(--t4); } .price-card.plan-polls { border-top: 4px solid var(--t1); } .price-card.plan-gifts { border-top: 4px solid var(--t5); }
.price-card.best { border: 1.5px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(135deg, var(--brand), var(--brand-2), #b266ff) border-box; box-shadow: 0 0 60px color-mix(in srgb, var(--brand) 22%, transparent); }
.price-card.current { box-shadow: 0 0 0 2px var(--ok); }
.price-flag { position: absolute; top: -.8rem; right: 1rem; padding: .2em .8em; border-radius: var(--r-btn); background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: var(--on-brand); font-size: .75rem; font-weight: 800; }
.plan-row { align-items: flex-start; } .plan-name { min-width: 11rem; flex: 1; }
.plan-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; } .plan-fields .field { margin: 0; } .plan-fields input[type=number] { width: 6.2rem; } .plan-fields .check { padding-bottom: .7em; }

/* ---------- 13 Landing ---------- */
.landing { position: relative; overflow: hidden; }
.landing::before { content: ''; position: absolute; inset: 0 0 auto; height: 100vh; background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 50% 30%, #000, transparent 70%); pointer-events: none; }
.landing > * { position: relative; max-width: 1120px; margin-left: auto; margin-right: auto; }
.landing > .hero-bg { position: absolute; max-width: none; height: 100vh; }
.hero-bg i { position: absolute; width: 46vw; height: 46vw; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 16s ease-in-out infinite; }
.hero-bg i:nth-child(1) { top: -14vw; left: -10vw; background: #5b2bb0; }
.hero-bg i:nth-child(2) { top: 10vh; right: -16vw; background: #c2410c; animation-delay: -5s; }
.hero-bg i:nth-child(3) { top: 48vh; left: 22vw; background: #1b4fb8; opacity: .35; animation-delay: -10s; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 2.5rem; min-height: 78vh; padding: 3rem 1.25rem 4rem; }
.hero-kicker { display: inline-block; margin-bottom: 1.2rem; padding: .3em 1em; border: 1px solid var(--line); border-radius: var(--r-btn); background: rgba(255, 255, 255, .08); color: var(--muted); font-size: .9rem; animation: rise-in .6s backwards; }
.hero-kicker b { color: var(--brand-2); font-style: italic; }
.hero h1 { margin-bottom: .35em; font-size: clamp(2.8rem, 6.4vw, 5.2rem); line-height: 1; letter-spacing: -.035em; }
.hero h1 .word { display: inline-block; white-space: pre; animation: rise-in .7s var(--spring) backwards; }
.hero em { position: relative; background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; white-space: nowrap; }
.hero em::after { content: ''; position: absolute; left: 0; right: 0; bottom: -.02em; height: .12em; border-radius: 99px; background: var(--brand-2); transform: rotate(-1.5deg); transform-origin: left; animation: grow-x .6s 1s ease-out backwards; }
.lead { max-width: 34em; margin: 0 0 1.5rem; color: var(--muted); font-size: 1.2rem; }
.hero .lead { animation: rise-in .7s .5s backwards; }
.join-card { display: inline-flex; flex-direction: column; gap: .6rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-xl); background: color-mix(in srgb, var(--panel) 80%, transparent); box-shadow: var(--shadow-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: rise-in .7s .65s backwards; }
.join-row { display: flex; gap: .6rem; } .join-row .btn { border-radius: var(--r-md); }
input.code-input { width: 8.5em; max-width: 56vw; font-family: var(--display); font-size: 1.7rem; font-weight: 800; letter-spacing: .12em; text-align: center; }
.hero-cta { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; animation: rise-in .7s .8s backwards; }
.hero-cta .btn { animation: glow 2.4s 2s infinite; }

.demo { animation: rise-in .9s .4s backwards; }
.demo-frame { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); box-shadow: var(--shadow-3), 0 0 0 8px rgba(255, 255, 255, .04), 0 0 120px rgba(124, 77, 255, .35); transform: perspective(1200px) rotateY(-7deg) rotateX(3deg); transition: transform .5s var(--ease); }
.demo:hover .demo-frame { transform: perspective(1200px) rotateY(0) rotateX(0); }
.demo-bar-top { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.demo-bar-top i { width: .65rem; height: .65rem; border-radius: 50%; background: var(--line); } .demo-bar-top span { margin-left: .6rem; }
.demo-screen { height: 330px; padding: 1.25rem; }
.demo-scene { display: flex; flex-direction: column; gap: .9rem; height: 100%; animation: fade-in .4s; } .demo-scene.center { align-items: center; text-align: center; }
.demo-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.demo-q { font-family: var(--display); font-size: 1.4rem; font-weight: 800; line-height: 1.2; animation: rise-in .5s backwards; }
.demo-timer { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--brand-2); color: var(--on-brand-2); font-weight: 800; }
.demo-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: auto; }
.demo-tile { display: flex; align-items: center; gap: .6rem; padding: .8rem; border-radius: var(--r-md); background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 55%); color: var(--on-tile); font-weight: 700; animation: tile-in .5s var(--spring) backwards; transition: opacity .4s, transform .4s, box-shadow .4s; }
.demo-tile b { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 8px; background: rgba(20, 16, 31, .16); }
.revealed .demo-tile.lose { opacity: .3; transform: scale(.96); } .revealed .demo-tile.win { transform: scale(1.05); box-shadow: 0 0 0 4px var(--ok); }
.demo-bars { display: flex; flex-direction: column; gap: .6rem; margin-top: auto; }
.demo-bar { position: relative; display: flex; justify-content: space-between; padding: .7rem .9rem; overflow: hidden; border-radius: var(--r-sm); background: var(--panel-2); font-weight: 700; }
.demo-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--t1); opacity: .55; transform-origin: left; animation: grow-x 1.1s var(--ease) backwards; }
.demo-bar span, .demo-bar b { position: relative; }
.demo-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .2em .9em; margin: auto 0; font-family: var(--display); font-weight: 800; line-height: 1.1; }
.demo-cloud span { animation: tile-in .5s var(--spring) backwards; }
.demo-qa { display: flex; flex-direction: column; gap: .6rem; margin: auto 0; }
.demo-ask { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: var(--r-sm); background: var(--panel-2); animation: rise-in .5s backwards; }
.demo-ask b { color: var(--brand-2); white-space: nowrap; }
.demo-gift { margin-top: 1rem; font-size: 5rem; animation: shake 1.4s .3s ease-in backwards; }
.demo-reveal { display: flex; flex-direction: column; animation: tile-in .6s 1.7s var(--spring) backwards; } .demo-reveal small { color: var(--muted); }
.demo-reveal strong { background: linear-gradient(90deg, var(--brand-2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: var(--display); font-size: 2.4rem; font-weight: 800; }
.demo-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 1.1rem; }
.demo-tabs button { padding: .3em .9em; border: 1.5px solid var(--line); border-radius: var(--r-btn); background: transparent; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; transition: all var(--fast); }
.demo-tabs button:hover { color: var(--text); }
.demo-tabs button.on { border-color: var(--text); background: var(--text); color: var(--bg); }

.section { padding: 3.5rem 1.25rem; text-align: center; } .section .lead { margin: 0 auto 2rem; }
.section-head { font-size: clamp(1.8rem, 3.8vw, 2.8rem); letter-spacing: -.025em; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; text-align: left; }
.feature { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); transition: transform var(--med) var(--ease), box-shadow var(--med); }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.feature p { margin: 0; color: var(--muted); }
.feature-ico { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; margin-bottom: .9rem; border-radius: var(--r-md); background: rgba(255, 255, 255, .12); font-size: 1.8rem; transition: transform var(--med) var(--spring); }
.feature:hover .feature-ico { transform: scale(1.15) rotate(-8deg); }
.feature.fun { border-color: rgba(178, 102, 255, .5); background: linear-gradient(160deg, #5b2bb0, #b0235f); } .feature.fun p { color: #e9dcff; }
.feature.pro { border-color: #d3d9e6; border-radius: var(--r-md); background: #f6f8fc; color: #14213d; } .feature.pro p { color: #5a6680; }
.feature.pro .feature-ico { border-radius: var(--r-sm); background: #e3ebff; } .feature.pro h3 { font-family: var(--font); letter-spacing: -.01em; }
.feature.gift { border-color: rgba(255, 200, 87, .5); background: linear-gradient(160deg, #7a1d4a, #1d5a5a); } .feature.gift p { color: #f5dfe8; }
.feature.brand { border: 1.5px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(120deg, #ff6a3d, #ffc24b, #2fd18c, #3d8bff, #b266ff) border-box; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.step { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); text-align: left; transition: transform var(--med) var(--ease); } .step p { margin: 0; }
.step:hover { transform: translateY(-4px); }
.step-n { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .8rem; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); font-family: var(--display); font-size: 1.2rem; font-weight: 800; transform: rotate(-6deg); }
.landing > .cta-band { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: calc(100% - 2.5rem); margin: 2rem auto 3rem; padding: 3.5rem 1.25rem; border-radius: var(--r-xl); background: linear-gradient(120deg, #5b2bb0, #c2410c, #b0235f, #5b2bb0); background-size: 300% 100%; box-shadow: var(--shadow-3); text-align: center; animation: sheen 14s linear infinite; }
.cta-band h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.cta-band .btn { background: #fff; color: #17142a; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--slow) ease-out, transform var(--slow) ease-out; } .reveal.in { opacity: 1; transform: none; }
.foot { padding: 1.5rem; text-align: center; }

/* ---------- 14 Themes ---------- */
/* Quiz games: loud and playful. Used on the big screen and on phones. */
.theme-fun {
  --bg: #170f33; --panel: rgba(255, 255, 255, .07); --panel-2: rgba(255, 255, 255, .13); --line: rgba(255, 255, 255, .17);
  --wash: radial-gradient(circle at 12% 8%, #5b2bb0 0, transparent 42%), radial-gradient(circle at 88% 92%, #b0235f 0, transparent 42%), radial-gradient(circle at 80% 10%, #1b4fb8 0, transparent 35%);
}
.host.theme-fun { background-size: 150% 150%, 150% 150%, 150% 150%, auto; animation: aurora 18s ease-in-out infinite alternate; }
.theme-fun .host-bar, .theme-fun .host-top, .theme-fun .phone-tabs, .theme-fun .drawer { background: rgba(15, 9, 38, .75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.theme-fun .prompt, .theme-fun .p-prompt { text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.theme-fun .tile { box-shadow: 0 6px 0 rgba(0, 0, 0, .28); }
.theme-fun button.tile:hover { transform: translateY(-2px) rotate(-1deg); }
.theme-fun button.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .28); }
.theme-fun .enter .tile { animation: tile-in .5s var(--spring) backwards; }
.theme-fun .enter .tile:nth-child(2) { animation-delay: .08s; } .theme-fun .enter .tile:nth-child(3) { animation-delay: .16s; } .theme-fun .enter .tile:nth-child(n+4) { animation-delay: .24s; }
.theme-fun .timer { width: 5.4rem; height: 5.4rem; font-size: 2.4rem; box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand-2) 28%, transparent), 0 6px 0 rgba(0, 0, 0, .25); }
.theme-fun .join-code { padding: 0 .2em; border-radius: var(--r-md); animation: glow 2s infinite; }
.theme-fun .chip.big.pop:nth-child(odd) { transform: rotate(-3deg); } .theme-fun .chip.big.pop:nth-child(even) { transform: rotate(2deg); }
.theme-fun .chip.big.pop:nth-child(3n) { background: rgba(255, 106, 61, .3); } .theme-fun .chip.big.pop:nth-child(3n+1) { background: rgba(61, 139, 255, .3); } .theme-fun .chip.big.pop:nth-child(3n+2) { background: rgba(32, 201, 151, .3); }
.theme-fun .big-emoji { display: inline-block; font-size: 4rem; animation: wiggle 1.2s ease-in-out infinite; }
.theme-fun .rank-big { animation: tile-in .6s var(--spring); }
.theme-fun .verdict.good { animation: tile-in .5s var(--spring); }
.theme-fun .podium-name { animation: rise-in .6s .6s backwards; }
.theme-fun .board-row.top1 { box-shadow: 0 0 0 2px var(--brand-2), 0 0 30px color-mix(in srgb, var(--brand-2) 35%, transparent); }

/* Polls and Q&A: calm, light and corporate. Used in the dashboard, on the big screen and on phones. */
.theme-pro {
  --bg: #f4f6fa; --panel: #ffffff; --panel-2: #e9edf5; --line: #d5dbe7; --text: #14213d; --muted: #5a6680;
  --brand: #1f5eff; --brand-2: #1f5eff; --on-brand: #ffffff; --on-brand-2: #ffffff; --on-tile: #ffffff; --ok: #118a57; --bad: #d92d4a; --info: #1f5eff;
  --t0: #1f5eff; --t1: #14213d; --t2: #5b8cff; --t3: #0e9f9a; --t4: #6b5bd6; --t5: #3a7bd5; --t6: #8fb1ff; --t7: #51607f;
  --sheen: transparent; --wash: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0) 240px);
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-btn: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06); --shadow-2: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 28px rgba(16, 24, 40, .1); --press: 0 0 0 0 transparent;
  --display: var(--font);
}
.theme-pro h1, .theme-pro h2, .theme-pro h3, .theme-pro .prompt { font-weight: 700; letter-spacing: -.02em; }
.theme-pro .emo, .theme-pro .big-emoji { display: none; }
.theme-pro .btn { box-shadow: none; } .theme-pro .btn:hover { transform: none; filter: brightness(1.1); }
.theme-pro .btn.ghost { box-shadow: inset 0 0 0 1px var(--line); background: #fff; } .theme-pro .btn.ghost:hover, .theme-pro .btn.ghost.on { background: var(--panel-2); }
.theme-pro .logo-mark { background: var(--brand); transform: none; } .theme-pro .logo:hover .logo-mark { transform: none; }
.theme-pro .topnav, .theme-pro .host-top, .theme-pro .host-bar { background: rgba(255, 255, 255, .92); }
.theme-pro .nav-link.on { background: #e3ebff; color: var(--brand); box-shadow: none; }
.theme-pro .card.deck::before { height: 3px; background: var(--brand); }
.theme-pro .card.deck:hover { transform: translateY(-2px); }
.theme-pro .card.empty { background: #fff; }
.theme-pro .tile { background-image: none; }
.theme-pro .bar { background: #fff; box-shadow: inset 0 0 0 1px var(--line); } .theme-pro .bar-fill { opacity: .2; }
.theme-pro .note, .theme-pro .qa-card { background: #fff; box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.theme-pro .cloud-word { color: var(--brand); } .theme-pro .cloud-word:nth-child(even) { color: #14213d; } .theme-pro .cloud-word:nth-child(3n) { color: #5b8cff; }
.theme-pro .tag.poll { background: #e3ebff; }
.theme-pro .timer { width: 4rem; height: 4rem; font-size: 1.6rem; }
.theme-pro .phone-tabs button.on { color: var(--brand); }
.theme-pro input, .theme-pro textarea, .theme-pro select, .theme-pro .list-row.slim, .theme-pro .qa-row { background-color: #fff; }
.theme-pro .pop, .theme-pro .cloud-word, .theme-pro .note { animation: fade-in var(--med); }
.theme-pro .ed-item:hover { transform: none; }

/* Gift exchange: warm and festive. tone-gift is the organiser's pages, theme-gift is what guests see. */
.theme-gift, .tone-gift {
  --bg: #170a1c; --panel: #27122d; --panel-2: #371b3e; --line: #55315c; --muted: #cdb0cf;
  --brand: #ff4f81; --brand-2: #ffc857; --on-brand: #2a0714;
  --wash: radial-gradient(50rem 32rem at 12% -10%, rgba(255, 79, 129, .3), transparent 60%), radial-gradient(46rem 32rem at 100% 100%, rgba(18, 181, 166, .22), transparent 60%);
}
.theme-gift .card { border-color: rgba(255, 200, 87, .38); background: rgba(39, 18, 45, .84); box-shadow: var(--shadow-2), 0 0 70px rgba(255, 79, 129, .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tone-gift .card.deck::before { background: repeating-linear-gradient(135deg, var(--brand) 0 12px, var(--brand-2) 12px 24px); }

/* ---------- 15 Motion ---------- */
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes tile-in { from { opacity: 0; transform: scale(.7) rotate(-3deg); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes rise { from { height: 0; } }
@keyframes pulse { to { transform: scale(1.08); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes wiggle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes shake { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-14deg) scale(1.08); } 40% { transform: rotate(12deg) scale(1.12); } 60% { transform: rotate(-10deg) scale(1.16); } 80% { transform: rotate(8deg) scale(1.2); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 50% { box-shadow: 0 0 0 14px transparent; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(6vw, 4vh) scale(1.15); } 66% { transform: translate(-4vw, 7vh) scale(.92); } }
@keyframes aurora { to { background-position: 100% 0, 0 100%, 40% 100%, 0 0; } }
@keyframes sheen { to { background-position: 300% 0; } }
@keyframes float-up { from { opacity: 0; transform: translateY(110vh) rotate(0); } 10%, 90% { opacity: .5; } to { opacity: 0; transform: translateY(-20vh) rotate(360deg); } }
@keyframes react-up { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 12% { opacity: 1; transform: translate(0, -12vh) scale(1.2); } 100% { opacity: 0; transform: translate(var(--sway, 0), -88vh) scale(1); } }
@keyframes confetti-fall { from { transform: translateY(-10vh) rotate(0); } to { transform: translateY(110vh) rotate(720deg); } }

.pop { animation: pop var(--med) var(--spring); }
.nudge { animation: nudge var(--med); }
.toast { animation: rise-in .25s var(--ease); }
.drawer { animation: fade-in .25s; }
.page, .center-page > .card { animation: rise-in .4s var(--ease) backwards; }
.grid > *, .list > * { animation: rise-in .4s var(--ease) backwards; }
.grid > :nth-child(2), .list > :nth-child(2) { animation-delay: .05s; } .grid > :nth-child(3), .list > :nth-child(3) { animation-delay: .1s; }
.grid > :nth-child(4), .list > :nth-child(4) { animation-delay: .15s; } .grid > :nth-child(n+5), .list > :nth-child(n+5) { animation-delay: .2s; }
.stage.enter .stage-col > *, .phone-main.enter > * > * { animation: rise-in .45s var(--ease) backwards; }
.stage.enter .stage-col > :nth-child(2), .phone-main.enter > * > :nth-child(2) { animation-delay: .07s; }
.stage.enter .stage-col > :nth-child(3), .phone-main.enter > * > :nth-child(3) { animation-delay: .14s; }
.stage.enter .stage-col > :nth-child(n+4), .phone-main.enter > * > :nth-child(n+4) { animation-delay: .21s; }
.enter .bar-fill { transform-origin: left; animation: grow-x .7s var(--ease) backwards; }
.enter .board-row { animation: rise-in .4s var(--ease) backwards; }
.enter .board-row:nth-child(2) { animation-delay: .08s; } .enter .board-row:nth-child(3) { animation-delay: .16s; } .enter .board-row:nth-child(n+4) { animation-delay: .24s; }
.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti span { position: absolute; top: 0; animation: confetti-fall linear forwards; }
.reactions { position: fixed; inset: 0; z-index: 55; overflow: hidden; pointer-events: none; }
.reactions span { position: absolute; bottom: -3rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); animation: react-up ease-out forwards; }

/* ---------- 16 Responsive ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 1.5rem; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .demo-frame { transform: none; }
  .demo-screen { height: 310px; }
}
@media (max-width: 760px) {
  .topnav { gap: .6rem 1rem; }
  .topnav nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .editor, .two-col { grid-template-columns: 1fr; }
  .brand-preview { position: static; }
  .tiles { grid-template-columns: 1fr; }
  .avatar-pick { flex-direction: column; align-items: stretch; text-align: center; } .avatar-big { align-self: center; } .avatar-tools { justify-content: center; }
  .join-panel, .join-panel.big { flex-direction: column; padding: 1rem; text-align: center; }
  .drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; box-shadow: -20px 0 40px rgba(0, 0, 0, .5); }
  .host-title { display: none; }
  .page-head { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .floaters span, .hero-bg span { display: none; }
}
