:root{color-scheme:light;--bg:#fafafa;--panel:#fff;--fg:#1a1a2e;--muted:#5e6b78;--line:#e2e7e4;--accent:#4a6fa5;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--fg);background:var(--bg)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font-size:19px;line-height:1.72}main{width:min(100% - 36px,780px);margin:auto;padding:34px 0 72px}
header,.actions{display:flex;align-items:center;justify-content:space-between;gap:14px}header{border-bottom:1px solid var(--line);padding-bottom:17px;margin-bottom:42px}.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.account-name{color:var(--muted);font:12px/1.5 system-ui,sans-serif;text-align:right}a{color:inherit}#brand{font:700 14px/1.5 system-ui,sans-serif;letter-spacing:.1em;text-decoration:none;text-transform:uppercase}
button,select,input{font:inherit}button,select{border:1px solid #57544e;border-radius:7px;padding:10px 15px;color:var(--fg);background:#24272b;cursor:pointer}button:hover,button:focus-visible,select:focus-visible,input:focus-visible{border-color:var(--accent);background:#2e2e2a;outline:2px solid var(--accent);outline-offset:2px}button:disabled{opacity:.4;cursor:default}
.eyebrow{margin:0 0 17px;color:#b7ac91;font:12px/1.5 system-ui,sans-serif;letter-spacing:.13em;text-transform:uppercase}h1{margin:0 0 12px;font-size:clamp(2.1rem,7vw,2.8rem);font-weight:400;line-height:1.17}h2{font-size:1.2rem;font-weight:400}.intro{max-width:680px;margin:0 0 34px;color:var(--muted);font-style:italic}
.status-card,#slots-panel,.game-view{margin:24px 0;padding:20px 22px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.status-card p{margin:0 0 10px}.meta,.status-card button,#sequence,.slot,#notice,.result-line{font:13px/1.6 system-ui,sans-serif}.meta{color:var(--muted);overflow-wrap:anywhere}.status-card button{margin:0 8px 5px 0}#slots-panel h2{margin:0 0 8px}#slots-hint,#notice{color:var(--muted)}.slots{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:9px;margin:18px 0}.slot{width:100%;text-align:left}.slot[aria-pressed=true]{border-color:#8cdbac;color:#b8e6c7}
.renderer-panel{margin:18px 0;padding:16px 20px;border-left:2px solid #8b703b;background:#1d2024}.renderer-panel label{display:block;margin-bottom:8px;font:13px/1.5 system-ui,sans-serif;color:var(--muted)}.renderer-panel select{min-width:min(100%,260px);font:14px/1.5 system-ui,sans-serif}.renderer-panel p{margin:9px 0 0;font:12px/1.5 system-ui,sans-serif}.renderer-panel .error{color:#fc8a87}
.game-view{margin-top:30px;padding:27px 26px}.game-view .eyebrow{display:inline-block;border:1px solid #8b703b;border-radius:20px;padding:5px 10px;color:#e4b35b}.story-text{font-size:1.12rem;line-height:1.78}.story-text p{margin:0 0 1.15em}.story-text p:last-child{margin-bottom:0}.timer{min-height:1.5em;margin:20px 0 6px;color:#b7ac91;font:12px/1.5 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}.timer.expired{color:#fc8a87}.choices{display:grid;gap:11px;margin-top:22px}.choices button{padding:14px 18px;font:16px/1.45 system-ui,sans-serif;text-align:left}.result-line{color:var(--accent-soft,#c7ab81)}
.board-wrap{max-width:620px;margin:14px auto}.board-legend{display:flex;justify-content:space-between;margin-bottom:12px;color:var(--muted);font:13px/1.5 system-ui,sans-serif}.board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:2px;padding:9px;border-radius:10px;background:#8b8067}.cell{position:relative;aspect-ratio:1;min-width:0;padding:0;border:0;border-radius:2px;background:#e9dec2;color:#82775e;font:10px system-ui,sans-serif}.cell:hover{background:#f5ebd2}.cell:disabled{opacity:1}.cell.black:after,.cell.white:after,.cell.egg:after{content:"";position:absolute;left:50%;top:50%;width:62%;height:62%;transform:translate(-50%,-50%);border-radius:50%;box-shadow:0 2px 3px #0005}.cell.black:after{background:#26332f}.cell.white:after{background:#faf8f0;border:2px solid #8b9389}.cell.egg:after{width:72%;height:42%;border-radius:50%;background:#d6bd72;border:2px solid #a58d4c}.cell.egg:before{content:attr(data-egg-number);position:absolute;inset:0;z-index:1;display:grid;place-items:center;color:#3a3525;font:600 10px system-ui,sans-serif;pointer-events:none}.cell.proposal{box-shadow:inset 0 0 0 3px var(--proposal-color,#41775c)}.cell.selected{outline:3px solid #f0c981;outline-offset:-3px;z-index:1}.cell.previous-selected{outline:2px dashed #f0c981;outline-offset:-3px;z-index:1}#notice{min-height:1.6em;margin:15px 0 0}footer{border-top:1px solid var(--line);margin-top:65px;padding-top:17px;color:#8f8f8d;font:12px/1.6 system-ui,sans-serif}dialog{width:min(460px,92vw);border:1px solid #57544e;border-radius:9px;padding:24px;color:var(--fg);background:#1d2024}dialog::backdrop{background:#090b0dcc}dialog label{display:grid;gap:7px;margin:14px 0;font:14px/1.5 system-ui,sans-serif}dialog input{width:100%;border:1px solid #57544e;border-radius:7px;padding:11px;color:var(--fg);background:#17191d}.error{color:#fc8a87;overflow-wrap:anywhere}.actions{justify-content:flex-start;flex-wrap:wrap}[hidden]{display:none!important}
@media(max-width:600px){body{font-size:18px}main{width:min(100% - 30px,780px);padding-top:24px}header{margin-bottom:32px}.status-card,#slots-panel,.game-view{padding:18px}.story-text{font-size:1.05rem}.board{padding:5px}.cell{font-size:8px}}
#home-brand,.player-home{display:flex;align-items:center;gap:9px;font:700 14px/1.5 system-ui,sans-serif;letter-spacing:.08em;text-decoration:none;text-transform:uppercase}#home-brand img,.player-home img{width:auto;height:34px;object-fit:contain}#games-link{font:13px/1.5 system-ui,sans-serif;text-decoration:underline}
.site-brands{display:flex;align-items:center;gap:9px}.games-brand{font:700 21px/1.2 system-ui,sans-serif;letter-spacing:.02em;text-decoration:none}.games-brand[aria-current="page"]{cursor:default}.voting-home-icon{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--line);border-radius:6px}.voting-home-icon img{display:block;width:40px;height:40px}.voting-home-icon:hover,.voting-home-icon:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.brand-icon-dark{display:none}:root[data-theme="dark"] .brand-icon-light{display:none}:root[data-theme="dark"] .brand-icon-dark{display:inline}
header{flex-wrap:wrap}
.theme-toggle{display:inline-grid;width:38px;height:38px;place-items:center;padding:8px;border:1px solid #d8dee5;border-radius:50%;background:transparent;color:#354351;cursor:pointer}.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
:root[data-theme="light"] body{color:var(--fg);background:var(--bg)}
:root[data-theme="light"] button,:root[data-theme="light"] select{border-color:#cbd4dc;color:#202a35;background:#fff}
:root[data-theme="light"] button:hover,:root[data-theme="light"] select:focus-visible{background:#eef3f7}
:root[data-theme="light"] header,:root[data-theme="light"] .status-card,:root[data-theme="light"] #slots-panel,:root[data-theme="light"] .game-view,:root[data-theme="light"] .renderer-panel,:root[data-theme="light"] .game-card{color:var(--fg);background:var(--panel);border-color:var(--line)}
:root[data-theme="light"] .intro,:root[data-theme="light"] .meta,:root[data-theme="light"] #slots-hint,:root[data-theme="light"] #notice,:root[data-theme="light"] .renderer-panel label{color:#5e6b78}
:root[data-theme="light"] .game-view .eyebrow{color:#315b7a;border-color:#9bbbd8}
.shared-text-content{min-height:3em;padding:18px;margin:18px 0;border:1px solid var(--line);border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:1.1rem;line-height:1.65}.shared-text-form{display:grid;gap:12px;margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:8px}.shared-text-form label{display:grid;gap:8px}.shared-text-form textarea{width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--fg);font:inherit;resize:vertical}.shared-text-form button{justify-self:start}.game-view[data-game-handler="sharedtext"] .choices button{text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}
.shared-text-author-control{display:inline-flex;align-items:center;gap:.35em;margin-top:12px}.shared-text-entry{display:inline}
:root[data-theme="light"] .story-text{font-family:Georgia,'Times New Roman',serif}
:root[data-theme="light"] .theme-toggle{color:#354351;border-color:#d8dee5}
:root[data-theme="dark"]{color-scheme:dark;--bg:#17191d;--panel:#1d2024;--fg:#eae4d8;--muted:#a6a197;--line:#40413e;--accent:#d4ae74}
:root[data-theme="dark"] body{color:var(--fg);background:var(--bg)}
:root[data-theme="dark"] header,:root[data-theme="dark"] .status-card,:root[data-theme="dark"] #slots-panel,:root[data-theme="dark"] .game-view,:root[data-theme="dark"] .renderer-panel,:root[data-theme="dark"] .game-card{color:var(--fg);background:var(--panel);border-color:var(--line)}
:root[data-theme="dark"] .theme-toggle{color:var(--fg);border-color:#57544e}
.explorer{max-width:900px}.language{display:flex;align-items:center;gap:8px;font:12px system-ui,sans-serif}.connection{display:flex;align-items:center;gap:12px;min-height:52px;margin:24px 0}.connection span{width:9px;height:9px;border-radius:50%;background:#79b993}.connection span.error{background:#fc8a87}.connection strong{flex:1;font:13px/1.5 system-ui,sans-serif;color:var(--muted)}.game-list{display:grid;gap:12px}.game-card{padding:16px 20px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.game-card h2{display:flex;flex-wrap:wrap;align-items:baseline;gap:.55em;margin:0 0 4px}.game-card h2 .created-at{color:var(--muted);font:12px/1.5 system-ui,sans-serif;white-space:nowrap}.game-card p{margin:0 0 10px}.game-card .button{display:inline-block;border:1px solid #57544e;border-radius:7px;padding:7px 12px;font:13px/1.5 system-ui,sans-serif;text-decoration:none}.game-card button.button:disabled{opacity:.45;cursor:default}
.direct-game-form{align-items:end;flex-wrap:wrap;padding:18px 20px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.direct-game-form label{display:grid;gap:6px;color:var(--muted);font:12px/1.5 system-ui,sans-serif}.direct-game-form input{min-width:min(100%,260px);border:1px solid #57544e;border-radius:7px;padding:10px;color:var(--fg);background:#17191d;font:14px/1.5 system-ui,sans-serif}.direct-game-form #access-secret{width:150px;min-width:0;text-transform:uppercase}
.choices button.selected-choice{border-color:#a9d7bd;background:#244233;box-shadow:inset 4px 0 #a9d7bd}.current-vote{margin:8px 0 0;padding:10px 12px;border-left:3px solid #a9d7bd;background:#1d2922;color:#d3e8da;font:14px/1.5 system-ui,sans-serif}.vote-secondary-actions{margin-top:22px;padding-top:15px;border-top:1px solid var(--line)}.abstain-button{border-color:#c89761;background:#3a3025;color:#ffe1bc;font-weight:650}.abstain-button:hover,.abstain-button[aria-pressed=true]{border-color:#f0bd7c;background:#4b3928}
.choices button .vote-count{display:inline-grid;place-items:center;min-width:1.45em;height:1.45em;margin-left:9px;padding:0 4px;border-radius:1em;background:#40382b;color:#f0c981;font:600 11px/1 system-ui,sans-serif;vertical-align:middle}.cell .vote-count{position:absolute;top:1px;right:1px;z-index:2;display:grid;place-items:center;min-width:1.35em;height:1.35em;padding:0 2px;border-radius:1em;background:#283b32;color:#fff;font:600 9px/1 system-ui,sans-serif;pointer-events:none}

.last-action{margin:20px 0;padding:12px 15px;border-left:3px solid var(--accent-soft,#c7ab81);background:#ffffff08}.last-action h2{margin:0 0 4px;font:600 12px/1.5 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.last-action p{margin:0;font:14px/1.6 system-ui,sans-serif}

.direct-game-form{display:grid;grid-template-columns:minmax(150px,.65fr) minmax(0,1.35fr);align-items:end;gap:12px;padding:18px 20px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}
.direct-game-form>label{display:grid;gap:6px;color:var(--muted);font:12px/1.5 system-ui,sans-serif}
.direct-game-form>select{width:100%}
.direct-game-form form{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) 190px auto;align-items:end;gap:12px}
.direct-game-form form label{display:grid;gap:6px;color:var(--muted);font:12px/1.5 system-ui,sans-serif}
.direct-game-form input{width:100%;min-width:0;border:1px solid #57544e;border-radius:7px;padding:10px;color:var(--fg);background:#17191d;font:14px/1.5 system-ui,sans-serif}
.direct-game-form #access-secret{text-transform:uppercase}
@media(max-width:640px){.direct-game-form form{grid-template-columns:1fr}.direct-game-form form button{justify-self:start}}

/* Slot and access dialogs use readable surfaces in both color themes. */
:root[data-theme="light"] dialog{color-scheme:light;color:var(--fg);background:var(--panel);border-color:var(--line)}
:root[data-theme="light"] dialog input{color:#202a35;background:#fff;border-color:#9aa8b4}
:root[data-theme="light"] dialog input:focus-visible{outline:2px solid #37658f;outline-offset:2px}
:root[data-theme="dark"] dialog{color-scheme:dark;color:var(--fg);background:var(--panel);border-color:var(--line)}
:root[data-theme="dark"] dialog input{color:#f3f5f7;background:#11161b;border-color:#71808d}
:root[data-theme="dark"] dialog input:focus-visible{outline:2px solid #8bbbe2;outline-offset:2px}
.issued-pin{width:fit-content;margin:18px 0;padding:8px 14px;border:1px solid var(--line);border-radius:7px;font:700 1.5rem/1.3 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.2em}

.explore-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px 14px;margin:20px 0 24px;padding:16px 18px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}
.explore-controls label{color:var(--muted);font:12px/1.5 system-ui,sans-serif}
.explore-controls input{grid-column:1/-1;width:100%;min-width:0;border:1px solid #57544e;border-radius:7px;padding:10px;color:var(--fg);background:#17191d;font:14px/1.5 system-ui,sans-serif}
.explore-controls #game-state-label{grid-column:1/-1;grid-row:3}.explore-controls #game-state-filter{grid-column:1/-1;grid-row:4;display:flex;flex-wrap:wrap;gap:8px 18px;min-width:0;margin:0;padding:0;border:0}.explore-controls #game-state-filter label{display:inline-flex;align-items:center;gap:6px;cursor:pointer}.explore-controls #game-state-filter input{width:auto;margin:0;accent-color:var(--accent)}.explore-controls #page-size-label{grid-column:1;grid-row:5}
.explore-controls #page-size{grid-column:2;grid-row:5;min-width:92px}
.pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin:24px 0}
.pagination span{min-width:6em;text-align:center;color:var(--muted);font:13px/1.5 system-ui,sans-serif}
:root[data-theme="light"] .explore-controls{background:var(--panel);border-color:var(--line)}
:root[data-theme="light"] .game-site-explorer{background:#edf2f6}
:root[data-theme="light"] .game-site-explorer header{background:transparent;border-bottom-color:#b9c8d4}
:root[data-theme="light"] .game-site-explorer .explore-controls,:root[data-theme="light"] .game-site-explorer .connection,:root[data-theme="light"] .game-site-explorer .game-card{background:#fff;border:1px solid #b9c8d4;border-radius:9px;box-shadow:0 3px 12px rgba(29,55,75,.08)}
:root[data-theme="light"] .game-site-explorer .connection{padding:14px 18px;margin:14px 0}
:root[data-theme="light"] .game-site-player{background:#edf2f6}
:root[data-theme="light"] .game-site-player header{background:transparent;border-bottom-color:#b9c8d4}
:root[data-theme="light"] .game-site-player .status-card,:root[data-theme="light"] .game-site-player #slots-panel,:root[data-theme="light"] .game-site-player .game-view,:root[data-theme="light"] .game-site-player .renderer-panel{background:#fff;border:1px solid #b9c8d4;border-radius:9px;box-shadow:0 3px 12px rgba(29,55,75,.08)}
:root[data-theme="light"] .explore-controls input{color:#202a35;background:#fff;border-color:#9aa8b4}
:root[data-theme="dark"] .explore-controls{background:var(--panel);border-color:var(--line)}
:root[data-theme="dark"] .explore-controls input{color:#f3f5f7;background:#11161b;border-color:#71808d}
@media(max-width:520px){.explore-controls{grid-template-columns:minmax(0,1fr)}.explore-controls label,.explore-controls input,.explore-controls #page-size-label,.explore-controls #page-size,.explore-controls #game-state-label,.explore-controls #game-state-filter{grid-column:1;grid-row:auto}.explore-controls #page-size{width:100%}.explore-controls #game-state-filter{width:100%}.pagination{gap:8px}.pagination button{padding:9px 11px}}

.game-meta{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:0 0 10px}.game-state{display:inline-flex;align-items:center;border-radius:999px;padding:2px 9px;font:600 11px/1.5 system-ui,sans-serif;letter-spacing:.02em}.state-waiting{color:#ffd166;background:#4e3b13}.state-ready{color:#8fe3aa;background:#163d26}.state-playing{color:#8ec5ff;background:#193652}.state-paused{color:#ffc477;background:#4b3011}.state-finished{color:#c0c8d1;background:#343b43}.state-deleted,.state-unknown{color:#ffaaa5;background:#4b211e}.copy-sequence-id{display:inline-grid;place-items:center;width:26px;height:26px;padding:4px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--muted);cursor:pointer}.copy-sequence-id:hover,.copy-sequence-id:focus-visible{border-color:var(--line);background:var(--panel);color:var(--fg)}.copy-sequence-id svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sequence-meta{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.sequence-meta .sequence-title{color:var(--fg);font-weight:600}
.game-guides{display:flex;flex-wrap:wrap;gap:10px 20px;margin:-10px 0 24px;font:14px/1.5 system-ui,sans-serif}
:root[data-theme="light"] .state-waiting{color:#80520a;background:#fff0c2}:root[data-theme="light"] .state-ready{color:#17653a;background:#dff5e7}:root[data-theme="light"] .state-playing{color:#205c8e;background:#e0effc}:root[data-theme="light"] .state-paused{color:#854d09;background:#ffedd5}:root[data-theme="light"] .state-finished{color:#4b5661;background:#e9edf1}:root[data-theme="light"] .state-deleted,:root[data-theme="light"] .state-unknown{color:#8d2d2a;background:#fde5e3}
.game-view .timer{display:inline-block;margin:12px 0 16px;padding:8px 12px;border:1px solid var(--line);border-radius:7px;color:var(--fg);font:600 14px/1.5 system-ui,sans-serif;letter-spacing:.02em}.game-view .timer.expired{color:#fc8a87}
