:root {
    --navy: #08254d;
    --blue: #0d5d9b;
    --blue-bright: #1d77bb;
    --blue-pale: #dcebfa;
    --orange: #f47a34;
    --orange-deep: #df5d1e;
    --orange-pale: #fff0e4;
    --ink: #12233c;
    --muted: #607089;
    --paper: #f6f3ed;
    --white: #fffdf9;
    --line: #dce2e8;
    --success: #2d966d;
    --shadow: 0 24px 70px rgba(8, 37, 77, .14);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: "DM Sans", system-ui, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(244, 122, 52, .5); outline-offset: 3px; }
[hidden] { display: none !important; }

.site-header { position: relative; z-index: 5; max-width: 1240px; margin: auto; padding: 1.25rem clamp(1rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark { position: relative; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: .8rem; color: white; background: var(--navy); font-family: Fraunces, serif; font-weight: 700; transform: rotate(-4deg); box-shadow: 5px 5px 0 var(--orange); }
.brand-mark span { transform: translate(-.2rem, -.15rem); }
.brand-mark i { position: absolute; right: .32rem; bottom: .18rem; color: var(--orange); font-style: normal; font-size: .7rem; }
.brand-copy { font-family: Fraunces, Georgia, serif; font-size: 1.16rem; font-weight: 700; line-height: 1.05; }
.brand-copy strong { display: block; color: var(--orange-deep); }
.all-games-link, .back-link { color: var(--blue); font-size: .86rem; font-weight: 700; text-decoration: none; }
.all-games-link:hover, .back-link:hover { color: var(--orange-deep); }
.site-footer { max-width: 1180px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem); display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(8, 37, 77, .12); color: var(--muted); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }

.eyebrow { margin: 0 0 .85rem; color: var(--orange-deep); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; }
h1 { margin: 0; font-size: clamp(3.2rem, 8vw, 6.8rem); line-height: .9; letter-spacing: -.05em; }
h1 em { color: var(--orange); font-style: italic; }
h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -.035em; }
h3 { margin: 0; font-size: 1.7rem; }
.lede { max-width: 42rem; margin: 1.45rem 0 1.8rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.17rem); line-height: 1.65; }

.button { min-height: 3.15rem; padding: .82rem 1.1rem; display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem; border: 0; border-radius: .75rem; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s, opacity .15s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button.primary { color: white; background: var(--navy); box-shadow: 0 10px 25px rgba(8, 37, 77, .2); }
.button.secondary { color: var(--navy); background: var(--blue-pale); }
.button.danger { color: white; background: var(--orange-deep); }
.button.orange { color: white; background: var(--orange); }

/* Home */
.home-page { background: radial-gradient(circle at 80% 10%, rgba(29, 119, 187, .12), transparent 25rem), var(--paper); }
.home-main { overflow: hidden; }
.home-hero { min-height: min(760px, calc(100vh - 5rem)); max-width: 1180px; margin: auto; padding: 3.5rem clamp(1rem, 4vw, 3rem) 5rem; display: grid; align-items: center; gap: 3rem; }
.hero-action { width: min(100%, 15rem); }
.home-entry { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .85rem; }
.home-choice { min-width: 0; padding: 1.15rem; border: 1px solid rgba(8,37,77,.1); border-radius: 1rem; background: rgba(255,253,249,.88); box-shadow: 0 14px 35px rgba(8,37,77,.08); }
.home-choice .eyebrow { margin-bottom: .35rem; }
.home-choice h2 { font-size: 1.45rem; }
.home-choice > p:not(.eyebrow) { min-height: 3.9rem; margin: .55rem 0 1rem; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.home-choice .button { width: 100%; }
.home-join-form { display: grid; gap: .55rem; }
.home-join-form .button { min-height: 3.35rem; }
.home-choice .form-error { margin-bottom: 0; }
.hero-art { position: relative; min-height: 31rem; }
.orbit { position: absolute; inset: 50% auto auto 50%; border: 1px solid rgba(13, 93, 155, .24); border-radius: 50%; transform: translate(-50%, -50%) rotate(-12deg); }
.orbit-one { width: 25rem; height: 17rem; }
.orbit-two { width: 18rem; height: 27rem; transform: translate(-50%, -50%) rotate(26deg); }
.art-card { position: absolute; display: grid; place-items: center; border: .45rem solid var(--white); border-radius: 1.3rem; box-shadow: var(--shadow); font-family: Fraunces, serif; font-weight: 700; letter-spacing: .1em; }
.art-card-one { left: 5%; top: 21%; width: 11rem; height: 15rem; color: white; background: var(--blue); transform: rotate(-12deg); }
.art-card-two { left: 39%; top: 10%; z-index: 2; width: 12rem; height: 17rem; color: white; background: var(--orange); font-size: 5rem; transform: rotate(5deg); }
.art-card-three { right: 1%; bottom: 11%; width: 11rem; height: 15rem; color: var(--navy); background: var(--blue-pale); transform: rotate(14deg); }
.art-spark { position: absolute; color: var(--orange); font-size: 2rem; }
.spark-one { right: 5%; top: 9%; }
.spark-two { left: 4%; bottom: 10%; color: var(--blue); }
.games-section { padding: 6rem max(clamp(1rem, 4vw, 3rem), calc((100vw - 1120px) / 2)); background: var(--navy); color: white; }
.section-heading { margin-bottom: 2.2rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.section-heading > p { max-width: 28rem; margin: 0; color: #aebed1; line-height: 1.6; }
.game-grid { display: grid; gap: 1.4rem; }
.game-card { position: relative; min-height: 31rem; overflow: hidden; border-radius: 1.5rem; }
.game-card.orange { display: grid; grid-template-columns: .85fr 1.15fr; color: var(--ink); background: var(--white); }
.game-card-top { position: absolute; inset: 1.2rem 1.2rem auto; z-index: 3; display: flex; justify-content: space-between; align-items: center; }
.game-number { color: var(--blue); font-family: Fraunces, serif; font-weight: 700; }
.live-badge { padding: .35rem .65rem; border-radius: 999px; color: var(--blue); background: var(--blue-pale); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.live-badge i { width: .45rem; height: .45rem; margin-right: .3rem; display: inline-block; border-radius: 50%; background: var(--success); }
.game-symbol { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--orange); }
.game-symbol::before, .game-symbol::after { content: ""; position: absolute; width: 20rem; height: 20rem; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; }
.game-symbol::after { width: 28rem; height: 12rem; transform: rotate(35deg); }
.symbol-eye { width: 12rem; height: 7rem; border-radius: 80% 15% 80% 15%; background: var(--navy); transform: rotate(45deg); box-shadow: 0 18px 45px rgba(8,37,77,.2); }
.symbol-eye::after { content: ""; width: 3.8rem; height: 3.8rem; display: block; border: .8rem solid white; border-radius: 50%; transform: translate(3.3rem, .8rem); }
.symbol-question { position: absolute; z-index: 2; color: white; font-family: Fraunces, serif; font-size: 4rem; font-weight: 700; }
.game-card-copy { align-self: center; padding: 5rem clamp(1.5rem, 5vw, 4rem) 2.5rem; }
.game-card-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.game-meta { margin: 1.5rem 0; display: flex; gap: .6rem; }
.game-meta span { padding: .42rem .7rem; border-radius: 999px; color: var(--blue); background: var(--blue-pale); font-size: .78rem; font-weight: 700; }
.card-action { width: 100%; color: white; background: var(--orange); box-shadow: 0 10px 25px rgba(244, 122, 52, .25); }
.coming-soon { min-height: 16rem; padding: 2rem; display: flex; align-items: center; gap: 1.6rem; border: 1px dashed rgba(255,255,255,.25); background: rgba(255,255,255,.04); }
.coming-soon p:not(.eyebrow) { color: #aebed1; }
.coming-mark { flex: 0 0 auto; width: 5.5rem; height: 5.5rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: var(--orange); font-family: Fraunces, serif; font-size: 3rem; }
.feature-strip { max-width: 1180px; margin: auto; padding: 5rem clamp(1rem, 4vw, 3rem); display: grid; gap: 1rem; }
.feature-strip > div { padding: 1rem 0; display: flex; gap: .9rem; border-bottom: 1px solid var(--line); }
.feature-strip b { color: var(--orange); font-size: .72rem; }
.feature-strip span { color: var(--muted); }
.feature-strip strong { display: block; color: var(--ink); }

/* Game entry */
.game-page { background: radial-gradient(circle at 0 100%, rgba(244, 122, 52, .1), transparent 28rem), radial-gradient(circle at 100% 0, rgba(13, 93, 155, .12), transparent 30rem), var(--paper); }
.play-main { max-width: 1180px; min-height: calc(100vh - 10rem); margin: auto; padding: 1.5rem clamp(1rem, 4vw, 3rem) 5rem; }
.game-landing { min-height: 41rem; display: grid; align-items: center; gap: clamp(2rem, 8vw, 7rem); }
.back-link { display: inline-block; margin-bottom: 2.2rem; }
.game-intro h1 { font-size: clamp(3.5rem, 8vw, 6.8rem); }
.how-list { margin: 2rem 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; list-style: none; }
.how-list li { display: flex; gap: .45rem; color: var(--muted); font-size: .85rem; }
.how-list b { color: var(--orange); font-size: .7rem; }
.rule-note { max-width: 38rem; padding: .85rem 1rem; border-left: 4px solid var(--blue); color: var(--blue); background: var(--blue-pale); font-size: .84rem; line-height: 1.5; }
.entry-card, .phase-panel, .roster-card { border: 1px solid rgba(8, 37, 77, .08); border-radius: 1.35rem; background: rgba(255, 253, 249, .94); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.entry-card { width: 100%; max-width: 29rem; justify-self: center; padding: 1.3rem; }
.entry-card-heading { margin: .2rem .2rem 1.4rem; display: flex; align-items: center; gap: .8rem; }
.entry-card-heading .eyebrow { margin-bottom: .15rem; }
.entry-card-heading h2 { font-size: 1.65rem; }
.mini-mark { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; border-radius: 1rem; color: white; background: var(--orange); font-family: Fraunces, serif; font-size: 1.7rem; font-weight: 700; transform: rotate(-5deg); }
.entry-tabs { margin-bottom: 1.4rem; padding: .25rem; display: grid; grid-template-columns: 1fr 1fr; border-radius: .8rem; background: #e9edf1; }
.tab { min-height: 2.7rem; border: 0; border-radius: .62rem; color: var(--muted); background: transparent; font-weight: 700; }
.tab.active { color: var(--navy); background: var(--white); box-shadow: 0 3px 12px rgba(8,37,77,.08); }
.entry-form { display: grid; gap: .7rem; }
label, .muted-label { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
input { width: 100%; min-height: 3.35rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .75rem; color: var(--ink); background: white; }
input:focus { border-color: var(--blue); }
.code-input { text-transform: uppercase; letter-spacing: .22em; font-weight: 700; }
.form-error { margin: 1rem 0 0; padding: .8rem; border-radius: .7rem; color: #933211; background: var(--orange-pale); font-size: .86rem; }

/* Live game */
.connection-banner { position: fixed; inset: 0 0 auto; z-index: 20; padding: .55rem; color: white; background: var(--orange); text-align: center; font-weight: 700; }
.game-shell { padding-top: 1rem; }
.game-topbar { margin-bottom: 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.game-topbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .65rem; }
.tv-dashboard-link { padding: .48rem .8rem; border-radius: 999px; color: var(--navy); background: white; box-shadow: 0 4px 14px rgba(8,37,77,.08); font-size: .8rem; font-weight: 700; text-decoration: none; }
.room-code-wrap { display: flex; align-items: center; gap: .7rem; }
.game-code { min-height: 2.7rem; padding: .35rem .75rem; border: 1px dashed var(--orange); border-radius: .65rem; color: var(--navy); background: rgba(255,255,255,.72); font-size: 1.05rem; font-weight: 700; letter-spacing: .18em; }
.round-pill { padding: .48rem .8rem; border-radius: 999px; color: var(--blue); background: var(--blue-pale); font-size: .8rem; font-weight: 700; }
.game-layout { display: grid; gap: 1.2rem; }
.phase-panel { min-height: 33rem; padding: clamp(1.3rem, 4vw, 2.7rem); }
.phase-panel h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.phase-panel h2 { margin: 0 0 .7rem; font-size: clamp(1.9rem, 5vw, 3.1rem); }
.phase-panel p { color: var(--muted); line-height: 1.6; }
.phase-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.phase-actions .button { flex: 1 1 10rem; }
.qr-wrap { margin: 1.5rem 0; display: grid; grid-template-columns: minmax(9rem, 12rem) 1fr; align-items: center; gap: 1.4rem; }
.qr-wrap img { width: 100%; padding: .6rem; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.join-url { overflow-wrap: anywhere; font-size: .86rem; }
.lobby-rule { padding: .8rem 1rem; border-radius: .75rem; color: var(--blue) !important; background: var(--blue-pale); font-size: .84rem; }
.role-card { position: relative; min-height: 14.5rem; margin-top: 1.5rem; display: grid; place-items: center; overflow: hidden; border-radius: 1.15rem; color: white; background: var(--navy); text-align: center; }
.role-card::after { content: "?"; position: absolute; right: -1rem; bottom: -3.5rem; color: rgba(255,255,255,.05); font-family: Fraunces, serif; font-size: 13rem; font-weight: 700; }
.role-card button { position: absolute; inset: 0; z-index: 3; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; border: 0; color: white; background: var(--navy); font-weight: 700; }
.reveal-eye { width: 3.25rem; height: 3.25rem; fill: none; stroke: var(--orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reveal-eye circle { fill: rgba(244, 122, 52, .18); }
.role-card.revealed button { display: none; }
.role-card .secret { position: relative; z-index: 2; padding: 2rem; }
.role-card .secret small { margin-bottom: .7rem; display: block; color: #a9c8e5; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.role-card .secret strong { font-family: Fraunces, serif; font-size: clamp(1.8rem, 6vw, 3rem); }
.role-card .secret p { color: var(--blue-pale); }
.clue-starter { margin-top: 1.3rem; padding: 1rem; border-left: 4px solid var(--orange); background: var(--orange-pale); }
.clue-starter strong { color: var(--ink); }
.host-guide { margin-top: 1.3rem; padding: 1.25rem; border: 1px solid rgba(244, 122, 52, .28); border-radius: 1rem; background: linear-gradient(135deg, var(--orange-pale), #fffaf5); }
.host-guide .eyebrow { margin-bottom: .3rem; }
.host-guide h3 { margin: 0 0 .85rem; color: var(--navy); font-size: 1.45rem; }
.host-guide .host-recommendation { margin: 0 0 1rem; padding: .7rem .8rem; border-radius: .65rem; color: var(--blue); background: var(--blue-pale); font-size: .86rem; }
.host-guide ol { margin: 0; padding-left: 1.35rem; display: grid; gap: .55rem; color: var(--muted); line-height: 1.5; }
.host-guide li::marker { color: var(--orange-deep); font-weight: 700; }
.host-guide strong { color: var(--ink); }
.progress-meta { margin: 1.3rem 0 .45rem; display: flex; justify-content: space-between; color: var(--muted); font-size: .84rem; font-weight: 700; }
.progress-track { height: .65rem; overflow: hidden; border-radius: 999px; background: #e4e8eb; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--orange)); transition: width .25s; }
.vote-grid { margin-top: 1.4rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
.vote-choice { min-height: 4.2rem; padding: .8rem; border: 1px solid var(--line); border-radius: .85rem; color: var(--ink); background: white; font-weight: 700; }
.vote-choice:hover { border-color: var(--orange); background: var(--orange-pale); }
.vote-choice.selected { border-color: var(--orange); color: var(--navy); background: var(--orange-pale); box-shadow: inset 0 0 0 2px var(--orange); }
.vote-selection-status { margin-top: .8rem; display: flex; justify-content: space-between; gap: .8rem; color: var(--muted); font-size: .82rem; }
.vote-selection-status b { color: var(--navy); }
.waiting-card { margin-top: 1.4rem; padding: 1.2rem; border-radius: .9rem; background: var(--blue-pale); }
.waiting-card p { margin-bottom: 0; }
.locked-suspects { margin-top: 1rem; padding: .75rem 1rem; border-radius: .75rem; color: var(--blue); background: var(--blue-pale); font-size: .84rem; }
.reveal-hero { margin: 1rem 0 1.5rem; padding: 1.5rem; border-radius: 1.1rem; color: white; background: var(--navy); }
.reveal-hero p { color: var(--blue-pale); }
.reveal-scene { color: var(--orange); font-family: Fraunces, serif; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.final-standings { margin: 1rem 0 1.5rem; padding: 1rem; border: 1px solid rgba(244,122,52,.35); border-radius: 1rem; background: var(--orange-pale); }
.final-standings h3 { margin: 0; }
.final-standings ol { margin: .8rem 0 0; padding: 0; list-style: none; }
.final-standings li { padding: .45rem 0; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(164,75,26,.16); }
.final-standings li b { color: var(--orange-deep); }
.ballot-results { margin-top: 1rem; display: grid; gap: .8rem; }
.vote-breakdown-title { margin: 1.6rem 0 0; font-size: 1.25rem; }
.ballot-result { padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: white; }
.current-ballot-result { border-color: rgba(13, 93, 155, .28); box-shadow: 0 12px 30px rgba(8, 37, 77, .08); }
.ballot-result h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.vote-tallies { margin: .75rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; }
.vote-tally { padding: .65rem .75rem; display: flex; justify-content: space-between; gap: .5rem; border-radius: .65rem; color: var(--navy); background: var(--blue-pale); font-size: .86rem; }
.vote-tally b { color: var(--orange-deep); }
.ballot-result ul { margin: .5rem 0 0; padding: 0; list-style: none; }
.ballot-result li { padding: .35rem 0; display: flex; justify-content: space-between; gap: .6rem; border-bottom: 1px solid #ebedf0; font-size: .88rem; }
.roster-card { align-self: start; padding: 1.1rem; box-shadow: 0 14px 35px rgba(8,37,77,.08); }
.roster-heading { display: flex; align-items: center; justify-content: space-between; }
.roster-heading h2 { margin: 0; font-size: 1.25rem; }
.roster-heading span { color: var(--muted); font-size: .82rem; }
.imposter-count { margin: .8rem 0; padding: .6rem .7rem; border-radius: .65rem; color: var(--orange-deep); background: var(--orange-pale); font-size: .75rem; font-weight: 700; }
.roster { margin: 0; padding: 0; list-style: none; }
.roster li { min-height: 2.75rem; display: flex; align-items: center; gap: .7rem; border-top: 1px solid #e8ebee; }
.presence { width: .55rem; height: .55rem; border-radius: 50%; background: #a9adab; }
.presence.online { background: var(--success); box-shadow: 0 0 0 3px rgba(45,150,109,.15); }
.player-name { flex: 1; font-weight: 600; }
.host-badge { color: var(--orange-deep); font-size: .66rem; font-weight: 700; text-transform: uppercase; }
.remove-player { min-width: 2.75rem; min-height: 2.75rem; border: 0; color: var(--orange-deep); background: transparent; font-size: 1.2rem; }
.recover-player { padding: .35rem .5rem; border: 0; border-radius: .45rem; color: var(--blue); background: var(--blue-pale); font-size: .7rem; font-weight: 700; }
.confirm-dialog { width: min(92vw, 28rem); padding: 1.5rem; border: 0; border-radius: 1.1rem; color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
.confirm-dialog::backdrop { background: rgba(8,37,77,.68); backdrop-filter: blur(3px); }
.confirm-dialog h2 { margin: 0; }
.dialog-actions { margin-top: 1.4rem; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.dialog-actions.single-action { grid-template-columns: 1fr; }
.text-button { margin: .8rem 0; padding: 0; border: 0; color: var(--blue); background: transparent; font-weight: 700; text-decoration: underline; }
.saved-seat-choice { margin: 1rem 0; padding: 1rem; border-radius: .8rem; background: var(--blue-pale); }
.saved-seat-choice p { margin: .35rem 0 .75rem; }
.saved-seat-choice .button { width: 100%; }
.saved-seat-choice .saved-seat-or { margin: .75rem 0 0; font-size: .8rem; }
.recovery-code { margin: 1.2rem 0; padding: 1rem; border: 2px dashed var(--orange); border-radius: .8rem; color: var(--navy); background: var(--orange-pale); font-size: 2rem; font-weight: 700; letter-spacing: .25em; text-align: center; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 1.2rem; width: min(90vw, 32rem); padding: .9rem 1.1rem; border-radius: .75rem; color: white; background: var(--navy); box-shadow: var(--shadow); text-align: center; transform: translateX(-50%); }
.simple-page { max-width: 48rem; min-height: 65vh; margin: auto; padding: 7rem clamp(1rem, 4vw, 3rem); }
.simple-page h1 { font-size: clamp(3rem, 8vw, 5rem); }
.simple-page > p { color: var(--muted); }
.request-id { margin-top: 3rem; font-size: .75rem; }

@media (min-width: 760px) {
    .home-hero { grid-template-columns: 1.05fr .95fr; }
    .game-landing { grid-template-columns: 1.2fr .8fr; }
    .game-layout { grid-template-columns: minmax(0,1fr) 18rem; }
    .vote-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .feature-strip { grid-template-columns: repeat(4, 1fr); }
    .feature-strip > div { border-bottom: 0; border-right: 1px solid var(--line); }
    .feature-strip > div:last-child { border-right: 0; }
}

@media (max-width: 759px) {
    .home-hero { padding-top: 4rem; }
    .hero-art { min-height: 23rem; transform: scale(.78); margin: -2rem; }
    .section-heading { align-items: start; flex-direction: column; }
    .game-card.orange { grid-template-columns: 1fr; }
    .game-symbol { min-height: 18rem; }
    .game-card-copy { padding-top: 2.4rem; }
    .game-landing { align-content: start; padding-top: 2rem; }
}

@media (max-width: 540px) {
    .brand-copy { font-size: 1rem; }
    .all-games-link { font-size: .78rem; }
    .site-footer { flex-direction: column; }
    .hero-art { transform: scale(.64); margin: -4rem; }
    .home-entry { grid-template-columns: 1fr; }
    .home-choice > p:not(.eyebrow) { min-height: 0; }
    .game-meta { flex-wrap: wrap; }
    .how-list { display: grid; }
    .qr-wrap { grid-template-columns: 8rem 1fr; }
    .muted-label { display: none; }
    .phase-panel { min-height: 28rem; }
    .dialog-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
    .called-cell.letter-reveal-prep, .called-cell.letter-reveal-prep.letter-reveal-flip { opacity: 1; color: white; background: var(--blue); animation: none !important; transform: none; }
}

/* Seven Thunders */
button, input, select { font: inherit; }
select { width: 100%; min-height: 3.1rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .7rem; color: var(--ink); background: white; }
.game-card.blue { display: grid; grid-template-columns: .85fr 1.15fr; color: var(--ink); background: var(--white); }
.game-card.blue .game-symbol { background: linear-gradient(145deg, #071a38, var(--blue)); }
.game-card.blue .symbol-eye { border: 2px solid rgba(255,255,255,.32); border-radius: 50%; background: transparent; transform: none; box-shadow: 0 0 0 2rem rgba(255,255,255,.05), 0 0 0 4rem rgba(255,255,255,.04); }
.game-card.blue .symbol-eye::after { display: none; }
.game-card.blue .card-action { background: var(--blue); box-shadow: 0 10px 25px rgba(13,93,155,.25); }
.game-card.gold { display: grid; grid-template-columns: .85fr 1.15fr; color: #32172a; background: #fffaf0; }
.game-card.gold .game-symbol { background: radial-gradient(circle at 30% 20%, rgba(255,220,132,.28), transparent 28%), linear-gradient(145deg, #3f1833, #8b365f); }
.game-card.gold .symbol-eye { width: 10rem; height: 10rem; border: .45rem double #dcae4f; border-radius: 50%; background: #fff7df; transform: rotate(-7deg); box-shadow: 0 18px 45px rgba(43,12,34,.28), inset 0 0 0 1.1rem rgba(220,174,79,.12); }
.game-card.gold .symbol-eye::after { display: none; }
.game-card.gold .symbol-question { color: #591f45; font-size: 3.25rem; letter-spacing: -.08em; }
.game-card.gold .game-number { color: #ffe6a0; }
.game-card.gold .game-card-copy > .eyebrow { color: #a45b09; }
.game-card.gold .game-card-copy > p:not(.eyebrow) { color: #715568; }
.game-card.gold .game-meta span { color: #6d254f; background: #f6dfeb; }
.game-card.gold .card-action { background: #7b2854; box-shadow: 0 10px 25px rgba(123,40,84,.28); }
.thunders-page { background: radial-gradient(circle at 100% 0, rgba(29,119,187,.18), transparent 32rem), radial-gradient(circle at 0 100%, rgba(244,122,52,.1), transparent 30rem), var(--paper); }
.thunders-main { max-width: 1320px; }
.thunders-intro h1 em { color: var(--blue-bright); }
.thunder-mark { background: var(--blue); transform: rotate(4deg); }
.thunders-entry { max-width: 33rem; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.setup-grid label { display: grid; gap: .35rem; }
.check-row { min-height: 2.2rem; display: flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 600; letter-spacing: 0; }
.check-row input { width: 1.15rem; min-height: auto; height: 1.15rem; }
.thunders-layout { display: grid; gap: 1.2rem; }
.thunders-panel { min-width: 0; }
.score-card { min-width: 0; }
.scoreboard .score-row { position: relative; padding: .35rem 0; }
.scoreboard .score-row.active { color: var(--blue); }
.scoreboard .score-row.active::before { content: ""; position: absolute; inset: .25rem -.45rem; z-index: -1; border-radius: .55rem; background: var(--blue-pale); }
.score-value { min-width: 1.8rem; color: var(--navy); font-family: Fraunces, serif; font-size: 1.15rem; text-align: center; }
.roster-action { padding: .3rem .4rem; border: 0; border-radius: .4rem; color: var(--blue); background: var(--blue-pale); font-size: .68rem; font-weight: 700; }
.managed-roster, .tv-display-card { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fbfcfd; }
.managed-roster .eyebrow { margin-bottom: .3rem; }
.managed-player-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .65rem; }
.managed-player-form label { grid-column: 1 / -1; }
.host-judge-card { margin-top: 1rem; padding: 1.15rem; border: 1px solid rgba(244,122,52,.35); border-radius: 1rem; background: var(--orange-pale); }
.host-judge-card h3 { font-size: 1.35rem; }
.lobby-setup { margin-top: 1.3rem; padding: 1rem; display: grid; gap: .75rem; border: 1px solid var(--line); border-radius: 1rem; background: #fbfcfd; }
.turn-status { margin-bottom: 1rem; padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 1rem; color: white; background: var(--navy); }
.turn-status .eyebrow { margin: 0 0 .15rem; color: #9fc8e9; }
.turn-status strong, .turn-status small { display: block; }
.turn-status small { margin-top: .15rem; color: #c8dceb; }
.turn-clock { width: 4.4rem; height: 4.4rem; flex: 0 0 auto; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.3); border-radius: 50%; color: white; background: var(--blue); font-family: Fraunces, serif; font-size: 1.8rem; font-weight: 700; }
.turn-clock.urgent { border-color: #ffb085; background: var(--orange-deep); animation: clock-pulse .8s infinite alternate; }
.turn-clock.paused { width: 5.5rem; border-radius: 999px; font-family: "DM Sans", sans-serif; font-size: .72rem; letter-spacing: .08em; }
@keyframes clock-pulse { to { transform: scale(1.05); } }
.mystery-board { overflow: hidden; border: 1px solid rgba(13,93,155,.22); border-radius: 1rem; background: linear-gradient(155deg, #f8fbff, #edf5fb); }
.board-heading { padding: .8rem 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(13,93,155,.15); }
.board-heading .eyebrow { margin-bottom: .2rem; }
.board-heading strong { display: block; color: var(--navy); font-family: Fraunces, serif; font-size: 1.25rem; }
.board-heading small { color: var(--muted); text-align: right; }
.sealed-category { color: var(--blue) !important; letter-spacing: .04em; }
.puzzle-rows { padding: .65rem; display: grid; gap: .42rem; }
.puzzle-row { min-height: 2.65rem; padding: .38rem .55rem; display: grid; grid-template-columns: 1.7rem minmax(0,1fr) 1.5rem; align-items: center; gap: .45rem; border: 1px solid rgba(8,37,77,.1); border-radius: .65rem; background: rgba(255,255,255,.88); }
.puzzle-row.solved { border-color: rgba(45,150,109,.35); background: #effaf5; }
.puzzle-row.selectable-row { width: 100%; color: inherit; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.puzzle-row.selectable-row:hover { border-color: var(--blue); box-shadow: 0 .25rem .8rem rgba(13,93,155,.12); transform: translateY(-1px); }
.puzzle-row.selectable-row:focus-visible { outline: 3px solid rgba(29,119,187,.3); outline-offset: 2px; }
.puzzle-row.selected-row { border-color: var(--orange-deep); box-shadow: 0 0 0 3px rgba(244,122,52,.18); background: #fff9f4; }
.puzzle-row.selected-row .row-number { background: var(--orange-deep); }
.row-number { width: 1.55rem; height: 1.55rem; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-size: .72rem; font-weight: 700; }
.puzzle-word { min-width: 0; display: flex; flex-wrap: wrap; align-items: end; column-gap: clamp(.9rem, 2.5vw, 1.35rem); row-gap: .28rem; }
.puzzle-token { max-width: 100%; display: inline-flex; flex: 0 0 auto; align-items: end; gap: .16rem; white-space: nowrap; }
.puzzle-cell { width: clamp(1.05rem, 3.3vw, 1.6rem); min-height: 1.75rem; display: inline-grid; place-items: center; border-radius: .22rem; font-family: Fraunces, serif; font-weight: 700; }
.puzzle-entry-number, .puzzle-entry-blank { opacity: 0; }
.puzzle-entry-number.puzzle-entry-visible { opacity: 1; transition: opacity .45s ease; }
.puzzle-entry-blank.puzzle-entry-visible { opacity: 1; transition: opacity .3s ease; }
.hidden-cell { border-bottom: 2px solid #7890a6; color: transparent; background: rgba(8,37,77,.04); }
.called-cell { border: 1px solid var(--blue); color: white; background: var(--blue); box-shadow: inset 0 -3px rgba(0,0,0,.12); }
.called-cell.letter-reveal-prep { opacity: 0; color: transparent; background: #bfe6ff; box-shadow: 0 0 0 1px rgba(29,119,187,.18), 0 6px 14px rgba(13,93,155,.12); transform: perspective(12rem) rotateY(0); transform-origin: center; }
.called-cell.letter-reveal-prep.letter-reveal-square { opacity: 1; transition: opacity .3s ease, background-color .3s ease; }
.called-cell.letter-reveal-prep.letter-reveal-flip { animation: thunder-letter-flip .46s cubic-bezier(.2,.75,.25,1) both; }
@keyframes thunder-letter-flip {
    0% { color: transparent; background: #bfe6ff; transform: perspective(12rem) rotateY(0); }
    49% { color: transparent; background: #9bd5fb; transform: perspective(12rem) rotateY(90deg); }
    50% { color: white; background: var(--blue); transform: perspective(12rem) rotateY(-90deg); }
    100% { color: white; background: var(--blue); transform: perspective(12rem) rotateY(0); }
}
.solved-only-cell { border: 1px dashed var(--orange-deep); color: var(--orange-deep); background: var(--orange-pale); text-decoration: underline dotted; text-underline-offset: .18rem; }
.separator-cell { width: .65rem; color: var(--muted); background: transparent; }
.solved-mark { color: var(--success); font-weight: 700; }
.board-legend { padding: .45rem .75rem .65rem; display: flex; flex-wrap: wrap; gap: .8rem; color: var(--muted); font-size: .68rem; }
.board-legend span { display: flex; align-items: center; gap: .3rem; }
.board-legend i { width: .8rem; height: .8rem; display: inline-block; border-radius: .15rem; }
.called-swatch { background: var(--blue); }
.solved-swatch { border: 1px dashed var(--orange-deep); background: var(--orange-pale); }
.controller-controls, .host-console { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: white; }
.controller-controls h3 { margin-bottom: .35rem; font-size: 1.35rem; }
.controller-controls > p { margin: .35rem 0 .8rem; }
.keyboard-shortcuts { margin: .65rem 0 .85rem; display: flex; flex-wrap: wrap; gap: .45rem .75rem; color: var(--muted); font-size: .8rem; }
.keyboard-shortcuts span { display: inline-flex; align-items: center; gap: .3rem; }
.keyboard-shortcuts kbd { min-width: 1.7rem; padding: .15rem .4rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: .35rem; color: var(--navy); background: white; font: 700 .72rem/1.2 "DM Sans", sans-serif; text-align: center; box-shadow: 0 1px 0 rgba(8,35,66,.08); }
.alphabet { display: grid; grid-template-columns: repeat(7, 1fr); gap: .38rem; }
.letter-key { aspect-ratio: 1; min-height: 2.7rem; border: 1px solid var(--blue); border-radius: .55rem; color: var(--navy); background: var(--blue-pale); font-weight: 700; }
.letter-key:hover:not(:disabled) { color: white; background: var(--blue); }
.letter-key:disabled { cursor: not-allowed; border-color: #c5cbd1; color: #8b949d; background: #e3e6e8; text-decoration: line-through; }
.answer-form { display: grid; grid-template-columns: minmax(8rem,.5fr) minmax(0,1fr); gap: .55rem .75rem; align-items: end; }
.answer-form label { align-self: end; }
.answer-form .button { grid-column: 1 / -1; }
.answer-selection-prompt { padding: .85rem 1rem; display: grid; gap: .2rem; border: 1px dashed var(--blue); border-radius: .75rem; color: var(--navy); background: var(--blue-pale); }
.answer-selection-prompt span { color: var(--muted); font-size: .88rem; }
.masked-answer-form { display: grid; grid-template-columns: 1fr; align-items: stretch; }
.masked-answer-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.masked-answer-heading strong { color: var(--navy); font-family: Fraunces, serif; font-size: 1.15rem; }
.text-button { padding: .25rem 0; border: 0; color: var(--blue); background: transparent; font-size: .82rem; font-weight: 700; text-decoration: underline; text-underline-offset: .16rem; }
.masked-answer-grid { padding: .75rem; display: flex; flex-wrap: wrap; align-items: end; column-gap: .7rem; row-gap: .45rem; overflow-x: auto; border: 1px solid var(--line); border-radius: .75rem; background: #f8fafc; }
.masked-answer-grid .puzzle-token { gap: .22rem; }
.missing-letter-input.puzzle-cell { width: clamp(1.55rem,5vw,2.15rem); min-height: 2.35rem; padding: .15rem; border: 1px solid var(--blue); border-bottom-width: 3px; border-radius: .3rem; color: var(--navy); background: white; font-family: Fraunces, serif; font-size: 1.05rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.missing-letter-input.puzzle-cell:focus { outline: 3px solid rgba(29,119,187,.18); outline-offset: 1px; }
.puzzle-row .missing-letter-input.puzzle-cell, .scripture-board .missing-letter-input.puzzle-cell { width: clamp(1.05rem,3.3vw,1.6rem); min-height: 1.75rem; padding: .05rem; font-size: .85rem; }
.answer-alphabet { display: grid; grid-template-columns: repeat(9,1fr); gap: .3rem; }
.answer-letter-key { min-height: 2.2rem; border: 1px solid rgba(13,93,155,.35); border-radius: .4rem; color: var(--navy); background: var(--blue-pale); font-size: .78rem; font-weight: 700; }
.answer-letter-key:hover:not(:disabled), .answer-letter-key:focus-visible:not(:disabled) { color: white; background: var(--blue); }
.answer-letter-key:disabled { cursor: not-allowed; border-color: #c5cbd1; color: #8b949d; background: #e3e6e8; }
.answer-backspace { color: var(--orange-deep); background: var(--orange-pale); }
.masked-answer-form .button { justify-content: center; }
.player-turn-actions { margin-top: .75rem; display: flex; justify-content: flex-end; }
.host-console { border-color: rgba(244,122,52,.3); background: #fffaf5; }
.host-console .eyebrow { margin-bottom: .15rem; }
.host-cheat { margin-top: 1rem; padding: .75rem 1rem; border: 1px dashed var(--orange); border-radius: .8rem; background: var(--orange-pale); }
.host-cheat summary { cursor: pointer; font-weight: 700; }
.host-cheat ol { columns: 2; margin-bottom: 0; }
.match-turn-count { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid var(--blue); color: var(--blue) !important; background: var(--blue-pale); font-size: 1.05rem; }
.match-turn-count strong { font-family: Fraunces, serif; font-size: 1.45rem; }

/* Full-screen 16:9 board */
.thunders-display-page { overflow: hidden; color: white; background: #06162d; }
.display-connect { min-height: 100vh; display: grid; place-items: center; padding: 2rem; color: var(--ink); background: radial-gradient(circle at 70% 20%, rgba(29,119,187,.25), transparent 30rem), var(--paper); }
.display-connect h1 { margin-bottom: 1.5rem; font-size: clamp(2.8rem,7vw,5rem); }
.tv-board { width: 100vw; height: 100vh; padding: 2.2vh 2.4vw; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 1.7vh; background: radial-gradient(circle at 85% 0, rgba(29,119,187,.3), transparent 35vw), linear-gradient(150deg, #06162d, #0a2853); }
.tv-header { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.tv-header .eyebrow { margin-bottom: .25rem; color: #8ac3ed; font-size: 1.15vw; }
.tv-header h1 { font-size: clamp(2rem,4.1vw,4.5rem); line-height: 1; }
.tv-header p { margin: .35rem 0 0; color: #b8d1e4; font-size: 1.1vw; }
.tv-header .turn-clock { width: 6.5vw; height: 6.5vw; font-size: 3vw; }
.tv-header .turn-clock.paused { width: auto; min-width: clamp(7.5rem,9vw,10rem); height: clamp(3.5rem,4.75vw,5rem); padding: 0 clamp(1rem,1.25vw,1.5rem); border-radius: 999px; font-family: "DM Sans", sans-serif; font-size: clamp(.9rem,1.15vw,1.35rem); letter-spacing: .12em; white-space: nowrap; }
.tv-mystery-board { min-height: 0; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.tv-mystery-board .puzzle-rows { height: 100%; padding: 1.2vh 1vw; grid-template-rows: repeat(7,1fr); gap: .65vh; }
.tv-mystery-board .puzzle-row { min-height: 0; padding: .25vh .8vw; grid-template-columns: 2.4vw minmax(0,1fr) 2vw; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.94); }
.tv-mystery-board .row-number { width: 2vw; height: 2vw; font-size: .9vw; }
.tv-mystery-board .puzzle-word { column-gap: 1.35vw; row-gap: .23vw; }
.tv-mystery-board .puzzle-token { gap: .23vw; }
.tv-mystery-board .puzzle-cell { width: min(2.35vw,4.5vh); min-height: min(3.4vw,5.3vh); font-size: min(1.7vw,3.1vh); }
.tv-footer { display: grid; grid-template-columns: .8fr 1.1fr 2fr; align-items: center; gap: 2vw; }
.tv-footer > div { min-width: 0; }
.tv-footer .eyebrow { margin-bottom: .15rem; color: #8ac3ed; font-size: .8vw; }
.tv-footer strong, .tv-footer small { display: block; }
.tv-footer strong { overflow: hidden; font-size: 1.25vw; text-overflow: ellipsis; white-space: nowrap; }
.tv-footer small { color: #b8d1e4; font-size: .85vw; }
.tv-scores { width: 100%; min-width: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--score-columns,1), minmax(0,1fr)); align-self: stretch; align-content: center; gap: .4vh .45vw; list-style: none; }
.tv-scores li { min-width: 0; padding: .55vh .65vw; display: flex; align-items: center; justify-content: space-between; gap: .55vw; border: 1px solid rgba(255,255,255,.2); border-radius: .5vw; color: #d8e7f2; background: rgba(255,255,255,.06); font-size: clamp(.65rem,var(--score-font,.82vw),1.35rem); }
.tv-scores li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-scores li b { flex: 0 0 auto; font-size: 1.18em; }
.tv-scores li.active { color: white; border-color: var(--orange); background: rgba(244,122,52,.18); }

@media (min-width: 900px) {
    .thunders-layout { grid-template-columns: minmax(0,1fr) 20rem; }
}

@media (max-width: 759px) {
    .game-card.blue, .game-card.gold { grid-template-columns: 1fr; }
    .alphabet { grid-template-columns: repeat(6,1fr); }
    .answer-form { grid-template-columns: 1fr; }
    .answer-form .button { grid-column: auto; }
    .puzzle-cell { width: clamp(.85rem,4.5vw,1.25rem); min-height: 1.55rem; font-size: .78rem; }
    .board-heading { align-items: start; flex-direction: column; }
    .board-heading small { text-align: left; }
}

@media (max-width: 480px) {
    .setup-grid { grid-template-columns: 1fr; }
    .alphabet { grid-template-columns: repeat(5,1fr); }
    .answer-alphabet { grid-template-columns: repeat(7,1fr); }
    .puzzle-rows { padding: .4rem; }
    .puzzle-row { padding-inline: .35rem; grid-template-columns: 1.45rem minmax(0,1fr) 1rem; gap: .25rem; }
    .row-number { width: 1.35rem; height: 1.35rem; }
    .puzzle-word { column-gap: .9rem; row-gap: .18rem; }
    .puzzle-token { gap: .1rem; }
    .puzzle-cell { width: clamp(.7rem,4.1vw,1rem); min-height: 1.35rem; font-size: .68rem; }
    .separator-cell { width: .38rem; }
    .masked-answer-grid { column-gap: .55rem; }
    .masked-answer-grid .puzzle-token { gap: .12rem; }
    .missing-letter-input.puzzle-cell { width: clamp(1.15rem,6.5vw,1.55rem); min-height: 2rem; }
    .puzzle-row .missing-letter-input.puzzle-cell, .scripture-board .missing-letter-input.puzzle-cell { width: clamp(.78rem,4.2vw,1.15rem); min-height: 1.45rem; font-size: .72rem; }
}
