.ld-wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(180px, 240px); gap: 20px; justify-content: center; align-items: start; }
.ld-board { position: relative; display: grid; grid-template-columns: repeat(15, 1fr); grid-template-rows: repeat(15, 1fr); aspect-ratio: 1; width: 100%; background: #fff; border: 3px solid #0a3d33; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); user-select: none; -webkit-user-select: none; }
.ld-cell { border: 1px solid #c9cfd6; background: #fff; }
.ld-cell.safe { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l2.6 5.6 6 .7-4.5 4.1 1.2 6L12 16.4 6.7 19.4l1.2-6L3.4 9.3l6-.7z' fill='%23c9a227' opacity='.55'/%3E%3C/svg%3E") center / 70% no-repeat; }
.home-red, .start-red { background: #e5484d; }
.home-green, .start-green { background: #2f9e6e; }
.home-yellow, .start-yellow { background: #f2c218; }
.home-blue, .start-blue { background: #2f6fd1; }
.ld-base { display: grid; place-items: center; padding: 12%; border: 1px solid rgba(0,0,0,.15); }
.base-red { background: #e5484d; } .base-green { background: #2f9e6e; } .base-yellow { background: #f2c218; } .base-blue { background: #2f6fd1; }
.ld-base-in { width: 100%; height: 100%; background: #fff; border-radius: 14%; box-shadow: inset 0 2px 6px rgba(0,0,0,.15); }
.ld-center { background: conic-gradient(from 45deg, #f2c218 0 25%, #2f6fd1 0 50%, #e5484d 0 75%, #2f9e6e 0); border: 1px solid #c9cfd6; }
.ld-pieces { position: absolute; inset: 0; pointer-events: none; }
.ld-piece { --size: calc(100% / 15 * .78); position: absolute; width: var(--size); height: var(--size); left: calc((var(--c) + .5 + var(--dx, 0)) * 100% / 15); top: calc((var(--r) + .5) * 100% / 15); transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid rgba(0,0,0,.55); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 2px 3px rgba(0,0,0,.35); transition: left .13s ease, top .13s ease; pointer-events: auto; padding: 0; cursor: default; z-index: 2; }
.ld-piece::after { content: ""; position: absolute; inset: 28%; border-radius: 50%; background: rgba(255,255,255,.55); }
.ld-piece.red { background: #e5484d; } .ld-piece.green { background: #2f9e6e; } .ld-piece.yellow { background: #f2c218; } .ld-piece.blue { background: #2f6fd1; }
.ld-piece.done { --size: calc(100% / 15 * .5); opacity: .9; }
.ld-piece.can { cursor: pointer; z-index: 3; animation: ld-pulse .8s ease-in-out infinite alternate; }
@keyframes ld-pulse { to { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ink); } }
.ld-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 10px; text-align: center; }
.ld-turn { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 800; font-size: 1.05rem; }
.ld-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,.4); }
.ld-dot.red { background: #e5484d; } .ld-dot.green { background: #2f9e6e; } .ld-dot.yellow { background: #f2c218; } .ld-dot.blue { background: #2f6fd1; }
.ld-die { width: 84px; height: 84px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 12px; border-radius: 18px; border: 1px solid var(--line-strong); background: #fff; box-shadow: 0 4px 0 var(--line-strong), var(--shadow); cursor: pointer; }
.ld-die i { border-radius: 50%; }
.ld-die i.on { background: var(--ink); }
.ld-die:disabled { cursor: default; opacity: .75; }
.ld-die.ready { animation: ld-bob 1s ease-in-out infinite alternate; border-color: var(--ink); }
.ld-die.rolling { animation: ld-roll .25s linear infinite; }
@keyframes ld-bob { to { transform: translateY(-4px); } }
@keyframes ld-roll { 50% { transform: rotate(14deg) scale(.95); } }
.ld-msg { font-weight: 700; min-height: 3em; margin: 0; }
@media (max-width: 760px) {
  .ld-wrap { grid-template-columns: 1fr; }
  .ld-panel { flex-direction: row; flex-wrap: wrap; justify-content: center; padding-top: 0; order: -1; }
  .ld-die { width: 64px; height: 64px; padding: 9px; }
  .ld-msg { flex-basis: 100%; min-height: 2.6em; }
}
@media (prefers-reduced-motion: reduce) { .ld-piece { transition: none; } .ld-piece.can, .ld-die.ready { animation: none; } }
