/* Copycat Clash: "arena" theme. Near-black surfaces, one loud lime accent, hot
   orange for the pose to copy and cyan for what the player actually did. */

:root {
  --bg: #090a0d;
  --surface: #12141a;
  --surface-2: #1a1d26;
  --line: #2a2f3c;
  --text: #f3f5f8;
  --muted: #8a92a3;
  --lime: #c8ff2e;
  --lime-ink: #0d1200;
  --hot: #ff4d2e; /* target pose, originals, urgency */
  --cyan: #2ee6ff; /* the player's own pose, AI */
  --gold: #ffc62e; /* stars, player votes */
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --cut: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100dvh;
  background:
    linear-gradient(#ffffff06 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, #ffffff06 1px, transparent 1px) 0 0 / 44px 100%,
    radial-gradient(700px 420px at 0% 0%, #c8ff2e14, transparent 70%),
    radial-gradient(700px 420px at 100% 0%, #ff4d2e12, transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 500 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); }
h3 {
  font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 24px 0 10px; display: flex; align-items: center; gap: 10px;
}
h3::before { content: ""; width: 14px; height: 3px; background: var(--lime); flex: none; }
h3.center { justify-content: center; }
button, input { font: inherit; color: inherit; }
img, canvas, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hint { color: var(--muted); font-size: .86rem; margin-top: 8px; }
.label { font-family: var(--display); font-weight: 700; color: var(--muted); font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; }
.link { color: var(--muted); text-align: center; font-size: .9rem; }
.link:hover { color: var(--lime); }

/* ---------------------------------------------------------------- layout */

.frame { max-width: 1120px; margin: 0 auto; padding: 16px 16px 64px; display: flex; flex-direction: column; gap: 18px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.logo { font-family: var(--display); font-weight: 800; font-style: italic; font-size: 1.7rem; letter-spacing: .02em; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 6px; line-height: 1; }
.logo span { background: var(--lime); color: var(--lime-ink); padding: 2px 9px 3px 6px; transform: skewX(-8deg); display: inline-block; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; color: var(--muted); border: 1px solid var(--line); background: var(--surface); padding: 4px 12px; }
.chip b { color: var(--lime); font-weight: 800; letter-spacing: .2em; }

.panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 22px; }
.panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 28px; height: 3px; background: var(--lime); }
.panel > h3:first-child { margin-top: 0; }

.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid.capture { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.lobby { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; grid-template-areas: "room settings" "camera settings"; align-items: start; }
.lobby-room { grid-area: room; }
.lobby-settings { grid-area: settings; }
.lobby-camera { grid-area: camera; }
/* Guests: camera check up front, settings as a locked summary. */
.lobby.guest { grid-template-areas: "room camera" "settings camera"; }

.locked-note { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px dashed var(--line); background: repeating-linear-gradient(-45deg, transparent, transparent 10px, #ffffff05 10px, #ffffff05 20px); }
.lock-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); }
.locked-note b { display: block; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.locked-note span { color: var(--muted); font-size: .88rem; }
.summary { margin: 14px 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); padding: 10px 14px; }
.summary dt { color: var(--muted); font-weight: 600; }
.summary dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lime); }
.summary-row.off dd { color: var(--muted); }

.offline-banner {
  display: none; position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20;
  background: var(--hot); color: #1a0500; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 10px 20px;
}
body.offline .offline-banner { display: block; }

/* --------------------------------------------------------------- controls */

.btn {
  appearance: none; border: 0; cursor: pointer; position: relative;
  font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: 1.1rem; line-height: 1;
  background: var(--lime); color: var(--lime-ink);
  padding: 13px 22px; clip-path: var(--cut);
  transition: transform .08s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); filter: brightness(.92); }
.btn:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; transform: none; filter: none; }
.btn.big { font-size: 1.5rem; padding: 17px 26px; width: 100%; }
.btn.small { font-size: .95rem; padding: 8px 14px; clip-path: none; border-radius: 2px; }
.btn.ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--lime); color: var(--lime); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--cyan); }

.input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 2px; padding: 14px 16px; font-size: 1.05rem; font-weight: 600; }
.input::placeholder { color: #5b6272; }
.input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px #c8ff2e22; }
.code-input { font-family: var(--display); font-size: 1.4rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4em; text-align: center; padding: 9px 12px; }

.segmented { display: flex; background: var(--bg); border: 1px solid var(--line); padding: 4px; gap: 4px; }
.segmented button {
  flex: 1; border: 0; background: transparent; padding: 10px 6px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.segmented button:not(:disabled):hover { color: var(--text); }
.segmented button.on { background: var(--lime); color: var(--lime-ink); }
.segmented button:disabled { cursor: default; }

.toggle { display: flex; align-items: center; gap: 14px; padding: 9px 0; cursor: pointer; }
.toggle.disabled { cursor: default; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; width: 46px; height: 24px; background: var(--bg); border: 1px solid var(--line); position: relative; transition: background .15s, border-color .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: var(--muted); transition: transform .15s, background .15s; }
.toggle input:checked + .switch { background: #c8ff2e22; border-color: var(--lime); }
.toggle input:checked + .switch::after { transform: translateX(22px); background: var(--lime); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--cyan); outline-offset: 2px; }
.toggle.disabled .switch { opacity: .6; }
.toggle-text { display: flex; flex-direction: column; font-weight: 600; }
.toggle-text small { color: var(--muted); font-size: .82rem; font-weight: 500; }

/* ------------------------------------------------------------------- home */

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); column-gap: 40px; row-gap: 22px; align-items: start; padding-top: 5vh; }
.hero > * { grid-column: 1; }
.hero h1 { font-size: clamp(2.8rem, 7.4vw, 5.4rem); line-height: .9; }
.hero h1 em { color: var(--lime); font-style: inherit; }
.lead { color: var(--muted); max-width: 500px; font-size: 1.1rem; }
.home-panel { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.or { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.join-row { display: flex; gap: 10px; }
.join-row .btn { flex: none; }
.how { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 12px; max-width: 500px; color: var(--muted); }
.how li { display: flex; gap: 14px; align-items: center; }
.how b { flex: none; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.6rem; color: var(--lime); width: 1.4em; }

.hero-art { grid-column: 2; grid-row: 1 / span 4; position: relative; align-self: center; border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--surface)); padding: 18px; }
.hero-art::before { content: ""; position: absolute; top: -1px; right: -1px; width: 60px; height: 3px; background: var(--hot); }
.hero-art svg { width: 100%; height: auto; display: block; }
.hero-art .fig { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.hero-art .fig.target { stroke: var(--hot); }
.hero-art .fig.self { stroke: var(--cyan); animation: sway 3.2s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes sway { from { transform: rotate(-3deg) translateX(-3px); } to { transform: rotate(2deg) translateX(4px); } }
.match-tag { position: absolute; right: 18px; bottom: 18px; background: var(--lime); color: var(--lime-ink); font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.9rem; line-height: 1; padding: 8px 14px; transform: skewX(-8deg); }
.match-tag small { display: block; font-size: .8rem; letter-spacing: .16em; font-style: normal; }
.art-key { position: absolute; left: 18px; bottom: 16px; display: grid; gap: 4px; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); }

/* ------------------------------------------------------------------ lobby */

.room-code { font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(3.6rem, 12vw, 6rem); letter-spacing: .12em; color: var(--lime); line-height: .95; margin: 2px 0 14px; }
.players { display: flex; flex-wrap: wrap; gap: 8px; }
.player { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); padding: 5px 14px 5px 5px; font-weight: 600; }
.player.away, .status-chip.away, .scoreboard li.away { opacity: .4; }
.avatar { width: 30px; height: 30px; background: var(--text); color: var(--bg); font-family: var(--display); font-weight: 800; font-size: 1.15rem; display: grid; place-items: center; }
.tag { background: var(--lime); color: var(--lime-ink); font-family: var(--display); font-size: .78rem; font-weight: 800; letter-spacing: .1em; padding: 1px 7px; text-transform: uppercase; }
.start-area { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }

/* ----------------------------------------------------------- camera stage */

.stage-slot { position: relative; }
.stage-slot.small { max-width: 360px; }
.stage { position: relative; background: #000; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 4 / 3; }
/* Viewfinder corners */
.stage::before, .stage::after { content: ""; position: absolute; width: 22px; height: 22px; z-index: 2; pointer-events: none; }
.stage::before { top: 8px; left: 8px; border-top: 3px solid var(--lime); border-left: 3px solid var(--lime); }
.stage::after { bottom: 8px; right: 8px; border-bottom: 3px solid var(--lime); border-right: 3px solid var(--lime); }
.stage video { width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); }
.stage-overlay, .stage-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage-still { background: #000; }
.stage-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); background: var(--bg); }
.stage-retry { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; }
.stage-retry:hover { transform: translateX(-50%); }
.stage-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(7rem, 30vw, 15rem); color: var(--lime); text-shadow: 0 6px 0 #000, 0 0 60px #c8ff2e88; }
.stage-count.pop { animation: pop 1s ease-out; }
@keyframes pop { 0% { transform: scale(1.7); opacity: 0; } 20% { opacity: 1; } 100% { transform: scale(.8); opacity: .25; } }
.stage-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.stage-flash.go { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }

/* ---------------------------------------------------------------- capture */

.timer { display: flex; align-items: center; gap: 14px; }
.timer-track { flex: 1; height: 10px; background: var(--surface-2); overflow: hidden; transform: skewX(-20deg); }
.timer-fill { height: 100%; background: var(--lime); transition: width .2s linear; }
.timer-label { min-width: 3ch; text-align: right; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.timer.urgent .timer-fill { background: var(--hot); }
.timer.urgent .timer-label { color: var(--hot); }

.ref h2 { margin-bottom: 14px; font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.ref-media { border: 2px solid var(--hot); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.ref-media img, .ref-media canvas { width: 100%; height: 100%; object-fit: contain; }
.ref-hidden { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 14px, var(--surface-2) 14px, var(--surface-2) 28px); font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .1em; }
.ref-hidden span { font-style: italic; font-weight: 800; font-size: 5rem; line-height: 1; color: var(--hot); }
.prompt-card { background: var(--lime); color: var(--lime-ink); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%); }
.prompt-card .label { color: #3d5200; }
.prompt-text { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: .95; }
.prompt-card .btn.ghost { background: #0d120018; color: var(--lime-ink); box-shadow: inset 0 0 0 1px #0d120055; }
.prompt-card .btn.ghost:hover { background: var(--lime-ink); color: var(--lime); }

.shoot { display: flex; flex-direction: column; gap: 12px; }
.capture-status { text-align: center; font-weight: 600; min-height: 1.5em; }
.controls { display: flex; gap: 10px; }
.ready-options summary { cursor: pointer; color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- waiting */

.waiting { display: flex; flex-direction: column; gap: 12px; padding: 40px 20px; }
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.status-chip { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 14px; color: var(--muted); }
.status-chip.done { border-color: var(--lime); color: var(--lime); }
.status-chip.posing { border-color: var(--hot); color: var(--text); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { box-shadow: 0 0 0 4px #ff4d2e33; } }

/* ------------------------------------------------------------------ cards */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.card.original { border-color: var(--hot); }
.card-media { position: relative; background: #000; aspect-ratio: 4 / 3; }
.card-media img, .card-media canvas { width: 100%; height: 100%; object-fit: contain; }
.overlay-canvas { cursor: pointer; }
.badge { position: absolute; top: 0; left: 0; background: #000c; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; padding: 4px 12px; }
.card.original .badge { background: var(--hot); color: #1a0500; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.card-name { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.5rem; line-height: 1; }

.stars { display: flex; gap: 2px; }
.stars button { background: none; border: 0; cursor: pointer; font-size: 2rem; line-height: 1; padding: 2px 3px; color: #343a48; transition: transform .08s, color .1s; }
.stars button.on { color: var(--gold); }
.stars button:not(:disabled):hover { transform: scale(1.2); }
.stars button:disabled { cursor: default; }

/* Score breakdown: where each point came from */
.breakdown { display: flex; flex-direction: column; gap: 12px; }
.bd-head { display: flex; align-items: baseline; gap: 8px; }
.bd-label { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .92rem; }
.bd-detail { color: var(--muted); font-size: .85rem; font-weight: 600; }
.bd-pts { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1; white-space: nowrap; }
.bd-pts small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.bd-bar { margin-top: 6px; height: 8px; background: var(--surface-2); overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: currentColor; transform-origin: left; animation: fill .9s cubic-bezier(.2, .8, .2, 1) both .15s; }
@keyframes fill { from { transform: scaleX(0); } }
.bd-row.ai .bd-label, .bd-row.ai .bd-bar { color: var(--cyan); }
.bd-row.crowd .bd-label, .bd-row.crowd .bd-bar { color: var(--gold); }
.bd-row.hot .bd-label, .bd-row.hot .bd-bar { color: var(--hot); }
.bd-row.na { opacity: .55; }
.bd-total { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.bd-total b { font-style: italic; font-weight: 800; font-size: 2rem; line-height: 1; letter-spacing: 0; color: var(--lime-ink); background: var(--lime); padding: 2px 12px 3px; transform: skewX(-8deg); }

.rule { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; color: var(--muted); font-size: .92rem; }
.rule b { font-weight: 700; }
.rule .ai { color: var(--cyan); }
.rule .crowd { color: var(--gold); }
.legend { color: var(--muted); font-size: .9rem; }
.dot { display: inline-block; width: 18px; height: 4px; margin: 0 8px 0 16px; vertical-align: middle; }
.dot.target { background: var(--hot); margin-left: 0; }
.dot.self { background: var(--cyan); }

.scoreboard { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.scoreboard li { display: flex; align-items: center; gap: 14px; background: var(--surface-2); border-left: 3px solid var(--line); padding: 8px 16px; }
.scoreboard li:first-child { border-left-color: var(--lime); background: linear-gradient(90deg, #c8ff2e1c, var(--surface-2) 60%); }
.scoreboard li.me .who { color: var(--cyan); }
.rank { width: 1.3em; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--muted); }
.scoreboard li:first-child .rank { color: var(--lime); }
.who { flex: 1; font-weight: 700; }
.delta { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--lime); }
.score { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }

/* ------------------------------------------------------------------ final */

.winner { text-align: center; padding: 26px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.winner-tag { background: var(--lime); color: var(--lime-ink); font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .2em; padding: 4px 16px; transform: skewX(-8deg); }
.winner h1 { font-size: clamp(3rem, 11vw, 6.5rem); line-height: .9; text-shadow: 4px 4px 0 var(--hot); }
.recap canvas { width: 100%; height: auto; border: 1px solid var(--line); }
.share-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ----------------------------------------------------------------- toasts */

#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 30; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--bg); font-weight: 700; padding: 10px 18px; border-left: 4px solid var(--lime); box-shadow: 0 10px 30px #000a; animation: drop .25s ease-out; transition: opacity .4s; }
.toast.bad { border-left-color: var(--hot); }
.toast.out { opacity: 0; }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }

/* ------------------------------------------------------------- small screens */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 2vh; }
  .hero-art { display: none; }
}

@media (max-width: 760px) {
  .grid.two, .grid.capture { grid-template-columns: 1fr; }
  .lobby { grid-template-columns: 1fr; grid-template-areas: "room" "settings" "camera"; }
  .lobby.guest { grid-template-areas: "room" "camera" "settings"; }
  .panel { padding: 16px; }
  .logo { font-size: 1.3rem; }
  .chip { font-size: .78rem; padding: 3px 8px; }
  /* Keep the pose to copy and your own camera on one phone screen. */
  .capture .panel { padding: 12px; }
  .capture .ref h2 { font-size: 1.35rem; margin-bottom: 8px; }
  .capture .ref-media { max-height: 27dvh; width: 100%; }
  .capture .stage { max-height: 36dvh; width: 100%; }
  .capture .prompt-card + .hint { display: none; }
  /* Voting: two photos per row. The reveal keeps one per row so the score
     breakdown stays readable. */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards.reveal { grid-template-columns: 1fr; }
  .card-body { padding: 10px 12px 12px; }
  .card-name { font-size: 1.25rem; }
  .stars button { font-size: 1.45rem; padding: 2px 1px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
