.ludo-game {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 22%,#fff8e9,#f2e5d0 66%,#e6d6bc);
  color: #2d261d;
}
.ludo-game main { max-width: 760px; }
.ludo-game nav a { color:#674328; }
.ludo-game h1 { margin-top: clamp(18px,5vh,44px); font-size:clamp(2rem,7vw,3rem); }
.ludo-game main>p:not(#status) { max-width:70ch; color:#574b3d; }
.ludo-game .controls { gap:9px; }
.ludo-game label { display:grid; gap:3px; font-size:.9rem; font-weight:650; color:#564937; }
.ludo-game button,.ludo-game select { color:#2d261d; background:#fffaf1; border-color:#9f896a; border-radius:10px; }
.ludo-game :focus-visible { outline-color:#1976d2; }
.ludo-game #status { min-height:1.7em; width:fit-content; padding:4px 10px; border-radius:999px; background:#fffaf1; border:1px solid #cdbd9f; }
.ludo-game #status[data-turn="red"] { color:#9f2432; border-color:#e5a19c; background:#fff1ee; }
.ludo-game #status[data-turn="blue"] { color:#175ba9; border-color:#90c3e5; background:#eff8ff; }
.ludo-game #status[data-turn="green"] { color:#18713c; border-color:#9ad4aa; background:#effaf1; }
.ludo-game #status[data-turn="yellow"] { color:#80560b; border-color:#e6cb7d; background:#fff8df; }
.ludo-game .seat-options { display:flex; align-items:center; flex-wrap:wrap; gap:9px 16px; margin-top:10px; padding:10px 12px; border:1px solid #dbc7a7; border-radius:12px; background:#fff8ec; }
.ludo-game .seat-options label { display:flex; align-items:center; gap:7px; }
.ludo-game .die-face { width:48px; height:48px; display:grid; place-items:center; margin:8px auto; border:1px solid #d8c299; border-radius:13px; background:linear-gradient(145deg,#fffef9,#eee2cc); color:#26324a; font-size:2rem; box-shadow:0 5px 12px #69553a26,inset 0 1px #fff; }
.ludo-game .die-face.rolling { animation:dice-roll .38s cubic-bezier(.25,.7,.25,1); }
.ludo-game .board.ludo {
  box-sizing:border-box;
  width:min(100%,560px);
  margin:10px auto 16px;
  padding:clamp(5px,1.6vw,10px);
  gap:1px;
  aspect-ratio:1;
  border:1px solid #d4c19f;
  border-radius:18px;
  background:#d2c1a4;
  box-shadow:0 16px 32px #684d2b29,inset 0 1px #fff9;
}
.ludo-game .board.ludo div { position:relative; min-width:0; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; overflow:hidden; border:1px solid #ded3be; background:#fffaf1; }
.ludo-game .board.ludo .track { background:linear-gradient(145deg,#fffdf8,#f5ead8); }
.ludo-game .board.ludo .safe { background:linear-gradient(145deg,#ffec9b,#f5cb54); }
.ludo-game .board.ludo .safe::before { content:"★"; position:absolute; color:#a26d08; font-size:clamp(7px,1.5vw,13px); opacity:.78; }
.ludo-game .board.ludo .yard { border-radius:4px; }
.ludo-game .board.ludo .yard.red,.ludo-game .board.ludo .red.lane { background:linear-gradient(145deg,#fa8c7e,#d93645); }
.ludo-game .board.ludo .yard.blue,.ludo-game .board.ludo .blue.lane { background:linear-gradient(145deg,#83d3ff,#3082dc); }
.ludo-game .board.ludo .yard.green,.ludo-game .board.ludo .green.lane { background:linear-gradient(145deg,#91e9a7,#22a760); }
.ludo-game .board.ludo .yard.yellow,.ludo-game .board.ludo .yellow.lane { background:linear-gradient(145deg,#ffe58b,#e9aa21); }
.ludo-game .board.ludo .yard::after { content:""; position:absolute; inset:18%; border-radius:50%; background:#fffdf6b8; box-shadow:inset 0 2px 5px #583f2330; }
.ludo-game .board.ludo .lane { border-color:#fff9!important; }
.ludo-game .board.ludo .lane:not(.red):not(.blue):not(.green):not(.yellow) { background:#fffdf7; }
.ludo-game .board.ludo .home-center { background:conic-gradient(from -45deg,#e9404b 0 25%,#3082dc 0 50%,#e9aa21 0 75%,#22a760 0); border:2px solid #fffaf1; }
.ludo-game .board.ludo span { position:relative; z-index:1; width:48%; aspect-ratio:1; display:grid; place-items:center; border:1px solid #ffffffb5; border-radius:50%; color:#fff; font-size:clamp(7px,1.7vw,13px); font-weight:800; line-height:1; text-shadow:0 1px 2px #0007; box-shadow:0 2px 5px #39271966,inset 0 2px 3px #ffffff9c,inset 0 -3px 4px #0003; }
.ludo-game .board.ludo span.red { background:radial-gradient(circle at 32% 25%,#ffb2a5,#ed4751 48%,#a91e35); }
.ludo-game .board.ludo span.blue { background:radial-gradient(circle at 32% 25%,#d0f2ff,#48a6f0 48%,#1b59b5); }
.ludo-game .board.ludo span.green { background:radial-gradient(circle at 32% 25%,#c8ffd0,#43d178 48%,#168045); }
.ludo-game .board.ludo span.yellow { background:radial-gradient(circle at 32% 25%,#fff9be,#ffd341 48%,#b9780d); }
.ludo-game .board.ludo span.moving { animation:token-travel .24s cubic-bezier(.18,.72,.24,1) both; }
.ludo-game #actions { justify-content:center; gap:7px; }
.ludo-game #actions button { min-width:48px; min-height:44px; }
.ludo-game #actions .roll-button { min-width:100px; font-weight:750; color:#fff; border-color:#c58a12; background:linear-gradient(135deg,#f2c64b,#d99217); text-shadow:0 1px #81570e; box-shadow:0 3px 7px #7950103a,inset 0 1px #fff8; }
.ludo-game #actions .roll-button:disabled { color:#796a54; background:#e5dbc9; border-color:#cfc1aa; text-shadow:none; box-shadow:none; }
.ludo-game .rules { max-width:560px; margin:18px auto; border-top:1px solid #d2c0a2; padding-top:10px; color:#514637; }
.ludo-game .rules summary { min-height:44px; cursor:pointer; font-weight:700; }
@keyframes dice-roll { 25% { transform:rotate(15deg) translateY(-4px) scale(1.05); } 55% { transform:rotate(-18deg) translateY(2px); } to { transform:rotate(0) translateY(0); } }
@keyframes token-travel { from { transform:translate(var(--dx),var(--dy)) scale(.9); } to { transform:translate(0,0) scale(1); } }
@media(max-width:480px) { .ludo-game .board.ludo { border-radius:12px; } .ludo-game .board.ludo span { width:46%; font-size:clamp(6px,1.9vw,9px); } .ludo-game .seat-options { align-items:flex-start; } }
@media(prefers-reduced-motion:reduce) { .ludo-game *, .ludo-game *::before, .ludo-game *::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; } }


/* Ludu Mahir — vivid, touch-first arcade treatment */
.ludo-game {
  background:
    radial-gradient(circle at 12% 15%,#ffcf6055 0,transparent 30%),
    radial-gradient(circle at 90% 72%,#42dcff35 0,transparent 35%),
    linear-gradient(145deg,#14254c 0%,#23164e 53%,#0c1737 100%);
  color:#fff8e9;
}
.ludo-game main { max-width:850px; }
.ludo-game nav a,.ludo-game nav span { color:#f7dfae; }
.ludo-game h1 {
  text-align:center; text-transform:uppercase; letter-spacing:.1em;
  font-family:system-ui,sans-serif; font-weight:1000;
  color:#fff1a3; text-shadow:0 3px #a64c26,0 7px 0 #622858,0 12px 20px #0009;
}
.ludo-game main>p:not(#status),.ludo-game label { color:#f5e7d2; }
.ludo-game .controls { justify-content:center; }
.ludo-game select,.ludo-game button {
  background:linear-gradient(160deg,#fffdf1,#ffe8bd);color:#2c2243;
  border:2px solid #fff6d3;box-shadow:0 4px 0 #0004;
  font-family:system-ui,sans-serif;font-weight:700;
}
.ludo-game #status {
  margin:12px auto; padding:9px 20px;
  border:2px solid #ffffff8c;box-shadow:0 6px 20px #0005;
  font-family:system-ui,sans-serif;font-weight:800;text-align:center;
}
.ludo-game .board.ludo {
  width:min(100%,620px);padding:clamp(7px,1.8vw,13px);
  border:clamp(5px,1.4vw,10px) solid #f6ce69;
  border-radius:clamp(13px,3vw,27px);
  background:linear-gradient(135deg,#ffecab,#b67d2e 40%,#f7dc88 65%,#a96e28);
  box-shadow:0 8px 0 #73431e,0 16px 0 #3b2750,0 26px 40px #0009,inset 0 3px 2px #fff9;
  overflow:hidden;isolation:isolate;
}
.ludo-game .board.ludo div {
  border:1px solid #b5a8a4;background:#fffdf6;
  box-shadow:inset 0 1px 2px #0001;
}
.ludo-game .board.ludo .track {background:linear-gradient(150deg,#ffffff,#e9f1f7);}
.ludo-game .board.ludo .safe {background:linear-gradient(145deg,#fff8c8,#ffc845);}
.ludo-game .board.ludo .yard.red,.ludo-game .board.ludo .red.lane {background:linear-gradient(145deg,#ff8889,#ef284b 68%,#b80935);}
.ludo-game .board.ludo .yard.blue,.ludo-game .board.ludo .blue.lane {background:linear-gradient(145deg,#8edbff,#247df6 68%,#1545bb);}
.ludo-game .board.ludo .yard.green,.ludo-game .board.ludo .green.lane {background:linear-gradient(145deg,#9affb4,#18c977 68%,#06824e);}
.ludo-game .board.ludo .yard.yellow,.ludo-game .board.ludo .yellow.lane {background:linear-gradient(145deg,#fff4a4,#ffc129 68%,#d77d06);}
.ludo-game .board.ludo .yard::after {
  inset:13%;border:2px solid #fff; background:radial-gradient(circle at 30% 22%,#ffffff,#fffdf0 65%,#ddd5c3);
  box-shadow:0 2px 5px #0005,inset 0 2px 3px #fff;
}
.ludo-game .board.ludo span {
  width:65%; border:2px solid #fff9;
  border-radius:50% 50% 40% 40%;
  box-shadow:0 3px 0 #3023429c,0 5px 5px #0006,inset 0 3px 3px #fffa,inset 0 -5px 4px #0005;
  font-family:system-ui,sans-serif;
  font-size:clamp(7px,1.5vw,13px);text-shadow:0 1px 2px #0009;
  cursor:pointer;touch-action:manipulation;
}
.ludo-game .board.ludo span::after {
  content:"";position:absolute;top:8%;left:24%;width:35%;height:20%;
  border-radius:50%;background:#fff8;transform:rotate(-24deg);pointer-events:none;
}
.ludo-game .die-face {
  width:68px;height:68px;border:3px solid #fff;
  border-radius:16px;background:linear-gradient(145deg,#fff,#f1e5d5);
  box-shadow:5px 6px 0 #bbb0a5,8px 11px 18px #0008,inset 0 3px 3px #fff;
  font:900 2.5rem system-ui,sans-serif;
  transform:perspective(250px) rotateX(12deg) rotateY(-14deg);
}
.ludo-game #actions .roll-button {
  border:2px solid #fff4a0;border-radius:16px;
  padding:12px 24px;background:linear-gradient(155deg,#ffdb52,#ff9c20);
  color:#3d2150;box-shadow:0 5px 0 #a85812,0 9px 20px #0006;
  text-shadow:none;
}
.ludo-game .rules {color:#f3e4ca;border-top-color:#ffffff66;}
.ludo-game .seat-options {background:#242b5d;border-color:#bca9e0;}
@media(max-width:480px){
 .ludo-game .board.ludo {width:100%;padding:5px;border-width:5px;}
 .ludo-game .board.ludo span {width:68%;font-size:8px;}
 .ludo-game .die-face {width:56px;height:56px;font-size:2rem;}
}

/* Accessible direct token interaction and active-player die cue */
.ludo-game .board.ludo .playable-token {
  outline:none;
  animation:mahir-token-pulse 1.35s ease-in-out infinite;
}
.ludo-game .board.ludo .playable-token:focus-visible {
  outline:3px solid #18112f;outline-offset:2px;
}
.ludo-game .die-face[data-turn="red"] {border-color:#ff7b8c;}
.ludo-game .die-face[data-turn="blue"] {border-color:#70b9ff;}
.ludo-game .die-face[data-turn="green"] {border-color:#7bf3b0;}
.ludo-game .die-face[data-turn="yellow"] {border-color:#ffe177;}
@keyframes mahir-token-pulse {
  50% {filter:brightness(1.2);box-shadow:0 3px 0 #3023429c,0 0 12px 3px #fff9,inset 0 3px 3px #fffa;}
}
@media(prefers-reduced-motion:reduce) {
  .ludo-game .board.ludo .playable-token {animation:none;}
}

/* Four turn-locked player dice: each seat keeps its own die. */
.ludo-game .ludo-stage {
  display:grid;grid-template-columns:1fr 1fr;
  grid-template-areas:"red green" "board board" "blue yellow";
  width:min(100%,660px);margin:8px auto 22px;gap:8px;
}
.ludo-game .ludo-stage #board {grid-area:board;margin:0 auto;width:100%;}
.ludo-game .player-dice {
  display:flex;align-items:center;justify-content:center;gap:9px;
  padding:5px 10px;border-radius:14px;background:#ffffff15;
  border:2px solid #ffffff38;min-height:64px;opacity:.65;
  font-family:system-ui,sans-serif;font-weight:900;
}
.ludo-game .player-dice.red {grid-area:red;--seat-color:#f8505c;}
.ludo-game .player-dice.green {grid-area:green;--seat-color:#32d77b;}
.ludo-game .player-dice.blue {grid-area:blue;--seat-color:#43b8ff;}
.ludo-game .player-dice.yellow {grid-area:yellow;--seat-color:#ffcb37;}
.ludo-game .player-dice.active {
  opacity:1;border-color:var(--seat-color);
  background:color-mix(in srgb,var(--seat-color) 22%,#191d46);
  box-shadow:0 0 17px color-mix(in srgb,var(--seat-color) 50%,transparent);
}
.ludo-game .player-dice.inactive-seat {opacity:.2;}
.ludo-game .player-dice .die-face {
  width:48px;height:48px;margin:0;flex:none;padding:0;
  font-size:2.45rem;line-height:1;color:#181d37;
  cursor:pointer;touch-action:manipulation;
}
.ludo-game .player-dice .die-face:disabled {cursor:default;filter:grayscale(.45);}
.ludo-game .player-dice.active .die-face:not(:disabled) {
  animation:mahir-die-ready 1.5s ease-in-out infinite;
}
@keyframes mahir-die-ready {50%{transform:translateY(-3px);box-shadow:0 0 12px #fff9;}}
/* Glossy carved wooden pieces, color-stained but visibly wood-grained. */
.ludo-game .board.ludo span {
  border:2px solid #f8e7bb;
  border-radius:46% 46% 36% 36%;
  background-image:
    repeating-linear-gradient(9deg,transparent 0 3px,#4e260b25 4px 5px,transparent 6px 10px),
    radial-gradient(ellipse at 30% 18%,#fff9,transparent 46%),
    linear-gradient(145deg,#c99b59,#7c3d1b 65%,#47230f);
  box-shadow:inset 1px 2px 3px #fff9,inset -2px -3px 4px #3114079c,0 3px 1px #40230f,0 5px 5px #0008;
}
.ludo-game .board.ludo span.red {background-color:#bd2939;background-blend-mode:normal,screen,multiply;}
.ludo-game .board.ludo span.blue {background-color:#176dc3;background-blend-mode:normal,screen,multiply;}
.ludo-game .board.ludo span.green {background-color:#16874b;background-blend-mode:normal,screen,multiply;}
.ludo-game .board.ludo span.yellow {background-color:#d8a016;background-blend-mode:normal,screen,multiply;}
@media(max-width:480px) {
  .ludo-game .ludo-stage {gap:5px;}
  .ludo-game .player-dice {padding:4px;min-height:54px;gap:5px;font-size:.76rem;}
  .ludo-game .player-dice .die-face {width:43px;height:43px;font-size:2.1rem;}
}
@media(prefers-reduced-motion:reduce) {
  .ludo-game .player-dice.active .die-face:not(:disabled){animation:none;}
}

/* Color selection is available from each player's header before the first roll. */
.ludo-game .player-dice-label {
  background:transparent;border:0;box-shadow:none;color:#fff8e9;
  font:800 .83rem system-ui,sans-serif;cursor:pointer;padding:8px 3px;
  text-shadow:0 1px 2px #0008;
}
.ludo-game .player-dice-label:disabled {opacity:.75;cursor:default;}
.ludo-game .color-picker:not([hidden]) {
  display:flex;gap:9px;flex-wrap:wrap;align-items:center;justify-content:center;
  margin:10px auto;padding:12px;border:2px solid #e8bd6d;
  border-radius:16px;background:#272044;color:#fff8dd;
  font-family:system-ui,sans-serif;
}
.ludo-game .color-hint {text-align:center;font-size:.83rem;}
@media(max-width:480px) {.ludo-game .player-dice-label{font-size:.67rem;}}

/* Classic board: clear safe stars on all eight protected track cells. */
.ludo-game .board.ludo .track.safe::before {
  content:"★";position:absolute;inset:0;display:grid;place-items:center;
  font-size:clamp(13px,3.5vw,27px);line-height:1;
  color:#fff;opacity:1;text-shadow:0 2px 2px #38260e9c,0 0 2px #40280c;
  z-index:0;pointer-events:none;
}
.ludo-game .board.ludo .track.safe {
  background:linear-gradient(145deg,#f9d976,#cf9b31);
}
.ludo-game .board.ludo .track.start-square.red {background:#e73b48;}
.ludo-game .board.ludo .track.start-square.blue {background:#2682df;}
.ludo-game .board.ludo .track.start-square.green {background:#24b765;}
.ludo-game .board.ludo .track.start-square.yellow {background:#f2bc2c;}
.ludo-game .board.ludo .track.start-square.safe::before {
  color:#fff;filter:drop-shadow(0 1px 1px #0008);
}

/* Per-seat custom colors: the physical route never changes. */
.ludo-game .board.ludo .yard.red,.ludo-game .board.ludo .lane.red,.ludo-game .board.ludo .track.start-square.red {background:var(--seat-0)!important;}
.ludo-game .board.ludo .yard.blue,.ludo-game .board.ludo .lane.blue,.ludo-game .board.ludo .track.start-square.blue {background:var(--seat-1)!important;}
.ludo-game .board.ludo .yard.green,.ludo-game .board.ludo .lane.green,.ludo-game .board.ludo .track.start-square.green {background:var(--seat-2)!important;}
.ludo-game .board.ludo .yard.yellow,.ludo-game .board.ludo .lane.yellow,.ludo-game .board.ludo .track.start-square.yellow {background:var(--seat-3)!important;}
.ludo-game .board.ludo span.red,.ludo-game .board.ludo span.blue,.ludo-game .board.ludo span.green,.ludo-game .board.ludo span.yellow {
  background:repeating-linear-gradient(8deg,transparent 0 3px,#3d180b27 4px 5px,transparent 6px 10px),
  radial-gradient(ellipse at 28% 16%,#ffffffb3,transparent 46%),var(--piece-color)!important;
}
.ludo-game .player-dice {border-color:var(--custom-seat-color,#ffffff38);}
.ludo-game .player-dice.active {background:color-mix(in srgb,var(--custom-seat-color) 23%,#191d46);}
.ludo-game .color-picker option:disabled {color:#999;}

/* Complete 15x15 classic board with four large colored home quadrants. */
.ludo-game .board.ludo {position:relative;display:grid;grid-template-columns:repeat(15,minmax(0,1fr));grid-template-rows:repeat(15,minmax(0,1fr));gap:0;touch-action:manipulation;}
.ludo-game .board.ludo .home-base {border:3px solid #fff7d4;z-index:0;border-radius:0;box-shadow:inset 0 0 0 2px #0002;}
.ludo-game .board.ludo .home-base.base-0 {background:var(--seat-0,#e83e4e);}
.ludo-game .board.ludo .home-base.base-1 {background:var(--seat-1,#2588e8);}
.ludo-game .board.ludo .home-base.base-2 {background:var(--seat-2,#27bf70);}
.ludo-game .board.ludo .home-base.base-3 {background:var(--seat-3,#f2be30);}
.ludo-game .board.ludo .home-diamond {
  background:conic-gradient(from 45deg,var(--seat-3,#f2be30) 0 25%,var(--seat-1,#2588e8) 0 50%,var(--seat-0,#e83e4e) 0 75%,var(--seat-2,#27bf70) 0);
  z-index:0;border:2px solid #fff5c6;
}
.ludo-game .board.ludo .track,.ludo-game .board.ludo .lane,.ludo-game .board.ludo .yard {z-index:1;}
.ludo-game .board.ludo .yard {
  background:#fffdf5!important;border-radius:50%;border:2px solid #e3cfa8;
  box-shadow:0 1px 3px #0005;
}
.ludo-game .board.ludo .yard::after {display:none;}
.ludo-game .board.ludo .lane.red {background:var(--seat-0)!important;}
.ludo-game .board.ludo .lane.blue {background:var(--seat-1)!important;}
.ludo-game .board.ludo .lane.green {background:var(--seat-2)!important;}
.ludo-game .board.ludo .lane.yellow {background:var(--seat-3)!important;}
.ludo-game .board.ludo .home-center {background:transparent!important;border:0;z-index:2;}
.ludo-game .board.ludo .track.safe::before {content:"★";color:#fff;font-size:clamp(11px,3vw,22px);}
.ludo-game main {width:100%;max-width:800px;}
@media(max-width:600px) {
 .ludo-game main {padding:8px!important;}
 .ludo-game h1 {font-size:clamp(1.5rem,7vw,2.3rem);margin:3px 0 5px;}
 .ludo-game main>p:not(#status):not(.color-hint),.ludo-game .rules {display:none;}
 .ludo-game .controls {margin:4px 0;}
 .ludo-game .ludo-stage {width:100%;margin:3px auto;}
 .ludo-game .board.ludo {width:100%;aspect-ratio:1;padding:4px;border-width:4px;border-radius:9px;}
 .ludo-game .color-hint {margin:3px 0;font-size:.68rem;}
 .ludo-game #status {margin:4px auto;font-size:.82rem;}
}

/* Setup first; game board is never visible before Start Game. */
.ludo-game [hidden] {display:none!important;}
.ludo-game .ludo-setup {
  min-height:min(85dvh,790px);padding:clamp(20px,5vw,44px) 18px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:15px;text-align:center;border:2px solid #d5a953;border-radius:26px;
  background:radial-gradient(circle at 50% 0%,#584175,#211936 65%,#17132c);
  color:#fff4d7;box-shadow:0 20px 40px #26162930;
}
.ludo-game .ludo-setup h2 {font-size:clamp(2.3rem,9vw,4rem);color:#ffd477;letter-spacing:.07em;margin:0;text-shadow:0 3px 9px #0009;}
.ludo-game .ludo-setup p {margin:0;color:#f6e6cb;}
.ludo-game .setup-emblem {font-size:clamp(5rem,18vw,8rem);filter:drop-shadow(0 8px 12px #0008);}
.ludo-game .setup-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:min(100%,440px);margin:14px 0;}
.ludo-game .setup-options label {text-align:left;color:#fff1ce;}
.ludo-game .setup-options select {width:100%;min-width:0;padding:13px 7px;background:#fff8e7;color:#2b203e;}
.ludo-game .start-game {width:min(100%,440px);min-height:58px;font-size:1.3rem;font-weight:900;background:linear-gradient(135deg,#ffe29a,#dba13b);color:#292037;border:2px solid #fff0bd;border-radius:16px;}
.ludo-game .setup-footnote {font-size:.8rem;max-width:360px;}
.ludo-game .play-toolbar {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 0;color:#f6d585;font-weight:900;}
.ludo-game .play-toolbar button {padding:8px;font-size:.8rem;}
.ludo-game.playing-ludo {background:radial-gradient(ellipse at 50% 35%,#373063,#15102b);}
.ludo-game.playing-ludo main {max-width:850px;padding:8px;}
.ludo-game.playing-ludo #ludo-play>h1,.ludo-game.playing-ludo #ludo-play>p:not(#status):not(.color-hint),.ludo-game.playing-ludo .game-settings,.ludo-game.playing-ludo .rules {display:none;}
.ludo-game.playing-ludo .ludo-stage {margin:4px auto;}
.ludo-game #ludo-play:fullscreen {overflow:auto;background:#1c1635;padding:8px;}
@media(max-width:480px) {
 .ludo-game .setup-options {grid-template-columns:1fr;}
 .ludo-game .ludo-setup {min-height:80dvh;}
 .ludo-game.playing-ludo .ludo-stage {gap:3px;}
 .ludo-game.playing-ludo .player-dice {min-height:48px;}
}

/* Premium portrait setup scene: dedicated art, not generic site form. */
.ludo-game .ludo-setup {
  box-sizing:border-box;min-height:calc(100dvh - 105px);
  padding:clamp(12px,3vw,24px);
  gap:10px;justify-content:flex-start;overflow:hidden;
  background:
    radial-gradient(ellipse at 50% 28%,#57417e 0,#281b4a 45%,#13122c 100%);
  border:2px solid #a77836;border-radius:24px;
  box-shadow:inset 0 0 0 3px #ffdd7826,0 15px 38px #0004;
}
.ludo-game .setup-art {
  position:relative;width:min(100%,360px);min-height:clamp(240px,37dvh,365px);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:8px 0 14px;
}
.ludo-game .setup-brand {
  position:relative;z-index:2;white-space:nowrap;
  color:#fff1bd;font-family:Georgia,serif;font-size:clamp(2.1rem,9vw,3.8rem);
  font-weight:1000;letter-spacing:.06em;line-height:.98;
  text-shadow:0 3px #7a421d,0 5px 0 #392036,0 9px 16px #000c;
  -webkit-text-stroke:.7px #9e6a31;
}
.ludo-game .setup-brand span {color:#ffca55;}
.ludo-game .setup-brand em {display:block;font-style:normal;color:#f4be5b;font-size:.5em;letter-spacing:.4em;margin:7px 0 0 7px;}
.ludo-game .mini-ludo-board {
  width:clamp(172px,51vw,240px);aspect-ratio:1;display:grid;
  grid-template-columns:2fr 1fr 2fr;grid-template-rows:2fr 1fr 2fr;
  border:7px ridge #e6b95c;border-radius:10px;
  transform:perspective(550px) rotateX(13deg) rotateZ(-8deg);
  box-shadow:0 15px 0 #885225,0 23px 25px #0009,0 0 25px #e6ae5440;
  overflow:hidden;margin:12px 0 0;
}
.ludo-game .mini-yard {display:grid;grid-template-columns:repeat(2,1fr);gap:10%;padding:23%;border:2px solid #fff4d6;}
.ludo-game .mini-yard.red {background:#e84355;}
.ludo-game .mini-yard.green {background:#22b76e;}
.ludo-game .mini-yard.blue {background:#2385d8;}
.ludo-game .mini-yard.yellow {background:#f5bd2c;}
.ludo-game .mini-yard i {border-radius:50%;background:radial-gradient(circle at 30% 20%,#fff9,#fff2 30%,#0004 80%),#f5dfb0;border:2px solid #fff7cf;box-shadow:0 2px 2px #0008;}
.ludo-game .mini-path {display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);background:repeating-linear-gradient(90deg,#fffaf0 0 30%,#c9bbab 31% 33%);border:1px solid #bba887;}
.ludo-game .mini-path b {font-size:.65rem;display:grid;place-items:center;color:#ae7d2c;}
.ludo-game .mini-path.top {background:linear-gradient(90deg,#fffaf0 33%,#20b86c 33% 66%,#fffaf0 66%);}
.ludo-game .mini-path.bottom {background:linear-gradient(90deg,#fffaf0 33%,#2385d8 33% 66%,#fffaf0 66%);}
.ludo-game .mini-path.left {background:linear-gradient(#fffaf0 33%,#e84355 33% 66%,#fffaf0 66%);}
.ludo-game .mini-path.right {background:linear-gradient(#fffaf0 33%,#f5bd2c 33% 66%,#fffaf0 66%);}
.ludo-game .mini-center {background:conic-gradient(#f5bd2c 0 25%,#2385d8 0 50%,#e84355 0 75%,#20b86c 0);border:1px solid #fff2d1;}
.ludo-game .setup-dice {position:absolute;bottom:2px;right:6%;display:flex;gap:8px;transform:rotate(15deg);font-size:2.5rem;color:#fff8e9;text-shadow:0 5px 6px #0009;}
.ludo-game .setup-dice span:first-child {transform:rotate(-19deg);}
.ludo-game .ludo-setup h2 {font-size:clamp(1.25rem,5vw,1.7rem);letter-spacing:.02em;color:#fff3d0;text-shadow:none;}
.ludo-game .setup-tagline {font-size:.85rem;opacity:.86;}
.ludo-game .setup-options {width:min(100%,440px);margin:8px 0 4px;gap:10px;}
.ludo-game .setup-options label {font-size:.85rem;}
.ludo-game .setup-options select {font-size:1rem;border:1px solid #d4a955;border-radius:12px;box-shadow:0 4px 0 #15112b;}
.ludo-game .start-game {
  display:block;width:min(100%,440px);min-height:58px;margin-top:5px;
  background:linear-gradient(180deg,#ffecaa,#e9ac41 65%,#bd7c27);
  color:#38213a;font-size:1.25rem;border:2px solid #ffe9aa;
  box-shadow:0 5px 0 #8d5522,0 9px 18px #0006;
}
.ludo-game .setup-footnote {font-size:.73rem;line-height:1.45;opacity:.8;}
@media(max-width:480px) {
 .ludo-game .ludo-setup {min-height:calc(100dvh - 80px);gap:7px;padding:12px 15px;}
 .ludo-game .setup-art {min-height:clamp(225px,35dvh,315px);}
 .ludo-game .setup-options {grid-template-columns:repeat(2,minmax(0,1fr));}
 .ludo-game .setup-options select {padding:10px 5px;font-size:.88rem;}
 .ludo-game .start-game {min-height:55px;}
}

/* Approved dark walnut and gold game setup; overrides legacy arcade controls. */
body.ludo-game:not(.playing-ludo){background:radial-gradient(ellipse at 50% 0%,#24384b 0%,#101d2d 60%,#09121e 100%)!important;color:#f9e9cc;}
.ludo-game:not(.playing-ludo) main{max-width:950px;padding:clamp(10px,2vw,24px);}
.ludo-game:not(.playing-ludo) nav{margin:0 auto 12px;max-width:780px;}
.ludo-game:not(.playing-ludo) nav a{color:#f4d49b;}
.ludo-game #ludo-setup{
 display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
 width:min(100%,780px);max-width:780px;min-height:0;margin:0 auto;
 padding:clamp(12px,3vw,25px);gap:12px;text-align:center;
 background:radial-gradient(ellipse at 50% 20%,#5c321e 0%,#2b1a17 48%,#180f15 100%);
 border:2px solid #bd854a;border-radius:20px;
 box-shadow:inset 0 0 0 4px #f5b85c20,0 15px 40px #0009;
}
.ludo-game #ludo-setup .setup-art{
 width:100%;max-width:570px;min-height:0;padding:12px 8px 18px;
 border-radius:18px;overflow:visible;
 background:radial-gradient(ellipse at center,#9c4e1e55,transparent 70%);
}
.ludo-game #ludo-setup .setup-brand{font-size:clamp(2.6rem,10vw,5.5rem);font-weight:1000;line-height:1.03;color:#ffe6a1;text-shadow:0 3px #9a4b16,0 6px #3c160d,0 10px 18px #000e;}
.ludo-game #ludo-setup .setup-brand em{font-size:.58em;color:#fff2c8;letter-spacing:.12em;}
.ludo-game #ludo-setup .mini-ludo-board{width:clamp(145px,40vw,230px);margin:16px auto 4px;box-shadow:0 8px 0 #885225,0 15px 25px #000b;}
.ludo-game #ludo-setup .setup-dice{font-size:2.4rem;right:16%;bottom:0;}
.ludo-game #ludo-setup .setup-heading{font-size:clamp(1rem,3.5vw,1.35rem);font-family:Georgia,serif;color:#ffdc8b;margin:0;letter-spacing:.03em;}
.ludo-game #ludo-setup .setup-tagline{font-size:.88rem;color:#e8cba6;margin:0;}
.ludo-game #ludo-setup .setup-options{
 width:100%;max-width:570px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
 padding:14px;background:#1b1114a8;border:1px solid #a87543;border-radius:14px;margin:0;
}
.ludo-game #ludo-setup .setup-options label{display:flex;flex-direction:column;text-align:left;gap:6px;color:#f8d69b;font-weight:800;font-size:.86rem;}
.ludo-game #ludo-setup .setup-options select{
 width:100%;min-width:0;padding:12px 8px;background:linear-gradient(#423344,#251e2d);
 color:#fff5dc;border:1px solid #a87c5e;border-radius:12px;font-size:1rem;
}
.ludo-game #ludo-setup .start-game{
 width:min(100%,400px);min-height:55px;margin:2px auto;
 border:2px solid #ffe2a2;border-radius:999px;
 background:linear-gradient(#ffdc6c,#ffac19 65%,#d87a13);
 color:#241414;font-size:1.25rem;font-weight:900;
 box-shadow:0 5px 0 #754014,0 8px 18px #0009;
}
.ludo-game #ludo-setup .setup-features{width:100%;max-width:570px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.ludo-game #ludo-setup .setup-features>div{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
 min-height:65px;padding:7px 3px;color:#f8ddb4;font-size:1.3rem;
 border:1px solid #a8784e;border-radius:11px;background:linear-gradient(#49302a,#271b1e);
}
.ludo-game #ludo-setup .setup-features span{font-size:.72rem;line-height:1.25;}
.ludo-game #ludo-setup .setup-features small{font-size:.65rem;opacity:.8;}
.ludo-game #ludo-setup .setup-footnote{font-size:.72rem;color:#e4cba7;max-width:500px;margin:0;}
@media(max-width:480px){
 .ludo-game:not(.playing-ludo) main{padding:9px;}
 .ludo-game #ludo-setup{padding:13px 10px;gap:10px;border-radius:15px;}
 .ludo-game #ludo-setup .setup-art{padding:6px 0 12px;}
 .ludo-game #ludo-setup .setup-options{grid-template-columns:1fr;gap:8px;padding:11px;}
 .ludo-game #ludo-setup .setup-options select{padding:10px;}
 .ludo-game #ludo-setup .mini-ludo-board{width:clamp(135px,38vw,190px);}
 .ludo-game #ludo-setup .setup-features>div{min-height:60px;}
}

/* Approved reference layout — specific selectors override old setup rules. */
body.ludo-game:not(.playing-ludo){background:radial-gradient(circle at 70% 10%,#183b4b,#081827 65%)!important;}
body.ludo-game #ludo-setup.ludo-setup{max-width:750px;width:100%;min-height:0;padding:16px;gap:0;background:linear-gradient(145deg,#3d231a,#201413 75%);border:2px solid #bd8a55;border-radius:19px;}
body.ludo-game #ludo-setup .mahir-hero{width:100%;min-height:275px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;background:radial-gradient(ellipse at 50% 38%,#8d481f88,transparent 72%);overflow:hidden;}
body.ludo-game #ludo-setup .mahir-crown{font-family:Georgia,serif;font-size:75px;line-height:.85;color:#ffcb48;text-shadow:0 4px 0 #80421c,0 7px 12px #000c;}
body.ludo-game #ludo-setup .mahir-logo{z-index:1;font-family:Georgia,serif;font-style:italic;font-weight:900;font-size:clamp(3.5rem,12vw,6.3rem);line-height:.8;color:#ffe5a0;text-shadow:2px 3px #9e5c27,4px 6px #2b0e08,0 10px 15px #000d;}
body.ludo-game #ludo-setup .mahir-logo strong{display:block;font-size:.75em;color:#fff4da;text-shadow:2px 3px #80502e,4px 6px #2b0e08,0 10px 15px #000d;}
body.ludo-game #ludo-setup .mahir-illustration{display:flex;align-items:center;justify-content:center;gap:clamp(2px,2vw,13px);width:100%;height:70px;margin-top:8px;}
body.ludo-game #ludo-setup .mahir-pawn{font-size:clamp(2rem,8vw,4rem);line-height:1;filter:drop-shadow(0 5px 3px #000a);}
body.ludo-game #ludo-setup .pawn-red{color:#e92f31}body.ludo-game #ludo-setup .pawn-green{color:#29c75b}body.ludo-game #ludo-setup .pawn-blue{color:#258de7}body.ludo-game #ludo-setup .pawn-yellow{color:#f6c12c}
body.ludo-game #ludo-setup .mahir-die{font-size:clamp(2rem,8vw,4rem);color:#fff3df;text-shadow:0 4px 5px #000a;}
body.ludo-game #ludo-setup .mahir-hero p{font-family:Georgia,serif;color:#f5dec0;font-size:clamp(.76rem,2.7vw,.98rem);line-height:1.5;margin:12px 0 15px;}
body.ludo-game #ludo-setup .mahir-settings{width:100%;max-width:650px;padding:14px;background:#1c1111b5;border:1px solid #ae7b50;border-radius:15px;display:grid;gap:12px;}
body.ludo-game #ludo-setup .mahir-field{width:100%;text-align:left;}
body.ludo-game #ludo-setup .mahir-field-title{color:#ffe1a4;font-weight:800;font-size:.9rem;margin-bottom:8px;}
body.ludo-game #ludo-setup .mahir-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}
body.ludo-game #ludo-setup .mahir-choice button{min-width:0;min-height:48px;padding:7px 4px;background:linear-gradient(#40323b,#25202b);color:#f4e9e5;border:1px solid #836b69;border-radius:11px;font-weight:750;font-size:clamp(.68rem,2.6vw,.95rem);box-shadow:0 3px 5px #0008;}
body.ludo-game #ludo-setup .mahir-choice button.selected{background:linear-gradient(#b42fda,#6310a2);border-color:#e899ff;box-shadow:0 0 12px #c33dffb0,inset 0 0 8px #ffffff40;}
body.ludo-game #ludo-setup .mahir-choice button:disabled{opacity:.55;}
body.ludo-game #ludo-setup .mahir-choice small{display:block;font-size:.63em;}
body.ludo-game #ludo-setup .start-game{width:min(100%,380px);margin:14px auto 12px;min-height:55px;border-radius:999px;background:linear-gradient(#ffe37a,#ffac17);color:#241614;font-weight:900;}
body.ludo-game #ludo-setup .setup-features{max-width:650px;grid-template-columns:repeat(3,minmax(0,1fr));}
body.ludo-game #ludo-setup .setup-features button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:linear-gradient(#49302a,#271b1e);border:1px solid #a8784e;border-radius:11px;color:#f8ddb4;min-height:68px;font-size:1.25rem;}
body.ludo-game #ludo-setup .setup-features button span{font-size:.75rem;}
body.ludo-game #ludo-setup .setup-footnote{margin-top:10px;}
body.ludo-game #ludo-setup select[hidden]{display:none!important;}
@media(max-width:480px){body.ludo-game #ludo-setup.ludo-setup{padding:11px;}body.ludo-game #ludo-setup .mahir-hero{min-height:245px;}body.ludo-game #ludo-setup .mahir-crown{font-size:57px;}body.ludo-game #ludo-setup .mahir-illustration{height:54px;}body.ludo-game #ludo-setup .mahir-settings{padding:10px;gap:9px;}body.ludo-game #ludo-setup .mahir-choice{gap:5px;}body.ludo-game #ludo-setup .mahir-choice button{min-height:46px;}}

/* Illustrated Ludo identity: replace chess pieces with dimensional wooden counters. */
body.ludo-game #ludo-setup .mahir-crown{height:68px;display:grid;place-items:center;filter:drop-shadow(0 7px 4px #0009);}
body.ludo-game #ludo-setup .mahir-crown svg{height:75px;width:115px;}
body.ludo-game #ludo-setup .mahir-hero{min-height:310px;}
body.ludo-game #ludo-setup .mahir-illustration{position:relative;z-index:2;height:73px;gap:clamp(4px,2vw,14px);}
body.ludo-game #ludo-setup .ludo-pawn{display:block;position:relative;width:clamp(24px,6vw,36px);height:51px;filter:drop-shadow(2px 6px 3px #000a);}
body.ludo-game #ludo-setup .ludo-pawn:before{content:"";position:absolute;left:28%;top:2px;width:44%;height:23%;border-radius:50%;background:radial-gradient(circle at 30% 20%,#ffffffb0,transparent 45%),var(--pawn);box-shadow:inset -3px -2px 3px #0005,0 2px 2px #0007;}
body.ludo-game #ludo-setup .ludo-pawn:after{content:"";position:absolute;left:12%;top:14px;width:76%;height:30px;border-radius:48% 48% 25% 25%;background:linear-gradient(105deg,#ffffffa0,transparent 33%,#0007 90%),var(--pawn);border-bottom:5px solid #6c3617;box-shadow:0 3px 0 #f2c780,inset -2px 0 3px #0005;}
body.ludo-game #ludo-setup .pawn-red{--pawn:#df2830}
body.ludo-game #ludo-setup .pawn-green{--pawn:#1caf54}
body.ludo-game #ludo-setup .pawn-blue{--pawn:#2184e9}
body.ludo-game #ludo-setup .pawn-yellow{--pawn:#f7bd21}
body.ludo-game #ludo-setup .mahir-board-art{position:absolute;right:3%;bottom:27px;width:clamp(82px,24vw,150px);aspect-ratio:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;transform:perspective(250px) rotateX(25deg) rotateZ(17deg);border:5px ridge #e4b767;box-shadow:0 7px 0 #8b4b23,0 12px 18px #0009;opacity:.9;}
body.ludo-game #ludo-setup .art-quarter.red{background:#df3948}body.ludo-game #ludo-setup .art-quarter.green{background:#26b66a}body.ludo-game #ludo-setup .art-quarter.blue{background:#288cdb}body.ludo-game #ludo-setup .art-quarter.yellow{background:#f6bd30}
body.ludo-game #ludo-setup .art-quarter{border:3px solid #fff4db;box-shadow:inset 0 0 0 8px #fff5e7aa;}
body.ludo-game #ludo-setup .art-cross{position:absolute;inset:34%;background:conic-gradient(#25b66b 0 25%,#f6bd30 0 50%,#298bdc 0 75%,#df3948 0);border:1px solid #fff8d9;}
body.ludo-game #ludo-setup .mahir-hero p{position:relative;z-index:2;background:#2b160c77;padding:3px 7px;border-radius:8px;}
@media(max-width:480px){body.ludo-game #ludo-setup .mahir-board-art{width:90px;right:0;bottom:45px;opacity:.65}body.ludo-game #ludo-setup .mahir-hero{min-height:285px}}


/* Ludu Mahir setup polish — isolated from the site's own header and sidebar. */
body.ludo-game #ludo-setup.ludo-setup{
  padding:clamp(10px,2.4vw,20px);
  background:linear-gradient(135deg,#4c2b1b 0%,#2b1714 52%,#1b1011 100%);
  border:2px solid #bc8a55;box-shadow:inset 0 0 0 6px #e7ac5820,0 15px 38px #0009;
}
body.ludo-game #ludo-setup .mahir-hero{
  min-height:clamp(230px,35vw,345px);padding:14px 12px 8px;
  background:radial-gradient(ellipse at 50% 36%,#a55b2688,transparent 66%);
  overflow:visible;isolation:isolate;
}
body.ludo-game #ludo-setup .mahir-crown{
  height:clamp(48px,7vw,70px);filter:drop-shadow(0 5px 0 #63300f) drop-shadow(0 10px 8px #0009);
}
body.ludo-game #ludo-setup .mahir-crown svg{height:100%;width:auto;}
body.ludo-game #ludo-setup .mahir-logo{
  font-size:clamp(3.6rem,10vw,6.5rem);letter-spacing:-.055em;
  transform:rotate(-3deg);line-height:.75;
  text-shadow:1px 1px 0 #fff1bb,3px 4px 0 #b87936,5px 7px 0 #623015,8px 12px 9px #000c;
}
body.ludo-game #ludo-setup .mahir-logo strong{
  font-size:.7em;letter-spacing:-.03em;
  text-shadow:1px 1px 0 #fff6db,3px 4px 0 #a66a37,5px 7px 0 #5c2b17,7px 11px 8px #000b;
}
body.ludo-game #ludo-setup .mahir-illustration{height:64px;margin-top:14px;gap:clamp(6px,1.5vw,15px);}
body.ludo-game #ludo-setup .ludo-pawn{height:46px;transform:scale(.95);}
body.ludo-game #ludo-setup .mahir-die{
  display:grid;place-items:center;width:39px;height:39px;font-size:2.2rem;
  color:#fff5df;background:linear-gradient(140deg,#e7caa1,#a8784b);
  border:2px solid #fff1cf;border-radius:9px;
  box-shadow:3px 4px 0 #56321d,5px 7px 9px #0009;
}
body.ludo-game #ludo-setup .mahir-board-art{
  width:clamp(85px,17vw,130px);right:0;bottom:28px;
  transform:perspective(300px) rotateX(22deg) rotateZ(13deg);
  opacity:.88;z-index:0;pointer-events:none;
}
body.ludo-game #ludo-setup .mahir-hero p{
  margin:10px 0 0;max-width:75%;font-size:clamp(.7rem,1.7vw,.92rem);
  position:relative;z-index:2;
}
body.ludo-game #ludo-setup .mahir-settings{margin-top:5px;max-width:650px;}
body.ludo-game #ludo-setup .mahir-choice button{min-height:46px;border-radius:12px;}
body.ludo-game #ludo-setup .start-game{margin:14px auto 13px;}
@media(max-width:600px){
 body.ludo-game #ludo-setup .mahir-hero{min-height:265px;padding:8px 3px 5px;}
 body.ludo-game #ludo-setup .mahir-logo{font-size:clamp(3.1rem,13vw,5rem);}
 body.ludo-game #ludo-setup .mahir-board-art{width:72px;right:-3px;bottom:43px;opacity:.55;}
 body.ludo-game #ludo-setup .mahir-hero p{max-width:85%;padding:3px 4px;}
 body.ludo-game #ludo-setup .mahir-illustration{gap:6px;margin-top:12px;}
 body.ludo-game #ludo-setup .mahir-die{width:30px;height:30px;font-size:1.6rem;}
 body.ludo-game #ludo-setup .ludo-pawn{width:25px;height:43px;}
 body.ludo-game #ludo-setup .mahir-settings{padding:10px;}
 body.ludo-game #ludo-setup .mahir-choice button{font-size:clamp(.68rem,2.6vw,.83rem);}
}

/* Reference-matched compact landing layout */
body.ludo-game #ludo-setup.ludo-setup{max-width:610px;padding:13px 14px 16px;border-radius:16px;background:linear-gradient(130deg,#311b11,#1c1110 78%);box-shadow:inset 0 0 0 2px #e0ad5d33,0 12px 30px #0009;}
body.ludo-game #ludo-setup .mahir-hero{min-height:235px;padding:0 5px;justify-content:center;overflow:hidden;background:radial-gradient(ellipse at 50% 35%,#a35b2770,transparent 70%);}
body.ludo-game #ludo-setup .mahir-crown{height:42px;}
body.ludo-game #ludo-setup .mahir-crown svg{height:49px;width:75px;}
body.ludo-game #ludo-setup .mahir-logo{font-size:clamp(2.9rem,9vw,4.4rem);line-height:.78;z-index:2;}
body.ludo-game #ludo-setup .mahir-logo strong{font-size:.78em;}
body.ludo-game #ludo-setup .mahir-illustration{height:50px;margin-top:7px;}
body.ludo-game #ludo-setup .ludo-pawn{height:42px;width:25px;}
body.ludo-game #ludo-setup .ludo-pawn:after{height:25px;top:13px;}
body.ludo-game #ludo-setup .mahir-die{font-size:2.1rem;}
body.ludo-game #ludo-setup .mahir-laurel{position:absolute;left:8%;top:33%;font-size:5.5rem;color:#e5a735;transform:rotate(-60deg);opacity:.8;text-shadow:0 3px #6c310e;}
body.ludo-game #ludo-setup .mahir-laurel.right{left:auto;right:8%;transform:scaleX(-1) rotate(-60deg);}
body.ludo-game #ludo-setup .mahir-hero p{font-size:.77rem;margin:9px 0 4px;}
body.ludo-game #ludo-setup .mahir-settings{padding:11px 12px;gap:8px;}
body.ludo-game #ludo-setup .mahir-choice button{min-height:39px;}
body.ludo-game #ludo-setup .start-game{min-height:44px;width:min(90%,340px);font-size:1.08rem;margin:9px auto 12px;}
body.ludo-game #ludo-setup .setup-features{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;}
body.ludo-game #ludo-setup .setup-features>div,body.ludo-game #ludo-setup .setup-features>button{min-height:60px;font-size:1.15rem;padding:5px 2px;}
body.ludo-game #ludo-setup .setup-features span,body.ludo-game #ludo-setup .setup-features button span{font-size:.62rem;}
body.ludo-game #ludo-setup .setup-footnote{display:none;}
body.ludo-game .walid-game-header{min-height:49px;padding:5px 12px;}
body.ludo-game main>nav{font-size:.75rem;margin:3px auto 8px;}
@media(max-width:760px){body.ludo-game .walid-game-header{min-height:49px;}body.ludo-game main{padding:7px 9px;}}
@media(max-width:480px){body.ludo-game #ludo-setup .mahir-hero{min-height:220px;}body.ludo-game #ludo-setup .mahir-laurel{font-size:3.5rem;left:1%;}body.ludo-game #ludo-setup .mahir-laurel.right{right:1%;}body.ludo-game #ludo-setup .mahir-settings{padding:9px;}body.ludo-game #ludo-setup .mahir-choice button{font-size:.67rem;min-height:38px;}body.ludo-game #ludo-setup .setup-features{gap:5px;}body.ludo-game #ludo-setup .setup-features>div,body.ludo-game #ludo-setup .setup-features>button{min-height:56px;}}
/* Ludu Mahir final wood-and-gold presentation */
body.ludo-game {
  color:#f9ead0;
  background:
    radial-gradient(ellipse at 50% 0,#8c431a 0,transparent 54%),
    repeating-linear-gradient(92deg,#2b130b 0 7px,#35190c 8px 14px,#281108 15px 20px);
}
body.ludo-game main {max-width:1000px}
body.ludo-game nav a,body.ludo-game nav span {color:#f7d77e}
body.ludo-game #ludo-setup {max-width:670px;margin:8px auto 28px;gap:15px}
body.ludo-game #ludo-setup .mahir-hero {
  position:relative;min-height:285px;overflow:hidden;
  border:3px solid #f4cb53;border-radius:28px;
  background:
    radial-gradient(ellipse at 50% 34%,#8d3e10 0,#461d0d 52%,#21100d 100%),
    repeating-linear-gradient(0deg,#39190e,#5b260d 3px,#34160b 6px);
  box-shadow:0 0 0 4px #6c3517,0 10px 28px #100803aa,inset 0 0 28px #ffd55b36,inset 0 1px #fff8;
}
body.ludo-game #ludo-setup .mahir-hero::after {
  content:"";position:absolute;inset:8px;border:1px solid #ffe99388;border-radius:20px;pointer-events:none;
}
body.ludo-game #ludo-setup .mahir-logo {
  z-index:2;color:#ffdc62;font-family:Georgia,serif;text-shadow:0 3px #7d300d,0 6px #311207,0 9px 16px #090302;
}
body.ludo-game #ludo-setup .mahir-logo strong {color:#fff2d7}
body.ludo-game #ludo-setup .mahir-crown {filter:drop-shadow(0 6px 5px #170800)}
body.ludo-game #ludo-setup .mahir-laurel {color:#ffda58;text-shadow:0 3px 6px #210b00}
body.ludo-game #ludo-setup .mahir-illustration {filter:drop-shadow(0 7px 8px #120700)}
body.ludo-game #ludo-setup .mahir-hero p {z-index:2;color:#fff1da}
body.ludo-game #ludo-setup .mahir-settings,.ludo-game .mahir-field {
  border:2px solid #d89834;border-radius:22px;
  background:linear-gradient(145deg,#6d2a10,#32150d 67%,#4b2110);
  box-shadow:0 5px 0 #1c0b06,0 9px 18px #12070199,inset 0 1px #ffe9a8;
}
body.ludo-game .mahir-field-title {color:#ffe69a;text-shadow:0 2px #421507}
body.ludo-game .mahir-choice button,.ludo-game .setup-features>button,.ludo-game .setup-features>div {
  color:#fff3d9;border:2px solid #c78a34;border-radius:15px;
  background:linear-gradient(150deg,#7a3517,#3a180d 72%);
  box-shadow:0 4px 0 #1b0b07,inset 0 1px #fff5;
}
body.ludo-game .mahir-choice button.selected {
  color:#fff;background:linear-gradient(145deg,#872edd,#51219a);
  border-color:#dfbaff;box-shadow:0 0 0 2px #b860ff88,0 4px 0 #24103d,inset 0 1px #fff8;
}
body.ludo-game #ludo-setup .start-game {
  color:#492100;border:3px solid #fff0a0;border-radius:999px;
  background:linear-gradient(180deg,#fff07a 0,#ffc52d 52%,#e88709 100%);
  box-shadow:0 5px 0 #78360b,0 9px 22px #130701aa,inset 0 2px #fff;
  text-shadow:0 1px #fff6bd;font-family:Georgia,serif;
}
body.ludo-game #ludo-setup .setup-footnote {color:#f4d9af}
body.ludo-game #ludo-play {padding-bottom:24px}
body.ludo-game .play-toolbar {
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:8px 10px;border:2px solid #d79b3e;border-radius:18px;
  background:linear-gradient(145deg,#683015,#2a120b);box-shadow:0 4px 0 #1b0b06,inset 0 1px #fff6;
}
body.ludo-game .play-toolbar>span {color:#ffdf69;font:900 clamp(.9rem,3vw,1.3rem) Georgia,serif;text-shadow:0 2px #54210b}
body.ludo-game .play-toolbar button {
  min-height:44px;color:#fff2d1;background:linear-gradient(145deg,#75401e,#32180e);
  border:1px solid #e4b857;border-radius:13px;box-shadow:0 3px 0 #1b0b06;
}
body.ludo-game .ludo-stage {max-width:820px;gap:7px;grid-template-areas:"red blue" "board board" "green yellow"}
body.ludo-game .board.ludo {
  position:relative;width:min(100%,min(78vh,790px));padding:clamp(6px,1.2vw,11px);
  border:clamp(6px,1.3vw,12px) ridge #e4b846;border-radius:24px;
  background:
    repeating-linear-gradient(2deg,#8d4e1e 0 4px,#6a3514 5px 8px,#9b5b25 9px 12px);
  box-shadow:0 8px 0 #401b0a,0 17px 26px #090402aa,inset 0 2px #ffe994;
}
body.ludo-game .board.ludo div:not(.home-base):not(.home-diamond):not(.yard-celebration) {
  border:1px solid #d7c9ad;background:linear-gradient(145deg,#fffdf4,#e9dec9);
  box-shadow:inset 0 1px #fff,0 1px 1px #71482055;
}
body.ludo-game .board.ludo .track.safe {background:linear-gradient(145deg,#ffe78b,#cd8614)}
body.ludo-game .board.ludo .home-base {border:2px solid #fff0a0;box-shadow:inset 0 3px 7px #0005,0 2px 4px #210b06}
body.ludo-game .board.ludo .home-diamond {filter:drop-shadow(0 2px 3px #321608)}
body.ludo-game .board.ludo .yard {
  border:2px solid #ffeaa2!important;border-radius:17px!important;
  box-shadow:inset 0 3px 8px #38110388,0 3px 5px #40170699!important;
}
body.ludo-game .board.ludo .yard::after {
  border:3px solid #fff0b0;background:radial-gradient(circle at 32% 24%,#fffdf2,#e8d6b8 75%);
  box-shadow:0 4px 6px #35170899,inset 0 2px #fff;
}
body.ludo-game .board.ludo span {
  width:62%;border-radius:50% 50% 38% 38%;
  border:2px solid #fff9;box-shadow:0 4px 0 #39200e,0 7px 8px #16080399,inset 0 4px 5px #fff9,inset 0 -5px 6px #0006;
}
body.ludo-game .player-dice {
  min-height:62px;padding:5px;border:2px solid #c7893a;border-radius:17px;
  color:#fff0d0;background:linear-gradient(145deg,#5c2a14,#2a140e);
  box-shadow:0 4px 0 #180a06,inset 0 1px #fff5;
}
body.ludo-game .player-dice-label {min-height:42px;color:#fff3dd;background:transparent!important;border:0!important;box-shadow:none!important}
body.ludo-game .player-dice-label::before {
  content:"";display:inline-block;width:19px;height:19px;margin-right:6px;vertical-align:-4px;
  border:2px solid #fff7;border-radius:50%;background:radial-gradient(circle at 50% 35%,#fff 0 28%,transparent 30%),linear-gradient(#e9d7bd 0 58%,#80664f 59%);
}
body.ludo-game .player-dice .die-face {width:48px;height:48px;border-color:#fff2ca;box-shadow:3px 4px 0 #8a5c31,5px 7px 11px #100700}
body.ludo-game .player-dice.active {border-color:#ffe36a;box-shadow:0 0 14px var(--seat-color),0 4px 0 #180a06}
body.ludo-game #status {color:#ffe8ab;background:linear-gradient(145deg,#612812,#2b130b);border:1px solid #d59a43}
body.ludo-game .yard-celebration {
  position:absolute;z-index:5;display:grid;place-content:center;box-sizing:border-box;
  width:31%;height:25%;border:2px solid #ffdf73;border-radius:18px;text-align:center;
  padding:4px;color:#fff2bd;font:bold clamp(.8rem,3.1vw,1.8rem) Georgia,serif;
  text-shadow:0 2px 4px #180703;background:radial-gradient(ellipse,#9f4813ee,#321207eF);
  box-shadow:0 0 20px #ffc83b99,inset 0 1px #fff9;animation:yard-celebrate 1.4s ease-in-out infinite alternate;
}
body.ludo-game .yard-celebration.rank-1 {color:#fff2a3;border-color:#fff19a;box-shadow:0 0 26px #ffd332,0 0 50px #ff9b2788;animation:yard-winner 1.1s ease-in-out infinite alternate}
body.ludo-game .yard-celebration.rank-2 {animation-duration:1.8s}
body.ludo-game .yard-celebration.rank-3 {animation-duration:2.2s;opacity:.94}
body.ludo-game .yard-celebration.rank-4 {animation:none;opacity:.88}
body.ludo-game .yard-celebration.red {left:3%;top:3%}
body.ludo-game .yard-celebration.blue {left:3%;bottom:3%}
body.ludo-game .yard-celebration.green {right:3%;top:3%}
body.ludo-game .yard-celebration.yellow {right:3%;bottom:3%}
@keyframes yard-celebrate {to{transform:scale(1.045);filter:brightness(1.15)}}
@keyframes yard-winner {to{transform:scale(1.08);filter:brightness(1.3)}}
@media(max-width:620px) {
 body.ludo-game .ludo-stage {gap:4px}
 body.ludo-game .board.ludo {width:min(100%,min(78vh,100vw));padding:4px;border-width:5px;border-radius:14px}
 body.ludo-game .player-dice {min-height:50px;border-radius:12px}
 body.ludo-game .player-dice .die-face {width:42px;height:42px}
 body.ludo-game .player-dice-label {font-size:.74rem;padding:3px!important}
 body.ludo-game .yard-celebration {width:33%;height:25%;border-radius:11px}
}
@media(prefers-reduced-motion:reduce){body.ludo-game .yard-celebration{animation:none}}
.ludo-game .mahir-die .die-art{display:block;width:100%;height:100%;filter:drop-shadow(0 5px 4px #170700)}
.ludo-game #ludo-setup .setup-features svg{width:34px;height:34px;filter:drop-shadow(0 2px 2px #190800)}
.ludo-game .toolbar-crown{width:34px;height:26px;vertical-align:-6px;filter:drop-shadow(0 2px 2px #170700)}
.ludo-game .player-dice .pip-face{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:2px;padding:7px}
.ludo-game .die-pip{display:block;align-self:center;justify-self:center;width:7px;height:7px;border-radius:50%;background:#27180f;box-shadow:inset 0 1px 1px #0009,0 1px 0 #fff8}
.ludo-game .die-pip.p0{grid-area:1/1}.ludo-game .die-pip.p1{grid-area:1/2}.ludo-game .die-pip.p2{grid-area:1/3}
.ludo-game .die-pip.p3{grid-area:2/1}.ludo-game .die-pip.p4{grid-area:2/2}.ludo-game .die-pip.p5{grid-area:2/3}
.ludo-game .die-pip.p0:nth-last-child(1):not(:only-child){grid-area:3/1}
.ludo-game .mahir-die .die-art{display:block;width:100%;height:100%;filter:drop-shadow(0 5px 4px #170700)}
.ludo-game #ludo-setup .setup-features svg{width:34px;height:34px;filter:drop-shadow(0 2px 2px #190800)}
.ludo-game .toolbar-crown{width:34px;height:26px;vertical-align:-6px;filter:drop-shadow(0 2px 2px #170700)}
.ludo-game .player-dice .pip-face{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:2px;padding:7px}
.ludo-game .die-pip{display:block;align-self:center;justify-self:center;width:7px;height:7px;border-radius:50%;background:#27180f;box-shadow:inset 0 1px 1px #0009,0 1px 0 #fff8}
.ludo-game .die-pip.p0{grid-area:1/1}.ludo-game .die-pip.p1{grid-area:1/3}.ludo-game .die-pip.p2{grid-area:2/2}.ludo-game .die-pip.p3{grid-area:3/1}.ludo-game .die-pip.p4{grid-area:3/3}.ludo-game .die-pip.p5{grid-area:2/1}.ludo-game .die-pip.p6{grid-area:2/3}
.ludo-game .winner-crown{display:block;width:36px;height:26px;margin:0 auto 3px;filter:drop-shadow(0 2px 2px #170700)}
.ludo-game .yard-celebration.rank-1::after{content:"";position:absolute;inset:-25%;pointer-events:none;background:radial-gradient(circle,#fff9a8 0 2px,transparent 3px),radial-gradient(circle,#ffdc57 0 2px,transparent 3px),radial-gradient(circle,#ff8c30 0 2px,transparent 3px);background-size:31px 29px,43px 37px,53px 47px;background-position:0 0,12px 8px,22px 3px;opacity:.7;animation:firework-spark 1.1s steps(2,end) infinite}
@keyframes firework-spark{50%{opacity:.2;background-position:15px -6px,-8px 13px,16px -10px}}

body.ludo-game .ludo-stage {grid-template-areas:"red blue" "board board" "green yellow"}
body.ludo-game .yard-celebration.blue {left:auto;right:3%;top:3%;bottom:auto}
body.ludo-game .yard-celebration.green {left:3%;right:auto;top:auto;bottom:3%}

.ludo-game .rules-dialog{width:min(92vw,540px);color:#fff0d0;border:3px solid #d8a33f;border-radius:20px;background:linear-gradient(145deg,#6d2a10,#29120a);box-shadow:0 16px 50px #000b;padding:22px}
.ludo-game .rules-dialog::backdrop{background:#100703bb;backdrop-filter:blur(3px)}
.ludo-game .rules-dialog h2{color:#ffdf75;font:700 1.7rem Georgia,serif}
.ludo-game .rules-dialog li{margin:.55rem 0}
.ludo-game .rules-dialog button{min-height:46px;color:#4d2506;border:2px solid #fff0a0;border-radius:999px;background:linear-gradient(#ffe66a,#f4a90d);font-weight:800}

body.ludo-game:not(.playing-ludo){background:repeating-linear-gradient(92deg,#2b130b 0 7px,#35190c 8px 14px,#281108 15px 20px)!important;color:#f9ead0}
body.ludo-game.playing-ludo{background:repeating-linear-gradient(92deg,#2b130b 0 7px,#35190c 8px 14px,#281108 15px 20px)!important;color:#f9ead0}
.ludo-game .mahir-field-title .field-mark{width:26px;height:26px;vertical-align:-7px;margin-right:5px;filter:drop-shadow(0 2px 2px #1e0a04)}

body.ludo-game #ludo-play.show-game-settings .game-settings{display:flex!important;position:relative;z-index:4;max-width:650px;margin:10px auto;padding:10px;border:2px solid #d7a03c;border-radius:14px;background:#38180e}
body.ludo-game #ludo-play.show-game-settings .game-settings label{color:#ffe9bb}
body.ludo-game #ludo-play.show-game-settings .game-settings select{min-height:44px}

@media(max-width:600px){
 body.ludo-game .play-toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:5px}
 body.ludo-game .play-toolbar button{min-width:0;max-width:100%;padding:4px 2px;font-size:.68rem;line-height:1.05;white-space:normal}
 body.ludo-game .play-toolbar>span{min-width:0;text-align:center;font-size:.73rem;line-height:1.05}
 body.ludo-game .toolbar-crown{width:24px;height:18px}
}
body.ludo-game #ludo-setup .menu-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;max-width:670px;margin:0 auto}
body.ludo-game #ludo-setup .menu-toolbar a,body.ludo-game #ludo-setup .menu-toolbar button{min-height:44px;display:grid;place-items:center;box-sizing:border-box;padding:7px 14px;border:2px solid #d6a448;border-radius:999px;color:#ffedc7;background:linear-gradient(145deg,#693016,#2b130b);box-shadow:0 3px 0 #1b0b06;font-weight:800;text-decoration:none}
body.ludo-game #ludo-setup .menu-toolbar a:focus-visible,body.ludo-game #ludo-setup .menu-toolbar button:focus-visible{outline:3px solid #d9aaff;outline-offset:2px}

body.ludo-game .board.ludo span{overflow:visible;border-radius:48% 48% 40% 40%;box-shadow:0 2px 0 #39200e,0 5px 0 #c18a2c,0 8px 8px #16080399,inset 0 4px 5px #fff9,inset 0 -5px 6px #0006}
body.ludo-game .board.ludo span::before{content:"";position:absolute;z-index:-1;left:29%;top:-17%;width:42%;height:42%;border:1px solid #fff9;border-radius:50%;background:radial-gradient(circle at 32% 25%,#fff9,transparent 49%),var(--piece-color);box-shadow:0 1px 3px #0007,inset 0 2px #fff7}
body.ludo-game .yard-celebration.rank-2{font-size:.9em}
body.ludo-game .yard-celebration.rank-3{font-size:.8em}
body.ludo-game .yard-celebration.rank-4{font-size:.72em}
/* Reference-matched Ludu Mahir game menu. All illustrations are original inline SVG/CSS. */
body.ludo-game {background:repeating-linear-gradient(0deg,#2b1209 0 18px,#3c1a0c 19px 28px,#301409 29px 41px,#4a200e 42px 47px)!important;color:#fff1d7}
body.ludo-game::before {content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 50% 28%,#a84e1d55,transparent 56%),repeating-linear-gradient(91deg,transparent 0 22px,#17090420 23px 25px,transparent 27px 61px)}
body.ludo-game main {width:100%;max-width:none;padding:0!important}
body.ludo-game main>nav {display:none!important}
body.ludo-game #ludo-setup {display:block;width:min(100%,960px);max-width:960px;margin:0 auto;padding:clamp(6px,1.6vw,18px);box-sizing:border-box}
body.ludo-game #ludo-setup .mahir-menu {position:relative;isolation:isolate;overflow:hidden;width:100%;padding:clamp(5px,1.2vw,12px);box-sizing:border-box}
body.ludo-game #ludo-setup .mahir-menu::before,body.ludo-game #ludo-setup .mahir-menu::after {content:"";position:absolute;z-index:-1;top:11%;width:10%;height:19%;opacity:.72;background:radial-gradient(ellipse at 45% 15%,#67a51b 0 16%,transparent 18%),radial-gradient(ellipse at 65% 40%,#428716 0 18%,transparent 20%),radial-gradient(ellipse at 28% 60%,#73a925 0 17%,transparent 19%);filter:drop-shadow(0 2px 3px #102600)}
body.ludo-game #ludo-setup .mahir-menu::before {left:-1%;transform:rotate(-20deg)}
body.ludo-game #ludo-setup .mahir-menu::after {right:-1%;transform:scaleX(-1) rotate(-20deg)}
body.ludo-game #ludo-setup .menu-svg-defs {position:absolute;width:0;height:0;overflow:hidden}
body.ludo-game #ludo-setup .menu-topbar {display:grid;grid-template-columns:clamp(48px,8vw,80px) minmax(0,1fr) auto;align-items:start;gap:clamp(4px,1.2vw,12px);min-height:clamp(92px,18vw,180px);position:relative}
body.ludo-game #ludo-setup .menu-round-button {display:grid;place-items:center;width:clamp(48px,8vw,80px);height:clamp(48px,8vw,80px);padding:6px;border:3px solid #f5d17a;border-radius:50%;box-sizing:border-box;background:radial-gradient(circle at 35% 27%,#9b5a25,#431c0d 68%,#241008);box-shadow:0 0 0 2px #652d12,0 4px 7px #150700,inset 0 1px #fff8;cursor:pointer}
body.ludo-game #ludo-setup .menu-round-button svg {display:block;width:100%;height:100%;filter:drop-shadow(0 2px 2px #170802)}
body.ludo-game #ludo-setup .menu-round-button:hover,body.ludo-game #ludo-setup .menu-round-button:focus-visible {outline:3px solid #fff0a1;outline-offset:2px;box-shadow:0 0 16px #ffd243,0 4px 7px #150700}
body.ludo-game #ludo-setup .menu-top-actions {display:flex;gap:clamp(5px,1.2vw,12px)}
body.ludo-game #ludo-setup .brand-lockup {position:relative;justify-self:center;align-self:start;width:min(100%,650px);height:clamp(92px,18vw,180px);text-align:center;filter:drop-shadow(0 6px 6px #160701)}
body.ludo-game #ludo-setup .brand-crown {position:absolute;z-index:3;top:-2%;left:50%;width:clamp(78px,15vw,148px);height:auto;transform:translateX(-50%)}
body.ludo-game #ludo-setup .brand-laurel {position:absolute;z-index:1;top:18%;width:clamp(40px,11vw,108px);height:76%}
body.ludo-game #ludo-setup .laurel-left {left:1%}
body.ludo-game #ludo-setup .laurel-right {right:1%}
body.ludo-game #ludo-setup .brand-die {position:absolute;z-index:3;top:23%;width:clamp(32px,8vw,72px);height:auto;filter:drop-shadow(0 4px 3px #170700)}
body.ludo-game #ludo-setup .brand-die.die-left {left:8%;transform:rotate(-13deg)}
body.ludo-game #ludo-setup .brand-die.die-right {right:8%;transform:rotate(12deg)}
body.ludo-game #ludo-setup .menu-wordmark {position:absolute;z-index:2;left:12%;right:12%;top:36%;display:grid;justify-items:center;padding:0 4%;color:#ffdc64;font:italic 900 clamp(2rem,7.4vw,4.3rem)/.85 Georgia,serif;letter-spacing:-.04em;text-shadow:0 2px #ffe9a0,0 4px #9f4d0d,0 7px #461a08,0 11px 9px #0d0401}
body.ludo-game #ludo-setup .menu-wordmark strong {color:#fff5e5;font-size:.92em}
body.ludo-game #ludo-setup .brand-underline {position:absolute;left:15%;right:15%;bottom:8%;height:18%;border-bottom:5px solid #eab640;border-radius:0 0 50% 50%;filter:drop-shadow(0 3px 2px #401504)}
body.ludo-game #ludo-setup .menu-ribbon {position:relative;display:grid;place-items:center;width:min(56%,540px);height:clamp(48px,10vw,94px);margin:clamp(3px,1vw,12px) auto clamp(14px,2.2vw,22px);border:3px solid #ffdb69;border-radius:13px 13px 18px 18px;box-sizing:border-box;background:linear-gradient(#fa4b3f 0,#c81718 48%,#8b0d12 100%);box-shadow:0 5px 0 #5c150d,0 8px 15px #140500,inset 0 2px #fff8;color:#fff1cc;font:900 clamp(1.45rem,5.5vw,3.2rem) Georgia,serif;text-shadow:0 3px #6d170d,0 5px 3px #2c0903;transform:perspective(180px) rotateX(-3deg)}
body.ludo-game #ludo-setup .menu-ribbon::before,body.ludo-game #ludo-setup .menu-ribbon::after {content:"";position:absolute;z-index:-1;top:23%;width:15%;height:62%;background:linear-gradient(#ef4335,#9a1011);border:2px solid #e49b31;box-shadow:0 3px #5b170c}
body.ludo-game #ludo-setup .menu-ribbon::before {left:-13%;clip-path:polygon(0 0,100% 0,100% 70%,70% 100%,0 82%,23% 55%)}
body.ludo-game #ludo-setup .menu-ribbon::after {right:-13%;clip-path:polygon(0 0,100% 0,77% 55%,100% 82%,30% 100%,0 70%)}
body.ludo-game #ludo-setup .mode-cards {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(8px,2vw,20px);margin:0 0 clamp(5px,1.2vw,12px)}
body.ludo-game #ludo-setup .mode-card {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(2px,.7vw,8px);min-width:0;min-height:clamp(112px,21vw,205px);padding:clamp(6px,1.5vw,15px);border:3px solid #bd7b32;border-radius:clamp(15px,3vw,30px);box-sizing:border-box;background:radial-gradient(ellipse at 48% 35%,#7b3518,#43190d 68%,#291008);box-shadow:0 5px 0 #2a1008,0 8px 12px #160802,inset 0 2px #fff8;color:#fff5e4;text-shadow:0 3px #421605,0 5px 3px #130500;font:900 clamp(1rem,3.8vw,2rem) Georgia,serif;cursor:pointer}
body.ludo-game #ludo-setup .mode-card svg {width:clamp(48px,9vw,92px);height:clamp(38px,8vw,83px);filter:drop-shadow(0 4px 3px #170700)}
body.ludo-game #ludo-setup .mode-card span {display:grid;line-height:1.03}
body.ludo-game #ludo-setup .mode-card small {margin-top:3px;font-size:.72em}
body.ludo-game #ludo-setup .mode-card.selected {border-color:#ffdb35;box-shadow:0 0 0 2px #ffcf29,0 0 16px #ffd225,0 6px 0 #68400d,inset 0 2px #fff9;background:radial-gradient(ellipse at 48% 30%,#8c3b15,#48190b 74%)}
body.ludo-game #ludo-setup .mode-card:focus-visible {outline:3px solid #fff2a9;outline-offset:3px}
body.ludo-game #ludo-setup .online-note {display:flex;justify-content:center;align-items:center;gap:8px;min-height:30px;margin:-3px auto 5px;padding:3px 12px;border:0;background:transparent;color:#f7d99f;font:700 clamp(.68rem,1.6vw,.9rem) system-ui;cursor:pointer}
body.ludo-game #ludo-setup .online-note span {padding:2px 8px;border:1px solid #a9783b;border-radius:999px;color:#e7c78e;font-size:.84em}
body.ludo-game #ludo-setup .online-note:hover span,body.ludo-game #ludo-setup .online-note:focus-visible span {border-color:#ffe27d;color:#fff0c5}
body.ludo-game #ludo-setup .menu-features {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(7px,1.5vw,15px);margin:clamp(6px,1.4vw,14px) 0}
body.ludo-game #ludo-setup .menu-features button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(3px,.7vw,8px);min-width:0;min-height:clamp(82px,18vw,174px);padding:6px;border:3px solid #c8893a;border-radius:clamp(14px,2.4vw,24px);box-sizing:border-box;background:radial-gradient(ellipse at 50% 32%,#743016,#3d170c 74%);box-shadow:0 5px 0 #291008,0 8px 11px #170802,inset 0 2px #fff8;color:#fff4df;text-shadow:0 2px #42190a;font:800 clamp(.76rem,2.4vw,1.35rem) Georgia,serif;cursor:pointer}
body.ludo-game #ludo-setup .menu-features svg {width:clamp(34px,7vw,68px);height:clamp(34px,7vw,68px);filter:drop-shadow(0 4px 3px #160701)}
body.ludo-game #ludo-setup .menu-features button:hover,body.ludo-game #ludo-setup .menu-features button:focus-visible {outline:3px solid #ffdf70;outline-offset:2px;box-shadow:0 0 15px #ffd747,0 5px 0 #291008}
body.ludo-game #ludo-setup .player-count-panel {margin:clamp(5px,1vw,10px) 0 clamp(10px,2vw,20px);padding:clamp(8px,1.5vw,15px) clamp(10px,3vw,28px) clamp(10px,2.3vw,22px);border:3px solid #d5902c;border-radius:clamp(18px,3vw,28px);box-sizing:border-box;background:linear-gradient(145deg,#54220f,#35150c 56%,#4d200f);box-shadow:0 5px 0 #230d06,0 9px 14px #160701,inset 0 2px #fff7}
body.ludo-game #ludo-setup .player-count-panel h2 {margin:0 0 clamp(7px,1.4vw,14px);text-align:center;color:#ffe794;font:900 clamp(1.05rem,3.7vw,2rem) Georgia,serif;text-shadow:0 2px #69310e}
body.ludo-game #ludo-setup .player-count-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(6px,1.6vw,15px)}
body.ludo-game #ludo-setup .player-count-options button {display:flex;align-items:center;justify-content:center;gap:clamp(4px,.9vw,9px);min-width:0;min-height:clamp(50px,8.4vw,82px);padding:5px clamp(3px,1.2vw,12px);border:2px solid #d29a4c;border-radius:clamp(13px,2.4vw,23px);box-sizing:border-box;background:linear-gradient(145deg,#7a421e,#3f1b0d 75%);box-shadow:0 4px 0 #281007,inset 0 2px #fff7;color:#fff1d8;font:800 clamp(.7rem,2.2vw,1.25rem) Georgia,serif;text-shadow:0 2px #401806;cursor:pointer}
body.ludo-game #ludo-setup .player-count-options svg {flex:0 0 auto;width:clamp(22px,4.8vw,45px);height:clamp(25px,5vw,48px);filter:drop-shadow(0 2px 2px #160701)}
body.ludo-game #ludo-setup .player-count-options button.selected {border:3px solid #fff0a0;background:linear-gradient(#fa322c,#c21119 65%,#861012);box-shadow:0 0 0 2px #ee9d2c,0 0 15px #ffcf2d,0 4px 0 #55130c,inset 0 2px #fff9}
body.ludo-game #ludo-setup .player-count-options button:focus-visible {outline:3px solid #fff3a6;outline-offset:2px}
body.ludo-game #ludo-setup .start-game {display:flex;align-items:center;justify-content:center;gap:clamp(8px,1.6vw,16px);width:min(68%,630px);min-width:250px;min-height:clamp(58px,12vw,116px);margin:0 auto clamp(2px,.6vw,6px);padding:8px 20px;border:4px solid #fff0a2;border-radius:999px;box-sizing:border-box;background:linear-gradient(180deg,#fff17c 0,#ffd02f 48%,#f4a20b 100%);box-shadow:0 5px 0 #84400c,0 10px 17px #150700,inset 0 2px #fff;color:#542405;text-shadow:0 2px #fff0b2;font:900 clamp(1.45rem,5vw,2.8rem) Georgia,serif;cursor:pointer}
body.ludo-game #ludo-setup .start-game svg {width:clamp(22px,5vw,48px);height:clamp(26px,5.6vw,55px);filter:drop-shadow(0 2px 1px #783700)}
body.ludo-game #ludo-setup .start-game:hover,body.ludo-game #ludo-setup .start-game:focus-visible {outline:3px solid #fff6bd;outline-offset:3px;filter:brightness(1.07);box-shadow:0 0 18px #ffd94b,0 5px 0 #84400c,0 10px 17px #150700,inset 0 2px #fff}
body.ludo-game #ludo-setup .menu-footer-art {position:relative;height:clamp(72px,15vw,144px);margin-top:clamp(4px,1vw,10px);overflow:hidden}
body.ludo-game #ludo-setup .footer-pawns {position:absolute;bottom:-10%;display:flex;align-items:flex-end;gap:3%;width:20%;height:100%}
body.ludo-game #ludo-setup .footer-pawns.left {left:0}
body.ludo-game #ludo-setup .footer-pawns.right {right:0;flex-direction:row-reverse}
body.ludo-game #ludo-setup .footer-pawns .pawn {position:relative;display:block;width:44%;height:78%;border:2px solid #ffeaa1;border-radius:45% 45% 35% 35%;box-sizing:border-box;box-shadow:0 5px 0 #56200a,0 8px 7px #120500,inset 0 3px 4px #fff9;background:var(--pawn)}
body.ludo-game #ludo-setup .footer-pawns .pawn::before {content:"";position:absolute;left:13%;top:-25%;width:74%;height:54%;border:2px solid #ffeaa1;border-radius:50%;box-sizing:border-box;background:radial-gradient(circle at 32% 24%,#fff9,transparent 46%),var(--pawn);box-shadow:0 3px 4px #210900,inset 0 2px #fff8}
body.ludo-game #ludo-setup .footer-pawns .red {--pawn:radial-gradient(circle at 32% 23%,#ffb0a1,#f02d36 53%,#97112b)}
body.ludo-game #ludo-setup .footer-pawns .blue {--pawn:radial-gradient(circle at 32% 23%,#c4f3ff,#168df5 53%,#103d9d)}
body.ludo-game #ludo-setup .footer-pawns .green {--pawn:radial-gradient(circle at 32% 23%,#caffbb,#18c451 53%,#087333)}
body.ludo-game #ludo-setup .footer-pawns .yellow {--pawn:radial-gradient(circle at 32% 23%,#fff4a0,#ffc20f 53%,#a36608)}
body.ludo-game #ludo-setup .footer-pawns .pawn:nth-child(1){height:68%}
body.ludo-game #ludo-setup .footer-die {position:absolute;top:18%;width:clamp(45px,10vw,92px);height:auto;filter:drop-shadow(0 7px 5px #160700)}
body.ludo-game #ludo-setup .footer-die.die-one {left:42%;transform:rotate(-9deg)}
body.ludo-game #ludo-setup .footer-die.die-two {left:51%;transform:rotate(8deg)}
body.ludo-game #ludo-setup .rules-dialog {max-width:min(540px,92vw)}
body.ludo-game #ludo-setup .settings-dialog,.ludo-game .menu-colors-dialog {font-family:system-ui,sans-serif}
body.ludo-game #ludo-setup .setting-row {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0;color:#ffedcc}
body.ludo-game #ludo-setup .setting-row input {width:22px;height:22px;accent-color:#a85df0}
body.ludo-game #ludo-setup .setting-row select,body.ludo-game #ludo-setup .menu-colors-dialog select {min-height:44px;padding:7px 12px}
body.ludo-game #ludo-setup .dialog-actions {display:flex;gap:10px;justify-content:flex-end}
body.ludo-game #ludo-setup .menu-colors-dialog label {margin-top:10px;color:#ffe4ad}
body.ludo-game #ludo-setup .menu-colors-dialog select {width:100%;margin:4px 0 10px}
body.ludo-game #ludo-setup .menu-colors-dialog #menu-color-confirmation {min-height:1.3em;color:#ffdf82}
@media(max-width:500px) {
 body.ludo-game #ludo-setup {padding:5px}
 body.ludo-game #ludo-setup .mahir-menu {padding:3px}
 body.ludo-game #ludo-setup .menu-topbar {grid-template-columns:46px minmax(0,1fr) auto;gap:3px;min-height:91px}
 body.ludo-game #ludo-setup .menu-topbar>.menu-round-button,body.ludo-game #ludo-setup .menu-top-actions .menu-round-button {width:44px;height:44px;padding:4px;border-width:2px}
 body.ludo-game #ludo-setup .menu-top-actions {gap:4px}
 body.ludo-game #ludo-setup .brand-lockup {height:91px}
 body.ludo-game #ludo-setup .brand-crown {width:72px}
 body.ludo-game #ludo-setup .menu-wordmark {top:39%;font-size:clamp(1.7rem,8.4vw,2.25rem);left:10%;right:10%}
 body.ludo-game #ludo-setup .brand-die {top:32%;width:30px}
 body.ludo-game #ludo-setup .brand-die.die-left {left:2%}
 body.ludo-game #ludo-setup .brand-die.die-right {right:2%}
 body.ludo-game #ludo-setup .brand-laurel {top:20%;height:68%;width:37px}
 body.ludo-game #ludo-setup .menu-ribbon {width:58%;height:48px;margin:1px auto 12px;font-size:1.55rem}
 body.ludo-game #ludo-setup .mode-card {min-height:104px;border-width:2px;font-size:clamp(.78rem,3.5vw,1rem)}
 body.ludo-game #ludo-setup .mode-card svg {width:49px;height:41px}
 body.ludo-game #ludo-setup .menu-features {gap:5px;margin:7px 0}
 body.ludo-game #ludo-setup .menu-features button {min-height:79px;padding:4px;border-width:2px;font-size:clamp(.68rem,3vw,.86rem)}
 body.ludo-game #ludo-setup .menu-features svg {width:36px;height:36px}
 body.ludo-game #ludo-setup .player-count-panel {padding:8px 7px 10px;margin:6px 0 9px;border-width:2px}
 body.ludo-game #ludo-setup .player-count-panel h2 {font-size:1.12rem;margin-bottom:7px}
 body.ludo-game #ludo-setup .player-count-options {gap:5px}
 body.ludo-game #ludo-setup .player-count-options button {min-height:50px;gap:3px;padding:4px 2px;border-radius:12px;font-size:clamp(.61rem,2.7vw,.74rem)}
 body.ludo-game #ludo-setup .player-count-options svg {width:22px;height:25px}
 body.ludo-game #ludo-setup .start-game {width:72%;min-width:0;min-height:58px;margin-top:0;font-size:1.55rem;border-width:3px}
 body.ludo-game #ludo-setup .menu-footer-art {height:74px;margin-top:2px}
 body.ludo-game #ludo-setup .footer-die {width:42px}
 body.ludo-game #ludo-setup .footer-pawns {width:19%}
 body.ludo-game #ludo-setup .online-note {min-height:25px;font-size:.68rem}
}
@media(prefers-reduced-motion:reduce) {
 body.ludo-game #ludo-setup * {scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}

body.ludo-game .settings-dialog .setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0;color:#ffedcc}
body.ludo-game .settings-dialog .setting-row input{width:22px;height:22px;accent-color:#ffcc35}
body.ludo-game .settings-dialog .setting-row select,body.ludo-game .menu-colors-dialog select{min-height:44px;padding:7px 12px}
body.ludo-game .settings-dialog p{color:#f3ddbb}
body.ludo-game .menu-colors-dialog label{display:block;margin-top:10px;color:#ffe4ad}
body.ludo-game .menu-colors-dialog select{width:100%;margin:4px 0 10px}
body.ludo-game .menu-colors-dialog #menu-color-confirmation{min-height:1.3em;color:#ffdf82}
body.ludo-game .rules-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px}
body.ludo-game .rules-dialog button{min-height:44px}
body.ludo-game #ludo-setup .settings-dialog #online-coming{display:block;width:100%;min-height:48px;margin:12px 0}


/* Let the portrait reference fill the viewport width at its native 960px design size. */
body.ludo-game main {width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.ludo-game #ludo-setup.ludo-setup {display:block!important;width:min(100%,960px)!important;max-width:960px!important;min-height:0!important;margin:0 auto!important;padding:clamp(6px,1.6vw,18px)!important;gap:0!important;border:0!important;border-radius:0!important;background:transparent!important}
body.ludo-game {margin:0!important;padding:0!important}
body.ludo-game {
  background:repeating-linear-gradient(0deg,#2b1209 0 47px,#56260f 48px,#39180a 52px,#261006 83px)!important;
}
body.ludo-game::before {
  background:radial-gradient(ellipse at 50% 24%,#9b481b70,transparent 62%),repeating-linear-gradient(0deg,transparent 0 82px,#16080288 83px,#7a39174d 86px,transparent 91px),repeating-linear-gradient(2deg,transparent 0 12px,#ad642012 13px,#11060322 15px,transparent 19px)!important;
}
body.ludo-game #ludo-setup .brand-artwork {position:absolute;z-index:1;left:50%;top:0;transform:translateX(-50%);width:min(100%,720px);height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 5px 5px #170702)}
body.ludo-game #ludo-setup .brand-lockup>.brand-laurel,body.ludo-game #ludo-setup .brand-lockup>.brand-die,body.ludo-game #ludo-setup .brand-lockup>.brand-crown {display:none}
body.ludo-game #ludo-setup .menu-wordmark {z-index:2}
body.ludo-game #ludo-setup .footer-artwork {position:absolute;z-index:1;left:0;bottom:0;width:100%;height:auto;pointer-events:none;filter:drop-shadow(0 5px 4px #160700)}
body.ludo-game #ludo-setup .footer-pawns,body.ludo-game #ludo-setup .menu-footer-art>.footer-die {display:none}
body.ludo-game #ludo-setup .footer-artwork {left:50%;width:min(95vw,840px);height:auto;transform:translateX(-50%)}
@media(min-width:501px){body.ludo-game #ludo-setup .menu-footer-art{height:clamp(130px,18vw,174px)}}
body.ludo-game #ludo-setup[hidden],body.ludo-game #ludo-play[hidden]{display:none!important}
body.ludo-game .board.ludo .home-base.inactive-home{background:linear-gradient(145deg,#faf4e5,#e9ddc4)!important;border-color:#a98a5d}
body.ludo-game .board.ludo .yard.inactive-yard{display:none!important}
body.ludo-game .board.ludo .lane.inactive-lane{background:linear-gradient(145deg,#fffef7,#e9dfcb)!important}

/* Board-only scene: the setup controls stay behind the settings button. */
body.ludo-game.playing-ludo{min-height:100dvh;background:
  radial-gradient(ellipse at 50% 28%,#81451d 0,transparent 58%),
  repeating-linear-gradient(0deg,transparent 0 16px,#17080121 17px,#d18a3c12 19px,transparent 22px),
  repeating-linear-gradient(2deg,#35170a 0 22px,#55270f 23px,#3a190a 27px,#633217 31px,#2a1107 37px)!important;color:#f9ead0}
body.ludo-game.playing-ludo::before{background:radial-gradient(ellipse at 50% 45%,#9f571a24,transparent 72%),repeating-linear-gradient(0deg,transparent 0 68px,#10050044 69px,#a8571c22 72px,transparent 76px)!important}
body.ludo-game.playing-ludo main{box-sizing:border-box;width:100%!important;max-width:1020px!important;margin:0 auto!important;padding:clamp(4px,1vw,10px)!important}
body.ludo-game.playing-ludo #ludo-play>h1,
body.ludo-game.playing-ludo #ludo-play>p:not(#status):not(.color-hint),
body.ludo-game.playing-ludo #status,
body.ludo-game.playing-ludo .color-hint,
body.ludo-game.playing-ludo #actions,
body.ludo-game.playing-ludo .rules{display:none!important}
body.ludo-game.playing-ludo #ludo-play .game-settings{display:none!important}
body.ludo-game.playing-ludo #ludo-play.show-game-settings .game-settings{display:flex!important;position:absolute;z-index:8;top:70px;left:50%;transform:translateX(-50%);width:min(94vw,650px);margin:0}
body.ludo-game.playing-ludo .ludo-stage{grid-template-areas:"red green" "board board" "blue yellow";width:min(100%,940px);max-width:940px;gap:clamp(5px,1vw,10px);margin:4px auto 12px}
body.ludo-game.playing-ludo .board.ludo{width:min(100%,min(83vh,900px));aspect-ratio:1;margin:0 auto}
body.ludo-game.playing-ludo .player-dice:not(.active){opacity:.3!important;filter:saturate(.55) brightness(.68)}
body.ludo-game.playing-ludo .player-dice.active{opacity:1!important;filter:none;box-shadow:0 0 0 2px #ffdf7a,0 0 18px color-mix(in srgb,var(--custom-seat-color,#ffca38) 68%,transparent),0 5px 0 #1c0903,inset 0 2px #fff8}
body.ludo-game.playing-ludo .player-dice.active .die-face{border-color:#fff0ad;box-shadow:0 0 0 2px color-mix(in srgb,var(--custom-seat-color,#ffca38) 68%,#fff),0 0 15px color-mix(in srgb,var(--custom-seat-color,#ffca38) 75%,transparent),inset 0 2px #fff,0 4px 0 #70502d,0 7px 10px #100600}
body.ludo-game.playing-ludo .player-dice .die-face.rolling{animation:ludu-die-tumble .62s cubic-bezier(.22,.72,.22,1) both!important}
@keyframes ludu-die-tumble{0%{transform:rotate(0) scale(1)}18%{transform:rotate(28deg) translateY(-7px) scale(1.08)}36%{transform:rotate(-42deg) translateY(2px)}55%{transform:rotate(34deg) translateY(-5px) scale(1.04)}74%{transform:rotate(-18deg) translateY(1px)}100%{transform:rotate(0) translateY(0) scale(1)}}
@media(max-width:620px){
 body.ludo-game.playing-ludo main{padding:3px!important}
 body.ludo-game.playing-ludo .play-toolbar{margin-bottom:2px}
 body.ludo-game.playing-ludo .ludo-stage{gap:4px;margin:2px auto 6px}
 body.ludo-game.playing-ludo .board.ludo{width:min(100%,min(83vh,100vw));padding:4px;border-width:5px;border-radius:14px}
 body.ludo-game.playing-ludo .player-dice{min-height:48px;padding:3px;gap:4px;border-radius:13px}
 body.ludo-game.playing-ludo .player-dice .die-face{width:42px;height:42px;border-radius:11px}
}
body.ludo-game.playing-ludo .board.ludo .home-base.home-progress{animation:yard-progress-glow 1.8s ease-in-out infinite alternate}
@keyframes yard-progress-glow{from{box-shadow:inset 0 0 0 3px #5f250e66,inset 0 4px 12px #fff7,0 3px 6px #17080388}to{box-shadow:inset 0 0 0 3px #fff6,inset 0 4px 18px #fff9,0 0 14px color-mix(in srgb,var(--yard-color,#ffd55a) 70%,transparent),0 3px 6px #17080388}}
body.ludo-game.playing-ludo .board.ludo .home-base.home-progress{--yard-color:var(--seat-0,#ffd55a)}
body.ludo-game.playing-ludo .board.ludo .home-base.base-1.home-progress{--yard-color:var(--seat-1,#ffd55a)}
body.ludo-game.playing-ludo .board.ludo .home-base.base-2.home-progress{--yard-color:var(--seat-2,#ffd55a)}
body.ludo-game.playing-ludo .board.ludo .home-base.base-3.home-progress{--yard-color:var(--seat-3,#ffd55a)}
body.ludo-game.playing-ludo .board.ludo span.moving{animation:ludu-pawn-hop .32s cubic-bezier(.2,.72,.3,1) both}
@keyframes ludu-pawn-hop{0%{transform:translateY(0) scale(1)}40%{transform:translateY(-7px) scale(1.09)}76%{transform:translateY(1px) scale(.98)}100%{transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){body.ludo-game.playing-ludo .board.ludo .home-base.home-progress,body.ludo-game.playing-ludo .board.ludo span.moving{animation-duration:.01ms!important}}
body.ludo-game .ludo-stage{grid-template-areas:"red green" "board board" "blue yellow";max-width:min(100%,940px);width:100%}
body.ludo-game .board.ludo{width:min(100%,900px)}
body.ludo-game .player-dice-label{display:flex;flex:1 1 auto;min-width:0;min-height:48px;align-items:center;justify-content:center;gap:6px;padding:4px 7px!important;border:2px solid var(--custom-seat-color,#d7a84d)!important;border-radius:999px!important;background:linear-gradient(145deg,color-mix(in srgb,var(--custom-seat-color,#895329) 74%,#fff2),#32170d)!important;color:#fff5e4!important;font-size:clamp(.72rem,2vw,1rem);text-align:center;text-shadow:0 2px 2px #280e05}
body.ludo-game .player-dice-label::before{display:none}
body.ludo-game .player-avatar{display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;border:3px solid #f5d27a;border-radius:50%;background:radial-gradient(circle at 35% 24%,#a7754d,#422014 72%);box-shadow:0 2px 5px #160700,inset 0 1px #fff9}
body.ludo-game .player-avatar svg{display:block;width:80%;height:80%;filter:drop-shadow(0 1px 1px #200d06)}
body.ludo-game .yard-celebration.red{left:3%;right:auto;top:3%;bottom:auto}
body.ludo-game .yard-celebration.green{left:auto;right:3%;top:3%;bottom:auto}
body.ludo-game .yard-celebration.blue{left:3%;right:auto;top:auto;bottom:3%}
body.ludo-game .yard-celebration.yellow{left:auto;right:3%;top:auto;bottom:3%}
@media(max-width:620px){body.ludo-game .player-dice-label{gap:4px;padding:3px!important;font-size:.66rem}body.ludo-game .player-avatar{width:34px;height:34px;border-width:2px}body.ludo-game .player-dice{gap:4px;padding:3px}}

/* Reference board: raised ivory path, inset colored yards, and glossy live pawns. */
body.ludo-game .ludo-stage{width:min(100%,940px);max-width:940px;gap:clamp(5px,1vw,10px);grid-template-areas:"red green" "board board" "blue yellow";margin:4px auto 12px}
body.ludo-game .board.ludo{width:min(100%,min(83vh,900px));padding:clamp(5px,1vw,10px);border:clamp(7px,1.3vw,13px) ridge #efc65b;border-radius:clamp(14px,2.7vw,28px);background:repeating-linear-gradient(3deg,#7e411a 0 5px,#9d5c28 6px 9px,#6d3514 10px 13px);box-shadow:0 8px 0 #56270f,0 15px 28px #120702aa,inset 0 3px #fff5c4}
body.ludo-game .board.ludo div:not(.home-base):not(.home-diamond):not(.yard-celebration){border:1px solid #c3b49a;border-radius:3px;background:linear-gradient(145deg,#fffef7 0,#f1e9d9 70%,#d9cdb9 100%);box-shadow:inset 0 2px #fff,0 2px 2px #5c361b55}
body.ludo-game .board.ludo .track.safe{background:linear-gradient(145deg,#fff2a4,#f0bd37 75%,#c9851c)!important}
body.ludo-game .board.ludo .home-base{position:relative;border:3px solid #ffd96e;border-radius:clamp(10px,2vw,22px);box-shadow:inset 0 0 0 3px #5f250e66,inset 0 4px 12px #fff7,0 3px 6px #17080388;overflow:hidden}
body.ludo-game .board.ludo .home-base::after{content:"";position:absolute;inset:8%;border:3px solid #ffd872aa;border-radius:20%;background:radial-gradient(ellipse at 35% 24%,#ffffff20,transparent 64%),linear-gradient(145deg,#ffffff12,#350b1618);box-shadow:inset 0 4px 10px #1e090a55,0 2px 4px #fff2;pointer-events:none}
body.ludo-game .board.ludo .home-base.base-0{background:radial-gradient(ellipse at 30% 20%,color-mix(in srgb,var(--seat-0,#e83e4e) 72%,white),var(--seat-0,#e83e4e) 55%,color-mix(in srgb,var(--seat-0,#e83e4e) 66%,#330b12))}
body.ludo-game .board.ludo .home-base.base-1{background:radial-gradient(ellipse at 30% 20%,color-mix(in srgb,var(--seat-1,#2588e8) 72%,white),var(--seat-1,#2588e8) 55%,color-mix(in srgb,var(--seat-1,#2588e8) 66%,#071c49))}
body.ludo-game .board.ludo .home-base.base-2{background:radial-gradient(ellipse at 30% 20%,color-mix(in srgb,var(--seat-2,#27bf70) 72%,white),var(--seat-2,#27bf70) 55%,color-mix(in srgb,var(--seat-2,#27bf70) 66%,#063b20))}
body.ludo-game .board.ludo .home-base.base-3{background:radial-gradient(ellipse at 30% 20%,color-mix(in srgb,var(--seat-3,#f2be30) 72%,white),var(--seat-3,#f2be30) 55%,color-mix(in srgb,var(--seat-3,#f2be30) 66%,#633408))}
body.ludo-game .board.ludo .yard{z-index:3;overflow:visible;background:transparent!important;border:0!important;border-radius:50%!important;box-shadow:none!important}
body.ludo-game .board.ludo .yard::after{display:block;inset:8%;border:clamp(2px,.35vw,4px) solid #e6b84d;border-radius:50%;background:radial-gradient(circle at 29% 22%,#fffdf7,#f4e5c9 66%,#c8a874);box-shadow:inset 0 3px 7px #76512877,0 3px 5px #32160999,0 0 0 2px #fff3}
body.ludo-game .board.ludo .lane.red{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-0,#e83e4e) 70%,white),var(--seat-0,#e83e4e) 55%,color-mix(in srgb,var(--seat-0,#e83e4e) 75%,#310814))!important}
body.ludo-game .board.ludo .lane.blue{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-1,#2588e8) 70%,white),var(--seat-1,#2588e8) 55%,color-mix(in srgb,var(--seat-1,#2588e8) 75%,#06143a))!important}
body.ludo-game .board.ludo .lane.green{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-2,#27bf70) 70%,white),var(--seat-2,#27bf70) 55%,color-mix(in srgb,var(--seat-2,#27bf70) 75%,#052914))!important}
body.ludo-game .board.ludo .lane.yellow{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-3,#f2be30) 70%,white),var(--seat-3,#f2be30) 55%,color-mix(in srgb,var(--seat-3,#f2be30) 75%,#462505))!important}
body.ludo-game .board.ludo span{z-index:4;width:62%;height:78%;aspect-ratio:auto;display:block;overflow:visible;border:2px solid #f8dd8a;border-radius:48% 48% 34% 34%;background:linear-gradient(105deg,#fff9,transparent 30%,#0006 88%),linear-gradient(145deg,color-mix(in srgb,var(--piece-color) 72%,white),var(--piece-color) 54%,color-mix(in srgb,var(--piece-color) 65%,#210904))!important;box-shadow:inset 2px 3px 4px #fff9,inset -3px -4px 5px #17080199,0 3px 0 #6f3b11,0 6px 7px #160803aa;color:transparent;font-size:0;line-height:0}
body.ludo-game .board.ludo span::before{content:"";position:absolute;z-index:2;left:18%;top:-23%;width:64%;height:52%;border:2px solid #f8dd8a;border-radius:50%;background:radial-gradient(circle at 27% 21%,#fff 0,#ffffffb0 12%,transparent 34%),radial-gradient(circle at 35% 28%,color-mix(in srgb,var(--piece-color) 68%,white),var(--piece-color) 58%,color-mix(in srgb,var(--piece-color) 64%,#210904));box-shadow:inset -2px -3px 4px #18080199,0 2px 3px #16080388}
body.ludo-game .board.ludo span::after{content:"";position:absolute;left:-9%;bottom:0;width:118%;height:15%;border:2px solid #f4c452;border-radius:50%;background:linear-gradient(#fff1ad,#d89522 48%,#77400e);box-shadow:0 2px 2px #250d04aa,inset 0 2px #fff8;pointer-events:none}
body.ludo-game .board.ludo .home-diamond{border:2px solid #fff1b2;box-shadow:inset 0 0 0 2px #6b3a1677,0 0 8px #34150977}
body.ludo-game .player-dice{min-height:clamp(56px,7vw,72px);padding:5px clamp(5px,1vw,10px);gap:clamp(4px,.8vw,9px);border:2px solid color-mix(in srgb,var(--custom-seat-color,#d7a03c) 75%,#fff);border-radius:20px;background:linear-gradient(145deg,#572812,#251009);box-shadow:0 4px 0 #1b0a04,inset 0 2px #fff5}
body.ludo-game .player-dice .die-face{width:clamp(46px,6vw,64px);height:clamp(46px,6vw,64px);border:3px solid #d5b16d;border-radius:15px;background:linear-gradient(145deg,#fffefa,#e3d6c0 72%,#b7a58a);box-shadow:inset 0 2px #fff,0 4px 0 #70502d,0 7px 10px #100600;font-size:0}
body.ludo-game .player-dice .die-pip{width:clamp(5px,.75vw,8px);height:clamp(5px,.75vw,8px);background:radial-gradient(circle at 28% 22%,#4b3c30,#150e09 70%);box-shadow:inset 0 1px 1px #0009,0 1px #fff7}
body.ludo-game .play-toolbar{display:grid;grid-template-columns:clamp(48px,7vw,72px) minmax(0,1fr) clamp(48px,7vw,72px) clamp(48px,7vw,72px);align-items:center;gap:clamp(5px,1.2vw,12px);max-width:940px;margin:0 auto 6px;padding:4px 8px;border:0;border-radius:0;background:transparent;box-shadow:none}
body.ludo-game .play-toolbar .board-round-button{display:grid;place-items:center;width:clamp(46px,7vw,68px);height:clamp(46px,7vw,68px);min-height:0;padding:6px;border:3px solid #f5d17a;border-radius:50%;background:radial-gradient(circle at 35% 27%,#9b5a25,#431c0d 68%,#241008);box-shadow:0 0 0 2px #652d12,0 4px 7px #150700,inset 0 1px #fff8}
body.ludo-game .play-toolbar .board-round-button svg{display:block;width:100%;height:100%;filter:drop-shadow(0 2px 2px #170802)}
body.ludo-game .play-toolbar .board-logo{position:relative;display:grid;place-items:center;min-width:0;height:clamp(58px,10vw,100px);overflow:hidden;color:#ffdc64;font:italic 900 clamp(1.35rem,5vw,3.3rem)/.9 Georgia,serif;letter-spacing:-.04em;text-shadow:0 2px #ffe9a0,0 4px #9f4d0d,0 7px #461a08,0 10px 8px #0d0401}
body.ludo-game .play-toolbar .board-logo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 3px #160600)}
body.ludo-game .play-toolbar .board-logo strong{position:relative;z-index:1}
body.ludo-game #status,body.ludo-game .color-hint{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:620px){body.ludo-game .ludo-stage{gap:3px;margin:2px auto 6px}body.ludo-game .board.ludo{width:min(100%,min(83vh,100vw));padding:4px;border-width:5px;border-radius:14px}body.ludo-game .play-toolbar{gap:4px;padding:2px 5px}body.ludo-game .play-toolbar .board-round-button{width:44px;height:44px;border-width:2px;padding:4px}body.ludo-game .play-toolbar .board-logo{height:64px;font-size:clamp(1.5rem,7.4vw,1.95rem)}body.ludo-game .player-dice{min-height:48px;border-radius:13px;padding:3px}body.ludo-game .player-dice .die-face{width:42px;height:42px;border-radius:11px}}
@media(max-width:620px){body.ludo-game.playing-ludo .play-toolbar .board-round-button{position:relative;width:44px!important;height:44px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}body.ludo-game.playing-ludo .play-toolbar .board-round-button::before{content:"";position:absolute;inset:4px;border:2px solid #f5d17a;border-radius:50%;background:radial-gradient(circle at 35% 27%,#9b5a25,#431c0d 68%,#241008);box-shadow:0 0 0 1px #652d12,0 2px 4px #150700,inset 0 1px #fff8;pointer-events:none}body.ludo-game.playing-ludo .play-toolbar .board-round-button svg{position:relative;z-index:1;width:27px;height:27px}}
body.ludo-game .board.ludo .home-base.inactive-home{background:linear-gradient(145deg,#fbf5e8,#e7dac1)!important;border-color:#aa8d62}
body.ludo-game .board.ludo .lane.inactive-lane{background:linear-gradient(145deg,#fffef7,#e9dfcb)!important}

/* Full die tumble: keep its face hidden until it settles on the rolled value. */
body.ludo-game.playing-ludo .player-dice .die-face.rolling{animation:ludu-die-tumble 1.4s cubic-bezier(.18,.7,.18,1) both!important;transform-style:preserve-3d;backface-visibility:hidden}
body.ludo-game.playing-ludo .player-dice .die-face.rolling .die-pip{visibility:hidden;opacity:0}
@keyframes ludu-die-tumble{0%{transform:perspective(240px) rotateX(0) rotateY(0) rotateZ(0) scale(1)}16%{transform:perspective(240px) rotateX(160deg) rotateY(220deg) rotateZ(300deg) translateY(-7px) scale(1.08)}34%{transform:perspective(240px) rotateX(370deg) rotateY(510deg) rotateZ(660deg) translateY(2px)}53%{transform:perspective(240px) rotateX(590deg) rotateY(770deg) rotateZ(990deg) translateY(-5px) scale(1.04)}73%{transform:perspective(240px) rotateX(770deg) rotateY(1030deg) rotateZ(1310deg) translateY(1px)}100%{transform:perspective(240px) rotateX(1080deg) rotateY(1440deg) rotateZ(1800deg) translateY(0) scale(1)}}
body.ludo-game.playing-ludo .board.ludo span.moving{animation:ludu-pawn-hop var(--pawn-motion-duration,320ms) cubic-bezier(.2,.72,.3,1) both}
body.ludo-game.playing-ludo .board.ludo span.captured-return{animation-duration:calc(var(--pawn-motion-duration,80ms))}

/* Reference-shaped pawn pieces: glossy colored bodies, rounded heads, and gold bases. */
body.ludo-game .board.ludo span.ludo-pawn{position:absolute!important;inset:-3%!important;width:106%!important;height:106%!important;display:block!important;overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:transparent!important;font-size:0!important;line-height:0!important;filter:drop-shadow(0 2px 2px #180802a8);pointer-events:auto}
body.ludo-game .board.ludo span.ludo-pawn .pawn-body{position:absolute;z-index:2;left:14%;bottom:13%;width:72%;height:53%;display:block;clip-path:polygon(39% 0,61% 0,67% 24%,83% 57%,100% 84%,94% 100%,6% 100%,0 84%,17% 57%,33% 24%);background:linear-gradient(105deg,#fff9 0,transparent 16%,transparent 63%,#0008 100%),radial-gradient(ellipse at 34% 17%,color-mix(in srgb,var(--piece-color) 58%,white),var(--piece-color) 48%,color-mix(in srgb,var(--piece-color) 68%,#160904));box-shadow:inset 0 3px 4px #fff9,inset 0 -5px 6px #160704aa}
body.ludo-game .board.ludo span.ludo-pawn .pawn-body::after{content:"";position:absolute;left:19%;right:19%;top:15%;height:9%;border-radius:50%;background:linear-gradient(90deg,transparent,#fff9,transparent);box-shadow:0 1px 2px #fff4}
body.ludo-game .board.ludo span.ludo-pawn .pawn-base{position:absolute;z-index:1;left:3%;bottom:3%;width:94%;height:22%;display:block;border:2px solid #f6ce63;border-radius:50%;background:linear-gradient(180deg,#fff2ae 0,#d78d19 28%,#66350e 57%,#e5a82f 74%,#76400d 100%);box-shadow:inset 0 2px 2px #fff9,0 3px 3px #180803aa}
body.ludo-game .board.ludo span.ludo-pawn .pawn-head{position:absolute;z-index:3;left:30%;top:0;width:40%;height:40%;display:block;border:0;border-radius:50%;background:radial-gradient(circle at 28% 21%,#fff 0 5%,#ffffffaa 12%,transparent 35%),radial-gradient(circle at 34% 28%,color-mix(in srgb,var(--piece-color) 54%,white),var(--piece-color) 55%,color-mix(in srgb,var(--piece-color) 67%,#180704));box-shadow:inset -3px -4px 5px #16070599,0 2px 3px #160803aa}
body.ludo-game .board.ludo span.ludo-pawn.moving{animation:ludu-pawn-hop var(--pawn-motion-duration,320ms) cubic-bezier(.2,.72,.3,1) both}

/* A six-sided ivory die stays in its housing while all numbered faces tumble. */
body.ludo-game.playing-ludo .player-dice .die-face{--die-size:clamp(48px,6vw,64px);position:relative;display:grid;place-items:center;flex:none;width:var(--die-size);height:var(--die-size);margin:0;padding:4px;border:3px solid #d5ad63;border-radius:14px;background:linear-gradient(145deg,#3a1d0d,#81521e 50%,#2a1308);box-shadow:inset 0 1px #fff8,0 4px 0 #704b25,0 7px 10px #100600;perspective:420px;perspective-origin:50% 50%;transform:none!important;animation:none!important;overflow:visible}
body.ludo-game.playing-ludo .player-dice .die-cube{--cube-size:calc(var(--die-size) - 12px);position:relative;display:block;width:var(--cube-size);height:var(--cube-size);transform-style:preserve-3d;transform:rotateX(var(--face-x,0deg)) rotateY(var(--face-y,0deg));will-change:transform}
body.ludo-game.playing-ludo .player-dice .die-side{position:absolute;inset:0;display:grid;place-items:center;width:100%;height:100%;border:1px solid #a58b67;border-radius:6px;background:linear-gradient(145deg,#fffefa 0,#f5eee1 68%,#d7c8af 100%);box-shadow:inset 0 2px #fff,0 1px 2px #47301a88;backface-visibility:hidden}
body.ludo-game.playing-ludo .player-dice .side-front{transform:rotateY(0deg) translateZ(calc(var(--cube-size) / 2))}
body.ludo-game.playing-ludo .player-dice .side-right{transform:rotateY(90deg) translateZ(calc(var(--cube-size) / 2))}
body.ludo-game.playing-ludo .player-dice .side-back{transform:rotateY(180deg) translateZ(calc(var(--cube-size) / 2))}
body.ludo-game.playing-ludo .player-dice .side-left{transform:rotateY(-90deg) translateZ(calc(var(--cube-size) / 2))}
body.ludo-game.playing-ludo .player-dice .side-top{transform:rotateX(90deg) translateZ(calc(var(--cube-size) / 2))}
body.ludo-game.playing-ludo .player-dice .side-bottom{transform:rotateX(-90deg) translateZ(calc(var(--cube-size) / 2))}
body.ludo-game.playing-ludo .player-dice .die-side-pips{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);align-items:center;justify-items:center;width:100%;height:100%;padding:15%;box-sizing:border-box}
body.ludo-game.playing-ludo .player-dice .die-side-pips .die-pip{position:static;display:block;width:clamp(4px,.78vw,8px);height:clamp(4px,.78vw,8px);margin:0;border-radius:50%;background:radial-gradient(circle at 27% 22%,#56483b,#19120d 72%);box-shadow:inset 0 1px 1px #000b,0 1px #fff9;visibility:visible!important;opacity:1!important}
body.ludo-game.playing-ludo .player-dice .die-face.pip-1{--face-x:0deg;--face-y:0deg}
body.ludo-game.playing-ludo .player-dice .die-face.pip-2{--face-x:0deg;--face-y:-90deg}
body.ludo-game.playing-ludo .player-dice .die-face.pip-3{--face-x:-90deg;--face-y:0deg}
body.ludo-game.playing-ludo .player-dice .die-face.pip-4{--face-x:90deg;--face-y:0deg}
body.ludo-game.playing-ludo .player-dice .die-face.pip-5{--face-x:0deg;--face-y:90deg}
body.ludo-game.playing-ludo .player-dice .die-face.pip-6{--face-x:0deg;--face-y:180deg}
body.ludo-game.playing-ludo .player-dice .die-face.roll-to-1{--roll-x:0deg;--roll-y:0deg}
body.ludo-game.playing-ludo .player-dice .die-face.roll-to-2{--roll-x:0deg;--roll-y:-90deg}
body.ludo-game.playing-ludo .player-dice .die-face.roll-to-3{--roll-x:-90deg;--roll-y:0deg}
body.ludo-game.playing-ludo .player-dice .die-face.roll-to-4{--roll-x:90deg;--roll-y:0deg}
body.ludo-game.playing-ludo .player-dice .die-face.roll-to-5{--roll-x:0deg;--roll-y:90deg}
body.ludo-game.playing-ludo .player-dice .die-face.roll-to-6{--roll-x:0deg;--roll-y:180deg}
body.ludo-game.playing-ludo .player-dice .die-face.rolling{animation:none!important;backface-visibility:visible}
body.ludo-game.playing-ludo .player-dice .die-face.rolling .die-pip{visibility:visible!important;opacity:1!important}
body.ludo-game.playing-ludo .player-dice .die-face.rolling .die-cube{animation:ludu-stable-cube-roll .95s cubic-bezier(.18,.72,.2,1) both}
@keyframes ludu-stable-cube-roll{0%{transform:rotateX(var(--face-x,0deg)) rotateY(var(--face-y,0deg)) rotateZ(0)}18%{transform:rotateX(calc(var(--face-x,0deg) + 180deg)) rotateY(calc(var(--face-y,0deg) + 240deg)) rotateZ(180deg)}42%{transform:rotateX(calc(var(--face-x,0deg) + 420deg)) rotateY(calc(var(--face-y,0deg) + 540deg)) rotateZ(360deg)}68%{transform:rotateX(calc(var(--face-x,0deg) + 660deg)) rotateY(calc(var(--face-y,0deg) + 840deg)) rotateZ(540deg)}100%{transform:rotateX(calc(var(--roll-x,0deg) + 720deg)) rotateY(calc(var(--roll-y,0deg) + 1080deg)) rotateZ(720deg)}}
@media(max-width:620px){body.ludo-game.playing-ludo .player-dice .die-face{--die-size:44px;padding:4px;border-radius:11px}}

body.ludo-game .board.ludo span.ludo-pawn::before,body.ludo-game .board.ludo span.ludo-pawn::after{content:none!important;display:none!important}

/* Approved-style glossy default pawns, kept as live animated board elements. */
body.ludo-game .board.ludo span.ludo-pawn.sprite-pawn{inset:-11% -22.5%!important;width:145%!important;height:122%!important;background-color:transparent!important;background-image:url("./ludo-pawns.webp")!important;background-size:400% 100%!important;background-repeat:no-repeat!important;filter:none!important}
body.ludo-game .board.ludo span.ludo-pawn.sprite-pawn[data-color="0"]{background-position:0 50%!important}
body.ludo-game .board.ludo span.ludo-pawn.sprite-pawn[data-color="1"]{background-position:66.6667% 50%!important}
body.ludo-game .board.ludo span.ludo-pawn.sprite-pawn[data-color="2"]{background-position:33.3333% 50%!important}
body.ludo-game .board.ludo span.ludo-pawn.sprite-pawn[data-color="3"]{background-position:100% 50%!important}
body.ludo-game .board.ludo span.ludo-pawn:not(.sprite-pawn){filter:none!important}
body.ludo-game .board.ludo span.ludo-pawn:not(.sprite-pawn) .pawn-base{border-color:color-mix(in srgb,var(--piece-color) 62%,white);background:linear-gradient(180deg,color-mix(in srgb,var(--piece-color) 78%,white),var(--piece-color) 42%,color-mix(in srgb,var(--piece-color) 56%,#100805));box-shadow:inset 0 2px 2px #fff8,0 2px 2px #18080366}
body.ludo-game .board.ludo span.ludo-pawn:not(.sprite-pawn) .pawn-head{border:0}

/* After the die settles, only legal pawns lift. Finished and blocked pieces stay still. */
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.pawn-ready-hint{animation:pawn-location-hint 620ms ease-in-out infinite;animation-delay:calc(var(--pawn-order,0)*85ms);transform-origin:50% 100%}
@keyframes pawn-location-hint{0%,100%{translate:0 0}50%{translate:0 -2px}}

/* Each player opens only their own in-yard color palette before play. */
body.ludo-game.playing-ludo .board.ludo .home-base .yard-color-controls{position:absolute;z-index:14;top:7%;right:7%;display:block;overflow:visible}
body.ludo-game.playing-ludo .board.ludo .yard-color-controls[hidden]{display:none!important}
body.ludo-game.playing-ludo .yard-color-trigger{position:relative;display:grid;place-items:center;flex:none;width:26px;height:26px;min-height:0!important;padding:2px;border:1.5px solid #f1d37c;border-radius:50%;line-height:1;background:radial-gradient(circle at 34% 25%,#fff7,#72411c 62%,#301409);box-shadow:0 1px 2px #16070088;cursor:pointer;touch-action:manipulation}
body.ludo-game.playing-ludo .yard-color-trigger svg{display:block;width:100%;height:100%}
body.ludo-game.playing-ludo .yard-color-swatches{position:absolute;z-index:1;top:50%;right:32px;display:grid;grid-template-columns:repeat(4,19px);gap:5px;width:max-content;padding:8px;border:1px solid #f3d47e;border-radius:12px;background:#26130eeF;box-shadow:0 3px 9px #16070055;transform:translateY(-50%)}
body.ludo-game.playing-ludo .yard-color-swatches[hidden]{display:none!important}
body.ludo-game.playing-ludo .yard-color-swatch{display:block;width:19px;height:19px;min-height:19px;padding:0;border:2px solid #fff9;border-radius:50%;background:var(--swatch);box-shadow:inset 0 1px 2px #fff7;cursor:pointer}
body.ludo-game.playing-ludo .yard-color-swatch.selected{outline:2px solid #fff;outline-offset:1px}
body.ludo-game.playing-ludo .yard-color-swatch:disabled{opacity:.24;cursor:default;filter:grayscale(1)}

/* Rank celebrations fill the ranked player's own home and stay until reset. */
body.ludo-game.playing-ludo .board.ludo .home-base .yard-celebration{inset:5%!important;width:auto!important;height:auto!important;display:grid;place-content:center;gap:4px;border-radius:18px;background:radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--yard-color,#d64443) 86%,white),color-mix(in srgb,var(--yard-color,#d64443) 65%,#170805));box-shadow:inset 0 0 0 3px #fff6,0 0 18px color-mix(in srgb,var(--yard-color,#d64443) 65%,transparent);}
body.ludo-game.playing-ludo .board.ludo .home-base .yard-celebration.rank-1{border:2px solid #fff1a1;box-shadow:inset 0 0 0 3px #fff8,0 0 18px #ffdc65;animation:yard-winner 1.6s ease-in-out infinite alternate}
body.ludo-game.playing-ludo .board.ludo .home-base .yard-celebration.rank-1::after{inset:0!important;opacity:.58;animation:firework-spark 1.5s ease-in-out infinite}
body.ludo-game.playing-ludo .yard-celebration .winner-crown{width:clamp(34px,7vw,76px);height:auto}
body.ludo-game.playing-ludo .yard-celebration strong{font-size:clamp(1.45rem,6vw,3.5rem);line-height:.9;color:#fff1a1}
body.ludo-game.playing-ludo .yard-celebration span{font-size:clamp(.82rem,3.2vw,1.5rem);letter-spacing:.08em}
body.ludo-game.playing-ludo .yard-celebration.rank-2{animation:yard-celebrate 2s ease-in-out infinite alternate}
body.ludo-game.playing-ludo .yard-celebration.rank-3{animation:yard-celebrate 2.7s ease-in-out infinite alternate;opacity:.95}
body.ludo-game.playing-ludo .yard-celebration.rank-4{animation:none;opacity:.9}
@media(max-width:620px){body.ludo-game.playing-ludo .yard-color-trigger{width:22px;height:22px}body.ludo-game.playing-ludo .yard-color-swatches{grid-template-columns:repeat(4,16px);gap:4px;padding:6px;right:27px}body.ludo-game.playing-ludo .yard-color-swatch{width:16px;height:16px;min-height:16px}}

/* 3D board plate artwork from the approved reference; live grid and pawns stay interactive. */
body.ludo-game.playing-ludo .board.ludo{
  box-sizing:border-box;width:min(100%,min(83vh,900px));aspect-ratio:1;margin:0 auto;
  padding:2.7% 4% 9.25%;gap:0;border:0;border-radius:0;overflow:visible;
  grid-template-rows:repeat(6,minmax(0,.966fr)) repeat(3,minmax(0,1.068fr)) repeat(6,minmax(0,1.002fr));
  background:#30170c url("./ludo-board-art.webp") center/100% 100% no-repeat;
  box-shadow:none;isolation:isolate
}
body.ludo-game.playing-ludo .board.ludo>div:not(.home-base):not(.home-diamond):not(.yard-celebration){
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible
}
body.ludo-game.playing-ludo .board.ludo .safe::before{content:"★";position:absolute;inset:0;z-index:4;display:grid!important;place-items:center;color:#fff;font-size:clamp(15px,3.7vw,24px);line-height:1;text-shadow:0 2px 2px #33210d,0 0 4px #f1c25c;pointer-events:none}
body.ludo-game.playing-ludo .board.ludo .home-base{overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body.ludo-game.playing-ludo .board.ludo .home-base::after{display:none!important}
body.ludo-game.playing-ludo .board.ludo .home-base::before{content:"";position:absolute;inset:12%;z-index:0;border-radius:18%;background:var(--yard-color);opacity:0;pointer-events:none}
body.ludo-game.playing-ludo .board.ludo .home-base.custom-color::before{opacity:.62}
body.ludo-game.playing-ludo .board.ludo .home-base.custom-color::before{inset:14%;border:2px solid #fff9;opacity:1;background:linear-gradient(145deg,color-mix(in srgb,var(--yard-color) 88%,white),color-mix(in srgb,var(--yard-color) 92%,#140801));box-shadow:inset 0 3px 8px #fff8,0 2px 4px #19080066}
body.ludo-game.playing-ludo .board.ludo .home-diamond{border:0!important;background:transparent!important;box-shadow:none!important}
body.ludo-game.playing-ludo .board.ludo .home-center.has-finished::after{content:"";position:absolute;inset:8%;z-index:3;border:2px solid #fff0a0;border-radius:8%;background:radial-gradient(circle,#fff8,transparent 65%);box-shadow:0 0 8px #ffdb55,inset 0 0 10px #ffe988;animation:final-square-glow 1.6s ease-in-out infinite alternate;pointer-events:none}
@keyframes final-square-glow{from{opacity:.45;filter:brightness(1)}to{opacity:1;filter:brightness(1.4)}}
body.ludo-game.playing-ludo .board.ludo .lane::before{content:"";position:absolute;inset:0;z-index:0;background:var(--lane-tint);opacity:0;pointer-events:none}
body.ludo-game.playing-ludo .board.ludo .lane.custom-color::before{inset:2px;border:1px solid #fff9;border-radius:3px;opacity:.94;box-shadow:inset 0 2px #fff8,0 1px 2px #17080366}
body.ludo-game.playing-ludo .board.ludo .lane-0{--lane-tint:var(--seat-0)}
body.ludo-game.playing-ludo .board.ludo .lane-1{--lane-tint:var(--seat-1)}
body.ludo-game.playing-ludo .board.ludo .lane-2{--lane-tint:var(--seat-2)}
body.ludo-game.playing-ludo .board.ludo .lane-3{--lane-tint:var(--seat-3)}
body.ludo-game.playing-ludo .board.ludo .yard{z-index:1}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn{inset:-45% -50%!important;width:200%!important;height:190%!important}
body.ludo-game.playing-ludo .board.ludo .home-base.inactive-home{background:transparent!important;border-color:transparent!important}
body.ludo-game.playing-ludo .board.ludo .lane.inactive-lane{background:transparent!important}
@media(max-width:620px){body.ludo-game.playing-ludo .board.ludo{padding:2.7% 4% 9.25%;border:0!important;border-radius:0!important;width:min(100%,min(83vh,100vw))}}

/* Keep an open color picker above the board and every neighboring dice panel. */
body.ludo-game.playing-ludo .ludo-stage{position:relative;isolation:isolate}
body.ludo-game.playing-ludo .player-dice:has(.player-color-picker:not([hidden])){position:relative;z-index:30}
body.ludo-game.playing-ludo .player-dice:has(.player-color-picker:not([hidden])) .player-color-picker{z-index:100}
\n/* Color is chosen from the player's own header; all eight swatches stay in one row. */
body.ludo-game.playing-ludo .player-dice{position:relative;overflow:visible}
body.ludo-game.playing-ludo .player-dice-label{cursor:pointer;touch-action:manipulation}
body.ludo-game.playing-ludo .player-dice-label:disabled{cursor:default;opacity:.82}
body.ludo-game.playing-ludo .player-color-picker{position:absolute;z-index:50;display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;gap:4px;width:max-content;max-width:94vw;padding:7px;border:1px solid #f3d47e;border-radius:12px;background:linear-gradient(145deg,#4a2814,#1d0e08);box-shadow:0 4px 12px #100500bb}
body.ludo-game.playing-ludo .player-color-picker[hidden]{display:none!important}
body.ludo-game.playing-ludo #dice-red .player-color-picker{left:0;top:calc(100% + 3px)}
body.ludo-game.playing-ludo #dice-green .player-color-picker{right:0;top:calc(100% + 3px)}
body.ludo-game.playing-ludo #dice-blue .player-color-picker{left:0;bottom:calc(100% + 3px)}
body.ludo-game.playing-ludo #dice-yellow .player-color-picker{right:0;bottom:calc(100% + 3px)}
body.ludo-game.playing-ludo .player-color-swatch{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;min-height:30px;padding:3px;border:2px solid #fff9;border-radius:50%;background:var(--swatch);box-shadow:inset 0 2px 3px #fff8,0 1px 2px #080300;cursor:pointer;touch-action:manipulation}
body.ludo-game.playing-ludo .player-color-swatch.selected{outline:2px solid #ffea88;outline-offset:1px}
body.ludo-game.playing-ludo .player-color-swatch:disabled{opacity:.24;filter:grayscale(1);cursor:default}
@media(max-width:620px){body.ludo-game.playing-ludo .player-color-picker{gap:3px;padding:5px}body.ludo-game.playing-ludo .player-color-swatch{flex-basis:31px;width:31px;height:31px;min-height:31px;padding:2px}}

/* Keep the board title centered while the three small controls balance across it. */
body.ludo-game.playing-ludo .play-toolbar{box-sizing:border-box;display:grid;grid-template-columns:minmax(78px,1fr) auto minmax(78px,1fr);align-items:center;gap:6px;width:100%;max-width:940px;margin:0 auto 4px;padding:2px 6px}
body.ludo-game.playing-ludo .play-toolbar #back-to-setup{grid-column:1;justify-self:start}
body.ludo-game.playing-ludo .play-toolbar .board-logo{grid-column:2;justify-self:center;width:clamp(170px,44vw,340px);height:clamp(48px,9vw,76px)}
body.ludo-game.playing-ludo .play-toolbar #sound-toggle{grid-column:3;grid-row:1;justify-self:start}
body.ludo-game.playing-ludo .play-toolbar #board-settings{grid-column:3;grid-row:1;justify-self:end}
body.ludo-game.playing-ludo .play-toolbar .board-round-button{width:clamp(36px,4.2vw,46px)!important;height:clamp(36px,4.2vw,46px)!important;padding:4px!important;border-width:2px!important}
body.ludo-game.playing-ludo .play-toolbar .board-round-button svg{width:100%;height:100%}
@media(max-width:620px){body.ludo-game.playing-ludo .play-toolbar{grid-template-columns:minmax(78px,1fr) auto minmax(78px,1fr);gap:3px;padding:1px 3px}body.ludo-game.playing-ludo .play-toolbar .board-logo{width:clamp(166px,47vw,220px);height:52px}body.ludo-game.playing-ludo .play-toolbar .board-round-button{width:36px!important;height:36px!important;padding:0!important;border:0!important}body.ludo-game.playing-ludo .play-toolbar .board-round-button::before{inset:2px}body.ludo-game.playing-ludo .play-toolbar .board-round-button svg{width:24px;height:24px}}

/* Eight crisp sprite variants share one silhouette and keep their gold base. */
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn{inset:0!important;width:100%!important;height:100%!important;background-image:url("./ludo-pawns-8.webp")!important;background-size:800% 100%!important;background-repeat:no-repeat!important;filter:none!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn.yard-pawn{inset:0!important;width:100%!important;height:100%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="0"]{background-position:0% 50%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="1"]{background-position:14.2857% 50%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="2"]{background-position:28.5714% 50%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="3"]{background-position:42.8571% 50%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="4"]{background-position:57.1429% 50%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="5"]{background-position:71.4286% 50%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="6"]{background-position:85.7143% 50%!important}
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn[data-color="7"]{background-position:100% 50%!important}

/* A custom-colored yard replaces its original panel in full; no colors bleed through. */
body.ludo-game.playing-ludo .board.ludo .home-base.custom-color{position:relative;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}
body.ludo-game.playing-ludo .board.ludo .home-base.custom-color::before{content:"";position:absolute;inset:0;z-index:0;box-sizing:border-box;border:clamp(3px,.7vw,8px) solid #ffd36b;border-radius:17%;opacity:1;background:radial-gradient(ellipse at 32% 18%,color-mix(in srgb,var(--yard-color) 65%,white),var(--yard-color) 58%,color-mix(in srgb,var(--yard-color) 62%,#160804));box-shadow:inset 0 2px 0 #fff9,inset 0 -7px 13px #13060299,0 0 0 2px #71370f}
/* Keep every colored yard on the same raised 3D treatment, including red and yellow. */
body.ludo-game.playing-ludo .board.ludo .home-base:not(.inactive-home)::before{content:"";position:absolute;inset:0;z-index:0;box-sizing:border-box;border:clamp(3px,.7vw,8px) solid #ffd36b;border-radius:17%;opacity:1;background:radial-gradient(ellipse at 32% 18%,color-mix(in srgb,var(--yard-color,#2588e8) 65%,white),var(--yard-color,#2588e8) 58%,color-mix(in srgb,var(--yard-color,#2588e8) 62%,#160804));box-shadow:inset 0 2px 0 #fff9,inset 0 -7px 13px #13060299,0 0 0 2px #71370f}
body.ludo-game.playing-ludo .board.ludo .home-base:not(.inactive-home)::after{display:block!important;content:"";position:absolute;inset:10%;z-index:1;border:2px solid #fff7;border-radius:17%;background:radial-gradient(ellipse at 36% 24%,#ffffff2b,transparent 68%);box-shadow:inset 0 2px 7px #fff5,0 2px 3px #16060266;pointer-events:none}
body.ludo-game.playing-ludo .board.ludo .home-base.custom-color::after{display:block!important;content:"";position:absolute;inset:10%;z-index:1;border:2px solid #fff7;border-radius:17%;background:radial-gradient(ellipse at 36% 24%,#ffffff2b,transparent 68%);box-shadow:inset 0 2px 7px #fff5,0 2px 3px #16060266;pointer-events:none}
body.ludo-game.playing-ludo #board.board.ludo .lane.custom-color{background:linear-gradient(145deg,color-mix(in srgb,var(--lane-tint) 73%,white),var(--lane-tint) 56%,color-mix(in srgb,var(--lane-tint) 76%,#120604))!important;border:1px solid #fff9!important;border-radius:3px!important;box-shadow:inset 0 2px #fff7,0 1px 2px #17080366!important}
body.ludo-game.playing-ludo #board.board.ludo .lane.custom-color::before{display:none!important}
/* Keep the center's four-color triangle artwork intact when a player recolors their lane. */
body.ludo-game.playing-ludo #board.board.ludo .lane-step-5.custom-color{background:transparent!important;border:0!important;box-shadow:none!important}
body.ludo-game.playing-ludo #board.board.ludo .lane-step-5.custom-color::before{display:none!important}
body.ludo-game.playing-ludo .board.ludo .track.safe{position:relative!important;overflow:hidden!important}
body.ludo-game.playing-ludo .board.ludo .track.safe::before{position:absolute!important;inset:0!important;display:grid!important;width:100%!important;height:100%!important;place-items:center!important;transform:none!important;font-size:clamp(11px,2.7vw,20px)!important;line-height:1!important;overflow:hidden!important}
body.ludo-game.playing-ludo .board.ludo .track.safe.start-square.red{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-0) 76%,white),var(--seat-0) 56%,color-mix(in srgb,var(--seat-0) 75%,#1b070b))!important}
body.ludo-game.playing-ludo .board.ludo .track.safe.start-square.blue{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-1) 76%,white),var(--seat-1) 56%,color-mix(in srgb,var(--seat-1) 75%,#07132a))!important}
body.ludo-game.playing-ludo .board.ludo .track.safe.start-square.green{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-2) 76%,white),var(--seat-2) 56%,color-mix(in srgb,var(--seat-2) 75%,#061b0e))!important}
body.ludo-game.playing-ludo .board.ludo .track.safe.start-square.yellow{background:linear-gradient(145deg,color-mix(in srgb,var(--seat-3) 76%,white),var(--seat-3) 56%,color-mix(in srgb,var(--seat-3) 75%,#251505))!important}
/* Remove the empty-slot gold discs; each occupied slot shows only its pawn. */
body.ludo-game.playing-ludo #board.board.ludo .yard::after{display:none!important}
/* Path pawns stay inside tiles; yard pieces use the wider inset slots in the reference. */
body.ludo-game.playing-ludo #board.board.ludo .track,
body.ludo-game.playing-ludo #board.board.ludo .lane,
body.ludo-game.playing-ludo #board.board.ludo .home-center{overflow:hidden!important}
body.ludo-game.playing-ludo #board.board.ludo .yard{overflow:visible!important;z-index:2!important}
body.ludo-game.playing-ludo #board.board.ludo .yard>span.ludo-pawn.yard-pawn.sprite-pawn{top:-40%!important;left:-40%!important;width:180%!important;height:180%!important;z-index:3!important}
/* Safe markers are stars on the original ivory tile, never raised gold plaques. */
body.ludo-game.playing-ludo #board.board.ludo .track.safe:not(.start-square){background:transparent!important;border:0!important;box-shadow:none!important}
body.ludo-game.playing-ludo #board.board.ludo .track.safe:not(.start-square)::before{color:#fff!important;-webkit-text-stroke:.4px #56300b;text-shadow:0 1px 2px #271405,0 0 4px #271405!important}
body.ludo-game.playing-ludo #board.board.ludo .track.safe.start-square::before{color:#fff!important;-webkit-text-stroke:.4px #56300b;text-shadow:0 1px 2px #271405!important}
body.ludo-game.playing-ludo #board.board.ludo .home-diamond{position:relative!important;z-index:1!important}
body.ludo-game.playing-ludo #board.board.ludo .home-diamond::after{content:"";position:absolute;left:-2.5%;right:-5%;top:-8%;bottom:5%;z-index:2;pointer-events:none;mix-blend-mode:color;opacity:.9;background:conic-gradient(from 45deg,var(--seat-3) 0 25%,var(--seat-1) 0 50%,var(--seat-0) 0 75%,var(--seat-2) 0)}
body.ludo-game.playing-ludo .board.ludo .playable-token{outline:none!important;animation:mahir-ready-bob 1.1s ease-in-out infinite!important;filter:drop-shadow(0 0 3px #fff9)!important}
@keyframes mahir-ready-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes ludu-pawn-hop{0%,100%{transform:translateY(0)}42%{transform:translateY(-1px)}72%{transform:translateY(0)}}

/* Pin pawns use the same footprint in yards and on the track, centered in each square. */
body.ludo-game.playing-ludo .board.ludo span.ludo-pawn.sprite-pawn.pin-pawn{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  transform:none!important;border:0!important;border-radius:0!important;background:transparent!important;
  background-image:none!important;background-position:0 0!important;background-size:auto!important;
  box-shadow:none!important;filter:none!important;overflow:visible!important
}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn::after{display:none!important}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn .pin-pawn-art{
  position:absolute;left:calc(50% + var(--pile-x,0%));top:calc(50% + var(--pile-y,0%));width:100%;height:140%;overflow:visible;
  transform:translate(-50%,-96.25%);filter:none
}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn .pin-outline{fill:#f7fbff;stroke:#52677b;stroke-width:2.5}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn .pin-color{fill:#f5f9fc;stroke:#c8d6e4;stroke-width:1}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn .pin-face{fill:var(--piece-color);stroke:#24374c;stroke-width:2}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn .pin-gloss{fill:#fff;opacity:.78}
body.ludo-game.playing-ludo #board.board.ludo .track:has(>span.ludo-pawn),
body.ludo-game.playing-ludo #board.board.ludo .lane:has(>span.ludo-pawn),
body.ludo-game.playing-ludo #board.board.ludo .home-center:has(>span.ludo-pawn){position:relative!important;z-index:8!important;overflow:visible!important}
/* Yard and route pawns use the same size and square-center anchor. */
body.ludo-game.playing-ludo #board.board.ludo .yard>span.ludo-pawn.sprite-pawn.yard-pawn.pin-pawn{
  inset:0!important;left:0!important;top:0!important;right:0!important;bottom:0!important;
  width:100%!important;height:100%!important;transform:none!important;z-index:4!important
}
body.ludo-game.playing-ludo #board.board.ludo .yard>span.ludo-pawn.sprite-pawn.yard-pawn.pin-pawn .pin-pawn-art{
  height:140%;top:50%;transform:translate(-50%,-96.25%)
}
/* Keep the base-centering transform intact during subtle pawn movement. */
@keyframes mahir-ready-bob{0%,100%{translate:0 0}50%{translate:0 -2px}}
@keyframes ludu-pawn-hop{0%,100%{translate:0 0}42%{translate:0 -1px}72%{translate:0 0}}

/* Compact, mirror-centered 2x2 home pawn slots across all four corners. */
body.ludo-game.playing-ludo #board.board.ludo .yard.yard-seat-0,
body.ludo-game.playing-ludo #board.board.ludo .yard.yard-seat-2{transform:translate(50%,-50%)!important}
body.ludo-game.playing-ludo #board.board.ludo .yard.yard-seat-1,
body.ludo-game.playing-ludo #board.board.ludo .yard.yard-seat-3{transform:translate(50%,50%)!important}


/* Miniature pile layout keeps each pawn outline and color dot visible. */
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.stacked-pawn .pin-pawn-art{width:55%;height:70%}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.pile-size-2 .pin-pawn-art{width:55%;height:70%}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.pile-size-3 .pin-pawn-art{width:50%;height:65%}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.pile-size-4 .pin-pawn-art{width:42%;height:58%}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.pile-size-dense .pin-pawn-art{width:30%;height:41%}

/* Finishing one pawn lights that player's home; the final square glows too. */
body.ludo-game.playing-ludo .board.ludo .home-base.score-flash:not(.custom-color)::after{content:"";position:absolute;inset:12%;z-index:3;border:3px solid #fff1a1;border-radius:17%;background:radial-gradient(circle,#fff7 0 3%,transparent 68%);box-shadow:0 0 16px 4px #ffdc6688,inset 0 0 13px #fff4;animation:finish-home-light 1.15s ease-in-out infinite alternate;pointer-events:none}
body.ludo-game.playing-ludo .board.ludo .home-base.custom-color.score-flash::after{border-color:#fff1a1;box-shadow:inset 0 2px 7px #fff7,0 0 17px 5px #ffe479aa;animation:finish-home-light 1.15s ease-in-out infinite alternate}
body.ludo-game.playing-ludo .board.ludo .home-center.has-finished::after{inset:0!important;border:3px solid #fff4a6!important;background:radial-gradient(circle,#fff9 0 5%,#ffe88455 25%,transparent 72%)!important;box-shadow:0 0 15px 5px #ffdc77,inset 0 0 15px #fff3!important;animation:finish-home-light .95s ease-in-out infinite alternate!important}
@keyframes finish-home-light{from{opacity:.42;filter:brightness(1);box-shadow:0 0 8px 2px #ffe47966,inset 0 0 8px #fff2}to{opacity:1;filter:brightness(1.2);box-shadow:0 0 19px 7px #ffe479ba,inset 0 0 17px #fff6}}


/* Make turn and end-of-game feedback visible during play. */
body.ludo-game.playing-ludo #ludo-play #status{position:relative!important;display:block!important;width:fit-content!important;max-width:calc(100% - 16px)!important;height:auto!important;min-height:0!important;padding:4px 9px!important;margin:0 auto 4px!important;overflow:visible!important;clip:auto!important;clip-path:none!important;white-space:normal!important;border:1px solid #e2b658!important;border-radius:999px!important;background:linear-gradient(145deg,#5d2b13,#2b130b)!important;color:#fff1cb!important;font-size:clamp(11px,2.8vw,14px)!important;line-height:1.2!important;text-align:center!important;z-index:12!important}

/* Keep the finish light visible on the home art and the center finish square. */
body.ludo-game.playing-ludo .board.ludo .home-base.score-flash:not(.custom-color)::after{display:block!important}
body.ludo-game.playing-ludo .board.ludo .home-center.has-finished::after{display:block!important;content:""!important;position:absolute!important;inset:-12%!important;z-index:15!important;border:3px solid #fff4a6!important;border-radius:12%!important;background:radial-gradient(circle,#fff9 0 5%,#ffe88466 26%,transparent 74%)!important;box-shadow:0 0 21px 9px #ffdc77,inset 0 0 17px #fff5!important;animation:finish-home-light .95s ease-in-out infinite alternate!important;pointer-events:none!important}


/* Stable finish: a pawn that reached the center is locked visually and in play. */
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.finished-pawn{
  animation:none!important;translate:0 0!important;pointer-events:none!important;cursor:default!important
}
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.moving{
  animation:ludo-pawn-travel var(--pawn-motion-duration,190ms) cubic-bezier(.2,.75,.25,1) both!important
}
@keyframes ludo-pawn-travel{
  0%{translate:var(--pawn-dx,0px) var(--pawn-dy,0px);scale:.94}
  42%{translate:calc(var(--pawn-dx,0px)*.52) calc(var(--pawn-dy,0px)*.52);scale:1.04}
  100%{translate:0 0;scale:1}
}

/* Winner celebration fills the completed player's yard with the requested crown and lights. */
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1{
  position:absolute!important;inset:5%!important;z-index:13!important;overflow:hidden!important;
  display:grid!important;grid-template-rows:auto 1fr auto;place-items:center;gap:0!important;
  padding:4% 5%!important;border:3px solid #fff4a0!important;border-radius:18%!important;
  color:#fff2a3!important;
  background:radial-gradient(ellipse at 50% 48%,#ffb935 0%,#d84318 48%,#820d13 100%)!important;
  box-shadow:inset 0 0 0 3px #ffdf6888,0 0 20px 8px #ffd335,0 0 42px 16px #ff8b35aa!important;
  animation:winner-yard-light 1.15s ease-in-out infinite alternate!important
}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1::before{
  content:"";position:absolute;inset:5%;z-index:0;pointer-events:none;
  background:radial-gradient(circle at 15% 28%,#fff9 0 2px,transparent 3px),
    radial-gradient(circle at 85% 28%,#fff9 0 2px,transparent 3px),
    radial-gradient(circle at 15% 70%,#ffec7d 0 2px,transparent 3px),
    radial-gradient(circle at 85% 70%,#ffec7d 0 2px,transparent 3px),
    repeating-conic-gradient(from 0deg at 15% 29%,#ffd85c99 0 2deg,transparent 2deg 15deg),
    repeating-conic-gradient(from 0deg at 85% 29%,#ffd85c99 0 2deg,transparent 2deg 15deg);
  opacity:.9;animation:winner-firework-burst 1.8s ease-in-out infinite alternate
}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:radial-gradient(circle,#fff9a8 0 2px,transparent 3px),radial-gradient(circle,#ffdc57 0 2px,transparent 3px),radial-gradient(circle,#ff8c30 0 2px,transparent 3px);
  background-size:23px 21px,31px 27px,39px 33px;background-position:0 0,12px 8px,22px 3px;
  opacity:.72;animation:firework-spark .8s steps(2,end) infinite
}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1>*{position:relative;z-index:2}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-crown{width:clamp(32px,7vw,72px);max-height:28%;margin:0!important;filter:drop-shadow(0 3px 2px #431000)}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-place{
  align-self:end;font-family:Georgia,serif;font-size:clamp(34px,9vw,78px);font-style:italic;line-height:.9;
  color:#fff28e;text-shadow:0 3px #9b4216,0 5px 3px #3c1000,0 0 12px #fff8
}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-ribbon{
  padding:2px 20px;border:2px solid #ffdc64;border-radius:5px;
  background:linear-gradient(#e83424,#9d0715);box-shadow:0 3px 0 #690812;
  color:#fff8d6;font-family:Georgia,serif;font-size:clamp(11px,3vw,23px);font-weight:900;letter-spacing:.08em;
  text-shadow:0 2px #5d0d0c;transform:rotate(-4deg)
}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-firework{
  position:absolute!important;top:16%;width:27%;aspect-ratio:1;z-index:1!important;border-radius:50%;
  background:radial-gradient(circle,#fffbd4 0 3%,#ffce45 4% 7%,transparent 8% 100%);
  box-shadow:0 0 12px 5px #ffce45aa
}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-firework::after{
  content:"";position:absolute;inset:-22%;border-radius:50%;
  background:repeating-conic-gradient(#ffe779 0 3deg,transparent 3deg 16deg);
  mask:radial-gradient(circle,transparent 0 27%,#000 31% 39%,transparent 44% 100%);
  animation:winner-firework-burst 1.15s ease-in-out infinite alternate
}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-firework-left{left:5%}
body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-firework-right{right:5%}
@keyframes winner-yard-light{to{filter:brightness(1.22);box-shadow:inset 0 0 0 3px #fff,0 0 28px 10px #ffe66a,0 0 55px 20px #ff8b35}}
@keyframes winner-firework-burst{from{transform:scale(.78);opacity:.45}to{transform:scale(1.08);opacity:1}}
@media(prefers-reduced-motion:reduce){
 body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1,
 body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1::before,
 body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1::after,
 body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 .winner-firework::after{animation:none!important}
}

/* A scored pawn stays still even on the exact frame it reaches the center. */
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.finished-pawn,
body.ludo-game.playing-ludo .board.ludo span.pin-pawn.finished-pawn.moving{
  animation:none!important;translate:0 0!important;scale:1!important;pointer-events:none!important
}


/* Keep the whole pin inside its board square instead of hanging above it. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn .pin-pawn-art{
  left:calc(50% + var(--pile-x,0%))!important;top:calc(50% + var(--pile-y,0%))!important;
  width:100%!important;height:100%!important;transform:translate(-50%,-96.25%)!important;overflow:visible
}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-2 .pin-pawn-art{width:44%!important;height:54%!important}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-3 .pin-pawn-art,
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-4 .pin-pawn-art{width:40%!important;height:46%!important}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-dense .pin-pawn-art{width:27%!important;height:34%!important}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-finished-4 .pin-pawn-art{width:40%!important;height:46%!important}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-finished-9 .pin-pawn-art{width:29%!important;height:33%!important}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-finished-16 .pin-pawn-art{width:21%!important;height:24%!important}


/* Two pawns share a square side by side at a readable size. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-2 .pin-pawn-art,
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-finished-2 .pin-pawn-art{
  width:60%!important;height:72%!important
}


/* Keep a two-pawn pair large and clearly separated. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-2 .pin-pawn-art,
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-finished-2 .pin-pawn-art{
  width:72%!important;height:88%!important
}


/* Highlight the actual finishing square at the end of each colored lane. */
body.ludo-game.playing-ludo .board.ludo .lane.final-square.has-finished{
  box-shadow:inset 0 0 0 2px #fff4a8,0 0 10px 3px #ffdd6b99!important
}


/* A finished pawn awards a point: pulse its player's home briefly. */
body.ludo-game.playing-ludo #board.board.ludo .home-base.score-flash::after{
  content:""!important;display:block!important;position:absolute!important;inset:11%!important;z-index:4!important;
  border:3px solid #fff5a8!important;border-radius:18%!important;
  background:
    radial-gradient(circle at 18% 22%,#fffde6 0 2px,transparent 4px),
    radial-gradient(circle at 82% 22%,#fff5b5 0 2px,transparent 4px),
    radial-gradient(circle at 18% 78%,#fff5b5 0 2px,transparent 4px),
    radial-gradient(circle at 82% 78%,#fffde6 0 2px,transparent 4px),
    radial-gradient(ellipse at center,#fff8 0 4%,#ffe96b55 28%,transparent 72%)!important;
  box-shadow:0 0 0 3px #ffdf7aaa,0 0 18px 7px #ffdb58,inset 0 0 20px 5px #fff8!important;
  animation:score-home-light .8s ease-in-out infinite alternate!important;pointer-events:none!important
}
@keyframes score-home-light{
  from{opacity:.56;filter:brightness(1);box-shadow:0 0 0 2px #ffe78366,0 0 12px 4px #ffd23f,inset 0 0 12px #fff5}
  to{opacity:1;filter:brightness(1.24);box-shadow:0 0 0 4px #fff6aacc,0 0 28px 12px #ffdf55,inset 0 0 26px 8px #fff}
}
@media(prefers-reduced-motion:reduce){
  body.ludo-game.playing-ludo #board.board.ludo .home-base.score-flash::after{animation:none!important;opacity:1!important}
}




/* Hide the empty idle prompt; the die button itself is the roll control. */
body.ludo-game.playing-ludo #ludo-play #status:empty{display:none!important}



/* Keep turn and roll feedback out of the layout so the board never shifts. */
body.ludo-game.playing-ludo #ludo-play #status{display:none!important}


/* Ludu pawn visibility and finish celebration corrections. */
body.ludo-game.playing-ludo #board.board.ludo :is(.track,.lane,.yard,.final-square),
body.ludo-game.playing-ludo #board.board.ludo span.ludo-pawn,
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn-art{
  overflow:visible!important;
}
/* One or two pawns keep the established artwork size; only 3+ share-cell piles scale. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-2:not(.finished-pawn-slot) .pin-pawn-art{
  width:100%!important;height:100%!important;
}
/* Finished pawns never shrink. Their feet stay in the owning color's final square. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.finished-pawn-slot .pin-pawn-art{
  width:100%!important;height:100%!important;
}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.finished-pawn-slot{
  overflow:visible!important;z-index:calc(40 + var(--pawn-order,0))!important;
}
/* Keep neighboring full-size pawns layered instead of clipped by a sibling tile. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn:not(.stacked-pawn){
  z-index:calc(30 + var(--pawn-order,0))!important;
}
/* A pearl-like, color-wide progress shimmer, separate from the winner treatment. */
body.ludo-game.playing-ludo #board.board.ludo [class*="finish-celebration-"]{
  position:relative!important;z-index:5!important;
  animation:finish-color-pearl 1.05s ease-in-out infinite alternate!important;
}
@keyframes finish-color-pearl{
  from{filter:brightness(1) saturate(1);box-shadow:0 0 0 0 transparent}
  to{filter:brightness(1.18) saturate(1.12);box-shadow:0 0 11px 3px #fff6,0 0 20px 5px color-mix(in srgb,var(--celebration-color,var(--tile-color,#ffd86a)) 65%,transparent)}
}
@media(prefers-reduced-motion:reduce){
  body.ludo-game.playing-ludo #board.board.ludo [class*="finish-celebration-"]{
    animation:none!important;filter:brightness(1.12) saturate(1.05)!important;box-shadow:0 0 8px 2px #fff8!important;
  }
}


/* Final precedence guard: exact-size two-pawn piles and all finished pawns. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.pile-size-2:not(.finished-pawn-slot) .pin-pawn-art{
  width:100%!important;height:100%!important;
}
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.finished-pawn .pin-pawn-art,
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.finished-pawn-slot .pin-pawn-art{
  width:100%!important;height:100%!important;
}


/* Uniform pawn footprint: only 3+ pawns sharing one square may compact. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn:not(.pile-size-3):not(.pile-size-4):not(.pile-size-dense) .pin-pawn-art{width:100%!important;height:100%!important}
\n/* Performance guardrails: keep the board readable while reducing mobile paint cost. */
@media (max-width: 600px) {
  body.ludo-game.playing-ludo .board.ludo .track,
  body.ludo-game.playing-ludo .board.ludo .lane,
  body.ludo-game.playing-ludo .board.ludo .yard,
  body.ludo-game.playing-ludo .board.ludo .home-base,
  body.ludo-game.playing-ludo .board.ludo .home-center {
    box-shadow: inset 0 1px #fff7 !important;
  }

  body.ludo-game.playing-ludo .board.ludo span.ludo-pawn:not(.playable-token),
  body.ludo-game.playing-ludo .board.ludo span.pin-pawn:not(.playable-token) .pin-pawn-art {
    filter: none !important;
  }

  body.ludo-game.playing-ludo .board.ludo .home-base.score-flash::after,
  body.ludo-game.playing-ludo .board.ludo .home-center.has-finished::after {
    box-shadow: 0 0 8px 2px #ffdc7788, inset 0 0 8px #fff4 !important;
  }

  body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 {
    box-shadow: inset 0 0 0 2px #ffdf6888, 0 0 14px 5px #ffd335 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ludo-game.playing-ludo .board.ludo .yard-celebration.rank-1 {
    box-shadow: inset 0 0 0 2px #ffdf6888, 0 0 8px 3px #ffd335 !important;
  }
}


/* Adjacent occupied squares: use measured pixel offsets while preserving full-size art. */
body.ludo-game.playing-ludo #board.board.ludo span.pin-pawn.adjacent-pawn .pin-pawn-art{
  transform:translate(calc(-50% + var(--adjacent-x,0px)),calc(-50% + var(--adjacent-y,0px)))!important;
}


/* Final result presentation: bot matches use a full-screen personal result. */
body.ludo-game #ludo-bot-result{
  position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:18px;padding:24px;
  background:radial-gradient(circle at 50% 28%,#633b1d 0,#241316 52%,#080914 100%);
  color:#fff4cf;text-align:center;animation:bot-result-in .55s ease-out both;
}
body.ludo-game #ludo-bot-result::before{
  content:"";position:absolute;inset:8%;border:2px solid #f3c96388;border-radius:28px;
  box-shadow:inset 0 0 35px #ffd85c22,0 0 40px #ffbe3b22;pointer-events:none;
}
body.ludo-game #ludo-bot-result .board-logo{position:relative;width:min(70vw,360px);height:auto;margin:0}
body.ludo-game #ludo-bot-result h2{position:relative;margin:0;font:1000 clamp(3.2rem,12vw,7rem)/1 system-ui,sans-serif;letter-spacing:.03em;text-shadow:0 5px #6d3217,0 10px 24px #000b}
body.ludo-game #ludo-bot-result.win h2{color:#ffd34f}
body.ludo-game #ludo-bot-result.lose h2{color:#f3d7d0}
body.ludo-game #ludo-bot-result .bot-result-score{position:relative;margin:0;color:#fff1c4;font:900 clamp(1.1rem,4vw,2rem) system-ui,sans-serif}
@keyframes bot-result-in{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){body.ludo-game #ludo-bot-result{animation:none}}
/* Three/four-player final badges keep the existing board layout but show explicit roles. */
body.ludo-game.playing-ludo .board.ludo.final-rank-board .yard-celebration{
  z-index:20!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;min-width:72%;min-height:44%;padding:4px;border:2px solid #ffe18a;border-radius:18px;
  background:linear-gradient(145deg,#5d2b14ee,#25100cee);box-shadow:0 0 14px #ffcf5c99,inset 0 1px #fff8;
  color:#fff5d2;text-align:center;line-height:1.05;
}
body.ludo-game.playing-ludo .board.ludo.final-rank-board .yard-celebration .rank-crown{width:42%;height:auto;filter:drop-shadow(0 2px 2px #0008)}
body.ludo-game.playing-ludo .board.ludo.final-rank-board .yard-celebration .winner-place{font-size:clamp(8px,1.35vw,16px);white-space:nowrap}
body.ludo-game.playing-ludo .board.ludo.final-rank-board .yard-celebration.rank-1{background:linear-gradient(145deg,#785014f5,#2d1607f2);box-shadow:0 0 20px #ffd34fdd,inset 0 1px #fff8}
body.ludo-game.playing-ludo .board.ludo.final-rank-board .yard-celebration.rank-2{background:linear-gradient(145deg,#526071f2,#20242bf2);box-shadow:0 0 14px #dce8f5aa,inset 0 1px #fff8}
body.ludo-game.playing-ludo .board.ludo.final-rank-board .yard-celebration.rank-3{background:linear-gradient(145deg,#70472ff2,#26140cf2);box-shadow:0 0 12px #c7834566,inset 0 1px #fff8}

/* Final track-size lock: start squares and numbered path squares use identical artwork bounds. */
body.ludo-game.playing-ludo #board.board.ludo :is(.track,.lane)>.pin-pawn:not(.pile-size-3):not(.pile-size-4):not(.pile-size-dense)>.pin-pawn-art{width:100%!important;height:100%!important;scale:1!important;zoom:1!important}

/* The pointed tip, not the art box center, is anchored to the middle of each board tile. */
body.ludo-game.playing-ludo #board.board.ludo :is(.track,.lane)>.pin-pawn>.pin-pawn-art{transform:translate(-50%,-96.25%)!important;transform-origin:50% 50%}

/* The SVG viewport is the tile; only its inner group carries anchor geometry. */
body.ludo-game.playing-ludo #board.board.ludo :is(.track,.lane,.yard)>span.ludo-pawn.pin-pawn>svg.pin-pawn-art.tile-anchored {
  position:absolute!important;overflow:visible!important;filter:none!important;
  left:0!important;top:0!important;width:100%!important;height:100%!important;
  transform:none!important;scale:1!important;zoom:1!important;
}

/* A legal single pawn may pulse, but its centered tip must not bob out of its cell.
   Moving pawns keep the existing travel animation. */
body.ludo-game.playing-ludo #board.board.ludo span.single-tile-pawn:is(.pawn-ready-hint,.playable-token):not(.moving):not(.finished-pawn) {
  animation:single-pawn-ready 620ms ease-in-out infinite!important;
  filter:none!important;
}
@keyframes single-pawn-ready{0%,100%{opacity:1}50%{opacity:.78}}
