:root,:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#1b1035;--panel:#2a1a4d;--sunken:#150c2b;--recessed:#140b28;--secondary-bg:#4a3a72;--border:#4a3a72;--text:#f4f2ff;--muted:#a99cd1;--accent:#f5b400;--accent-ink:#f5b400;--on-accent:#1b1035;--positive:#6ee7a6;--negative:#ff9b9b;--danger:#ff8080;--card-hidden:#513b77}:root[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f4f1fa;--panel:#fff;--sunken:#e9e4f2;--recessed:#e4def0;--secondary-bg:#e2dcf0;--border:#cfc6e2;--text:#1b1035;--muted:#5c5175;--accent:#f5b400;--accent-ink:#8a5d00;--on-accent:#1b1035;--positive:#0d6e42;--negative:#c02626;--danger:#c02626;--card-hidden:#766791}*{box-sizing:border-box}html,body,#app{min-height:100%}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}button,input{font:inherit}button{cursor:pointer;background:var(--accent);color:var(--on-accent);border:0;border-radius:10px;padding:12px;font-weight:700}button:disabled{cursor:default;opacity:.5}button:focus-visible,summary:focus-visible{outline:3px solid var(--positive);outline-offset:2px}button.secondary{background:var(--secondary-bg);color:var(--text)}button.link{color:var(--muted);background:0 0;padding:8px;font-weight:500}input{border:1px solid var(--border);background:var(--sunken);color:var(--text);border-radius:10px;padding:12px}label{color:var(--muted);flex-direction:column;gap:4px;font-size:.85rem;display:flex}.screen{min-height:100dvh;padding:env(safe-area-inset-top) 12px env(safe-area-inset-bottom);flex-direction:column;gap:12px;display:flex}.screen.center{justify-content:center;align-items:center}.game-screen{width:100%;max-width:480px;margin:0 auto}.card,.panel,.final-summary,.placeholder-board{background:var(--panel);border-radius:16px;flex-direction:column;gap:12px;width:100%;max-width:380px;padding:20px;display:flex}.card h1,.final-summary h1,.placeholder-board h1{text-align:center;margin:0}.muted{color:var(--muted)}.center-text{text-align:center}.error{color:var(--danger);margin:0;font-size:.85rem}.topbar{align-items:center;gap:8px;display:flex}.topbar-title{text-align:center;flex:1;margin:0;font-size:.9rem}.turn-strip{border:1px solid var(--border);background:var(--panel);color:var(--muted);border-radius:10px;align-items:baseline;gap:7px;padding:9px 11px;display:flex}.turn-strip.yours{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.turn-strip strong{color:inherit}.turn-hint{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.turn-hint:before{content:"·";margin-right:6px}.action-bar{gap:8px;display:flex}.action-bar button{flex:1}.game-footer{justify-content:center;padding:4px 0;display:flex}button.theme-toggle{font-size:.75rem}.reconnecting{color:var(--accent-ink)}.game-screen{height:100dvh;min-height:0;overflow:hidden}.board-main{flex-direction:column;flex:1;gap:8px;min-height:0;display:flex}.game-summary{grid-template-columns:1fr 1fr;gap:4px;font-size:.72rem;display:grid}.game-summary>div{background:var(--panel);color:var(--muted);border-radius:8px;flex-wrap:wrap;align-items:baseline;gap:4px 7px;padding:6px 8px;display:flex}.game-summary strong{color:var(--text)}.game-summary .military-track{grid-column:1/-1;justify-content:space-between}.tableau{flex-direction:column;flex:auto;justify-content:center;gap:3px;min-height:0;padding:4px 1px;display:flex;overflow:auto}.tableau-row{justify-content:center;gap:3px;display:flex}.tableau-card{border:1px solid var(--border);background:var(--panel);width:min(16.3vw,54px);min-width:35px;min-height:48px;color:var(--text);text-align:left;border-radius:7px;flex-direction:column;justify-content:space-between;padding:4px;font-size:.62rem;font-weight:600;display:flex;overflow:hidden}.tableau-card .card-name{-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.1;display:-webkit-box;overflow:hidden}.tableau-card small{color:var(--muted);font-size:.56rem}.tableau-card.face-down{background:var(--card-hidden);color:var(--text);text-align:center;place-items:center;display:grid}.tableau-card.face-down span{font-size:1.05rem;font-weight:800}.tableau-card.removed{color:var(--muted);text-align:center;background:0 0;border-style:dotted;place-items:center;display:grid}.tableau-card.covered{background:var(--sunken);color:var(--muted);border-style:dashed}.tableau-card.exposed{box-shadow:inset 0 0 0 1px var(--secondary-bg)}.tableau-card.selectable{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.tableau-card.selected{background:var(--accent);color:var(--on-accent)}.tableau-card.selected small{color:var(--on-accent)}.action-tray,.choice-panel{border:1px solid var(--border);background:var(--panel);border-radius:12px;flex:none;padding:10px}.tray-heading{justify-content:space-between;align-items:start;gap:8px;display:flex}.tray-heading h2,.choice-panel h1{margin:0;font-size:.98rem}.tray-heading p{color:var(--muted);text-transform:capitalize;margin:3px 0 0;font-size:.72rem}.cost-quote{color:var(--muted);flex-wrap:wrap;gap:3px 6px;margin:8px 0;padding:0;font-size:.67rem;list-style:none;display:flex}.cost-quote li{background:var(--sunken);border-radius:4px;padding:2px 4px}.wonder-builder{color:var(--muted);margin-top:8px;font-size:.75rem}.wonder-builder summary,.ownership-summary summary{cursor:pointer}.wonder-build-list{gap:6px;margin-top:7px;display:grid}.wonder-build-list>div{align-items:start;gap:5px;display:flex}.wonder-build-list button{flex:0 0 45%;padding:8px;font-size:.7rem}.wonder-build-list .cost-quote{flex:1;margin:0}.choice-panel{text-align:center;flex-direction:column;flex:1;justify-content:center;gap:10px;min-height:0;display:flex}.choice-panel p{margin:0;font-size:.8rem}.choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;display:grid}.choice-grid button,.wonder-choice{min-height:48px;padding:8px;font-size:.76rem}.ownership-summary{color:var(--muted);flex:none;gap:8px;font-size:.7rem;display:flex}.ownership-summary details{background:var(--panel);border-radius:8px;flex:1;min-width:0;padding:6px}.ownership-summary summary{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ownership-summary h2{color:var(--text);margin:7px 0 3px;font-size:.72rem}.token-list{flex-wrap:wrap;gap:3px;margin:0;padding:0;list-style:none;display:flex}.token-list li{background:var(--sunken);border-radius:4px;padding:2px 4px}.score-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.final-summary{max-width:none;overflow:auto}.score-breakdown{background:var(--sunken);border-radius:10px;padding:9px}.score-breakdown h2{margin:0;font-size:.85rem}.score-total{color:var(--accent-ink);margin:4px 0;font-size:1.5rem;display:block}.score-breakdown dl{margin:0;font-size:.75rem}.stat-row{border-top:1px solid var(--border);justify-content:space-between;gap:6px;padding:4px 0;display:flex}.stat-row dd{margin:0;font-weight:700}.placeholder-board{text-align:center;background:var(--recessed);border:1px solid var(--border);flex:1;justify-content:center;align-items:center;max-width:none}.placeholder-symbol{background:var(--accent);width:72px;height:72px;color:var(--on-accent);border-radius:50%;place-items:center;font-size:1.15rem;font-weight:800;display:grid}.placeholder-board p{max-width:300px;color:var(--muted);margin:0;line-height:1.4}.placeholder-board dl{width:min(100%,300px);margin:8px 0 0}.placeholder-board dl div,.stat-row{border-top:1px solid var(--border);justify-content:space-between;gap:12px;padding:9px 0;display:flex}.placeholder-board dt{color:var(--muted)}.placeholder-board dd{margin:0;font-weight:700}.format-toggle{gap:8px;display:flex}.toggle-btn{border:1px solid var(--border);background:var(--sunken);color:var(--muted);text-align:center;border-radius:10px;flex:1;align-items:center;padding:10px;font-weight:600}.toggle-btn.active{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.toggle-input{opacity:0;width:1px;height:1px;position:absolute}.setting{color:var(--muted);border:0;flex-direction:column;gap:4px;margin:0;padding:0;font-size:.85rem;display:flex}.setting legend{padding:0}.rules-card{width:100%;max-width:640px;margin:0 auto}.rules-card section{background:var(--panel);border-radius:12px;margin-bottom:10px;padding:14px}.rules-card h3{margin:0 0 8px}.rules-card p{color:var(--muted);margin:0;line-height:1.45}.screen-body{flex-direction:column;gap:18px;width:100%;max-width:480px;margin:0 auto;display:flex}.history-section{flex-direction:column;gap:8px;display:flex}.history-heading{color:var(--muted);letter-spacing:.08em;text-transform:uppercase;margin:0 2px;font-size:.75rem}.standing,.history-list{flex-direction:column;gap:6px;display:flex}.standing-line,.history-meta{justify-content:space-between;gap:8px;display:flex}.standing-record,.history-date{color:var(--muted);font-size:.8rem}.standing-bar{background:var(--sunken);border-radius:999px;height:6px;overflow:hidden}.standing-bar-fill{border-radius:inherit;background:var(--accent);height:100%}.history-list{margin:0;padding:0;list-style:none}.history-item{background:var(--panel);border-radius:12px;padding:10px 14px}.history-player{grid-template-columns:1fr auto 3.4em;gap:8px;padding:5px 0;display:grid}.history-player+.history-player{border-top:1px solid var(--border)}.history-score{text-align:right;grid-column:3}.history-player.won{color:var(--accent-ink);font-weight:700}.history-badge{background:var(--sunken);color:var(--muted);text-transform:uppercase;border-radius:999px;padding:2px 7px;font-size:.65rem;font-weight:700}.history-badge.accent{background:var(--accent);color:var(--on-accent)}.deploy-stamp{color:var(--muted);flex-direction:column;align-items:center;gap:2px;font-size:.8rem;display:flex}.deploy-stamp button{color:var(--accent-ink);background:0 0;padding:4px 6px;text-decoration:underline}@media (width>=481px){.tableau-card{width:60px;min-height:58px;font-size:.68rem}.game-summary{font-size:.78rem}}
