:root {
  --bg: #0B0B0D; --surface: #141417; --ink: #F5F5F3; --muted: #9A9AA3; --line: #26262B;
  --accent: #FF6B1A; --on-accent: #120800; --ok: #22C55E; --danger: #F87171;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif; --body: "Barlow", system-ui, sans-serif;
  --gutter: 20px; --max: 1040px; --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--body); }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.nav { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.logo { font: 800 26px/1 var(--display); letter-spacing: .02em; text-decoration: none; text-transform: uppercase; }
.logo span { color: var(--accent); }
.day { font-size: 14px; color: var(--muted); }
.day b { color: var(--ink); }

.hero { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
h1 { margin: 0 0 14px; font: 800 clamp(44px, 9vw, 84px)/0.95 var(--display); text-transform: uppercase; letter-spacing: .005em; max-width: 12ch; }
.lead { margin: 0 0 24px; color: #D4D4D8; max-width: 52ch; }
.join-form, .idea-form { max-width: 560px; }
.field { display: flex; gap: 8px; }
.field input, .idea-form input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; outline: none; }
.field input:focus, .idea-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,26,.25); }
.btn { height: 52px; padding: 0 20px; border: 0; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font: 600 17px var(--body); cursor: pointer; white-space: nowrap; transition: transform .15s ease-out, filter .15s; touch-action: manipulation; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: progress; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.consent a { color: #C9C9D0; }
.error { margin: 8px 0 0; min-height: 1.2em; font-size: 14px; color: var(--danger); }
.count { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.count b { color: var(--ink); font-size: 18px; }
.joined { padding: 18px; border: 1px solid rgba(34,197,94,.4); border-radius: var(--r); background: rgba(34,197,94,.08); }
.joined b { display: block; color: var(--ok); font-size: 18px; margin-bottom: 4px; }

.frame { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fallback { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; }
.fallback.show { display: flex; }
.fallback span { font: 800 clamp(28px, 5vw, 44px)/1 var(--display); text-transform: uppercase; }
.fallback small { color: var(--muted); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }

@media (min-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; padding-top: 56px; gap: 48px; }
}

.vote { max-width: var(--max); margin: 0 auto; padding: 72px var(--gutter) 0; }
h2 { margin: 0 0 6px; font: 800 clamp(30px, 5vw, 44px)/1 var(--display); text-transform: uppercase; }
.sub { margin: 0 0 20px; color: var(--muted); }
.idea-form { display: flex; gap: 8px; margin-bottom: 20px; }
.board { list-style: none; margin: 0; padding: 0; max-width: 720px; display: grid; gap: 8px; }
.board li { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.board li.lead { border-color: var(--accent); }
.board li.empty { display: block; margin: 0; }
.board li.lead .rk { color: var(--accent); }
.board .rk { font: 700 16px var(--display); color: var(--muted); }
.board .tx { font-size: 16px; }
.board .tx.done { color: var(--ok); }
.board .tx.done::after { content: " · filmed"; color: var(--muted); font-size: 13px; }
.vote-btn { min-width: 64px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 15px var(--body); cursor: pointer; font-variant-numeric: tabular-nums; transition: transform .15s ease-out, background .15s, border-color .15s; touch-action: manipulation; }
.vote-btn:active { transform: scale(.96); }
.vote-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.meta, .empty { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.foot { max-width: var(--max); margin: 64px auto 0; padding: 20px var(--gutter) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 12px); opacity: 0; z-index: 20; padding: 12px 16px; border-radius: 10px; background: #1E1E23; border: 1px solid var(--line); font-size: 15px; max-width: calc(100% - 40px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--danger); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .001s !important; } }
