/* Game surface and game-specific controls only. */
:root{color-scheme:dark;}
[role=button]{-webkit-tap-highlight-color:transparent}
.tile:focus-visible,.rotate-button:focus-visible,.help-button:focus-visible{outline:3px solid #fff1b8;outline-offset:2px}
.premium-stage{position:relative;isolation:isolate;overflow:visible;border:0;border-radius:0;padding:0;background:transparent;box-shadow:none}
.stage-glow{display:none}
.puzzle-frame{position:relative;width:100%;aspect-ratio:1;margin:0;overflow:hidden;border:0;border-radius:0;background:#05070b;box-shadow:none}
.board{display:grid;width:100%;height:100%;grid-template-columns:repeat(var(--grid-size),1fr);gap:3px;padding:3px;touch-action:none}
.board.is-hard{gap:6px;padding:6px}
.tile{position:relative;overflow:hidden;border:0;border-radius:5px;padding:0;background:#111;cursor:pointer;will-change:transform,filter}
.is-hard .tile{border:1px solid #b8954c;border-radius:50%;box-shadow:0 0 0 2px #0008}
.tile-image{position:absolute;inset:0;background-image:var(--puzzle-image);background-repeat:no-repeat;transition:transform .34s cubic-bezier(.18,.82,.2,1.2)}
.tile.is-selected{z-index:2;box-shadow:0 0 0 3px #ffe39b,0 0 22px #ffd45f}
.board.solved{gap:0;padding:0}
.board.solved .tile{border-radius:0;border:0;box-shadow:none;opacity:1;filter:none}
.hint-preview{position:absolute;z-index:5;inset:0;background-image:var(--puzzle-image);background-size:cover;background-position:center}
.puzzle-actions{display:grid;grid-template-columns:44px minmax(150px,240px) 44px;justify-content:center;gap:10px;margin-top:12px}
.rotate-button,.help-button{min-height:44px;border:1px solid #80662f;border-radius:12px;background:#090c12;color:var(--gold-light);cursor:pointer}
.rotate-button{font-size:24px}
.help-button{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 14px;font-size:12px;font-weight:800}
.help-button strong{color:#fff1b8}
.choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.choice-grid label{display:grid;min-height:42px;place-items:center;border:1px solid #66532b;border-radius:9px;padding:4px;text-align:center;font-size:11px}
.choice-grid label:has(input:checked){border-color:#efd58d;background:#c99b3922;color:#fff0b6}
.choice-grid input{position:absolute;opacity:0}
.range-row{display:grid;gap:10px;margin-top:12px}
.range-row>span{display:flex;justify-content:space-between}
.range-row input{width:100%;accent-color:var(--gold)}
.result-medallion{display:grid;width:78px;height:78px;margin:7px auto 12px;place-items:center;border:1px solid #ffe29c;border-radius:50%;box-shadow:0 0 24px #ffd65d;color:#ffe4a0;font-size:37px}
.demo-highlight{position:relative;z-index:80;box-shadow:0 0 0 3px #fff1b8,0 0 26px #ffd764!important}
.premium-stage.demo-active{pointer-events:none}
.premium-stage.demo-active .tile{opacity:1;filter:none}
@media(min-width:700px){.puzzle-actions{margin-top:16px}}
@media(max-width:370px){.puzzle-actions{grid-template-columns:42px 1fr 42px}}
