:root {
  color-scheme: light;
  --ink: #23332d;
  --muted: #6d7a72;
  --soil: #7a6046;
  --leaf: #38785d;
  --leaf-dark: #255b44;
  --leaf-light: #e5eee4;
  --cream: #f5f3eb;
  --paper: #fffefa;
  --line: #e4e5d9;
  --shadow: 0 18px 55px rgba(40, 55, 43, .09);
  --radius: 24px;
  --a: #dc5148;
  --b: #ca8b20;
  --c: #33835c;
  --d: #4679b7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--cream); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
.app-shell { width: min(1480px, calc(100% - 56px)); margin: 0 auto; padding: 28px 0 64px; }
.player-shell { width: min(600px, 100%); min-height: 100svh; margin: 0 auto; padding: 18px 18px calc(28px + env(safe-area-inset-bottom)); }
.loading { display: flex; min-height: 80vh; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-weight: 650; }
.loader { width: 22px; height: 22px; border: 3px solid #dce4d9; border-top-color: var(--leaf); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #dbe2d6; border-radius: 15px; color: var(--leaf-dark); background: #e8eee3; font-size: 23px; }
.brand-name { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.brand-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.host-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: #56655e; background: rgba(255,255,255,.62); font-size: 12px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #999; }
.status-chip.good .status-dot { background: #379361; box-shadow: 0 0 0 4px #37936120; }
.status-chip.warn .status-dot { background: #d19a35; box-shadow: 0 0 0 4px #d19a3520; }
.status-chip.bad .status-dot { background: #d05247; box-shadow: 0 0 0 4px #d0524720; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .8fr); gap: 24px; align-items: stretch; }
.welcome-card { padding: clamp(28px, 5vw, 64px); overflow: hidden; position: relative; }
.welcome-card:after { position: absolute; right: -65px; bottom: -90px; width: 300px; height: 300px; border: 1px solid #dce8dc; border-radius: 50%; content: ""; box-shadow: 0 0 0 27px #eef3ea, 0 0 0 54px #f5f6ef; opacity: .75; pointer-events: none; }
.eyebrow { margin: 0 0 13px; color: var(--leaf); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.welcome-title { position: relative; z-index: 1; max-width: 720px; margin: 0; font-size: clamp(38px, 5.5vw, 72px); line-height: .99; letter-spacing: -.055em; }
.welcome-title em { color: var(--leaf); font-style: normal; }
.welcome-copy { position: relative; z-index: 1; max-width: 570px; margin: 20px 0 26px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.feature-pills { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; margin: 24px 0 30px; }
.feature-pill { padding: 9px 12px; border: 1px solid #e3e9df; border-radius: 999px; color: #52645a; background: #f5f8f1; font-size: 12px; font-weight: 720; }
.btn { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 12px 20px; border: 0; border-radius: 14px; color: white; background: var(--leaf); font-weight: 800; text-decoration: none; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; box-shadow: 0 8px 18px #38785d28; }
.btn:hover { transform: translateY(-1px); background: var(--leaf-dark); box-shadow: 0 11px 21px #38785d35; }
.btn.secondary { border: 1px solid var(--line); color: var(--ink); background: white; box-shadow: none; }
.btn.secondary:hover { background: #f7f8f3; }
.btn.danger { background: #ad4b40; box-shadow: none; }
.welcome-side { display: grid; gap: 16px; align-content: stretch; }
.welcome-stat { min-height: 138px; padding: 25px 27px; }
.stat-number { margin: 0; color: var(--leaf); font-size: 42px; font-weight: 850; letter-spacing: -.05em; }
.stat-label { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.welcome-tip { padding: 23px 25px; border: 1px solid #dce8dc; border-radius: var(--radius); color: #466153; background: #ebf1e7; line-height: 1.55; }
.welcome-tip strong { display: block; margin-bottom: 5px; color: var(--leaf-dark); }
.lobby-layout { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(380px, 1.18fr); gap: 20px; align-items: stretch; }
.lobby-code-card { padding: clamp(23px, 3vw, 38px); }
.room-code-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.room-code { margin: 7px 0 10px; color: var(--leaf-dark); font-size: clamp(45px, 6vw, 74px); font-weight: 900; line-height: 1; letter-spacing: .12em; }
.room-instructions { max-width: 400px; margin: 0; color: var(--muted); line-height: 1.5; }
.join-link-row { display: flex; gap: 8px; margin-top: 22px; }
.join-link { min-width: 0; flex: 1; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; color: #58685f; background: #f8f8f2; font-size: 12px; overflow-wrap: anywhere; }
.copy-button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; font-weight: 760; }
.qr-card { display: flex; min-height: 100%; flex-direction: column; align-items: center; justify-content: center; padding: 25px; text-align: center; }
.qr-code { width: 198px; height: 198px; padding: 11px; border: 1px solid #e4e6da; border-radius: 19px; background: white; box-shadow: 0 8px 25px #30482d0e; }
.qr-code svg { display: block; width: 100%; height: 100%; }
.qr-caption { margin: 13px 0 0; color: var(--muted); font-size: 13px; }
.lobby-bottom { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(250px, .7fr); gap: 20px; margin-top: 20px; }
.participant-list-card, .launch-card { padding: 24px 27px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.count-badge { display: inline-grid; min-width: 31px; height: 31px; place-items: center; padding: 0 8px; border-radius: 10px; color: var(--leaf-dark); background: var(--leaf-light); font-weight: 850; }
.participant-chips { display: flex; min-height: 47px; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.participant-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #e7e9df; border-radius: 11px; background: #fbfbf6; font-size: 13px; font-weight: 700; }
.participant-chip .avatar-dot { width: 7px; height: 7px; border-radius: 50%; background: #73a983; }
.empty-list { margin: 4px 0; color: #89938b; font-size: 14px; }
.launch-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; background: #f9faf4; }
.launch-card p { margin: 0 0 15px; color: var(--muted); line-height: 1.5; }
.launch-card .btn { width: 100%; }
.host-stage { display: grid; gap: 16px; }
.stage-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 15px; align-items: center; }
.stage-ident { color: var(--muted); font-size: 13px; font-weight: 760; }
.stage-ident strong { color: var(--ink); }
.timer-group { display: flex; gap: 11px; }
.timer-card { min-width: 140px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); text-align: center; }
.timer-label { display: block; margin-bottom: 1px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.timer-value { display: block; color: var(--ink); font-size: 25px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.timer-card.urgent .timer-value { color: #c4443d; }
.stage-people { justify-self: end; color: var(--muted); font-size: 13px; text-align: right; }
.stage-people strong { display: block; color: var(--ink); font-size: 22px; }
.question-stage-card { padding: clamp(22px, 3vw, 38px); overflow: hidden; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; color: var(--muted); font-size: 13px; font-weight: 770; }
.category-badge { padding: 7px 11px; border-radius: 999px; color: #735d3b; background: #f3eddf; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.question-headline { display: grid; grid-template-columns: 90px 1fr; gap: 20px; align-items: center; margin: 4px 0 24px; }
.question-illustration { display: grid; width: 88px; height: 88px; place-items: center; border-radius: 23px; background: #eff3e8; }
.question-illustration svg { width: 76px; height: 70px; }
.question-title { margin: 0; font-size: clamp(25px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -.035em; }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-option { display: flex; min-height: 92px; align-items: center; gap: 14px; padding: 17px 19px; border: 1px solid transparent; border-radius: 17px; color: white; box-shadow: 0 8px 20px #273c3012; }
.answer-option .letter { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; border: 1px solid #ffffff55; border-radius: 12px; background: #ffffff22; font-size: 18px; font-weight: 900; }
.answer-option .answer-copy { font-size: clamp(15px, 1.55vw, 20px); font-weight: 760; line-height: 1.35; }
.answer-a { background: var(--a); }
.answer-b { background: var(--b); }
.answer-c { background: var(--c); }
.answer-d { background: var(--d); }
.stage-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 19px; color: var(--muted); font-size: 13px; }
.progress-track { height: 8px; flex: 1; overflow: hidden; border-radius: 99px; background: #e7e9df; }
.progress-fill { height: 100%; border-radius: inherit; background: #8cb897; transition: width .25s ease; }
.stage-footer { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(360px, 1.25fr); gap: 16px; }
.response-meter, .live-players { padding: 21px 23px; }
.response-big { margin: 0; color: var(--leaf-dark); font-size: 34px; font-weight: 880; letter-spacing: -.06em; }
.response-copy { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.live-player-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.live-player { padding: 7px 9px; border: 1px solid #e4e7dd; border-radius: 9px; color: #58655e; background: #fafaf6; font-size: 11px; font-weight: 700; }
.live-player.answered { border-color: #d8e9d8; color: #2f6d4a; background: #edf5ea; }
.board-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: 18px; }
.board-card { padding: 28px; }
.board-title { margin: 0; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.04em; }
.board-subtitle { margin: 8px 0 24px; color: var(--muted); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-items: end; }
.podium-person { min-height: 145px; padding: 15px 9px; border: 1px solid #e7e8dc; border-radius: 16px; background: #fafaf4; text-align: center; }
.podium-person.first { min-height: 175px; border-color: #d8d9b5; background: #f5f2dd; }
.podium-medal { display: block; margin-bottom: 8px; font-size: 25px; }
.podium-name { margin: 0; font-size: clamp(12px, 1.2vw, 15px); font-weight: 850; overflow-wrap: anywhere; }
.podium-score { margin: 7px 0 0; color: var(--leaf); font-size: 22px; font-weight: 900; }
.podium-time { color: var(--muted); font-size: 11px; }
.leaderboard-list { display: grid; gap: 6px; max-height: 420px; overflow: auto; padding-right: 4px; }
.leaderboard-row { display: grid; grid-template-columns: 42px 1fr auto auto; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid #e8e9e0; border-radius: 12px; background: #fff; }
.leaderboard-row.top-three { border-color: #dbe8d9; background: #f4f8ef; }
.rank-number { color: var(--soil); font-size: 14px; font-weight: 900; }
.leaderboard-name { font-weight: 780; }
.leaderboard-score { color: var(--leaf-dark); font-weight: 850; }
.leaderboard-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.board-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.final-hero { padding: 30px; border: 1px solid #dbe7d8; border-radius: var(--radius); background: linear-gradient(145deg, #edf3e8, #f9f6e9); }
.final-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.final-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; }
.final-stat-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 22px; }
.final-stat { min-width: 130px; padding: 13px 16px; border: 1px solid #e0e6d8; border-radius: 13px; background: #fffefa; }
.final-stat strong { display: block; color: var(--leaf-dark); font-size: 23px; }
.final-stat span { color: var(--muted); font-size: 12px; }
.correction-section { margin-top: 25px; }
.correction-section h2 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.035em; }
.correction-intro { margin: 0 0 16px; color: var(--muted); line-height: 1.55; }
.hardest-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.hardest-card { padding: 14px; border: 1px solid #e7e7dc; border-radius: 13px; background: white; }
.hardest-card strong { display: block; color: var(--leaf-dark); font-size: 17px; }
.hardest-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.correction-list { display: grid; gap: 10px; }
.correction-card { padding: 20px 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.correction-summary { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; cursor: pointer; list-style: none; }
.correction-summary::-webkit-details-marker { display: none; }
.correction-number { color: var(--leaf); font-weight: 900; }
.correction-question { margin: 0; font-weight: 800; line-height: 1.42; }
.correction-percent { color: var(--muted); font-size: 12px; white-space: nowrap; }
.correction-body { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; padding: 18px 0 2px 44px; }
.correction-illustration { display: grid; width: 140px; height: 115px; place-items: center; border-radius: 17px; background: #eff3e8; }
.correction-illustration svg { width: 116px; height: 99px; }
.correction-options { display: grid; gap: 6px; }
.correction-option { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; color: #56635a; background: #f5f6f0; font-size: 13px; line-height: 1.36; }
.correction-option.correct { border: 1px solid #cddfc8; color: #2f6949; background: #edf5e9; font-weight: 740; }
.correction-option b { color: inherit; }
.correction-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.explanation { margin: 11px 0 0; padding: 13px 15px; border-left: 3px solid #8fb48e; border-radius: 0 10px 10px 0; color: #54665b; background: #f4f7ef; font-size: 14px; line-height: 1.6; }
.host-error { display: grid; min-height: 70vh; place-items: center; }
.error-card { max-width: 550px; padding: 35px; text-align: center; }
.error-card h1 { margin: 0 0 12px; }
.error-card p { color: var(--muted); line-height: 1.55; }
.archive-card { margin: 12px auto; padding: clamp(21px, 3vw, 34px); }
.archive-list { display: grid; gap: 8px; }
.archive-row { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border: 1px solid #e5e8dd; border-radius: 13px; color: var(--ink); background: #fff; text-align: left; }
.archive-row:hover { border-color: #b8d0b8; background: #f5f8f0; }
.archive-main { display: grid; gap: 5px; }
.archive-main strong { color: var(--leaf-dark); letter-spacing: .08em; }
.archive-main span { color: var(--muted); font-size: 12px; }
.archive-status { padding: 7px 10px; border-radius: 999px; color: #617366; background: #edf2e9; font-size: 11px; font-weight: 800; white-space: nowrap; }
.notice { margin: 17px 0; padding: 12px 14px; border: 1px solid #eadcba; border-radius: 12px; color: #765e31; background: #fbf5e6; font-size: 13px; line-height: 1.45; }
.notice.bad { border-color: #edcfcb; color: #91473e; background: #fff1ef; }
.toast { position: fixed; z-index: 20; right: 18px; bottom: 18px; max-width: min(420px, calc(100vw - 36px)); padding: 13px 16px; border: 1px solid #dbe4d8; border-radius: 13px; color: #31473b; background: #fffefa; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

/* Participant phone screens */
.player-brand { display: flex; align-items: center; gap: 10px; margin: 8px 0 22px; }
.player-brand .brand-mark { width: 40px; height: 40px; border-radius: 13px; font-size: 20px; }
.player-brand .brand-name { font-size: 10px; }
.player-brand .brand-subtitle { font-size: 11px; }
.player-card { padding: 24px 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.player-kicker { margin: 0 0 8px; color: var(--leaf); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.player-title { margin: 0; font-size: 30px; line-height: 1.05; letter-spacing: -.045em; }
.player-copy { margin: 11px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.player-form { display: grid; gap: 13px; }
.field-label { display: block; margin: 0 0 6px; color: #536159; font-size: 12px; font-weight: 800; }
.field { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #dfe4d9; border-radius: 13px; color: var(--ink); background: white; outline: none; }
.field:focus { border-color: #77a487; box-shadow: 0 0 0 3px #77a48722; }
.field.code-field { text-transform: uppercase; letter-spacing: .17em; font-weight: 850; }
.player-form .btn { width: 100%; min-height: 54px; font-size: 16px; }
.room-mini { display: flex; justify-content: space-between; gap: 12px; margin: -4px 0 16px; color: var(--muted); font-size: 12px; }
.room-mini strong { color: var(--leaf-dark); letter-spacing: .12em; }
.player-avatar { display: grid; width: 72px; height: 72px; margin: 0 auto 13px; place-items: center; border: 1px solid #dbe7d9; border-radius: 23px; color: var(--leaf-dark); background: #edf3e8; font-size: 31px; }
.player-center { text-align: center; }
.player-name-display { margin: 0; font-size: 26px; font-weight: 850; overflow-wrap: anywhere; }
.player-status-message { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.waiting-pulse { display: flex; justify-content: center; gap: 5px; margin: 26px 0 4px; }
.waiting-pulse i { width: 8px; height: 8px; border-radius: 50%; background: #84a48a; animation: pulse 1s ease infinite alternate; }
.waiting-pulse i:nth-child(2) { animation-delay: .2s; }
.waiting-pulse i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { to { transform: translateY(-5px); opacity: .55; } }
.player-question-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.player-question-count { color: var(--muted); font-size: 12px; font-weight: 780; }
.player-timer { padding: 8px 11px; border-radius: 11px; color: var(--leaf-dark); background: #edf3e8; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.player-timer.urgent { color: #bc413b; background: #fff0ed; }
.player-category { margin: 0 0 8px; color: var(--soil); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.player-question-title { margin: 0 0 18px; font-size: clamp(22px, 6vw, 30px); line-height: 1.15; letter-spacing: -.035em; }
.player-answer-list { display: grid; gap: 10px; }
.player-answer { display: grid; min-height: 67px; grid-template-columns: 39px 1fr; gap: 11px; align-items: center; padding: 11px 13px; border: 0; border-radius: 15px; color: white; text-align: left; box-shadow: 0 7px 16px #273b2f16; }
.player-answer:hover { filter: brightness(1.04); transform: translateY(-1px); }
.player-answer .letter { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #ffffff66; border-radius: 11px; background: #ffffff20; font-size: 15px; font-weight: 900; }
.player-answer span:last-child { font-size: 14px; font-weight: 740; line-height: 1.32; }
.player-answer.is-selected { outline: 3px solid #25382d; outline-offset: 2px; }
.answer-confirmation { margin-top: 15px; padding: 14px; border: 1px solid #cfe0cb; border-radius: 14px; color: #326448; background: #eff7eb; text-align: center; font-size: 14px; font-weight: 780; }
.answer-confirmation p { margin: 5px 0 0; color: #65766a; font-size: 12px; font-weight: 500; }
.player-board-score { display: flex; justify-content: center; gap: 22px; margin: 20px 0; }
.player-board-score div { min-width: 86px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fafaf5; text-align: center; }
.player-board-score strong { display: block; color: var(--leaf-dark); font-size: 22px; }
.player-board-score span { color: var(--muted); font-size: 10px; }
.player-board-list { display: grid; gap: 6px; margin-top: 15px; }
.player-board-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid #e8e9e0; border-radius: 11px; font-size: 13px; }
.player-board-row.me { border-color: #cddfc8; background: #f1f6eb; }
.player-final-score { margin: 18px 0; color: var(--leaf-dark); font-size: 44px; font-weight: 900; letter-spacing: -.05em; }
.player-final-note { color: var(--muted); font-size: 13px; line-height: 1.55; }
.connectivity-note { margin-top: 13px; color: #758078; font-size: 11px; text-align: center; }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .welcome-grid, .lobby-layout, .board-layout { grid-template-columns: 1fr; }
  .welcome-side { grid-template-columns: 1fr 1fr; }
  .welcome-stat { min-height: 125px; }
  .qr-card { min-height: auto; }
  .lobby-bottom { grid-template-columns: 1fr; }
  .stage-toolbar { grid-template-columns: 1fr auto; }
  .stage-ident { grid-column: 1 / -1; }
  .stage-people { align-self: center; }
  .stage-footer { grid-template-columns: 1fr; }
  .hardest-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .app-shell { width: calc(100% - 28px); padding-top: 15px; }
  .host-topbar { align-items: flex-start; margin-bottom: 17px; }
  .brand { gap: 8px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
  .brand-name { font-size: 10px; }
  .brand-subtitle { max-width: 130px; font-size: 10px; }
  .status-chip { min-height: 30px; padding: 6px 9px; font-size: 10px; }
  .welcome-grid { gap: 13px; }
  .welcome-card { padding: 27px 22px; }
  .welcome-title { font-size: clamp(37px, 12vw, 58px); }
  .welcome-copy { font-size: 15px; }
  .welcome-side { grid-template-columns: 1fr 1fr; gap: 9px; }
  .welcome-stat { min-height: 108px; padding: 17px; }
  .stat-number { font-size: 32px; }
  .stat-label { font-size: 11px; }
  .welcome-tip { grid-column: 1 / -1; padding: 16px; font-size: 13px; }
  .lobby-layout { gap: 12px; }
  .lobby-code-card, .participant-list-card, .launch-card { padding: 19px; }
  .room-code { font-size: 51px; }
  .join-link-row { align-items: stretch; }
  .join-link { font-size: 10px; }
  .copy-button { font-size: 11px; }
  .qr-code { width: 175px; height: 175px; }
  .stage-toolbar { gap: 8px; }
  .timer-group { gap: 6px; }
  .timer-card { min-width: 104px; padding: 8px 9px; }
  .timer-value { font-size: 21px; }
  .timer-label { font-size: 8px; }
  .stage-people { font-size: 10px; }
  .stage-people strong { font-size: 18px; }
  .question-stage-card { padding: 17px 14px; }
  .question-headline { grid-template-columns: 58px 1fr; gap: 11px; margin: 8px 0 15px; }
  .question-illustration { width: 58px; height: 58px; border-radius: 16px; }
  .question-illustration svg { width: 52px; height: 49px; }
  .question-title { font-size: clamp(21px, 6vw, 29px); }
  .question-meta { margin-bottom: 12px; font-size: 11px; }
  .answer-grid { gap: 8px; }
  .answer-option { min-height: 95px; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 13px; }
  .answer-option .letter { width: 27px; height: 27px; flex-basis: 27px; border-radius: 8px; font-size: 13px; }
  .answer-option .answer-copy { font-size: 11px; line-height: 1.25; }
  .stage-progress { font-size: 10px; }
  .response-meter, .live-players { padding: 16px; }
  .response-big { font-size: 28px; }
  .board-card { padding: 18px 14px; }
  .podium-person { min-height: 128px; padding: 11px 6px; }
  .podium-person.first { min-height: 150px; }
  .leaderboard-row { grid-template-columns: 28px 1fr auto; padding: 9px; }
  .leaderboard-time { grid-column: 2 / -1; }
  .final-hero { padding: 20px 17px; }
  .final-heading { align-items: flex-start; flex-direction: column; }
  .hardest-grid { grid-template-columns: repeat(2, 1fr); }
  .correction-card { padding: 15px 12px; }
  .correction-summary { grid-template-columns: 27px 1fr; }
  .correction-percent { grid-column: 2; }
  .correction-body { grid-template-columns: 1fr; padding: 13px 0 0 0; }
  .correction-illustration { display: none; }
}

/* Projector-first Compost & Sens redesign */
.app-shell { width: min(1540px, calc(100% - 64px)); padding-top: 22px; }
.host-topbar { margin-bottom: 22px; }
.brand-mark { color: #fffefa; border-color: #356d52; background: #356d52; }
.welcome-grid { grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 20px; }
.welcome-card { display: flex; min-height: 500px; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(36px, 5vw, 72px); }
.welcome-card:after { display: none; }
.welcome-title { max-width: 740px; font-size: clamp(50px, 6.4vw, 88px); }
.welcome-copy { max-width: 630px; font-size: 18px; }
.feature-pills { margin: 12px 0 26px; }
#create-room { min-height: 58px; padding-inline: 26px; font-size: 17px; }
.welcome-history { margin-top: 11px; }
.welcome-side { grid-template-rows: minmax(300px, 1fr) auto; gap: 14px; }
.welcome-photo { position: relative; min-height: 350px; overflow: hidden; border: 1px solid #d9e2d4; border-radius: var(--radius); background: #dce4d6; box-shadow: var(--shadow); }
.welcome-photo img { display: block; width: 100%; height: 100%; min-height: 350px; object-fit: cover; }
.welcome-photo figcaption { position: absolute; right: 12px; bottom: 11px; left: 12px; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #32473a; background: #fffef0e8; font-size: 10px; }
.welcome-photo figcaption a, .question-photo figcaption a { font-weight: 800; white-space: nowrap; }
.welcome-tip { padding: 18px 21px; }
.lobby-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 4px 0 18px; }
.lobby-heading h1 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.04; letter-spacing: -.045em; }
.lobby-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.room-open-badge { display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px; border: 1px solid #d7e7d7; border-radius: 999px; color: #316847; background: #eff7ed; font-size: 13px; font-weight: 800; white-space: nowrap; }
.room-open-badge i { width: 9px; height: 9px; border-radius: 50%; background: #3d9a61; box-shadow: 0 0 0 4px #3d9a6120; }
.lobby-layout { grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); gap: 16px; }
.lobby-code-card { display: flex; flex-direction: column; justify-content: center; min-height: 300px; padding: clamp(27px, 3.5vw, 48px); background: linear-gradient(145deg, #fffefa, #f3f5ec); }
.room-code { margin-block: 13px 16px; font-size: clamp(64px, 8vw, 106px); letter-spacing: .1em; }
.room-instructions { max-width: 470px; font-size: 15px; }
.qr-card { min-height: 300px; padding: 22px; }
.qr-heading { display: grid; gap: 4px; margin-bottom: 12px; }
.qr-heading strong { font-size: 17px; }
.qr-heading span { color: var(--muted); font-size: 12px; }
.qr-code { width: clamp(190px, 18vw, 238px); height: clamp(190px, 18vw, 238px); border-color: #dfe5d8; }
.lobby-bottom { grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 16px; margin-top: 16px; }
.participant-list-card, .launch-card { padding: 22px 25px; }
.participant-chip { min-height: 42px; gap: 8px; }
.participant-chip small { margin-left: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.participant-chip.is-waiting .avatar-dot { background: #c29137; }
.launch-card { border-color: #d1dfcb; background: linear-gradient(145deg, #edf4e9, #f7f7ec); }
.launch-card h2 { margin: -8px 0 8px; font-size: 23px; }
.launch-card .btn { min-height: 55px; font-size: 16px; }
.danger-quiet { border: 1px solid #ead8d4 !important; color: #8f4b41 !important; background: #fffaf9 !important; box-shadow: none !important; }
.launch-card .danger-quiet { margin-top: 10px; }
.question-stage-card { padding: clamp(24px, 3vw, 40px); }
.stage-toolbar { grid-template-columns: minmax(150px, 1fr) auto minmax(190px, 1fr); gap: 18px; }
.stage-ident { font-size: 14px; }
.timer-group { gap: 10px; }
.timer-card { min-width: 155px; padding: 11px 17px; }
.timer-value { font-size: clamp(25px, 2.3vw, 34px); }
.stage-people { font-size: 13px; }
.stage-people strong { font-size: 23px; }
.question-meta { margin-bottom: 13px; }
.question-meta-number { color: var(--leaf-dark); font-size: 16px; font-weight: 900; letter-spacing: .04em; }
.question-meta-number i { color: #89968d; font-style: normal; font-weight: 650; }
.question-content-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(360px, .97fr); gap: clamp(22px, 3vw, 42px); align-items: center; margin: 2px 0 22px; }
.question-copy { max-width: 780px; }
.question-kicker { margin: 0 0 10px; color: var(--soil); font-size: 13px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.question-title { font-size: clamp(34px, 4.1vw, 58px); line-height: 1.08; letter-spacing: -.04em; }
.question-photo { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #e0e3d8; border-radius: 18px; background: #edf1e7; }
.question-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stage-photo { aspect-ratio: 16 / 9; min-height: 205px; max-height: 355px; box-shadow: 0 12px 30px #243c2d18; }
.question-photo figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; color: #65736a; background: #fffefa; font-size: 10px; line-height: 1.35; }
.answer-grid { gap: 13px; }
.answer-option { min-height: 86px; padding: 17px 21px; border-radius: 15px; box-shadow: 0 6px 16px #273c3010; }
.answer-option .letter { width: 43px; height: 43px; flex-basis: 43px; font-size: 20px; }
.answer-option .answer-copy { font-size: clamp(16px, 1.45vw, 21px); line-height: 1.34; }
.stage-progress { margin-top: 17px; }
.progress-track { height: 9px; }
.stage-footer { grid-template-columns: minmax(190px, .52fr) minmax(400px, 1.48fr); gap: 14px; }
.response-meter, .live-players { padding: 18px 21px; }
.response-big { font-size: 35px; }
.live-player { font-size: 12px; }
.transition-screen { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr); gap: 16px; align-items: stretch; }
.transition-card { padding: clamp(24px, 3vw, 38px); }
.transition-card .board-title { margin-bottom: 14px; font-size: clamp(32px, 4vw, 54px); }
.transition-count { display: flex; align-items: baseline; gap: 12px; margin: 7px 0 12px; }
.transition-count strong { color: var(--leaf-dark); font-size: clamp(32px, 4vw, 50px); font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.transition-count span { color: var(--muted); font-size: 15px; }
.transition-card .board-subtitle { margin: 0 0 12px; }
.transition-progress-track { height: 8px; margin-bottom: 20px; overflow: hidden; border-radius: 20px; background: #e8ece3; }
.transition-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #82aa82; }
.transition-card .podium-person { min-height: 128px; }
.transition-card .podium-person.first { min-height: 151px; }
.transition-leaderboard { align-self: stretch; }
.report-nav { position: sticky; z-index: 4; top: 8px; display: flex; gap: 8px; margin: 17px 0 5px; padding: 9px; overflow-x: auto; border: 1px solid #e2e7dc; border-radius: 14px; background: #fffef4ed; box-shadow: 0 5px 16px #263b2d0c; }
.report-nav a { flex: 0 0 auto; padding: 9px 12px; border-radius: 9px; color: #3f5c49; background: #eff4e9; font-size: 12px; font-weight: 800; text-decoration: none; }
.report-nav a:hover { color: white; background: var(--leaf); }
.final-hero { padding: clamp(24px, 3vw, 40px); }
.final-heading { align-items: flex-start; }
.final-lead { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.final-actions { align-items: center; margin-top: 0; }
.final-stat-row { gap: 10px; }
.final-stat { flex: 1 1 155px; min-width: 145px; padding: 15px 17px; }
.final-stat strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.final-stat.primary-stat { border-color: #cbdcc6; background: #f1f7ed; }
.final-stat.primary-stat strong { color: #2d704e; font-size: 34px; }
.report-nav + .correction-section { margin-top: 22px; }
.results-subheading { margin-top: 25px !important; }
.collective-stats { margin-top: 2px; }
.correction-section { scroll-margin-top: 78px; }
.correction-card { scroll-margin-top: 86px; }
.correction-body { grid-template-columns: minmax(0, 1fr) minmax(250px, 34%); align-items: start; }
.correction-photo { aspect-ratio: 4 / 3; max-height: 230px; box-shadow: 0 8px 20px #243c2d12; }
.correction-photo img { min-height: 165px; }
.correction-option { min-height: 42px; }
.explanation { font-size: 15px; }
.photo-unavailable { display: grid; min-height: 180px; place-items: center; border: 1px dashed #a6b69f; border-radius: 16px; color: #56665b; background: #f4f6ef; font-size: 13px; font-weight: 750; }

@media (max-width: 1080px) {
  .app-shell { width: min(100% - 40px, 1480px); }
  .question-content-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); }
  .stage-toolbar { grid-template-columns: 1fr auto; }
  .stage-ident { grid-column: 1 / -1; }
  .stage-people { justify-self: end; }
}
@media (max-width: 900px) {
  .welcome-grid, .lobby-layout, .lobby-bottom, .transition-screen { grid-template-columns: 1fr; }
  .welcome-card { min-height: 0; }
  .welcome-side { grid-template-rows: minmax(280px, 1fr) auto; }
  .lobby-heading { align-items: flex-start; flex-direction: column; }
  .lobby-code-card { min-height: 250px; }
  .qr-card { min-height: 285px; }
  .question-content-grid { grid-template-columns: 1fr 1fr; }
  .transition-screen .podium { max-width: 700px; }
}
@media (max-width: 680px) {
  .app-shell { width: calc(100% - 28px); padding-top: 15px; }
  .question-content-grid { grid-template-columns: 1fr; }
  .stage-photo { order: 2; min-height: 0; }
  .question-copy { order: 1; }
  .question-title { font-size: clamp(26px, 7vw, 38px); }
  .question-photo figcaption { font-size: 9px; }
  .stage-toolbar { grid-template-columns: 1fr auto; }
  .timer-card { min-width: 104px; }
  .lobby-heading h1 { font-size: 36px; }
  .room-open-badge { white-space: normal; }
  .participant-chip { max-width: 100%; flex-wrap: wrap; }
  .final-actions { width: 100%; }
  .final-actions .btn { flex: 1 1 150px; }
  .correction-body { grid-template-columns: 1fr; padding-left: 0; }
  .correction-photo { max-height: 260px; }
}

.mode-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.mode-actions .btn { min-width: 190px; }
.mode-help { position: relative; z-index: 1; max-width: 560px; margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.mode-back { position: relative; z-index: 1; display: inline-block; margin-top: 15px; color: var(--leaf-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
