/* Game surface and game-specific controls only. */
.guided-demo-focus{position:relative;z-index:2;outline:3px solid #f0d98e!important;outline-offset:4px;filter:drop-shadow(0 0 10px #d9bc78aa);animation:guided-demo-pulse .9s ease-in-out infinite alternate}
@keyframes guided-demo-pulse{from{outline-offset:2px;filter:drop-shadow(0 0 4px #d9bc7866)}to{outline-offset:7px;filter:drop-shadow(0 0 14px #f0d98ecc)}}
.guided-demo-running main>:not(.demo-bar){animation-play-state:paused!important}
@media (prefers-reduced-motion:reduce) {.guided-demo-focus{animation:none!important}}
[role=button]{-webkit-tap-highlight-color:transparent}
.spot:focus-visible{outline:3px solid #fff1b8;outline-offset:2px}
.turn-stat{display:flex!important;min-height:22px;align-items:center;justify-content:center;gap:6px}
.turn-stat b{font:800 10px Arial,sans-serif;letter-spacing:.08em}
.premium-stage{position:relative;display:flex;min-height:clamp(420px,67svh,680px);flex-direction:column;align-items:center;justify-content:center;overflow:hidden;background:transparent}
.board-wrap{position:relative;width:min(94cqw,calc(100svh - 224px),620px);aspect-ratio:1;padding:0;border:0;background:transparent;box-shadow:none}
.board-wrap:before{display:none}
.board{position:relative;width:100%;height:100%;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.board-art{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.camp-shape{opacity:.065}
.camp-human-shape{fill:#24aee8}
.camp-rival-shape{fill:#ff416a}
.camp-neutral-shape{fill:#d3ad50}
.spot{position:absolute;z-index:2;width:calc(100% / var(--board-size) * .9);aspect-ratio:1;transform:translate(-50%,-50%);border:0;border-radius:50%;padding:0;background:transparent;line-height:0;touch-action:none}
.hole{position:absolute;z-index:1;left:32%;top:32%;width:36%;aspect-ratio:1;border:1px solid #8c99ab99;border-radius:50%;background:radial-gradient(circle at 45% 38%,#26334b,#05070b 72%);box-shadow:inset 0 2px 4px #000,0 0 0 1px #020307,0 1px #c9dcff22;pointer-events:none}
.piece,.mini-piece,.result-piece{position:absolute;border:0;border-radius:50%;background:center/contain no-repeat url('assets/halma-blue.webp');box-shadow:none}
.piece:before,.mini-piece:before,.result-piece:before{display:none}
.piece{z-index:5;left:50%;top:50%;width:84%;aspect-ratio:1;opacity:0;transform:translate(-50%,-50%) scale(1);transition:filter .2s;pointer-events:none}
.has-piece .piece{opacity:1;transform:translate(-50%,-50%) scale(1)}
.is-rival .piece,.rival-piece,.rival-result{background-image:url('assets/halma-red.webp')}
.is-selected{z-index:8}
.is-selected .piece{filter:drop-shadow(0 0 8px #96e9ff);transform:translate(-50%,-50%) scale(1)}
.is-selectable .piece{filter:drop-shadow(0 0 5px #78ddff55)}
.is-target:after{content:"";position:absolute;z-index:3;inset:10%;border:2px solid #bcdcff;border-radius:50%;box-shadow:0 0 12px #89cfff99,inset 0 0 9px #89cfff33;animation:target-pulse 1.1s ease-in-out infinite;pointer-events:none}
.is-jump-target:after{border-style:dashed}
.is-last .hole{box-shadow:inset 0 2px 4px #000,0 0 0 2px #d8ecff,0 0 12px #85cfff}
.moving-piece{position:absolute;z-index:12;inset:auto;opacity:1;pointer-events:none;transform:none!important;transition:none!important}
.mini-piece{position:relative;width:17px;height:17px;flex:0 0 auto}
.thinking{display:none!important}
.control-list>div{display:grid;grid-template-columns:36px 1fr;align-items:start;gap:10px;border-top:1px solid #3b321f}
.control-list b{display:grid;width:32px;height:32px;margin-top:9px;place-items:center;border:1px solid #705b30;border-radius:50%;color:var(--gold-light)}
.control-list p{margin:10px 0}
.result-piece{position:relative;width:80px;height:80px;margin:10px auto 18px}
.final-score{color:var(--gold-light)!important;font-weight:800}
@keyframes target-pulse{50%{opacity:.48;transform:scale(.82)}}
@keyframes thinking{0%,80%,100%{transform:translateY(0);opacity:.4}40%{transform:translateY(-4px);opacity:1}}
@container gf-page (max-width:380px) {.board-wrap{width:min(96cqw,calc(100svh - 232px));padding:12px}
.premium-stage{min-height:400px}}
@container gf-page (min-width:700px) and (min-width:0px) {.premium-stage{min-height:690px}
.board-wrap{width:min(82cqw,650px,calc(100svh - 280px))}
.mini-piece{width:21px;height:21px}}
@container gf-page (min-width:900px) and (min-width:100000px) {.premium-stage{min-height:560px}
.board-wrap{width:min(55cqw,550px,calc(100svh - 218px))}}
@media (max-height:700px) {@container gf-page (min-width:100000px) {.premium-stage{min-height:400px}
.board-wrap{width:min(62vh,430px)}}}
.preview-capture .camp-shape{display:none}
.preview-capture .premium-stage{min-height:0;padding-top:10px;background:transparent}
.preview-capture .board-wrap{width:min(100%,620px)}
html:not(.preview-capture) .premium-stage{justify-content:flex-start;padding-top:0}
/* Two-player field: the central hexagon and only the two opposing camps. */
.premium-stage:has(.two-player-board){min-height:0;justify-content:flex-start;padding-top:8px;padding-bottom:8px}
.board-wrap.two-player-board{width:min(98cqw,calc((100svh - 232px) * .6042296072),780px);max-width:100%;aspect-ratio:800/1324;padding:0}
.two-player-board .hole{left:39%;top:39%;width:22%;border:1px solid #b0d3df;background:#a9d6e3;box-shadow:0 0 0 1px #111b28}
.two-player-board .camp-human .hole{background:#253444;border-color:#829cae}
.two-player-board .camp-rival .hole{background:#253444;border-color:#829cae}
.two-player-board .camp-shape{opacity:.08}
/* Square field with the same equilateral triangular lattice. */
.premium-stage:has(.square-grid-board){min-height:0;justify-content:flex-start;padding-top:8px;padding-bottom:8px}
.board-wrap.square-grid-board{width:min(98cqw,calc(100svh - 232px),780px);max-width:100%;aspect-ratio:1;padding:0}
.square-grid-board .hole{left:39%;top:39%;width:22%;border:1px solid #b0d3df;background:#a9d6e3;box-shadow:0 0 0 1px #111b28}
.square-grid-board :is(.camp-human,.camp-rival) .hole{background:#253444;border-color:#829cae}
.square-grid-board .camp-shape{opacity:.08}
/* Full six-seat star: vertical tips and four lateral camps, as in the reference. */
.premium-stage:has(.multi-star-board){min-height:0;justify-content:flex-start;padding-top:8px;padding-bottom:8px}
.board-wrap.multi-star-board{width:min(98cqw,calc((100svh - 232px) * .9049773756),780px);max-width:100%;aspect-ratio:800/884;padding:0}
.multi-star-board .hole{left:18%;top:18%;width:64%;border:1px solid #171717;background:#000;box-shadow:inset 0 1px 2px #000,0 1px 1px #ffffff0d}
.multi-star-board .camp-shape{opacity:.28;stroke-width:44;stroke-linejoin:round}
.tone-P{--piece-tone:hue-rotate(0deg);--seat-color:#40c9ed}
.tone-O{--piece-tone:hue-rotate(-165deg);--seat-color:#f29b47}
.tone-G{--piece-tone:hue-rotate(-60deg);--seat-color:#4ed789}
.tone-R{--piece-tone:hue-rotate(-140deg);--piece-image:url('assets/halma-blue.webp');--seat-color:#edce59}
.tone-V{--piece-tone:hue-rotate(70deg);--seat-color:#bc8cf4}
.tone-Y{--piece-tone:hue-rotate(0deg);--piece-image:url('assets/halma-red.webp');--seat-color:#fa6981}
.piece,.mini-piece,.result-piece{background-image:var(--piece-image,url('assets/halma-blue.webp'));filter:var(--piece-tone,hue-rotate(0deg))}
.is-selectable .piece{filter:var(--piece-tone,hue-rotate(0deg)) drop-shadow(0 0 5px #e8db9d55)}
.is-selected .piece{filter:var(--piece-tone,hue-rotate(0deg)) drop-shadow(0 0 8px #fff0b0)}
.camp-seat-P{fill:#40c9ed;stroke:#40c9ed}.camp-seat-O{fill:#f29b47;stroke:#f29b47}.camp-seat-G{fill:#4ed789;stroke:#4ed789}.camp-seat-R{fill:#edce59;stroke:#edce59}.camp-seat-V{fill:#bc8cf4;stroke:#bc8cf4}.camp-seat-Y{fill:#fa6981;stroke:#fa6981}
.seat-settings{min-width:0;margin:16px 0;padding:4px 12px 12px;border:1px solid #665834;border-radius:12px}
.seat-settings legend{padding:0 6px;color:#f3dfa4;font-weight:700}
.seat-setting>span{display:flex;align-items:center;gap:8px}.seat-setting b{font:inherit}
.seat-swatch{display:inline-block;width:13px;height:13px;border-radius:50%;box-shadow:inset 0 2px 3px #fff5;flex:0 0 auto}
.swatch-blue{background:#40c9ed}.swatch-amber{background:#f29b47}.swatch-green{background:#4ed789}.swatch-coral{background:#fa6981}.swatch-violet{background:#bc8cf4}.swatch-gold{background:#edce59}
.settings-error{color:#ffacac;font-size:.9rem}.settings-error:empty{display:none}

/* Older two-colour rounds keep their original red opponent. */
body:not([data-halma-pattern="multi-star"]) .tone-R{--piece-tone:hue-rotate(0deg);--piece-image:url('assets/halma-red.webp');--seat-color:#fa6981}
/* Seat material also wins over the older two-player .is-rival image rule. */
.spot .piece{background-image:var(--piece-image,url('assets/halma-blue.webp'))}

/* Board-only surface; inert opponent buttons keep their full material brightness. */
.board-surface{fill:url(#boardLight);stroke:url(#boardLight);stroke-width:44;stroke-linejoin:round}
.board .spot:disabled{opacity:1}

/* Fixed board directly on the page gradient. */
#board-viewport{overflow:visible;border-radius:0}

/* Keep selected and moving glass pieces bright, including computer moves. */
.is-selected .piece,.is-moving .piece,.active-piece{filter:var(--piece-tone,hue-rotate(0deg)) brightness(1.55) drop-shadow(0 0 4px #fff7d6) drop-shadow(0 0 11px #ffd66ddd);transition:none}
.is-selected:before{content:"";position:absolute;inset:-4%;border:2px solid #fff0b0;border-radius:50%;box-shadow:0 0 12px #ffdc88aa;pointer-events:none}
