/* A larger play surface and visible, scene-colored preferences. */
body { --scene-accent:#42634b; --scene-wash:#faf8ee; --wolf-emblem:url('./assets/emblems/east-wolf.svg'); --sheep-emblem:url('./assets/emblems/east-sheep.svg'); }
body[data-emblem-style="west"] { --wolf-emblem:url('./assets/emblems/west-wolf.svg'); --sheep-emblem:url('./assets/emblems/west-sheep.svg'); }
.side-card .choice-icon.wolf { background-image:var(--wolf-emblem); }
.side-card .choice-icon.sheep { background-image:var(--sheep-emblem); }
.jg-point .piece.wolf,.appearance-animal.wolf { background-image:var(--wolf-emblem); background-size:contain; }
.jg-point .piece.sheep,.appearance-animal.sheep { background-image:var(--sheep-emblem); background-size:contain; }
.game-settings-toggle { display:flex; gap:6px; align-items:center; min-height:38px; padding:0 10px; background:var(--scene-wash); color:var(--scene-accent); border:1px solid var(--line); border-radius:7px; font:inherit; font-size:12px; cursor:pointer; }
.game-settings-toggle svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.game-settings-toggle:hover { border-color:var(--scene-accent); }
.game-settings-toggle:focus-visible,.emblem-options button:focus-visible { outline:2px solid var(--scene-accent); outline-offset:3px; }
.personal-settings-dialog { max-height:calc(100svh - 40px); overflow:auto; color:var(--ink); background:var(--surface); border-color:var(--line); }
.emblem-preferences h3 { margin:0 0 12px; font-size:13px; font-weight:500; }
.emblem-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.emblem-options button { border:1px solid var(--line); border-radius:8px; background:var(--scene-wash); color:var(--muted); padding:12px 6px; font:inherit; font-size:12px; cursor:pointer; }
.emblem-options button[aria-pressed="true"] { color:var(--scene-accent); border-color:var(--scene-accent); box-shadow:inset 0 0 0 1px var(--scene-accent); }
.emblem-options span { display:flex; justify-content:center; gap:7px; margin-bottom:7px; }
.emblem-options img { width:55px; height:55px; }
.secret-preferences { margin-top:20px; border-top:1px solid var(--line); padding-top:14px; }
.secret-preferences summary { font-size:11px; color:var(--muted); cursor:pointer; }
.secret-preferences #secret-board-fields { margin-top:12px; }
.secret-model-link { display:block; margin-top:12px; padding:10px 0; color:var(--muted); font-size:11px; text-decoration:none; border-top:1px solid var(--line); }
.secret-model-link:hover { color:var(--scene-accent); }
.custom-current { margin:14px 0; }
.custom-current label { font-size:12px; color:var(--muted); }
.custom-current select { margin-top:8px; }
.custom-model-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; max-height:300px; overflow-y:auto; padding:3px 6px 6px 2px; }
.custom-model-list button { display:flex; flex-direction:column; gap:7px; padding:13px 10px; text-align:left; min-width:0; border:1px solid var(--line); border-radius:7px; background:var(--scene-wash,#f8faf4); color:var(--ink); cursor:pointer; font:inherit; }
.custom-model-list strong { font-size:13px; font-weight:500; }
.custom-model-list small { font-size:10px; color:var(--muted); line-height:1.5; }
.custom-model-list button[aria-pressed="true"] { border-color:var(--scene-accent,#42634b); box-shadow:inset 3px 0 var(--scene-accent,#42634b); background:var(--surface,#eff5e8); }
.custom-mapping { border-top:1px solid var(--line); margin-top:16px; padding-top:14px; }
.custom-mapping summary { cursor:pointer; font-size:13px; color:var(--scene-accent,#42634b); }
.custom-mapping summary span { float:right; font-size:11px; color:var(--muted); }
.custom-mapping p { font-size:12px; color:var(--muted); }
.custom-difficulty-dialog .dialog-actions { margin-top:15px; }
.appearance-swatch.wood { background-image:var(--wood-url); }
.go-grain,.xq-grain { background-image:var(--board-wood-grain); }
.game-stage:not(.is-focused) .board { width:100%; }
.game-stage:not(.is-focused) .board[data-dimension="2d"] { width:min(92%,820px); margin:12px auto 14px; }
.appearance-card.is-random { background:linear-gradient(135deg,var(--scene-wash),var(--surface)); border-style:dashed; grid-column:1/-1; display:grid; grid-template-columns:64px 1fr; column-gap:10px; text-align:left; align-items:center; }
.appearance-card.is-random > :first-child { grid-row:span 2; }
.appearance-card.is-random .appearance-name,.appearance-card.is-random small { margin:0; }
.random-stones { display:flex; align-items:center; justify-content:center; height:42px; }
.random-stones i { width:24px; height:21px; border-radius:43% 57% 38% 51%; background:radial-gradient(at 24% 20%,#b4b1a0,transparent 60%),#797d72; box-shadow:inset -2px -3px 4px #0003,0 2px 3px #0002; transform:rotate(-16deg); }
.random-stones i:nth-child(2) { margin-left:-10px; background:radial-gradient(at 20% 30%,#e7dcc4,transparent 60%),#ada494; transform:translateY(6px) rotate(23deg); border-radius:28% 54% 33% 47%; }
.random-stones i:nth-child(3) { margin-left:-9px; background:radial-gradient(at 30% 20%,#9e8e7a,transparent 60%),#635951; border-radius:31% 48% 58% 35%; }
.chess-design-sample { display:block; width:100%; height:65px; object-fit:contain; }
body[data-game-style] .play-shell { width:calc(100% - 12px); margin-top:6px; }
body[data-game-style] .game-header { width:calc(100% - 12px); }
.board > [hidden] { display:none!important; visibility:hidden!important; pointer-events:none!important; }
.custom-tier-heading,.custom-tier-row { grid-template-columns:72px minmax(0,1fr); }
.automatic-motion .appearance-card { cursor:default; pointer-events:none; }
.automatic-motion .appearance-options { grid-template-columns:repeat(3,minmax(0,1fr)); }
.automatic-motion .appearance-card small { font-size:9px; }
body[data-game-style] #result-dialog { background:var(--surface); color:var(--ink); border-color:var(--line); }
body[data-game-style] #result-mark { background:var(--scene-accent); color:var(--scene-wash); box-shadow:0 6px 20px #0002; }
body[data-game-style="xiangqi"] #result-mark { border:5px double #edd4a5; }
body[data-game-style="shogi"] #result-mark { border-radius:0; clip-path:polygon(50% 0,87% 21%,100% 100%,0 100%,13% 21%); background:#c8a46b; }
body[data-game-style="rustic"] #result-mark { border-radius:42% 57% 48% 39%; background:#817b69; }
body[data-game-style="chess"] #result-mark { border-radius:8px; background:#384643; border:3px solid #cdb88e; }
body[data-game-style="jungle"] #result-mark { background:#54724b; border:3px solid #aabe8e; }
.audio-preferences select { min-width:0; max-width:65%; min-height:34px; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:var(--scene-wash); color:var(--ink); font:inherit; font-size:11px; }
.music-credit { font-size:10px; color:var(--muted); line-height:1.7; }
.music-credit a { color:inherit; }
.thumbnail-preference { display:flex; justify-content:space-between; align-items:center; margin:16px 0; font-size:12px; }
.stone-color-sample { display:flex; justify-content:center; gap:5px; min-height:40px; align-items:center; }
.stone-color-sample i { width:27px; height:22px; border-radius:42% 57% 38% 49%; background:radial-gradient(at 20% 35%,#adab97,transparent 65%),radial-gradient(at 80% 65%,#83786a,transparent 50%),#9a9e90; box-shadow:inset -2px -2px 3px #0003; }
.stone-color-sample i:nth-child(2) { filter:brightness(.8); transform:rotate(23deg); }
.stone-color-sample i:nth-child(3) { filter:brightness(1.2); }
.stone-color-sample.color-warm i { background:radial-gradient(at 20% 35%,#d0b394,transparent 65%),#9d775d; }
.stone-color-sample.color-cool i { background:radial-gradient(at 20% 35%,#b5c1be,transparent 65%),#718b8e; }
.stone-color-sample.color-mottled i { background:radial-gradient(at 20% 35%,#b6a47c,transparent 45%),radial-gradient(at 60% 65%,#9f7464,transparent 55%),#7f9885; }
.stone-color-sample.color-veined i { background:linear-gradient(127deg,transparent 35%,#d2ccad 36%,transparent 43%),#979c92; }
body[data-game-style] { transition:background-color 1.8s; }
.scene-heading h1 { font-size:23px; }
.scene-heading { margin-bottom:8px; }
.versus-row { margin-bottom:5px; }
.board-wrap { padding-top:0; }
.turn-center .retry-button { justify-self:center; margin:4px 0 0; min-height:28px; padding:4px 12px; color:var(--scene-accent); background:var(--surface); border:1px solid currentColor; border-radius:5px; font-size:11px; }
.game-board-surface:is(.sg-board,.jg-board,.ch-board,.st-board)[data-view="low"] { aspect-ratio:var(--game-board-ratio); }
.game-board-surface:is(.go-board,.xq-board).is-spatial[data-view="low"] { aspect-ratio:var(--game-board-ratio); }
@media(min-width:981px) {
 body[data-game-style] .play-shell { grid-template-columns:minmax(0,1fr) 252px; column-gap:10px; }
 .match-panel { padding-left:10px; }
 .game-stage:not(.is-focused) .board-wrap { min-height:0; }
 .scene-heading > div { display:flex; gap:12px; align-items:baseline; }
 .scene-heading h1 { margin:0; }
}
@media(max-width:980px) {
 body[data-game-style] .play-shell { width:calc(100% - 12px); }
 .scene-heading > p { display:none; }
}
@media(max-width:600px) {
 .custom-model-list { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:38svh; }
 .game-settings-toggle { width:32px; height:32px; min-height:32px; padding:6px; }
 .game-settings-toggle span { display:none; }
 .game-header-actions { gap:6px; }
 .compact-logo strong { font-size:17px; }
 .compact-logo span { font-size:6px; letter-spacing:.02em; }
 .scene-heading h1 { font-size:21px; }
 .scene-heading > div > span { font-size:8px; }
}

.go-board[data-wood="huanghuali"] { --wood-color:#d6b583; --wood-light:#efd9b2; --wood-edge:#987046; --grid-ink:#3e2b1c; }
.go-board[data-wood="jichimu"] { --wood-color:#cab08d; --wood-light:#e6d3b4; --wood-edge:#72553b; --grid-ink:#302317; }
.go-board[data-wood="bambooJoin"] { --wood-color:#e0d6b3; --wood-light:#f3ecd0; --wood-edge:#aaa076; --grid-ink:#403e27; }
.xq-board[data-engraved="true"] .xq-piece-label::after { filter:drop-shadow(.14cqi .17cqi .02cqi #fff8d9b0) drop-shadow(-.07cqi -.08cqi .02cqi #34221190); }

.themed-token[data-engraved="true"] .xq-piece-label::after { filter:drop-shadow(.3px .4px .1px #fff4d9b0) drop-shadow(-.2px -.2px .1px #38261d90); }
.themed-token[data-engraved="true"] .appearance-shogi-piece text { filter:drop-shadow(.25px .4px .1px #fff1cf); }
