:root{color-scheme:dark;--bg:#080d18;--panel:#101827;--water:#17243a;--line:#35445f;--text:#edf4ff;--muted:#b8c5d9;--gold:#f1d38e;--blue:#8fc6ee;--danger:#f19a91}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.65 system-ui,"Yu Gothic",sans-serif}button,select{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:10px 15px;color:var(--text);background:var(--water)}button:disabled{opacity:.45;cursor:default}button:hover:not(:disabled){filter:brightness(1.16)}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:3px}[hidden]{display:none!important}
header,footer{max-width:1320px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:22px 40px}header>a{display:flex;align-items:center;gap:12px}.moon{color:var(--gold);font-size:28px;line-height:1}.quiet{background:transparent;color:var(--muted);border-color:transparent}.quiet:hover{border-color:var(--line)}main{max-width:1280px;margin:auto;padding:28px 24px 48px}.intro{display:flex;justify-content:space-between;align-items:center;padding-bottom:28px}.eyebrow{font-size:12px;letter-spacing:.15em;color:var(--gold);margin:0 0 10px}h1{font-family:serif;font-size:66px;letter-spacing:.16em;font-weight:500;line-height:1.1;margin:0}h1 span{font:14px system-ui;letter-spacing:.3em;margin-left:20px;color:var(--muted)}.tagline{font-size:20px;margin:18px 0 0}.intro-note{color:var(--muted);border-left:1px solid var(--line);padding-left:30px;margin-right:6px}.setup{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;border:1px solid var(--line);padding:22px;background:var(--panel);border-radius:12px;margin-bottom:24px}.field{display:flex;flex-direction:column;gap:6px}label{color:var(--muted);font-size:13px}select{width:100%;min-height:44px;border:1px solid var(--line);border-radius:7px;background:var(--bg);padding:8px;color:var(--text)}.start-actions{display:flex;gap:12px;grid-column:1/3}.primary{background:var(--gold);color:#101827;font-weight:700;border-color:var(--gold)}.primary span{margin-left:16px}.secondary{background:transparent}.set-note{margin:0;align-self:center;color:var(--muted);font-size:13px}
.play-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(330px,1fr);gap:24px;align-items:start}.arena{border:1px solid var(--line);border-radius:14px;background:radial-gradient(ellipse at 45% 40%,#193239,#111d2d 55%,#101827);overflow:hidden;scroll-margin-top:12px}.board-heading{display:flex;justify-content:space-between;gap:12px;padding:15px 22px;color:var(--muted);font-size:13px;border-bottom:1px solid #35445f80}.turn-line{display:flex;gap:14px;align-items:start;padding:18px 22px 0;min-height:91px}.turn-line>span{font-size:24px;color:var(--gold)}.turn-line strong{font-size:16px}.turn-line p{font-size:13px;color:var(--muted);margin:4px 0}.board{position:relative;aspect-ratio:1;width:100%;max-width:590px;margin:0 auto}.board>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.tile{fill:#15283a;stroke:#486074;stroke-width:1}.tile.pond{fill:#0d1c2b;stroke:#849ea5;stroke-width:1.5}.tile.garden1{fill:#35392f;stroke:#ae9560}.tile.garden2{fill:#223e50;stroke:#648fae}.tile.top-garden{stroke-width:1.7}.tile.affected{stroke-width:3}.tile.inspected{stroke:#fff;stroke-width:3}.tile.last{stroke:#e6eef9;stroke-width:2}.tile.own-preview{stroke:var(--gold);stroke-width:3;stroke-dasharray:7 4;fill:#63563955}.tile.gift-preview{stroke:var(--blue);stroke-width:3;stroke-dasharray:7 4;fill:#375a7955}.tile.cpu-preview{stroke:#edf4ff;stroke-width:3.5;stroke-dasharray:9 5}.connection{stroke-width:23;stroke-linecap:round;opacity:.56}.connection.p1{stroke:#bb9b53}.connection.p2{stroke:#679ec0}.preview-link{stroke-width:4;stroke-dasharray:6 5;opacity:.8}.preview-link.p1{stroke:var(--gold)}.preview-link.p2{stroke:var(--blue)}
.cell{position:absolute;transform:translate(-50%,-50%);width:14.04%;height:14.04%;min-height:0;padding:0;border:2px solid transparent;border-radius:44%;background:none;display:flex;align-items:center;justify-content:center;flex-direction:column;line-height:1.1}.cell:disabled{opacity:1}.cell.empty.available:before{content:'';position:absolute;width:13%;height:13%;border-radius:50%;background:#9fb6c94a}.cell.target:before{width:50%;height:50%;border:2px dashed currentColor;background:transparent}.cell.chosen{background:#e9f2f319;border:2px solid currentColor}.cell:focus-visible{background:#edf4ff26;outline:3px solid var(--gold);outline-offset:-3px}.cell-label{position:absolute;bottom:3%;font-size:12px;color:#b8c5d9;line-height:1}.stone{width:53%;height:53%;display:grid;place-items:center;border:1px solid currentColor;background:#141d23;border-radius:50%;font:bold clamp(16px,2.2vw,24px)/1 Georgia,serif;box-shadow:0 3px 8px #0003;z-index:1}.p1{color:var(--gold)}.p2{color:var(--blue)}.p1 .stone{background:#4d452f}.p2 .stone{background:#26485a;border-radius:23%}.stone.ghost{border:2px dashed currentColor;opacity:.85}.pond-symbol{font-size:27px;color:#c9d7d3;line-height:1}.cell.pond .cell-label{bottom:16%;font-family:serif}.owner-mark{position:absolute;right:8%;top:12%;font-size:12px}.board-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:5px 14px;padding:0 12px;color:var(--muted);font-size:12px}.inspect-note{text-align:center;font-size:12px;color:var(--muted);min-height:38px;padding:4px 15px 12px;margin:6px 0 0}.compact-scores{display:none}
.dashboard{display:flex;flex-direction:column;gap:17px}.scoreboard{display:grid;grid-template-columns:1fr 1fr;gap:12px}.player{border:1px solid var(--line);border-radius:11px;background:var(--panel);padding:17px 16px;min-width:0}.player.active{border-color:currentColor}.player>span{font-size:13px}.player small{font-size:12px;font-weight:400;margin-left:5px}.player>strong{display:block;font-size:36px;line-height:1.3;font-weight:500;margin:8px 0 4px}.formula{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.group-chip{padding:5px 8px;min-width:45px;background:#080d1866;color:inherit;font-size:13px;min-height:44px}.group-chip.selected{border-color:currentColor}.reserve{font-size:12px;margin:6px 0 0;color:var(--muted);min-height:20px}.decision{border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:22px}.decision h2{font-family:serif;font-size:26px;line-height:1.4;margin:0 0 10px}.decision>p:not(.eyebrow){color:var(--muted);font-size:14px;margin:0 0 15px}.preview{background:var(--bg);border-radius:7px;padding:15px;font-size:13px;min-height:110px;color:var(--muted);margin-bottom:14px}.preview .effect{display:flex;justify-content:space-between;gap:8px;margin-top:7px;font-size:15px}.preview .effect b{white-space:nowrap}.preview .delta{font-size:12px;margin-left:5px}.preview .warning{color:var(--danger);font-size:12px;margin:10px 0 0}.positive{color:var(--gold)}.negative{color:var(--danger)}#confirm,#practice-next,#rematch,#result-help{width:100%;min-height:48px}.minor-actions{display:flex;gap:6px;margin-top:8px;justify-content:space-between}.minor-actions button{font-size:13px;padding:8px 9px}.small-rule{border-top:1px solid var(--line);padding-top:15px;color:var(--muted);font-size:13px}.small-rule strong{color:var(--text);font-weight:500}.small-rule p{margin:5px 0}.history{border-top:1px solid var(--line);padding-top:13px;color:var(--muted);font-size:13px}.history summary{cursor:pointer;min-height:44px}.history ol{max-height:260px;overflow:auto;padding-left:22px;margin:0}.history li{margin:7px 0}.history small{display:block;font-size:12px;color:var(--muted)}#result-actions{display:grid;gap:12px}.result-home{font-size:13px;justify-self:center;padding:5px 10px;min-height:44px;display:flex;align-items:center;color:var(--muted)}.footnotes{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;margin-top:42px;border-top:1px solid var(--line);padding-top:28px}.footnotes b{font-size:12px;letter-spacing:.12em;color:var(--gold);font-weight:400}.footnotes h3{font:20px serif;margin:12px 0}.footnotes p{font-size:14px;color:var(--muted);margin:0}footer{border-top:1px solid #35445f50;color:var(--muted);font-size:12px}dialog{border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text);max-width:620px;width:calc(100% - 28px);padding:28px;max-height:90dvh;overflow:auto}dialog::backdrop{background:#030810c9}dialog h2{font:28px serif;line-height:1.4}dialog p,dialog li{font-size:15px}dialog li{margin:9px 0}dialog ol{padding-left:24px}dialog .close{position:absolute;top:10px;right:10px;font-size:24px;background:none;border:0;padding:2px 10px}.rule-example{background:var(--bg);border-radius:8px;padding:16px;display:grid;gap:8px}.rule-example b{color:var(--gold);font-size:21px}.rule-example span,.keyboard-note{font-size:13px;color:var(--muted)}
@media(max-width:950px){header,footer{padding:20px 24px}.play-layout{gap:18px;grid-template-columns:minmax(0,1.25fr) minmax(300px,1fr)}.player{padding:13px 12px}.decision{padding:18px}.intro-note{font-size:13px;padding-left:20px}.cell-label{font-size:12px}}
@media(max-width:780px){header{padding:18px 18px}main{padding:22px 14px 36px}.intro{padding-bottom:24px}.intro-note{display:none}h1{font-size:52px}h1 span{font-size:13px;margin-left:14px}.tagline{font-size:18px}.setup{grid-template-columns:1fr 1fr;gap:13px;padding:16px;margin-bottom:20px}.field:last-of-type{grid-column:1/-1}.start-actions{grid-column:1/-1;gap:10px;flex-wrap:wrap}.set-note{grid-column:1/-1;font-size:12px}.play-layout{display:flex;flex-direction:column;gap:16px}.arena,.dashboard{width:100%}.compact-scores{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 16px 0;font-size:12px}.compact-scores b{display:block;font-size:17px;font-weight:500}.turn-line{padding:14px 16px 0;min-height:80px}.turn-line p{font-size:12px}.board-heading{padding:12px 16px;font-size:12px}.cell-label{font-size:10px}.owner-mark{font-size:10px}.board-legend,.inspect-note{font-size:11px}.dashboard .decision{order:-1}.dashboard{gap:14px}.decision{padding:18px}.decision h2{font-size:24px}.preview{min-height:100px}.scoreboard{gap:12px}.player>strong{font-size:30px}.small-rule{display:none}.footnotes{grid-template-columns:1fr;gap:24px;margin-top:30px}.footnotes h3{font-size:19px}.footnotes p{font-size:14px}footer{padding:18px 16px;flex-wrap:wrap;gap:8px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(min-width:481px) and (max-width:780px){.cell-label,.owner-mark,.board-legend,.inspect-note{font-size:12px}}
.board-confirm{display:none}.tile.own-preview.p2-preview{stroke:var(--blue);fill:#375a7955}.tile.gift-preview.p1-preview{stroke:var(--gold);fill:#63563955}.tile.cpu-preview{stroke:#edf4ff}
@media(max-width:780px){.setup>.field:nth-child(3){grid-column:1/-1}.board-confirm{display:grid;gap:10px;margin:0 14px 16px;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}.board-confirm small{font-size:12px;color:var(--muted)}#board-preview{display:flex;gap:26px;margin-top:3px;font-size:16px}#board-preview b{font-weight:500}.board-confirm button{min-height:48px}}

.tile.cpu-preview.own-preview,.tile.cpu-preview.gift-preview{stroke:#edf4ff}
