:root {
    --bg: #091b17; --red: #e85d65; --green: #36b58b; --yellow: #efbe4f; --blue: #508eeb;
    --ink: #f5f3e9; --muted: #a3bbb0; --line: #29453b; --panel: #10271f;
    color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(ellipse at 50% 0, #214938 0, var(--bg) 65%); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; padding: 28px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
button, input { font: inherit; }
button, a, .token { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #f4d77f; outline-offset: 4px; }
button { transition: background .18s, box-shadow .18s; }
button:active:not(:disabled) { transform: translateY(1px); }
.full-width { width: 100%; }
.ludo-dashboard { width: min(1180px, 100%); margin: 0 auto; grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr) minmax(0, .85fr); gap: 22px; align-items: start; }
.dash-col { min-width: 0; padding: 24px; background: linear-gradient(160deg, #142e25, #0d211a); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 40px #0002; }
.play-col { padding: 28px; border-color: #53704e; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 12px; margin-bottom: 14px; }
.back-link:hover { color: var(--ink); }
.game-links { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.dash-header { margin: 0 0 18px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.8px; }
.dash-player-name { font-size: 25px; font-weight: 750; overflow-wrap: anywhere; }
.rank-badge { display: inline-block; margin-top: 8px; color: #cfdbc9; font-size: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px; }
.dash-btn, .secondary-btn, .text-btn, .leave-btn, .close-modal { min-height: 44px; padding: 10px 16px; border: 1px solid #3b5c4c; background: #1c3c2f; color: var(--ink); border-radius: 11px; font-size: 13px; font-weight: 650; }
.dash-btn:hover, .secondary-btn:hover, .text-btn:hover { background: #2a513f; }
.profile-card .dash-btn { margin-top: 18px; }
.loadout-section { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: 13px; line-height: 1.7; color: #c5d4cb; }
.section-title { margin: 0; font-size: 13px; color: var(--ink); }
.muted-copy, .ranked-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.game-title { margin: 0; font-size: clamp(42px, 5vw, 64px); line-height: 1.1; font-weight: 900; letter-spacing: 5px; text-align: center; color: #f0cf76; }
.game-title::before { content: 'WAEN GAMES'; display: block; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 3px; margin-bottom: 12px; }
.dash-subtitle { margin: 12px 0 22px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--muted); }
.guest-banner { border: 1px solid var(--line); background: #ffffff04; border-radius: 12px; padding: 12px 14px; color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 20px; }
.guest-banner strong { color: #dbe4da; font-weight: 600; }
.guest-banner .dash-btn { width: auto; min-height: 32px; padding: 4px 0; border: 0; background: none; color: #efcf7f; margin-left: 6px; text-decoration: underline; text-underline-offset: 3px; }
.public-box, .private-box { min-width: 0; }
.private-box { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.input-label, .box-title { display: block; margin: 0 0 9px; font-size: 12px; font-weight: 650; color: #d4e0d6; }
input { width: 100%; min-width: 0; height: 48px; background: #081b14; border: 1px solid #385545; color: var(--ink); border-radius: 10px; padding: 0 14px; font-size: 16px; }
input::placeholder { color: #89a294; }
#playerNameInput { margin-bottom: 12px; }
.dice-btn { min-height: 50px; background: linear-gradient(#f4d780, #e3ba54); border: 1px solid #efcf7c; color: #243026; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 800; box-shadow: 0 4px 0 #92732c, 0 8px 18px #0002; }
.dice-btn:hover:not(:disabled) { background: #ffe4a0; }
.dice-btn:disabled { background: #30483b; color: #9bb0a2; border-color: #456151; box-shadow: none; }
.lobby-actions .dice-btn { width: 100%; }
.ranked-note { margin: 12px 0 0; text-align: center; font-size: 11px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #8fa899; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.join-code-row { display: grid; grid-template-columns: minmax(0,1fr) 64px; gap: 8px; }
.join-code-row .secondary-btn { padding: 8px; }
.public-rooms-section { margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.text-btn { font-size: 12px; padding: 8px 10px; }
.public-rooms { max-height: 270px; overflow: auto; }
.public-room { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.public-room > div { min-width: 0; }
.public-room-name, .lb-name { overflow-wrap: anywhere; font-weight: 650; font-size: 13px; }
.public-room-meta, .empty-rooms, .waiting-hint, .loading-text { color: var(--muted); font-size: 12px; line-height: 1.6; }
.public-room .secondary-btn { flex-shrink: 0; }
.lb-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.lb-rank { color: var(--muted); }.rank-1, .lb-mmr { color: #f0cf76; }
.room-waiting { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.waiting-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); }
.room-code { font-size: 24px; font-weight: 800; letter-spacing: 2px; border: 1px dashed #b2924c; background: #d3b4570a; padding: 14px; border-radius: 12px; color: #f0cf76; overflow-wrap: anywhere; }
.room-details, .room-players { font-size: 13px; overflow-wrap: anywhere; line-height: 1.6; }
.room-players { color: var(--muted); }
.seat-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 10px 0; font-size: 12px; overflow-wrap: anywhere; }
.seat-row .text-btn { flex-shrink: 0; }
.room-waiting > button { width: 100%; margin-top: 12px; }
.leave-btn { background: transparent; color: #d8b7ae; border-color: #665047; }
/* The play surface: all dimensions include borders and padding. */
.game-shell { display: none; max-width: 1000px; margin: 0 auto; }
body.in-game .game-shell { display: grid; grid-template-columns: minmax(0, 640px) minmax(250px, 1fr); gap: 20px; align-items: center; }
.game-toolbar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.game-brand { color: #f0cf76; font-size: 20px; font-weight: 900; letter-spacing: 3px; }
.game-toolbar span:last-child { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.board-wrapper { min-width: 0; width: 100%; padding: 12px; border: 1px solid #45614e; border-radius: 22px; background: linear-gradient(145deg, #274736, #122b21); box-shadow: 0 20px 50px #0004; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; }
.player-name { min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; color: #d4dfd2; }
.player-name::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--seat); flex-shrink: 0; box-shadow: 0 0 0 3px #ffffff09; }
.name-red { grid-area: 1/1; --seat: var(--red); }.name-green { grid-area: 1/2; --seat: var(--green); }.name-blue { grid-area: 3/1; --seat: var(--blue); }.name-yellow { grid-area: 3/2; --seat: var(--yellow); }
.player-name.is-current { background: #ffffff0d; border-color: var(--seat); color: #fff; }
.ludo-board { grid-area: 2/1/3/3; width: 100%; aspect-ratio: 1; min-width: 0; display: grid; grid-template-columns: repeat(15,minmax(0,1fr)); grid-template-rows: repeat(15,minmax(0,1fr)); border: 5px solid #ede9d8; border-radius: 13px; background: #faf7ee; overflow: hidden; box-shadow: 0 5px 0 #091b17, 0 7px 18px #0004; container-type: inline-size; }
.cell { min-width: 0; min-height: 0; position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; background: #faf7ee; border: .5px solid #d2d5c8; }
.base { display: flex; align-items: center; justify-content: center; padding: 14%; min-width: 0; min-height: 0; background: linear-gradient(145deg, #ffffff18, #0000000b), var(--seat); }
.base.red { grid-area: 1/1/7/7; --seat: var(--red); }.base.green { grid-area: 1/10/7/16; --seat: var(--green); }.base.blue { grid-area: 10/1/16/7; --seat: var(--blue); }.base.yellow { grid-area: 10/10/16/16; --seat: var(--yellow); }
.base-inner { width: 100%; height: 100%; min-width: 0; min-height: 0; border-radius: 18%; background: #fff9ec; padding: 14%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 16%; border: 1px solid #fff9; box-shadow: 0 3px 0 #0002; }
.token-spot { min-width: 0; min-height: 0; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--seat) 18%, #fff9ec); border: 1px solid color-mix(in srgb, var(--seat) 55%, #fff); box-shadow: inset 0 2px 3px #0001; }
.cell.homestretch.red { background: #f5b4b6; }.cell.homestretch.green { background: #96d9bd; }.cell.homestretch.blue { background: #adc9f3; }.cell.homestretch.yellow { background: #f8dfa0; }
.start-arrow.red { background: var(--red) !important; }.start-arrow.green { background: var(--green) !important; }.start-arrow.blue { background: var(--blue) !important; }.start-arrow.yellow { background: var(--yellow) !important; }
.start-arrow::after, .safe-star::before { position: absolute; font-size: clamp(11px, 3.5cqi, 23px); color: #35483e; pointer-events: none; }
.start-arrow.red::after { content: '→'; }.start-arrow.green::after { content: '↓'; }.start-arrow.blue::after { content: '↑'; }.start-arrow.yellow::after { content: '←'; }
.safe-star { background: #e6ebe0; }.safe-star::before { content: '☆'; font-weight: 900; color: #647566; }
.center-home { grid-area: 7/7/10/10; position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 1px; min-width: 0; min-height: 0; overflow: hidden; background: conic-gradient(from 45deg, var(--yellow) 0deg 90deg, var(--blue) 90deg 180deg, var(--red) 180deg 270deg, var(--green) 270deg 360deg); }
.center-home::before, .center-home::after { content: ''; position: absolute; width: 145%; height: 2px; background: #fff7; top: 50%; left: 50%; pointer-events: none; }
.center-home::before { transform: translate(-50%,-50%) rotate(45deg); }.center-home::after { transform: translate(-50%,-50%) rotate(-45deg); }
.token { --piece: #777; display: flex; flex-shrink: 0; justify-content: center; align-items: center; position: relative; z-index: 2; width: 78%; aspect-ratio: 1; min-width: 0; min-height: 0; padding: 0; border-radius: 50%; border: 1.5px solid #fff; background: radial-gradient(circle at 32% 25%, #ffffff65, transparent 60%), var(--piece); color: #fff; font-size: clamp(8px, 2.3cqi, 14px); font-weight: 850; line-height: 1; text-shadow: 0 1px 2px #0006; box-shadow: inset 0 -2px 0 #0003, 0 2px 2px #0004; }
.token.red { --piece: #cc3543; }.token.green { --piece: #17815f; }.token.blue { --piece: #2867c7; }.token.yellow { --piece: #cd951b; color: #30291b; text-shadow: none; }
.token-spot .token { width: 86%; font-size: clamp(10px, 2.9cqi, 18px); }
.cell:has(> .token:nth-child(2)) .token { width: 46%; font-size: clamp(6px, 1.7cqi, 10px); border-width: 1px; }
.token.playable { z-index: 3; cursor: pointer; outline: 2px solid #fff; outline-offset: 2px; animation: playablePulse 1.2s ease-in-out infinite alternate; }
.cell:has(.playable) { background: #f9e6a0; cursor: pointer; }
.token.finished-token { width: 21%; font-size: clamp(5px, 1.5cqi, 9px); border-width: 1px; }
@keyframes playablePulse { to { box-shadow: 0 0 0 4px #f4d78088, 0 2px 2px #0004; } }
/* Compact controls stay immediately below the board on phones. */
.controls { min-width: 0; width: 100%; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #10271f; }
.turn-indicator { font-weight: 750; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.turn-red { color: #ff9298; }.turn-green { color: #6cddae; }.turn-blue { color: #8db9ff; }.turn-yellow { color: #f2d075; }
.game-status { color: var(--muted); font-size: 13px; line-height: 1.45; min-height: 19px; overflow-wrap: anywhere; }
.dice-row { display: flex; justify-content: center; align-items: center; width: 100%; }
.dice-display { flex-shrink: 0; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: 1px solid #fff; border-radius: 13px; background: #faf5e6; color: #23392d; font-size: 30px; font-weight: 850; box-shadow: 0 3px 0 #c4bea9; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.dice-display:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 6px 0 #b9b099, 0 12px 20px #0004; }
.dice-display:not(:disabled):active { transform: translateY(2px); box-shadow: 0 2px 0 #b9b099, 0 5px 10px #0003; }
.dice-display:disabled { cursor: not-allowed; opacity: .72; }
.score-board { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 11px; color: #c3d1c6; order: 4; }
.score-item { display: flex; gap: 6px; align-items: center; min-width: 0; }.score-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.controls > .leave-btn { order: 5; font-size: 12px; border: 0; color: #b8b4a3; min-height: 36px; padding: 6px 10px; }
.modal, .win-modal { position: fixed; inset: 0; padding: 20px; z-index: 100; background: #06120de8; align-items: center; justify-content: center; overflow: auto; }
.modal-box, .win-box { width: min(460px,100%); min-width: 0; max-height: calc(100dvh - 40px); overflow: auto; border: 1px solid #a88f50; border-radius: 22px; background: #142d23; padding: 28px; text-align: center; box-shadow: 0 20px 80px #0007; }
.modal-box h2, .modal-title, .win-box h2 { margin: 18px 0 24px; font-size: clamp(24px,6vw,38px); font-weight:800; overflow-wrap: anywhere; }
.close-modal { float: right; }
@media (max-width: 1000px) {
    .ludo-dashboard { grid-template-columns: minmax(0,.85fr) minmax(0,1.4fr); gap: 16px; }.rank-col { grid-column: 1/-1; }
    body.in-game .game-shell { grid-template-columns: minmax(0,1fr) 250px; gap: 16px; }.controls { padding: 18px; }
}
@media (max-width: 720px) {
    body { padding: max(14px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
    .ludo-dashboard { max-width: 480px; grid-template-columns: minmax(0,1fr); gap: 14px; }
    .play-col { grid-row: 1; padding: 22px 18px; }.profile-col { grid-row: 2; }.rank-col { grid-row: 3; grid-column: auto; }
    .dash-col { border-radius: 18px; padding: 20px 18px; }.game-title { font-size: 44px; }.dash-subtitle { margin-bottom: 16px; font-size: 13px; }
    .guest-banner { margin-bottom: 16px; padding: 10px 12px; }.back-link { margin-bottom: 10px; }.loadout-section { margin-top: 18px; }
    body.in-game .game-shell { max-width: 540px; grid-template-columns: minmax(0,1fr); gap: 12px; }
    .game-toolbar { padding: 0 4px 2px; }.game-brand { font-size: 18px; }
    .board-wrapper { padding: 6px; gap: 6px 12px; border-radius: 17px; }.player-name { font-size: 11px; padding: 7px 6px; }
    .ludo-board { border-width: 3px; border-radius: 9px; }
    .controls { padding: 14px 16px 8px; border-radius: 16px; gap: 8px; }.turn-indicator { font-size: 17px; }.game-status { font-size: 12px; }
    .dice-display { width: 48px; height: 48px; }
    .score-board { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 10px; }.controls > .leave-btn { min-height: 36px; }
}
@media (max-width: 360px) { body { padding-left: 8px; padding-right: 8px; }.dash-col { padding: 18px 14px; }.controls { padding-left: 12px; padding-right: 12px; }.game-toolbar span:last-child { font-size: 9px; } }
@media (max-height: 540px) and (min-width: 600px) and (orientation: landscape) {
    body.in-game .game-shell { max-width: 940px; align-items: start; }
    body.in-game .game-shell { grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); }
    .board-wrapper { max-width: calc(100dvh - 92px); justify-self: center; }.controls { max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
/* Polished playing surface; pieces are the only move controls. */
.board-wrapper { background: linear-gradient(145deg, #34553e, #102a20); border-color: #728668; box-shadow: inset 0 1px 0 #c4d9b630, 0 18px 45px #0005; }
.ludo-board { border-color: #efe6cd; box-shadow: 0 5px 0 #9b9075, 0 7px 0 #142519, 0 12px 22px #0005; }
.base { background: radial-gradient(circle at 20% 15%, #ffffff30, transparent 65%), repeating-linear-gradient(135deg, #ffffff06 0 1px, transparent 1px 7px), var(--seat); }
.base.red { --seat: #e85c68; }.base.green { --seat: #2bae89; }.base.blue { --seat: #4d88e0; }.base.yellow { --seat: #f0c35c; }
.base-inner { background: linear-gradient(145deg,#fffdf6,#eee9d8); border: 2px solid #fffc; box-shadow: 0 4px 0 #0002, 0 7px 12px #0002, inset 0 1px 0 #fff; }
.token-spot { border-width: 2px; box-shadow: inset 0 2px 4px #0002, 0 1px 0 #fff; }
.cell { background: linear-gradient(145deg, #fffdf7, #f0eee4); border-color: #c9cdbf; }
.token { background: radial-gradient(circle at 30% 24%, #ffffff8a, transparent 48%), linear-gradient(145deg, #ffffff12, #0002), var(--piece); border: 1.5px solid #fffe; box-shadow: inset 0 -3px 0 #0003, inset 0 2px 1px #fff5, 0 3px 3px #0005; }
.token::after { content: ''; position: absolute; width: 34%; height: 20%; border-radius: 50%; top: 13%; left: 18%; transform: rotate(-35deg); background: #ffffff70; pointer-events: none; }
.token.playable { outline-color: #fffbe3; animation: playablePulse 1.3s ease-in-out infinite alternate; }
.token-spot:has(.playable) { background: #fff4bf; cursor: pointer; }
.player-name.is-current { box-shadow: inset 0 0 16px #ffffff08, 0 0 10px #0001; }
.center-home { box-shadow: inset 0 0 12px #0002; }
@media (prefers-reduced-motion: reduce) { .token.playable { animation: none; box-shadow: 0 0 0 3px #edca64; } }

/* Full-size pieces and finishing places. */
.token { width: 94%; }
.base { padding: 10%; }
.base-inner { padding: 10%; gap: 12%; }
.token-spot .token { width: 96%; }
.player-label.has-crown { border-color: #e9c366; background: #4c4020; color: #fff0b4; }
#finishStandings { text-align: left; padding-left: 24px; margin: 20px 0; }
#finishStandings li { padding: 10px 12px; margin: 8px 0; background: #ffffff0c; border-radius: 8px; }
.moving-piece { animation: none !important; }

/* Readable countdown and a full-size die with crisp pips. */
.dice-display { width: 82px; height: 82px; padding: 14px; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 5px; border-radius: 18px; box-shadow: 0 5px 0 #b9b099, 0 10px 18px #0003; }
.dice-pip { border-radius: 50%; background: #23392d; visibility: hidden; }
.dice-pip.is-visible { visibility: visible; }
.turn-timer { --time-left:100%; width:100%; padding:8px 0 11px; font-size:13px; font-weight:750; color:#e8d796; position:relative; }
.turn-timer::after { content:''; position:absolute; bottom:0; left:0; height:3px; width:var(--time-left); max-width:100%; background:currentColor; border-radius:3px; transition:width .25s linear; }
.turn-timer.is-urgent { color:#ff9191; }
@media(max-width:360px) { .dice-display { width:74px; height:74px; padding:12px; gap:4px; } }
@media(prefers-reduced-motion:reduce) { .turn-timer::after { transition:none; } }
.dice-display { align-items: stretch; }
.dice-pip { aspect-ratio: 1; }

/* A six makes available home pieces unmistakable. */
.token-spot:has(.can-enter) { background: #ffe99c; border-color: #fff2aa; box-shadow: 0 0 0 3px #ffe48766, 0 0 16px #ffcf57; }
.token.can-enter { outline: 3px solid #fff2ac; outline-offset: 3px; animation: homeEntryGlow 1s ease-in-out infinite alternate; }
@keyframes homeEntryGlow { from { box-shadow: 0 0 7px 3px #ffd65b, inset 0 -3px 0 #0003; } to { box-shadow: 0 0 18px 6px #fff09ccc, inset 0 -3px 0 #0003; } }
@media(prefers-reduced-motion:reduce) { .token.can-enter { animation:none; box-shadow:0 0 12px 4px #ffd65b; } }

/* Each finished piece has a stable place in its own center triangle. */
.finished-slot { position:absolute; width:16%; aspect-ratio:1; transform:translate(-50%,-50%); z-index:2; display:flex; align-items:center; justify-content:center; }
.finished-slot .token.finished-token { width:100%; height:100%; margin:0; outline:none; animation:none; border:1px solid #fff; box-shadow:0 1px 2px #0006, inset 0 -1px 0 #0003; }

/* Personal perspective; server coordinates and hit targets stay unchanged. */
.ludo-board { rotate: var(--board-angle, 0deg); }
.ludo-board .token { rotate: var(--piece-angle, 0deg); }

/* Ivory playing tiles, jewel-coloured bases and engraved safe squares. */
.board-wrapper { border-color:#9f946c; background:radial-gradient(ellipse at 20% 0%,#46624a,#173526 65%); box-shadow:inset 0 1px 0 #fff3,0 22px 55px #0005; }
.ludo-board { border-color:#f5ecd5; outline:1px solid #bdac79; outline-offset:2px; }
.base { box-shadow:inset 0 0 0 1px #ffffff38,inset 0 0 28px #00000012; background:radial-gradient(ellipse at 30% 20%,#ffffff38,transparent 70%),var(--seat); }
.base-inner { border-radius:24%; background:linear-gradient(145deg,#fffef9,#ede7d5); box-shadow:0 3px 0 #0002,0 8px 14px #0002,inset 0 0 0 4px #fff7,inset 0 0 0 5px #c6b98766; }
.cell { border-color:#d3d0c1; box-shadow:inset 0 1px 0 #fff9; background:linear-gradient(145deg,#fffef8,#f1ede2); }
.cell.safe-star { background:radial-gradient(circle,#fffaf0 40%,#d8c79a 43%,#e5d9b6 48%,#f7f2e5 51%); color:#7d6d3c; }
.cell.homestretch { box-shadow:inset 0 0 0 1px #ffffff40; }
.center-home { box-shadow:inset 0 0 18px #0002; outline:1px solid #fff9; z-index:1; }
.player-name.is-current { background:linear-gradient(110deg,#fff2,#ffffff06); border-color:var(--seat); box-shadow:inset 3px 0 0 var(--seat); }
.token:focus-visible, .dice-display:focus-visible { outline:3px solid #fff1a8; outline-offset:3px; }

/* Home lanes use the same colour palette as their bases. */
.cell.homestretch.red { background:#e85c68; }
.cell.homestretch.green { background:#2bae89; }
.cell.homestretch.yellow { background:#f0c35c; }
.cell.homestretch.blue { background:#4d88e0; }
