:root{--page:#1f2430;--surface:#2b3242;--text:#f1f1f4;--muted:#a9b0c0;--accent:#f0b429;--useful:#3ccf6e;--option:#f0b429;--removed:#e5484d;--blocked:#3e8cf0;--built:#3ccf6e;--canceled:#9aa0ab;--win:#f0b429;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:var(--page);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}body{-webkit-tap-highlight-color:transparent;touch-action:manipulation;margin:0}.app{max-width:1100px;padding:0 12px env(safe-area-inset-bottom);flex-direction:column;min-height:100dvh;margin:0 auto;display:flex}header{align-items:center;gap:8px;padding:10px 0;display:flex}header h1{letter-spacing:.04em;margin:0 auto 0 0;font-size:1.2rem}select{min-height:40px;font:inherit;background:var(--surface);color:var(--text);border:1px solid #444c5e;border-radius:8px;padding:0 8px}h2{align-items:center;gap:8px;margin:0 0 8px;font-size:1.15rem;display:flex}p{margin:0 0 12px;line-height:1.45}.hint,.step-count{color:var(--muted)}.caption{min-height:3em;font-size:1.1rem}.status{color:var(--useful)}button{font:inherit;cursor:pointer;border:none;border-radius:10px;min-height:48px;padding:0 18px}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--accent);color:#1b1b1b;width:100%;font-weight:600}button.secondary{background:var(--surface);color:var(--text);border:1px solid #444c5e}button.small{min-height:40px;padding:0 12px}.button-row{gap:8px;display:flex}.button-row button.secondary{flex:none}.screen{flex-direction:column;gap:12px;padding-bottom:16px;display:flex}.board{border-radius:10px;width:100%;height:auto;max-height:62dvh;display:block}.panel{flex-direction:column;display:flex}.card{background:var(--surface);border-radius:14px;width:100%;max-width:480px;margin:12px auto;padding:20px}.card.handover{text-align:center;margin-top:15dvh}.card.handover h2{justify-content:center}.card.handover>.art-icon{width:72px;height:72px;margin-bottom:8px}.board-preview{margin:12px 0 16px}fieldset{border:none;margin:0;padding:0}legend{color:var(--muted);margin-bottom:4px}.choice{align-items:center;gap:10px;min-height:44px;display:flex}.choice input{width:20px;height:20px}.art-icon{flex:none;width:32px;height:32px}.token-buttons{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px;display:grid}.token-button{text-align:left;background:var(--surface);min-height:64px;color:var(--text);border:2px solid #0000;align-items:center;gap:8px;padding:8px 10px;display:flex}.token-button.selected{border-color:var(--accent)}.token-button .art-icon{width:44px;height:44px}.token-name,.token-action{display:block}.token-action{color:var(--muted);font-size:.9rem}.action-build{color:var(--built)}.action-attack{color:var(--removed)}.action-defend{color:var(--blocked)}.action-none{color:var(--canceled);font-style:italic}.notation{word-break:break-all;background:var(--surface);border-radius:8px;margin-bottom:12px;padding:10px;display:block}.board .field.tappable{cursor:pointer}.board .mark,.board .heat,.board .piece,.board .ghost,.board .token{pointer-events:none}.board.draggable,.token-button{touch-action:none}.drag-token{pointer-events:none;z-index:10;filter:drop-shadow(0 4px 6px #00000073);position:fixed;transform:translate(-50%,-50%)}.drag-token .art-icon{width:100%;height:100%}.heat-count{text-anchor:middle;dominant-baseline:central;fill:#1b1b1b;font-size:26px;font-weight:600}.board .mark{fill:none;stroke-width:7px}.mark-useful{stroke:var(--useful);opacity:.85}.mark-target{stroke:var(--accent);stroke-width:9px}.mark-option{stroke:var(--option);stroke-dasharray:14 8}.mark-removed{stroke:var(--removed)}.mark-blocked{stroke:var(--blocked)}.mark-built,.mark-bonus{stroke:var(--built)}.mark-canceled{stroke:var(--canceled);stroke-dasharray:10 8}.mark-win{stroke:var(--win);stroke-width:9px}.mark-removed,.mark-blocked,.mark-built,.mark-bonus,.mark-canceled,.mark-win{animation:1s ease-in-out infinite alternate pulse}.board .piece.fresh{transform-box:fill-box;transform-origin:50%;animation:.35s ease-out pop-in}.ghost-preview{opacity:.55}.ghost-leaving{animation:.9s ease-in forwards fade-out}@keyframes pop-in{0%{opacity:0;transform:scale(.3)}}@keyframes fade-out{to{opacity:0}}@keyframes pulse{to{opacity:.45}}@media (prefers-reduced-motion:reduce){.board .piece.fresh,.ghost-leaving,.board .mark{animation:none}}.menu{position:relative}.menu-backdrop{z-index:20;position:fixed;inset:0}.menu-list{z-index:21;background:var(--surface);border:1px solid #444c5e;border-radius:10px;flex-direction:column;min-width:180px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 8px 24px #0006}.menu-list button{color:var(--text);text-align:left;background:0 0}.menu-list button[aria-current=page]{color:var(--accent);font-weight:600}.menu-version{color:var(--muted);margin:6px 12px 2px;font-size:.75rem}.small-text{font-size:.85rem}.tabs{background:var(--surface);border-radius:10px;gap:4px;margin-bottom:8px;padding:4px;display:flex}.tabs button{min-height:40px;color:var(--muted);background:0 0;flex:1}.tabs button[aria-selected=true]{background:var(--page);color:var(--text);font-weight:600}.tiles{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;margin-bottom:8px;display:grid}.tile{background:var(--surface);border-radius:10px;padding:10px}.tile-value{font-size:1.4rem;font-weight:700}.tile-value button.link{font-size:inherit;font-weight:inherit;min-height:0}.tile-label,.tile-detail{color:var(--muted);font-size:.85rem}.style-list{margin:0}.style-row{border-bottom:1px solid #343b4c;justify-content:space-between;align-items:baseline;gap:12px;padding:8px 0;display:flex}.style-row dt .hint{display:block}.style-row dd{text-align:right;white-space:nowrap;margin:0}.page .stat-list,.page .game-list{margin:0;padding:0;list-style:none}.history-date{display:block}.stat-list li{border-bottom:1px solid #343b4c;justify-content:space-between;padding:8px 0;display:flex}.tag{color:var(--muted);border:1px solid #444c5e;border-radius:999px;margin-left:8px;padding:1px 8px;font-size:.75rem}.badge.result-won{color:var(--useful)}.badge.result-lost{color:var(--removed)}.length-chart{margin:12px 0 0}.length-chart .bars{border-bottom:1px solid #444c5e;align-items:flex-end;gap:2px;height:120px;display:flex}.bar-slot{flex:1;align-items:flex-end;max-width:28px;height:100%;display:flex}.bar-slot:hover .bar,.bar-slot:focus .bar{filter:brightness(1.2)}.bar{background:var(--accent);border-radius:4px 4px 0 0;width:100%}.bar-axis{color:var(--muted);justify-content:space-between;margin:4px 0;font-size:.8rem;display:flex}.leaderboards{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;display:grid}.leaderboard h4{margin:0 0 4px}.leaderboard ol{margin:0;padding-left:22px}.leaderboard li span{margin-right:8px}.replay-title{margin:4px 0 8px}.replay-nav{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.replay-button{margin-bottom:12px}.page{max-width:680px;margin:8px auto 32px;line-height:1.5}.page h3{color:var(--accent);margin:28px 0 8px;font-size:1.05rem}.page ul,.page ol{margin:0 0 12px;padding-left:22px}.page li{margin-bottom:6px}.diagrams{flex-wrap:wrap;gap:12px;margin:12px 0 16px;display:flex}.diagram{flex:140px;max-width:min(300px,50% - 6px);margin:0}.diagram figcaption{color:var(--muted);margin-top:6px;font-size:.9rem}.inline-icon .art-icon{vertical-align:-5px;width:22px;height:22px}header h1 a{color:inherit;text-decoration:none}.form{flex-direction:column;gap:12px;display:flex}.form label{color:var(--muted);flex-direction:column;gap:4px;display:flex}input:not([type=radio]):not([type=checkbox]){font:inherit;background:var(--page);min-height:48px;color:var(--text);border:1px solid #444c5e;border-radius:8px;padding:0 12px;font-size:max(1rem,16px)}.form label.toggle{min-height:48px;color:var(--text);flex-direction:row;align-items:center;gap:12px}.toggle input{flex:none;width:24px;height:24px}.toggle .hint{font-size:.9rem;display:block}.error{color:var(--removed)}button.link{color:var(--accent);background:0 0;padding:0;text-decoration:underline}button.danger{background:var(--removed);color:#fff;font-weight:600}.lobby{flex-direction:column;gap:12px;width:100%;max-width:560px;margin:8px auto;display:flex}.create-game{flex-wrap:wrap;gap:8px;display:flex}.create-game input{flex:140px;min-width:0}.create-game button.primary{width:auto}.create-game.unlock{margin-top:8px}.lobby h2{margin:12px 0 0}.game-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.game-row{background:var(--surface);width:100%;color:var(--text);text-align:left;justify-content:space-between;align-items:center;display:flex}.badge{color:var(--muted);font-size:.9rem}.badge.your-turn{color:var(--accent);font-weight:600}.pieces-preview{justify-content:center;gap:12px;display:flex}.pieces-preview .art-swatch{width:72px;height:72px}.picker{border:none;margin:0;padding:0}.picker legend{margin-bottom:6px;font-weight:600}.picker-options{flex-wrap:wrap;gap:6px;display:flex}.picker-option{background:var(--surface);border:2px solid #0000;border-radius:10px;width:52px;min-height:52px;padding:4px;position:relative}.picker-option.selected{border-color:var(--accent)}.picker-option:disabled{opacity:.45}.picker-lock{font-size:.8rem;position:absolute;bottom:0;right:2px}.art-swatch{width:100%;height:100%;display:block}.achievements{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.achievements li{opacity:.75;align-items:flex-start;gap:10px;display:flex}.achievements li.earned{opacity:1}.achievement-badge{color:var(--accent);font-size:1.4rem;line-height:1}.achievements progress{width:100%;max-width:220px;accent-color:var(--accent);margin-top:4px;display:block}.notices{flex-direction:column;gap:8px;width:100%;max-width:560px;margin:8px auto;display:flex}.notice{background:var(--surface);border:1px solid var(--accent);border-radius:10px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;display:flex}.notice-actions{gap:6px;display:flex}.notice-actions button{width:auto;min-height:44px}.badge-count{background:var(--accent);color:#1f2430;text-align:center;border-radius:999px;min-width:20px;margin-left:6px;padding:0 6px;font-size:.8rem;font-weight:700;line-height:20px;display:inline-block}.reactions{flex-direction:column;gap:8px;margin:8px 0;display:flex}.reaction-feed{flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;display:flex}.reaction-feed li{background:var(--surface);border-radius:999px;padding:2px 10px;font-size:1.1rem}.reaction-buttons{flex-wrap:wrap;gap:6px;display:flex}.reaction-buttons button{width:auto;min-width:44px;min-height:44px;font-size:1.2rem}.draw-offer{text-align:center;max-width:560px;color:var(--muted);flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin:12px auto 0;display:flex}.draw-offer button{width:auto}.draw-offer.incoming{color:var(--text);background:var(--surface);border:1px solid var(--accent);border-radius:10px;margin:0 auto 12px;padding:8px 12px}.friend-row{background:var(--surface);border-radius:10px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;display:flex}.friend-actions{gap:6px;display:flex}.friend-actions button{width:auto;min-height:44px}.online-dot{background:var(--canceled);border-radius:50%;width:10px;height:10px;margin-right:8px;display:inline-block}.online-dot.on{background:var(--useful)}@media (width>=800px){.screen{flex-direction:row;align-items:flex-start;gap:24px}.board-area{flex:1;min-width:0}.board{max-height:calc(100dvh - 90px)}.panel{flex:0 0 320px;padding-top:8px}}
