/* Tablero, casillas, peones 3D y dados 3D */
#board-wrap { width: 100%; perspective: 1400px; perspective-origin: 50% 20%; padding: 2px 0; }
#board { position: relative; display: grid; grid-template-columns: 1.45fr repeat(9, 1fr) 1.45fr; grid-template-rows: 1.45fr repeat(9, 1fr) 1.45fr; width: var(--bw); aspect-ratio: 1; background: #cfe6d3; border: 4px solid #072a33; border-radius: 12px; margin: 0 auto; color: var(--ink); transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.8,.2,1); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.tilt #board { transform: rotateX(var(--tilt, 16deg)); transform-origin: 50% 75%; }
.tilt #board-wrap { margin-top: -6px; margin-bottom: 4px; }
.sq { position: relative; background: var(--sand); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; overflow: hidden; font-size: clamp(5px, calc(var(--bw) * 0.01628), 12.3px); line-height: 1.05; cursor: pointer; padding: 0; transition: filter .2s; }
.sq:hover { filter: brightness(1.06); }
.sq .band { width: 100%; height: 22%; flex: none; display: flex; align-items: center; justify-content: center; gap: 1px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.sq .nm { padding: 2px 1px 0; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.sq .pr { font-weight: 800; margin-top: auto; padding-bottom: 2px; opacity: .8; }
.sq .ico { font-size: clamp(10px, calc(var(--bw) * 0.03150), 23.2px); line-height: 1; margin-top: 3px; display: grid; place-items: center; }
.sq .ico + .nm { -webkit-line-clamp: 2; padding-top: 1px; }
.sq.corner { background: var(--sand2); justify-content: flex-start; padding-top: 3px; }
.sq.corner .ico { font-size: clamp(12px, calc(var(--bw) * 0.03990), 29px); margin-top: 0; }
.sq.mort { background: repeating-linear-gradient(45deg, #ddd 0 4px, #f2f2f2 4px 8px); }
.sq.owned::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--oc, transparent); }
.sq .house { width: 38%; max-width: 7px; aspect-ratio: 1; background: linear-gradient(#4ad18a, #2fa866); border: 1px solid #fff; display: inline-block; border-radius: 1px; animation: popIn .45s cubic-bezier(.2,1.6,.4,1); }
.sq .hotel { width: 60%; max-width: 12px; height: 70%; background: linear-gradient(#f05252, #d62828); border: 1px solid #fff; display: inline-block; border-radius: 2px; animation: popIn .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes popIn { from { transform: translateY(-14px) scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.sq.cur { outline: 3px solid var(--gold); outline-offset: -3px; z-index: 2; animation: curGlow 1.4s ease-in-out infinite; }
@keyframes curGlow { 50% { outline-color: #fff3b0; } }
.sq.claim { animation: claim .9s ease-out; }
@keyframes claim { 0% { box-shadow: inset 0 0 0 0 var(--oc); filter: brightness(1.8); } 100% { box-shadow: inset 0 0 0 40px transparent; filter: none; } }
.sq.shine::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); animation: shine .8s ease-out; z-index: 4; pointer-events: none; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* peones: capa de fichas posicionada por porcentaje, con saltos casilla a casilla */
#tokens { position: absolute; inset: 0; pointer-events: none; z-index: 6; transform-style: preserve-3d; }
.pawn { --ps: clamp(12px, calc(var(--bw) * 0.03990), 29px); position: absolute; width: var(--ps); height: var(--ps); margin: calc(var(--ps) / -2) 0 0 calc(var(--ps) / -2); transition: left .15s linear, top .15s linear, opacity .18s, transform .18s; transform: translateZ(8px); }
.pawn .pb { position: absolute; inset: 0; transition: transform .15s; }
.pawn .pb::before { content: ""; position: absolute; left: 12%; right: 12%; bottom: -14%; height: 32%; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(1.5px); }
.pawn .pb::after { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 34% 28%, #fff 0 8%, rgba(255,255,255,.0) 40%), radial-gradient(circle at 50% 60%, var(--pc), color-mix(in srgb, var(--pc) 55%, #000)); border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.45); }
.pawn.me .pb::after { border-color: #111; box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0,0,0,.5); }
.pawn.hop .pb { animation: hop .15s ease-out; }
@keyframes hop { 40% { transform: translateY(-80%) scale(1.15); } }
.pawn.poof { opacity: 0; transform: translateZ(8px) scale(.2); }
.pawn.gone { opacity: 0; transform: translateZ(8px) scale(0) rotate(90deg); }
.pawn.active .pb { animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-18%); } }

/* centro del tablero */
.center { grid-area: 2 / 2 / 11 / 11; background: linear-gradient(160deg, #c7ebd9, #8fcfc2 60%, #7fc3d1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; text-align: center; position: relative; overflow: hidden; border-radius: 6px; }
.center::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, rgba(255,255,255,.0), rgba(255,255,255,.28), rgba(255,255,255,0) 30%); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center > * { position: relative; }
.center .brand { font-weight: 900; font-size: clamp(14px, calc(var(--bw) * 0.05250), 37.7px); color: #0b3c49; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(255,255,255,.6); }
.center .turn { font-size: clamp(10px, calc(var(--bw) * 0.03150), 20.3px); font-weight: 700; }
.dice { display: flex; gap: clamp(8px, calc(var(--bw) * 0.03150), 23.2px); padding: 4px 0; }
.die3d { --ds: clamp(30px, calc(var(--bw) * 0.10500), 72.5px); width: var(--ds); height: var(--ds); perspective: 260px; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.18,.85,.25,1); }
.cube.still { transition: none; }
.face { position: absolute; inset: 0; border-radius: 22%; background: linear-gradient(145deg, #fff, #dfe9ea); border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 0 8px rgba(0,0,0,.15); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 14%; backface-visibility: hidden; }
.face s { border-radius: 50%; margin: 12%; }
.face s.on { background: radial-gradient(circle at 35% 30%, #455, #0b3c49); box-shadow: inset 0 1px 1px rgba(0,0,0,.5); }
.face.f1 s.on { background: radial-gradient(circle at 35% 30%, #ff9b84, #e4572e); }
.f1 { transform: translateZ(calc(var(--ds) / 2)); }
.f6 { transform: rotateY(180deg) translateZ(calc(var(--ds) / 2)); }
.f3 { transform: rotateY(90deg) translateZ(calc(var(--ds) / 2)); }
.f4 { transform: rotateY(-90deg) translateZ(calc(var(--ds) / 2)); }
.f2 { transform: rotateX(90deg) translateZ(calc(var(--ds) / 2)); }
.f5 { transform: rotateX(-90deg) translateZ(calc(var(--ds) / 2)); }
.die3d .shadow { position: absolute; left: 10%; right: 10%; bottom: -12%; height: 14%; background: rgba(0,0,0,.25); border-radius: 50%; filter: blur(3px); }
.die3d { position: relative; }
.die3d.tossed { animation: toss 1s cubic-bezier(.3,.7,.4,1); }
@keyframes toss { 0% { transform: translateY(0) scale(1); } 25% { transform: translateY(-34px) scale(1.25); } 55% { transform: translateY(0) scale(1); } 70% { transform: translateY(-9px); } 100% { transform: translateY(0); } }
.center .timer { font-size: clamp(11px, calc(var(--bw) * 0.03570), 23.2px); font-weight: 800; background: #0b3c49; color: #fff; padding: 2px 10px; border-radius: 99px; transition: background .2s; }
.center .timer.low { background: #c0392b; animation: tick 1s ease-in-out infinite; }
@keyframes tick { 50% { transform: scale(1.12); } }
.center .last { font-size: clamp(8px, calc(var(--bw) * 0.02730), 17.4px); max-height: 3.6em; overflow: hidden; opacity: .85; }

/* casillas laterales (bajas y anchas): sin precio en las que llevan icono, para que no se amontone */
.sq.side .ico { margin-top: 1px; font-size: clamp(9px, calc(var(--bw) * 0.02730), 18.8px); }
.sq.side .ico ~ .pr { display: none; }
.sq.side .ico + .nm { -webkit-line-clamp: 2; }
