:root {
  --bg: #0b0b0c;
  --s1: #121214;
  --s2: #18181b;
  --s3: #222226;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #ededef;
  --muted: #8e8e96;
  --faint: #5c5c63;
  --red: #e5484d;
  --red-soft: rgba(229, 72, 77, .14);
  --gold: #d6b370;
  --gold-soft: rgba(214, 179, 112, .14);
  --green: #46a758;
  --green-soft: rgba(70, 167, 88, .14);
  --blue: #5b9bd5;
  --r: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
  font-feature-settings: 'cv11', 'ss01';
}
button, input { font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Ambient light: cold at night, warm by day. Very subtle. */
.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; transition: opacity 1.2s;
  background: radial-gradient(900px 500px at 50% -10%, rgba(91, 120, 213, .10), transparent 70%); }
body.day .glow { background: radial-gradient(900px 500px at 50% -10%, rgba(214, 179, 112, .09), transparent 70%); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--s2); cursor: pointer;
  font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s, opacity .15s, transform .1s; white-space: nowrap;
}
.btn:hover { background: var(--s3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--text); color: #0b0b0c; border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn.danger { background: var(--red); border-color: transparent; color: #fff; }
.btn.danger:hover { background: #ec5d61; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--s2); color: var(--text); }
.btn.outline { background: transparent; }
.btn.on { background: var(--text); color: var(--bg); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 36px; height: 36px; padding: 0; }
.btn.block { width: 100%; height: 46px; font-size: 15px; }
.btn.link { background: none; border: 0; color: var(--muted); height: auto; padding: 8px; font-weight: 500; width: 100%; }
.btn.link:hover { color: var(--text); }
.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--s1); outline: none; transition: border-color .15s;
}
.input:focus { border-color: rgba(255,255,255,.35); }
.input::placeholder { color: var(--faint); }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 18px 0 8px; }
.err { color: var(--red); min-height: 1.5em; margin: 10px 0 0; font-weight: 500; text-align: center; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- home ---------- */
.screen { min-height: 100vh; min-height: 100dvh; }
.home { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; max-width: 1080px; margin: 0 auto; padding: 48px 32px; }
.hero h1 { font-size: 72px; line-height: 1; letter-spacing: -.045em; font-weight: 700; margin: 40px 0 16px; }
.lead { color: var(--muted); font-size: 17px; max-width: 440px; margin: 0; }
.fan { position: relative; height: 300px; width: 380px; }
.fan img { position: absolute; top: 0; width: 180px; aspect-ratio: 2/3; object-fit: cover; border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,.6), 0 0 0 1px var(--line-2); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.fan img:nth-child(1) { left: 0; transform: rotate(-9deg) translateY(18px); }
.fan img:nth-child(2) { left: 100px; z-index: 2; transform: translateY(-4px); }
.fan img:nth-child(3) { left: 200px; transform: rotate(9deg) translateY(18px); }
.fan:hover img:nth-child(1) { transform: rotate(-13deg) translate(-16px, 22px); }
.fan:hover img:nth-child(3) { transform: rotate(13deg) translate(16px, 22px); }
.entry { background: var(--s1); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.entry .label:first-of-type { margin-top: 0; }
.invite { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 20px; border-radius: 10px; background: var(--red-soft); color: #f6b3b5; font-weight: 500; }
.invite b { color: var(--text); letter-spacing: .08em; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(229,72,77,.6); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
.avatar-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 22px; }
.avatar-pick button { padding: 0; border: 0; background: var(--s2); border-radius: 50%; aspect-ratio: 1; overflow: hidden; cursor: pointer;
  outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, opacity .15s, transform .15s; opacity: .55; }
.avatar-pick button:hover { opacity: 1; transform: translateY(-1px); }
.avatar-pick button.on { outline-color: var(--text); opacity: 1; }
.avatar-pick img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick.big { grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.steps { margin: 18px 0 0; padding: 18px 0 0 18px; border-top: 1px solid var(--line); color: var(--muted); display: grid; gap: 6px; }
.steps b { color: var(--text); font-weight: 600; }

/* ---------- room ---------- */
.room { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 60px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.wordmark { font-weight: 700; font-size: 17px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.code { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 8px; border-radius: 6px; background: var(--s2); letter-spacing: .08em; }
.phase-pill { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--s2); border: 1px solid var(--line); font-weight: 600; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.timer:empty { display: none; }
.timer.hurry { color: var(--red); }
.top-actions { display: flex; justify-content: flex-end; gap: 4px; }
.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.stage { overflow-y: auto; padding: 28px 32px 40px; }
.stage > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.stage-head { margin-bottom: 22px; }
.stage-head h2 { font-size: 28px; letter-spacing: -.03em; margin: 0; font-weight: 700; }
.stage-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; min-height: 1.5em; }
.side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: rgba(255,255,255,.012); }

/* ---------- seats ---------- */
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 14px; }
.seat { position: relative; cursor: default; user-select: none; animation: in .3s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.portrait { position: relative; aspect-ratio: 4/5; border-radius: var(--r); overflow: hidden; background: var(--s2);
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s, transform .2s, filter .3s, opacity .3s; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
[hidden] { display: none !important; }
.portrait .ov { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.portrait .ov .kick { pointer-events: auto; }
.portrait .letter { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; font-weight: 700; color: var(--faint); }
.portrait::after { content: ''; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); pointer-events: none; }
.seat-name { margin-top: 8px; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.seat-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-name .ic { width: 13px; height: 13px; color: var(--gold); }
.seat-sub { font-size: 12px; color: var(--muted); min-height: 18px; }
.seat-sub .mafia { color: var(--red); }
.seat-sub .town { color: var(--text); }
.chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; background: rgba(11,11,12,.82); backdrop-filter: blur(6px); color: var(--text); }
.chip .ic { width: 12px; height: 12px; }
.chip.tl { top: 8px; left: 8px; }
.chip.tr { top: 8px; right: 8px; }
.chip.bl { bottom: 8px; left: 8px; }
.chip.red { background: var(--red); color: #fff; }
.chip.green { background: var(--green); color: #fff; }
.chip.gold { background: var(--gold); color: #1a1408; }
.chip.count { min-width: 26px; justify-content: center; font-size: 12px; }
.votes { position: absolute; bottom: 8px; right: 8px; z-index: 2; display: flex; }
.votes img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); animation: in .2s ease; }
.seat.target { cursor: pointer; }
.seat.target:hover .portrait { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 14px 30px rgba(0,0,0,.5); }
.seat.chosen .portrait { box-shadow: 0 0 0 2px var(--red), 0 14px 30px rgba(229,72,77,.2); transform: translateY(-3px); }
.seat.speaking .portrait { box-shadow: 0 0 0 2px var(--gold), 0 0 40px rgba(214,179,112,.25); }
.seat.me .seat-name span::after { content: ' · ты'; color: var(--faint); font-weight: 500; }
.seat.dead .portrait { filter: grayscale(1) brightness(.4); }
.seat.dead .seat-name { color: var(--faint); }
.seat.dim .portrait { opacity: .35; }
.seat.offline .portrait { opacity: .5; }
.kick { position: absolute; top: 6px; right: 6px; z-index: 3; width: 26px; height: 26px; border-radius: 8px; border: 0; display: grid; place-items: center;
  background: rgba(11,11,12,.75); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.seat:hover .kick { opacity: 1; }
.kick:hover { color: var(--red); }
.seat.me.lobby .portrait { cursor: pointer; }
.seat.me.lobby .portrait::before { content: 'Сменить'; position: absolute; inset: auto 0 10px; text-align: center; z-index: 2; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .15s; }
.seat.me.lobby:hover .portrait::before { opacity: 1; }

/* ---------- action bar (controls for the current moment) ---------- */
.actionbar { margin-bottom: 24px; padding: 4px 18px 16px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.actionbar:empty { display: none; }
.actionbar > .row:first-child, .actionbar > .hint:first-child { margin-top: 12px; }
.actionbar .speech { background: none; border: 0; padding: 12px 0 0; }
.actionbar .queue { margin-top: 10px; }
.actionbar .sleep { padding-top: 12px; }
.hint { color: var(--muted); margin: 10px 0 0; }
.hint b { color: var(--text); font-weight: 600; }
.push { margin-left: auto; }
.btn.wide { min-width: 200px; }
.seat.win .portrait { box-shadow: 0 0 0 2px var(--gold), 0 0 30px rgba(214,179,112,.2); }

/* ---------- segmented control ---------- */
.seg-opt { flex-wrap: wrap; padding: 8px 0; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--s2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; font-size: 12px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); }

/* ---------- action panel ---------- */
.panel { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.panel:empty { display: none; }
.panel h3 { font-size: 16px; margin: 0 0 4px; letter-spacing: -.01em; }
.panel p { margin: 4px 0; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 40px; }
.group-title { font-size: 12px; font-weight: 600; color: var(--muted); margin: 24px 0 6px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.opt label { flex: 1; font-weight: 500; cursor: pointer; }
.opt small { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.stepper button { width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; }
.stepper button:hover { background: var(--s2); color: var(--text); }
.stepper button:disabled { opacity: .3; cursor: default; background: none; }
.stepper span { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--s3); transition: .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + i { background: var(--text); }
.switch input:checked + i::after { transform: translateX(16px); background: var(--bg); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + i { opacity: .35; }
.deck { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.deck .card { position: relative; width: 74px; }
.deck .card img { width: 74px; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-2); }
.deck .card span { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.3; }
.deck .card b { position: absolute; top: 5px; right: 5px; font-size: 11px; background: rgba(11,11,12,.85); padding: 1px 6px; border-radius: 5px; }
.invite-row { display: flex; gap: 8px; margin-top: 12px; max-width: 520px; }
.invite-row .input { font-size: 13px; color: var(--muted); }
.speech { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); }
.speech img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.speech .who { flex: 1; min-width: 0; }
.speech .who b { display: block; font-size: 15px; }
.speech .who span { color: var(--muted); font-size: 13px; }
.bar { height: 3px; border-radius: 2px; background: var(--s3); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--gold); transition: width .25s linear; }
.queue { display: flex; gap: 6px; align-items: center; margin-top: 12px; flex-wrap: wrap; color: var(--faint); font-size: 12px; }
.queue img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; opacity: .7; }
.act { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.act:last-of-type { border-bottom: 0; }
.act .q { flex: 1; min-width: 180px; font-weight: 600; }
.act .q small { display: block; font-weight: 400; color: var(--muted); }
.act.current .q::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: middle; }
.sleep { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.sleep .ic { width: 22px; height: 22px; color: var(--blue); }

/* ---------- end screen ---------- */
.winner { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.winner h3 { font-size: 24px !important; letter-spacing: -.03em; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 16px; }
.rcard { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.rcard img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.rcard .cap { position: absolute; inset: auto 0 0; padding: 26px 8px 8px; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.rcard .cap b { display: block; font-size: 13px; }
.rcard .cap small { color: rgba(255,255,255,.65); font-size: 11px; }
.rcard.dead img { filter: grayscale(1) brightness(.55); }
.rcard.win { box-shadow: 0 0 0 2px var(--gold); }
.timeline { margin-top: 28px; display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl-when { font-weight: 600; display: flex; align-items: flex-start; gap: 8px; color: var(--muted); }
.tl-when .ic { margin-top: 3px; }
.tl-body { display: grid; gap: 4px; }
.tl-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-line img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.tl-line .r { color: var(--faint); font-size: 12px; }
.tl-line.red b { color: #f2a7a9; }
.tl-line.green b { color: #9fd8a9; }
.tl-line.blue b { color: #a9c9ea; }
.tl-out { font-weight: 600; margin-top: 4px; }
.tl-out.none { color: var(--muted); font-weight: 500; }

/* ---------- sidebar ---------- */
.mycard { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; }
.mini { width: 44px; height: 66px; perspective: 400px; flex: none; }
.mini-inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mini-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; backface-visibility: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.mini-front { transform: rotateY(180deg); }
.mycard.peek .mini-inner { transform: rotateY(180deg); }
.mycard-text span { display: block; color: var(--muted); font-size: 12px; }
.mycard-text b { font-weight: 600; }
.notes { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); max-height: 150px; overflow-y: auto; display: grid; gap: 4px; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 4px; padding: 10px 12px 0; }
.tabs:empty { display: none; }
.tabs button { position: relative; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--s2); color: var(--text); }
.tabs button.on[data-ch=mafia] { background: var(--red-soft); color: #f6b3b5; }
.tabs button.unread::after { content: ''; position: absolute; top: 6px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.chat-log { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 10px; animation: in .2s ease both; }
.msg img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; margin-top: 1px; }
.msg div { min-width: 0; word-wrap: break-word; }
.msg b { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.msg.sys { display: block; color: var(--faint); font-size: 12px; text-align: center; }
.chat-form { display: flex; gap: 6px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form .input { height: 38px; }
.chat-form .input:disabled { opacity: .5; }

/* ---------- sound menu ---------- */
.sound-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 44px; z-index: 40; width: 280px; padding: 4px 16px; border-radius: 14px;
  background: var(--s1); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: in .15s ease both; }
.menu .opt:last-child { border-bottom: 0; }
.menu input[type=range] { width: 110px; accent-color: var(--text); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(6,6,7,.86); backdrop-filter: blur(10px); animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; } }
.reveal, .announce { width: min(340px, 100%); text-align: center; }
.reveal .eyebrow { margin-bottom: 18px; }
.card3d { width: min(260px, 68vw); aspect-ratio: 2/3; margin: 0 auto; perspective: 1200px; cursor: pointer; }
.card3d-inner { position: relative; width: 100%; height: 100%; transition: transform .9s cubic-bezier(.3,1.3,.5,1); transform-style: preserve-3d; }
.card3d.flipped .card3d-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px rgba(0,0,0,.7), 0 0 0 1px var(--line-2); }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face.front { transform: rotateY(180deg); }
.reveal h3 { font-size: 26px; letter-spacing: -.03em; margin: 22px 0 6px; }
.reveal h3.mafia { color: var(--red); }
.reveal p { color: var(--muted); margin: 0 0 22px; min-height: 3em; }
.reveal h3, .reveal p { transition: opacity .5s .5s; }
.card3d:not(.flipped) ~ h3, .card3d:not(.flipped) ~ p { opacity: 0; transition-delay: 0s; }
.announce h2 { font-size: 30px; letter-spacing: -.03em; margin: 10px 0 22px; line-height: 1.15; }
.announce-cards { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.announce-cards .rcard { width: 150px; animation: in .5s .15s ease both; }
.announce p { color: var(--muted); margin-top: 18px; }
.sheet { width: min(420px, 100%); background: var(--s1); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); color: #fff; }
.conn { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--red); color: #fff; padding: 6px 14px; border-radius: 99px; font-weight: 600; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .home { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 40px; max-width: 480px; }
  .hero { text-align: center; }
  .fan { margin: 0 auto; }
  .hero h1 { font-size: 52px; margin: 4px 0 10px; }
  .lead { margin: 0 auto; font-size: 15px; }
  .entry { padding: 20px; }
  .room { height: auto; min-height: 100dvh; }
  .topbar { position: sticky; top: 0; z-index: 10; background: rgba(11,11,12,.92); backdrop-filter: blur(10px); grid-template-columns: 1fr auto; gap: 8px; padding: 0 12px; height: 56px; }
  .wordmark { display: none; }
  .phase-pill { justify-self: start; padding: 0 12px; font-size: 13px; }
  .actionbar { padding: 2px 14px 14px; }
  .actionbar.sticky { position: sticky; top: 64px; z-index: 9; background: rgba(18,18,20,.96); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
  .actionbar .row .btn { flex: 1 1 auto; }
  .actionbar .row .btn.push { flex: 0 0 auto; }
  .btn.wide { min-width: 0; }
  .mycard { position: fixed; left: 12px; bottom: 12px; z-index: 30; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px;
    background: var(--s1); box-shadow: 0 10px 30px rgba(0,0,0,.6); }
  .mycard-text { display: none; }
  .side { padding-bottom: 96px; }
  .fan { transform: none; width: 280px; height: 232px; }
  .fan img { width: 130px; }
  .fan img:nth-child(2) { left: 75px; }
  .fan img:nth-child(3) { left: 150px; }
  .code, #btn-copy span { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .stage { overflow: visible; padding: 20px 16px 28px; }
  .stage-head h2 { font-size: 22px; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .chat { min-height: 380px; max-height: 70vh; }
  .seats { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px 8px; }
  .seat-sub { font-size: 11px; }
  .seat.me .seat-name span::after { content: none; }
  .seat.me .portrait { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
  .seat.me.speaking .portrait, .seat.me.chosen .portrait { box-shadow: 0 0 0 2px var(--gold); }
  .seat-name { font-size: 13px; }
  .chip { height: 19px; padding: 0 5px; font-size: 10px; }
  .chip.tl, .chip.tr { top: 5px; } .chip.tl { left: 5px; } .chip.tr { right: 5px; }
  .kick { opacity: 1; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 400px) {
  .avatar-pick { grid-template-columns: repeat(8, 1fr); gap: 6px; }
  .wordmark { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
