:root{color-scheme:dark;--bg:#080d10;--panel:#101920;--line:#26343d;--ink:#eff5f5;--muted:#a4b6bd;--lime:#d6fb6f;--cyan:#8eeced;--gold:#ffcf7c;--red:#fb9194;font-family:Arial,Helvetica,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button,.button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border:1px solid #43545b;background:#19282f;color:var(--ink);border-radius:8px;cursor:pointer;text-decoration:none;font-weight:700}button:hover,.button:hover{border-color:var(--cyan);background:#263940}button.primary{background:var(--lime);border-color:var(--lime);color:#152018}button:disabled{opacity:.45;cursor:not-allowed}a{color:var(--cyan)}:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}input:not([type=checkbox]),select{width:100%;min-width:0;background:#0a141a;color:var(--ink);border:1px solid #3a4b55;border-radius:7px;padding:10px;margin-top:6px}input[type=checkbox]{accent-color:var(--lime)}label{display:block;font-size:14px;color:#c7d5da}p:where(:not(html.tt-shell .gift-picker-status)){color:var(--muted);line-height:1.6}.small{font-size:14px}.eyebrow{font-size:14px;font-weight:800;letter-spacing:2px;text-transform:uppercase;color:var(--cyan)}
/* Browser-source board is a fixed 9:16 stage, scaled as one unit. */
body[data-view=source]{width:100vw;height:100vh;overflow:hidden}#stage{position:fixed;inset:0;display:grid;place-items:center;overflow:hidden}.board{position:absolute;width:720px;height:1280px;padding:34px;transform-origin:center center;background:radial-gradient(ellipse at 95% 0%,#18303a55,transparent 50%),var(--bg);display:flex;flex-direction:column;gap:18px}.brand-row{display:flex;align-items:center;justify-content:space-between}.brand-row strong{font-size:15px;letter-spacing:3px}.mode-chip{border:1px solid #44585f;border-radius:5px;padding:7px 9px;color:var(--cyan);font-size:14px;letter-spacing:1.3px;font-weight:800}.mode-chip.demo{color:var(--gold);border-color:#ad7e4355}.title-row h1{font-family:Impact,'Arial Narrow','DejaVu Sans Condensed',sans-serif;font-size:59px;letter-spacing:1px;font-weight:900;margin:6px 0;color:var(--lime);line-height:1.03}.title-row p{margin:6px 0 2px;font-size:14px;letter-spacing:2.3px;color:var(--muted);font-weight:700}.metrics{display:grid;grid-template-columns:1.2fr 1fr 1fr;border:1px solid var(--line);background:var(--panel);min-height:113px}.metric{padding:16px 17px;border-right:1px solid var(--line)}.metric:last-child{border:0}.label{font-size:14px;letter-spacing:1.5px;font-weight:800;color:var(--muted);text-transform:uppercase}.metric b{display:block;font-family:Impact,'Arial Narrow','DejaVu Sans Condensed',sans-serif;font-size:31px;letter-spacing:.6px;margin:6px 0;color:var(--lime)}.metric:nth-child(2) b{color:#fff}.metric:nth-child(3) b{color:var(--gold)}.metric small{font-size:14px;color:var(--muted)}.level-track{height:3px;background:#334239;margin-top:9px}.level-track i{display:block;height:100%;background:var(--lime)}.round-bar{display:flex;justify-content:space-between;font-size:14px;letter-spacing:1.2px;font-weight:800;color:var(--muted)}#phase-label{color:var(--cyan)}.memory-card{position:relative;flex:1;min-height:410px;display:flex;flex-direction:column;border:1px solid var(--line);background:var(--panel);padding:23px 21px 17px;overflow:hidden}.card-heading{display:flex;gap:12px;align-items:center}.question-icon{background:var(--cyan);color:#0c262b;width:38px;height:43px;display:grid;place-items:center;font-size:26px;font-weight:900}.card-heading h2{margin:3px 0 0;font-family:Impact,'Arial Narrow','DejaVu Sans Condensed',sans-serif;font-size:24px;letter-spacing:.4px;color:#f1f6ee}.card-heading .label{font-size:14px}#clock{margin-left:auto;background:var(--gold);color:#152018;min-width:40px;text-align:center;padding:8px 5px;font-weight:900;font-size:22px;font-variant-numeric:tabular-nums}.card-count{font-size:14px;color:var(--muted);margin-top:15px;letter-spacing:.6px}.number-area{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:20px;min-height:205px}.number{font-family:Impact,'Arial Narrow','DejaVu Sans Condensed',sans-serif;font-variant-numeric:tabular-nums;font-size:76px;font-weight:900;color:var(--lime);letter-spacing:5px;text-align:center;white-space:nowrap;max-width:100%;line-height:1.2}.number.hidden-number{color:#668088;letter-spacing:13px}.number-caption{font-size:14px;letter-spacing:1px;color:var(--muted);text-align:center;margin:0}#attempt-list{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0;min-height:136px;align-content:start}.attempt{display:flex;align-items:center;gap:8px;background:#18242d;padding:8px 10px;min-width:0;border-left:2px solid #395059}.avatar{flex-shrink:0;width:24px;height:24px;border-radius:50%;background:#4a5362;display:grid;place-items:center;font-size:14px;color:#fff;font-weight:800}.attempt>div{min-width:0;flex:1}.attempt strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.attempt small{font-size:14px;color:var(--muted);letter-spacing:1px}.attempt>span:last-child{color:var(--cyan);font-size:14px}.correct-strip{font-size:14px;color:var(--lime);display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-height:25px}.correct-strip span{background:#c6f77812;padding:4px 6px;border-radius:10px;font-size:14px;max-width:135px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.timeline{height:4px;background:#22343c;margin-top:17px}.timeline i{height:100%;display:block;background:var(--cyan);transition:width .08s linear}.bottom-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:15px;height:202px}.board-panel{padding:16px;background:var(--panel);border:1px solid var(--line);overflow:hidden}.board-panel h3{font-size:14px;letter-spacing:1.3px;margin:0 0 14px;color:var(--ink)}.leader{display:flex;align-items:center;gap:7px;font-size:14px;margin:8px 0;min-width:0}.leader b{color:var(--gold);margin-left:auto;font-variant-numeric:tabular-nums}.leader .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:145px}.leader .rank{color:var(--muted);width:12px;font-size:14px}.empty{font-size:14px;line-height:1.7;color:var(--muted)}.brief strong{font-family:Impact,'Arial Narrow',sans-serif;font-size:27px;color:var(--cyan);letter-spacing:1px}.brief p{font-size:14px;line-height:1.6;margin:10px 0}.brief small{font-size:14px;letter-spacing:.5px;color:var(--muted)}.flash-legend{display:flex;align-items:center;gap:8px;margin:8px 0 0;font-size:14px;color:var(--ink);letter-spacing:.2px}.flash-icon{width:22px;height:22px;flex:none;background:center/contain no-repeat}.gift-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.gift-tile{display:flex;align-items:center;gap:11px;border:1px solid var(--line);padding:13px;background:#101b20}.gift-icon{font-size:27px;color:var(--cyan);width:32px;text-align:center;font-weight:900}.gift-tile strong{font-size:14px;display:block;letter-spacing:.8px}.gift-tile small{font-size:14px;display:block;color:var(--muted);margin-top:5px;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gift-tile.used{opacity:.5}#notice{margin:0;color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid var(--line);padding-bottom:10px}.board-footer{font-size:14px;color:#819aa4;display:flex;justify-content:space-between;gap:20px}.paused-overlay{position:absolute;inset:0;background:#081016e8;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.paused-overlay strong{font-size:50px;color:var(--lime)}.paused-overlay p{font-size:18px;max-width:480px}.hidden,[hidden]{display:none!important}
/* Phase colours distinguish the initial memory window from the final reveal. */
.board{background-image:linear-gradient(#71858a08 1px,transparent 1px),linear-gradient(90deg,#71858a08 1px,transparent 1px);background-size:32px 32px}.board[data-phase=memorise] .number,.board[data-phase=answer] .number{color:var(--ink)}.board[data-phase=memorise] #clock{background:var(--cyan)}.number{letter-spacing:2px}.no-leaderboard{grid-template-columns:1fr}.transparent,.transparent .board{background:transparent}.transparent #stage{background:transparent}
/* Hosted controller: never injected into a clean browser source. */
#celebration{position:absolute;inset:0;pointer-events:none;overflow:hidden}#celebration i{position:absolute;left:var(--x);top:8%;width:7px;height:13px;background:var(--c);transform:rotate(var(--r));animation:celebrate 1.3s ease-out both}#celebration.paused i{animation-play-state:paused}@keyframes celebrate{from{opacity:1;translate:0 0;rotate:0deg}to{opacity:0;translate:0 290px;rotate:200deg}}@media(prefers-reduced-motion:reduce){#celebration i{animation:none;opacity:.6}}
.host-header{max-width:1180px;margin:0 auto;padding:28px 24px;display:flex;justify-content:space-between;gap:20px;align-items:center}.host-header h1{font-size:36px;letter-spacing:-1.4px;margin:8px 0}.host-header p{font-size:14px;margin:4px 0}.host-layout{max-width:1180px;padding:0 24px 35px;margin:0 auto;display:grid;grid-template-columns:minmax(280px,410px) minmax(340px,1fr);gap:28px;align-items:start}.preview{position:sticky;top:18px}.preview iframe{border:1px solid #33474e;border-radius:12px;display:block;width:100%;aspect-ratio:9/16;background:var(--bg)}.preview p{font-size:14px;text-align:center}.host-stack{display:grid;gap:16px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:21px}.panel h2{font-size:18px;margin:0 0 12px}.panel p{font-size:14px}.row{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.controls{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 0}.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0}.fields label{min-width:0}.fields .wide{grid-column:1/-1}.status{border-left:3px solid var(--cyan);padding:8px 12px;background:#07141c;min-height:36px;font-size:14px;color:#c7d5d8;margin-top:12px}.note{border-left:3px solid var(--gold);padding-left:11px}.host-footer{max-width:1180px;margin:0 auto;padding:0 24px 25px;font-size:14px;color:var(--muted)}#source-url{font-family:monospace}.answer-row{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.answer-row input{margin:0}.status.error{border-color:var(--red)}details{margin-top:12px}summary{cursor:pointer;color:var(--cyan)}.host-header .eyebrow{display:inline-block;text-decoration:none;margin-bottom:6px}.host-header h1{margin-top:0}.play-list{list-style:none;padding:0;margin:12px 0;display:grid;gap:12px}.play-list li{display:flex;gap:10px;align-items:flex-start}.play-list p{margin:0;color:var(--ink)}.play-icon{width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:8px;background:#0c171c;overflow:hidden}.play-icon img{width:36px;height:36px;object-fit:contain;display:block}.play-icon svg{width:22px;height:22px}.steps{margin:6px 0 14px;padding-left:1.2rem;color:var(--muted)}.steps li{margin:6px 0}.source-link{font-family:ui-monospace,Consolas,monospace;font-size:14px}html:not(.tt-shell) .gift-picker-status{min-height:1.2em;color:var(--muted)}.gift-legend{display:grid;gap:8px;margin:0 0 14px}.gift-legend-row{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:10px;background:#0c171c}.gift-legend-copy{min-width:0}.gift-legend-copy strong,.gift-legend-copy span{display:block;overflow-wrap:anywhere}.gift-legend-action{font-size:14px;letter-spacing:.04em;text-transform:uppercase;color:var(--gold);font-weight:800}.gift-legend-meta{color:var(--muted);font-size:14px}.gift-thumb-shell,.gift-thumb,.gift-thumb-fallback{width:46px;height:46px;border-radius:8px}.gift-thumb{display:block;object-fit:contain;background:#101920}.gift-thumb-fallback{display:grid;place-items:center;padding:4px;color:var(--muted);font-size:14px;font-weight:700;line-height:1.15;text-align:center;background:#101920}.check{display:flex;align-items:center;gap:8px;margin:8px 0}.check input{width:auto;margin:0}.panel h3{font-size:15px;margin:18px 0 8px}.host-layout,.panel,.host-stack,.fields label{min-width:0}.source-link,.panel p,.play-list p{overflow-wrap:anywhere}
.board-panel.brief h3{margin-bottom:6px}.board-panel.brief>strong{line-height:1}.board-panel.brief p{margin:4px 0;line-height:1.35}.board-panel.brief .flash-legend{margin:2px 0 0}.gift-legend-action{text-transform:none;letter-spacing:0;font-weight:700}
@media(max-width:800px){.host-layout{grid-template-columns:1fr;max-width:560px;padding:0 16px 25px;gap:20px}.preview{position:static;max-width:370px;width:100%;margin:auto}.host-header{padding:25px 18px;max-width:560px}.host-header h1{font-size:30px}.panel{padding:17px}.controls{grid-template-columns:1fr 1fr}.fields{grid-template-columns:1fr;gap:12px}.host-footer{max-width:560px}.gift-legend-row{grid-template-columns:46px minmax(0,1fr)}.gift-legend-row .row{grid-column:1 / -1}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Phone-readable overlay type while retaining the original 720 x 1280 board. */
body[data-view=source] .brand-row strong{font-size:18px}
body[data-view=source] .mode-chip{font-size:14px}
body[data-view=source] .title-row p{font-size:16px}
body[data-view=source] .label{font-size:14px}
body[data-view=source] .metric small{font-size:14px}
body[data-view=source] .round-bar{font-size:14px}
body[data-view=source] .card-heading .label{font-size:14px}
body[data-view=source] .card-count{font-size:14px}
body[data-view=source] .number-caption{font-size:17px}
body[data-view=source] .attempt strong{font-size:14px}
body[data-view=source] .attempt small{font-size:14px}
body[data-view=source] .attempt>span:last-child{font-size:16px}
body[data-view=source] .correct-strip{font-size:14px}
body[data-view=source] .correct-strip span{font-size:14px}
body[data-view=source] .board-panel h3{font-size:14px}
body[data-view=source] .leader{font-size:15px}
body[data-view=source] .leader .rank{font-size:14px}
body[data-view=source] .empty{font-size:15px}
body[data-view=source] .brief p{font-size:15px}
body[data-view=source] .brief small{font-size:14px}
body[data-view=source] .flash-legend{font-size:15px}
body[data-view=source] .gift-tile strong{font-size:15px}
body[data-view=source] .gift-tile small{font-size:14px}
body[data-view=source] #notice{font-size:15px}
body[data-view=source] .board-footer{font-size:14px}
body[data-view=source] .attempt-empty{grid-column:1/-1;text-align:center;padding:36px 0}
html[data-tt-gift-icons=off] .flash-icon{display:none!important}

/* Small additions to the pinned Codex-4 hosted shell. */
html.tt-shell .preview-wrap{position:relative}
html.tt-shell .preview-tag{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);padding:4px 12px;border-radius:20px;background:#ffd43b;color:#101114;font:700 14px/1.4 Inter,"Segoe UI",sans-serif;pointer-events:none}
html.tt-shell .preview-tag[hidden]{display:none}
html.tt-shell .effects{grid-template-columns:repeat(2,minmax(0,1fr))}
html.tt-shell .effects button{text-align:left;font-size:14px}
html.tt-shell .gift-copy{min-width:150px}
html.tt-shell .settings-foot>.button-row{margin-top:0}
html.tt-shell .app-link .tt-tikfinity-arrow{font-weight:400}
@media(max-width:600px){html.tt-shell .modes button{padding-inline:12px}html.tt-shell .effects{grid-template-columns:1fr}}
/* Notion #3: section 05 body text matches the Battle Arena reference. */
html.tt-shell .panel .input-grid>label{color:var(--ink)}
html.tt-shell .switch-list .switch{color:var(--ink)}
html.tt-shell .settings-foot p{line-height:1.55}
