/* Contradicto design system: a sticker-style game show.
   Paper background, ink outlines, flat color, hard shadows. Three hues carry
   meaning and nothing else: blue is FOR, tomato is AGAINST, sun is "act here".
   DESIGN.md at the repository root explains the rules behind these tokens. */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Bricolage";
  src: url(fonts/bricolage-latin.woff2) format("woff2");
  font-weight: 400 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url(fonts/bricolage-latin-ext.woff2) format("woff2");
  font-weight: 400 800; font-stretch: 75% 100%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #fff4e0;
  --paper-deep: #fbe6c2;
  --card: #fffdf8;
  --ink: #1b1530;
  --ink-soft: #5b5470;
  --line: 3px solid var(--ink);
  --pro: #2f6bff;
  --pro-soft: #dfe7ff;
  --con: #ff4f3a;
  --con-soft: #ffe1db;
  --con-text: #b72b1d;
  --sun: #ffc93c;
  --sun-soft: #fff0c2;
  --ok: #1fa45a;
  --vera: #8a5cf6;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --lift: 0 4px 0 var(--ink);
  --lift-lg: 0 6px 0 var(--ink);

  --font: "Bricolage", ui-rounded, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-xs: 0.78rem;
  --t-sm: 0.9rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.7rem;
  --t-2xl: 2.4rem;

  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.45; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; line-height: 1.05; font-weight: 800; font-stretch: 85%; letter-spacing: -0.01em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--pro); outline-offset: 3px; }
.hidden { display: none !important; }
.screen { min-height: 100dvh; }
.muted { color: var(--ink-soft); }
.label { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.hint { font-size: var(--t-sm); color: var(--ink-soft); }
.hint:empty { display: none; }
.error { font-size: var(--t-sm); font-weight: 700; color: #c92a17; }
.error:empty { display: none; }
.ico { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; vertical-align: -0.18em; }
[data-icon] { display: inline-flex; }

/* ---------- Components ---------- */

/* Card: the one container. White on paper, ink outline, hard shadow. */
.card { background: var(--card); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--lift-lg); padding: 1.4rem; }
.card h3 { font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.8rem; font-stretch: 100%; }

/* Buttons. .cta is the single primary action on any screen. */
.btn, .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  border: var(--line); border-radius: 999px; font-weight: 800; text-decoration: none;
  max-width: 100%; text-align: center; text-wrap: balance;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn { background: var(--card); padding: 0.55rem 1.1rem; box-shadow: 0 3px 0 var(--ink); }
a.btn { color: var(--ink); }
.btn.small { padding: 0.35rem 0.85rem; font-size: var(--t-sm); box-shadow: 0 2px 0 var(--ink); }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; }
.btn.quiet:hover:not(:disabled) { background: var(--paper-deep); transform: none; box-shadow: none; }
.cta {
  background: var(--sun); color: var(--ink); padding: 0.85rem 1.6rem; font-size: var(--t-lg);
  box-shadow: var(--lift); font-stretch: 90%;
}
.btn:hover:not(:disabled), .cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn.small:hover:not(:disabled) { box-shadow: 0 4px 0 var(--ink); }
.btn:active:not(:disabled), .cta:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled, .cta:disabled { opacity: 0.55; box-shadow: none; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none;
  background: var(--card); border: var(--line); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); padding: 0;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.icon-btn[aria-pressed="false"] { color: var(--ink-soft); }
.text-link { background: none; border: none; padding: 0.2rem; font-weight: 700; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--ink); }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; border: var(--line); border-radius: 999px;
  background: var(--card); font-size: var(--t-sm); font-weight: 800; box-shadow: 0 2px 0 var(--ink);
}
.chip-toggle[aria-pressed="true"] { background: #9146ff; color: #fff; }
.tag {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--card); font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.tag .crown-svg { width: 1.1rem; }

/* Inputs */
input {
  width: 100%; padding: 0.7rem 0.9rem; border: var(--line); border-radius: var(--r-sm); background: var(--card);
  font-weight: 600; outline: none;
}
input::placeholder { color: #a39cb3; font-weight: 500; }
input:focus { box-shadow: 0 0 0 4px var(--sun); }
input:focus-visible { outline: none; }
.field { display: grid; gap: 0.35rem; flex: 1; min-width: 0; }

/* Segmented control and toggle chips */
.seg { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.3rem; border: var(--line); border-radius: 999px; background: var(--card); }
.seg button { border: none; border-radius: 999px; background: none; padding: 0.3rem 0.85rem; font-weight: 700; font-size: var(--t-sm); color: var(--ink-soft); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.check {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.85rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--card); font-weight: 700; font-size: var(--t-sm);
}
.check::before { content: ""; width: 1rem; height: 1rem; border: 2px solid var(--ink); border-radius: 5px; background: var(--card); flex: none; }
.check[aria-pressed="true"]::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='%23fff4e0' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }

/* Codes: big monospaced chips; masked for streamers. */
.code-chip {
  display: inline-block; padding: 0.15rem 0.6rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--sun-soft);
  font-family: var(--mono); font-weight: 800; letter-spacing: 0.18em;
}
.code-chip.big { font-size: 1.9rem; padding: 0.25rem 0.9rem; }
.code-chip.masked { color: transparent; text-shadow: 0 0 14px rgba(27, 21, 48, 0.7); user-select: none; }
.code-row { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }

/* Avatars: sticker art scales with the box. Mouths and blinks are CSS. */
.avatar { --level: 0; position: relative; width: 6rem; height: 6rem; flex: none; }
.avatar svg { width: 100%; height: 100%; display: block; overflow: visible; }
.avatar.mini { display: inline-block; width: 1.8rem; height: 1.8rem; vertical-align: middle; }
.avatar .mouth-open, .avatar .mouth-flat, .avatar .mouth-wow { display: none; }
.avatar.speaking .mouth-rest { display: none; }
.avatar.speaking .mouth-open { display: inline; transform-box: fill-box; transform-origin: center; transform: scaleY(calc(0.3 + var(--level) * 1.5)); }
.avatar .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; animation-delay: var(--blink, 0s); }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
.vera-star { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: rotate(18deg) scale(1.15); } }

/* Menu and drawer */
.menu-wrap { position: relative; display: flex; gap: 0.5rem; }
.menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 40; min-width: 15rem; padding: 0.4rem;
  background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--lift);
}
.menu button { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.6rem 0.75rem; border: none; border-radius: var(--r-sm); background: none; font-weight: 700; text-align: left; }
.menu button:hover { background: var(--paper); }
.menu .danger { color: #c92a17; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(26rem, 100vw); display: flex; flex-direction: column;
  background: var(--card); border-left: var(--line);
}
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: var(--line); }
.drawer ol { list-style: none; margin: 0; padding: 1rem 1.2rem; overflow-y: auto; display: grid; gap: 0.7rem; }
.drawer li { padding: 0.6rem 0.8rem; border-radius: var(--r-sm); border-left: 5px solid var(--ink); background: var(--paper); }
.drawer li.pro { border-color: var(--pro); }
.drawer li.con { border-color: var(--con); }

/* Overlay and dialog */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem;
  background: rgba(27, 21, 48, 0.55); overflow-y: auto;
}
.dialog { width: min(34rem, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto; display: grid; gap: 1rem; text-align: center; animation: pop-in 0.35s var(--ease-pop); }
@keyframes pop-in { from { transform: scale(0.9) translateY(12px); opacity: 0; } }
.dialog-foot { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: calc(6.5rem + env(safe-area-inset-bottom)); z-index: 80; transform: translateX(-50%);
  width: max-content; max-width: min(32rem, calc(100vw - 2rem)); padding: 0.75rem 1.1rem; border-radius: var(--r);
  background: var(--ink); color: var(--paper); font-weight: 700; text-align: center; box-shadow: 0 4px 0 rgba(27, 21, 48, 0.35);
  animation: toast-in 0.3s var(--ease-pop);
}
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } }

/* Profile */
.rating-chip { background: var(--sun); }
.rating-change { justify-self: center; padding: 0.2rem 0.9rem; border: 2px solid var(--ink); border-radius: 999px; background: #d9f7e4; font-weight: 800; }
.rating-change.down { background: var(--con-soft); }
.drawer-body { overflow-y: auto; padding: 1rem 1.2rem 1.5rem; display: grid; gap: 1.2rem; align-content: start; }
.drawer-body ol { padding: 0; }
.profile-head { display: flex; align-items: center; gap: 0.9rem; }
.profile-head b { display: block; font-size: var(--t-lg); }
.profile-head small { color: var(--ink-soft); font-weight: 700; }
.rating-big { display: grid; place-items: center; min-width: 4.2rem; height: 4.2rem; padding: 0 0.5rem; border: var(--line); border-radius: var(--r); background: var(--sun); font-size: 1.8rem; font-weight: 800; font-stretch: 80%; box-shadow: 0 3px 0 var(--ink); }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.6rem; }
.history li small { grid-column: 1 / -1; color: var(--ink-soft); }
.history li.won { border-color: var(--ok); }
.history li.lost { border-color: var(--con); }
.history .delta { font-weight: 800; }
.profile-key { display: grid; gap: 0.5rem; }
.profile-key .code-row { justify-content: flex-start; }
.small-key { font-size: var(--t-sm); letter-spacing: 0.04em; word-break: break-all; }
.restore { display: flex; gap: 0.5rem; }
.restore input { padding: 0.45rem 0.7rem; font-size: var(--t-sm); }
.leaders li { display: flex; justify-content: space-between; border-left-color: var(--sun); }
.leaders li.me { background: var(--sun-soft); }

/* Account: sign-in, passes, and the account box in the drawer */
.signin { width: min(26rem, 100%); }
.signin h2 { font-size: var(--t-xl); font-stretch: 85%; }
.signin-oauth { display: grid; gap: 0.6rem; }
.signin-oauth .btn { width: 100%; }
.signin-form { display: grid; gap: 0.7rem; }
.signin-form .cta { width: 100%; }
#signin-code { text-align: center; font-family: var(--mono); font-size: var(--t-lg); font-weight: 800; letter-spacing: 0.35em; }
.plan {
  display: grid; gap: 0.15rem; padding: 0.9rem 1.1rem; text-align: left;
  background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.plan b { font-size: var(--t-lg); }
.plan span { color: var(--ink-soft); font-weight: 600; }
.plan:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: var(--sun-soft); }
.plan:disabled { opacity: 0.55; }

/* Meters */
.level { position: relative; width: 4rem; height: 0.6rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); overflow: hidden; }
.level i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ok); transition: width 0.08s; }

/* ---------- Home ---------- */

.home { max-width: 1040px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.4rem 0 1.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; }
.brand-logo { display: inline-flex; width: 2.6rem; }
.brand-logo svg { width: 100%; }
.brand-logo.big { width: 4.5rem; margin: 0 auto; }
.wordmark { font-size: 1.55rem; font-weight: 800; font-stretch: 80%; letter-spacing: -0.02em; }
.topnav-actions { display: flex; gap: 0.6rem; align-items: center; }
.lang-picker { padding: 0.35rem 0.6rem; border: var(--line); border-radius: 999px; background: var(--card); font: inherit; font-weight: 800; font-size: var(--t-sm); box-shadow: 0 2px 0 var(--ink); cursor: pointer; }

.pick { display: grid; gap: 2rem; }
.hero-title { font-size: clamp(2.8rem, 8.5vw, 5.4rem); font-stretch: 80%; line-height: 1.04; letter-spacing: -0.015em; }
.hero-title mark { background: var(--sun); color: inherit; padding: 0 0.14em; border-radius: 0.14em; line-height: 1.12; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-sub { max-width: 34rem; font-size: var(--t-lg); color: var(--ink-soft); margin-top: -0.8rem; }

.modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.mode {
  display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); text-align: left; padding: 0; overflow: hidden;
  background: var(--card); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--lift-lg);
  transition: transform 0.15s, box-shadow 0.15s;
}
.mode:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 10px 0 var(--ink); }
.mode:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.mode-art { display: flex; align-items: flex-end; justify-content: center; gap: 0.2rem; height: 7.5rem; padding-top: 0.8rem; border-bottom: var(--line); }
.mode .mode-art { background: var(--paper-deep); }
/* Two players and a badge share a narrow card, so the art shrinks to fit. */
.mode-art .avatar { flex: 0 1 5.2rem; width: 5.2rem; height: auto; min-width: 0; aspect-ratio: 1; margin-bottom: -3px; }
.mode-art .badge { flex: none; align-self: center; display: grid; place-items: center; width: 2rem; height: 2rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); }
.mode-copy { display: grid; gap: 0.1rem; padding: 0.9rem 1rem 1rem; }
.mode-copy b { font-size: var(--t-lg); font-stretch: 85%; }
.mode-copy small { color: var(--ink-soft); font-size: var(--t-sm); }
.mode { position: relative; }
.mode-copy { padding-right: 2.8rem; }
.mode-go { position: absolute; right: 1rem; bottom: 1.15rem; font-size: 1.3rem; display: inline-flex; transition: transform 0.15s; }
.mode:hover .mode-go { transform: translateX(4px); }
/* Daily Debate: the one sticker on the page that changes every day. */
.daily {
  display: grid; gap: 0.7rem; padding: 1.3rem 1.4rem; border: var(--line); border-radius: var(--r-lg);
  background: var(--sun); box-shadow: var(--lift-lg); transform: rotate(-0.4deg);
}
.daily-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.daily-tag { background: var(--ink); color: var(--sun); border-color: var(--ink); }
.daily-meta { font-size: var(--t-sm); font-weight: 700; }
.daily-motion { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 800; font-stretch: 80%; line-height: 1.05; text-wrap: balance; }
.daily-motion::before { content: "“"; }
.daily-motion::after { content: "”"; }
.daily-sub { font-weight: 600; }
.daily-play { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.daily-play input { flex: 1; min-width: 10rem; }
.daily .cta { background: var(--card); }
.daily-done { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; font-size: var(--t-lg); }
.daily .text-link { justify-self: start; color: var(--ink); }
.daily-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.daily-board li { display: flex; justify-content: space-between; padding: 0.35rem 0.7rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--card); font-weight: 700; }
.daily-board li.me { background: var(--sun-soft); }
.mode-heading { font-size: var(--t-xl); font-stretch: 90%; margin-bottom: -1rem; }

.join { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.join label { font-weight: 800; }
.join input { width: 9rem; text-align: center; font-family: var(--mono); font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; padding: 0.5rem; }
.join .error { flex-basis: 100%; text-align: center; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { display: flex; gap: 0.75rem; align-items: flex-start; }
.steps li > b { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border: var(--line); border-radius: 50%; background: var(--card); font-size: var(--t-lg); }
.steps span { color: var(--ink-soft); }
.steps strong { font-weight: 800; color: var(--ink); }
.support { text-align: center; color: #c92a17; font-weight: 700; }
.support:empty { display: none; }

/* Setup */
.setup { display: grid; gap: 1.2rem; max-width: 44rem; margin: 0 auto; animation: slide-in 0.3s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.back-link { justify-self: start; display: inline-flex; align-items: center; gap: 0.3rem; border: none; background: none; padding: 0.3rem 0; font-weight: 800; color: var(--ink-soft); }
.back-link:hover { color: var(--ink); }
.setup-head { display: flex; align-items: flex-end; gap: 1rem; }
.setup-head h2 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-stretch: 75%; }
.setup-art { display: flex; align-items: flex-end; }
.setup-art .avatar { width: 4.2rem; height: 4.2rem; }
.setup-art .avatar + .avatar { margin-left: -1rem; }
.setup-art .badge { display: none; }
.setup-card { display: grid; gap: 1.3rem; }
.field-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }

.motion-card { display: grid; gap: 0.8rem; padding: 1.2rem; border: var(--line); border-radius: var(--r); background: var(--sun-soft); }
.motion-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.motion-text { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; font-stretch: 85%; line-height: 1.1; text-wrap: balance; }
.motion-text.quoted::before { content: "“"; }
.motion-text.quoted::after { content: "”"; }
.motion-input { font-size: var(--t-lg); font-weight: 700; }
.motion-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.packs { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.2rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); }
.pack { border: none; background: none; border-radius: 999px; padding: 0.2rem 0.7rem; font-size: var(--t-xs); font-weight: 800; color: var(--ink-soft); }
.pack.on { background: var(--ink); color: var(--paper); }

.poll-card { display: grid; gap: 0.7rem; padding: 1.2rem; border: var(--line); border-radius: var(--r); background: #ece2ff; }
.poll { display: grid; gap: 0.5rem; }
.poll-row {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.7rem; overflow: hidden;
  padding: 0.7rem 0.9rem; border: var(--line); border-radius: var(--r-sm); background: var(--card); text-align: left; font-weight: 700;
}
.poll-row i { position: absolute; inset: 0 auto 0 0; width: 0; background: #d6c6ff; transition: width 0.3s; }
.poll-row > :not(i) { position: relative; }
.poll-row b { font-family: var(--mono); }
.poll-row small { font-weight: 800; }
.poll-row.on { background: var(--sun); box-shadow: 0 3px 0 var(--ink); }
.poll-card .btn { justify-self: start; }
.side-row { display: grid; gap: 0.5rem; }
.side-row > .seg { justify-self: start; }
.sides { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.6rem; }
.side-btn {
  padding: 0.8rem 0.5rem; border: var(--line); border-radius: var(--r); background: var(--card); box-shadow: 0 3px 0 var(--ink);
  font-size: var(--t-lg); font-weight: 800; font-stretch: 85%; transition: transform 0.1s;
}
.side-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.side-btn.pro.on { background: var(--pro); color: #fff; }
.side-btn.con.on { background: var(--con); color: #fff; }
.side-btn.any.on { background: var(--ink); color: var(--paper); }

.more { border-top: 2px dashed #d9cdb5; padding-top: 1rem; }
.more summary { cursor: pointer; font-weight: 800; list-style: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border: 2px solid var(--ink); border-radius: 50%; font-size: 1rem; line-height: 1; }
.more[open] summary::before { content: "−"; }
.option { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.9rem; }
.option > .label { min-width: 7rem; }
.setup .cta { width: 100%; font-size: 1.4rem; padding: 1rem; }

/* Invite */
.center-screen { display: grid; place-items: center; padding: 1.25rem; }
.invite-card { width: min(28rem, 100%); display: grid; gap: 1rem; text-align: center; }
.invite-card h2 { font-size: var(--t-2xl); font-stretch: 80%; }
.invite-form { display: grid; gap: 0.8rem; text-align: left; }
.invite-form .cta { width: 100%; }

/* ---------- Tournament room ---------- */

.room { max-width: 1180px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.room-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.room-title { min-width: 0; text-align: center; }
.room-title h2 { overflow-wrap: anywhere; text-wrap: balance; }
.room-title h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-stretch: 80%; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.room-main { display: grid; gap: 1rem; text-align: center; }
.room-main .cta { width: 100%; }
.showdown { display: flex; justify-content: center; align-items: center; gap: 1.2rem; }
.showdown .champ, .showdown .challenger { flex: 1 1 0; display: grid; justify-items: center; gap: 0.3rem; min-width: 9rem; max-width: 16rem; text-align: center; }
.showdown .tag { white-space: normal; text-align: center; }
.showdown .avatar { width: 7.5rem; height: 7.5rem; }
.showdown b { max-width: 100%; font-size: var(--t-lg); overflow-wrap: anywhere; text-wrap: balance; }
.showdown small { color: var(--ink-soft); font-weight: 700; min-height: 1.2em; }
.vs { font-size: 2rem; font-weight: 800; font-stretch: 75%; font-style: italic; padding: 0.1rem 0.6rem; border: var(--line); border-radius: var(--r-sm); background: var(--sun); transform: rotate(-6deg); }
.room-live { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.7rem; border: 2px solid var(--ink); border-radius: var(--r); background: var(--con-soft); font-weight: 700; }
.live-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--con); border: 2px solid var(--ink); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.room-next { font-weight: 800; }
.room-invite { display: grid; gap: 0.9rem; text-align: center; }
.standings { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.standings th { text-align: left; font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); padding: 0.3rem; }
.standings td { padding: 0.45rem 0.3rem; border-top: 2px solid var(--paper-deep); }
.standings tr.champion td { background: var(--sun-soft); }
.standings tr.me td:nth-child(2) { font-weight: 800; }
.standings tr.away { opacity: 0.45; }
.crown-mini .crown-svg { width: 1.1rem; vertical-align: -0.1em; }
.host-tag { font-size: var(--t-xs); font-weight: 800; border: 2px solid var(--ink); border-radius: 6px; padding: 0 0.3rem; }
.kick { padding: 0.15rem 0.6rem; font-size: var(--t-xs); }
.results-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.results-list li { display: grid; gap: 0.15rem; padding: 0.7rem 0.9rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--paper); }
.results-list li.muted { border-style: dashed; }
.results-list small { color: var(--ink-soft); }
.results-list q { font-weight: 700; }
.room-standings, .room-results, .room-settings { background: transparent; border: 0; border-top: 2px solid var(--ink); border-radius: 0; box-shadow: none; padding: 1rem 0.2rem; }
.room-settings summary { cursor: pointer; font-weight: 800; }
.room-settings .option { display: grid; justify-items: start; gap: 0.35rem; }
.room-settings input { width: 13rem; padding: 0.45rem 0.7rem; }

/* ---------- Stage ---------- */

.stage {
  height: 100dvh; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; overflow: hidden;
  background: var(--paper);
}
.stage-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 0.8rem 1.1rem 0.6rem; }
.stage-title { text-align: center; display: grid; justify-items: center; gap: 0.35rem; min-width: 0; }
.round-tag {
  padding: 0.1rem 0.7rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun);
  font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.stage-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
/* Which side you argue, always in view during the match. */
.you-side {
  padding: 0.1rem 0.7rem; border: 2px solid var(--ink); border-radius: 999px; color: #fff;
  font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.you-side.pro { background: var(--pro); }
.you-side.con { background: var(--con); }
.notes-btn.has-notes { background: var(--sun); }
.stage-title h1 { font-size: clamp(1.25rem, 2.6vw, 2rem); font-stretch: 80%; max-width: 46rem; text-wrap: balance; }

/* Scoreboard */
.scoreboard {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 2.2fr) auto minmax(0, 1fr); align-items: center; gap: 1rem;
  margin: 0.2rem 1.1rem 0.6rem; padding: 0.6rem 1rem; background: var(--card); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--lift);
}
.team { display: grid; min-width: 0; }
.team.con { text-align: right; }
.team-side { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.team.pro .team-side { color: var(--pro); }
.team.con .team-side { color: var(--con-text); }
.score.con, .fs.con, .podium.con .plate, .juror.con .sign, .side-btn.con.on, .banner-con, .btn.vote.con.on { color: var(--ink); }
.team-name { font-size: var(--t-lg); font-weight: 800; font-stretch: 85%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score {
  display: grid; place-items: center; min-width: 3.6rem; height: 3.6rem; padding: 0 0.5rem; border: var(--line); border-radius: var(--r);
  color: #fff; font-size: 2.3rem; font-weight: 800; font-stretch: 80%; font-variant-numeric: tabular-nums; box-shadow: 0 3px 0 var(--ink);
}
.score.pro { background: var(--pro); }
.score.con { background: var(--con); }
.score.bump { animation: bump 0.5s var(--ease-pop); }
@keyframes bump { 40% { transform: scale(1.3) rotate(-4deg); } }
.meter { display: grid; gap: 0.35rem; }
.pips { display: flex; gap: 0.3rem; justify-content: center; padding-top: 0.5rem; }
.pip {
  position: relative; flex: 1; max-width: 2.4rem; height: 1.8rem; border: 2px solid var(--ink); border-radius: 7px; background: var(--paper);
  transition: background 0.3s;
}
.pip.pro { background: var(--pro); }
.pip.con { background: var(--con); }
.pip.goal::after {
  content: ""; position: absolute; top: -0.6rem; left: 50%; width: 0.65rem; height: 0.65rem; transform: translateX(-50%) rotate(45deg);
  background: var(--sun); border: 2px solid var(--ink);
}
.meter-caption { text-align: center; font-size: var(--t-xs); font-weight: 700; color: var(--ink-soft); }
.meter-caption:empty { display: none; }

/* Announcer ticker: an ink strip, like a broadcast lower third. */
.ticker {
  display: flex; align-items: stretch; margin: 0 1.1rem; border: var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--ink); color: var(--paper); min-height: 2.6rem;
}
.ticker-tag {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0 0.8rem; background: var(--sun); color: var(--ink);
  border-right: var(--line); font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; white-space: nowrap;
}
.ticker-text { align-self: center; padding: 0.45rem 0.9rem; font-weight: 700; line-height: 1.3; }
.ticker-text small { display: block; font-size: var(--t-xs); font-weight: 600; opacity: 0.75; }
.ticker-text.fresh { animation: ticker-in 0.45s ease-out; }
@keyframes ticker-in { from { transform: translateY(40%); opacity: 0; } }
.ticker.quote { background: var(--sun); color: var(--ink); }
.ticker.quote .ticker-tag { background: var(--ink); color: var(--sun); }
.ticker.quote .ticker-text { font-size: var(--t-lg); font-weight: 800; font-stretch: 85%; }

/* Arena: two podiums and the clock, on a flat sunburst. */
.arena {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 1.5rem;
  padding: 1rem 2rem 0; min-height: 0; overflow: hidden; container-type: size;
  background: repeating-conic-gradient(from -90deg at 50% 115%, #fff0d6 0deg 7deg, transparent 7deg 14deg);
}
.arena.hype { animation: hype 0.4s ease-in-out 4; }
@keyframes hype { 50% { background-color: #ffe2a1; } }
.podium { position: relative; z-index: 2; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-self: stretch; min-width: 0; }
/* The podiums scale with the arena's height, so a short window or an open
   type box shrinks the figures instead of cutting them off. */
.figure { --fig: min(11rem, 34cqh); position: relative; display: grid; justify-items: center; }
.figure::before {
  content: ""; position: absolute; bottom: -0.2rem; width: var(--fig); height: var(--fig); border-radius: 50%; border: var(--line);
  background: var(--card); transition: background 0.3s, transform 0.3s var(--ease-pop); transform: scale(0.85);
}
.podium.pro .figure::before { background: var(--pro-soft); }
.podium.con .figure::before { background: var(--con-soft); }
.podium.active .figure::before { background: var(--sun); transform: scale(1); }
.figure .avatar { width: var(--fig); height: var(--fig); transform: translateY(calc(var(--level) * -5px)); transition: transform 0.1s; }
.podium.offline .avatar { opacity: 0.35; filter: grayscale(1); }
.crown { position: absolute; top: -1.4rem; z-index: 3; width: 3.4rem; animation: crown-drop 0.6s var(--ease-pop); }
.crown .crown-svg { width: 100%; }
.podium.winner .crown { display: block !important; }
@keyframes crown-drop { from { transform: translateY(-30px) rotate(-20deg); opacity: 0; } }
.plate {
  position: relative; z-index: 2; display: grid; justify-items: center; min-width: 11rem; max-width: 100%; margin-top: -0.4rem; padding: 0.4rem 1.2rem 0.6rem;
  border: var(--line); border-bottom: none; border-radius: var(--r) var(--r) 0 0; color: #fff;
}
.podium.pro .plate { background: var(--pro); }
.podium.con .plate { background: var(--con); }
.side-tag { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9; }
.pname { display: flex; justify-content: center; gap: 0.25em; min-width: 0; max-width: 14rem; font-size: var(--t-lg); font-weight: 800; font-stretch: 85%; white-space: nowrap; }
/* A long name gives way to the ellipsis; "(you)" always stays. */
.pname span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pname span + span { flex: none; }

/* Speech bubbles: newest words at the bottom; older lines fade out at the top. */
.bubble {
  position: relative; align-self: end; width: min(100%, 30rem); max-height: min(10.5rem, 30cqh); overflow-y: auto; scrollbar-width: none;
  margin-bottom: 1.2rem; padding: 0.75rem 1rem; border: var(--line); border-radius: var(--r-lg); background: var(--card);
  font-size: 1.2rem; font-weight: 600; line-height: 1.35; box-shadow: var(--lift);
  transition: opacity 0.3s, background 0.3s;
}
.bubble::-webkit-scrollbar { display: none; }
.bubble.empty { visibility: hidden; }
.bubble.stale { background: var(--paper-deep); box-shadow: none; }
.bubble .interim { color: var(--ink-soft); }
.dots { display: inline-flex; gap: 0.25rem; vertical-align: middle; margin-left: 0.2rem; }
.dots i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--ink); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 0.4; } }
.podium.censored .bubble .final { filter: blur(5px); }

/* Clock */
.center { position: relative; z-index: 2; display: grid; justify-items: center; gap: 0.6rem; padding-bottom: 2.5rem; }
.timer { position: relative; width: min(7.5rem, 26cqh); height: min(7.5rem, 26cqh); }
.timer > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .track { fill: var(--card); stroke: var(--ink); stroke-width: 14; }
.timer .ring { fill: none; stroke: var(--sun); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.timer .ring.pro { stroke: var(--pro); }
.timer .ring.con { stroke: var(--con); }
.timer .ring.judge { stroke: var(--sun); }
.timer-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: min(2.4rem, 8.5cqh); font-weight: 800; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.timer-text .ico, .timer-text .crown-svg { width: 2.2rem; height: 2.2rem; }
.timer.urgent { animation: shake 0.5s infinite; }
.timer.urgent .timer-text { color: #c92a17; }
@keyframes shake { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.status { padding: 0.25rem 0.8rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 800; font-size: var(--t-sm); text-align: center; max-width: 16rem; }
.status:empty { visibility: hidden; }

/* Couch handoff countdown */
.handoff {
  position: absolute; inset: 0; z-index: 20; display: grid; align-content: center; justify-items: center; gap: 1rem;
  padding: 0 1rem; background: rgba(255, 244, 224, 0.92); font-weight: 800; text-align: center;
}
.handoff span { max-width: 100%; font-size: var(--t-xl); font-stretch: 80%; line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; }
.handoff b { display: grid; place-items: center; width: 8rem; height: 8rem; border: var(--line); border-radius: 50%; background: var(--sun); font-size: 4.5rem; box-shadow: var(--lift-lg); animation: tick-pulse 1s infinite; }
@keyframes tick-pulse { 15% { transform: scale(1.08); } }
.handoff small { font-size: var(--t-md); color: var(--ink-soft); }
.handoff small:empty { display: none; }

/* Banners: one big sticker slapped across the stage. */
.banners { position: absolute; inset: 0; z-index: 30; pointer-events: none; display: grid; place-items: center; }
.banner {
  grid-area: 1 / 1; display: grid; justify-items: center; gap: 0.2rem; max-width: 90%; padding: 0.9rem 2rem; text-align: center;
  border: var(--line); border-radius: var(--r-lg); background: var(--sun); box-shadow: var(--lift-lg);
  animation: slap 2.6s var(--ease-pop) forwards;
}
.banner strong { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; font-stretch: 75%; line-height: 1; }
.banner span { font-weight: 700; }
.banner-pro { background: var(--pro); color: #fff; }
.banner-con { background: var(--con); color: #fff; }
@keyframes slap {
  0% { transform: scale(2.2) rotate(-12deg); opacity: 0; }
  12% { transform: scale(1) rotate(-3deg); opacity: 1; }
  85% { transform: scale(1) rotate(-3deg); opacity: 1; }
  100% { transform: scale(0.9) rotate(-3deg); opacity: 0; }
}

/* Jury box: one row of seats, each holding up a vote card. */
.jury {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(var(--seats, 11), minmax(0, 6.4rem)); justify-content: center; gap: 0.4rem;
  padding: 1.6rem 1rem 0.5rem; background: var(--paper-deep); border-top: var(--line);
}
.juror { position: relative; display: grid; justify-items: center; min-width: 0; }
.juror .avatar { width: 4.4rem; height: 4.4rem; }
.juror .who { max-width: 100%; font-size: 0.85rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.juror .who .short { display: none; }
.juror .likes { font-size: 0.65rem; font-weight: 700; color: var(--ink-soft); }
.juror .likes:empty { display: none; }
.sign {
  position: absolute; top: -1.2rem; z-index: 2; padding: 0.05rem 0.45rem; border: 2px solid var(--ink); border-radius: 6px; background: var(--card);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; transform: rotate(-4deg); white-space: nowrap;
}
.juror.pro .sign { background: var(--pro); color: #fff; transform: rotate(3deg); }
.juror.con .sign { background: var(--con); color: #fff; }
.juror.undecided .avatar .mouth-rest { display: none; }
.juror.undecided .avatar .mouth-flat { display: inline; }
.juror.flip .sign { animation: flip-card 0.6s var(--ease-pop); }
.juror.flip .avatar { animation: hop 0.5s var(--ease-pop); }
.juror.flip .avatar .mouth-rest, .juror.flip .avatar .mouth-flat { display: none; }
.juror.flip .avatar .mouth-wow { display: inline; }
@keyframes flip-card { 0% { transform: rotateY(90deg) scale(1.4); } }
@keyframes hop { 40% { transform: translateY(-10px); } }
.juror .react {
  position: absolute; bottom: calc(100% + 1.2rem); z-index: 6; width: max-content; max-width: 15rem; padding: 0.45rem 0.7rem;
  border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--card); box-shadow: 0 3px 0 var(--ink);
  font-size: 1rem; font-weight: 700; line-height: 1.3; text-align: center;
  opacity: 0; transform: translateY(6px) scale(0.9); transition: opacity 0.2s, transform 0.25s var(--ease-pop); pointer-events: none;
}
.juror.reacting { z-index: 5; }
.juror.reacting .react { opacity: 1; transform: none; }
.juror.reacting .avatar .mouth-rest, .juror.reacting .avatar .mouth-flat, .juror.reacting .avatar .mouth-wow { display: none; }
.juror.reacting .avatar .mouth-open { display: inline; animation: chatter 0.22s 6 alternate; transform-box: fill-box; transform-origin: center; }
@keyframes chatter { to { transform: scaleY(0.3); } }
.juror:first-child .react { left: 0; }
.juror:last-child .react { right: 0; }

/* Dock: always says what to do right now. */
.dock { position: relative; z-index: 10; padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom)); background: var(--card); border-top: var(--line); }
.dock-row { display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap; min-height: 3.2rem; }
.dock .cta { padding: 0.7rem 1.6rem; font-size: var(--t-lg); }
.hint-text { font-weight: 700; color: var(--ink-soft); text-align: center; text-wrap: balance; }
.mic-pill {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 1rem; border: var(--line); border-radius: 999px;
  background: var(--card); font-weight: 800;
}
.mic-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--ink-soft); flex: none; }
.mic-pill.live { background: var(--con-soft); }
.mic-pill.live .mic-dot { background: var(--con); animation: pulse 1.1s infinite; }
.mic-pill.ok { background: #d9f7e4; }
.mic-pill.ok .mic-dot { background: var(--ok); }
.mic-pill.warn { background: var(--sun-soft); }
.mic-pill.warn .mic-dot { background: var(--sun); }
.type-form { flex-basis: 100%; max-width: 40rem; }
.vote-label { font-weight: 800; }
.vote-label small { font-weight: 600; color: var(--ink-soft); }
.btn.vote { min-width: 7.5rem; }
.btn.vote.pro.on { background: var(--pro); color: #fff; }
.btn.vote.con.on { background: var(--con); color: #fff; }

/* ---------- Lobby ---------- */

.faceoff { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.face { flex: 1 1 0; display: grid; justify-items: center; gap: 0.1rem; min-width: 0; }
.face .avatar { width: 6.5rem; height: 6.5rem; }
.face b { max-width: 100%; font-size: var(--t-lg); font-stretch: 85%; text-align: center; overflow-wrap: anywhere; }
.face small { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.face.pro small { color: var(--pro); }
.face.con small { color: var(--con-text); }
.face.waiting .avatar { opacity: 0.3; filter: grayscale(1); }
.lobby-motion { font-size: var(--t-xl); font-weight: 800; font-stretch: 85%; line-height: 1.15; text-wrap: balance; }
.lobby-side { color: var(--ink-soft); }
.lobby-side b { color: var(--ink); }
.invite { display: grid; gap: 0.7rem; justify-items: center; padding: 1rem; border: 2px dashed var(--ink); border-radius: var(--r); }
.seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; font-weight: 700; }
.seats:empty { display: none; }
.seats li { color: var(--ink-soft); }
.seats li.ready { color: var(--ok); }
.rules { margin: 0; padding: 0; list-style: none; counter-reset: rule; display: grid; gap: 0.55rem; text-align: left; }
.rules li { counter-increment: rule; position: relative; padding-left: 2.3rem; min-height: 1.6rem; }
.rules li::before {
  content: counter(rule); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.6rem; height: 1.6rem;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--sun); font-weight: 800; font-size: var(--t-sm);
}
.mic-check { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; color: var(--ink-soft); font-size: var(--t-sm); font-weight: 600; }
.mic-check .level { width: 7rem; }
.mic-check[data-state="off"] .level { display: none; }
.lobby .cta { width: 100%; }

.you-argue {
  justify-self: center; display: grid; justify-items: center; padding: 0.45rem 1.6rem 0.55rem; color: #fff;
  border: var(--line); border-radius: var(--r); box-shadow: var(--lift); transform: rotate(-2deg);
}
.you-argue.pro { background: var(--pro); }
.you-argue.con { background: var(--con); }
.you-argue small { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.you-argue b { font-size: 2.4rem; font-stretch: 75%; line-height: 1; }
.lobby-head, .lobby-go { display: grid; gap: 1rem; }
.lobby-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
.start-note { font-weight: 700; }
.overlay.top { z-index: 56; }
.dialog.jury-preview { width: min(40rem, 100%); text-align: left; }
.jury-preview header { display: flex; align-items: center; justify-content: space-between; }
.jury-preview h3 { font-size: var(--t-lg); }
.jury-preview .hint { margin: 0; }
.lean-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.lean-col h4 { margin-bottom: 0.3rem; font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.lean-col.pro h4 { color: var(--pro); }
.lean-col.con h4 { color: var(--con-text); }
.lean-col.open h4 { color: var(--ink-soft); }
.lean-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.lean-col li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.1rem 0.45rem; align-items: start; font-size: var(--t-sm); line-height: 1.3; }
.lean-col li .avatar { grid-row: span 2; width: 2rem; height: 2rem; }
.lean-col li b { font-weight: 800; }
.lean-col li span { color: var(--ink-soft); }
.lean-col.open ul { grid-template-columns: 1fr 1fr; }
.notes-panel textarea {
  width: 100%; padding: 0.6rem 0.7rem; border: var(--line); background: var(--card); font: inherit; font-size: var(--t-sm); line-height: 1.4;
}

/* Notes stay on screen while you speak. */
.notes-panel {
  position: absolute; left: 1.1rem; top: 0.4rem; bottom: 0.8rem; z-index: 55; width: min(22rem, 34%);
  display: flex; flex-direction: column; background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--lift);
}
.notes-panel header { display: flex; align-items: center; justify-content: space-between; padding: 0.35rem 0.4rem 0.35rem 0.9rem; border-bottom: 2px solid var(--ink); }
.notes-panel header .icon-btn { width: 2rem; height: 2rem; box-shadow: none; }
/* It covers your own podium, never the jury or your opponent. */
.notes-panel.con { left: auto; right: 1.1rem; }
.notes-panel:focus-within { box-shadow: 0 0 0 4px var(--sun), var(--lift); }
.notes-panel textarea { flex: 1; min-height: 0; resize: none; border: none; outline: none; }
.notes-panel small { padding: 0.35rem 0.9rem 0.5rem; border-top: 2px solid var(--ink); color: var(--ink-soft); font-size: var(--t-xs); }

/* ---------- Result ---------- */

.result .winner { position: relative; display: grid; justify-items: center; padding-top: 1.4rem; }
.result .winner .avatar { width: 8rem; height: 8rem; }
.result-crown { position: absolute; top: 0; z-index: 2; width: 4rem; animation: crown-drop 0.7s var(--ease-pop); }
.result-crown .crown-svg { width: 100%; }
.result h2 { font-size: clamp(2rem, 6vw, 3rem); font-stretch: 75%; }
.verdict { color: var(--ink-soft); font-weight: 600; }
.verdict:empty { display: none; }
.dialog.lost .result-crown { display: none; }
.final-score { display: flex; justify-content: center; gap: 0.8rem; }
.fs { display: grid; justify-items: center; min-width: 6rem; padding: 0.4rem 1rem; border: var(--line); border-radius: var(--r); color: #fff; box-shadow: 0 3px 0 var(--ink); }
.fs b { font-size: 2.6rem; line-height: 1; font-stretch: 80%; }
.fs span { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.fs.pro { background: var(--pro); }
.fs.con { background: var(--con); }
.momentum { margin: 0; padding: 0.6rem; border: 2px solid var(--ink); border-radius: var(--r); background: var(--paper); display: grid; gap: 0.3rem; }
.momentum svg { display: block; width: 100%; height: 4.5rem; }
.momentum figcaption { display: flex; flex-wrap: wrap; gap: 0.1rem 1rem; justify-content: center; font-size: var(--t-sm); font-weight: 800; }
.momentum figcaption > * { white-space: nowrap; }
.momentum .pro { color: var(--pro); }
.momentum .con { color: var(--con-text); }
.reasons { display: grid; gap: 0.5rem; text-align: left; }
.reasons:empty { display: none; }
.reasons h3 { font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.reason { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.55rem 0.7rem; border-radius: var(--r-sm); border-left: 5px solid var(--ink); background: var(--paper); font-size: var(--t-sm); }
.reason.pro { border-color: var(--pro); }
.reason.con { border-color: var(--con); }
.reason .avatar.mini { width: 2rem; height: 2rem; }
.quotes { display: grid; gap: 0.5rem; }
.quotes:empty { display: none; }
.best-line { display: grid; gap: 0.15rem; padding: 0.7rem 0.9rem; border: 2px solid var(--ink); border-radius: var(--r); text-align: left; }
.best-line.pro { background: var(--pro-soft); }
.best-line.con { background: var(--con-soft); }
.best-line q { font-weight: 800; font-stretch: 90%; }
.best-line small { color: var(--ink-soft); font-weight: 700; }
.clip-maker { display: grid; gap: 0.6rem; justify-items: center; }
.clip-progress { position: relative; width: 100%; height: 2.4rem; border: var(--line); border-radius: 999px; overflow: hidden; display: grid; place-items: center; font-weight: 800; background: var(--card); }
.clip-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--sun); transition: width 0.2s linear; }
.clip-progress span { position: relative; }
.clip-video { width: min(14rem, 60vw); aspect-ratio: 9 / 16; border: var(--line); border-radius: var(--r); background: var(--ink); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }

.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; width: 100vw; height: 100vh; }

/* ---------- OBS: overlay hides controls; transparent drops the paper ---------- */

body.overlay-mode .dock, body.overlay-mode .chrome, body.overlay-mode .lobby .cta, body.overlay-mode .mic-check,
body.overlay-mode .notes-panel, body.overlay-mode .lobby-tools, body.overlay-mode .start-note,
body.overlay-mode .rules, body.overlay-mode .dialog-foot, body.overlay-mode .lobby .hint, body.overlay-mode .result-actions,
body.overlay-mode .toast, body.overlay-mode .room-head .icon-btn, body.overlay-mode .room-settings, body.overlay-mode .room-invite { display: none !important; }
body.overlay-mode .stage { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
html.transparent, body.transparent, body.transparent .stage, body.transparent .room { background: transparent; }
body.transparent .arena { background: none; }
body.transparent .jury { background: transparent; border-top: none; }
body.transparent .overlay { background: transparent; }

/* ---------- Site footer ---------- */

/* The same links close the home screen, the landing page, and the static
   pages (about, privacy, terms). */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem 1.2rem;
  margin-top: 2.5rem; padding-top: 1.1rem; border-top: 2px dashed #d9cdb5;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
.footer-links a { font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Landing ---------- */

/* Signed-out visitors when sign-in is on. Mobile first: one column with the
   demo under the headline; wide screens put the demo beside it. */
.landing { max-width: 1120px; margin: 0 auto; padding: 0.6rem 1rem 2rem; }
.landing .topnav .btn { white-space: nowrap; }
.lp-hero { display: grid; gap: 2rem; align-items: center; }
.lp-hero-copy { display: grid; gap: 1.1rem; justify-items: start; }
.lp-sub { max-width: 34rem; font-size: var(--t-lg); color: var(--ink-soft); }
.lp-go { display: grid; gap: 0.6rem; justify-items: start; }
.lp-go .cta { font-size: 1.4rem; padding: 0.95rem 2.1rem; }
.lp-go small { font-weight: 700; color: var(--ink-soft); }

/* Demo: a small stage that replays one scripted match. */
.demo {
  position: relative; margin: 0; display: grid; overflow: hidden;
  background: var(--card); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--lift-lg);
}
.demo-head { display: grid; gap: 0.1rem; padding: 0.9rem 1rem 0.2rem; }
.demo-head b { font-size: var(--t-xl); font-weight: 800; font-stretch: 80%; line-height: 1.05; }
.demo-head b::before { content: "“"; }
.demo-head b::after { content: "”"; }
.demo-score { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.4rem 1rem 0.6rem; }
.demo .score { min-width: 2.8rem; height: 2.8rem; font-size: 1.8rem; }
/* The stage's phone layout names grid areas for these; the demo has none. */
.demo-score .score.pro, .demo-score .score.con, .demo-score .meter { grid-area: auto; }
.demo .pip { height: 1.3rem; border-radius: 5px; }
.demo .pips { gap: 0.2rem; }
.demo-arena {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 0.6rem;
  min-height: 10rem; padding: 0.8rem 0.8rem 0; border-top: var(--line);
  background: repeating-conic-gradient(from -90deg at 50% 115%, #fff0d6 0deg 7deg, transparent 7deg 14deg);
}
.demo-podium { display: grid; justify-items: center; position: relative; }
.demo-podium::before {
  content: ""; position: absolute; bottom: 1.4rem; width: 4.6rem; height: 4.6rem; border-radius: 50%; border: var(--line);
  transform: scale(0.85); transition: background 0.3s, transform 0.3s var(--ease-pop);
}
.demo-podium.pro::before { background: var(--pro-soft); }
.demo-podium.con::before { background: var(--con-soft); }
.demo-podium:has(.speaking)::before { background: var(--sun); transform: scale(1); }
.demo-podium .avatar { width: 4.6rem; height: 4.6rem; }
.demo .avatar.speaking .mouth-open { animation: chatter 0.18s infinite alternate; }
.demo-plate {
  position: relative; z-index: 1; margin-top: -0.3rem; padding: 0.1rem 0.8rem 0.2rem; border: var(--line); border-bottom: none;
  border-radius: var(--r-sm) var(--r-sm) 0 0; font-weight: 800; font-stretch: 85%; color: #fff;
}
.demo-podium.pro .demo-plate { background: var(--pro); }
.demo-podium.con .demo-plate { background: var(--con); color: var(--ink); }
.demo-bubble {
  align-self: start; min-height: 5.4rem; padding: 0.55rem 0.75rem; border: var(--line); border-radius: var(--r);
  background: var(--card); box-shadow: 0 3px 0 var(--ink); font-weight: 700; font-size: var(--t-sm); line-height: 1.3;
  opacity: 0; transition: opacity 0.25s;
}
.demo-bubble.on { opacity: 1; }
.demo-bubble.pro { border-left: 8px solid var(--pro); }
.demo-bubble.con { border-right: 8px solid var(--con); }
.demo .banner strong { font-size: clamp(1.6rem, 6vw, 2.4rem); }
/* Jury: two rows, six and five, as on a phone stage. */
.demo-jury {
  display: flex; flex-wrap: wrap; justify-content: center; row-gap: 1.3rem;
  position: relative; z-index: 2; padding: 1.4rem 0.4rem 0.6rem; background: var(--paper-deep); border-top: var(--line);
}
.demo-jury .juror { flex: 0 0 calc(100% / 6); }
.demo-jury .juror .avatar { width: 2.9rem; height: 2.9rem; }
.demo-jury .sign { top: -1rem; font-size: 0.62rem; letter-spacing: 0; padding: 0.05rem 0.2rem; }
.demo-jury .juror .react { max-width: 10rem; font-size: var(--t-sm); bottom: calc(100% + 0.9rem); }
.demo-jury .juror:nth-child(6n + 1) .react { left: 0; }
.demo-jury .juror:nth-child(6n) .react, .demo-jury .juror:last-child .react { left: auto; right: 0; }

/* Sections */
.lp-section { display: grid; gap: 1.2rem; margin-top: 3.5rem; }
.lp-title { font-size: clamp(1.9rem, 6vw, 2.8rem); font-stretch: 80%; display: flex; align-items: center; gap: 0.4rem; }
.lp-lede { max-width: 40rem; font-size: var(--t-lg); color: var(--ink-soft); }
.lp-lede b { color: var(--ink); }
.lp-steps, .lp-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.lp-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.9rem; align-content: start; }
.lp-steps li > b { grid-row: span 2; }
.lp-note { color: var(--ink-soft); }
.lp-steps li > b {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: var(--line); border-radius: 50%;
  background: var(--paper-deep); font-size: var(--t-lg);
}
.landing .card h3 { margin: 0; font-size: var(--t-lg); letter-spacing: 0; text-transform: none; color: var(--ink); font-stretch: 85%; }
.landing .card p { color: var(--ink-soft); }
.lp-card { display: grid; gap: 0.4rem; align-content: start; }
.lp-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: var(--line); border-radius: 50%; background: var(--paper-deep); font-size: 1.2rem; }

.lp-modes { display: grid; gap: 0.8rem; }
.lp-mode {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); overflow: hidden;
  background: var(--card); border: var(--line); border-radius: var(--r-lg); box-shadow: var(--lift);
}
.lp-mode .mode-art { height: 100%; min-height: 6rem; padding-top: 0.5rem; background: var(--paper-deep); border-bottom: none; border-right: var(--line); }
.lp-mode .mode-art .avatar { flex-basis: 3rem; width: 3rem; }
.lp-mode .mode-art .avatar + .avatar { margin-left: -0.6rem; }
.lp-mode .mode-art .badge { display: none; }
.lp-mode-copy { display: grid; gap: 0.2rem; align-content: start; padding: 0.8rem 1rem 0.9rem; }
.lp-mode h3 { font-size: var(--t-lg); font-stretch: 85%; }
.lp-mode p { font-size: var(--t-sm); color: var(--ink-soft); }

.lp-daily { margin-top: 3.5rem; }
.lp-squares { display: flex; gap: 0.3rem; }
.lp-squares i { width: 1.5rem; height: 1.5rem; border: 2px solid var(--ink); border-radius: 5px; background: var(--ok); }
.lp-squares i.off { background: var(--ink); }

.lp-prices { display: grid; gap: 1rem; }
.lp-price { display: grid; gap: 0.6rem; align-content: start; justify-items: start; }
.lp-big { font-size: var(--t-2xl); font-weight: 800; font-stretch: 80%; line-height: 1; }
.landing .lp-per { font-weight: 700; }
.landing .card .lp-big { color: var(--ink); }
.lp-price ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.lp-price ul:not(.lp-packs) li { position: relative; padding-left: 1.4rem; }
.lp-price ul:not(.lp-packs) li::before {
  content: ""; position: absolute; left: 0; top: 0.4em; width: 0.7rem; height: 0.7rem;
  border: 2px solid var(--ink); border-radius: 3px; background: var(--sun);
}
.lp-packs { justify-self: stretch; }
.lp-packs li {
  display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.8rem;
  border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--paper);
}
.lp-packs span { font-weight: 800; }
.lp-refer {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
  border: var(--line); border-radius: var(--r-lg); background: var(--sun-soft); box-shadow: var(--lift);
}
.lp-refer-n { flex: none; font-size: var(--t-2xl); font-weight: 800; font-stretch: 75%; line-height: 1; }

.lp-milestones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.lp-milestones li {
  display: grid; justify-items: center; gap: 0.1rem; padding: 0.8rem 0.5rem;
  border: var(--line); border-radius: var(--r); background: var(--card); box-shadow: 0 3px 0 var(--ink);
}
.lp-milestones li:nth-child(odd) { transform: rotate(-1deg); }
.lp-milestones li:nth-child(even) { transform: rotate(1deg); }
.lp-milestones span { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.lp-milestones b { font-size: var(--t-xl); font-stretch: 80%; }

.lp-faq { display: grid; gap: 0.7rem; }
.lp-faq details { border: var(--line); border-radius: var(--r); background: var(--card); }
.lp-faq summary {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; cursor: pointer; list-style: none;
  font-size: var(--t-lg); font-weight: 800; font-stretch: 90%;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::before {
  content: "+"; flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem;
  border: 2px solid var(--ink); border-radius: 50%; font-size: 1rem; line-height: 1;
}
.lp-faq details[open] summary::before { content: "−"; }
.lp-faq p { padding: 0 1rem 1rem 3.1rem; color: var(--ink-soft); }

.lp-last { display: grid; justify-items: center; gap: 1rem; margin-top: 3.5rem; text-align: center; }
.lp-last h2 { font-size: var(--t-xl); font-stretch: 85%; }

@media (min-width: 760px) {
  .lp-steps, .lp-cards, .lp-prices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-milestones { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .landing { padding: 1rem 1.5rem 3rem; }
  .lp-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; padding-top: 1rem; }
  .lp-hero .hero-title { font-size: clamp(3.2rem, 5.6vw, 4.8rem); }
  .lp-section, .lp-daily, .lp-last { margin-top: 5rem; }
  .demo-jury .juror .avatar { width: 3.6rem; height: 3.6rem; }
  .demo-bubble { font-size: var(--t-md); }
  .lp-modes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lp-faq { display: block; columns: 2; column-gap: 1rem; }
  .lp-faq details { break-inside: avoid; margin-bottom: 0.7rem; }
  .lp-mode { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .lp-mode .mode-art { height: 6.5rem; border-right: none; border-bottom: var(--line); }
  .lp-mode .mode-art .avatar { flex-basis: 4.4rem; width: 4.4rem; }
  .lp-mode .mode-art .avatar + .avatar { margin-left: 0; }
  .lp-mode .mode-art .badge { display: grid; }
}

/* ---------- Signed in: top bar, store, player hub ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Token chip: coin and balance; it opens the store. */
.token-chip { background: var(--sun); font-variant-numeric: tabular-nums; }
.token-chip .coin { width: 1.25em; height: 1.25em; }
.token-chip.empty { background: var(--card); }
.token-chip.pulse { animation: chip-pulse 0.7s var(--ease-pop); }
@keyframes chip-pulse { 40% { transform: scale(1.25) rotate(-4deg); } }
/* Streak chip: the flame is lit while today counts. */
.streak-chip .ico { color: var(--con); }
.streak-chip.dim { background: var(--paper-deep); color: var(--ink-soft); }
.streak-chip.dim .ico { color: var(--ink-soft); }
.avatar-btn {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; padding: 0; overflow: hidden;
  border: var(--line); border-radius: 50%; background: var(--sun-soft); box-shadow: 0 3px 0 var(--ink);
}
.avatar-btn .avatar { width: 2.4rem; height: 2.4rem; margin-top: 0.35rem; }
.avatar-btn:hover { transform: translateY(-1px); }
.avatar-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* The daily reward sticker lands under the token chip, over whatever
   screen is open: ink with sun type, so it stands out on the yellow Daily
   card, and high enough never to hide a call to action. */
.reward-banners { position: fixed; z-index: 85; place-items: start end; padding: calc(5.2rem + env(safe-area-inset-top)) max(1rem, calc((100vw - 1040px) / 2 + 1.25rem)) 0; }
.reward-banners .banner { animation-duration: 3.2s; }
.banner-reward { background: var(--ink); color: var(--sun); }
.banner-reward strong { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.banner-reward span { color: var(--card); }
@media (max-width: 640px) { .reward-banners { place-items: start center; padding-top: calc(4.4rem + env(safe-area-inset-top)); } }

/* Test mode: a small ribbon on every screen. */
.test-ribbon {
  position: fixed; left: 0.6rem; bottom: calc(0.6rem + env(safe-area-inset-bottom)); z-index: 90; pointer-events: none;
  padding: 0.15rem 0.6rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--con); color: #fff;
  font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; transform: rotate(-3deg);
}
body.overlay-mode .test-ribbon { display: none; }
.test-ribbon.preview { max-width: calc(100vw - 1.2rem); letter-spacing: 0.02em; text-transform: none; transform: none; background: var(--ink); }

/* Sign-in */
.dialog { position: relative; }
.dialog-close { position: absolute; top: 0.8rem; right: 0.8rem; width: 2.3rem; height: 2.3rem; box-shadow: none; }
.signin-art { display: flex; align-items: flex-end; justify-content: center; gap: 0.2rem; margin-top: 0.3rem; }
.signin-art .avatar { width: 4.2rem; height: 4.2rem; }
.signin-art .avatar + .avatar { margin-left: -0.9rem; }
.signin-art .brand-logo { width: 3rem; align-self: center; margin-right: 0.4rem; }
.dev-hint { justify-self: center; padding: 0.2rem 0.8rem; border: 2px dashed var(--ink); border-radius: 999px; background: var(--sun-soft); font-weight: 800; font-size: var(--t-sm); }
.consent { font-size: var(--t-sm); color: var(--ink-soft); }
.consent a, .store-promo a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
#signin-code-form .btn-row { justify-content: space-between; }
.signin.code-step .signin-oauth, .signin.code-step #signin-or { display: none; }

/* Store */
.store { width: min(36rem, 100%); text-align: left; }
.store header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.store header h2 { font-size: var(--t-xl); }
.store-reason { font-weight: 800; color: #c92a17; }
.store-reason:empty { display: none; }
.store-balance, .wallet-balance { display: flex; align-items: center; gap: 0.8rem; }
.wallet-coin { font-size: 2.6rem; }
.wallet-balance > div { display: grid; }
.store-balance b, .wallet-total { font-size: var(--t-2xl); font-weight: 800; font-stretch: 75%; line-height: 1; }
.store-balance small { display: block; color: var(--ink-soft); font-weight: 700; font-size: var(--t-sm); }
.store-explain { color: var(--ink-soft); }
.store-explain b { color: var(--ink); }
.store-buy { display: grid; gap: 0.9rem; }
.store-buy section { display: grid; gap: 0.5rem; }
.store-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.store-plans .plan span { font-size: var(--t-sm); }
.store-plans .plan { padding: 0.75rem 0.9rem; }
.consent-check { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 0.9rem; border: var(--line); border-radius: var(--r); background: var(--sun-soft); font-weight: 700; cursor: pointer; }
.consent-check input { flex: none; width: 1.4rem; height: 1.4rem; margin: 0.1rem 0 0; padding: 0; accent-color: var(--ink); cursor: pointer; }
.consent-check input:focus { box-shadow: none; }
.consent-check input:focus-visible { outline: 3px solid var(--pro); outline-offset: 2px; }
.store-promo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; padding-top: 0.8rem; border-top: 2px dashed #d9cdb5; font-weight: 600; }
.store-promo b { font-size: var(--t-xl); font-stretch: 75%; }
.store-promo span { flex: 1 1 14rem; }
/* Subscription tiers: two tiles, the bigger one flagged best value. */
.store-plans.store-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0.5rem; }
.store-tiers .plan { position: relative; align-content: start; }
.store-tiers .plan b { font-size: var(--t-md); }
.plan.best { background: var(--sun-soft); }
.plan-badge { position: absolute; top: -0.75rem; right: 0.6rem; padding: 0.05rem 0.5rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); font-style: normal; font-weight: 800; font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase; }
#store-sub-offer { display: grid; gap: 0.5rem; }
.store-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.8rem 0.9rem; border: var(--line); border-radius: var(--r); background: var(--card); font-weight: 700; }
.store-sub p { margin: 0; flex: 1 1 14rem; }
/* Top-up: a stepper and a slider over the same count, and its total. */
.topup { display: flex; align-items: center; gap: 0.6rem; }
.btn.topup-step { flex: none; min-width: 2.6rem; font-size: var(--t-lg); line-height: 1; }
.topup-n { display: flex; align-items: baseline; gap: 0.4rem; font-weight: 800; }
.topup-n input { width: 5.5rem; text-align: center; font-size: var(--t-lg); font-weight: 800; }
.topup-range { width: 100%; accent-color: var(--ink); }
.topup-total { margin: 0; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.topup-total b { font-size: var(--t-xl); font-weight: 800; font-stretch: 80%; }
.topup-total span { color: var(--ink-soft); font-weight: 700; }
#topup-buy { justify-self: stretch; }
.wallet-buckets small { display: block; color: var(--ink-soft); font-weight: 700; font-size: var(--t-xs); }
.wallet-buckets small:empty { display: none; }
.store-buckets dd { font-size: var(--t-lg); }

/* Player hub: a drawer over a dimmed page. */
.hub-overlay { display: block; padding: 0; }
.hub-overlay .drawer { width: min(30rem, 100vw); box-shadow: -6px 0 0 rgba(27, 21, 48, 0.25); animation: hub-in 0.25s ease-out; }
@keyframes hub-in { from { transform: translateX(40px); opacity: 0; } }
.hub-head { gap: 0.8rem; }
.hub-who { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.hub-who .avatar { width: 3.2rem; height: 3.2rem; border: var(--line); border-radius: 50%; background: var(--sun-soft); overflow: hidden; }
.hub-who h2 { font-size: var(--t-xl); font-stretch: 80%; overflow-wrap: anywhere; }
.hub-who small { font-family: var(--mono); font-weight: 700; color: var(--ink-soft); }
.hub-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.25rem; padding: 0.5rem 0.6rem; border-bottom: var(--line); background: var(--paper); }
.hub-tabs button {
  display: grid; justify-items: center; gap: 0.1rem; min-width: 0; padding: 0.4rem 0.1rem; border: 2px solid transparent; border-radius: var(--r-sm);
  background: none; font-size: var(--t-xs); font-weight: 800; color: var(--ink-soft);
}
.hub-tabs button span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-stretch: 78%; font-size: 0.8rem; }
.hub-tabs .ico { width: 1.3rem; height: 1.3rem; }
.hub-tabs button:hover { color: var(--ink); }
.hub-tabs button.on { border-color: var(--ink); background: var(--sun); color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.hub-panel { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr); }
.hub-panel > *, .hub-section > * { min-width: 0; }
.hub-panel:focus-visible { outline-offset: -3px; }
.hub-section { display: grid; gap: 0.55rem; }
.hub-section > .check, .hub-section > .btn, .hub-section > .lang-picker { justify-self: start; }
.hub-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0; }
.hub-stat { display: grid; align-content: start; gap: 0.1rem; padding: 0.6rem 0.7rem; border: var(--line); border-radius: var(--r); background: var(--card); box-shadow: 0 3px 0 var(--ink); min-width: 0; }
.hub-stat dt { font-stretch: 85%; order: 3; font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.hub-stat dd { margin: 0; font-size: 1.7rem; font-weight: 800; font-stretch: 75%; line-height: 1.05; display: flex; align-items: center; gap: 0.2rem; }
.hub-stat dd.hub-sub { font-size: var(--t-xs); font-stretch: 100%; font-weight: 700; color: var(--ink-soft); }
.hub-stat.rating { background: var(--sun); }
.hub-stat.streak .ico { color: var(--con); width: 0.85em; height: 0.85em; }
.hub-stat.streak.dim .ico { color: var(--ink-soft); }
.hub-link { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.hub-url { max-width: 100%; overflow-wrap: anywhere; font-size: var(--t-sm); letter-spacing: 0.02em; color: var(--ink); text-decoration: none; }
a.hub-url:hover { text-decoration: underline; }
.hub-row { justify-content: flex-start; }
.history li .delta:not(:empty) { white-space: nowrap; }

/* Leaderboards */
.boards { display: grid; gap: 0.8rem; }
.lb-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.lb-tabs button { padding: 0.3rem 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.lb-list.loading { opacity: 0.5; }
.drawer .lb-list li, .lb-list li {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.7rem; border: 2px solid var(--ink); border-left-width: 2px; border-radius: var(--r-sm); background: var(--card);
}
.lb-list li.me { background: var(--sun-soft); box-shadow: inset 5px 0 0 var(--sun); }
.lb-rank { font-weight: 800; font-stretch: 80%; font-size: var(--t-lg); text-align: center; }
.lb-name { display: grid; min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.lb-name a { color: inherit; text-decoration-color: var(--pro); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lb-you { display: inline; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.lb-record { font-weight: 600; color: var(--ink-soft); font-size: var(--t-xs); }
.lb-value { font-size: var(--t-lg); font-stretch: 85%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.drawer .lb-list li.lb-empty, .lb-list li.lb-empty { display: block; border-style: dashed; color: var(--ink-soft); font-weight: 700; }
.lb-pin { margin-top: 0.3rem; padding: 0.5rem 0.8rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--sun); font-weight: 800; }

/* Friends */
.fr-add { display: grid; gap: 0.4rem; }
.fr-add-row { display: flex; gap: 0.5rem; }
.fr-lists { display: grid; gap: 1.1rem; margin-top: 1.1rem; }
.fr-section { display: grid; gap: 0.5rem; }
.fr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.drawer .fr-list li, .fr-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.3rem 0.6rem;
  padding: 0.6rem 0.75rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--card);
}
.drawer .fr-list li.incoming { background: var(--sun-soft); }
.fr-who { display: grid; min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.fr-who a { color: inherit; text-decoration-color: var(--pro); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.fr-handle { font-family: var(--mono); font-weight: 700; font-size: var(--t-xs); color: var(--ink-soft); }
.fr-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.fr-stats { display: grid; justify-items: end; text-align: right; }
.fr-rating { font-size: var(--t-lg); font-stretch: 80%; }
.fr-stats small, .fr-meta small { color: var(--ink-soft); font-weight: 700; font-size: var(--t-xs); }
.fr-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.7rem; }
.fr-meta .fr-streak.live { color: var(--con-text); }
.fr-more { position: relative; justify-self: end; }
.fr-more summary { list-style: none; cursor: pointer; }
.fr-more summary::-webkit-details-marker { display: none; }
.fr-menu { position: absolute; right: 0; z-index: 5; display: grid; min-width: 11rem; padding: 0.3rem; background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--lift); }
.fr-menu button { padding: 0.5rem 0.7rem; border: none; border-radius: var(--r-sm); background: none; font-weight: 700; text-align: left; }
.fr-menu button:hover { background: var(--paper); }
.btn.danger { color: #c92a17; }

/* Wallet */
.wallet-buckets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0; }
.wallet-buckets div { padding: 0.5rem 0.8rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--card); }
.wallet-buckets dt { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.wallet-buckets dd { margin: 0; font-size: var(--t-xl); font-weight: 800; font-stretch: 80%; }
#wallet-get { justify-self: start; }
.wallet-ref { padding: 1rem; border: var(--line); border-radius: var(--r); background: var(--sun-soft); }
.wallet-ref .hub-url { justify-self: start; }
.wallet-ref-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin: 0; text-align: center; }
.wallet-ref-stats dd { margin: 0; font-size: var(--t-xl); font-weight: 800; font-stretch: 80%; }
.wallet-ref-stats dt { font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.ledger { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.drawer .ledger li { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.45rem 0.7rem; border-left-color: var(--ink-soft); }
.drawer .ledger li.plus { border-left-color: var(--ok); }
.drawer .ledger li.minus { border-left-color: var(--con); }
.ledger-what { display: grid; min-width: 0; }
.ledger-what small { color: var(--ink-soft); font-weight: 600; font-size: var(--t-xs); }
.ledger-delta { font-size: var(--t-lg); font-variant-numeric: tabular-nums; }
.empty { color: var(--ink-soft); font-weight: 700; }

/* Settings */
.settings { display: grid; gap: 0.9rem; }
.settings .cta { justify-self: start; }
.settings textarea {
  width: 100%; padding: 0.6rem 0.9rem; border: var(--line); border-radius: var(--r-sm); background: var(--card);
  font: inherit; font-weight: 600; resize: vertical; outline: none;
}
.settings textarea:focus { box-shadow: 0 0 0 4px var(--sun); }
.handle-input { display: flex; align-items: center; border: var(--line); border-radius: var(--r-sm); background: var(--card); }
.handle-input > span { padding-left: 0.8rem; font-family: var(--mono); font-weight: 800; color: var(--ink-soft); }
.handle-input input { border: none; padding-left: 0.2rem; font-family: var(--mono); }
.handle-input:focus-within { box-shadow: 0 0 0 4px var(--sun); }
.handle-input input:focus { box-shadow: none; }
.danger-zone { padding-top: 1rem; border-top: 2px dashed #d9cdb5; }
.delete-pass { padding: 0.6rem 0.8rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--con-soft); font-weight: 700; }
.delete-form { display: grid; gap: 0.5rem; justify-items: start; }
.delete-form .field { width: 100%; }
.btn.danger:not(:disabled) { border-color: #c92a17; }
.hub-legal { padding-top: 0.6rem; }

/* /leaderboard for visitors */
.board-screen { max-width: 760px; margin: 0 auto; padding: 0.6rem 1rem 2rem; }
.board-page { display: grid; gap: 1.2rem; }
.board-title { font-size: clamp(2.4rem, 8vw, 3.6rem); font-stretch: 78%; }
.board-page .cta { justify-self: start; }

/* Result: the streak and a friend request after a match */
.rating-change.unrated { background: var(--paper-deep); }
.result-streak { justify-self: center; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.9rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--con-soft); font-weight: 800; }
.result-streak .ico { color: var(--con); }
#result-friend { justify-self: center; }
.result-social { justify-self: center; }

/* Report dialog: a reason, an optional note */
.report { width: min(30rem, 100%); text-align: left; }
.report header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.report header h2 { font-size: var(--t-xl); }
.report-reasons { display: grid; gap: 0.4rem; min-width: 0; margin: 0; padding: 0; border: none; }
.report-reasons legend { margin-bottom: 0.4rem; padding: 0; }
.report-reasons label { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--card); font-weight: 700; cursor: pointer; }
.report-reasons label:has(input:checked) { background: var(--sun-soft); }
.report-reasons input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0; padding: 0; accent-color: var(--ink); }
.report-reasons input:focus { box-shadow: none; }
.report-reasons input:focus-visible { outline: 3px solid var(--pro); outline-offset: 2px; }
.report textarea { width: 100%; padding: 0.6rem 0.9rem; border: var(--line); border-radius: var(--r-sm); background: var(--card); font: inherit; font-weight: 600; resize: vertical; outline: none; }
.report textarea:focus { box-shadow: 0 0 0 4px var(--sun); }

/* ---------- Activity board and badges ---------- */

/* Shared by the public player page (u.html) and the player hub. */
/* Activity: 53 weeks by 7 days, newest on the right. */
.act-scroll { overflow-x: auto; padding: 0.2rem 0.1rem 0.5rem; border-radius: var(--r-sm); scrollbar-width: thin; }
.act-scroll:focus-visible { outline-offset: 2px; }
.act { --cell: 14px; --gap: 3px; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.5rem; width: max-content; }
.act-months { grid-column: 2; position: relative; height: 1.1rem; font-size: var(--t-xs); font-weight: 800; color: var(--ink-soft); }
.act-months span { position: absolute; top: 0; white-space: nowrap; }
.act-days { position: sticky; left: 0; z-index: 1; padding-right: 0.3rem; background: var(--card); display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--gap); font-size: 0.7rem; font-weight: 800; color: var(--ink-soft); line-height: var(--cell); }
.act-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--cell)); grid-auto-columns: var(--cell); gap: var(--gap); }
.act-grid i { display: block; border: 1.5px solid rgba(27, 21, 48, 0.28); border-radius: 3px; background: var(--paper-deep); }
.act-grid i[data-l="1"] { background: var(--sun-soft); border-color: var(--ink); }
.act-grid i[data-l="2"] { background: var(--sun); border-color: var(--ink); }
.act-grid i[data-l="3"] { background: var(--ink); border-color: var(--ink); }
.act-grid i.future { visibility: hidden; }
.act-grid i:hover, .act-grid i.on { outline: 2px solid var(--pro); outline-offset: 1px; }
.act-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; margin-top: 0.6rem; }
.act-tip { font-size: var(--t-sm); font-weight: 700; min-height: 1.4em; }
.act-legend { display: flex; align-items: center; gap: 4px; font-size: var(--t-xs); font-weight: 800; color: var(--ink-soft); }
.act-legend i { width: 13px; height: 13px; }
.act-legend .act-grid { display: flex; gap: 3px; }

/* Badges: stickers. */
.badges { display: flex; flex-wrap: wrap; gap: 0.7rem; padding: 0; margin: 0; list-style: none; }
.badges li { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.9rem 0.45rem 0.55rem; border: var(--line); border-radius: 999px; background: var(--sun-soft); font-weight: 800; box-shadow: 0 3px 0 var(--ink); transform: rotate(var(--tilt, -1.5deg)); }
.badges li:nth-child(even) { --tilt: 1.5deg; }
.badges .badge-ico { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--sun); }
.badges .badge-ico .ico { width: 1.05rem; height: 1.05rem; }

/* ---------- Small screens ---------- */

/* Eleven seats in one row leave too little room for full names. */
@media (max-width: 1180px) {
  .juror .who .full { display: none; }
  .juror .who .short { display: inline; }
}

@media (max-width: 900px) {
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .scoreboard { grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr); grid-template-areas: "tp sp sc tc" "m m m m"; gap: 0.4rem 0.7rem; }
  .team.pro { grid-area: tp; }
  .score.pro { grid-area: sp; }
  .score.con { grid-area: sc; }
  .team.con { grid-area: tc; }
  .meter { grid-area: m; }
  .jury { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 1.6rem; }
  /* Reactions at the ends of each six-seat row open inward. */
  .juror:nth-child(6n + 1) .react { left: 0; }
  .juror:nth-child(6n) .react { left: auto; right: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .home { padding: 0.6rem 1rem 2rem; }
  .topnav { padding-bottom: 1rem; gap: 0.5rem; }
  .topnav-actions { gap: 0.4rem; }
  .wordmark { font-size: 1.3rem; }
  .lang-picker { padding: 0.35rem 0.4rem; }
  .chip-toggle .chip-label { display: none; }
  .topnav.signed .wordmark { display: none; }
  .topnav.signed .topnav-actions { gap: 0.3rem; }
  .topnav.signed .lang-picker { max-width: 3.4rem; padding: 0.3rem 0.2rem; }
  .topnav.signed .chip-toggle { padding: 0.35rem 0.55rem; gap: 0.25rem; }
  .topnav.signed .avatar-btn { width: 2.3rem; height: 2.3rem; }
  .topnav.signed .avatar-btn .avatar { width: 2.1rem; height: 2.1rem; }
  .topnav.signed .brand-logo { width: 2.2rem; }
  .pick { gap: 1.5rem; }
  .modes { grid-template-columns: 1fr; gap: 0.8rem; }
  .mode { grid-template-columns: 7.5rem 1fr auto; grid-template-rows: none; align-items: center; }
  .mode-art { height: 100%; min-height: 5.6rem; padding-top: 0.5rem; border-bottom: none; border-right: var(--line); }
  .mode-art .avatar { flex-basis: 3.4rem; width: 3.4rem; }
  .mode-art .avatar + .avatar { margin-left: -0.7rem; }
  .mode-art .badge { display: none; }
  .mode-go { display: inline-flex; padding-right: 1rem; font-size: 1.3rem; }
  .steps { grid-template-columns: 1fr; gap: 0.6rem; }
  .card { padding: 1.1rem; }
  .sides { grid-template-columns: 1fr 1fr; }
  .side-btn.any { grid-column: span 2; padding: 0.55rem; font-size: var(--t-md); }
  .option > .label { min-width: 0; flex-basis: 100%; }
  /* Wrapped choices read as a rounded box; one row still reads as a pill. */
  .seg, .packs { border-radius: 1.3rem; }
  .pack { padding: 0.2rem 0.5rem; }
  .showdown .avatar { width: 5.5rem; height: 5.5rem; }
  .showdown .champ, .showdown .challenger { min-width: 0; }

  .stage { height: auto; min-height: 100dvh; overflow: visible; overflow-x: clip; grid-template-rows: auto auto auto auto auto 1fr; }
  .stage-head { padding: 0.6rem 0.7rem 0.4rem; gap: 0.5rem; }
  .icon-btn { width: 2.3rem; height: 2.3rem; }
  /* A long motion keeps to three lines here; the lobby shows it in full. */
  .stage-title h1 { font-size: 1.1rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  .stage-tags { gap: 0.3rem; }
  .round-tag, .you-side { padding: 0.05rem 0.5rem; letter-spacing: 0.06em; }
  .scoreboard { margin: 0.1rem 0.7rem 0.45rem; padding: 0.45rem 0.7rem; }
  .score { min-width: 2.8rem; height: 2.8rem; font-size: 1.8rem; }
  .team-name { font-size: var(--t-md); }
  .pip { height: 1.3rem; border-radius: 5px; }
  .pips { gap: 0.2rem; }
  .ticker { margin: 0 0.7rem; }
  .ticker-tag { padding: 0 0.55rem; font-size: 0; gap: 0; }
  .ticker-tag .ico { font-size: 1rem; }
  .ticker-text, .ticker.quote .ticker-text { font-size: var(--t-sm); }
  /* One shared bubble slot above the podiums: only the speaker's shows. */
  .arena { grid-template-columns: 1fr auto 1fr; padding: 8.4rem 0.6rem 0; gap: 0.4rem; min-height: 16.5rem; container-type: normal; }
  .podium { position: static; }
  .bubble { position: absolute; top: 0.6rem; left: 0.7rem; right: 0.7rem; width: auto; max-height: 7.2rem; margin: 0; font-size: 1rem; line-height: 1.4; z-index: 4; }
  .bubble.stale { opacity: 0; pointer-events: none; }
  .figure { --fig: 5.6rem; }
  .mode-heading { font-size: var(--t-lg); margin-bottom: -0.6rem; }
  .plate { min-width: 0; width: 100%; padding: 0.3rem 0.4rem 0.4rem; }
  .pname { font-size: var(--t-md); max-width: 100%; }
  /* The header already says which side you argue; the name gets the room. */
  .pname span + span { display: none; }
  .center { padding-bottom: 1rem; }
  .timer { width: 5.2rem; height: 5.2rem; }
  .timer-text { font-size: 1.7rem; }
  .status { font-size: var(--t-xs); max-width: 8rem; }
  .crown { width: 2.4rem; top: -1rem; }
  .jury { padding: 1.3rem 0.4rem 0.4rem; gap: 0.15rem; row-gap: 1.25rem; }
  .juror .avatar { width: 2.8rem; height: 2.8rem; }
  .sign { top: -1rem; font-size: 0.62rem; letter-spacing: 0; padding: 0.05rem 0.15rem; transform: none; }
  .juror.pro .sign { transform: none; }
  .juror .who { font-size: var(--t-xs); }
  .juror .react { font-size: var(--t-sm); }
  .setup .cta { position: sticky; bottom: calc(0.75rem + env(safe-area-inset-bottom)); z-index: 5; }
  .mode-copy { padding-right: 0; }
  .mode-go { position: static; }
  .juror .react { max-width: 9rem; }
  .dock { position: sticky; bottom: 0; }
  .dock-row { gap: 0.5rem; }
  /* A long hint shares its row with Skip instead of pushing it down. */
  #dock-theirs .hint-text { flex: 1 1 0; min-width: 0; }
  .vote-label { flex-basis: 100%; text-align: center; }
  .btn.vote { flex: 1; min-width: 0; max-width: 10rem; }
  .dock .cta { padding: 0.6rem 1.1rem; font-size: var(--t-md); }
  .mic-pill { padding: 0.45rem 0.8rem; font-size: var(--t-sm); }
  .mic-pill .level { width: 2.6rem; }
  .handoff b { width: 6rem; height: 6rem; font-size: 3.4rem; }
  .face .avatar { width: 5rem; height: 5rem; }
  .lobby-motion { font-size: var(--t-lg); }
  .you-argue b { font-size: 2rem; }
  /* Phones: notes cover the header and scoreboard, never the clock or the dock. */
  .notes-panel, .notes-panel.con { position: fixed; top: 0.5rem; bottom: auto; left: 0.7rem; right: 0.7rem; width: auto; height: min(34vh, 18rem); }
  .lean-cols, .lean-col.open ul { grid-template-columns: 1fr; }
  .toast { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* Small phones: the wordmark, language, and Sign in share one row. */
@media (max-width: 400px) {
  .brand { gap: 0.4rem; }
  .brand-logo { width: 2.2rem; }
  .wordmark { font-size: 1.15rem; }
  .topnav:not(.signed) .lang-picker { max-width: 5.6rem; }
  .topnav.signed .topnav-actions { gap: 0.15rem; }
  .topnav.signed .chip-toggle { padding: 0.35rem 0.4rem; }
}
@media (max-width: 340px) {
  .wordmark, .topnav.signed .brand { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
