:root {
    --page: #f1e8da;
    --surface: #fffaf2;
    --surface-muted: #eee2d3;
    --ink: #2b2521;
    --muted: #756a61;
    --line: #ddcdbc;
    --accent: #bd493d;
    --accent-dark: #9d392f;
    --accent-soft: #f4dcd3;
    --success: #26704d;
    --success-soft: #dcecdf;
    --danger: #b53c52;
    --shadow: 0 18px 44px rgba(71, 48, 31, .1);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page: #0b0d0c;
    --surface: #131715;
    --surface-muted: #1c241f;
    --ink: #f1eee6;
    --muted: #b5b3aa;
    --line: #343d36;
    --accent: #df5a4d;
    --accent-dark: #bd4238;
    --accent-soft: #38201d;
    --success: #78c88e;
    --success-soft: #1e3526;
    --danger: #ff958a;
    --shadow: 0 18px 44px rgba(0, 0, 0, .32);
}

/* Puzzle-theme packs layer on top of light and dark mode. */
html[data-theme-pack="neon"] { --page: #eef0ff; --surface: #fbfaff; --surface-muted: #e4e5fb; --ink: #25233d; --muted: #6e6c8c; --line: #d1d2ed; --accent: #7c4dff; --accent-dark: #5d32d6; --accent-soft: #e9e1ff; --success: #0c9ca8; --success-soft: #d9f4f5; --danger: #d44c80; --shadow: 0 18px 44px rgba(62, 49, 130, .13); }
html[data-theme="dark"][data-theme-pack="neon"] { --page: #0c0b19; --surface: #17152a; --surface-muted: #22203b; --ink: #f4f1ff; --muted: #bbb6dc; --line: #383456; --accent: #a78bfa; --accent-dark: #8b6ce7; --accent-soft: #2e2551; --success: #55dbe3; --success-soft: #123d47; --danger: #ff89b0; --shadow: 0 18px 44px rgba(0, 0, 0, .42); }
html[data-theme-pack="ocean"] { --page: #e8f4f6; --surface: #f9feff; --surface-muted: #d9ecef; --ink: #183942; --muted: #5c7880; --line: #c4dfe4; --accent: #0c7ea6; --accent-dark: #086184; --accent-soft: #d7eef7; --success: #14826e; --success-soft: #d9f0e9; --danger: #c34d63; --shadow: 0 18px 44px rgba(20, 95, 112, .12); }
html[data-theme="dark"][data-theme-pack="ocean"] { --page: #07171b; --surface: #10282e; --surface-muted: #17363d; --ink: #e5f6f7; --muted: #a8c4c8; --line: #315158; --accent: #39b7de; --accent-dark: #2298bd; --accent-soft: #153d4b; --success: #56c8ad; --success-soft: #173d39; --danger: #ff92a2; --shadow: 0 18px 44px rgba(0, 0, 0, .4); }
html[data-theme-pack="candy"] { --page: #fff0f5; --surface: #fffafd; --surface-muted: #f6e2ec; --ink: #40253d; --muted: #806276; --line: #eacbda; --accent: #db4f8a; --accent-dark: #b9366e; --accent-soft: #fadce9; --success: #7f6bc8; --success-soft: #e9e3fa; --danger: #c94a50; --shadow: 0 18px 44px rgba(134, 49, 95, .12); }
html[data-theme="dark"][data-theme-pack="candy"] { --page: #1b0e18; --surface: #2a1427; --surface-muted: #3b1e37; --ink: #fff0f7; --muted: #deb4cb; --line: #59334f; --accent: #ff7eaf; --accent-dark: #e35d92; --accent-soft: #4b213e; --success: #b9a2ff; --success-soft: #342b59; --danger: #ff9a9f; --shadow: 0 18px 44px rgba(0, 0, 0, .44); }
html[data-theme-pack="jungle"] { --page: #edf3e5; --surface: #fcfff8; --surface-muted: #e1ecd8; --ink: #263825; --muted: #687a62; --line: #ccddc2; --accent: #b7791f; --accent-dark: #925d15; --accent-soft: #f6e8c9; --success: #38845a; --success-soft: #dceede; --danger: #b54a4c; --shadow: 0 18px 44px rgba(61, 94, 47, .12); }
html[data-theme="dark"][data-theme-pack="jungle"] { --page: #10170e; --surface: #1b2919; --surface-muted: #293b25; --ink: #eff7e9; --muted: #b9c9ad; --line: #465b40; --accent: #f1bd52; --accent-dark: #d79a32; --accent-soft: #473615; --success: #79cb82; --success-soft: #1f4529; --danger: #ff9790; --shadow: 0 18px 44px rgba(0, 0, 0, .42); }

* { box-sizing: border-box; }
html { min-height: 100%; color-scheme: light; font-size: 16px; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--page); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }

.site-header { display: flex; align-items: center; justify-content: space-between; max-width: 1240px; height: 72px; margin: auto; padding: 0 28px; }
.brand { color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: .03em; }
.brand span { display: inline-grid; width: 32px; height: 32px; margin-right: 9px; place-items: center; color: #fff; border-radius: 9px; background: var(--accent); font-size: 11px; letter-spacing: -.04em; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-note { color: var(--muted); font-size: 12px; }
.header-note span { margin: 0 7px; color: var(--line); }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 11px; cursor: pointer; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 11px; font-weight: 700; }
.theme-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
.theme-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 2px var(--surface); outline: 1px solid var(--accent); }
.theme-controls { display: flex; align-items: center; gap: 7px; }
.theme-picker { position: relative; }
.theme-picker summary { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; cursor: pointer; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 11px; font-weight: 700; list-style: none; }
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker[open] summary, .theme-picker summary:hover { border-color: var(--accent); background: var(--accent-soft); }
.theme-picker-icon { color: var(--accent); font-size: 14px; }
.theme-menu { position: absolute; top: calc(100% + 9px); right: 0; z-index: 20; width: 230px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.theme-menu p { margin: 3px 7px 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.theme-option { display: grid; grid-template-columns: 30px 1fr; width: 100%; gap: 9px; align-items: center; padding: 8px; cursor: pointer; text-align: left; border: 1px solid transparent; border-radius: 9px; background: transparent; }
.theme-option:hover, .theme-option.selected { border-color: var(--line); background: var(--surface-muted); }
.theme-option.selected { box-shadow: inset 3px 0 0 var(--accent); }
.theme-option b, .theme-option small { display: block; }
.theme-option b { font-size: 12px; }
.theme-option small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.theme-swatch { width: 30px; height: 30px; border: 2px solid rgba(255,255,255,.72); border-radius: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.theme-swatch.wordcraft { background: linear-gradient(135deg, #f1e8da 0 45%, #bd493d 45% 70%, #26704d 70%); }
.theme-swatch.neon { background: linear-gradient(135deg, #17152a 0 42%, #a78bfa 42% 70%, #55dbe3 70%); }
.theme-swatch.ocean { background: linear-gradient(135deg, #e8f4f6 0 42%, #0c7ea6 42% 70%, #14826e 70%); }
.theme-swatch.candy { background: linear-gradient(135deg, #fff0f5 0 42%, #db4f8a 42% 70%, #7f6bc8 70%); }
.theme-swatch.jungle { background: linear-gradient(135deg, #edf3e5 0 42%, #b7791f 42% 70%, #38845a 70%); }
.app-shell { min-height: calc(100vh - 72px); }
.screen { max-width: 1160px; margin: auto; padding: 48px 28px 64px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.eyebrow span { width: 20px; height: 1px; background: var(--line); }
h1, h2 { margin: 20px 0 18px; font-size: clamp(50px, 6vw, 78px); font-weight: 800; line-height: .98; letter-spacing: -.065em; }
h1 em, h2 em { color: var(--accent); font-style: normal; }
.lede { max-width: 510px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.hidden { display: none !important; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); align-items: center; gap: clamp(45px, 8vw, 120px); min-height: calc(100vh - 184px); }
.intro-panel { padding-bottom: 10px; }
.how-it-works { max-width: 440px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.how-it-works > div { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; }
.how-it-works > div > span { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; color: var(--accent); border: 1px solid var(--line); border-radius: 50%; font-size: 12px; font-weight: 800; }
.how-it-works p { margin: 0; }
.how-it-works strong { display: block; font-size: 13px; }
.how-it-works small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.setup-card { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.card-heading { display: flex; justify-content: space-between; padding-bottom: 14px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.card-heading b { color: var(--success); }
.setup-heading { margin-bottom: 22px; }
.account-hint { margin: -9px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.account-hint a { color: var(--accent); font-weight: 700; text-decoration: none; }
.account-hint strong { color: var(--ink); }
.profile-name-hint { margin: 7px 0 -8px; color: var(--muted); font-size: 10px; }
.setup-card > label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 700; }
input { width: 100%; height: 47px; padding: 0 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; outline: none; background: var(--surface); }
input::placeholder { color: #94a2b2; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.setting-block { margin-top: 22px; }
.setting-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.setting-label span { font-size: 12px; font-weight: 700; }
.setting-label small { color: var(--muted); font-size: 11px; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.option-grid.compact-options { grid-template-columns: repeat(3, 1fr); }
.mode-button, .duration-button, .length-button { min-height: 47px; padding: 8px 10px; text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.mode-button:hover, .duration-button:hover, .length-button:hover { border-color: var(--accent); }
.mode-button strong { display: block; font-size: 14px; }
.mode-button small { color: var(--muted); font-size: 11px; }
.duration-button, .length-button { text-align: center; font-size: 12px; font-weight: 700; }
.mode-button.active, .duration-button.active, .length-button.active { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.primary-button, .submit-button { width: 100%; height: 48px; margin-top: 22px; padding: 0 16px; cursor: pointer; border: 0; border-radius: 9px; color: #fff; background: var(--accent); font-size: 14px; font-weight: 700; }
.lobby-leave { width: 100%; height: 40px; margin-top: 10px; }
.lobby-ready { width: 100%; height: 40px; margin-top: 18px; color: var(--success); border-color: var(--success); }
.auto-start-countdown { max-width: 820px; margin: 20px auto -14px; padding: 13px 16px; color: var(--accent-dark); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 9px; background: var(--accent-soft); font-size: 14px; font-weight: 800; text-align: center; }
.primary-button:hover, .submit-button:hover { background: var(--accent-dark); }
.primary-button span, .submit-button span { float: right; }
.divider { height: 0; margin: 26px 0 21px; text-align: center; border-top: 1px solid var(--line); }
.divider span { position: relative; top: -8px; padding: 0 10px; color: var(--muted); background: var(--surface); font-size: 10px; letter-spacing: .08em; }
.join-row { display: grid; grid-template-columns: 1fr 80px; gap: 8px; }
.join-row input { letter-spacing: .08em; }
.join-row button, .code-card button, #leave-game, .secondary-button { cursor: pointer; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 700; }
.join-row button:hover, .code-card button:hover, #leave-game:hover, .secondary-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.error-message { min-height: 18px; margin: 9px 0 0; color: var(--danger); font-size: 12px; }
.success-message { margin: 18px auto 0; color: var(--success); font-size: 13px; text-align: center; }
.account-nav { display: flex; align-items: center; gap: 13px; }
.account-nav a { color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.account-nav a:hover { color: var(--accent); }

.section-intro { max-width: 820px; margin: 0 auto; text-align: center; }
.section-intro .eyebrow { justify-content: center; }
.lobby-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; max-width: 820px; margin: 34px auto; }
.code-card, .players-card, aside, .found { padding: 25px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.code-card small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.code-card strong { display: block; margin: 15px 0 18px; color: var(--accent); font-size: 52px; font-weight: 800; letter-spacing: .12em; }
.code-card button { width: 100%; height: 42px; }
.code-card .invite-button { margin-top: 8px; }
.code-card p, .players-card > p { color: var(--muted); font-size: 12px; text-align: center; }
.room-settings { margin-top: 19px; padding-top: 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; }
.connection-status { margin: 14px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.connection-status.connected { color: var(--success); }
.connection-status.reconnecting { color: var(--accent); }
.player-row, .score-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--surface-muted); }
.player-row b, .score-row b { font-size: 15px; font-weight: 700; }
.player-row small { margin-left: auto; color: var(--muted); font-size: 10px; }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; color: var(--accent-dark); border-radius: 8px; background: var(--accent-soft); font-size: 15px; font-weight: 800; }

.game-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.game-top > div small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.game-top > div strong { font-size: 20px; font-weight: 800; }
.game-top .timer { text-align: center; }
.game-top .timer strong { color: var(--accent); font-size: 32px; font-variant-numeric: tabular-nums; }
#leave-game { padding: 9px 14px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; margin-top: 38px; }
.play-area { text-align: center; }
.tap-hint { margin: 14px auto 0; color: var(--muted); font-size: 13px; }
.letter-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 590px; margin: 27px auto; }
.tile { min-width: 0; min-height: 76px; padding: 0; cursor: pointer; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 5px 12px rgba(23, 35, 52, .06); font-size: 33px; font-weight: 800; transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile.selected { color: #112319; border-color: var(--success); background: var(--success); }
#word-form { display: grid; max-width: 590px; margin: auto; gap: 10px; }
#word-form input { height: 55px; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: .14em; }
.word-actions { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px; }
.secondary-button, .submit-button { height: 46px; }
.submit-button { margin-top: 0; }
.found { max-width: 640px; margin: 28px auto 0; text-align: left; }
.found > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.word-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.word-list span { padding: 6px 10px; color: var(--success); border-radius: 7px; background: var(--success-soft); font-size: 12px; font-weight: 700; }
.word-list em { color: var(--muted); font-size: 12px; }
.score-row { display: grid; grid-template-columns: 30px 1fr auto; text-align: left; }
.score-row .rank { color: var(--muted); font-size: 18px; font-weight: 700; }
.score-row strong { color: var(--accent); font-size: 21px; font-weight: 800; }
.score-row small { display: block; color: var(--muted); font-size: 10px; }
.result-modal { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 18px; background: rgba(43, 37, 33, .45); }
.result-modal > div { width: min(92vw, 480px); padding: 36px; text-align: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.result-modal h2 { margin: 18px 0; font-size: 56px; }
.result-modal > div > small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.result-modal .score-row { text-align: left; }
.result-modal .primary-button { width: 190px; }
.result-exit { width: 190px; height: 42px; margin-top: 10px; }
.result-modal .muted-copy { margin: 14px 0 0; }

.profile-shell, .leaderboard-shell { max-width: 920px; margin: auto; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 34px; }
.profile-card, .stats-card, .history-card, .leaderboard-card { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.profile-form label { display: block; margin: 22px 0 9px; font-size: 12px; font-weight: 700; }
.profile-form .primary-button { margin-top: 14px; }
.visibility-form { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.visibility-form label { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.visibility-form input { width: auto; height: auto; margin-top: 2px; accent-color: var(--accent); }
.visibility-form .secondary-button { width: 100%; height: 40px; margin-top: 12px; }
.history-delete-form { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.history-delete-form label { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.history-delete-form input { width: auto; height: auto; margin-top: 2px; accent-color: var(--danger); }
.history-delete-form .danger-button { width: 100%; height: 40px; margin-top: 12px; color: var(--danger); border-color: var(--danger); }
.muted-copy, .leaderboard-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.rating-number { display: block; margin: 20px 0 26px; color: var(--accent); font-size: 54px; line-height: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-grid > div { padding: 12px; border-radius: 9px; background: var(--surface-muted); }
.stat-grid b, .stat-grid small { display: block; }
.stat-grid b { font-size: 20px; }
.stat-grid small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.history-card, .leaderboard-card { margin-top: 20px; }
.history-card .card-heading a { color: var(--accent); font-size: 10px; text-decoration: none; }
.history-row, .public-score-row { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--surface-muted); }
.history-row:last-child, .public-score-row:last-child { border-bottom: 0; }
.history-row b, .public-score-row b { display: block; font-size: 13px; }
.history-row small, .public-score-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.history-row time { color: var(--muted); font-size: 10px; }
.history-result { font-size: 11px; font-weight: 800; }
.history-result.win { color: var(--success); }
.history-result.loss { color: var(--muted); }
.empty-state { margin: 20px 0 0; color: var(--muted); font-size: 13px; }
.leaderboard-intro { margin-bottom: 34px; }
.page-actions { display: flex; justify-content: center; margin-top: 23px; }
.home-return-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; text-decoration: none; }
.leaderboard-card { max-width: 720px; margin-right: auto; margin-left: auto; }
.public-score-row { grid-template-columns: 48px 1fr auto; }
.public-score-row .rank { color: var(--muted); font-size: 18px; font-weight: 800; }
.public-score-row > strong { color: var(--accent); font-size: 21px; }
.leaderboard-note { max-width: 720px; margin: 17px auto; text-align: center; }

.identity-shell { display: grid; min-height: calc(100vh - 72px); padding: 42px 18px 70px; place-items: center; background: radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--accent-soft) 72%, transparent), transparent 33%), radial-gradient(circle at 86% 78%, color-mix(in srgb, var(--success-soft) 75%, transparent), transparent 31%); }
.identity-card { width: min(100%, 460px); padding: 36px; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 95%, transparent); box-shadow: var(--shadow); }
.identity-mark { display: grid; width: 42px; height: 42px; margin: 0 auto 20px; place-items: center; color: #fff; border-radius: 13px; background: var(--accent); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 28%, transparent); font-size: 13px; font-weight: 900; letter-spacing: -.05em; }
.identity-kicker { margin: 0; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .15em; text-align: center; }
.identity-card h1 { margin: 12px 0 12px; font-size: clamp(34px, 7vw, 48px); line-height: 1; text-align: center; }
.identity-copy { max-width: 340px; margin: 0 auto 25px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.external-login-form { margin: 0; }
.google-button { display: flex; width: 100%; height: 48px; gap: 11px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 800; }
.google-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.google-button svg { width: 19px; height: 19px; }
.google-button.unavailable { cursor: default; color: var(--muted); border-style: dashed; background: var(--surface-muted); font-size: 12px; }
.google-letter { color: #4285f4; font-size: 18px; font-weight: 900; }
.identity-divider { height: 0; margin: 28px 0 23px; text-align: center; border-top: 1px solid var(--line); }
.identity-divider span { position: relative; top: -8px; padding: 0 11px; color: var(--muted); background: var(--surface); font-size: 9px; font-weight: 800; letter-spacing: .11em; }
.identity-form label:not(.remember-row) { display: block; margin: 17px 0 8px; font-size: 12px; font-weight: 800; }
.identity-form input[type="email"], .identity-form input[type="password"] { height: 49px; }
.remember-row { display: flex; gap: 9px; align-items: center; margin: 17px 0 0; color: var(--muted); font-size: 12px; }
.remember-row input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.identity-submit { margin-top: 23px; }
.identity-switch { margin: 22px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.identity-switch a { color: var(--accent); font-weight: 800; text-decoration: none; }
.identity-switch a:hover { text-decoration: underline; }
.identity-error { display: block; margin-top: 6px; color: var(--danger); font-size: 11px; line-height: 1.4; }
.identity-form > .identity-error:empty { display: none; }

@media (max-width: 820px) {
    .home-grid { grid-template-columns: 1fr; min-height: 0; gap: 34px; }
    .intro-panel { max-width: 650px; margin: auto; text-align: center; }
    .intro-panel .eyebrow { justify-content: center; }
    .lede { margin: auto; }
    .how-it-works { margin: 28px auto 0; text-align: left; }
    .lobby-layout, .game-layout { grid-template-columns: 1fr; }
    .game-layout aside { order: -1; }
}

@media (max-width: 560px) {
    .site-header { height: 64px; padding: 0 18px; }
    .brand { font-size: 15px; }
    .header-note { display: none; }
    .account-nav { gap: 8px; }
    .account-nav a:nth-child(2) { display: none; }
    .theme-picker summary { width: 34px; justify-content: center; padding: 0; }
    .theme-picker summary #theme-pack-label { display: none; }
    .theme-menu { right: -2px; width: min(230px, calc(100vw - 36px)); }
    .identity-shell { min-height: calc(100vh - 64px); padding: 25px 16px 48px; }
    .identity-card { padding: 28px 22px; border-radius: 18px; }
    .screen { padding: 34px 18px 50px; }
    h1, h2 { font-size: 52px; }
    .setup-card, .code-card, .players-card, aside, .found { padding: 20px; }
    .settings-row { grid-template-columns: 1fr; gap: 0; }
    .letter-board { gap: 8px; margin: 22px auto; }
    .tile { min-height: 59px; font-size: 28px; }
    .game-top > div:first-child { display: none; }
    .game-top .timer strong { font-size: 29px; }
    .code-card strong { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Arcade portal shell: the game remains a focused app while the site is ready
   to host more games beside it. */
.arcade-body { color: #f5f6ff; background: #0b0d16; }
.arcade-body main { min-height: calc(100vh - 64px); background: #0b0d16; }
.arcade-header { width: 100%; max-width: none; height: 64px; padding: 0 24px; color: #f5f6ff; background: #191b2a; border-bottom: 1px solid #2a2d43; }
.arcade-header-left, .arcade-header .header-actions { display: flex; align-items: center; }
.arcade-header-left { gap: 16px; }
.arcade-menu-button { display: grid; width: 28px; height: 34px; padding: 0; place-items: center; cursor: pointer; color: #d9dcf4; border: 0; background: transparent; font-size: 23px; line-height: 1; }
.arcade-menu-button:hover { color: #9b91ff; }
.arcade-brand { display: inline-flex; align-items: center; gap: 8px; color: #f5f6ff; font-size: 14px; letter-spacing: 0; line-height: .88; }
.arcade-brand span { width: 34px; height: 34px; margin: 0; border-radius: 11px; background: linear-gradient(135deg, #8b80ff, #6057de); box-shadow: 0 5px 16px rgba(111, 98, 255, .35); font-size: 11px; }
.arcade-brand strong { font-size: 13px; letter-spacing: .02em; }
.arcade-search { display: flex; width: min(460px, 34vw); height: 38px; gap: 10px; align-items: center; margin: 0 auto; padding: 0 14px; color: #969bb8; border-radius: 20px; background: #30334e; font-size: 13px; font-weight: 600; }
.arcade-search > span:first-child { color: #e0e2f4; font-size: 23px; line-height: 1; }
.arcade-search kbd { margin-left: auto; padding: 2px 7px; color: #9da2bf; border: 1px solid #565a78; border-radius: 5px; background: #262941; font-size: 11px; }
.arcade-header .header-actions { gap: 13px; }
.arcade-header .account-nav { gap: 9px; }
.arcade-header .account-nav a { padding: 9px 12px; color: #d9dbef; border-radius: 18px; font-weight: 700; text-decoration: none; }
.arcade-header .account-nav a:hover, .arcade-header .account-nav a:focus-visible { color: #fff; background: #30334e; }
.arcade-header .account-nav .arcade-nav-chip { color: #fff; background: #30334e; }
.arcade-header .header-note { display: none; }
.arcade-header .theme-toggle, .arcade-header .theme-picker summary { color: #d9dbef; border-color: #343750; background: #25283c; }
.arcade-header .theme-toggle:hover, .arcade-header .theme-picker summary:hover { border-color: #776cff; background: #30334e; }

.arcade-workspace { display: grid; grid-template-columns: 52px minmax(0, 1fr) 286px; gap: 18px; max-width: 1540px; margin: 0 auto; padding: 16px 20px 52px; }
.arcade-rail { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 40px; }
.rail-item { display: grid; width: 42px; height: 42px; place-items: center; color: #777d9f; border-radius: 12px; font-size: 20px; font-weight: 800; text-decoration: none; }
.rail-item:hover, .rail-item:focus-visible, .rail-item.active { color: #fff; background: #272a42; box-shadow: inset 0 0 0 1px #383d5e; }
.rail-item.active { color: #9c92ff; }
.arcade-main-column { min-width: 0; }
.arcade-breadcrumb { display: flex; gap: 8px; align-items: center; min-height: 28px; color: #727896; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.arcade-breadcrumb b { color: #4c516e; font-size: 17px; font-weight: 500; }
.arcade-breadcrumb strong { color: #bfc3df; }
.arcade-main-column .app-shell { min-height: 0; overflow: hidden; border: 1px solid #2a2d43; border-radius: 12px; background: #121522; box-shadow: 0 18px 60px rgba(0, 0, 0, .32); }
.arcade-main-column .screen { max-width: none; padding: 32px 30px 38px; }
.arcade-main-column .home-screen { background: radial-gradient(circle at 12% 12%, rgba(101, 90, 229, .13), transparent 32%), #121522; }
.arcade-body .eyebrow { color: #8288a7; }
.arcade-body .eyebrow span { background: #4a4f6c; }
.arcade-body h1, .arcade-body h2 { color: #f4f5ff; }
.arcade-body .lede, .arcade-body .how-it-works small, .arcade-body .muted-copy { color: #9499b4; }
.arcade-body .how-it-works { border-color: #2d314a; }
.arcade-body .how-it-works > div > span { color: #9b91ff; border-color: #414664; }
.arcade-body .setup-card, .arcade-body .code-card, .arcade-body .players-card, .arcade-body #game-screen aside { border-color: #30344e; background: #1a1d2d; box-shadow: 0 16px 38px rgba(0, 0, 0, .24); }
.arcade-body .card-heading { color: #8c92b0; border-color: #30344e; }
.arcade-body .card-heading b { color: #54d895; }
.arcade-body .account-hint, .arcade-body .profile-name-hint, .arcade-body .setting-label small { color: #9298b5; }
.arcade-body .account-hint strong, .arcade-body .setup-card > label, .arcade-body .setting-label span { color: #eef0fb; }
.arcade-body input, .arcade-body .mode-button, .arcade-body .duration-button, .arcade-body .length-button { color: #f2f3fc; border-color: #3a3e59; background: #202438; }
.arcade-body input::placeholder { color: #7d849f; }
.arcade-body .mode-button:hover, .arcade-body .duration-button:hover, .arcade-body .length-button:hover { border-color: #8b80ff; }
.arcade-body .mode-button.active, .arcade-body .duration-button.active, .arcade-body .length-button.active { color: #dcd8ff; border-color: #8176ff; background: #302c59; }
.arcade-body .primary-button, .arcade-body .submit-button { color: #fff; background: linear-gradient(135deg, #786cff, #5d54dc); box-shadow: 0 8px 20px rgba(105, 91, 255, .25); }
.arcade-body .primary-button:hover, .arcade-body .submit-button:hover { background: linear-gradient(135deg, #8b80ff, #6c61eb); }
.arcade-body .secondary-button, .arcade-body .join-row button, .arcade-body #copy-code, .arcade-body #copy-invite, .arcade-body #leave-game { color: #d7daf0; border-color: #3b405c; background: #25293e; }
.arcade-body .secondary-button:hover, .arcade-body .join-row button:hover, .arcade-body #copy-code:hover, .arcade-body #copy-invite:hover, .arcade-body #leave-game:hover { border-color: #8176ff; background: #30334e; }

.arcade-body #lobby-screen, .arcade-body #game-screen { background: #121522; }
.arcade-body .auto-start-countdown { color: #fff; border-color: #5147a6; background: #302c59; box-shadow: 0 8px 24px rgba(101, 87, 255, .18); }
.arcade-body .player-row { border-color: #2d314a; background: #202438; }
.arcade-body .player-row .avatar { color: #fff; background: #6157df; }
.arcade-body .player-row small, .arcade-body .players-card > p, .arcade-body .code-card p, .arcade-body .connection-status { color: #9298b5; }
.arcade-body .room-settings { color: #bfc3df; border-color: #353a56; background: #202438; }

.arcade-body #game-screen { padding: 0; background: #10131f; }
.arcade-body #game-screen .game-top { margin: 0; padding: 14px 22px; border-bottom: 1px solid #2e334b; background: #202438; }
.arcade-body #game-screen .game-top small { color: #8389a8; }
.arcade-body #game-screen .game-top strong, .arcade-body #game-screen .timer strong { color: #f6f7ff; }
.arcade-body #game-screen .timer strong { color: #9c92ff; }
.arcade-body #game-screen .game-layout { gap: 18px; padding: 18px; }
.arcade-body #game-screen .play-area { min-height: 480px; padding: 28px; border: 1px solid #303650; border-radius: 10px; background: radial-gradient(circle at 50% 0%, rgba(111, 99, 255, .12), transparent 42%), #171b2b; }
.arcade-body #game-screen .tap-hint { color: #9ba1be; }
.arcade-body #game-screen .letter-board { max-width: 660px; }
.arcade-body #game-screen .tile { color: #f4f3ff; border-color: #484e72; background: linear-gradient(145deg, #353b5b, #242942); box-shadow: 0 6px 0 #171a29, 0 10px 20px rgba(0, 0, 0, .2); }
.arcade-body #game-screen .tile:hover, .arcade-body #game-screen .tile.selected { color: #fff; border-color: #a49bff; background: linear-gradient(145deg, #7165e9, #5048b6); }
.arcade-body #game-screen #word-input { color: #fff; border-color: #4b5276; background: #10131f; font-size: 21px; font-weight: 800; letter-spacing: .12em; }
.arcade-body #game-screen aside { padding: 21px; }
.arcade-body #game-screen .score-row { border-color: #2f344d; }
.arcade-body #game-screen .score-row strong { color: #a49bff; }
.arcade-body #game-screen .score-row .rank, .arcade-body #game-screen .score-row small { color: #858ba9; }
.arcade-body .result-modal { background: rgba(5, 6, 12, .78); }

.arcade-title-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 12px; padding: 15px 18px; border: 1px solid #2a2e45; border-radius: 10px; background: #1b1e2e; }
.arcade-title-bar small { color: #8187a4; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.arcade-title-bar h2 { margin: 5px 0 0; color: #f7f7ff; font-size: 22px; letter-spacing: -.035em; }
.arcade-title-actions { display: flex; gap: 8px; align-items: center; color: #9ca2bd; font-size: 11px; font-weight: 700; }
.arcade-title-actions span, .arcade-title-actions a { padding: 9px 11px; border: 1px solid #353a55; border-radius: 8px; }
.arcade-title-actions a { color: #beb8ff; text-decoration: none; }
.arcade-title-actions a:hover { border-color: #8176ff; background: #302c59; }
.arcade-next-games { min-width: 0; padding-top: 40px; }
.next-games-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; color: #f4f5ff; font-size: 12px; font-weight: 800; }
.next-games-heading a { color: #9c92ff; font-size: 10px; text-decoration: none; }
.arcade-game-card { margin-bottom: 12px; color: #f4f5ff; }
.arcade-game-card strong, .arcade-game-card small { display: block; }
.arcade-game-card strong { margin: 8px 5px 0; font-size: 13px; }
.arcade-game-card small { margin: 3px 5px 0; color: #858ba9; font-size: 10px; }
.game-thumb { display: flex; height: 132px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 16px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 11px; box-shadow: inset 0 -30px 50px rgba(0, 0, 0, .2); }
.game-thumb b { color: #fff; font-size: 23px; line-height: .9; letter-spacing: -.06em; text-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
.game-thumb span { color: rgba(255,255,255,.78); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.thumb-words { background: linear-gradient(135deg, #3c7da3, #70c6da 48%, #1f4c72); }
.thumb-sprint { background: linear-gradient(135deg, #8150d1, #e04f9b 50%, #f6a34b); }
.thumb-duel { background: linear-gradient(135deg, #134fd6, #23a5d9 47%, #152f88); }

@media (max-width: 1120px) {
    .arcade-workspace { grid-template-columns: 44px minmax(0, 1fr); }
    .arcade-next-games { display: none; }
}
@media (max-width: 820px) {
    .arcade-header { padding: 0 15px; }
    .arcade-search { width: auto; flex: 1; margin: 0 14px; }
    .arcade-header .account-nav a:not(.arcade-nav-chip) { display: none; }
    .arcade-workspace { gap: 10px; padding: 10px 10px 35px; }
    .arcade-rail { padding-top: 35px; }
    .arcade-main-column .screen { padding: 25px 20px 30px; }
    .arcade-body #game-screen .game-layout { padding: 12px; }
    .arcade-body #game-screen .play-area { padding: 22px 16px; }
}
@media (max-width: 560px) {
    .arcade-header { height: 58px; }
    .arcade-brand strong, .arcade-search kbd { display: none; }
    .arcade-search { height: 34px; margin: 0 8px; font-size: 11px; }
    .arcade-header .theme-controls { display: none; }
    .arcade-workspace { display: block; padding: 7px 8px 26px; }
    .arcade-rail { display: none; }
    .arcade-breadcrumb { padding: 0 4px; font-size: 8px; }
    .arcade-main-column .app-shell { border-radius: 9px; }
    .arcade-main-column .screen { padding: 22px 15px 26px; }
    .arcade-title-bar { align-items: flex-start; flex-direction: column; gap: 11px; }
    .arcade-title-actions { flex-wrap: wrap; }
    .arcade-body #game-screen .game-top { padding: 12px 14px; }
    .arcade-body #game-screen .game-top > div:first-child { display: flex; flex-direction: column; }
}

/* Game-library home page. It intentionally contains catalog cards only; the
   actual room and game controls live at /game/spelling-battle. */
.arcade-catalog-layout { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 22px; max-width: 1540px; min-height: calc(100vh - 64px); margin: 0 auto; padding: 25px 20px 60px; }
.catalog-rail { padding-top: 3px; }
.catalog-main { min-width: 0; }
.catalog-section { margin-bottom: 40px; }
.catalog-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; }
.catalog-heading h1, .catalog-heading h2 { margin: 0; color: #f6f7ff; font-size: 25px; font-weight: 800; letter-spacing: -.04em; }
.catalog-heading > span { color: #e0e2f2; font-size: 29px; line-height: 1; }
.continue-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: #3b405b transparent; }
.continue-card { display: block; width: 104px; flex: 0 0 104px; color: #f5f6ff; font-size: 11px; font-weight: 800; text-decoration: none; }
.continue-card > span { display: block; overflow: hidden; margin-top: 7px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-thumb { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; color: #fff; border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; background: #282d52; box-shadow: inset 0 -45px 60px rgba(0, 0, 0, .3), 0 8px 20px rgba(0, 0, 0, .2); }
.catalog-thumb::before { position: absolute; inset: 0; content: ""; opacity: .48; background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.12) 19px 20px); }
.catalog-thumb > * { position: relative; z-index: 1; }
.continue-card .catalog-thumb { height: 92px; padding: 10px; border-radius: 12px; }
.catalog-thumb .thumb-badge { position: absolute; top: 8px; left: 8px; display: grid; width: 22px; height: 22px; place-items: center; color: #fff; border-radius: 7px; background: #6b5fe4; font-size: 8px; font-weight: 900; }
.catalog-thumb strong { font-size: 18px; line-height: .88; letter-spacing: -.07em; text-shadow: 2px 2px 0 rgba(0,0,0,.25); }
.catalog-thumb small { margin-top: 6px; color: rgba(255,255,255,.78); font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.spelling-thumb { background: linear-gradient(140deg, #25204f 0%, #5f45bf 47%, #cf4a91 100%); }
.imposter-thumb { background: linear-gradient(140deg, #172d5d 0%, #356fd0 48%, #1fc0bc 100%); }
.imposter-thumb .thumb-badge { background: #1b9c9a; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 17px; }
.catalog-game-card { display: block; max-width: 430px; color: #f5f6ff; text-decoration: none; }
.catalog-game-card:hover .catalog-thumb, .continue-card:hover .catalog-thumb { border-color: #9c92ff; transform: translateY(-2px); }
.catalog-game-card .catalog-thumb { height: 188px; padding: 18px; transition: transform .18s ease, border-color .18s ease; }
.catalog-game-card .catalog-thumb strong { font-size: 38px; }
.catalog-game-card .catalog-thumb small { font-size: 9px; }
.catalog-card-copy { display: flex; flex-direction: column; gap: 4px; padding: 10px 5px 0; }
.catalog-card-copy strong { font-size: 14px; }
.catalog-card-copy span { color: #858ba9; font-size: 11px; }
.catalog-empty { display: flex; max-width: 680px; gap: 15px; align-items: center; margin-top: 58px; padding: 22px 24px; border: 1px solid #2e334b; border-radius: 13px; background: #151827; }
.empty-sparkle { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; color: #a49bff; border-radius: 11px; background: #302c59; font-size: 18px; }
.catalog-empty h2 { margin: 0; color: #f5f6ff; font-size: 16px; letter-spacing: -.02em; }
.catalog-empty p { margin: 5px 0 0; color: #8b91ad; font-size: 12px; }

.game-launch-screen { min-height: 610px; }
.game-launch-card { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(190px, .8fr) minmax(320px, 1fr); gap: 28px; align-items: center; min-height: 545px; }
.launch-art { height: 330px; padding: 25px; border-radius: 18px; }
.launch-art .thumb-badge { width: 36px; height: 36px; font-size: 12px; }
.launch-art strong { font-size: clamp(37px, 5vw, 65px); }
.launch-art small { font-size: 10px; }
.launch-copy h1 { margin-top: 17px; }
.launch-copy .account-hint { margin-top: 24px; }
.launch-setup-card { width: 100%; }

@media (max-width: 1120px) {
    .game-launch-card { grid-template-columns: minmax(180px, .8fr) minmax(250px, 1fr); }
    .launch-copy { order: -1; }
    .launch-setup-card { grid-column: 1 / -1; }
    .launch-art { height: 250px; }
}
@media (max-width: 700px) {
    .arcade-catalog-layout { display: block; padding: 18px 13px 42px; }
    .catalog-rail { display: none; }
    .catalog-section { margin-bottom: 31px; }
    .catalog-heading h1, .catalog-heading h2 { font-size: 21px; }
    .catalog-grid { grid-template-columns: 1fr; }
    .catalog-game-card { max-width: none; }
    .game-launch-screen { min-height: 0; }
    .game-launch-card { display: flex; flex-direction: column; gap: 22px; align-items: stretch; min-height: 0; }
    .launch-copy { order: 0; }
    .launch-art { height: 220px; }
    .launch-setup-card { grid-column: auto; }
}

/* Imposter: a separate party-game surface inside the shared arcade shell. */
.imposter-app-shell { background: #111420; }
.imposter-screen { min-height: 620px; padding: 38px; }
.imposter-hero { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; align-items: center; max-width: 820px; margin: 0 auto 33px; }
.imposter-emblem { display: grid; width: 92px; height: 92px; place-items: center; border: 1px solid #675bdc; border-radius: 27px; background: radial-gradient(circle at 35% 25%, #958aff, #5146ad 68%, #2b275a); box-shadow: 0 16px 30px rgba(84, 70, 211, .27), inset 0 0 0 7px rgba(255,255,255,.06); transform: rotate(-7deg); }
.imposter-emblem span { color: #fff; font-size: 53px; font-weight: 900; transform: rotate(7deg); }
.imposter-hero h1 { margin: 14px 0; font-size: clamp(45px, 6vw, 72px); }
.imposter-hero .lede { max-width: 630px; font-size: 14px; }
.imposter-setup-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 18px; max-width: 1060px; margin: auto; }
.imposter-card, .imposter-chat-card { padding: 23px; border: 1px solid #303650; border-radius: 14px; background: #1a1e2f; box-shadow: 0 15px 33px rgba(0,0,0,.2); }
.imposter-card label { display: block; margin: 16px 0 7px; color: #eceefb; font-size: 11px; font-weight: 800; }
.imposter-card label small { margin-left: 5px; color: #858ba8; font-size: 9px; font-weight: 600; }
.imposter-card input, .imposter-card select { width: 100%; height: 43px; padding: 0 11px; color: #f4f5ff; border: 1px solid #3b415e; border-radius: 8px; outline: none; background: #22263b; }
.imposter-card select { cursor: pointer; }
.imposter-card input:focus, .imposter-card select:focus { border-color: #8b80ff; box-shadow: 0 0 0 3px rgba(124,110,255,.16); }
.imposter-card .primary-button { width: 100%; margin-top: 21px; }
.imposter-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.imposter-form-row label { margin-top: 14px; }
.imposter-side-actions { display: flex; flex-direction: column; gap: 18px; }
.imposter-quick-card { display: grid; grid-template-columns: 48px 1fr; gap: 3px 11px; align-items: center; padding: 20px; cursor: pointer; text-align: left; color: #f4f5ff; border: 1px solid #5146ae; border-radius: 14px; background: linear-gradient(135deg, #2c275c, #1d2135 72%); box-shadow: 0 13px 28px rgba(52, 40, 155, .2); }
.imposter-quick-card:hover { border-color: #9a91ff; transform: translateY(-2px); }
.imposter-quick-card strong { font-size: 16px; }
.imposter-quick-card small { color: #adb0cc; font-size: 11px; }
.imposter-quick-card > b { grid-column: 2; margin-top: 8px; color: #bcb7ff; font-size: 11px; }
.quick-icon { display: grid; width: 43px; height: 43px; grid-row: 1 / span 3; place-items: center; color: #fff; border-radius: 13px; background: #7165e6; font-size: 22px; }
.join-imposter-card { flex: 1; }
.join-imposter-card .secondary-button { width: 100%; margin-top: 19px; }
.imposter-lobby-head, .imposter-game-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: 1060px; margin: auto auto 26px; }
.imposter-lobby-head h2, .imposter-game-head h2 { margin: 12px 0 0; font-size: clamp(34px, 5vw, 57px); }
.imposter-lobby-head .eyebrow, .imposter-game-head .eyebrow { text-transform: uppercase; }
.imposter-code-block { min-width: 155px; padding: 15px; text-align: center; border: 1px solid #3a3e5b; border-radius: 12px; background: #1b2032; }
.imposter-code-block small, .imposter-code-block strong { display: block; }
.imposter-code-block small { color: #858ba7; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.imposter-code-block strong { margin: 8px 0 10px; color: #aaa2ff; font-size: 28px; letter-spacing: .13em; }
.imposter-code-block button { width: 100%; height: 34px; font-size: 10px; }
.imposter-countdown { max-width: 1060px; margin: 0 auto 18px; padding: 13px 16px; color: #e9e6ff; border: 1px solid #6459d3; border-radius: 9px; background: #302c59; font-size: 12px; font-weight: 800; text-align: center; }
.imposter-lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .63fr); gap: 18px; max-width: 1060px; margin: auto; }
.lobby-players-card { min-height: 420px; }
.imposter-player-row { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 0; border-bottom: 1px solid #2d324a; }
.imposter-player-row:last-child { border-bottom: 0; }
.imposter-avatar { display: inline-grid; width: 33px; height: 33px; flex: 0 0 33px; place-items: center; color: #fff; border-radius: 10px; background: #655bd6; font-size: 12px; font-weight: 900; }
.imposter-player-row div { min-width: 0; flex: 1; }
.imposter-player-row strong, .imposter-player-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imposter-player-row strong { color: #f2f3fc; font-size: 13px; }
.imposter-player-row small { margin-top: 3px; color: #858ca9; font-size: 10px; }
.remove-imposter-player { width: 28px; height: 28px; cursor: pointer; color: #9ca1be; border: 0; border-radius: 7px; background: transparent; font-size: 21px; }
.remove-imposter-player:hover { color: #ff8c9e; background: #3d273d; }
.imposter-lobby-actions { display: flex; gap: 8px; margin-top: 18px; }
.imposter-lobby-actions button { flex: 1; height: 43px; }
.imposter-lobby-actions button:only-child { flex: none; width: 100%; }
.imposter-chat-card { display: flex; min-height: 420px; flex-direction: column; }
.imposter-chat-list { min-height: 80px; max-height: 300px; flex: 1; overflow-y: auto; padding: 11px 0; }
.imposter-chat-list > div { padding: 7px 0; }
.imposter-chat-list strong { display: block; color: #aaa2ff; font-size: 10px; }
.imposter-chat-list span { display: block; margin-top: 2px; color: #d3d5e7; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.imposter-chat-list em { color: #7f86a3; font-size: 11px; }
.imposter-chat-form { display: flex; gap: 7px; padding-top: 10px; border-top: 1px solid #30354d; }
.imposter-chat-form input { height: 38px; }
.imposter-chat-form button { width: 39px; flex: 0 0 39px; cursor: pointer; color: #fff; border: 0; border-radius: 8px; background: #665bdc; }
.imposter-game-head { margin-bottom: 18px; }
.imposter-phase-meta { display: flex; min-width: 105px; flex-direction: column; align-items: flex-end; padding: 11px 14px; border: 1px solid #343a56; border-radius: 10px; background: #1b2032; }
.imposter-phase-meta span, .imposter-phase-meta strong { display: block; }
.imposter-phase-meta span { color: #898fab; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.imposter-phase-meta strong { margin-top: 4px; color: #aaa2ff; font-size: 20px; }
.imposter-role-panel { max-width: 720px; margin: 0 auto 25px; padding: 34px; text-align: center; border: 1px solid #3b4161; border-radius: 18px; background: radial-gradient(circle at 50% 0, rgba(115,102,236,.18), transparent 50%), #1a1e2f; box-shadow: 0 18px 39px rgba(0,0,0,.25); }
.role-mark, .results-mark { display: grid; width: 62px; height: 62px; margin: 0 auto 16px; place-items: center; color: #fff; border-radius: 20px; background: #39ae77; box-shadow: 0 8px 20px rgba(57,174,119,.24); font-size: 32px; font-weight: 900; }
.role-mark.imposter-mark, .results-mark { background: #bd547d; box-shadow: 0 8px 20px rgba(189,84,125,.25); }
.role-kicker { margin: 0; color: #8e95b2; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.imposter-role-panel h2 { margin: 12px 0 9px; color: #fff; font-size: clamp(28px, 4vw, 41px); }
.imposter-role-panel > p:not(.role-kicker) { max-width: 490px; margin: auto; color: #abb0c8; font-size: 13px; line-height: 1.6; }
.secret-details { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 9px; margin: 25px 0; text-align: left; }
.secret-details > div { min-height: 70px; padding: 12px; border: 1px solid #353b58; border-radius: 9px; background: #22263a; }
.secret-details small, .secret-details strong { display: block; }
.secret-details small { color: #858ca9; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.secret-details strong { margin-top: 7px; color: #eef0fb; font-size: 12px; line-height: 1.35; }
.imposter-role-panel .primary-button { min-width: 190px; }
.imposter-secret-hidden { background: #322237 !important; }
.imposter-secret-hidden strong { color: #ff9ab7; letter-spacing: .08em; }
.imposter-phase-panel { max-width: 850px; margin: auto; padding: 27px; border: 1px solid #303650; border-radius: 15px; background: #1a1e2f; }
.association-status { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.association-status h2 { margin: 9px 0 0; font-size: clamp(26px, 4vw, 39px); }
.turn-clock { min-width: 75px; padding: 9px; text-align: center; border: 1px solid #444a6a; border-radius: 9px; background: #23283e; }
.turn-clock small, .turn-clock strong { display: block; }
.turn-clock small { color: #9298b3; font-size: 8px; font-weight: 800; }
.turn-clock strong { margin-top: 3px; color: #a49bff; font-size: 23px; }
.phase-instruction { color: #a1a6c0; font-size: 12px; line-height: 1.5; }
.imposter-turn-order { display: flex; gap: 7px; overflow-x: auto; padding: 17px 0; }
.imposter-turn-order span { display: flex; min-width: 76px; flex-direction: column; gap: 5px; align-items: center; padding: 8px 6px; color: #8c92ae; border: 1px solid #333851; border-radius: 9px; background: #20243a; font-size: 9px; text-align: center; }
.imposter-turn-order span b { display: grid; width: 21px; height: 21px; place-items: center; color: #c6c9df; border-radius: 50%; background: #373d5b; font-size: 10px; }
.imposter-turn-order span.active { color: #d8d3ff; border-color: #8176ff; background: #302c59; }
.imposter-turn-order span.active b { color: #fff; background: #7469eb; }
.imposter-turn-order span.complete { opacity: .66; }
.imposter-associations, .imposter-summary-list { display: grid; gap: 7px; }
.imposter-associations > div, .imposter-summary-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px; border-radius: 8px; background: #22263a; }
.imposter-associations strong, .imposter-summary-list strong { color: #e6e8f6; font-size: 11px; }
.imposter-associations span, .imposter-summary-list span { color: #aaa2ff; font-size: 12px; font-weight: 800; }
.imposter-association-form { display: flex; gap: 8px; margin-top: 17px; }
.imposter-association-form input { height: 45px; }
.imposter-association-form button { min-width: 110px; }
.imposter-summary-list { margin: 22px 0; }
.imposter-history-panel { max-width: 850px; margin: 17px auto 0; padding: 18px 22px; border: 1px solid #303650; border-radius: 12px; background: #171b2b; }
.imposter-history-scroll { overflow-x: auto; }
.imposter-history-table { width: 100%; min-width: 430px; border-collapse: collapse; }
.imposter-history-table th, .imposter-history-table td { padding: 10px 9px; border-bottom: 1px solid #2d324a; text-align: left; font-size: 11px; }
.imposter-history-table th { color: #858ca9; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.imposter-history-table td { color: #e3e5f2; }
.imposter-history-table td:first-child { width: 90px; color: #aaa2ff; font-weight: 800; }
.imposter-history-table em { color: #858ca9; }
.imposter-vote-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 9px; margin: 20px 0; }
.imposter-vote-option { display: flex; gap: 9px; align-items: center; padding: 11px; cursor: pointer; color: #f1f2fc; border: 1px solid #3b415e; border-radius: 9px; background: #22263a; text-align: left; }
.imposter-vote-option:hover, .imposter-vote-option.selected { border-color: #8b80ff; background: #302c59; }
.imposter-vote-option:disabled { cursor: default; opacity: .7; }
.imposter-vote-option strong { font-size: 11px; }
.imposter-voting-panel .primary-button { min-width: 160px; }
.imposter-results-panel { text-align: center; }
.imposter-results-panel h2 { margin: 8px 0; font-size: clamp(34px, 5vw, 51px); }
.imposter-results-panel > p { max-width: 560px; margin: 0 auto 20px; color: #aab0c9; font-size: 13px; }
.result-secret { display: inline-flex; min-width: 230px; flex-direction: column; gap: 5px; margin: 5px auto 19px; padding: 15px 24px; border: 1px solid #5950b4; border-radius: 11px; background: #2b2854; }
.result-secret small, .result-imposters small { color: #aaa2ff; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.result-secret strong { color: #fff; font-size: 25px; }
.result-secret span { color: #b2b5cc; font-size: 10px; }
.result-imposters { margin: 0 auto 19px; }
.result-imposters strong { display: block; margin-top: 6px; color: #ff9cba; font-size: 13px; }
.result-section-heading { max-width: 530px; margin: 18px auto 8px; color: #858ca9; font-size: 9px; font-weight: 900; letter-spacing: .13em; text-align: left; }
.result-vote-totals { display: grid; max-width: 530px; gap: 6px; margin: 0 auto 4px; text-align: left; }
.result-vote-totals > div { display: flex; justify-content: space-between; padding: 9px 11px; border-radius: 7px; background: #22263a; }
.result-vote-totals span { color: #cfd2e4; font-size: 11px; }
.result-vote-totals strong { color: #aaa2ff; font-size: 12px; }
.result-votes { display: grid; max-width: 530px; gap: 6px; margin: auto auto 22px; text-align: left; }
.result-votes > div { display: flex; justify-content: space-between; padding: 9px 11px; border-radius: 7px; background: #22263a; }
.result-votes span { color: #aeb3ca; font-size: 11px; }
.result-votes strong { color: #e3e5f2; font-size: 11px; }
.imposter-result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.imposter-result-actions button { min-width: 140px; }
.imposter-in-game-chat { max-width: 850px; margin: 17px auto 0; padding: 18px 22px; border: 1px solid #303650; border-radius: 12px; background: #171b2b; }
.imposter-in-game-chat .imposter-chat-list { max-height: 145px; }

@media (max-width: 760px) {
    .imposter-screen { min-height: 0; padding: 24px 16px 30px; }
    .imposter-hero { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; margin-bottom: 25px; }
    .imposter-emblem { width: 62px; height: 62px; border-radius: 19px; }
    .imposter-emblem span { font-size: 36px; }
    .imposter-hero h1 { margin: 8px 0 10px; font-size: 42px; }
    .imposter-hero .lede { font-size: 12px; }
    .imposter-setup-grid, .imposter-lobby-grid { grid-template-columns: 1fr; }
    .imposter-side-actions { gap: 12px; }
    .imposter-lobby-head, .imposter-game-head { flex-direction: column; }
    .imposter-code-block { width: 100%; }
    .imposter-lobby-actions { flex-direction: column; }
    .imposter-phase-meta { align-self: stretch; align-items: flex-start; }
    .secret-details { grid-template-columns: 1fr; }
    .imposter-role-panel { padding: 25px 16px; }
    .imposter-association-form { flex-direction: column; }
    .imposter-association-form button { height: 43px; }
    .imposter-phase-panel { padding: 20px 14px; }
}

/* Keep the portal chrome tied to the selected light/dark mode and colour pack.
   Game thumbnails retain their artwork, while all surrounding surfaces use the
   same theme tokens as the rest of the application. */
.arcade-body,
.arcade-body main { color: var(--ink); background: var(--page); }
.arcade-header { color: var(--ink); background: var(--surface); border-color: var(--line); }
.arcade-menu-button { color: var(--muted); }
.arcade-menu-button:hover { color: var(--accent); }
.arcade-brand { color: var(--ink); }
.arcade-brand span { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); box-shadow: 0 5px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.arcade-search { color: var(--muted); background: var(--surface-muted); }
.arcade-search > span:first-child { color: var(--accent); }
.arcade-search kbd { color: var(--muted); border-color: var(--line); background: var(--surface); }
.arcade-header .account-nav a { color: var(--muted); }
.arcade-header .account-nav a:hover, .arcade-header .account-nav a:focus-visible { color: var(--ink); background: var(--surface-muted); }
.arcade-header .account-nav .arcade-nav-chip { color: var(--ink); background: var(--surface-muted); }
.arcade-header .theme-toggle, .arcade-header .theme-picker summary { color: var(--ink); border-color: var(--line); background: var(--surface-muted); }
.arcade-header .theme-toggle:hover, .arcade-header .theme-picker summary:hover { border-color: var(--accent); background: var(--accent-soft); }
.rail-item { color: var(--muted); }
.rail-item:hover, .rail-item:focus-visible, .rail-item.active { color: var(--ink); background: var(--surface-muted); box-shadow: inset 0 0 0 1px var(--line); }
.rail-item.active { color: var(--accent); }
.arcade-breadcrumb { color: var(--muted); }
.arcade-breadcrumb b { color: var(--line); }
.arcade-breadcrumb strong { color: var(--ink); }
.arcade-main-column .app-shell { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.arcade-main-column .home-screen { background: radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--accent-soft) 76%, transparent), transparent 32%), var(--surface); }
.arcade-body .eyebrow { color: var(--muted); }
.arcade-body .eyebrow span { background: var(--line); }
.arcade-body h1, .arcade-body h2 { color: var(--ink); }
.arcade-body .lede, .arcade-body .how-it-works small, .arcade-body .muted-copy { color: var(--muted); }
.arcade-body .how-it-works { border-color: var(--line); }
.arcade-body .how-it-works > div > span { color: var(--accent); border-color: var(--line); }
.arcade-body .setup-card, .arcade-body .code-card, .arcade-body .players-card, .arcade-body #game-screen aside { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.arcade-body .card-heading { color: var(--muted); border-color: var(--line); }
.arcade-body .card-heading b { color: var(--success); }
.arcade-body .account-hint, .arcade-body .profile-name-hint, .arcade-body .setting-label small { color: var(--muted); }
.arcade-body .account-hint strong, .arcade-body .setup-card > label, .arcade-body .setting-label span { color: var(--ink); }
.arcade-body input, .arcade-body select, .arcade-body .mode-button, .arcade-body .duration-button, .arcade-body .length-button { color: var(--ink); border-color: var(--line); background: var(--surface-muted); }
.arcade-body input::placeholder { color: var(--muted); }
.arcade-body .mode-button:hover, .arcade-body .duration-button:hover, .arcade-body .length-button:hover { border-color: var(--accent); }
.arcade-body .mode-button.active, .arcade-body .duration-button.active, .arcade-body .length-button.active { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.arcade-body .primary-button, .arcade-body .submit-button { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 25%, transparent); }
.arcade-body .primary-button:hover, .arcade-body .submit-button:hover { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); }
.arcade-body .secondary-button, .arcade-body .join-row button, .arcade-body #copy-code, .arcade-body #copy-invite, .arcade-body #leave-game { color: var(--ink); border-color: var(--line); background: var(--surface-muted); }
.arcade-body .secondary-button:hover, .arcade-body .join-row button:hover, .arcade-body #copy-code:hover, .arcade-body #copy-invite:hover, .arcade-body #leave-game:hover { border-color: var(--accent); background: var(--accent-soft); }
.arcade-body #lobby-screen, .arcade-body #game-screen { background: var(--surface); }
.arcade-body .auto-start-countdown { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow); }
.arcade-body .player-row { border-color: var(--line); background: var(--surface-muted); }
.arcade-body .player-row .avatar { color: #fff; background: var(--accent); }
.arcade-body .player-row small, .arcade-body .players-card > p, .arcade-body .code-card p, .arcade-body .connection-status { color: var(--muted); }
.arcade-body .room-settings { color: var(--ink); border-color: var(--line); background: var(--surface-muted); }
.arcade-body #game-screen .game-top { border-color: var(--line); background: var(--surface-muted); }
.arcade-body #game-screen .game-top small { color: var(--muted); }
.arcade-body #game-screen .game-top strong { color: var(--ink); }
.arcade-body #game-screen .timer strong { color: var(--accent); }
.arcade-body #game-screen .play-area { border-color: var(--line); background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent-soft) 65%, transparent), transparent 42%), var(--surface); }
.arcade-body #game-screen .tap-hint { color: var(--muted); }
.arcade-body #game-screen .tile { color: var(--ink); border-color: var(--line); background: linear-gradient(145deg, var(--surface-muted), var(--surface)); box-shadow: 0 6px 0 color-mix(in srgb, var(--ink) 18%, var(--surface)), 0 10px 20px color-mix(in srgb, var(--ink) 12%, transparent); }
.arcade-body #game-screen .tile:hover, .arcade-body #game-screen .tile.selected { color: #fff; border-color: var(--accent); background: linear-gradient(145deg, var(--accent), var(--accent-dark)); }
.arcade-body #game-screen #word-input { color: var(--ink); border-color: var(--line); background: var(--surface); }
.arcade-body #game-screen .score-row { border-color: var(--line); }
.arcade-body #game-screen .score-row strong { color: var(--accent); }
.arcade-body #game-screen .score-row .rank, .arcade-body #game-screen .score-row small { color: var(--muted); }
.arcade-body .result-modal { background: color-mix(in srgb, var(--ink) 48%, transparent); }
.arcade-title-bar { border-color: var(--line); background: var(--surface); }
.arcade-title-bar small, .arcade-title-actions { color: var(--muted); }
.arcade-title-bar h2 { color: var(--ink); }
.arcade-title-actions span, .arcade-title-actions a { border-color: var(--line); }
.arcade-title-actions a { color: var(--accent); }
.arcade-title-actions a:hover { border-color: var(--accent); background: var(--accent-soft); }
.next-games-heading, .arcade-game-card { color: var(--ink); }
.next-games-heading a, .arcade-game-card small { color: var(--muted); }
.catalog-heading h1, .catalog-heading h2 { color: var(--ink); }
.catalog-heading > span { color: var(--accent); }
.continue-strip { scrollbar-color: var(--line) transparent; }
.continue-card, .catalog-game-card { color: var(--ink); }
.catalog-game-card:hover .catalog-thumb, .continue-card:hover .catalog-thumb { border-color: var(--accent); }
.catalog-card-copy span { color: var(--muted); }
.catalog-empty { border-color: var(--line); background: var(--surface); }
.empty-sparkle { color: var(--accent); background: var(--accent-soft); }
.catalog-empty h2 { color: var(--ink); }
.catalog-empty p { color: var(--muted); }

.imposter-app-shell { background: var(--surface); }
.imposter-card, .imposter-chat-card { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.imposter-card label { color: var(--ink); }
.imposter-card label small, .imposter-chat-list em { color: var(--muted); }
.imposter-card input, .imposter-card select { color: var(--ink); border-color: var(--line); background: var(--surface-muted); }
.imposter-card input:focus, .imposter-card select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.imposter-quick-card { color: var(--ink); border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface-muted) 72%); box-shadow: var(--shadow); }
.imposter-quick-card:hover { border-color: var(--accent-dark); }
.imposter-quick-card small { color: var(--muted); }
.imposter-quick-card > b { color: var(--accent); }
.quick-icon, .imposter-chat-form button { color: #fff; background: var(--accent); }
.imposter-code-block, .imposter-phase-meta, .turn-clock { border-color: var(--line); background: var(--surface-muted); }
.imposter-code-block small, .imposter-phase-meta span, .turn-clock small { color: var(--muted); }
.imposter-code-block strong, .imposter-phase-meta strong, .turn-clock strong { color: var(--accent); }
.imposter-countdown { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.imposter-player-row { border-color: var(--line); }
.imposter-avatar { background: var(--accent); }
.imposter-player-row strong { color: var(--ink); }
.imposter-player-row small, .remove-imposter-player { color: var(--muted); }
.remove-imposter-player:hover { color: var(--danger); background: var(--accent-soft); }
.imposter-chat-form { border-color: var(--line); }
.imposter-chat-list strong { color: var(--accent); }
.imposter-chat-list span { color: var(--ink); }
.imposter-role-panel, .imposter-phase-panel { border-color: var(--line); background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 50%), var(--surface); box-shadow: var(--shadow); }
.imposter-role-panel h2 { color: var(--ink); }
.imposter-role-panel > p:not(.role-kicker), .phase-instruction { color: var(--muted); }
.role-kicker, .secret-details small { color: var(--muted); }
.secret-details > div, .imposter-turn-order span, .imposter-associations > div, .imposter-summary-list > div, .imposter-vote-option, .result-vote-totals > div, .result-votes > div { border-color: var(--line); background: var(--surface-muted); }
.secret-details strong, .imposter-associations strong, .imposter-summary-list strong, .imposter-vote-option, .result-vote-totals span, .result-votes strong { color: var(--ink); }
.imposter-secret-hidden { background: color-mix(in srgb, var(--danger) 16%, var(--surface-muted)) !important; }
.imposter-secret-hidden strong { color: var(--danger); }
.imposter-turn-order span { color: var(--muted); }
.imposter-turn-order span b { color: var(--ink); background: var(--surface); }
.imposter-turn-order span.active { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }
.imposter-turn-order span.active b { color: #fff; background: var(--accent); }
.imposter-associations span, .imposter-summary-list span, .result-vote-totals strong { color: var(--accent); }
.imposter-history-panel, .imposter-in-game-chat { border-color: var(--line); background: var(--surface); }
.imposter-history-table th { color: var(--muted); }
.imposter-history-table td { color: var(--ink); border-color: var(--line); }
.imposter-history-table td:first-child { color: var(--accent); }
.imposter-history-table em { color: var(--muted); }
.imposter-vote-option:hover, .imposter-vote-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.imposter-results-panel > p, .result-votes span { color: var(--muted); }
.result-secret { border-color: var(--accent); background: var(--accent-soft); }
.result-secret small, .result-imposters small, .result-section-heading { color: var(--accent); }
.result-secret strong { color: var(--ink); }
.result-secret span { color: var(--muted); }
.result-imposters strong { color: var(--danger); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer-inner { display: flex; max-width: 1180px; min-height: 86px; gap: 28px; align-items: center; justify-content: space-between; margin: auto; padding: 18px 28px; }
.site-footer-about { min-width: 0; }
.site-footer-about strong { color: var(--ink); font-size: 11px; }
.site-footer-about p { max-width: 520px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.site-footer-contact { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 10px; text-align: right; }
.site-footer-contact a { color: var(--accent); font-weight: 700; text-decoration: none; }
.site-footer-contact a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .site-footer-inner { align-items: flex-start; flex-direction: column; gap: 12px; padding: 17px 18px; }
    .site-footer-contact { justify-content: flex-start; text-align: left; }
}
