/* Fonts are served from this site (see /fonts/README.txt) */
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-tight-latin-wght-normal.woff2) format('woff2'); 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: 'Inter Tight'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-tight-latin-ext-wght-normal.woff2) format('woff2'); 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; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2'); 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: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); 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; }
/* FactVote by SysRely — a live prediction & opinion feed.
   Ink-navy surfaces with hairline borders; brand green/coral for answers and
   results; violet only for primary actions; amber for "live". */
:root {
  --bg: #0A0C16;
  --bg-2: #0E1120;
  --surface: #121629;
  --surface-2: #181D35;
  --surface-3: #20264A;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.11);
  --fg: #F4F5FA;
  --muted: #A3A9C4;
  --faint: #6B7192;
  --accent: #7C5CFF;
  --accent-hi: #9C85FF;
  --accent-dim: rgba(124, 92, 255, 0.14);
  --real: #00D26A;
  --real-dim: rgba(0, 210, 106, 0.12);
  --cap: #FF5A5F;
  --cap-dim: rgba(255, 90, 95, 0.12);
  --amber: #F5B83D;
  --amber-dim: rgba(245, 184, 61, 0.12);
  --info: #5AA9FF;

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --nav-h: 62px;
  /* The larger of the app's injected value (Capacitor) and the browser's own: on some iPhones (iOS 26) one of them
     comes back as 0, which left a gap under the menu bar and let the header slide under the status bar */
  --safe-b: max(var(--safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --safe-t: max(var(--safe-area-inset-top, 0px), env(safe-area-inset-top, 0px));
  --bar-bg: rgba(10, 12, 22, .82);
  --bar-bg-solid: rgba(10, 12, 22, .95);
  --overlay: rgba(0, 0, 0, .55);
  --hover-line: rgba(255, 255, 255, .22);
  --accent-hover: #8A6CFF;
  --tag-community: #D0C6FF;
  --demo-text: #D7CEFF;
  --warn-text: #F2DDB0;
  --wm-real: #00D26A;
  --wm-cap: #FF5A5F;
  --shadow: rgba(0, 0, 0, .6);
  --apple-line: rgba(255, 255, 255, .7);
  color-scheme: dark;
}

/* Light theme: same brand, darker answer colours so text stays readable on white. */
:root[data-theme="light"] {
  --bg: #F5F6FA;
  --bg-2: #FAFBFD;
  --surface: #FFFFFF;
  --surface-2: #F0F1F6;
  --surface-3: #E3E5EE;
  --line: rgba(10, 12, 22, 0.08);
  --line-2: rgba(10, 12, 22, 0.14);
  --fg: #0F1222;
  --muted: #4B5170;
  --faint: #6D7391;
  --accent: #6A47F5;
  --accent-hi: #5634E0;
  --accent-dim: rgba(106, 71, 245, 0.10);
  --real: #00843D;
  --real-dim: rgba(0, 160, 80, 0.10);
  --cap: #D33A3F;
  --cap-dim: rgba(225, 60, 66, 0.09);
  --amber: #9A6200;
  --amber-dim: rgba(230, 160, 30, 0.14);
  --info: #2A73CC;
  --bar-bg: rgba(255, 255, 255, .88);
  --bar-bg-solid: rgba(255, 255, 255, .96);
  --overlay: rgba(15, 18, 34, .42);
  --hover-line: rgba(10, 12, 22, .28);
  --accent-hover: #5A37E6;
  --tag-community: #5634E0;
  --demo-text: #4A2DC8;
  --warn-text: #6E4600;
  --wm-real: #00A352;
  --wm-cap: #E5484D;
  --shadow: rgba(15, 18, 34, .25);
  --apple-line: #000000;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent-hi); text-decoration: none; }
img { max-width: 100%; display: block; }
svg.i { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app { max-width: 600px; margin: 0 auto; min-height: 100%; position: relative; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: 1.6rem; line-height: 1.15; }
h2 { font-size: 1.08rem; line-height: 1.3; }
h3 { font-size: .95rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: .84rem; }
.num { font-variant-numeric: tabular-nums; }
.label { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand svg { height: 28px; width: auto; flex: none; display: block; }
.sysrely { font-size: .78rem; color: var(--faint); text-align: center; }
.sysrely a { color: var(--muted); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; width: 100%; border-radius: 12px; font-weight: 600; font-size: .95rem; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface-2); border: 1px solid var(--line-2); }
.btn.secondary:hover { border-color: var(--hover-line); }
.btn.ghost { color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--surface-2); }
.btn.danger { background: var(--cap-dim); color: var(--cap); border: 1px solid rgba(255, 90, 95, .35); }
.btn.good { background: var(--real-dim); color: var(--real); border: 1px solid rgba(0, 210, 106, .35); }
.sheet .row .btn { white-space: nowrap; }
.btn.small { min-height: 36px; width: auto; padding: 0 13px; font-size: .85rem; border-radius: 10px; }
.btn.tiny { min-height: 30px; width: auto; padding: 0 10px; font-size: .8rem; border-radius: 8px; }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.link-btn { color: var(--accent-hi); font-weight: 600; padding: 6px; }

/* ---------- Inputs ---------- */
.field { display: grid; gap: 6px; }
.field > label, .field > .label-row { font-size: .8rem; font-weight: 600; color: var(--muted); }
.input { width: 100%; min-height: 46px; padding: 0 14px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: .95rem; }
textarea.input { padding: 12px 14px; min-height: 84px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { outline: none; border-color: var(--accent-hi); box-shadow: 0 0 0 3px var(--accent-dim); }
.input::placeholder { color: var(--faint); }
.stack { display: grid; gap: 12px; }
.stack-sm { display: grid; gap: 6px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hint { font-size: .8rem; color: var(--faint); }

/* ---------- Shell ---------- */
.topbar { position: -webkit-sticky; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 6px; padding: calc(var(--safe-t) + 8px) 10px 8px 16px; background: var(--bar-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar h2 { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; gap: 6px; padding: 10px 16px 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: transparent; border: 1px solid var(--line-2); font-weight: 600; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.chip-btn svg { width: 15px; height: 15px; }
.chip-btn[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border-radius: 11px; border: 1px solid var(--line); }
.seg button { padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: .84rem; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--fg); }

main.screen { padding: 12px 14px calc(var(--nav-h) + var(--safe-b) + 24px); display: grid; gap: 12px; }
main.screen.guest { padding-bottom: calc(var(--safe-b) + 100px); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; transform: translateZ(0); -webkit-transform: translateZ(0); padding: 4px 8px calc(var(--safe-b) + 4px); background: var(--bar-bg-solid); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar-inner { max-width: 584px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.tab { display: grid; justify-items: center; gap: 2px; padding: 7px 0 5px; color: var(--faint); font-size: .68rem; font-weight: 600; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--fg); }
.tab.post-tab .plus { width: 44px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.tab.post-tab .plus svg { width: 20px; height: 20px; stroke-width: 2.2; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--cap); color: #fff; font-size: .64rem; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }

/* ---------- Avatars & community marks ---------- */
.av { --h: 260; position: relative; flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: hsl(var(--h) 38% 30%); color: hsl(var(--h) 80% 86%); font-family: var(--font-display); font-weight: 700; font-size: .85rem; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-sm { width: 26px; height: 26px; font-size: .7rem; }
.av-lg { width: 52px; height: 52px; font-size: 1.1rem; }
.av-xl { width: 80px; height: 80px; font-size: 1.7rem; }
.cmark { --h: 260; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: hsl(var(--h) 40% 22%); color: hsl(var(--h) 85% 82%); border: 1px solid hsl(var(--h) 40% 32%); }
.cmark svg { width: 21px; height: 21px; }
.cmark.lg { width: 64px; height: 64px; border-radius: 18px; }
.cmark.lg svg { width: 32px; height: 32px; }
.cmark.sm { width: 22px; height: 22px; border-radius: 6px; }
.cmark.sm svg { width: 13px; height: 13px; }

/* ---------- Post card ---------- */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 12px; }
.post.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { border-color: rgba(156, 133, 255, .7); } 100% { border-color: var(--line); } }
.post-head { display: flex; align-items: center; gap: 10px; }
.user-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-align: left; }
.who { min-width: 0; display: grid; line-height: 1.3; }
.who b { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--faint); font-size: .76rem; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.who small svg { width: 12px; height: 12px; }
.meta-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.tag svg { width: 13px; height: 13px; }
.tag.community { color: var(--tag-community); background: var(--accent-dim); }
.question { font-family: var(--font-display); font-weight: 650; font-size: 1.16rem; line-height: 1.35; letter-spacing: -0.01em; white-space: pre-wrap; overflow-wrap: anywhere; }
.media { border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); }
.media img { width: 100%; max-height: 520px; object-fit: cover; }

/* status */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; flex: none; }
.status svg { width: 13px; height: 13px; }
.status.open { color: var(--amber); background: var(--amber-dim); }
.status.awaiting { color: var(--info); background: rgba(90, 169, 255, .12); }
.status.correct, .status.resolved { color: var(--real); background: var(--real-dim); }
.status.incorrect { color: var(--cap); background: var(--cap-dim); }
.status.closed { color: var(--muted); background: var(--surface-2); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(245, 184, 61, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(245, 184, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 184, 61, 0); } }
.verified { display: inline-flex; align-items: center; gap: 5px; color: var(--real); font-size: .74rem; font-weight: 800; letter-spacing: .06em; }
.verified svg { width: 14px; height: 14px; }

/* options: binary (cap/real, yes/no) */
.binary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bin { position: relative; overflow: hidden; min-height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: .04em; border: 1px solid; transition: background .15s, transform .1s; }
.bin svg { width: 18px; height: 18px; stroke-width: 2.2; }
.bin:active { transform: scale(.97); }
.bin.pos { color: var(--real); border-color: rgba(0, 210, 106, .4); background: var(--real-dim); }
.bin.neg { color: var(--cap); border-color: rgba(255, 90, 95, .4); background: var(--cap-dim); }
.bin.pos:hover { background: rgba(0, 210, 106, .2); }
.bin.neg:hover { background: rgba(255, 90, 95, .2); }

/* options: list (multiple, range, results) */
.opts { display: grid; gap: 6px; }
.opt { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line-2); text-align: left; font-weight: 600; font-size: .92rem; width: 100%; }
button.opt:hover { border-color: var(--hover-line); }
.opt .fill { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--accent-dim); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.opt.pos .fill { background: var(--real-dim); }
.opt.neg .fill { background: var(--cap-dim); }
.opt > *:not(.fill) { position: relative; }
.opt .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .pct { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.opt .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; }
.opt.mine { border-color: rgba(156, 133, 255, .7); }
.opt.mine .radio { border-color: var(--accent-hi); background: radial-gradient(circle, var(--accent-hi) 45%, transparent 50%); }
.opt.winner { border-color: rgba(0, 210, 106, .7); }
.opt.winner .pct { color: var(--real); }
.opt .win-ico { color: var(--real); }
.opt.range-step .idx { font-size: .72rem; color: var(--faint); width: 14px; }

/* options: this or that */
.tt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.tt-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; padding: 0; }
button.tt-card:hover { border-color: var(--hover-line); }
.tt-card .tt-img { display: block; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; flex: none; }
.tt-card img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; }
.tt-card .tt-body { padding: 10px 12px 11px; display: grid; gap: 6px; min-width: 0; margin-top: auto; }
.tt-card .tt-name { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.tt-card .tt-name .letter { flex: none; margin-top: 1px; }
.tt-card .tt-name b { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; line-height: 1.3; overflow: hidden; overflow-wrap: break-word; word-break: normal; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tt-card .tt-res { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.tt-card .tt-res .pct { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.tt-card .tt-res .tt-you { padding: 2px 7px; border-radius: 99px; background: var(--accent-dim); color: var(--accent-hi); font-size: .7rem; font-weight: 700; }
.tt-card .tt-res .tt-ok { margin-left: auto; display: inline-flex; color: var(--real); }
.tt-card .tt-bar { height: 4px; background: var(--surface-3); flex: none; }
.tt-card .tt-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent-hi); transition: width .7s; }
.tt-card.mine { border-color: rgba(156, 133, 255, .7); }
.tt-card.winner { border-color: rgba(0, 210, 106, .7); }
.tt-card.winner .tt-bar i { background: var(--real); }
.tt-card .letter { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-3); font-size: .74rem; font-weight: 700; color: var(--muted); }

.post-foot { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: .8rem; }
.post-foot .stat { display: inline-flex; align-items: center; gap: 5px; padding: 6px 6px; }
.post-foot .stat svg { width: 15px; height: 15px; }
.post-foot button.stat:hover { color: var(--fg); }
.countdown { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.countdown svg { width: 14px; height: 14px; }

.panel { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); }
.panel.accent { background: linear-gradient(180deg, rgba(124, 92, 255, .12), rgba(124, 92, 255, .03)); border-color: rgba(156, 133, 255, .35); }
.panel.good { background: linear-gradient(180deg, rgba(0, 210, 106, .1), rgba(0, 210, 106, .02)); border-color: rgba(0, 210, 106, .3); }
.panel.bad { background: linear-gradient(180deg, rgba(255, 90, 95, .1), rgba(255, 90, 95, .02)); border-color: rgba(255, 90, 95, .3); }
.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel h3 svg { width: 17px; height: 17px; }
.result-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-big { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 8px; }
.result-big svg { width: 20px; height: 20px; stroke-width: 2.2; }
.result-big.good { color: var(--real); }
.result-big.bad { color: var(--cap); }
.you { font-weight: 700; font-size: .86rem; display: inline-flex; gap: 6px; align-items: center; }
.you svg { width: 15px; height: 15px; }
.you.good { color: var(--real); }
.you.bad { color: var(--cap); }
.proof { display: grid; gap: 8px; }
.proof-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--fg); font-weight: 600; font-size: .88rem; }
.proof-file svg { width: 18px; height: 18px; color: var(--muted); }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent-hi); transition: width .5s; }

/* ---------- Leaderboards / lists ---------- */
.list { display: grid; gap: 6px; }
.list-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
button.list-item:hover, a.list-item:hover { border-color: var(--line-2); }
.list-item .pos { width: 22px; text-align: center; font-family: var(--font-display); font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.list-item .score { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.list-item .score.good { color: var(--real); }
.list-item .chev { color: var(--faint); }

/* ---------- Gate (guests) ---------- */
.gate { text-align: center; justify-items: center; display: grid; gap: 10px; padding: 26px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.gate .btn { max-width: 300px; }
.guest-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(var(--safe-b) + 10px); background: var(--bar-bg-solid); border-top: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.guest-bar .inner { max-width: 568px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.guest-bar p { flex: 1; font-weight: 500; font-size: .88rem; color: var(--muted); }
.guest-bar .btn { width: auto; }
.hero { display: grid; gap: 8px; padding: 6px 2px 2px; }
.hero h1 { font-size: 1.75rem; }

/* ---------- Auth ---------- */
.welcome { min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; gap: 20px; padding: calc(var(--safe-t) + 24px) 20px calc(var(--safe-b) + 24px); max-width: 440px; margin: 0 auto; }
.welcome h1 { font-size: 1.9rem; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); padding: 3px; border-radius: 12px; border: 1px solid var(--line); }
.tabs2 button { padding: 9px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.tabs2 button[aria-pressed="true"] { background: var(--surface-3); color: var(--fg); }
.demo-banner { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--accent-dim); border: 1px solid rgba(156, 133, 255, .3); font-size: .8rem; color: var(--demo-text); }
.demo-banner svg { width: 16px; height: 16px; }

/* ---------- Composer ---------- */
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-card { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); text-align: left; }
.type-card svg { width: 20px; height: 20px; color: var(--muted); }
.type-card b { display: block; font-weight: 600; font-size: .88rem; }
.type-card small { display: block; color: var(--faint); font-size: .74rem; }
.type-card[aria-pressed="true"] { border-color: var(--accent-hi); background: var(--accent-dim); }
.type-card[aria-pressed="true"] svg { color: var(--accent-hi); }
.composer textarea.q { width: 100%; min-height: 110px; resize: vertical; padding: 13px 14px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.35; }
.counter { text-align: right; font-size: .76rem; color: var(--faint); }
.counter.over { color: var(--cap); }
.opt-edit { display: flex; gap: 8px; align-items: center; }
.opt-edit .input { min-height: 42px; }
.opt-img { position: relative; flex: none; width: 42px; height: 42px; border-radius: 10px; border: 1px dashed var(--line-2); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.opt-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opt-img input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.choice { position: relative; display: flex; gap: 9px; align-items: flex-start; padding: 10px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice svg { width: 18px; height: 18px; color: var(--muted); margin-top: 1px; }
.choice b { display: block; font-weight: 600; font-size: .86rem; }
.choice small { display: block; color: var(--faint); font-size: .74rem; line-height: 1.35; }
.choice:has(input:checked) { border-color: var(--accent-hi); background: var(--accent-dim); }
.choice:has(input:checked) svg { color: var(--accent-hi); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.choice:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-weight: 600; font-size: .88rem; cursor: pointer; padding: 10px; }
.drop svg { width: 18px; height: 18px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.preview img { width: 100%; max-height: 300px; object-fit: cover; }
.preview .remove { position: absolute; top: 8px; right: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-weight: 600; font-size: .8rem; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); cursor: pointer; }
.toggle input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .15s; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle b { display: block; font-weight: 600; font-size: .9rem; }
.toggle small { display: block; color: var(--faint); font-size: .78rem; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); }

/* ---------- Notifications ---------- */
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.note-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.note-item.unread { border-color: rgba(156, 133, 255, .4); background: linear-gradient(90deg, var(--accent-dim), var(--surface) 70%); }
.note-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.note-ico svg { width: 18px; height: 18px; }
.note-ico.good { background: var(--real-dim); color: var(--real); }
.note-ico.bad { background: var(--cap-dim); color: var(--cap); }
.note-ico.accent { background: var(--accent-dim); color: var(--accent-hi); }
.note-item .txt { min-width: 0; flex: 1; display: grid; gap: 3px; font-size: .9rem; }
.note-item q { color: var(--muted); font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---------- Profile ---------- */
.profile-head { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 14px 10px 2px; }
.profile-head h1 { font-size: 1.35rem; }
.counts { display: flex; gap: 18px; color: var(--muted); font-size: .86rem; }
.counts b { color: var(--fg); }
.rep { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rep-card { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.rep-card .k { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .74rem; font-weight: 600; }
.rep-card .k svg { width: 14px; height: 14px; }
.rep-card b { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rep-card small { color: var(--faint); font-size: .72rem; }
.rep-card.good b { color: var(--real); }
.rep-card.accent b { color: var(--accent-hi); }
.achievements { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ach .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); }
.ach .ico svg { width: 19px; height: 19px; }
.ach b { font-size: .86rem; font-weight: 600; }
.ach small { color: var(--faint); font-size: .74rem; line-height: 1.35; }
.ach.earned { border-color: rgba(245, 184, 61, .35); background: linear-gradient(180deg, rgba(245, 184, 61, .08), var(--surface) 70%); }
.ach.earned .ico { background: var(--amber-dim); color: var(--amber); }

/* ---------- Community page ---------- */
.c-head { display: grid; gap: 12px; padding: 4px 0; }
.c-head .row { align-items: flex-start; }
.c-head h1 { font-size: 1.35rem; }
.qr { width: 200px; height: 200px; border-radius: 14px; overflow: hidden; background: #fff; margin: 0 auto; }
.qr svg { width: 100%; height: 100%; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--line-2); }
.code-box b { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .18em; font-variant-numeric: tabular-nums; }

/* ---------- Share ---------- */
.share-preview { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); aspect-ratio: 4 / 5; display: grid; place-items: center; }
.share-preview img { width: 100%; height: 100%; object-fit: cover; }
.share-targets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-targets a, .share-targets button { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); font-size: .76rem; font-weight: 600; }
.share-targets svg { width: 22px; height: 22px; }

.empty { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 34px 20px; color: var(--muted); }
.empty .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--faint); }
.empty .ico svg { width: 24px; height: 24px; }

/* ---------- Sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: grid; align-items: end; animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 600px; margin: 0 auto; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; border: 1px solid var(--line-2); border-bottom: 0; padding: 8px 16px calc(var(--safe-b) + 20px); display: grid; gap: 14px; animation: up .24s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes up { from { transform: translateY(100%); } }
.sheet .grabber { width: 38px; height: 4px; border-radius: 9px; background: var(--line-2); margin: 0 auto 2px; }
.sheet-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; font-weight: 500; text-align: left; width: 100%; color: var(--fg); }
.sheet-item:hover { background: var(--surface-2); }
.sheet-item svg { width: 19px; height: 19px; color: var(--muted); }
.sheet-item.danger, .sheet-item.danger svg { color: var(--cap); }

/* ---------- Toast / loading ---------- */
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 14px); z-index: 60; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; padding: 11px 16px; border-radius: 12px; background: var(--fg); color: var(--bg); font-weight: 600; font-size: .88rem; box-shadow: 0 12px 40px -12px var(--shadow); animation: toast .22s cubic-bezier(.2, .9, .3, 1.2) both; }
.toast.error { background: var(--cap); color: #fff; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, -10px); } }
.splash { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.splash .brand { animation: breathe 1.4s ease-in-out infinite; }
.splash .brand svg { height: 52px; }
@keyframes breathe { 50% { opacity: .5; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 200px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Admin ---------- */
.admin { max-width: 1120px; margin: 0 auto; padding: 0 16px 60px; }
.admin .topbar { margin: 0 -16px; }
.admin-tabs { display: flex; gap: 6px; padding: 14px 0; overflow-x: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.metric { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.metric b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.metric.alert { border-color: rgba(245, 184, 61, .45); }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 140px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.bars div { display: grid; gap: 4px; justify-items: center; align-self: stretch; align-content: end; font-size: .66rem; color: var(--faint); }
.bars i { display: block; width: 100%; min-height: 2px; border-radius: 5px 5px 2px 2px; background: var(--accent); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--faint); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: var(--surface); }
td .clip { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 640px) {
  main.screen { padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- launch features: banners, legal links, onboarding, search, captcha ---------- */
.banner { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); font-size: .86rem; color: var(--muted); }
.banner b { color: var(--fg); font-weight: 600; word-break: break-all; }
.banner svg { flex: none; }
.banner.warn { background: var(--amber-dim); border-color: rgba(245, 184, 61, .35); color: var(--warn-text); }
.banner.warn svg { color: var(--amber); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .78rem; margin: 0; }
.legal-links a { color: var(--faint); text-decoration: none; }
.legal-links a:hover { color: var(--muted); text-decoration: underline; }
.toggle a { color: var(--accent-hi); }
.captcha { min-height: 66px; display: grid; place-items: center; color: var(--faint); font-size: .82rem; }
.bio { margin: 2px 0 0; color: var(--muted); max-width: 34ch; text-align: center; line-height: 1.45; }

.onboarding { align-content: start; padding-top: calc(var(--safe-t) + 20px); }
.steps { display: flex; gap: 6px; }
.steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.steps i.on { background: var(--accent); }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); text-align: left; }
.topic b { color: var(--fg); font-weight: 600; }
.topic[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); color: var(--accent-hi); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.search-bar { position: relative; display: flex; align-items: center; gap: 4px; width: 100%; }
.search-bar .s-ico { position: absolute; left: 13px; color: var(--faint); display: flex; pointer-events: none; }
.search-bar .input { padding-left: 40px; border-radius: 999px; }
.search-bar .icon-btn { position: absolute; right: 2px; }
.search-bar input[type="search"]::-webkit-search-cancel-button { display: none; }
.steps-list { padding-left: 20px; display: grid; gap: 6px; margin: 0; }

/* ---------- Continue with Google / Apple (follow each provider's button rules) ---------- */
.oauth-row { display: grid; gap: 10px; }
.btn.oauth { gap: 10px; text-decoration: none; font-weight: 600; min-height: 48px; }
.btn.oauth.google { background: #FFFFFF; color: #1F1F1F; border: 1px solid #747775; font-family: Roboto, var(--font-body); }
.btn.oauth.apple { background: #000000; color: #FFFFFF; border: 1px solid var(--apple-line); }
.prov-logo { width: 20px; height: 20px; object-fit: contain; flex: none; }
.list-item .prov-logo { width: 22px; height: 22px; }
.apple-glyph { display: inline-grid; place-items: center; font-family: -apple-system, system-ui, "Helvetica Neue", Helvetica, sans-serif; font-size: 21px; line-height: 1; margin-top: -3px; }
.prov-badge { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.prov-badge.google { background: #fff; border: 1px solid #DADCE0; }
.prov-badge.apple { background: #000; color: #fff; }
.prov-badge:empty { display: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .8rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ---------- challenges ---------- */
.post-foot { flex-wrap: wrap; }
.tag.battle { color: var(--amber); border-color: rgba(245, 184, 61, .35); background: var(--amber-dim); }
.ch-row .who > span { font-size: .9rem; }
.ch-row .who small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ch-row .status { flex: none; }
.ch-head { display: grid; justify-items: center; gap: 8px; text-align: center; }
.vs-avatars { display: flex; align-items: center; gap: 14px; }
.vs { font-family: var(--font-display); font-weight: 800; color: var(--faint); font-size: 1.1rem; letter-spacing: .02em; }
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); min-width: 0; }
.pick .who { display: grid; min-width: 0; }
.pick .who b { font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick.good { border-color: rgba(0, 210, 106, .5); background: var(--real-dim); }
.pick.good b { color: var(--real); }
.pick.bad { border-color: rgba(255, 90, 95, .4); }
.pick.bad b { color: var(--cap); }
.pick .win-ico { position: absolute; top: 8px; right: 10px; color: var(--amber); }
.ch-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ch-stats > div { display: grid; gap: 2px; padding: 12px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.ch-stats b { font-family: var(--font-display); font-size: 1.3rem; }
.ch-stats small { color: var(--faint); font-size: .7rem; line-height: 1.2; }
.h2h { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.h2h-col { display: grid; justify-items: center; gap: 4px; padding: 16px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; min-width: 0; }
.h2h-col > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-col small { color: var(--faint); }
.h2h-col dl { display: grid; gap: 6px; margin: 8px 0 0; width: 100%; }
.h2h-col dl div { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; }
.h2h-col dt { color: var(--muted); }
.h2h-col dd { margin: 0; font-family: var(--font-display); font-weight: 800; }

/* ---------- community battles ---------- */
.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; }
.versus > .vs { align-self: center; }
.side { position: relative; display: grid; align-content: start; gap: 6px; padding: 14px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); min-width: 0; }
.side.mine { border-color: rgba(124, 92, 255, .55); }
.side.won { border-color: var(--real); box-shadow: 0 0 0 1px var(--real) inset; }
.side-name { display: grid; gap: 8px; justify-items: start; text-align: left; }
.side-name b { font-family: var(--font-display); font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.side small { color: var(--faint); font-size: .76rem; }
.side-votes b { font-family: var(--font-display); font-size: 1.4rem; }
.side-acc { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--muted); display: grid; line-height: 1.1; }
.side-acc.good { color: var(--real); }
.side-acc small { font-family: var(--font-body); font-weight: 500; }
.side-trophy { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 700; font-size: .85rem; }
.vs-marks { display: flex; gap: 2px; flex: none; }
.battle-row .who small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.battle-row .status { flex: none; }
.invite-loop h3 { color: var(--fg); }
.trophies { display: flex; flex-wrap: wrap; gap: 8px; }
.trophy-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245, 184, 61, .35); font-size: .78rem; font-weight: 700; }
.c-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .85rem; }
.c-stats span { display: inline-flex; align-items: center; gap: 5px; }
.c-stats b { color: var(--fg); }
.badge-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--amber); color: #1a1300; font-size: .7rem; font-weight: 800; margin-left: 4px; }
.sheet .seg { justify-self: start; }
.sheet .seg button { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Theme ---------- */
.brand .wm-real { fill: var(--wm-real); }
.brand .wm-cap { fill: var(--wm-cap); }
.brand .wm-text { fill: var(--fg); }
:root[data-theme="light"] .spinner { border-color: rgba(10, 12, 22, .15); border-top-color: var(--accent); }
:root[data-theme="light"] .btn.primary .spinner, :root[data-theme="light"] .toast .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
:root[data-theme="light"] .post, :root[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(15, 18, 34, .04); }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-pick button { display: grid; justify-items: center; gap: 8px; padding: 12px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; font-size: .86rem; color: var(--muted); }
.theme-pick button[aria-pressed="true"] { border-color: var(--accent); color: var(--fg); background: var(--accent-dim); }
.theme-pick .sw { width: 44px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; }
.theme-pick .sw.dark { background: #0A0C16; display: block; }
.theme-pick .sw.light { background: #F5F6FA; display: block; }
.theme-pick .sw.system i:first-child { background: #F5F6FA; }
.theme-pick .sw.system i:last-child { background: #0A0C16; }

/* ---------- Share sheet: card header, app tiles, round actions ---------- */
.sheet.ss-sheet { background: linear-gradient(180deg, var(--surface-2), var(--surface) 160px); border-radius: 30px 30px 0 0; padding-top: 10px; }
.ss { display: grid; gap: 18px; }
.ss-head { display: flex; align-items: center; gap: 14px; padding: 2px 0 16px; border-bottom: 1px solid var(--line); }
.ss-thumb { position: relative; flex: none; padding: 2.5px; border-radius: 18px; background: linear-gradient(90deg, var(--real) 50%, var(--cap) 50%); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.ss-frame { display: grid; place-items: center; width: 70px; height: 87px; border-radius: 15.5px; overflow: hidden; background: var(--bg-2); color: var(--faint); }
.ss-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-frame .spinner { border-color: var(--line-2); border-top-color: var(--accent); }
.ss-zoom { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); box-shadow: 0 0 0 2.5px var(--surface); }
.ss-meta { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ss-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-hi); }
.ss-meta b { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-meta #ss-info { color: var(--muted); font-size: .86rem; }
.ss-link { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: .76rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ss-link svg { flex: none; }
.ss-x { align-self: flex-start; background: var(--surface-2); border-radius: 50%; width: 32px; height: 32px; min-width: 32px; display: grid; place-items: center; color: var(--muted); }
.ss-big { border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); max-height: 44vh; aspect-ratio: 4 / 5; margin: 0 auto; animation: fade .18s ease both; }
.ss-big img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--bg-2); }
.ss-apps { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.ss-apps::-webkit-scrollbar { display: none; }
.ss-apps > a, .ss-apps > button { flex: none; width: 76px; display: grid; justify-items: center; gap: 8px; padding: 0; background: none; border: 0; color: var(--fg); font-size: .76rem; font-weight: 500; text-decoration: none; scroll-snap-align: start; }
.tile { width: 62px; height: 62px; border-radius: 19px; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 18px -10px rgba(0, 0, 0, .6); transition: transform .12s; }
.tile::after { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(rgba(255, 255, 255, .18), transparent); pointer-events: none; }
.tile svg { width: 28px; height: 28px; stroke-width: 1.9; position: relative; }
.ss-apps > *:active .tile, .ss-actions button:active .circ { transform: scale(.92); }
.t-whatsapp { background: linear-gradient(180deg, #5BE584, #25D366); }
.t-instagram { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.t-facebook { background: linear-gradient(180deg, #4A9BFF, #1877F2); }
.t-xlogo { background: linear-gradient(180deg, #2A2A2A, #000); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 18px -10px rgba(0, 0, 0, .6); }
.t-telegram { background: linear-gradient(180deg, #4FC3F7, #229ED9); }
.t-message { background: linear-gradient(180deg, #6EE07A, #30C04A); }
.t-mail { background: linear-gradient(180deg, #8C74FF, #6A47F5); }
.ss-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.ss-actions button { display: grid; justify-items: center; gap: 8px; color: var(--fg); font-size: .76rem; font-weight: 500; text-align: center; line-height: 1.25; }
.circ { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--fg); transition: transform .12s; }
:root[data-theme="light"] .circ { background: var(--surface); box-shadow: 0 1px 2px rgba(15, 18, 34, .06); }

/* ---------- Legal reader (in-app) ---------- */
.sheet.legal-sheet { max-height: 94vh; min-height: 70vh; align-content: start; padding-top: 6px; }
.legal-head { position: sticky; top: -8px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.legal-head .seg { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.legal-head .seg button { flex: 1; }
.legal-doc { color: var(--muted); font-size: .95rem; line-height: 1.65; overflow-wrap: anywhere; }
.legal-doc h1 { font-size: 1.6rem; color: var(--fg); margin: 6px 0 4px; }
.legal-doc h2 { font-size: 1.12rem; color: var(--fg); margin: 26px 0 6px; }
.legal-doc h3 { font-size: .98rem; color: var(--fg); margin: 18px 0 4px; }
.legal-doc p, .legal-doc li { color: var(--muted); }
.legal-doc b { color: var(--fg); }
.legal-doc ul { padding-left: 20px; }
.legal-doc li { margin: 5px 0; }
.legal-doc a { color: var(--accent-hi); }
.legal-doc .meta { color: var(--faint); font-size: .84rem; margin: 0; }
.legal-doc .note { background: var(--amber-dim); border: 1px solid rgba(245, 184, 61, .35); border-radius: 12px; padding: 10px 14px; color: var(--warn-text); font-size: .86rem; }
.legal-doc .box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.legal-doc .table-scroll { overflow-x: auto; }
.legal-doc table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.legal-doc th, .legal-doc td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.legal-doc th { color: var(--fg); font-weight: 600; }
.legal-doc footer { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: .84rem; }
.t-tiktok { background: linear-gradient(180deg, #1A1A1A, #000); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 18px -10px rgba(0, 0, 0, .6); }
.t-tiktok svg { stroke-width: 2.6; filter: drop-shadow(-1.6px -1.2px 0 #25F4EE) drop-shadow(1.6px 1.2px 0 #FE2C55); }

/* ---------- Simple composer ---------- */
.composer { gap: 18px; }
.write { display: flex; gap: 12px; align-items: flex-start; }
.write .avatar { margin-top: 4px; }
.composer textarea.q { min-height: 120px; border: 0; background: transparent; padding: 6px 0; font-size: 1.28rem; resize: none; border-radius: 0; }
.composer textarea.q:focus { outline: none; box-shadow: none; }
.composer textarea.q::placeholder { color: var(--faint); }
.write .counter { margin: 0; min-height: 1em; }
h3.mini { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.type-chips, .topic-chips { margin: 0 -14px; padding: 0 14px !important; }
.settings-list { display: grid; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 14px; text-align: left; width: 100%; color: var(--fg); font-weight: 500; cursor: pointer; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row > svg:first-child, .set-ico svg { color: var(--muted); flex: none; }
.set-ico { display: flex; }
.set-row small { display: block; color: var(--faint); font-size: .76rem; font-weight: 400; }
.set-val { color: var(--muted); font-size: .9rem; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-val.warn { color: var(--amber); }
.set-row > svg:last-child { color: var(--faint); flex: none; }
.set-row:hover { background: var(--surface-2); }
.switch input { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); cursor: pointer; transition: background .15s; margin: 0; display: block; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked { background: var(--real); border-color: var(--real); }
.switch input:checked::after { transform: translateX(18px); }
.post-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 5; margin: 0 -14px; padding: 10px 14px; background: var(--bg); }
/* a solid band with a short fade above it, so the form never shows through around the buttons */
.post-bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 18px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.post-bar .btn { box-shadow: 0 10px 28px -10px rgba(106, 71, 245, .7); min-height: 52px; font-size: 1.02rem; }
.pick-list { display: grid; gap: 6px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; width: 100%; color: var(--fg); }
.pick-row > svg:first-child { color: var(--muted); flex: none; }
.pick-row b { display: block; font-weight: 600; }
.pick-row small { display: block; color: var(--faint); font-size: .8rem; }
.pick-row[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); }
.pick-row[aria-pressed="true"] > svg { color: var(--accent-hi); }
.pick-sub { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px 6px; }

/* ---------- Home helpers: how it works, just posted ---------- */
.card-soft { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--accent-dim), transparent 70%), var(--surface); border: 1px solid var(--line-2); }
.card-soft h2 { font-size: 1.05rem; margin: 0; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.how li { display: flex; gap: 12px; align-items: flex-start; }
.how li b { display: block; font-weight: 600; }
.how li small { display: block; color: var(--muted); font-size: .84rem; }
.how-n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--accent-dim); color: var(--accent-hi); }
.how .btn { justify-self: start; width: auto; }
.posted { background: linear-gradient(160deg, var(--real-dim), transparent 70%), var(--surface); }
.posted b { display: block; font-weight: 600; }
.posted small { display: block; color: var(--muted); font-size: .84rem; }
.posted-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--real); color: #fff; flex: none; }
.posted-ico svg { stroke-width: 2.6; }

/* ---------- Simple profile ---------- */
.rep-card.ch-stats { display: grid; grid-template-columns: none; gap: 6px; text-align: left; color: var(--fg); }
.rep-card.ch-stats b { font-size: 1.2rem; }
button.rep-card:hover { border-color: var(--line-2); }
.rep-card small { line-height: 1.3; }
.badge-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
.badge-strip::-webkit-scrollbar { display: none; }
.badge-coin { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px dashed var(--line-2); color: var(--faint); }
.badge-coin.earned { border: 1px solid rgba(245, 184, 61, .5); background: var(--amber-dim); color: var(--amber); }
.post-head .who small { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.post-foot .stat.icon-only { padding: 6px 8px; } .post-foot .stat.icon-only svg { width: 17px; height: 17px; }
.post-foot { flex-wrap: nowrap; } .post-foot .countdown { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Swipe down to close ---------- */
.sheet { overscroll-behavior: contain; will-change: transform; }
.sheet .grabber { position: relative; width: 42px; height: 5px; margin: 0 auto 4px; cursor: grab; touch-action: none; }
.sheet .grabber::before { content: ""; position: absolute; inset: -14px -60px; }

/* ---------- Series and live sessions ---------- */
.kind-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.kind-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 8px; }
.series-title { font-family: var(--font-display); font-weight: 650; font-size: 1.15rem; min-height: 52px; }
.sq-card { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.sq-head { display: flex; align-items: center; gap: 10px; }
.sq-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-dim); color: var(--accent-hi); font-weight: 700; font-size: .82rem; flex: none; }
.sq-timer { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); font-size: .8rem; }
.sq-timer select { background: transparent; border: 0; color: var(--fg); font: inherit; font-weight: 600; }
.sq-q { min-height: 64px; font-weight: 600; resize: vertical; }
.sq-types { margin: 0 -14px; padding: 0 14px !important; }
.sq-bin { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sq-pill { display: grid; justify-items: center; gap: 2px; padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); font-weight: 700; letter-spacing: .03em; }
.sq-pill svg { display: inline; vertical-align: -2px; margin-right: 4px; }
.sq-pill.pos { color: var(--real); } .sq-pill.neg { color: var(--cap); }
.sq-pill[disabled] { opacity: .85; }
.sq-pill[aria-pressed="true"] { border-color: currentColor; background: var(--real-dim); }
.sq-pill.neg[aria-pressed="true"] { background: var(--cap-dim); }
.sq-pill small { font-size: .7rem; font-weight: 600; letter-spacing: 0; }
.sq-right { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--line-2); color: var(--faint); }
.sq-right[aria-pressed="true"] { border: 1.5px solid var(--real); background: var(--real); color: #fff; }
.warn-text { color: var(--amber) !important; }

.series-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); background: linear-gradient(170deg, var(--accent-dim), transparent 45%), var(--surface); }
.series-card > .btn { width: 100%; }
.series-kicker { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--accent-hi); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--cap); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .08em; flex: none; }
.live-pill .live-dot { background: #fff; box-shadow: none; }
.sr-dots { display: flex; gap: 5px; }
.sr-dots i { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-3); }
.sr-dots i.done { background: var(--accent); } .sr-dots i.good { background: var(--real); } .sr-dots i.bad { background: var(--cap); }
.sr-dots i.cur { outline: 2px solid var(--accent-hi); outline-offset: 1px; }
.sr-dots.small i { height: 4px; }
.sr-head { display: grid; gap: 6px; justify-items: start; }
.sr-head h1 { font-size: 1.45rem; line-height: 1.25; margin: 0; }
.sr-head p { margin: 0; }
.sr-q .question { font-size: 1.3rem; }
.sr-q.live .question { font-size: 1.5rem; }
.sr-num { margin: 0; color: var(--accent-hi); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.sr-big .opt, .sr-big .bin { min-height: 58px; font-size: 1.02rem; }
.series .opt .letter, .series-card .letter, .sr-big .letter { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 800; flex: none; }
.opt.picked, .bin.picked { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt.wrong { border-color: var(--cap); }
.opt small { font-weight: 500; color: var(--muted); }
.verdict { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 600; }
.verdict.good { color: var(--real); } .verdict.bad { color: var(--cap); }
.verdict b { color: var(--fg); }
.sr-count { margin: 0; font-size: .82rem; }
.sr-score { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r-lg); background: linear-gradient(150deg, var(--accent-dim), transparent 70%), var(--surface); border: 1px solid var(--line-2); }
.sr-score .big { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--accent-hi); display: flex; align-items: baseline; }
.sr-score .big small { font-size: 1.1rem; color: var(--muted); }
.sr-score > span:last-child { display: grid; font-weight: 700; font-size: 1.1rem; }
.sr-score > span:last-child small { font-weight: 500; font-size: .86rem; color: var(--muted); }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.board li.me { border-color: var(--accent); background: var(--accent-dim); }
.board .pos { width: 24px; text-align: center; font-weight: 800; color: var(--faint); display: grid; place-items: center; }
.board li:nth-child(1) .pos { color: #E8B931; } .board li:nth-child(2) .pos { color: #A9B4C8; } .board li:nth-child(3) .pos { color: #C98A54; }
.board b { font-family: var(--font-display); font-size: 1.05rem; min-width: 52px; text-align: right; }
.live-lobby { justify-items: center; text-align: center; }
.live-lobby .code-box { width: 100%; }
.live-lobby .clip { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-lobby p { margin: 0; }
.names { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.live-wait { justify-items: center; text-align: center; padding: 28px 18px; }
.live-wait p { margin: 0; }
.pulse { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-dim); color: var(--accent-hi); animation: srpulse 1.6s ease-in-out infinite; }
@keyframes srpulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 10px transparent; } 0%, 100% { box-shadow: 0 0 0 0 var(--accent-dim); } }
.countdown-bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.countdown-bar i { display: block; height: 100%; width: var(--w, 100%); background: linear-gradient(90deg, var(--amber), var(--accent)); transition: width .2s linear; }
.countdown-bar.soft i { background: var(--line-2); }
.sr-secs { margin: -6px 0 0; text-align: right; color: var(--muted); font-size: .86rem; }
.sr-secs b { font-family: var(--font-display); font-size: 1.3rem; color: var(--fg); }
.sr-answered { margin: 0; text-align: center; color: var(--muted); }
.sr-answered b { font-family: var(--font-display); font-size: 1.4rem; color: var(--fg); }
.sr-locked { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--muted); font-weight: 600; }
.sr-me { margin: 0; text-align: center; color: var(--muted); }
.post-bar.row { display: flex; gap: 8px; }
.post-bar.row .btn:first-child { width: auto; flex: none; }
.live-lobby .code-box b.clip { letter-spacing: 0; font-size: .92rem; font-family: var(--font-body); }

/* =====================================================================
   Responsive: small phones, tablets and desktop
   ===================================================================== */
.desk-only { display: none !important; }
.c-head h1 { overflow-wrap: anywhere; }
.c-head .stack-sm { min-width: 0; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.btn:focus-visible, .chip-btn:focus-visible, .tab:focus-visible { outline-offset: 3px; }

/* comfortable tap targets everywhere */
.post-foot .stat.icon-only { min-width: 40px; min-height: 40px; justify-content: center; }
button.tag, a.tag { min-height: 32px; padding: 5px 10px; }
.sq-timer select { min-height: 28px; }
.icon-btn { min-width: 40px; min-height: 40px; }

/* very small phones (≤ 360px) */
@media (max-width: 360px) {
  main.screen { padding-left: 10px; padding-right: 10px; }
  .topbar { padding-left: 12px; }
  .question { font-size: 1.06rem; }
  .rep { gap: 6px; } .rep-card { padding: 10px 8px; } .rep-card b { font-size: 1.2rem; }
  .tab span:not(.plus):not(.badge) { font-size: .62rem; }
  .ss-apps > a, .ss-apps > button { width: 68px; }
  .tile { width: 56px; height: 56px; border-radius: 17px; }
  .circ { width: 52px; height: 52px; }
  .kind-seg button { font-size: .8rem; padding: 8px 4px; }
  .sr-score .big { font-size: 2rem; }
  .board li { padding: 9px 10px; gap: 8px; }
}

/* tablets and up: sheets become centred dialogs */
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 540px; max-height: 86vh; border-radius: 22px; border-bottom: 1px solid var(--line-2); padding-bottom: 22px; animation: pop .2s cubic-bezier(.2, .9, .3, 1.1) both; box-shadow: 0 30px 80px -30px var(--shadow); }
  .sheet.legal-sheet { max-width: 720px; }
  .sheet .grabber { opacity: .6; }
  .toast { top: 20px; }
  @keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
}
@media (min-width: 700px) and (hover: hover) {
  .sheet .grabber { display: none; }
}

/* desktop: side navigation instead of the bottom bar */
@media (min-width: 1000px) {
  :root { --side: 232px; --col: 640px; }
  .desk-only { display: revert !important; }
  #app.with-nav { max-width: calc(var(--side) + 32px + var(--col)); padding-left: calc(var(--side) + 32px); }
  #app.with-nav main.screen { padding-bottom: 48px; }
  #app.with-nav .tabbar { position: fixed; top: 0; bottom: 0; left: max(16px, calc(50% - (var(--side) + 32px + var(--col)) / 2)); right: auto; width: var(--side);
    padding: 20px 8px 20px 0; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #app.with-nav .tabbar-inner { height: 100%; max-width: none; display: flex; flex-direction: column; align-items: stretch; gap: 4px; border-right: 1px solid var(--line); padding-right: 16px; }
  .tab-brand { display: flex !important; padding: 6px 12px 18px; }
  .tab-brand .brand svg { height: 30px; }
  #app.with-nav .tab { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 11px 14px; border-radius: 12px; font-size: 1rem; font-weight: 600; color: var(--muted); }
  #app.with-nav .tab:hover { background: var(--surface); color: var(--fg); }
  #app.with-nav .tab[aria-current="page"] { color: var(--fg); background: var(--surface); }
  #app.with-nav .tab svg { width: 22px; height: 22px; }
  #app.with-nav .tab .badge { position: static; margin-left: auto; box-shadow: none; }
  #app.with-nav .tab.post-tab { order: 10; margin-top: 10px; justify-content: center; background: var(--accent); color: #fff; padding: 12px; }
  #app.with-nav .tab.post-tab:hover { background: var(--accent-hover); }
  #app.with-nav .tab.post-tab .plus { width: auto; height: auto; background: none; }
  #app.with-nav .tab.post-tab[aria-current="page"] { box-shadow: 0 0 0 3px var(--accent-dim); }
  .side-foot { order: 20; margin-top: auto; padding: 0 8px; }
  .side-foot .legal-links { justify-content: flex-start; }
  #app.with-nav .topbar .brand { display: none; }
  #app.with-nav .topbar { padding-left: 20px; padding-top: 14px; padding-bottom: 12px; border-radius: 0; }
  #app.with-nav .post-bar { bottom: 0; margin: 0 -20px; padding: 12px 20px 16px; }
  #app.with-nav .chips, #app.with-nav main.screen { padding-left: 20px; padding-right: 20px; }
  .type-chips, .topic-chips, .sq-types, .badge-strip { margin-left: 0; margin-right: 0; padding-left: 0 !important; padding-right: 0 !important; flex-wrap: wrap; overflow: visible; }
  .question { font-size: 1.22rem; }
  .post { padding: 18px 20px; }
  .rep-card b { font-size: 1.6rem; }
  /* live sessions are often shown on a projector or TV */
  .sr-q.live .question { font-size: 2rem; line-height: 1.25; }
  .sr-q.live .sr-big .opt, .sr-q.live .sr-big .bin { min-height: 68px; font-size: 1.2rem; }
  .live-lobby .qr { width: 260px; height: 260px; }
  .live-lobby .qr svg { width: 100%; height: 100%; }
  .guest-bar .inner, .welcome { max-width: 480px; }
}
@media (min-width: 1000px) and (hover: hover) {
  .post:hover { border-color: var(--line-2); }
  .opt:hover, button.list-item:hover { border-color: var(--hover-line); }
}
/* large screens: a little more breathing room */
@media (min-width: 1400px) {
  :root { --side: 260px; --col: 680px; }
}
@media (max-width: 360px) { .type-chips, .topic-chips, .sq-types, .badge-strip, .ss-apps { margin-left: -10px !important; margin-right: -10px !important; padding-left: 10px !important; padding-right: 10px !important; } }

@media (min-width: 1000px) {
  #app.with-nav .tab.desk-only { display: flex !important; }
  #app.with-nav .topbar [data-act=alerts] { display: none; }
  #app.with-nav .topbar h2.desk-only { display: block !important; }
}
@media (min-width: 1000px) { #app:has(#admin-root) { max-width: 1160px; } }

/* Date and time pickers: iOS gives them a fixed natural width and top-aligns the value, so size and centre them */
input[type="datetime-local"], input[type="date"], input[type="time"] {
  display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
  height: 52px; min-height: 52px; padding: 0 14px; line-height: normal;
  -webkit-appearance: none; appearance: none; text-align: left; color: var(--fg); font-size: 1rem;
}
input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.4em; line-height: 1.4; }
input[type="datetime-local"]::-webkit-datetime-edit { padding: 0; line-height: 1.4; }
input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
:root[data-theme="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: none; }
.sheet .field { min-width: 0; }

/* ---------- Photos in series ---------- */
.drop.small { min-height: 42px; font-size: .84rem; }
.sq-photo img { max-height: 220px; width: 100%; object-fit: cover; border-radius: 12px; }
.sr-photo { margin: 2px 0 4px; }
.sr-photo img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; }
.sr-q.live .sr-photo img { max-height: 46vh; object-fit: contain; background: var(--bg-2); }
.tt-card.wrong { border-color: var(--cap); }
.tt-card.mine { border-color: var(--accent); }
.series .tt-card .tt-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); }
.series .tt-card.winner .tt-bar i { background: var(--real); }

/* ---------- badges: verified and Pro ---------- */
.vbadge { display: inline-flex; vertical-align: -2px; margin-left: 4px; color: var(--accent-hi); }
.vbadge svg { width: 15px; height: 15px; }
h1 .vbadge svg { width: 20px; height: 20px; }
.i.vb { width: 13px; height: 13px; color: var(--accent-hi); }
.pro-badge { display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 5px; font-size: .62rem; font-weight: 800; letter-spacing: .06em; vertical-align: 2px;
  color: #1A1300; background: linear-gradient(135deg, #FFD976, #F5B83D); line-height: 1.5; }
.pro-badge.big { font-size: .9rem; padding: 3px 10px; border-radius: 8px; vertical-align: 0; margin: 0 0 4px; }
.good-text { color: var(--real); }

/* ---------- reactions ---------- */
.reacts { display: flex; gap: 6px; flex-wrap: wrap; }
.react { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 600; }
.react svg { width: 16px; height: 16px; }
button.react:hover { border-color: var(--hover-line, var(--line-2)); color: var(--fg); }
.react.on { background: var(--accent-dim); border-color: rgba(124, 92, 255, .45); color: var(--fg); }
.react.on svg { color: var(--accent-hi); }

/* ---------- why people voted ---------- */
.reasons { display: grid; gap: 6px; }
.reasons .label { font-size: .72rem; }
.reasons ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.reasons li { display: grid; gap: 3px; padding: 9px 11px; border-radius: 12px; background: var(--surface-2); }
.r-who { display: flex; align-items: center; gap: 6px; font-size: .78rem; min-width: 0; }
.r-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-pick { margin-left: auto; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: .7rem; font-weight: 700; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.r-text { font-size: .9rem; overflow-wrap: anywhere; }
.reasons .link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; }
.reason-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reason-list li { display: flex; gap: 10px; align-items: flex-start; }
.reason-list p { margin: 3px 0 0; overflow-wrap: anywhere; }
.r-who .av-sm { width: 22px; height: 22px; font-size: .65rem; }

/* ---------- Pro ---------- */
.pro-head { display: grid; justify-items: center; text-align: center; gap: 4px; }
.pro-head h2 { margin: 0; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; }
.perks li svg { flex: none; color: var(--amber); margin-top: 2px; }
.perks small { display: block; color: var(--muted); font-size: .82rem; }
.plan { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); text-align: left; color: var(--fg); }
.plan:hover { border-color: var(--amber); }
.plan small { display: block; color: var(--muted); font-size: .8rem; }
.plan > b { font-family: var(--font-display); font-size: 1.1rem; }
.sheet-item .pro-badge { margin-left: auto; }

/* ---------- insights ---------- */
.sheet.wide-sheet { max-width: 760px; }
.metric-grid.small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.metric-grid.small .metric { padding: 10px 12px; }
.metric-grid.small .metric b { font-size: 1.25rem; }
.chart { margin: 0; display: grid; gap: 6px; }
.chart svg { width: 100%; height: auto; color: var(--muted); background: var(--surface-2); border-radius: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ins-q p { margin: 0; font-weight: 600; }
.ins-q .opt .pct, .sheet .opt .pct { white-space: nowrap; }

/* ---------- two-step login, embeds ---------- */
.codes { columns: 2; gap: 18px; margin: 0; padding: 12px 12px 12px 32px; background: var(--surface-2); border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; }
.codes li { padding: 3px 0; }
.code-input { font-size: 1.3rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
details.more { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
details.more summary { cursor: pointer; font-weight: 600; }
details.more[open] summary { margin-bottom: 10px; }
.embed-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; resize: none; }

/* ---------- presenter view (live sessions on a projector or TV) ---------- */
.presenting .tabbar, .presenting .verify-banner { display: none !important; }
.presenting #app.with-nav { padding-left: 0 !important; }
.presenting .screen.series { max-width: min(1200px, 96vw); font-size: clamp(16px, 1.6vw, 26px); }
.presenting .screen.series .question { font-size: 2.1em; line-height: 1.2; }
.presenting .screen.series .sr-big .opt, .presenting .screen.series .opts .opt { min-height: 2.8em; font-size: 1.15em; }
.presenting .screen.series .sr-num, .presenting .screen.series .sr-answered { font-size: 1.1em; }
.present-join { position: fixed; right: 18px; bottom: 18px; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: .9rem; }
.present-join .qr { width: 120px; height: 120px; padding: 6px; background: #fff; border-radius: 10px; }
@media (max-width: 699px) { .present-join { display: none; } }

/* ---------- printed reports ---------- */
#print-area { display: none; }
@media print {
  .printing body > *:not(#print-area) { display: none !important; }
  .printing #print-area { display: block; color: #000; background: #fff; font-family: Inter, Arial, sans-serif; padding: 0; }
  .printing #print-area header { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 12px; }
  .printing #print-area .metric, .printing #print-area .opt { border: 1px solid #999; background: #fff; color: #000; break-inside: avoid; }
  .printing #print-area .opt .fill { background: #ddd !important; }
  .printing #print-area .chart svg { background: #fff; }
  .printing #print-area * { color: #000 !important; }
}
.ss-actions:has(> :nth-child(5)) { grid-template-columns: repeat(5, 1fr); }

/* admin additions */
.tag.on { color: var(--real); background: var(--real-dim); }
.appeal-msg { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.err-detail { white-space: pre-wrap; font-size: .75rem; max-height: 220px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: 8px; }
.card-soft.stack-sm { padding: 14px; }
.sheet .row.wrap .btn { flex: 1 1 180px; }
.danger-text { color: var(--cap) !important; }
.draft-row .icon-btn small { font-size: .7rem; font-weight: 700; color: var(--cap); }

/* ---------- No zooming ----------
   iPhones zoom into the page when you tap a text field smaller than 16px, and stay zoomed in afterwards.
   Fields are 16px on phones and tablets, double-tap doesn't zoom, and text doesn't grow when the phone turns. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body, button, a, input, textarea, select, label { touch-action: manipulation; }
@media (hover: none), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select, .input { font-size: 16px !important; }
}

/* While typing on a phone the menu bar steps aside (it would otherwise sit on top of the keyboard) */
@media (hover: none), (pointer: coarse) { html.typing .tabbar { display: none; } }

/* Alerts: clear one (×) or all */
.note-li { position: relative; }
.note-li .note-item { padding-right: 44px; }
.note-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--faint); background: transparent; }
.note-x:hover, .note-x:focus-visible { color: var(--fg); background: var(--surface-2); }
@media (hover: none) { .note-x { width: 40px; height: 40px; top: 4px; right: 4px; } }

/* Chinese: tighter letter-spacing on headings looks cramped in Chinese, and uppercase labels don't apply */
:root[data-lang="zh"] h1, :root[data-lang="zh"] h2, :root[data-lang="zh"] h3 { letter-spacing: 0; }
:root[data-lang="zh"] .label, :root[data-lang="zh"] .status, :root[data-lang="zh"] .verified { letter-spacing: .02em; }

/* =====================================================================
   Play: party games (Imposter, Quiz) joined with a PIN
   ===================================================================== */
.mob-only { display: inline-grid; }
@media (min-width: 1000px) { .mob-only { display: none !important; } }
.g-join { justify-items: stretch; text-align: center; padding: 22px 18px; background: linear-gradient(150deg, rgba(124, 92, 255, .28), rgba(0, 210, 106, .08) 70%), var(--surface); }
.g-join h1 { font-size: 1.5rem; margin: 0; }
.g-pin-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.g-pin { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; letter-spacing: .14em; text-align: center; min-height: 56px; }
.g-pin::placeholder { letter-spacing: .02em; font-weight: 600; font-size: 1.05rem; }
.g-pin-form .btn { min-height: 56px; padding: 0 22px; }
.g-kinds { display: grid; gap: 10px; }
@media (min-width: 640px) { .g-kinds { grid-template-columns: 1fr 1fr; } }
.g-kind { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); text-align: left; color: var(--fg); }
.g-kind:hover { border-color: var(--accent); }
.g-kind b { display: block; font-family: var(--font-display); font-size: 1.12rem; }
.g-kind small { display: block; color: var(--muted); font-size: .86rem; line-height: 1.35; margin-top: 2px; }
.g-kind em { display: inline-block; margin-top: 6px; font-style: normal; font-size: .74rem; font-weight: 700; color: var(--faint); }
.g-kind > svg:last-child { color: var(--faint); flex: none; }
.g-kind-ico { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.g-kind-ico.big { width: 64px; height: 64px; margin: 0 auto; }
.g-kind-ico.g-imposter { background: linear-gradient(140deg, #FF5A5F, #7C5CFF); }
.g-kind-ico.g-quiz { background: linear-gradient(140deg, #F5B83D, #00D26A); }
.g-stats h2 { font-size: 1rem; }
.g-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.g-stat-row b { display: block; font-family: var(--font-display); font-size: 1.5rem; }
.g-stat-row small { color: var(--muted); font-size: .8rem; }
.community-hero { padding-top: 10px; }
.community-hero h2 { font-size: 1.2rem; margin: 0 0 4px; }

/* the game screen */
.g-top .grow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.g-top .grow b.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-pin-tag { flex: none; margin-left: auto; font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 4px 8px; }
.g-pin-tag b { color: var(--fg); letter-spacing: .06em; }
main.g-screen { padding-bottom: calc(var(--safe-b) + 28px); max-width: 760px; margin: 0 auto; width: 100%; }
main.g-screen .post-bar { bottom: 0; padding-bottom: calc(var(--safe-b) + 10px); }
.g-name { justify-items: stretch; text-align: center; }
.g-name .field { text-align: left; }
.g-wait { justify-items: center; text-align: center; padding: 26px 18px; }
.g-wait p { margin: 0; }
.g-wait > svg { color: var(--cap); }
.g-lobby { justify-items: center; text-align: center; padding: 20px 16px; }
.g-join-at { margin: 0; color: var(--muted); }
.g-join-at b { color: var(--fg); }
.g-big-pin { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.8rem, 13vw, 5.5rem); letter-spacing: .08em; line-height: 1; }
.g-lobby .qr { width: 168px; height: 168px; }
.g-share { justify-content: center; }
.g-names { display: flex; flex-wrap: wrap; gap: 6px; }
.g-name-tag { font-size: .9rem; padding: 6px 10px; border-radius: 10px; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); animation: gpop .25s ease-out; }
button.g-name-tag:hover { border-color: var(--cap); }
.g-name-tag.done { border-color: rgba(0, 210, 106, .45); background: var(--real-dim); }
.g-name-tag.done svg { color: var(--real); }
.g-name-tag.you { border-color: var(--accent); }
.g-name-tag small { color: var(--faint); }
@keyframes gpop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.g-how ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.g-how h3 { margin: 0; }
.g-setup h3 { margin: 6px 0 0; font-size: .98rem; }
.g-setup .set-row { padding-left: 0; padding-right: 0; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; padding: 9px 8px; }
.g-iq .input { min-width: 0; }
.g-qedit textarea { resize: vertical; }
.g-timer { width: auto; min-height: 36px; padding: 0 28px 0 10px; font-size: .86rem; }
.g-opts { display: grid; gap: 8px; }
@media (min-width: 560px) { .g-opts { grid-template-columns: 1fr 1fr; } }
.g-opt-edit { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-radius: 12px; border: 2px solid var(--gc); background: color-mix(in srgb, var(--gc) 12%, transparent); }
.g-opt-edit .input { border: 0; background: transparent; padding-left: 0; min-height: 40px; }
.g-shape { color: var(--gc); font-size: 1.05rem; line-height: 1; width: 18px; text-align: center; flex: none; }
.g-right { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); color: transparent; }
.g-right[aria-pressed="true"] { background: var(--real); border-color: var(--real); color: #06130C; }
.g-a0 { --gc: #E8384F; } .g-a1 { --gc: #2E7DF6; } .g-a2 { --gc: #E6A700; } .g-a3 { --gc: #1FAF5A; }
.g-round-n { margin: 0; color: var(--muted); font-weight: 700; font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; }
.g-question { font-family: var(--font-display); font-size: clamp(1.3rem, 4.6vw, 2.2rem); line-height: 1.2; margin: 0; }
.g-answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-ans { position: relative; display: flex; align-items: center; gap: 10px; min-height: 92px; padding: 14px; border-radius: 16px; background: var(--gc); color: #fff; font-weight: 700; font-size: 1.04rem; text-align: left; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); overflow-wrap: anywhere; }
.g-ans .g-shape { color: rgba(255, 255, 255, .9); font-size: 1.3rem; }
button.g-ans:active { transform: translateY(2px); box-shadow: none; }
.g-ans.mini { min-height: 0; padding: 10px 14px; }
.g-answer-grid.show .g-ans { min-height: 72px; }
.g-bars { display: grid; gap: 8px; }
.g-bar-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); overflow: hidden; font-weight: 600; }
.g-bar-row > * { position: relative; z-index: 1; }
.g-bar-row i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: color-mix(in srgb, var(--gc) 22%, transparent); z-index: 0; transition: width .6s ease; }
.g-bar-row.right { border-color: var(--real); }
.g-bar-row.right svg { color: var(--real); vertical-align: -3px; }
.g-bar-row.wrong { opacity: .62; }
.g-bar-row.mine { box-shadow: 0 0 0 2px var(--accent) inset; }
.g-verdict { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; text-align: center; }
.g-verdict.good { color: var(--real); } .g-verdict.bad { color: var(--cap); }
.g-waiting { text-align: center; margin: 4px 0 0; }
.g-banner { text-align: center; display: grid; gap: 4px; }
.g-banner h2 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.g-banner p { margin: 0; color: var(--muted); }
.g-banner.good h2 { color: var(--real); } .g-banner.bad h2 { color: var(--cap); }
.g-card { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 18px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); width: 100%; }
.g-card b { font-family: var(--font-display); font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1.1; overflow-wrap: anywhere; }
.g-card small { color: var(--muted); font-size: .8rem; }
.g-card em { font-style: normal; font-weight: 700; font-size: .85rem; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 99px; }
.g-card p { margin: 0; color: var(--muted); }
.g-card p b { font-size: 1.05rem; color: var(--fg); }
.g-card img { max-width: 220px; max-height: 180px; border-radius: 12px; object-fit: cover; }
.g-card.closed { border-style: dashed; padding: 30px 18px; }
.g-card.closed b { font-size: 1.2rem; }
.g-card.closed svg { color: var(--accent-hi); }
.g-card.crew { background: linear-gradient(150deg, var(--real-dim), transparent 75%), var(--surface); border-color: rgba(0, 210, 106, .35); }
.g-card.imposter { background: linear-gradient(150deg, var(--cap-dim), transparent 75%), var(--surface); border-color: rgba(255, 90, 95, .4); }
.g-card.imposter svg { color: var(--cap); }
.g-card.imposter b { font-size: 1.6rem; }
.g-card.host { background: linear-gradient(150deg, var(--amber-dim), transparent 75%), var(--surface); border-color: rgba(245, 184, 61, .35); }
.g-card.watch svg { color: var(--muted); }
.g-sent { justify-items: center; text-align: center; }
.g-sent svg { color: var(--real); }
.g-sent p { margin: 0; }
.g-answers { display: grid; gap: 10px; }
@media (min-width: 900px) { .g-host .g-answers { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.g-aq h3 { margin: 0; font-size: 1rem; }
.g-aq ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.g-aq li { display: grid; grid-template-columns: minmax(70px, 34%) 1fr; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.g-aq li.you { box-shadow: 0 0 0 1px var(--accent) inset; }
.g-who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-said { color: var(--fg); overflow-wrap: anywhere; }
.g-vote { display: grid; gap: 8px; }
.g-vote-btn { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--surface); color: var(--fg); text-align: left; }
.g-vote-btn .g-said { grid-column: 1; color: var(--muted); font-size: .88rem; }
.g-vote-btn svg { grid-row: 1 / span 2; grid-column: 2; color: var(--cap); }
.g-vote-btn.on { border-color: var(--cap); background: linear-gradient(150deg, var(--cap-dim), transparent 75%), var(--surface); }
.g-reveal { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 16px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); }
.g-reveal.good { background: linear-gradient(150deg, var(--real-dim), transparent 75%), var(--surface); border-color: rgba(0, 210, 106, .35); }
.g-reveal.bad { background: linear-gradient(150deg, var(--cap-dim), transparent 75%), var(--surface); border-color: rgba(255, 90, 95, .35); }
.g-reveal small { color: var(--muted); }
.g-reveal b { font-family: var(--font-display); font-size: 1.8rem; }
.g-reveal p { margin: 0; color: var(--muted); }
.g-reveal p b { font-size: 1rem; color: var(--fg); }
.g-reveal h2 { margin: 6px 0 0; font-size: 1.2rem; }
.g-pts { font-weight: 800; color: var(--accent-hi) !important; }
.g-tally { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.g-tally li { display: flex; gap: 10px; }
.g-board h3 { margin: 0; }
.g-board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.g-board li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.g-board li.you { box-shadow: 0 0 0 2px var(--accent) inset; }
.g-rank { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; font-size: .82rem; }
.g-board li.r1 .g-rank { background: #F5B83D; color: #1A1300; }
.g-board li.r2 .g-rank { background: #C9CEDD; color: #12141E; }
.g-board li.r3 .g-rank { background: #D08A55; color: #1B0E05; }
.g-bar-row .grow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.g-final { display: grid; justify-items: center; text-align: center; gap: 6px; }
.g-final .big { color: var(--amber); }
.g-final h2 { margin: 0; font-family: var(--font-display); font-size: 1.8rem; }
.g-final p { margin: 0; color: var(--muted); }
.g-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; }
.g-step { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px 14px 6px 6px; background: var(--surface-2); text-align: center; min-width: 0; }
.g-step b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-step.s1 { order: 2; min-height: 150px; background: linear-gradient(180deg, rgba(245, 184, 61, .3), var(--surface-2)); }
.g-step.s2 { order: 1; min-height: 118px; }
.g-step.s3 { order: 3; min-height: 96px; }
.g-medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-3); }
.g-step.s1 .g-medal { background: #F5B83D; color: #1A1300; }
.g-cats { padding: 0; }
/* big screen: the host's laptop on a projector */
@media (min-width: 1000px) {
  .g-host main.g-screen, main.g-screen.g-host { max-width: 1100px; }
  main.g-screen.g-host .g-answer-grid { grid-template-columns: 1fr 1fr; }
  main.g-screen.g-host .g-ans { min-height: 110px; font-size: 1.35rem; }
  main.g-screen.g-host .g-name-tag { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .g-name-tag { animation: none; } }
.g-me-name { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }

/* iPhone: the bars' colour carries on past the screen edges, so no strip of page background shows above the header
   (status bar) or below the menu bar (home indicator), even when iOS places fixed bars a little off the edge */
.topbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 200px; background: var(--bar-bg-solid); pointer-events: none; }
.tabbar::after, .guest-bar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 200px; background: var(--bar-bg-solid); pointer-events: none; }
@media (min-width: 1000px) { #app.with-nav .tabbar::after { display: none; } }

/* Smooth scrolling on phones
   - the blurred see-through bars are redrawn on every scroll frame, which drops frames on long feeds:
     on touch screens the bars are solid instead (the colour is almost the same)
   - posts and list rows far off screen are skipped until they come near, so long feeds stay light
   - flicks keep their momentum inside sheets and side-scrolling rows, and don't drag the page behind */
@media (hover: none) and (pointer: coarse) {
  .topbar, .tabbar, .guest-bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar { background: linear-gradient(var(--bar-bg), var(--bar-bg)), var(--bg); }
  .tabbar, .guest-bar { background: linear-gradient(var(--bar-bg-solid), var(--bar-bg-solid)), var(--bg); }
}
main.screen article.post { content-visibility: auto; contain-intrinsic-block-size: auto 420px; }
.sheet, .chips, .type-chips, .topic-chips, .badge-strip, .ss-apps, .table-scroll { -webkit-overflow-scrolling: touch; }
.chips, .type-chips, .topic-chips, .badge-strip, .ss-apps { overscroll-behavior-x: contain; }

/* a slim, quiet page scroll bar on computers (phones use their own overlay bar, hidden in the apps) */
html { scrollbar-width: thin; scrollbar-color: var(--line-2, rgba(128,128,128,.4)) transparent; }
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-thumb { background: var(--line-2, rgba(128,128,128,.4)); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
html::-webkit-scrollbar-track { background: transparent; }
