:root{--bg:#eef4fb;--card:#fff;--text:#102033;--muted:#667085;--primary:#0867d5;--primary-dark:#0757b5;--line:#e3ebf5;--soft:#f7faff;--success:#087443;--success-bg:#e8f7ef;--warning:#a24d00;--warning-bg:#fff4e8;--danger:#c62828;--danger-bg:#fff0f0;--shadow:0 18px 45px rgba(16,32,51,.09)}
*{box-sizing:border-box}html{font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}body{margin:0;min-height:100vh;background:linear-gradient(180deg,#f4f8fc,#eaf2fb);padding:28px 16px}.app-shell{width:min(980px,100%);margin:auto}.app-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}.eyebrow{margin:0 0 5px;font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--primary)}h1{margin:0;font-size:32px;letter-spacing:-.03em}h2{margin:0;font-size:20px}h3{margin:0;font-size:17px}.subtitle,.section-heading p,.modal-header p{margin:5px 0 0;color:var(--muted);font-size:14px;line-height:1.5}.panel{background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:22px;margin-bottom:16px}.section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:18px}.count-badge,.round-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 11px;background:#edf5ff;color:var(--primary);font-weight:800;font-size:13px;white-space:nowrap}.db-status{padding:8px 11px;border-radius:10px;background:#f4f7fa;border:1px solid var(--line);font-weight:800;font-size:13px;color:var(--muted)}button{border:0;border-radius:11px;background:var(--primary);color:white;padding:10px 15px;font-weight:800;font-size:14px;cursor:pointer;transition:.15s ease}button:hover:not(:disabled){background:var(--primary-dark);transform:translateY(-1px)}button:disabled{opacity:.5;cursor:not-allowed;transform:none}.secondary{background:#eaf3ff;color:var(--primary)}.secondary:hover:not(:disabled){background:#dcecff}.ghost{background:white;color:var(--text);border:1px solid var(--line)}.ghost:hover:not(:disabled){background:#f7f9fc}.danger{background:var(--danger)}.danger:hover:not(:disabled){background:#a91f1f}.warning{background:#ff8a34}.warning:hover:not(:disabled){background:#dc6c1c}input,select{font:inherit;color:var(--text);background:white;border:1px solid #d9e4ef;border-radius:11px;padding:11px 12px;outline:none}input:focus,select:focus{border-color:#6aa6ea;box-shadow:0 0 0 3px #e5f0ff}.add-form{display:flex;gap:10px;margin-bottom:14px}.add-form input{flex:1}.bulk-row{display:flex;align-items:center;gap:10px;padding:12px;background:var(--soft);border:1px solid var(--line);border-radius:13px}.bulk-row label{font-weight:700}.bulk-row select{flex:1;max-width:250px}.bulk-form{margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:13px;background:#fbfdff}.member-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.member-slots input{width:100%}.inline-actions{display:flex;gap:8px;margin-top:12px}.players-list{display:grid;gap:10px;margin-top:16px}.player-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(180deg,#fff,#fbfdff)}.player-card.eliminated{opacity:.62}.player-card.winner{border-color:#83d5a7;background:var(--success-bg)}.player-name{font-weight:800}.player-meta{font-size:12px;color:var(--muted);margin-top:3px}.player-total{font-size:22px;font-weight:900;min-width:70px;text-align:center;font-variant-numeric:tabular-nums}.remove-player{padding:7px 10px;background:#f5f7fa;color:#536273;border:1px solid var(--line)}.remove-player:hover:not(:disabled){background:#ffecec;color:var(--danger)}.game-settings{display:grid;grid-template-columns:minmax(190px,1fr) auto auto auto auto;gap:10px;align-items:end}.game-settings label{font-size:13px;font-weight:800;color:var(--muted);display:flex;flex-direction:column;gap:6px}.notice{min-height:0;margin-top:14px}.notice:not(:empty){padding:11px 13px;border-radius:11px;background:#f7f9fc;border:1px solid var(--line);color:#465466;font-size:14px}.round-form{margin-top:16px;border:1px solid #cfe0f4;border-radius:16px;padding:17px;background:#f8fbff}.round-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}.round-heading span{font-size:13px;color:var(--muted)}.round-inputs{display:grid;gap:9px}.round-row{display:grid;grid-template-columns:minmax(0,1fr) 180px;align-items:center;gap:14px;padding:11px 12px;background:white;border:1px solid var(--line);border-radius:11px}.round-row label{font-weight:800}.round-row .current-total{font-size:12px;color:var(--muted);margin-left:7px;font-weight:500}.round-row input{width:100%;text-align:right}.scoreboard{display:grid;gap:9px;margin-top:16px}.score-row{display:grid;grid-template-columns:minmax(0,1fr) 90px 90px;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:13px}.score-row .rank{font-size:12px;color:var(--muted);font-weight:800}.score-row .score-value{font-size:20px;font-weight:900;text-align:center}.score-row .status{text-align:right;font-size:12px;font-weight:800}.score-row.winner{background:var(--success-bg);border-color:#9bd8b5}.score-row.eliminated{background:#fafafa;opacity:.65}.game-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}.winner{margin-top:14px;padding:14px;border-radius:13px;background:var(--success-bg);border:1px solid #b7e4c8;color:#075c35;font-weight:900}.rounds-history{overflow:auto}.rounds-table{width:100%;border-collapse:separate;border-spacing:0;min-width:560px}.rounds-table th,.rounds-table td{padding:10px 11px;border-bottom:1px solid var(--line);text-align:right;font-variant-numeric:tabular-nums}.rounds-table th:first-child,.rounds-table td:first-child{text-align:left}.rounds-table th{background:#f7f9fc;font-size:12px;color:#556274}.rounds-table tr:last-child td{border-bottom:0}.empty-state{padding:25px;text-align:center;color:var(--muted);border:1px dashed #cfdbe8;border-radius:13px}.modal{position:fixed;inset:0;background:rgba(8,24,40,.48);display:grid;place-items:center;padding:18px;z-index:100}.modal-content{width:min(520px,100%);max-height:90vh;overflow:auto;background:white;border-radius:18px;padding:20px;box-shadow:0 25px 80px rgba(0,0,0,.22)}.history-modal-content{width:min(850px,100%)}.modal-header{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin-bottom:14px}.icon-button{width:38px;height:38px;padding:0;font-size:25px;line-height:1;background:#f3f6fa;color:#44515f}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.history-list{max-height:62vh;overflow:auto;display:grid;gap:11px}.history-card{border:1px solid var(--line);border-radius:14px;padding:14px;background:#fbfdff}.history-title{font-weight:900}.history-players{margin-top:7px;font-size:13px;color:#455365}.history-winner{margin-top:8px;color:#075c35;font-weight:800}.history-rounds{overflow:auto;margin-top:10px}.history-rounds-table{width:100%;border-collapse:collapse;min-width:480px}.history-rounds-table th,.history-rounds-table td{padding:7px 8px;border:1px solid var(--line);text-align:right;font-size:12px}.history-rounds-table th:first-child,.history-rounds-table td:first-child{text-align:left}.history-card-actions{display:flex;gap:8px;margin-top:11px}.btn-danger{background:var(--danger)}.history-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:15px;padding-top:14px;border-top:1px solid var(--line)}.history-controls{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800}.history-controls button{padding:8px 10px}.loading{padding:25px;text-align:center;color:var(--muted)}[hidden]{display:none!important}@media(max-width:760px){body{padding:14px}.panel{padding:16px;border-radius:15px}.app-header{flex-direction:column}.game-settings{grid-template-columns:1fr 1fr}.game-settings label{grid-column:1/-1}.game-settings button{width:100%}.member-slots{grid-template-columns:1fr}.round-row{grid-template-columns:1fr 140px}.score-row{grid-template-columns:minmax(0,1fr) 70px 80px}.history-footer{flex-direction:column;align-items:stretch}.history-controls{justify-content:space-between}.modal-actions{justify-content:stretch}.modal-actions button{flex:1}}@media(max-width:500px){h1{font-size:27px}.add-form{flex-direction:column}.add-form button{width:100%}.bulk-row{display:grid;grid-template-columns:1fr 1fr}.bulk-row label{grid-column:1/-1}.bulk-row select{max-width:none}.player-card{grid-template-columns:minmax(0,1fr) auto}.player-total{grid-column:2;grid-row:1/3}.remove-player{grid-column:1}.round-heading{flex-direction:column}.round-row{grid-template-columns:1fr}.round-row input{text-align:left}.score-row{grid-template-columns:1fr 70px}.score-row .status{grid-column:1/-1;text-align:left}.game-settings{grid-template-columns:1fr}.game-settings button{grid-column:auto}.game-actions button{flex:1;min-width:140px}}

.live-games-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.live-game-card{border:1px solid var(--line);border-radius:14px;padding:15px;background:#fbfdff}.live-game-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.live-game-card p{margin:7px 0 12px;color:var(--muted);font-size:13px}.live-badge{padding:5px 8px;border-radius:999px;background:#e7f8ee;color:#08783f;font-size:10px;font-weight:900;letter-spacing:.08em}.live-badge:before{content:"";display:inline-block;width:6px;height:6px;margin-right:5px;border-radius:50%;background:#17b862;box-shadow:0 0 0 3px #17b86222}.live-scores{display:grid;gap:7px}.live-scores>div{display:flex;justify-content:space-between;padding:8px 10px;border-radius:9px;background:white;border:1px solid var(--line)}
/* Dashboard redesign */
:root{--bg:#f3f6fb;--card:#fff;--text:#172033;--muted:#69748a;--line:#e3e9f2;--primary:#3659d9;--primary-dark:#2745b8;--soft:#f6f8fc;--shadow:0 12px 35px rgba(31,47,79,.07)}
html{background:var(--bg)}
body{background:radial-gradient(circle at 10% 0%,#e2eaff 0,transparent 38%),radial-gradient(circle at 90% 15%,#e8f7f1 0,transparent 30%),linear-gradient(135deg,#f6f8ff 0%,#edf3fb 55%,#f3f7fc 100%);background-attachment:fixed;padding:24px 20px 48px}
.app-shell{width:min(1280px,100%)}
.app-header{align-items:center;margin:0 0 28px;padding:0 4px}
.app-header h1{font-size:30px}.app-header .subtitle{max-width:620px}.user-greeting{width:max-content;max-width:100%;margin:0 0 14px;padding:10px 16px;border-radius:999px;background:linear-gradient(135deg,#e8f2ff,#f3eaff);color:#2449a7;font-size:18px;line-height:1.3;font-weight:900;overflow-wrap:anywhere;box-shadow:0 5px 14px rgba(54,89,217,.12)}
.header-actions{background:#fff;border:1px solid var(--line);padding:6px;border-radius:14px;box-shadow:0 6px 20px rgba(31,47,79,.05)}.live-clock{padding:9px 12px;border-radius:10px;background:#eef3ff;color:#2949a5;font-size:13px;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}
.db-status{border:0;background:#effaf4;color:#18864b;padding:9px 12px}.db-status:before{content:"";display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:50%;background:#21b968;box-shadow:0 0 0 4px #21b9681c}
#signOutBtn{border:0;padding:9px 13px}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr);gap:20px;align-items:start}
.control-column{min-width:0;display:grid;gap:20px}
.panel{border-color:#e5eaf2;border-radius:18px;box-shadow:var(--shadow);padding:24px;margin-bottom:20px}
.control-column .panel{margin-bottom:0}
.section-heading{margin-bottom:20px}.section-heading h2{font-size:19px}.section-heading p{font-size:13px}
.setup-panel .add-form{margin-bottom:12px}.add-form input{height:46px}.add-form button{min-width:120px}
.bulk-row{padding:10px 12px;background:#f7f9fd;border-color:#e8edf5}.bulk-row select{background:#fff}
.players-list{margin-top:12px}.empty-state{padding:18px;background:#fafbfd;border-color:#dfe6f0;font-size:13px}
.game-settings{grid-template-columns:minmax(180px,1fr) auto auto;align-items:end}.game-settings label{grid-column:1/-1}.game-settings #startGameBtn{grid-column:auto;background:var(--primary)}.game-settings #newGameBtn,.game-settings #saveGameBtn,.game-settings #historyBtn{grid-row:3}.game-settings #historyBtn{grid-column:3}.game-settings #saveGameBtn{grid-column:2}.game-settings #newGameBtn{grid-column:1;width:max-content}
.game-actions{padding-top:16px;border-top:1px solid var(--line);margin-top:18px}.game-actions button{background:#fff;color:#526076;border:1px solid var(--line)}.game-actions .warning{color:#a85c15}.game-actions .danger{margin-left:auto;color:#bd2a2a;border-color:#f0caca;background:#fff}
.round-form{background:#f7f9fe;border-color:#dce5f5}.round-form #submitRoundBtn{width:100%;margin-top:12px;padding:13px}
.live-panel{position:sticky;top:20px;margin-bottom:0;max-height:calc(100vh - 40px);overflow:auto;border-top:3px solid #20ae69}.live-panel .section-heading{align-items:center}.live-panel .eyebrow{color:#18864b}.live-panel .count-badge{background:#eaf8f0;color:#18864b}
.live-games-list{grid-template-columns:1fr}.live-game-card{background:#fafcfe;box-shadow:none}.live-game-card:first-child{border-color:#b8dfc9}.live-scores>div:first-child{background:#f0f8f4;border-color:#d6ecdf}
.history-panel{margin-top:20px}.rounds-history .empty-state{padding:16px}
button{border-radius:10px}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #3659d930;outline-offset:2px}
@media(max-width:920px){.dashboard-grid{grid-template-columns:1fr}.live-panel{position:static;max-height:none;grid-row:auto}.game-settings{grid-template-columns:1fr 1fr}.game-settings label{grid-column:1/-1}.game-settings #newGameBtn,.game-settings #saveGameBtn,.game-settings #historyBtn{grid-row:auto;grid-column:auto;width:100%}}
@media(max-width:600px){.user-greeting{font-size:16px;padding:9px 14px}body{padding:14px 12px 30px}.app-header{align-items:flex-start}.app-header h1{font-size:26px}.header-actions{width:100%;justify-content:space-between}.panel{padding:17px;border-radius:15px}.dashboard-grid,.control-column{gap:14px}.add-form{gap:8px}.add-form button{min-width:0}.bulk-row{grid-template-columns:1fr 1fr}.game-settings{grid-template-columns:1fr 1fr}.game-settings label{grid-column:1/-1}.game-settings #startGameBtn{grid-column:1/-1}.game-actions{display:grid;grid-template-columns:1fr 1fr}.game-actions .danger{margin-left:0}.history-panel{margin-top:14px}.live-panel{border-top-width:3px}}.live-game-card.finished{border-color:#f0d7a7;background:#fffaf0}.live-game-card.finished .live-badge{background:#fff0cf;color:#93610c}.live-game-card.finished .live-badge:before{display:none}.live-winner{margin-top:12px;padding:10px 12px;border-radius:9px;background:#fff0cf;color:#764c05;font-weight:900;text-align:center}.winner{font-size:17px;text-align:center;padding:18px;box-shadow:0 8px 24px rgba(17,130,75,.1)}.app-shell.game-active .setup-panel{display:none}.app-shell.game-active .game-panel{animation:gameFocus .28s ease-out}@keyframes gameFocus{from{opacity:.65;transform:translateY(8px)}to{opacity:1;transform:none}}/* Two-state game workspace */
.app-shell:not(.game-active) .control-column{gap:0}.app-shell:not(.game-active) .setup-panel{border-radius:18px 18px 0 0;border-bottom:0}.app-shell:not(.game-active) .game-panel{border-radius:0 0 18px 18px;border-top:1px solid #eef1f6}.score-row.pregame{grid-template-columns:minmax(0,1fr) auto}.score-row.pregame .score-value{display:none}.score-row.leader{border-color:#e5bd5b;background:linear-gradient(90deg,#fff9e8,#fff)}.score-row.leader .player-name{color:#8b5d08}.game-options{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}.game-options summary{width:max-content;margin-left:auto;color:#657087;font-size:13px;font-weight:800;cursor:pointer;list-style:none}.game-options summary:before{content:"";font-size:14px}.game-options[open] summary{color:var(--primary)}.game-options .game-actions{border-top:0;margin-top:10px;padding-top:0}.game-active #gameModeLabel{color:#18864b}.game-active .round-pill{background:#eaf8f0;color:#18864b}
@media(max-width:600px){.game-active .round-form #submitRoundBtn{position:sticky;bottom:10px;z-index:5;box-shadow:0 8px 24px rgba(54,89,217,.28)}.game-options summary{margin-left:0}}.round-winner-cell{color:#8b5d08;font-weight:800;white-space:nowrap}.live-round-winner{margin-top:10px;padding:8px 10px;border-radius:8px;background:#fff7df;color:#805608;font-size:12px;font-weight:800}.rounds-table th:last-child,.rounds-table td:last-child{text-align:left;background:#fffdf7}.auth-resend{display:block;margin-top:10px;width:100%}.auth-resend[hidden]{display:none}.auth-resend:disabled{cursor:not-allowed;opacity:.55}.auth-divider{display:flex;align-items:center;gap:12px;margin:14px 0;color:#8993a5;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.auth-divider:before,.auth-divider:after{content:"";height:1px;flex:1;background:var(--line)}.google-signin{width:100%;display:flex;align-items:center;justify-content:center;gap:12px;background:#fff;color:#243047;border:1px solid var(--line);padding:12px 16px}.google-signin:hover:not(:disabled){background:#f8faff;color:#172033}.google-mark{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;font-size:16px;font-weight:900;color:#4285f4;background:conic-gradient(from -45deg,#4285f4 0 25%,#34a853 0 50%,#fbbc05 0 75%,#ea4335 0);-webkit-background-clip:text;background-clip:text}.google-signin:disabled{opacity:.55}.forgot-password{align-self:flex-end;padding:2px 0;background:transparent;color:var(--primary);font-size:13px}.forgot-password:hover:not(:disabled){background:transparent;color:var(--primary-dark);transform:none;text-decoration:underline}
/* Reference-inspired studio dashboard theme */
:root{
  --bg:#f5f4ef;
  --card:#ffffff;
  --text:#191a1d;
  --muted:#71717a;
  --line:#e9e7e1;
  --primary:#6757e8;
  --primary-dark:#5142c7;
  --soft:#f7f6f2;
  --success:#177a4b;
  --success-bg:#eaf8ef;
  --shadow:0 18px 50px rgba(31,28,53,.08);
}
html{background:#f5f4ef}
body{background:radial-gradient(circle at 8% 4%,#e9e4ff 0,transparent 26%),radial-gradient(circle at 91% 8%,#e6f4ba 0,transparent 22%),linear-gradient(145deg,#f8f7f3 0%,#f2f1ec 100%);color:var(--text)}
.app-shell{width:min(1320px,100%)}
.app-header{position:relative;align-items:center;padding:22px 24px;margin-bottom:22px;background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.9);border-radius:26px;box-shadow:0 14px 40px rgba(37,33,63,.07);backdrop-filter:blur(18px)}
.app-header h1{font-size:34px;line-height:1.08;letter-spacing:-.045em}.app-header .subtitle{color:#777783}
.eyebrow{color:#6757e8;letter-spacing:.16em}
.user-greeting{margin-bottom:12px;padding:8px 14px;background:#191a1d;color:#fff;border-radius:12px;font-size:16px;box-shadow:none}
.header-actions{padding:7px;background:#f6f5f1;border:0;border-radius:16px;box-shadow:none}
.live-clock{background:#fff;color:#191a1d;border:1px solid #ebe9e3;font-size:14px}
.db-status{background:#ddf6a4;color:#355a10;border-radius:10px}.db-status:before{background:#5f991d;box-shadow:none}
#signOutBtn{background:#191a1d;color:#fff;border-radius:10px}
#signOutBtn:hover:not(:disabled){background:#33343a}
.dashboard-grid{grid-template-columns:minmax(0,1.55fr) minmax(320px,.72fr);gap:22px}
.control-column{gap:22px}
.panel{padding:26px;border:1px solid rgba(230,227,219,.82);border-radius:26px;box-shadow:var(--shadow)}
.section-heading h2{font-size:21px;letter-spacing:-.025em}.section-heading p{color:#7b7b86}
.count-badge,.round-pill{padding:8px 12px;background:#eeeaff;color:#5d4ed1;border-radius:10px}
input,select{min-height:46px;border-color:#e6e3dc;border-radius:13px;background:#fbfaf8}
input:focus,select:focus{border-color:#8b7ff0;box-shadow:0 0 0 4px rgba(103,87,232,.12);background:#fff}
button{min-height:42px;border-radius:12px;background:#6757e8;box-shadow:0 7px 16px rgba(103,87,232,.16)}
button:hover:not(:disabled){background:#5142c7;box-shadow:0 9px 20px rgba(103,87,232,.22)}
.secondary{background:#efedff;color:#5b4bce;box-shadow:none}.secondary:hover:not(:disabled){background:#e4e0ff;color:#493ab7}
.ghost{box-shadow:none}.add-form button{background:#191a1d;box-shadow:none}.add-form button:hover:not(:disabled){background:#35363b}
.bulk-row{padding:12px;background:#f8f7f3;border:0;border-radius:16px}
.bulk-form{background:#f8f7f3;border:0;border-radius:16px}
.player-card,.score-row{border-color:#ebe8e1;border-radius:16px;background:#fff}
.player-card:hover,.score-row:hover{border-color:#d9d4ca;box-shadow:0 8px 20px rgba(33,31,49,.05)}
.remove-player{box-shadow:none}
.game-panel{overflow:hidden}.round-form{background:#f2efff;border:0;border-radius:18px}.round-row{border:0;border-radius:13px}
.game-options summary{color:#6557c6}.game-options summary:before{content:""}
.winner{border:0;border-radius:18px;background:linear-gradient(135deg,#ddf6a4,#eaf9c9);color:#294a0e;box-shadow:none}
.live-panel{padding:24px;background:#1d1e23;border:0;border-radius:26px;color:#fff;box-shadow:0 20px 55px rgba(21,22,28,.16)}
.live-panel .section-heading h2{color:#fff}.live-panel .section-heading p{color:#aeb0b8}.live-panel .eyebrow{color:#cce879}.live-panel .count-badge{background:#d8f56b;color:#263408}
.live-games-list{gap:12px}.live-game-card{padding:16px;background:#292a30;border:1px solid #3b3c43;border-radius:17px;color:#fff}.live-game-card:first-child{border-color:#64713c}.live-game-card p{color:#aeb0b8}.live-badge{background:#d8f56b;color:#2e4308}.live-badge:before{background:#557b16;box-shadow:none}
.live-scores>div{background:#fff;color:#1d1e23;border:0;border-radius:11px}.live-scores>div:first-child{background:#eef8d6;border:0}
.live-game-card.finished{background:#302c25;border-color:#71613e}.live-game-card.finished .live-badge{background:#ffe7a8;color:#6f4e08}.live-winner{background:#ffe7a8;color:#684806}
.live-round-winner{background:#403823;color:#ffe09a}
.live-panel .empty-state{color:#bfc0c7;background:#25262b;border-color:#44454b}
.history-panel{border-radius:26px}.rounds-table th{background:#f4f2ed;color:#666671}.rounds-table th:first-child{border-radius:12px 0 0 12px}.rounds-table th:last-child{border-radius:0 12px 12px 0}
.modal{backdrop-filter:blur(8px)}.modal-content{border-radius:24px;box-shadow:0 30px 90px rgba(15,15,20,.25)}
.auth-panel{padding:32px;border-radius:28px;box-shadow:0 24px 70px rgba(35,31,67,.12)}.auth-panel .eyebrow{color:#6757e8}.auth-form button[type="submit"]{min-height:48px}.google-signin{min-height:48px;border-radius:13px}.auth-toggle{border-radius:13px}
@media(max-width:920px){.dashboard-grid{grid-template-columns:1fr}.live-panel{position:static}.app-header{align-items:flex-start}}
@media(max-width:600px){body{padding:10px 10px 28px}.app-header{padding:18px;border-radius:20px}.app-header h1{font-size:29px}.header-actions{width:100%;display:grid!important;grid-template-columns:1fr 1fr;align-items:center!important}.live-clock{grid-column:1}.db-status{grid-column:2}#signOutBtn{grid-column:1/-1}.panel{padding:18px;border-radius:20px}.user-greeting{font-size:15px}.live-panel{border-radius:20px}.game-settings{grid-template-columns:1fr 1fr}}
#confirmModal{z-index:140}

.history-card-actions{flex-wrap:wrap}.history-card-actions button{flex:1 1 120px}

/* Split-screen authentication template */
.auth-panel{width:min(1180px,calc(100% - 24px));max-width:none;margin:5vh auto;padding:0;overflow:hidden;border:0;border-radius:30px;background:#fff;box-shadow:0 28px 90px rgba(38,32,77,.16)}
.auth-layout{display:grid;grid-template-columns:minmax(380px,.9fr) minmax(460px,1.1fr);min-height:720px}
.auth-form-column{display:flex;flex-direction:column;justify-content:center;padding:48px 64px;background:#fff}
.auth-brand{display:flex;align-items:center;gap:11px;margin-bottom:50px;color:#27232f;font-size:15px;font-weight:900}.auth-logo{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#6757e8;color:#fff;box-shadow:0 9px 22px rgba(103,87,232,.25)}
.auth-form-column .section-heading{margin-bottom:28px}.auth-form-column .section-heading h2{font-size:34px;letter-spacing:-.045em}.auth-form-column .section-heading p{font-size:15px}
.auth-form{gap:17px}.auth-form label{font-size:13px}.auth-form input{min-height:52px;padding:13px 16px;background:#f6f5f2;border-color:#ebe8e1}.auth-form button[type="submit"]{min-height:52px;margin-top:3px}
.auth-divider{margin:22px 0}.google-signin{min-height:52px}.auth-toggle{width:100%;min-height:48px;margin-top:14px}.forgot-password{min-height:auto;margin-top:-7px}
.auth-visual{position:relative;display:grid;place-items:center;overflow:hidden;padding:58px;background:linear-gradient(145deg,#29243c 0%,#17171d 100%);color:#fff}
.auth-visual:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:34px 34px;mask-image:linear-gradient(to bottom,black,transparent 90%)}
.auth-visual-glow{position:absolute;border-radius:50%;filter:blur(2px)}.glow-one{width:330px;height:330px;top:-130px;right:-80px;background:#6757e866}.glow-two{width:250px;height:250px;bottom:-100px;left:-80px;background:#d8f56b2e}
.auth-visual-content{position:relative;z-index:1;width:min(460px,100%)}.auth-visual-kicker{margin:0 0 18px;color:#d8f56b;font-size:12px;font-weight:900;letter-spacing:.18em}.auth-visual h3{margin:0;font-size:48px;line-height:1.04;letter-spacing:-.05em}.auth-visual-content>p:not(.auth-visual-kicker){max-width:390px;margin:22px 0 34px;color:#b9b7c4;font-size:16px;line-height:1.65}
.auth-score-preview{padding:18px;border:1px solid #ffffff1f;border-radius:22px;background:#ffffff10;box-shadow:0 24px 55px #0004;backdrop-filter:blur(12px)}.preview-head,.preview-player{display:flex;align-items:center;justify-content:space-between}.preview-head{padding:2px 4px 14px;font-size:13px;font-weight:900}.preview-live{padding:5px 8px;border-radius:999px;background:#d8f56b;color:#29330c;font-size:9px;letter-spacing:.1em}.preview-player{margin-top:9px;padding:13px 14px;border-radius:13px;background:#ffffff0d;color:#e9e8ee}.preview-player span{display:flex;align-items:center;gap:12px}.preview-player b{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#ffffff12;color:#aaa8b5}.preview-player strong{font-size:18px}.preview-player.winner{background:#edf9d9;color:#26330d}.preview-player.winner b{background:#d8f56b;color:#26330d}
@media(max-width:900px){.auth-panel{width:min(600px,calc(100% - 24px));margin:24px auto}.auth-layout{display:block;min-height:0}.auth-form-column{padding:40px}.auth-visual{display:none}.auth-brand{margin-bottom:34px}}
@media(max-width:520px){.auth-panel{width:calc(100% - 16px);margin:8px auto;border-radius:22px}.auth-form-column{padding:28px 20px}.auth-brand{margin-bottom:28px}.auth-form-column .section-heading h2{font-size:29px}}
.auth-visual.auth-visual-pink{background:#f4bfd4}.auth-visual.auth-visual-pink:before{display:none}

.admin-login-link{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin-top:10px;border:1px dashed #c9c4dc;border-radius:12px;color:#6557c6;font-size:13px;font-weight:900;text-decoration:none}.admin-login-link:hover{background:#f5f2ff;border-style:solid}

.app-announcement,.maintenance-banner{margin:0 0 16px;padding:14px 18px;border-radius:14px;font-weight:800}.app-announcement{background:#e9e5ff;color:#4f3fc0}.app-announcement[data-type='success']{background:#e0f7e9;color:#147343}.app-announcement[data-type='warning'],.maintenance-banner{background:#fff0cf;color:#805407}.app-announcement[hidden],.maintenance-banner[hidden]{display:none}

.previous-players-modal{width:min(620px,calc(100% - 24px))}.player-search{width:100%;margin:14px 0;min-height:48px;padding:12px 14px;border:1px solid #dedbe8;border-radius:12px;font:inherit}.previous-players-list{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-height:360px;overflow:auto;margin-bottom:18px}.previous-player-option{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid #e4e1ed;border-radius:12px;background:#faf9ff;cursor:pointer}.previous-player-option:has(input:checked){border-color:#6757e8;background:#eeebff}.previous-player-option input{width:18px;height:18px;min-height:auto}.previous-player-option span{font-weight:800}@media(max-width:560px){.previous-players-list{grid-template-columns:1fr}.bulk-row{flex-wrap:wrap}}

.template-tools{display:grid;grid-template-columns:minmax(180px,1fr) auto minmax(180px,1fr) auto auto;gap:9px;margin:14px 0;padding:12px;border-radius:14px;background:#f7f5ff}.template-tools input,.template-tools select{min-height:44px;padding:10px 12px;border:1px solid #dedbe8;border-radius:11px;background:#fff;font:inherit}.insights-panel{margin-top:20px}.insight-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.insight-stats article{padding:16px;border-radius:15px;background:#f5f2ff}.insight-stats span{display:block;color:#747480;font-size:12px;font-weight:800}.insight-stats strong{display:block;margin-top:7px;font-size:20px}.hall-of-fame{display:grid;gap:9px}.hall-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid #e6e3ed;border-radius:13px}.hall-row:first-child{background:#f0fbd0;border-color:#d2ed78}.hall-rank{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#6757e8;color:#fff;font-weight:900}.hall-row div{display:grid;gap:3px}.hall-row small{color:#747480}.hall-row>span:last-child{text-align:right;font-size:12px;font-weight:800}.share-result-modal{width:min(600px,calc(100% - 24px))}.share-result-modal textarea{width:100%;margin:16px 0;padding:14px;border:1px solid #dedbe8;border-radius:12px;background:#faf9ff;font:inherit;line-height:1.55;resize:vertical}@media(max-width:900px){.template-tools{grid-template-columns:1fr 1fr}.insight-stats{grid-template-columns:1fr 1fr}}@media(max-width:560px){.template-tools{grid-template-columns:1fr}.insight-stats{grid-template-columns:1fr 1fr}.hall-row{grid-template-columns:36px 1fr}.hall-row>span:last-child{grid-column:2;text-align:left}.share-result-modal .modal-actions{display:grid;grid-template-columns:1fr}}

.header-select{min-height:38px;padding:7px 9px}.game-status-group{display:grid;justify-items:end;gap:8px}.game-timers{display:flex;gap:8px}.game-timers span{padding:6px 9px;border-radius:9px;background:var(--soft);color:var(--muted);font-size:11px;font-weight:800}.game-timers strong{color:var(--text);font-variant-numeric:tabular-nums}.feature-modal{width:min(560px,100%);display:grid;gap:14px}.feature-modal label{display:grid;gap:7px;font-weight:800}.qr-code{display:grid;place-items:center;min-height:240px;padding:10px;background:#fff;border-radius:14px}.qr-code img,.qr-code canvas{max-width:100%;height:auto!important}.feature-modal>input{width:100%}.comparison-modal{width:min(650px,100%)}.comparison-selects{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:16px 0}.comparison-selects span{text-align:center;color:var(--muted);font-weight:800}.comparison-result{display:grid;border:1px solid var(--line);border-radius:14px;overflow:hidden}.comparison-head,.comparison-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding:11px 13px}.comparison-head{grid-template-columns:1fr 1fr;padding-left:34%;background:var(--primary);color:#fff}.comparison-row:nth-child(even){background:var(--soft)}.comparison-row strong{text-align:center}.edit-round-btn{padding:6px 9px;font-size:12px}.rounds-table th:last-child,.rounds-table td:last-child{text-align:center}
:root[data-theme="dark"]{--bg:#11151d;--card:#1c2330;--text:#f4f7fb;--muted:#aab4c4;--line:#344054;--primary:#809cff;--primary-dark:#6c87e8;--soft:#252e3c;--success-bg:#163629;--warning-bg:#49301c;--danger-bg:#482329;--shadow:0 16px 42px #0005;color-scheme:dark}:root[data-theme="dark"] body{background:radial-gradient(circle at 10% 0,#252c4d,transparent 38%),linear-gradient(135deg,#11151d,#171d28)}:root[data-theme="dark"] .panel,:root[data-theme="dark"] .header-actions,:root[data-theme="dark"] .modal-content,:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea,:root[data-theme="dark"] .ghost,:root[data-theme="dark"] .round-row,:root[data-theme="dark"] .live-scores>div,:root[data-theme="dark"] .player-card,:root[data-theme="dark"] .history-card,:root[data-theme="dark"] .template-tools input,:root[data-theme="dark"] .template-tools select{background:#1c2330;color:var(--text);border-color:var(--line)}:root[data-theme="dark"] .bulk-row,:root[data-theme="dark"] .round-form,:root[data-theme="dark"] .template-tools,:root[data-theme="dark"] .insight-stats article,:root[data-theme="dark"] .previous-player-option,:root[data-theme="dark"] .rounds-table th{background:var(--soft);color:var(--text)}:root[data-theme="dark"] .secondary{background:#29385c;color:#a9bbff}:root[data-theme="dark"] .live-clock{background:#29385c;color:#b8c6ff}
:root[data-theme="contrast"]{--bg:#000;--card:#000;--text:#fff;--muted:#fff;--line:#fff;--primary:#ffea00;--primary-dark:#ffd000;--soft:#111;--success-bg:#003b12;--shadow:none;color-scheme:dark}:root[data-theme="contrast"] body{background:#000}:root[data-theme="contrast"] .panel,:root[data-theme="contrast"] .header-actions,:root[data-theme="contrast"] .modal-content,:root[data-theme="contrast"] input,:root[data-theme="contrast"] select,:root[data-theme="contrast"] textarea,:root[data-theme="contrast"] .player-card,:root[data-theme="contrast"] .round-row,:root[data-theme="contrast"] .score-row,:root[data-theme="contrast"] .template-tools,:root[data-theme="contrast"] .insight-stats article,:root[data-theme="contrast"] .hall-row{background:#000;color:#fff;border:2px solid #fff;box-shadow:none}:root[data-theme="contrast"] button{background:#ffea00;color:#000;border:2px solid #fff}:root[data-theme="contrast"] .ghost,:root[data-theme="contrast"] .secondary{background:#000;color:#ffea00;border:2px solid #ffea00}:root[data-theme="contrast"] .eyebrow,:root[data-theme="contrast"] .subtitle,:root[data-theme="contrast"] .section-heading p{color:#fff}
@media(max-width:760px){.game-status-group{justify-items:start}.game-timers{flex-wrap:wrap}.header-select{width:100%}.comparison-selects{grid-template-columns:1fr}.comparison-head{padding-left:0;grid-template-columns:1fr 1fr}.comparison-row{grid-template-columns:1fr 1fr}.comparison-row span{grid-column:1/-1}}
.user-greeting{display:flex;align-items:center;gap:9px;width:max-content;max-width:100%;margin:0 0 12px;padding:9px 15px;background:#eef0ff;color:#273a8a;border:1px solid #d8dcff;border-radius:14px;font-size:17px;font-weight:900;line-height:1.3;box-shadow:0 6px 18px rgba(70,82,166,.12)}
.user-greeting:before{content:"";width:11px;height:11px;flex:0 0 11px;border-radius:50%;background:#f5b82e;box-shadow:0 0 0 4px rgba(245,184,46,.2)}
.user-greeting[data-period="afternoon"]:before{background:#f07a35;box-shadow:0 0 0 4px rgba(240,122,53,.18)}
.user-greeting[data-period="night"]{background:#eeeafd;color:#49399b;border-color:#d9d0fa}
.user-greeting[data-period="night"]:before{background:#6957d8;box-shadow:0 0 0 4px rgba(105,87,216,.18)}
:root[data-theme="dark"] .user-greeting{background:#29304a;color:#dfe5ff;border-color:#46517a}
:root[data-theme="contrast"] .user-greeting{background:#000;color:#ffea00;border:2px solid #ffea00;box-shadow:none}
@media(max-width:600px){.user-greeting{font-size:16px;padding:9px 13px}}
/* Soft gaming dashboard background */
body{background:radial-gradient(circle at 7% 3%,rgba(112,91,232,.18) 0,rgba(112,91,232,.08) 18%,transparent 34%),radial-gradient(circle at 94% 5%,rgba(205,242,105,.24) 0,rgba(205,242,105,.10) 18%,transparent 32%),linear-gradient(145deg,#f8f7ff 0%,#f1f4fb 52%,#f7f8f2 100%);background-attachment:fixed}
:root[data-theme="dark"] body{background:radial-gradient(circle at 8% 4%,rgba(112,91,232,.28) 0,rgba(112,91,232,.10) 20%,transparent 36%),radial-gradient(circle at 92% 6%,rgba(151,190,57,.15) 0,rgba(151,190,57,.06) 18%,transparent 32%),linear-gradient(145deg,#10121a 0%,#171a25 55%,#11151c 100%);background-attachment:fixed}
:root[data-theme="contrast"] body{background:#000;background-attachment:fixed}
/* Dashboard typography */
html,body,input,select,textarea,label,p,span,table{font-family:"Inter","Segoe UI",Arial,sans-serif}
h1,h2,h3,h4,button,.player-name,.player-total,.score-value,.winner,.count-badge,.round-pill,.user-greeting,.insight-stats strong,.hall-row strong{font-family:"Manrope","Inter","Segoe UI",Arial,sans-serif}
h1{font-weight:800}h2,h3,h4{font-weight:700}button{font-weight:700}.player-name,.count-badge,.round-pill,.user-greeting,.hall-row strong{font-weight:700}.player-total,.score-value,.winner,.insight-stats strong{font-weight:800}.subtitle,.section-heading p,.player-meta,.rank{font-weight:400}.eyebrow{font-family:"Inter","Segoe UI",Arial,sans-serif;font-weight:700}
/* Accessible three-mode palette v37 */
:root,:root[data-theme="light"]{--bg:#f6f5fc;--card:#fff;--text:#17152b;--muted:#686579;--line:#e4e1ee;--primary:#6757e8;--primary-dark:#5142c7;--soft:#f4f1fb;--success:#166b42;--success-bg:#eeffd0;--warning:#8b5500;--warning-bg:#fff3d6;--danger:#b4232c;--danger-bg:#fff0f1;--shadow:0 18px 48px rgba(45,35,88,.10);color-scheme:light}
:root[data-theme="light"] body{background:radial-gradient(circle at 8% 4%,rgba(145,125,255,.18),transparent 30%),radial-gradient(circle at 92% 8%,rgba(200,232,116,.20),transparent 25%),linear-gradient(145deg,#faf9ff,#f1eff9);background-attachment:fixed}
:root[data-theme="light"] .app-header{background:rgba(255,255,255,.84);border-color:rgba(255,255,255,.94)}
:root[data-theme="light"] .header-actions,:root[data-theme="light"] .bulk-row,:root[data-theme="light"] .bulk-form,:root[data-theme="light"] .template-tools{background:#f4f1fb}
:root[data-theme="light"] input,:root[data-theme="light"] select,:root[data-theme="light"] textarea{background:#fdfcff;border-color:var(--line)}
:root[data-theme="light"] .secondary{background:#efedff;color:#5747ca}:root[data-theme="light"] .ghost{background:#fff;color:var(--text);border-color:var(--line)}
:root[data-theme="dark"]{--bg:#10121a;--card:#1a1d29;--text:#f7f5ff;--muted:#aeb2c2;--line:#34394d;--primary:#8b7cff;--primary-dark:#7564f0;--soft:#222636;--success:#8ee5ad;--success-bg:#293d28;--warning:#ffd17a;--warning-bg:#49391d;--danger:#ff8b92;--danger-bg:#48262c;--shadow:0 18px 52px rgba(0,0,0,.38);color-scheme:dark}
:root[data-theme="dark"] body{background:radial-gradient(circle at 8% 3%,rgba(139,124,255,.22),transparent 32%),radial-gradient(circle at 93% 6%,rgba(111,145,78,.13),transparent 27%),linear-gradient(145deg,#10121a,#151925 58%,#10131b);background-attachment:fixed}
:root[data-theme="dark"] .app-header{background:rgba(26,29,41,.88);border-color:#34394d;box-shadow:var(--shadow)}
:root[data-theme="dark"] .panel,:root[data-theme="dark"] .header-actions,:root[data-theme="dark"] .modal-content,:root[data-theme="dark"] input,:root[data-theme="dark"] select,:root[data-theme="dark"] textarea,:root[data-theme="dark"] .ghost,:root[data-theme="dark"] .round-row,:root[data-theme="dark"] .live-scores>div,:root[data-theme="dark"] .player-card,:root[data-theme="dark"] .score-row,:root[data-theme="dark"] .history-card,:root[data-theme="dark"] .template-tools input,:root[data-theme="dark"] .template-tools select,:root[data-theme="dark"] .previous-player-option{background:var(--card);color:var(--text);border-color:var(--line)}
:root[data-theme="dark"] .bulk-row,:root[data-theme="dark"] .bulk-form,:root[data-theme="dark"] .round-form,:root[data-theme="dark"] .template-tools,:root[data-theme="dark"] .insight-stats article,:root[data-theme="dark"] .rounds-table th,:root[data-theme="dark"] .comparison-row:nth-child(even){background:var(--soft);color:var(--text)}
:root[data-theme="dark"] .secondary{background:#302c58;color:#c9c1ff}:root[data-theme="dark"] .secondary:hover:not(:disabled){background:#403a72;color:#fff}:root[data-theme="dark"] .live-clock,:root[data-theme="dark"] .count-badge,:root[data-theme="dark"] .round-pill{background:#2b3050;color:#c9d1ff;border-color:#424967}
:root[data-theme="dark"] .score-row.leader{background:linear-gradient(90deg,#40371f,#1a1d29);border-color:#7c682f}:root[data-theme="dark"] .score-row.leader .player-name,:root[data-theme="dark"] .round-winner-cell{color:#ffd77f}
:root[data-theme="dark"] .winner,:root[data-theme="dark"] .player-card.winner,:root[data-theme="dark"] .score-row.winner{background:#293d28;color:#d9ffe3;border-color:#47704b}:root[data-theme="dark"] .empty-state{border-color:#4a5065}
:root[data-theme="contrast"]{--bg:#000;--card:#000;--text:#fff;--muted:#fff;--line:#fff;--primary:#ffea00;--primary-dark:#ffd000;--soft:#101010;--success:#00ff66;--success-bg:#002c12;--warning:#ffea00;--warning-bg:#332f00;--danger:#ff5c5c;--danger-bg:#350000;--shadow:none;color-scheme:dark}
:root[data-theme="contrast"] body{background:#000;background-attachment:fixed}:root[data-theme="contrast"] .app-header,:root[data-theme="contrast"] .panel,:root[data-theme="contrast"] .header-actions,:root[data-theme="contrast"] .modal-content,:root[data-theme="contrast"] input,:root[data-theme="contrast"] select,:root[data-theme="contrast"] textarea,:root[data-theme="contrast"] .player-card,:root[data-theme="contrast"] .round-row,:root[data-theme="contrast"] .score-row,:root[data-theme="contrast"] .history-card,:root[data-theme="contrast"] .template-tools,:root[data-theme="contrast"] .insight-stats article,:root[data-theme="contrast"] .hall-row,:root[data-theme="contrast"] .previous-player-option{background:#000;color:#fff;border:2px solid #fff;box-shadow:none;backdrop-filter:none}
:root[data-theme="contrast"] button{background:#ffea00;color:#000;border:2px solid #fff;box-shadow:none}:root[data-theme="contrast"] button:hover:not(:disabled){background:#fff;color:#000;box-shadow:none}:root[data-theme="contrast"] .ghost,:root[data-theme="contrast"] .secondary{background:#000;color:#ffea00;border:2px solid #ffea00}:root[data-theme="contrast"] .danger,:root[data-theme="contrast"] .btn-danger{background:#ff5c5c;color:#000}
:root[data-theme="contrast"] .eyebrow,:root[data-theme="contrast"] .subtitle,:root[data-theme="contrast"] .section-heading p,:root[data-theme="contrast"] .player-meta,:root[data-theme="contrast"] .rank{color:#fff}:root[data-theme="contrast"] .live-clock,:root[data-theme="contrast"] .count-badge,:root[data-theme="contrast"] .round-pill,:root[data-theme="contrast"] .db-status{background:#000;color:#66ccff;border:2px solid #66ccff}
:root[data-theme="contrast"] .winner,:root[data-theme="contrast"] .player-card.winner,:root[data-theme="contrast"] .score-row.winner{background:#002c12;color:#fff;border:3px solid #00ff66}:root[data-theme="contrast"] .score-row.leader{background:#1c1900;border:3px solid #ffea00}:root[data-theme="contrast"] .score-row.leader .player-name,:root[data-theme="contrast"] .round-winner-cell{color:#ffea00}:root[data-theme="contrast"] .empty-state{border:2px dashed #fff}
:root[data-theme="contrast"] a{color:#66ccff}:root[data-theme="contrast"] *:focus-visible{outline:3px solid #ffea00!important;outline-offset:3px!important}:root[data-theme="dark"] *:focus-visible{outline:3px solid #8b7cff;outline-offset:3px}:root[data-theme="light"] *:focus-visible{outline:3px solid #6757e8;outline-offset:3px}
/* Responsive viewport system v38 */
html,body{max-width:100%;overflow-x:hidden}img,svg,canvas,video{max-width:100%;height:auto}.app-shell,.dashboard-grid,.control-column,.panel,.app-header,.header-actions,.game-settings,.template-tools,.round-row,.score-row{min-width:0}.app-shell{width:min(1320px,100%)}input,select,textarea,button{max-width:100%}.rounds-history,.history-rounds,.history-list{max-width:100%;-webkit-overflow-scrolling:touch}.modal-content{max-width:calc(100vw - 32px)}
@media(max-width:1100px){body{padding:20px 14px 36px}.app-shell{width:min(960px,100%)}.app-header{align-items:flex-start}.header-actions{flex-wrap:wrap;justify-content:flex-end}.dashboard-grid{grid-template-columns:minmax(0,1fr) minmax(280px,.62fr);gap:18px}.template-tools{grid-template-columns:minmax(160px,1fr) auto minmax(160px,1fr) auto}.template-tools #deleteTemplateBtn{grid-column:1/-1;width:max-content}}
@media(max-width:900px){body{padding:16px 12px 32px}.app-shell{width:min(720px,100%)}.app-header{display:grid;grid-template-columns:1fr}.header-actions{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.header-actions>*{width:100%;min-width:0}.dashboard-grid{grid-template-columns:1fr}.live-panel{position:static;max-height:none}.template-tools{grid-template-columns:1fr 1fr}.game-settings{grid-template-columns:1fr 1fr}.game-settings label,.game-settings #startGameBtn{grid-column:1/-1}.insight-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){body{padding:8px 8px 24px}.app-shell{width:100%}.app-header{padding:16px;margin-bottom:12px;border-radius:18px}.app-header h1{font-size:clamp(25px,8vw,30px)}.subtitle{font-size:13px}.header-actions{grid-template-columns:1fr 1fr;gap:7px;padding:7px}.header-actions .header-select,.header-actions #soundToggle{grid-row:1}.header-actions .live-clock,.header-actions .db-status{grid-row:2}.header-actions #signOutBtn{grid-column:1/-1;grid-row:3}.panel{padding:16px;margin-bottom:12px;border-radius:18px}.section-heading{gap:8px}.section-heading h2{font-size:19px}.count-badge,.round-pill{padding:6px 9px}.add-form{display:grid;grid-template-columns:1fr}.add-form button{width:100%}.bulk-row{display:grid;grid-template-columns:1fr}.bulk-row label{grid-column:auto}.bulk-row select{width:100%;max-width:none}.inline-actions{display:grid;grid-template-columns:1fr 1fr}.template-tools{grid-template-columns:1fr}.template-tools button,.template-tools #deleteTemplateBtn{width:100%}.game-settings{grid-template-columns:1fr}.game-settings label,.game-settings #startGameBtn,.game-settings #newGameBtn,.game-settings #saveGameBtn,.game-settings #historyBtn{grid-column:1;width:100%}.round-form{padding:13px}.round-heading{align-items:flex-start;flex-direction:column}.round-row{grid-template-columns:1fr}.round-row input{text-align:left}.score-row{grid-template-columns:minmax(0,1fr) auto;padding:12px}.score-row .status{grid-column:1/-1;text-align:left}.game-actions{display:grid;grid-template-columns:1fr 1fr}.game-actions button{width:100%;min-width:0}.game-options .game-actions{grid-template-columns:1fr}.player-card{grid-template-columns:minmax(0,1fr) auto}.player-total{grid-column:2;grid-row:1/3;min-width:44px}.remove-player{grid-column:1;width:max-content}.previous-players-list{grid-template-columns:1fr}.insight-stats{grid-template-columns:1fr 1fr}.hall-row{grid-template-columns:36px minmax(0,1fr)}.hall-row>span:last-child{grid-column:2;text-align:left}.modal{padding:8px;align-items:end}.modal-content{width:100%;max-width:100%;max-height:92dvh;padding:17px;border-radius:20px 20px 0 0}.modal-header h3{font-size:18px}.modal-actions,.share-result-modal .modal-actions{display:grid;grid-template-columns:1fr}.comparison-selects{grid-template-columns:1fr}.comparison-result{overflow-x:auto}.comparison-head{padding-left:0;grid-template-columns:1fr 1fr}.comparison-row{grid-template-columns:1fr 1fr;min-width:300px}.comparison-row span{grid-column:1/-1}.history-footer{flex-direction:column;align-items:stretch}.history-controls{justify-content:space-between}.auth-panel{width:calc(100% - 8px);margin:4px auto;border-radius:18px}.auth-form-column{padding:24px 17px}.auth-brand{margin-bottom:24px}.auth-form-column .section-heading h2{font-size:clamp(26px,9vw,32px)}}
@media(max-width:390px){.header-actions{grid-template-columns:1fr}.header-actions .header-select,.header-actions #soundToggle,.header-actions .live-clock,.header-actions .db-status,.header-actions #signOutBtn{grid-column:1;grid-row:auto}.inline-actions,.game-actions,.insight-stats{grid-template-columns:1fr}.section-heading{flex-direction:column}.count-badge,.round-pill{align-self:flex-start}.player-card{gap:8px}.panel{padding:14px}.user-greeting{width:100%;justify-content:center;text-align:center}}
@media(max-height:520px) and (orientation:landscape){body{padding-top:8px}.modal{align-items:start}.modal-content{max-height:96dvh}.auth-panel{margin:8px auto}.auth-layout{min-height:0}}
/* Semantic button palette v39 */
:root,:root[data-theme="light"]{--action-success:#16835d;--action-success-hover:#106c4c;--action-warning:#d97706;--action-warning-hover:#b85f05;--action-danger:#d92d3a;--action-danger-hover:#b4232f;--action-neutral:#25252b;--action-neutral-hover:#3b3b43}
button{box-shadow:0 6px 15px rgba(103,87,232,.16)}button:hover:not(:disabled){box-shadow:0 8px 19px rgba(103,87,232,.22)}
#saveMembersBtn,#saveTemplateBtn,#saveGameBtn,#endGameBtn,#whatsAppResultBtn,.history-card-actions .secondary{background:var(--action-success);color:#fff;border-color:transparent;box-shadow:0 6px 15px rgba(22,131,93,.18)}#saveMembersBtn:hover:not(:disabled),#saveTemplateBtn:hover:not(:disabled),#saveGameBtn:hover:not(:disabled),#endGameBtn:hover:not(:disabled),#whatsAppResultBtn:hover:not(:disabled),.history-card-actions .secondary:hover:not(:disabled){background:var(--action-success-hover);color:#fff;box-shadow:0 8px 19px rgba(22,131,93,.24)}
#undoRoundBtn,.edit-round-btn{background:var(--action-warning);color:#fff;border-color:transparent;box-shadow:0 6px 15px rgba(217,119,6,.18)}#undoRoundBtn:hover:not(:disabled),.edit-round-btn:hover:not(:disabled){background:var(--action-warning-hover);color:#fff;box-shadow:0 8px 19px rgba(217,119,6,.24)}
#resetBtn,#deleteTemplateBtn,.btn-danger{background:var(--action-danger);color:#fff;border-color:transparent;box-shadow:0 6px 15px rgba(217,45,58,.18)}#resetBtn:hover:not(:disabled),#deleteTemplateBtn:hover:not(:disabled),.btn-danger:hover:not(:disabled){background:var(--action-danger-hover);color:#fff;box-shadow:0 8px 19px rgba(217,45,58,.24)}
#signOutBtn,#cancelSlotsBtn,#confirmNo,#previousPlayersCancel,#historyClose,.icon-button{background:#fff;color:var(--action-neutral);border:1px solid var(--line);box-shadow:none}#signOutBtn:hover:not(:disabled),#cancelSlotsBtn:hover:not(:disabled),#confirmNo:hover:not(:disabled),#previousPlayersCancel:hover:not(:disabled),#historyClose:hover:not(:disabled),.icon-button:hover:not(:disabled){background:#f3f1f8;color:#17152b;box-shadow:none}.remove-player{background:transparent;color:var(--action-danger);border:1px solid #efb9be;box-shadow:none}.remove-player:hover:not(:disabled){background:#fff0f1;color:var(--action-danger-hover);border-color:#e58e96;box-shadow:none}button:disabled{filter:saturate(.35);box-shadow:none}
:root[data-theme="dark"]{--action-success:#31a879;--action-success-hover:#3dbc8a;--action-warning:#e69a35;--action-warning-hover:#f0ad50;--action-danger:#e55763;--action-danger-hover:#ef707a;--action-neutral:#d9dce7;--action-neutral-hover:#fff}:root[data-theme="dark"] #signOutBtn,:root[data-theme="dark"] #cancelSlotsBtn,:root[data-theme="dark"] #confirmNo,:root[data-theme="dark"] #previousPlayersCancel,:root[data-theme="dark"] #historyClose,:root[data-theme="dark"] .icon-button{background:#242838;color:#eef0f7;border-color:#444a60}:root[data-theme="dark"] #signOutBtn:hover:not(:disabled),:root[data-theme="dark"] #cancelSlotsBtn:hover:not(:disabled),:root[data-theme="dark"] #confirmNo:hover:not(:disabled),:root[data-theme="dark"] #previousPlayersCancel:hover:not(:disabled),:root[data-theme="dark"] #historyClose:hover:not(:disabled),:root[data-theme="dark"] .icon-button:hover:not(:disabled){background:#303548;color:#fff}:root[data-theme="dark"] .remove-player{background:transparent;color:#ff9098;border-color:#7b4149}:root[data-theme="dark"] .remove-player:hover:not(:disabled){background:#48262c;color:#fff;border-color:#ae5660}
:root[data-theme="contrast"]{--action-success:#00ff66;--action-success-hover:#fff;--action-warning:#ffea00;--action-warning-hover:#fff;--action-danger:#ff5c5c;--action-danger-hover:#fff}:root[data-theme="contrast"] #saveMembersBtn,:root[data-theme="contrast"] #saveTemplateBtn,:root[data-theme="contrast"] #saveGameBtn,:root[data-theme="contrast"] #endGameBtn,:root[data-theme="contrast"] #whatsAppResultBtn,:root[data-theme="contrast"] .history-card-actions .secondary{background:#00ff66;color:#000;border:2px solid #fff}:root[data-theme="contrast"] #undoRoundBtn,:root[data-theme="contrast"] .edit-round-btn{background:#ffea00;color:#000;border:2px solid #fff}:root[data-theme="contrast"] #resetBtn,:root[data-theme="contrast"] #deleteTemplateBtn,:root[data-theme="contrast"] .btn-danger{background:#ff5c5c;color:#000;border:2px solid #fff}:root[data-theme="contrast"] #signOutBtn,:root[data-theme="contrast"] #cancelSlotsBtn,:root[data-theme="contrast"] #confirmNo,:root[data-theme="contrast"] #previousPlayersCancel,:root[data-theme="contrast"] #historyClose,:root[data-theme="contrast"] .icon-button{background:#000;color:#fff;border:2px solid #fff}:root[data-theme="contrast"] .remove-player{background:#000;color:#ff5c5c;border:2px solid #ff5c5c}
/* Polished light header background v40 */
:root[data-theme="light"] .app-header{background:radial-gradient(circle at 8% 20%,rgba(103,87,232,.12),transparent 34%),radial-gradient(circle at 92% 10%,rgba(190,224,111,.12),transparent 28%),linear-gradient(135deg,#fff 0%,#faf9ff 58%,#f7f9f1 100%);border:1px solid rgba(103,87,232,.10);box-shadow:0 14px 38px rgba(45,35,88,.08);backdrop-filter:none}
/* Polished game workspace background v41 */
:root[data-theme="light"] .setup-panel,:root[data-theme="light"] .game-panel{background:radial-gradient(circle at 5% 5%,rgba(103,87,232,.07),transparent 28%),radial-gradient(circle at 95% 90%,rgba(22,131,93,.05),transparent 25%),linear-gradient(145deg,#fff 0%,#fcfbff 55%,#f8f7fd 100%);border-color:rgba(103,87,232,.10);box-shadow:0 18px 46px rgba(45,35,88,.075)}
:root[data-theme="light"] .bulk-row,:root[data-theme="light"] .template-tools{background:rgba(243,240,252,.82);border:1px solid rgba(103,87,232,.08)}
:root[data-theme="light"] .bulk-form{background:rgba(248,246,253,.90);border-color:rgba(103,87,232,.09)}
:root[data-theme="light"] .app-shell:not(.game-active) .setup-panel{border-bottom:0;box-shadow:0 -8px 32px rgba(45,35,88,.055)}
:root[data-theme="light"] .app-shell:not(.game-active) .game-panel{border-top:1px solid #e8e4f1;box-shadow:0 18px 46px rgba(45,35,88,.075)}
/* Account profile dashboard v42 */
.profile-trigger{display:flex;align-items:center;gap:8px;min-height:42px;padding:5px 12px 5px 6px;background:#fff;color:var(--text);border:1px solid var(--line);box-shadow:none}.profile-trigger:hover:not(:disabled){background:#f3f1f8;color:var(--text);box-shadow:none}.profile-trigger-avatar,.profile-avatar{display:grid;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(135deg,#6757e8,#8d7fff);color:#fff;font-weight:900;line-height:1}.profile-trigger-avatar{width:30px;height:30px;flex:0 0 30px;font-size:13px}.profile-trigger-avatar img,.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-modal{width:min(680px,calc(100% - 24px))}.profile-summary{display:flex;align-items:center;gap:16px;padding:16px;margin:8px 0 16px;border-radius:17px;background:linear-gradient(135deg,#f1edff,#faf9ff 60%,#f3f9e7)}.profile-avatar{width:76px;height:76px;flex:0 0 76px;font-size:27px;box-shadow:0 8px 24px rgba(103,87,232,.2)}.profile-summary>div:last-child{display:grid;gap:5px;min-width:0}.profile-summary strong{font-size:21px;overflow-wrap:anywhere}.profile-summary span{color:var(--muted);overflow-wrap:anywhere}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:17px}.profile-grid>div{display:grid;gap:5px;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--soft)}.profile-grid span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.profile-grid strong{font-size:14px;overflow-wrap:anywhere}.profile-grid #profileVerified[data-verified="true"]{color:var(--success)}.profile-grid #profileVerified[data-verified="false"]{color:var(--danger)}.profile-form{display:grid;gap:13px}.profile-form label{display:grid;gap:7px;font-weight:800}.profile-form input{width:100%}.profile-photo-help{margin:-5px 0 0;color:var(--muted);font-size:12px}.profile-actions{display:flex;justify-content:flex-end;gap:9px}.profile-account-actions{padding-top:15px;margin-top:16px;border-top:1px solid var(--line)}#profileResetPassword{width:100%}#saveProfile{background:var(--action-success)}#saveProfile:hover:not(:disabled){background:var(--action-success-hover)}
:root[data-theme="dark"] .profile-trigger{background:#242838;color:#eef0f7;border-color:#444a60}:root[data-theme="dark"] .profile-trigger:hover:not(:disabled){background:#303548}:root[data-theme="dark"] .profile-summary{background:linear-gradient(135deg,#302b54,#222636 62%,#293627)}:root[data-theme="dark"] .profile-grid>div{background:var(--soft);border-color:var(--line)}
:root[data-theme="contrast"] .profile-trigger{background:#000;color:#fff;border:2px solid #fff}:root[data-theme="contrast"] .profile-trigger-avatar,:root[data-theme="contrast"] .profile-avatar{background:#ffea00;color:#000;border:2px solid #fff}:root[data-theme="contrast"] .profile-summary,:root[data-theme="contrast"] .profile-grid>div{background:#000;color:#fff;border:2px solid #fff}:root[data-theme="contrast"] #saveProfile{background:#00ff66;color:#000;border:2px solid #fff}
@media(max-width:640px){.header-actions #profileBtn{grid-column:1;grid-row:3}.header-actions #signOutBtn{grid-column:2;grid-row:3}.profile-grid{grid-template-columns:1fr}.profile-actions{display:grid;grid-template-columns:1fr}.profile-summary{align-items:flex-start}.profile-avatar{width:64px;height:64px;flex-basis:64px}}
@media(max-width:390px){.header-actions #profileBtn,.header-actions #signOutBtn{grid-column:1;grid-row:auto}.profile-trigger{justify-content:center}.profile-summary{display:grid;justify-items:center;text-align:center}}
/* Stable header controls v43 */
.header-actions{flex-wrap:wrap}.header-actions>*{white-space:nowrap;line-height:1.2}.header-actions button,.header-actions .live-clock,.header-actions .db-status,.header-actions .header-select{flex:0 0 auto}.header-actions #soundToggle,.header-actions #signOutBtn{min-width:max-content}.profile-trigger span:last-child{white-space:nowrap}
@media(max-width:900px){.header-actions{grid-template-columns:repeat(3,minmax(0,1fr));justify-content:stretch}.header-actions>*{min-height:44px;padding:8px 10px;font-size:13px}.header-actions .profile-trigger{justify-content:center}.header-actions .db-status,.header-actions .live-clock{display:flex;align-items:center;justify-content:center}}
@media(max-width:640px){.header-actions{grid-template-columns:1fr 1fr}.header-actions #soundToggle,.header-actions #signOutBtn{min-width:0}}
@media(max-width:390px){.header-actions{grid-template-columns:1fr}.header-actions>*{width:100%}.header-actions #soundToggle,.header-actions #signOutBtn{min-width:0}}
/* Refined authentication experience v44 */
.auth-panel{border:1px solid rgba(103,87,232,.09);box-shadow:0 30px 90px rgba(40,31,83,.17)}.auth-form-column{position:relative;background:linear-gradient(145deg,#fff 0%,#fdfcff 68%,#faf8ff 100%)}.auth-brand{margin-bottom:42px}.auth-logo{background:linear-gradient(135deg,#6757e8,#8b7cff)}.auth-form{gap:16px}.auth-form label{gap:8px;font-size:13px}.auth-form input{min-height:52px;padding:13px 15px;border:1px solid #ded9eb;background:#fff;transition:border-color .18s,box-shadow .18s,background .18s}.auth-form input:hover{border-color:#c7c0df}.auth-form input:focus{border-color:#7969ed;box-shadow:0 0 0 4px rgba(103,87,232,.13)}.auth-password-wrap{position:relative;display:block}.auth-password-wrap input{width:100%;padding-right:72px}.password-toggle{position:absolute;top:50%;right:8px;transform:translateY(-50%);min-height:36px;padding:6px 10px;background:transparent;color:#5e50c5;border:0;box-shadow:none;font-size:12px}.password-toggle:hover:not(:disabled){transform:translateY(-50%);background:#f0edff;color:#493ab7;box-shadow:none}.auth-form button[type="submit"]{min-height:52px;background:linear-gradient(135deg,#6757e8,#7969ed);box-shadow:0 10px 24px rgba(103,87,232,.24)}.auth-form button[type="submit"]:hover:not(:disabled){background:linear-gradient(135deg,#5949d4,#6958e4)}.forgot-password{font-weight:800}.auth-divider{margin:20px 0;color:#858092}.google-signin{background:#fff;border-color:#ded9eb;box-shadow:0 6px 18px rgba(38,31,69,.06)}.google-signin:hover:not(:disabled){background:#faf9ff;border-color:#c9c2e0;box-shadow:0 8px 22px rgba(38,31,69,.09)}.auth-toggle{background:#f4f1ff;color:#5848ca;border:1px solid #e3def7}.admin-login-link{display:block;text-align:center;margin-top:15px;color:#777184;font-size:12px;font-weight:800;text-decoration:none}.admin-login-link:hover{text-decoration:underline;color:#5b4bce}.auth-visual.auth-visual-pink{display:grid;background:radial-gradient(circle at 88% 8%,rgba(255,255,255,.48),transparent 25%),radial-gradient(circle at 12% 92%,rgba(103,87,232,.18),transparent 30%),linear-gradient(145deg,#f7c8db,#edb2cc 55%,#e9a8c6);color:#271d2c}.auth-visual.auth-visual-pink:before{display:block;background-image:linear-gradient(rgba(255,255,255,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.18) 1px,transparent 1px);background-size:38px 38px;mask-image:linear-gradient(to bottom,black,transparent 92%)}.auth-orb{position:absolute;border-radius:50%;filter:blur(1px)}.auth-orb-one{width:270px;height:270px;right:-90px;top:-80px;background:rgba(255,255,255,.28)}.auth-orb-two{width:230px;height:230px;left:-80px;bottom:-80px;background:rgba(103,87,232,.14)}.auth-visual-pink .auth-visual-kicker{color:#603e75}.auth-visual-pink h3{color:#201723;font-size:clamp(42px,4vw,58px)}.auth-visual-pink .auth-visual-content>p:not(.auth-visual-kicker){color:#644f68}.auth-benefits{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:28px}.auth-benefits span{padding:8px 11px;border:1px solid rgba(66,37,68,.14);border-radius:999px;background:rgba(255,255,255,.38);font-size:12px;font-weight:800}.auth-score-preview{display:grid;gap:9px;padding:16px;border:1px solid rgba(255,255,255,.55);border-radius:20px;background:rgba(255,255,255,.30);backdrop-filter:blur(12px);box-shadow:0 18px 42px rgba(91,50,80,.12)}.auth-score-preview>div{display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:11px;padding:12px;border-radius:13px;background:rgba(255,255,255,.68)}.auth-score-preview>div:first-child{background:#efffd0}.auth-score-preview span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#6757e8;color:#fff;font-weight:900}.auth-score-preview>div:first-child span{background:#c8ef58;color:#263408}.auth-score-preview strong,.auth-score-preview b{font-size:15px}.auth-score-preview b{font-variant-numeric:tabular-nums}
:root[data-theme="dark"] .auth-panel{background:#1a1d29;border-color:#34394d}:root[data-theme="dark"] .auth-form-column{background:linear-gradient(145deg,#1a1d29,#202433);color:#f7f5ff}:root[data-theme="dark"] .auth-brand{color:#f7f5ff}:root[data-theme="dark"] .auth-form input{background:#151823;color:#f7f5ff;border-color:#3a4054}:root[data-theme="dark"] .password-toggle{color:#bcb4ff}:root[data-theme="dark"] .google-signin{background:#242838;color:#f7f5ff;border-color:#444a60}:root[data-theme="dark"] .auth-toggle{background:#302c58;color:#d2ccff;border-color:#494170}
:root[data-theme="contrast"] .auth-panel,:root[data-theme="contrast"] .auth-form-column{background:#000;color:#fff;border-color:#fff}:root[data-theme="contrast"] .auth-form input{background:#000;color:#fff;border:2px solid #fff}:root[data-theme="contrast"] .password-toggle{background:#000;color:#ffea00;border:2px solid #ffea00}:root[data-theme="contrast"] .auth-form button[type="submit"]{background:#ffea00;color:#000;border:2px solid #fff}:root[data-theme="contrast"] .google-signin,:root[data-theme="contrast"] .auth-toggle{background:#000;color:#ffea00;border:2px solid #ffea00}
@media(max-width:900px){.auth-panel{width:min(620px,calc(100% - 24px))}.auth-form-column{padding:42px}.auth-visual.auth-visual-pink{display:none}}
@media(max-width:520px){.auth-panel{width:calc(100% - 12px);margin:6px auto}.auth-form-column{padding:27px 19px}.auth-brand{margin-bottom:28px}.auth-form-column .section-heading{margin-bottom:22px}.auth-form input,.auth-form button[type="submit"],.google-signin{min-height:50px}}
/* Full viewport authentication layout v45 */
.auth-panel{width:min(1540px,calc(100vw - 48px));max-width:none;min-height:calc(100dvh - 48px);margin:24px auto}.auth-layout{grid-template-columns:minmax(440px,.9fr) minmax(520px,1.1fr);min-height:calc(100dvh - 48px)}.auth-form-column{padding:clamp(42px,5vw,78px);min-width:0}.auth-visual{min-width:0;padding:clamp(34px,5vw,78px)}.auth-visual-content{width:100%;max-width:580px;min-width:0}.auth-visual h3{max-width:100%;font-size:clamp(38px,4.2vw,62px);overflow-wrap:break-word}.auth-visual-content>p:not(.auth-visual-kicker){max-width:520px}.auth-benefits{max-width:100%}.auth-benefits span{white-space:normal}.auth-score-preview{width:100%;max-width:520px}.auth-score-preview>div{min-width:0}.auth-score-preview strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1050px){.auth-panel{width:min(920px,calc(100vw - 32px))}.auth-layout{grid-template-columns:minmax(380px,.95fr) minmax(420px,1.05fr)}.auth-form-column,.auth-visual{padding:40px}.auth-visual h3{font-size:clamp(36px,5vw,48px)}}
@media(max-width:820px){.auth-panel{width:min(620px,calc(100vw - 24px));min-height:0;margin:12px auto}.auth-layout{display:block;min-height:0}.auth-form-column{padding:40px}.auth-visual.auth-visual-pink{display:none}}
@media(max-width:520px){.auth-panel{width:calc(100vw - 12px);margin:6px auto;min-height:0}.auth-form-column{padding:27px 19px}}
/* Informational login features v46 */
.auth-benefits{display:grid;grid-template-columns:1fr;gap:9px;margin:0 0 28px;max-width:420px}.auth-benefits>p{margin:0 0 2px;color:#644f68;font-size:11px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.auth-benefits>div{display:grid;grid-template-columns:24px 1fr;align-items:center;gap:10px;padding:7px 0;background:transparent;border:0;border-radius:0;cursor:default}.auth-benefits>div span{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:#efffd0;color:#355a10;font-size:13px;font-weight:900}.auth-benefits>div strong{font-size:13px;font-weight:850;color:#35283a}.auth-benefits>div+div{border-top:1px solid rgba(66,37,68,.10)}
/* Clear login navigation and preview v47 */
.admin-login-link{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:max-content;min-height:0;margin:16px auto 0;padding:6px 10px;border:0;border-radius:8px;background:transparent;color:#6f6878;font-size:12px;font-weight:800;text-decoration:none}.admin-login-link:before{content:"";width:6px;height:6px;margin-right:7px;border-radius:50%;background:#9a91a6}.admin-login-link:hover{background:#f3f0fb;color:#5848ca;text-decoration:none}.auth-score-preview>.auth-preview-label{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 3px 8px;border-radius:0;background:transparent}.auth-preview-label strong{font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:#513d58}.auth-preview-label small{padding:4px 7px;border-radius:999px;background:rgba(255,255,255,.42);color:#6b546f;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}.auth-score-preview>.auth-preview-label+div{margin-top:0}
:root[data-theme="dark"] .admin-login-link{color:#b5b0c2}:root[data-theme="dark"] .admin-login-link:hover{background:#302c58;color:#d2ccff}:root[data-theme="contrast"] .admin-login-link{color:#66ccff;border:0}:root[data-theme="contrast"] .auth-preview-label strong,:root[data-theme="contrast"] .auth-preview-label small{color:#000}
/* Public live spectator v49 */
.spectator-shell{width:min(920px,calc(100% - 28px));margin:clamp(14px,5vh,54px) auto;padding-bottom:30px}.spectator-header{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:24px 26px;margin-bottom:18px;border:1px solid rgba(103,87,232,.12);border-radius:25px;background:radial-gradient(circle at 8% 15%,rgba(103,87,232,.12),transparent 35%),linear-gradient(135deg,#fff,#faf9ff);box-shadow:0 16px 45px rgba(45,35,88,.09)}.spectator-header h1{font-size:clamp(27px,5vw,38px)}.spectator-header p:not(.eyebrow){margin:7px 0 0;color:var(--muted)}.spectator-login-link{flex:0 0 auto;padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--primary);font-size:13px;font-weight:900;text-decoration:none}.spectator-login-link:hover{background:#f1eeff}.spectator-card{overflow:hidden;border:1px solid rgba(103,87,232,.12);border-radius:25px;background:#fff;box-shadow:0 20px 55px rgba(45,35,88,.10)}.spectator-status-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 22px;background:#f4f1fb;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px}.spectator-status-row>div{display:flex;align-items:center;gap:9px;color:var(--text)}.spectator-pulse{width:10px;height:10px;border-radius:50%;background:#21b968;box-shadow:0 0 0 5px rgba(33,185,104,.14);animation:spectatorPulse 1.8s infinite}.spectator-pulse.offline{background:#9a94a4;box-shadow:none;animation:none}@keyframes spectatorPulse{50%{box-shadow:0 0 0 8px rgba(33,185,104,0)}}.spectator-game{padding:24px}.spectator-game-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.spectator-game-heading p{margin:0 0 4px;color:var(--muted);font-size:12px}.spectator-game-heading span{padding:7px 10px;border-radius:10px;background:#efedff;color:#5848ca;font-size:12px;font-weight:900}.spectator-scores{display:grid;gap:10px}.spectator-scores>div{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:13px;padding:14px 16px;border:1px solid var(--line);border-radius:15px;background:#fcfbff}.spectator-scores>div.leader{background:#efffd0;border-color:#d1ec86}.spectator-rank{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#6757e8;color:#fff;font-weight:900}.spectator-scores .leader .spectator-rank{background:#bce943;color:#263408}.spectator-scores strong{font-size:17px;overflow-wrap:anywhere}.spectator-scores b{font-size:22px;font-variant-numeric:tabular-nums}.spectator-result{margin-top:17px;padding:14px;border-radius:14px;background:#eaf8ef;color:#166b42;text-align:center;font-weight:900}.spectator-note{margin:14px 0 0;color:var(--muted);text-align:center;font-size:12px}
:root[data-theme="dark"] .spectator-header,:root[data-theme="dark"] .spectator-card,:root[data-theme="dark"] .spectator-login-link,:root[data-theme="dark"] .spectator-scores>div{background:#1a1d29;color:#f7f5ff;border-color:#34394d}:root[data-theme="dark"] .spectator-status-row{background:#222636;border-color:#34394d}:root[data-theme="dark"] .spectator-scores>div.leader{background:#293d28;border-color:#47704b}:root[data-theme="dark"] .spectator-game-heading span{background:#302c58;color:#d2ccff}
:root[data-theme="contrast"] .spectator-header,:root[data-theme="contrast"] .spectator-card,:root[data-theme="contrast"] .spectator-login-link,:root[data-theme="contrast"] .spectator-scores>div{background:#000;color:#fff;border:2px solid #fff;box-shadow:none}:root[data-theme="contrast"] .spectator-status-row{background:#000;color:#fff;border-bottom:2px solid #fff}:root[data-theme="contrast"] .spectator-scores>div.leader{border:3px solid #00ff66}:root[data-theme="contrast"] .spectator-rank{background:#ffea00;color:#000}
@media(max-width:620px){.spectator-shell{width:calc(100% - 16px);margin:8px auto}.spectator-header{align-items:flex-start;flex-direction:column;padding:19px;border-radius:19px}.spectator-login-link{width:100%;text-align:center}.spectator-card{border-radius:19px}.spectator-status-row{align-items:flex-start;flex-direction:column;padding:13px 16px}.spectator-game{padding:16px}.spectator-game-heading{align-items:flex-start}.spectator-scores>div{grid-template-columns:38px minmax(0,1fr) auto;padding:12px}.spectator-scores strong{font-size:15px}}