/* Respond to the actual viewport, including the resizable preview iframe. */
body>header.game-nav{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}body{padding-bottom:env(safe-area-inset-bottom)}
@media(max-width:650px){body>header.game-nav{min-height:52px;padding-top:12px;padding-bottom:12px}body{background-position:left 52px,center}body>main{padding-top:22px}.game-session{margin-bottom:12px!important}.intro h1{font-size:24px}.intro p{font-size:12px}.board-frame{width:100%;max-width:480px}.gatta-table{padding:12px!important}.gatta-table .scores{gap:10px}.gatta-table .seed-collection{padding:8px}.gatta-table .seed-store{height:30px}.gatta-table .sowing-hand{margin:12px 0}.gicchi-table{padding:14px!important}.game-menu-panel{max-height:70dvh}main>h1{font-size:32px;margin:12px 0}.side-panel{padding:16px}.cowrie-tray{margin:10px 0;padding:14px 8px}.turn-dot{width:28px;height:28px}.current-heading h2{font-size:20px}.history-section{margin-top:16px}}
@media(min-width:651px) and (max-width:1050px) and (orientation:portrait){.game-layout{grid-template-columns:minmax(0,1fr);max-width:740px;margin:auto}.board-frame{max-width:610px}.side-panel{padding:18px}.cowrie-tray{margin:12px 0}.players{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(orientation:landscape) and (max-height:600px){body>header.game-nav{min-height:44px;padding-top:9px;padding-bottom:9px}body{background-image:radial-gradient(ellipse at top,#32544a,#173b36)}body>main{padding-top:10px}.game-session{margin-bottom:8px!important}.intro{margin-bottom:10px}.intro h1{font-size:23px}.intro p{display:none}.game-layout{grid-template-columns:minmax(0,1fr) minmax(210px,32%);gap:16px}.play-area{padding:10px}.board-frame{width:min(100%,max(220px,calc(100dvh - 175px)))}.board-legend{padding:10px 0;gap:12px}.side-panel{padding:14px}.side-panel .table-note{display:none}.players{grid-template-columns:repeat(4,minmax(0,1fr))}.player-card{padding:7px}.player-card small:last-child{display:none}.cowrie-tray{padding:12px 5px;margin:10px 0}.shells{gap:5px}.current-heading h2{font-size:19px}.gate-status{margin-top:8px}.gatta-table{max-width:900px;margin:auto!important}.gatta-table .scores{float:left;width:125px;display:grid;gap:8px;margin-right:20px}.gatta-table .seed-collection{min-width:110px;padding:8px}.gatta-table .seed-store{height:26px}.gatta-table .sowing-hand{margin:0 0 8px}.gatta-table .wooden-board{margin-left:145px;padding:15px 12px}.gatta-table .row-label{margin:10px 0 10px 145px}.gatta-table .message{clear:both;margin-top:16px}.gicchi-table{max-width:900px;margin:auto!important}.gicchi-table>.scores{float:left;width:125px;display:grid;gap:8px;margin-right:20px}.gicchi-table #skill{margin-left:145px}.gicchi-table .gicchi-scene{height:310px}.gicchi-table .message{min-height:0}main>h1{font-size:26px;margin:8px 0}.gicchi-table .floor-cowries{padding:5px;margin:10px 0}}

/* Game chrome: one title row, with the original decorative band retained. */
body.compact-game>header.game-nav{min-height:56px;padding:6px 14px;gap:10px;max-width:1240px;position:relative;z-index:30}
.compact-game .game-nav h1{font:normal clamp(18px,3vw,26px) Georgia;margin:0;flex:1;color:inherit}
.compact-game .game-nav>a{font-size:12px;white-space:nowrap}
.compact-game .game-nav .game-session{margin:0!important;padding:0;position:relative;flex:none;z-index:35}
.compact-game .game-menu>summary{width:44px;height:44px;padding:8px;display:grid;place-items:center;font-size:23px;background:transparent;color:inherit;border-color:#bba87680}
.compact-game .game-menu>summary::after{display:none}
.compact-game .game-menu-panel{left:0;right:auto;top:calc(100% + 6px)}
.compact-game .session-status:not(:empty){position:absolute;top:50px;left:0;width:min(320px,calc(100vw - 30px));padding:10px;background:#edf0e2;color:#243e35;border-radius:8px}
body.compact-game{background-position:left 56px,center;background-size:240px 32px,auto}
body.compact-game>main{padding-top:42px}
.compact-game .intro{display:none}
.board-turn{display:flex;align-items:center;gap:8px;min-width:0}
.board-turn .turn-pawn{width:28px;height:28px;flex-shrink:0}
@media(max-width:1050px) and (orientation:portrait), (max-width:650px){
 body.compact-game>main{padding:36px 10px 0}
 .compact-game .game-layout{grid-template-columns:minmax(0,1fr);gap:12px}
 .compact-game .board-top{margin-bottom:8px;min-height:30px}
 .compact-game .board-turn #turn-label{font-size:0}
 .compact-game .board-turn #turn-label::after{content:attr(data-caption);font-size:12px}
 .compact-game:not(.match-started) .board-turn #turn-label{font-size:12px}
 .compact-game:not(.match-started) .board-turn #turn-label::after{content:none}
 .compact-game .play-area{padding:8px}
 .compact-game .board-frame{width:100%;max-width:min(560px,max(240px,calc(100dvh - 290px)));padding:10px}
 .compact-game.match-started .side-panel{display:none}
 .compact-game #turn-panel>.current-heading{display:none}
 .compact-game #gate-status{font-size:10px;padding:4px 6px;margin-top:6px;line-height:1.3}
 .compact-game .cowrie-tray{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px;margin:8px 0 0;padding:7px 10px}
 .compact-game .shells{min-height:48px;gap:5px;flex-wrap:nowrap;grid-row:1/3}
 .compact-game .shell small{display:none}
 .compact-game .shell-image{width:25px;height:37px}
 .compact-game .throw-result{font-size:18px;margin:0}
 .compact-game #throw-detail{font-size:10px;max-width:125px}
 .compact-game .move-instruction{font-size:11px;line-height:1.35;margin:6px 0}
 .compact-game .board-legend{padding:7px 0;gap:12px;font-size:10px}
 .compact-game .players{gap:4px;grid-template-columns:repeat(4,minmax(0,1fr))}
 .compact-game .player-card{padding:5px;border-radius:5px}
 .compact-game .player-card strong{font-size:10px;gap:3px}
 .compact-game .player-card small{font-size:9px;margin-top:3px}
 .compact-game .player-card .progress,.compact-game .player-card small:last-child{display:none}
 .compact-game .history-section{margin-top:10px;padding-top:10px}
 .compact-game .gatta-table{display:flex;flex-direction:column;padding:10px!important}
 .compact-game .gatta-table .wooden-board{order:1;margin:0;padding:14px 8px}
 .compact-game .gatta-table .row-label{order:0;margin:0 0 6px;font-size:11px}
 .compact-game .gatta-table .wooden-board+.row-label{order:2;margin:6px 0}
 .compact-game .gatta-table .sowing-hand{order:3;margin:6px 0}
 .compact-game .gatta-table .scores{order:4;gap:8px;margin:6px 0}
 .compact-game .gatta-table .seed-collection{padding:5px;min-width:0;font-size:12px}
 .compact-game .gatta-table .seed-store{height:22px}
 .compact-game .gatta-table .message{order:5;margin:8px 0;font-size:12px}
 .compact-game .gatta-table>label{order:6;font-size:12px}
}

/* Always-visible, shared sound-effects controls; home music stays separate. */
.quick-sfx{position:fixed;right:max(10px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));z-index:40;display:flex;align-items:center;gap:6px;padding:4px 8px;background:#eef1e5f5;color:#173b36;border:1px solid #a99b73;border-radius:24px;box-shadow:0 2px 8px #0003}
.quick-sfx button{min-width:38px;min-height:36px;background:none;border:0;color:inherit;font-size:17px;cursor:pointer}
.quick-sfx label{display:flex;align-items:center;gap:5px;font:11px system-ui}
.quick-sfx input{width:76px;min-height:30px;accent-color:#215c4b}
.compact-game main{padding-bottom:70px}
#cowrie-card{cursor:pointer;touch-action:manipulation}
#cowrie-card[aria-disabled=true]{cursor:default}
#cowrie-card:focus-visible{outline:3px solid #0078d4;outline-offset:4px}
#cowrie-card.needs-throw{animation:invite-throw 1.8s ease-in-out infinite}
@keyframes invite-throw{0%,100%{box-shadow:0 0 0 2px #bd8c37}50%{box-shadow:0 0 0 5px #0086c9,0 0 16px #72c9ff80}}
@media(prefers-reduced-motion:reduce){#cowrie-card.needs-throw{animation:none;outline:3px solid #0086c9;outline-offset:2px}}
.move-route{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
.transfer-options{display:flex;align-items:center;flex-wrap:wrap;gap:8px;order:5;margin:8px 0;font-size:12px}
.transfer-options label{display:flex;align-items:center;gap:8px}
.transfer-options select,.transfer-options button{font:inherit;padding:8px;border-radius:6px;border:1px solid #567c6a;background:#edf2e8;color:#173b36}
/* Portrait-only game surface in the web preview, without touching native settings. */
body.chowka-page>main{max-width:620px}
.chowka-page .game-layout{grid-template-columns:minmax(0,1fr);gap:12px}
.chowka-page.match-started .side-panel{display:none}
.chowka-page #turn-panel>.current-heading{display:none}
.chowka-page .board-frame{width:100%;max-width:560px}
.chowka-page .cowrie-tray{margin:10px 0;padding:10px}
.chowka-page #gate-status{margin-top:8px}
.portrait-prompt{display:none}
@media(orientation:landscape) and (max-width:1050px){
 .chowka-page>main{display:none}
 .chowka-page .portrait-prompt{display:block;text-align:center;padding:60px 20px;color:#f1e8ce}
 .portrait-prompt>span{font-size:46px}.portrait-prompt a{color:inherit}
}
@media(orientation:landscape) and (pointer:coarse){.chowka-page>main{display:none}.chowka-page .portrait-prompt{display:block;text-align:center;padding:60px 20px;color:#f1e8ce}}

body:has(dialog[open]) #cowrie-card.needs-throw{animation:none}

/* A compact player matrix uses the same selected materials as the board. */
#name-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
#name-fields .player-setup-tile{display:grid;grid-template-columns:22px minmax(0,1fr);justify-items:center;gap:7px;padding:10px 8px;min-width:0;background:#f5f1e4;border:1px solid #bcb795;border-radius:10px}
#name-fields .setup-player-number{width:22px;height:22px;display:grid;place-items:center;align-self:start;border-radius:50%;background:#234438;color:#fff8df;font:700 12px system-ui}
#name-fields .setup-player-pawn{width:38px;height:38px;justify-self:center;background-color:var(--pawn-color);border:3px solid var(--player-color);outline:2px solid #fff8dc;outline-offset:1px}
#name-fields .setup-player-pawn.fun-pawn{background:#f3e9cb}
#name-fields .setup-player-pawn .pawn-number{display:none}
#name-fields .player-setup-tile input{grid-column:1/-1;min-width:0;width:100%;padding:7px 4px;text-align:center;font-size:12px;background:#fffdf5;border-color:#cecbb5}
#name-fields .player-setup-tile:focus-within{outline:2px solid #0078b8;outline-offset:2px}

/* Per-match statistics share the existing player strip. */
.chowka-page .players{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.chowka-page .player-card{padding:8px;min-width:0}
.player-stat-heading{display:flex;align-items:center;gap:7px;min-width:0}
.player-stat-heading strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.player-stat-heading .player-stat-pawn{width:27px;height:27px;border:2px solid var(--player-color);outline:1px solid #fff6d8;outline-offset:1px;flex-shrink:0}
.player-stat-pawn .pawn-number{display:none}
.stat-turn{font:700 9px system-ui;color:#005a8f;background:#dbf2ff;padding:3px 4px;border-radius:4px}
.player-stat-values{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:7px;font:11px system-ui;color:#53654f}
.player-stat-values b{color:#243e35;font-variant-numeric:tabular-nums}
.chowka-page .player-card.active{border:2px solid var(--player-color);padding:7px;background:#fffef1}
.final-standings{text-align:left;font-size:14px;line-height:1.8;padding-left:26px}
.gatta-result{order:5;background:#e0eed9;border:2px solid #467553;border-radius:12px;padding:16px;margin:10px 0;text-align:center}
.gatta-result h2{margin:0 0 8px;font:24px Georgia;color:#214b39}
.gatta-result p{margin:5px 0;font-size:13px}
.gatta-result button{margin-top:10px;padding:10px 18px;background:#234d3d;color:#fff5dd;border:0;border-radius:7px;cursor:pointer}

/* Tactile seat choices and illustrated switches, shared by phone and tablet. */
.player-setup-tile [data-player-kind]{grid-column:1 / -1;width:100%;min-height:44px;border:1px solid var(--player-color);border-radius:12px;background:#fff8df;color:#164d43;font:inherit;padding:7px}
.bot-setup{max-width:600px;margin:16px auto;padding:22px;border:2px solid #b99245;border-radius:20px;background:#f5f0d8;color:#164d43;box-shadow:0 6px 18px #153b3020}
.seat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}
.seat-grid label{display:grid;gap:8px;font-weight:bold}.seat-grid select{width:100%;min-height:48px;font:inherit;border-radius:12px;background:#fff9e7;color:#164d43;padding:8px;border:1px solid #8f7138}
.play-switch{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:6px 10px;border:1px solid #9f864f;border-radius:16px;background:#fff8df;color:#164d43;cursor:pointer;font-size:13px}
.play-switch input{position:absolute;opacity:0;width:1px;height:1px}.play-switch b{display:block;font-size:14px}
.switch-track{position:relative;display:flex;align-items:center;justify-content:space-around;flex-shrink:0;width:76px;height:38px;background:#ded3ad;border-radius:24px;box-shadow:inset 0 2px 4px #0003;border:1px solid #8d7645}
.switch-track:before{content:'';position:absolute;width:32px;height:32px;left:2px;top:2px;background:#fffced;border:1px solid #c6a85c;border-radius:50%;box-shadow:0 2px 4px #0004;box-sizing:border-box;transition:transform .18s}
.switch-track span{z-index:1;font-size:20px}.play-switch input:checked+.switch-track{background:#3c7966}.play-switch input:checked+.switch-track:before{transform:translateX(38px)}
.play-switch input:focus-visible+.switch-track{outline:3px solid #0075bd;outline-offset:3px}.play-switch:has(input:disabled){opacity:.6;cursor:default}
.transfer-options{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.session-actions button>span{display:inline-block;width:24px;text-align:center;color:#986a22}
@media(prefers-reduced-motion:reduce){.switch-track:before{transition:none}}
.seat-grid input{min-width:0;width:100%;box-sizing:border-box;min-height:44px;border:1px solid #8f7138;border-radius:10px;background:#fffdf0;color:#164d43;padding:8px;font:inherit}
.shake-option{margin:6px 0;align-self:flex-start}.shake-option small{display:block;max-width:250px;font-size:11px;font-weight:normal;line-height:1.4}.score,.row-label{overflow-wrap:anywhere}
/* A brief celebration above the table, without blocking the remaining players. */
.finish-celebration{position:fixed;inset:0;pointer-events:none;z-index:1000;overflow:hidden}
.finish-banner{position:absolute;left:50%;top:max(74px,12vh);transform:translateX(-50%);width:max-content;max-width:calc(100% - 36px);box-sizing:border-box;padding:16px 22px;border:2px solid #d6ac48;border-radius:20px;background:linear-gradient(135deg,#fff9e9f5,#fff0c9f5);color:#24574d;box-shadow:0 10px 32px #163f4655,0 0 0 5px #f7cf6b33;text-align:center;overflow-wrap:anywhere;animation:announcement-float 3.5s ease-out both}
.finish-banner strong{display:block;font-size:clamp(26px,5.5vw,42px);font-weight:900;line-height:1.18;font-family:Georgia,serif;color:#a02b65;background:linear-gradient(110deg,#a42c59 10%,#945400 38%,#08705a 65%,#3156ad 90%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 2px 0 #fff)}.finish-banner span{display:block;font-size:13px;margin-top:6px}
.finish-confetti{position:absolute;top:-20px;width:9px;height:15px;border-radius:2px;animation:finish-fall 2.8s var(--delay) ease-in forwards}
@keyframes finish-fall{to{transform:translate(var(--drift),105vh) rotate(var(--spin));opacity:0}}
@keyframes announcement-float{0%{opacity:0;transform:translate(-50%,20px) scale(.94)}14%,75%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-18px) scale(1)}}
@media(prefers-reduced-motion:reduce){.finish-confetti{display:none}.finish-banner{animation:none}}
@media(forced-colors:active){.finish-banner strong{background:none;-webkit-text-fill-color:CanvasText;filter:none}}
.saved-throws{margin:8px 0;color:#164f45;font-size:12px;font-weight:bold}.throw-tokens{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}.throw-tokens button{min-width:62px;min-height:54px;border:2px solid #a48b54;border-radius:14px;background:#fff6dc;color:#164f45;font:bold 23px Georgia,serif;padding:6px 10px}.throw-tokens button small{display:block;font:11px system-ui}.throw-tokens button[aria-pressed=true]{border-color:#0074b9;background:#d8f0ff;box-shadow:0 0 0 2px #0074b933}.throw-tokens button:disabled{opacity:.75}
.session-status:empty{display:none}

/* A small carved game shelf, shared by each game's home navigation. */
body>header.game-nav .all-games-link{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;min-height:44px;padding:3px 9px 3px 5px;border:1px solid #d6b778;border-radius:12px;background:linear-gradient(145deg,#315e50,#173f36);color:#fff1cb;text-decoration:none;font:600 12px/1.15 system-ui;box-shadow:0 2px 0 #102d27,inset 0 1px 0 #ffffff20;transition:background .16s,box-shadow .16s,transform .16s}
.all-games-art{display:block;width:48px;height:30px;flex:none;filter:drop-shadow(0 1px 1px #0005)}
@media(hover:hover){body>header.game-nav .all-games-link:hover{background:linear-gradient(145deg,#477563,#245646);box-shadow:0 2px 0 #102d27,0 0 0 2px #e6bd7c40}}
body>header.game-nav .all-games-link:focus-visible{outline:3px solid #ffe3a0;outline-offset:3px}
body>header.game-nav .all-games-link:active{transform:translateY(2px);background:#806033;box-shadow:inset 0 2px 5px #0006}
@media(max-width:380px){body>header.game-nav .all-games-link{gap:3px;padding-inline:4px}.all-games-art{width:36px}.compact-game .game-nav h1{font-size:17px}body.compact-game>header.game-nav{gap:7px}}
@media(prefers-reduced-motion:reduce){body>header.game-nav .all-games-link{transition:none}body>header.game-nav .all-games-link:active{transform:none}}

.all-games-back{flex:none;display:block}.all-games-link .all-games-art{width:40px}@media(max-width:380px){.all-games-link .all-games-art{width:30px}}

/* Keep sound controls available without covering the playing area. */
.quick-sfx{display:block;padding:0;border-radius:50%}
.quick-sfx>summary{display:flex;align-items:center;justify-content:center;position:relative;width:44px;height:44px;border-radius:50%;list-style:none;cursor:pointer;color:#215c4b}
.quick-sfx>summary::-webkit-details-marker{display:none}
.quick-sfx>summary:hover,.quick-sfx[open]>summary{background:#dfdfc3}
.quick-sfx>summary:active{background:#cbbd91}
.quick-sfx>summary:focus-visible{outline:3px solid #0079dc;outline-offset:3px}
.quick-sfx .sfx-muted-mark{position:absolute;right:3px;bottom:2px;background:#eef1e5;border-radius:50%;font:bold 15px system-ui;color:#983b30;padding:0 3px}
.quick-sfx .sfx-muted-mark[hidden]{display:none}
.quick-sfx-panel{position:absolute;right:0;bottom:54px;display:flex;align-items:center;gap:10px;width:235px;max-width:calc(100vw - 24px);padding:12px;background:#eef1e5;border:1px solid #a99b73;border-radius:16px;box-shadow:0 6px 20px #0004}
.quick-sfx:not([open])>.quick-sfx-panel{display:none}
.quick-sfx-panel label{flex:1;flex-wrap:wrap;font-size:12px}
.quick-sfx-panel input{width:135px;max-width:100%;min-height:36px}
.quick-sfx-panel button{min-width:44px;min-height:44px;border:1px solid #a99b73;border-radius:12px}

.computer-moving-pawn{position:absolute!important;z-index:25!important;pointer-events:none!important;margin:0!important;opacity:1!important;filter:drop-shadow(0 3px 4px #173b3680)!important;transition:none!important}
.cell.computer-route-cell{box-shadow:inset 0 0 0 3px #087bb7;background-color:#cae5d0}
.computer-animation-option{margin-top:10px}.computer-animation-option small{display:block;font-size:11px;line-height:1.4}

#board{position:relative}

/* Crowded houses retain fixed geometry; the enlarged selector lives off the grid. */
.board .cell.crowded-square>.tokens{display:grid;grid-template-columns:repeat(var(--crowd-columns),var(--crowd-size));gap:2px;overflow:hidden;padding:3px;justify-content:center;align-content:center}
.cell.crowded-square .tokens .pawn{width:var(--crowd-size)!important;height:var(--crowd-size)!important;min-width:0!important;min-height:0!important;font-size:clamp(5px,calc(var(--crowd-size)*.4),11px);margin:0;outline-offset:0}
.cell.crowded-square .tokens .pawn-number{font-size:clamp(5px,calc(var(--crowd-size)*.4),10px);min-width:0}
.crowded-square{cursor:zoom-in}.crowded-square::after{content:'⊕';position:absolute;top:1px;right:2px;font:12px system-ui;color:#124c5a;pointer-events:none}
.crowded-dialog{position:fixed;margin:0;box-sizing:border-box;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:0;border:2px solid #916331;border-radius:2px;overflow:visible;background:url('board-wood.svg') center/cover,#e6bd80;color:#173b36;box-shadow:0 0 0 3px #f1d09c,0 8px 22px #0006}
.crowded-dialog::backdrop{background:transparent}
.crowded-dialog .crowded-pawn-grid{position:absolute;inset:0}
.crowded-dialog .zoom-safe-mark{position:absolute;inset:0;display:grid;place-items:center;font-size:46px;color:#624523;opacity:.3;pointer-events:none}
.crowded-dialog .zoom-square-pawn{position:absolute;margin:0;padding:0;width:var(--zoom-pawn-size)!important;height:var(--zoom-pawn-size)!important;min-width:0;min-height:0;max-width:none;max-height:none;cursor:pointer}
.crowded-dialog .zoom-square-pawn:disabled{opacity:.4;filter:grayscale(.65);cursor:default}
.crowded-dialog .zoom-square-pawn:enabled{opacity:1;filter:none;outline:2px solid #006eab;outline-offset:2px}
.crowded-dialog .zoom-square-pawn .pawn-number{right:0;bottom:0;min-width:0;width:auto;height:auto;padding:1px 2px;font-size:clamp(10px,calc(var(--zoom-pawn-size)*.36),18px);line-height:1.1}
.zoom-pair-controls{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);display:flex;gap:4px;z-index:6}
.zoom-pair-controls button{min-height:30px;padding:3px 9px;border:1px solid #98713c;border-radius:5px;background:#fff2d5;color:#184537;font:600 14px system-ui;white-space:nowrap}

.board .cell.crowded-square .fun-pawn .pawn-number{right:0;bottom:0;min-width:0;width:auto;height:auto;padding:0 1px;font-size:clamp(5px,calc(var(--crowd-size)*.4),10px);line-height:1.1}

.zoom-move-status{position:absolute;bottom:calc(100% + 8px);left:0;right:0;margin:0;padding:9px;background:#fff3d8;color:#7a2525;border:1px solid #bd7753;border-radius:8px;font:12px/1.4 system-ui;box-shadow:0 3px 10px #0003;z-index:10}.zoom-move-status.below-square{bottom:auto;top:calc(100% + 8px)}

.pawn .invalid-move-cross{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:12;display:grid;place-items:center;width:19px;height:19px;border-radius:50%;border:1px solid #ffe7cf;background:#ad253cc9;color:white;font:bold 20px/1 system-ui;text-shadow:none;pointer-events:none;animation:invalid-move-cue .6s ease-in-out 3}
@keyframes invalid-move-cue{0%,100%{opacity:.9}50%{opacity:.25}}
@media(prefers-reduced-motion:reduce){.pawn .invalid-move-cross{animation:none}}

/* Zoom controls use their own non-overlapping layout and matching touch boxes. */
.crowded-dialog .crowded-pawn-grid{inset:12px;display:grid;grid-template-columns:repeat(var(--zoom-columns),minmax(0,1fr));grid-template-rows:repeat(var(--zoom-rows),minmax(0,1fr));gap:10px;pointer-events:none}
.crowded-dialog.has-pair-controls .crowded-pawn-grid{bottom:58px}
.crowded-dialog .zoom-square-pawn{position:relative;left:auto!important;top:auto!important;align-self:center;justify-self:center;width:var(--zoom-pawn-size)!important;height:var(--zoom-pawn-size)!important;aspect-ratio:1;max-height:100%;pointer-events:auto;touch-action:manipulation;transform:none!important;transition:none!important;box-sizing:border-box}
.crowded-dialog .zoom-square-pawn>*{pointer-events:none!important}
.crowded-dialog .zoom-square-pawn .found-pawn{inset:0;width:100%;height:100%}
.crowded-dialog .zoom-pair-controls{height:44px;bottom:4px}.crowded-dialog .zoom-pair-controls button{min-height:44px;touch-action:manipulation;transform:none!important}
