/* Dev-owned geometry and accessible interactions. Art r30/r32 remains authoritative. */
[hidden] { display: none !important; }
.game-screen .game-layout { display: flex; flex-direction: column; gap: 1rem; }
.game-screen .play-panel { display: block; position: static; order: 0; padding: .8rem; }
.game-screen .board-panel { order: 1; }
.game-screen .play-panel .action-card { margin-top: 1rem; }
.game-screen .current-player-card { margin-bottom: 1rem; }
.game-screen .game-layout > *, .player-row > *, .icon-choice, .theme-choice { min-width: 0; }
.game-screen .game-layout .board-panel, .game-screen .game-layout .play-panel { width: 100%; max-width: 100%; }
.game-screen .game-progress { max-height: 7rem; overflow: auto; }
.game-screen #group-progress { margin: 1rem 0; padding: .75rem; }
.game-screen #group-progress summary { min-height: 44px; cursor: pointer; }
.game-screen #progress-roster { padding-left: 1.25rem; overflow-wrap: anywhere; }
.game-screen .board-scroll { max-height: none; overflow: visible; }
.biome-viewport { position: relative; padding-top: 5.5rem; min-width: 0; margin-bottom: 1rem; isolation: isolate; scroll-margin-top: 1rem; }
.biome-viewport.has-spinner { padding-top: 15rem; }
.biome-viewport > .biome-info-float { position: absolute; top: .5rem; left: .5rem; z-index: 6; max-width: calc(100% - 1rem); display: grid; gap: .2rem; }
.biome-info-float strong { font-size: 1rem; line-height: 1.25; }
.biome-info-float span { font-size: .875rem; line-height: 1.3; }
.biome-viewport.has-spinner > .biome-info-float { max-width: calc(100% - 10rem); }
body[data-board-mode] .biome-viewport .region-window { overflow-x: auto; overflow-y: hidden; width: 100%; }
body[data-board-mode] .biome-viewport .region-card { min-width: 760px; width: 100%; margin: 0; }
.game-layout #spinner-home .spinner-card { max-width: 480px; margin: 1rem 0 0 auto; }
.game-layout .biome-spinner-float { position: absolute; top: .5rem; right: .5rem; z-index: 7; width: 8.75rem; padding: .5rem; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.biome-spinner-float .spinner-copy .step-label, .biome-spinner-float #spinner-heading { display: none; }
.biome-spinner-float #spinner-status { margin: 0; font-size: .875rem; line-height: 1.2; color: inherit; }
.biome-spinner-float .spinner { width: 108px; height: 108px; flex: 0 0 108px; margin: 0; }
.biome-spinner-float #spin-button { width: 100%; min-height: 44px; padding: .45rem; font-size: 1rem; }
.post-map-continue { padding: 1rem; margin-top: 1rem; }
.post-map-continue #continue-feedback { display: block; width: min(100%, 28rem); min-height: 48px; margin: .75rem auto 0; }
.game-layout .board-space .player-stack, .game-layout .start-node .player-stack { top: calc(50% - 12px); bottom: auto; left: 50%; transform: translate(-50%, -100%); width: 66px; height: 44px; display: block; }
.game-layout .player-stack .token-slot { position: absolute; bottom: 0; left: 0; width: 30px; height: 38px; z-index: 4; }
.game-layout .player-stack .token-slot[data-slot="1"] { left: 34px; }
.game-layout .player-stack .token-slot[data-slot="2"] { left: 8px; bottom: 18px; z-index: 3; }
.game-layout .player-stack .token-slot[data-slot="3"] { left: 27px; bottom: 25px; z-index: 2; }
.game-layout .player-stack[data-count="1"] .token-slot { left: 0; }
.game-layout .player-stack .token-crop { width: 30px; height: 38px; }
.game-layout .player-stack .token-identity { position: absolute; left: 0; bottom: 0; font: bold 12px/1 sans-serif; padding: 1px; background: #fff; color: #162433; border-radius: 2px; }
.game-layout .player-stack .stack-count { position: absolute; left: 42px; top: -26px; font-size: 14px; line-height: 1.2; }
.game-layout .ladder .player-stack { left: 0; transform: translate(-90%, -35%); }
.game-layout .start-node .player-stack { top: 30%; transform: translate(-50%, -80%); }
.player-list .player-row { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(12rem, 1.5fr) minmax(6rem, .6fr); gap: .75rem; align-items: start; }
.player-icon-picker { position: relative; }
.player-icon-picker [role="combobox"] { display: flex; gap: .5rem; align-items: center; width: 100%; min-height: 56px; padding: .4rem .6rem; color: inherit; background: transparent; border: 0; text-align: left; }
.player-icon-picker .token-crop { width: 40px; height: 44px; flex: 0 0 40px; }
.player-icon-picker [role="combobox"] > span:nth-child(2) { flex: 1; }
.player-icon-options { position: relative; max-height: 20rem; overflow-y: auto; padding: .4rem; }
.player-icon-options [role="option"] { display: flex; gap: .6rem; align-items: center; min-height: 52px; padding: .35rem; cursor: pointer; }
.player-icon-options .option-active { outline: 2px solid currentColor; outline-offset: -2px; }
.player-icon-options [aria-selected="true"] { font-weight: 800; }
.player-row label, #group-roster-controls > label { display: grid; gap: .35rem; }
.roster-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: .75rem 0; }
.roster-pagination button { min-height: 44px; }
#group-roster-controls { margin: 1rem 0; }
.player-row input, .player-row select, #group-size, #roster-filter, #progress-filter { width: 100%; min-width: 0; min-height: 44px; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.high-contrast .player-icon-picker, .high-contrast .biome-info-float, .high-contrast .biome-spinner-float, .high-contrast .post-map-continue { border-width: 3px; }
@media (max-width: 720px) {
  .player-list .player-row { grid-template-columns: minmax(0,1fr); }
  .game-screen .play-panel { padding: .5rem; }
  .game-screen .board-panel { padding: .5rem; }
  .game-screen .current-player-card h2 { overflow-wrap: anywhere; }
  .game-topline, .game-actions, .panel-heading { flex-wrap: wrap; }
  .biome-viewport.has-spinner { padding-top: 17rem; }
  .biome-viewport.has-spinner > .biome-info-float { left: 0; max-width: calc(100% - 9.25rem); padding: .4rem; }
  .game-layout .biome-spinner-float { right: 0; }
  .biome-info-float strong, .biome-info-float span { font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) { .board-space.current::after { animation: none; } }
@media (forced-colors: active) {
  .biome-info-float, .biome-spinner-float, .player-icon-picker, .post-map-continue { background: Canvas; color: CanvasText; border: 2px solid CanvasText; }
  .token-identity { forced-color-adjust: none; }
}

/* The ladder's close vertical rungs use a two-token cluster beside the plate. */
.game-layout .ladder .player-stack { height: 30px; }
.game-layout .ladder .player-stack .token-slot, .game-layout .ladder .player-stack .token-crop { width: 26px; height: 30px; }
.game-layout .ladder .player-stack .stack-count { left: -30px; top: 4px; }

/* r34: the same controls stay at the top throughout the turn. */
.game-screen .turn-controls { position: sticky; top: .5rem; z-index: 40; margin: 0 0 1rem; scroll-margin-top: .5rem; }
.turn-controls .biome-spinner-float { position: relative; inset: auto; width: 100%; max-width: none; margin: 0; padding: .65rem 1rem; display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-rows: auto auto; gap: .35rem 1rem; align-items: center; }
.turn-controls .spinner-copy { grid-column: 2; grid-row: 1; }
.turn-controls .spinner-copy .step-label, .turn-controls #spinner-heading { display: none; }
.turn-controls #spinner-status { margin: 0; color: #fff0cc; font-size: 1rem; line-height: 1.3; }
.turn-controls .spinner { grid-column: 1; grid-row: 1 / 3; width: 112px; height: 112px; margin: 0; }
.turn-controls #spin-button { grid-column: 2; grid-row: 2; width: 100%; min-height: 52px; margin: 0; padding: .55rem .75rem; font-size: 1.5rem; }
.turn-controls .post-map-continue { margin: 0; padding: .6rem; }
.turn-controls #continue-feedback { width: 100%; max-width: none; min-height: 64px; margin: 0; font: 700 clamp(1.6rem, 3vw, 2rem)/1.2 Georgia, serif; }
.turn-controls .primary-button { color: #3a2718; background: linear-gradient(180deg, #ffdc88, #e9aa43 60%, #bd7324); border-color: #6b3d18; border-radius: 7px 9px 7px 10px; }
.game-screen #landing-summary:empty { display: none; }
.game-screen #landing-summary { margin: .75rem 0 1rem; }
.game-screen .board-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem .5rem; font: 600 1.125rem/1.3 Georgia, serif; color: #fff0cc; }
.game-screen .board-legend > span { gap: .4rem; }
.game-screen .board-legend .guide-medallion { width: 44px; height: 44px; flex: 0 0 44px; }
.game-screen .board-legend .guide-icon { width: 30px; height: 30px; }
.game-screen .special-result-card p { font-size: 1.0625rem; line-height: 1.45; }
.game-layout .player-stack .token-identity { bottom: -3px; left: 50%; transform: translateX(-50%); min-width: 1.2em; padding: 1px 3px; color: #493018; background: #f3dcaa; border: 1px solid #94622e; border-radius: 45%; font: 700 12px/1.1 Georgia, serif; text-align: center; box-shadow: 0 1px 2px #39230e80; }
.game-layout .player-stack .stack-count { color: #493018; background: #f3dcaa; border: 1px solid #94622e; border-radius: 7px 9px 6px 8px; padding: 2px 4px; font: 700 14px/1.2 Georgia, serif; }
@media (min-width: 850px) { .game-screen .board-legend { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 350px) { .turn-controls .biome-spinner-float { grid-template-columns: 96px minmax(0, 1fr); padding: .5rem; gap: .3rem .5rem; } .turn-controls .spinner { width: 92px; height: 92px; } .game-screen .board-legend { font-size: 1rem; } }
@media (forced-colors: active) { .turn-controls #spinner-status { color: CanvasText; } .turn-controls .primary-button { background: ButtonFace; color: ButtonText; } .game-layout .player-stack .token-identity, .game-layout .player-stack .stack-count { background: Canvas; color: CanvasText; border-color: CanvasText; } }
