/* Use the free central stage, including on boards with a non-square shape. */
body.match-fullscreen #game-app.play-experience{--board-ratio:1;--board-dock:0px;--board-top:18px}
body.match-fullscreen #game-app.play-experience .board-area{--board-space:calc(100dvh - var(--board-dock) - var(--board-top) - 100px)}
body.match-fullscreen #game-app.play-experience .board-frame:not(.salons3d-visible) .board:not(.ludo){width:min(calc(var(--match-stage-width,100dvw) - var(--frame-size,0px)*2 - 28px),calc(var(--board-space)*var(--board-ratio)))!important;max-height:var(--board-space);min-width:0!important}
body.match-fullscreen #game-app.play-experience .race-board-area{--board-dock:144px}
body.match-fullscreen #game-app.play-experience[data-game=ur] .race-board-area{--board-dock:214px}
body.match-fullscreen #game-app.play-experience[data-game=patolli] .race-board-area{--board-dock:182px}
body.match-fullscreen #game-app.play-experience .race-board-area{padding:var(--board-top) 0 calc(var(--board-dock) + 48px);display:flex!important;align-items:center;justify-content:center}
body.match-fullscreen #game-app.play-experience .race-board-area .board-frame:not(.salons3d-visible){height:max-content;width:max-content;padding:var(--frame-size)!important}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-station{position:absolute;z-index:23;bottom:48px;left:50%;transform:translateX(-50%);box-sizing:border-box;width:min(530px,calc(100% - 24px));height:var(--board-dock);margin:0;padding:8px 12px;grid-template-columns:108px minmax(0,1fr);gap:6px;background:color-mix(in srgb,var(--theme-control-panel,#10282c) 94%,#000);color:#fff9e9;border-color:var(--theme-control-accent,#d6b774);box-shadow:0 8px 26px #0008;overflow:auto}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-stage{height:68px}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-presentation{min-width:0}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-faces{display:grid;grid-template-columns:repeat(var(--dice-face-count,4),minmax(0,1fr));gap:3px}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-value{width:100%;min-width:0;height:22px;padding:0;font-size:12px}
body.match-fullscreen #game-app.play-experience[data-game=patolli] .dice-station{--dice-face-count:5}
body.match-fullscreen #game-app.play-experience[data-game=backgammon] .dice-station{--dice-face-count:2}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-controls{gap:5px}
body.match-fullscreen #game-app.play-experience .race-board-area :is(.dice-result,.dice-help,.ur-reserve-label){color:#fff9e9}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-help{font-size:11px;line-height:1.3;margin:0}
body.match-fullscreen #game-app.play-experience .race-board-area :is(.dice-roll,.dice-pass){min-height:44px}
body.match-fullscreen #game-app.play-experience[data-editorial-view] .race-board-area .dice-controls .button{color:#fff9e9!important;text-shadow:0 1px 2px #000;border:0!important;border-image-source:var(--match-button-art)!important;border-image-slice:0 20% 0 20% fill!important;border-image-width:0 27px!important;background:none!important;border-radius:0}
body.match-fullscreen #game-app.play-experience .race-board-area .ur-reserve{background:#17313a;color:#fff4d8;border-color:#d7b974}
body.match-fullscreen #game-app.play-experience .race-board-area .dice-roll:disabled{display:none}
body.match-fullscreen #game-app.play-experience .race-board-area .board-frame.salons3d-visible{height:calc(100% - var(--board-dock) - 48px);bottom:calc(var(--board-dock) + 48px)}
body.match-fullscreen #game-app.play-experience .race-board-area #salons3d-host{height:100%!important}
/* In 3D on desktop, throws belong to the command rail, leaving the room intact. */
body.match-fullscreen #game-app.play-experience.match-dice-in-rail .race-board-area{--board-dock:0px;padding:0}
body.match-fullscreen #game-app.play-experience.match-dice-in-rail .race-board-area .board-frame.salons3d-visible{inset:0;height:100%}
body.match-fullscreen #game-app.play-experience .match-dice-rail{position:relative;display:grid;grid-template-columns:66px minmax(0,1fr);gap:8px;padding:10px;border:1px solid var(--theme-control-accent,#d6b774);border-radius:10px;background:#071415e0;color:#fff9e9;box-sizing:border-box}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-stage{height:56px}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-presentation{min-width:0}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-faces{display:grid;grid-template-columns:repeat(var(--dice-face-count,4),minmax(0,1fr));gap:2px}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-value{width:100%;min-width:0;height:20px;padding:0;font-size:11px}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-controls{gap:7px}
body.match-fullscreen #game-app.play-experience .match-dice-rail :is(.dice-result,.dice-help,.ur-reserve-label){color:#fff9e9}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-result{font-size:13px;line-height:1.3}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-help{font-size:11px;line-height:1.4;margin:0}
body.match-fullscreen #game-app.play-experience .match-dice-rail :is(.dice-roll,.dice-pass){min-height:44px;color:#fff9e9!important;text-shadow:0 1px 2px #000;border:0!important;border-image-source:var(--match-button-art)!important;border-image-slice:0 20% 0 20% fill!important;border-image-width:0 20px!important;background:none!important;border-radius:0}
body.match-fullscreen #game-app.play-experience .match-dice-rail .ur-reserves{display:grid;grid-template-columns:1fr;gap:7px}
body.match-fullscreen #game-app.play-experience .match-dice-rail .ur-reserve{background:#17313a;color:#fff4d8;border-color:#d7b974;min-height:44px}
body.match-fullscreen #game-app.play-experience .match-dice-rail .ur-reserve-pieces{display:none}
body.match-fullscreen #game-app.play-experience .match-dice-rail .dice-roll:disabled{display:none}
/* A compact dock remains reachable when commands are folded or on a phone. */
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"]:not(.match-dice-in-rail) .race-board-area{--board-dock:144px}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"]:not(.match-dice-in-rail) .race-board-area .dice-station{bottom:64px}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"]:not(.match-dice-in-rail) .race-board-area .board-frame.salons3d-visible{height:calc(100% - var(--board-dock) - 64px);bottom:calc(var(--board-dock) + 64px)}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"] .race-board-area .dice-station :is(.dice-help,.ur-reserve-pieces,.dice-result){display:none}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"] .race-board-area .dice-stage{height:48px}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"] .race-board-area .ur-reserve{min-height:36px;padding:3px}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"] .race-board-area .ur-reserve-label{font-size:10px;line-height:1.2}
.ur-readable{position:relative;isolation:isolate;gap:3px!important;padding:3px!important;border-radius:8px;overflow:hidden}
.ur-readable .square{border:1px solid #f1d4a975!important;border-radius:5%;background-color:color-mix(in srgb,var(--table-light,#715334) 86%,#142b33)!important;box-shadow:inset 0 1px 3px #fff4}
.ur-route-art{display:none}
.ur-direction{position:absolute;left:5%;top:4%;font:700 clamp(9px,1.4vw,18px)/1 sans-serif;color:#163344;background:#fff1cce0;border-radius:50%;padding:2px;pointer-events:none;z-index:4}
.ur-readable .square .piece{z-index:3;filter:drop-shadow(0 2px 2px #0009)}
.ur-path-label{position:absolute;bottom:3%;left:0;width:100%;text-align:center;color:#fff9e9;background:#0c253bc9;font:700 clamp(6px,.7vw,9px)/1.3 sans-serif;z-index:4;pointer-events:none;letter-spacing:.04em}
.ur-readable .square.special::before{color:#fff0b9;text-shadow:0 1px 2px #081725;opacity:1}
.ur-readable .square.ur-entry{outline:2px solid #8ce0dd;outline-offset:-2px}
.ur-readable .square.ur-exit{outline:2px solid #ffe39c;outline-offset:-2px}
.board.cross_track.patolli-readable .square{width:5.25%!important;height:5.25%!important;border-radius:14%;border:1px solid #f5dcafad;box-shadow:inset 0 1px 2px #fff7,0 2px 3px #0006}
.board.cross_track.patolli-readable .square.special{outline:2px solid #f5d174;outline-offset:-2px}
.board.cross_track.patolli-readable .square .coord{font-size:clamp(6px,.65vw,9px);background:#08282cba;color:#fff;bottom:0;right:0}
.patolli-reserves{grid-column:1/-1;display:flex;gap:8px}
.patolli-reserve{flex:1;min-height:44px;border:1px solid #74c9c5;background:#153739;color:#fff8e8;border-radius:8px;font:600 12px/1.25 sans-serif;cursor:pointer}
.patolli-reserve:disabled{opacity:.65;cursor:default}
.patolli-reserve:nth-child(2){border-color:#ed907b;background:#432c30}
.puluc-stack{position:relative;overflow:visible;width:95%;height:95%}
.puluc-stack-member{position:absolute;left:50%;top:calc(62% - var(--stack-level)*min(8%,5px));width:78%;height:78%;object-fit:contain;transform:translate(-50%,-50%);filter:drop-shadow(0 1px 1px #001a28)!important;z-index:calc(var(--stack-level) + 1)}
.puluc-stack .piece-badge{z-index:20;background:#153545;color:#fff6dc;border:1px solid #ffedb8}
/* Keep theme art while separating both camps from every board material. */
.board:is([data-game=reversi],[data-game=hex]) .piece-image{filter:drop-shadow(1px 0 #fff3ce) drop-shadow(-1px 0 #152b3b) drop-shadow(0 2px 2px #031522)!important}
.board:is([data-game=reversi],[data-game=hex]) .square.destination::after{background:#fff9e9!important;border:2px solid #132b3c!important;box-shadow:0 0 0 1px #fff9e9;width:24%;height:24%}
.board[data-game=hex] .square.edge-first{background-color:#213c52!important}
.board[data-game=hex] .square.edge-second{background-color:#f3e7c8!important}
.board[data-game=hex] .square.edge-first.edge-second{background:linear-gradient(135deg,#213c52 50%,#f3e7c8 50%)!important}
body.match-fullscreen #game-app.play-experience .puluc-table{width:min(calc(var(--match-stage-width,100dvw) - 32px),calc(var(--board-space)*2.35))!important;min-width:0!important}
body.match-fullscreen #game-app.play-experience .puluc-table .board{width:100%!important;max-height:none!important}
body.match-fullscreen #game-app.play-experience :is(.carrom-station,.action-station){--action-square:min(calc(var(--match-stage-width,100dvw) - var(--frame-size,20px)*2 - 28px),calc(100dvh - var(--action-dock-height,160px) - var(--frame-size,20px)*2 - 92px))}
body.match-fullscreen #game-app.play-experience :is(.carrom-station,.action-station) .board-frame:not(.salons3d-visible){width:calc(var(--action-square) + var(--frame-size,20px)*2)!important;height:max-content!important;flex:0 0 auto!important}
body.match-fullscreen #game-app.play-experience :is(.carrom-station,.action-station) .board-frame:not(.salons3d-visible) .board:not(.ludo){width:var(--action-square)!important;height:var(--action-square)!important;max-height:none!important}
body.match-fullscreen #game-app.play-experience :is(.carrom-dock,.action-dock){width:calc(var(--action-square) + var(--frame-size,20px)*2);flex:0 0 auto;background:var(--theme-control-panel,#17313a);color:#fff5df}
body.match-fullscreen #game-app.play-experience .match-action-rail{position:relative!important;transform:none!important;width:100%!important;max-height:none!important;border-radius:10px;background:var(--theme-control-panel,#17313a);color:#fff5df;padding:12px}
body.match-fullscreen #game-app.play-experience :is(#hand,#special-actions).match-action-rail{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;width:100%!important;max-height:none!important;margin:0;box-shadow:none}
body.match-fullscreen #game-app.play-experience :is(#hand,#special-actions).match-action-rail:empty{display:none}
body.match-fullscreen #game-app.play-experience .match-action-rail .carrom-shot-row{flex-direction:column;align-items:stretch;gap:8px}
body.match-fullscreen #game-app.play-experience .match-action-rail .carrom-fine-controls{grid-template-columns:1fr}
body.match-fullscreen #game-app.play-experience .match-action-rail .carrom-shot-row>label{width:100%}
body.match-fullscreen #game-app.play-experience :is(.carrom-dock,.action-dock) button{min-height:44px;color:#fff9e9!important;text-shadow:0 1px 2px #000;border:0!important;border-image-source:var(--match-button-art)!important;border-image-slice:0 20% 0 20% fill!important;border-image-width:0 20px!important;background:none!important;border-radius:0}
body.match-fullscreen #game-app.play-experience :is(.carrom-dock,.action-dock) :is(#hand,#special-actions,.move-confirm){position:relative!important;left:auto!important;bottom:auto!important;transform:none!important;width:100%;max-width:none;max-height:none;box-shadow:none}
body.match-fullscreen #game-app.play-experience :is(.carrom-station,.action-station) #salons3d-host{height:100%!important}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"].match-action-in-rail :is(.carrom-station,.action-station){padding:0!important}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"].match-action-in-rail .board-frame.salons3d-visible{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;padding:0!important}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"]:not(.match-action-in-rail) :is(.carrom-station,.action-station){padding:0 8px 68px!important;justify-content:flex-end!important;gap:8px}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"]:not(.match-action-in-rail) :is(.carrom-station,.action-station) .board-frame.salons3d-visible{position:relative!important;inset:auto!important;flex:1 1 0!important;width:100%!important;height:0!important;min-height:0!important;padding:0!important}
body.match-fullscreen #game-app.play-experience[data-editorial-view="3d"]:not(.match-action-in-rail) :is(.carrom-dock,.action-dock){flex:0 0 auto;transform:none!important;width:100%!important;max-height:25dvh;background:var(--theme-control-panel,#17313a);color:#fff5df;border-radius:10px}
@media(max-width:819px){
 body.match-fullscreen #game-app.play-experience{--board-top:62px}
 body.match-fullscreen #game-app.play-experience .race-board-area .dice-station{bottom:72px;grid-template-columns:86px minmax(0,1fr)}
 body.match-fullscreen #game-app.play-experience .race-board-area .board-frame.salons3d-visible{height:calc(100% - var(--board-dock) - 72px)}
 body.match-fullscreen #game-app.play-experience .race-board-area{padding-bottom:calc(var(--board-dock) + 72px)}
 body.match-fullscreen #game-app.play-experience[data-game=puluc] .puluc-table{aspect-ratio:1/1.45!important;width:min(calc(100dvw - 32px),calc(var(--board-space)/1.45))!important;grid-template-columns:1fr!important;grid-template-rows:13% minmax(0,1fr) 13%!important;min-height:0!important}
 body.match-fullscreen #game-app.play-experience[data-game=puluc] .puluc-table .board{height:100%!important;aspect-ratio:auto!important;grid-template-columns:1fr!important;grid-template-rows:repeat(11,1fr)!important}
 body.match-fullscreen #game-app.play-experience[data-game=puluc] .puluc-table .square{aspect-ratio:auto!important}
 body.match-fullscreen #game-app.play-experience[data-game=puluc] .puluc-reserve{flex-direction:row;min-height:44px;gap:6px;justify-content:space-around;padding:4px}
 body.match-fullscreen #game-app.play-experience[data-game=puluc] .puluc-reserve-row{flex-direction:row;gap:2px}
 body.match-fullscreen #game-app.play-experience[data-game=puluc] .puluc-reserve-piece{width:26px;height:26px}
 body.match-fullscreen #game-app.play-experience[data-game=puluc] .puluc-direction{display:inline-block;transform:rotate(90deg)}
}
/* The playing support itself follows Patolli's cross; a 3D iframe remains rectangular. */
.board-frame.contour-board:not(.salons3d-visible){background:var(--skin-light,#d7bd8c) var(--board-art) center/cover!important;border-radius:0!important}
.board-frame.patolli-cross:not(.salons3d-visible){clip-path:polygon(33% 0,67% 0,67% 33%,100% 33%,100% 67%,67% 67%,67% 100%,33% 100%,33% 67%,0 67%,0 33%,33% 33%);background:var(--skin-light,#d7bd8c) var(--board-art) center/cover!important;border-radius:0!important}
.board-frame.contour-board:not(.salons3d-visible)::before,.board-frame.contour-board:not(.salons3d-visible)::after{display:none!important}
.board-frame.push-contour:not(.salons3d-visible){clip-path:polygon(20% 0,80% 0,100% 50%,80% 100%,20% 100%,0 50%)}
.board-frame.hex-contour:not(.salons3d-visible){clip-path:polygon(0 0,72% 0,100% 82%,100% 100%,28% 100%,0 18%)}
body:not(.match-fullscreen) .board-frame.hex-contour:not(.salons3d-visible){width:min(100%,calc(850px + var(--frame-size,20px)*2));margin-inline:auto}
.board-contour-line{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5}
.board-contour-line path{fill:none;stroke-width:18;stroke-linejoin:round}
.board-frame.salons3d-visible .board-contour-line{display:none}
.chess-page [data-game=patolli] .chess-hero-board-preview,.chess-page[data-game=patolli] .chess-hero-board-preview{clip-path:polygon(33% 0,67% 0,67% 33%,100% 33%,100% 67%,67% 67%,67% 100%,33% 100%,33% 67%,0 67%,0 33%,33% 33%)}
.chess-page article[data-editorial-view="2d"]:is([data-game=patolli],[data-game=push],[data-game=hex]) .chess-hero-board-preview{height:auto;max-height:calc(100% - 54px);object-fit:fill}
.chess-page [data-game=push] .chess-hero-board-preview{clip-path:polygon(20% 0,80% 0,100% 50%,80% 100%,20% 100%,0 50%)}
.chess-page [data-game=hex] .chess-hero-board-preview{clip-path:polygon(0 0,72% 0,100% 82%,100% 100%,28% 100%,0 18%)}
@media(max-width:780px){.chess-page article[data-editorial-view="2d"]:is([data-game=patolli],[data-game=push],[data-game=hex]) .chess-hero-board-preview{max-height:59%}}
