/* ======================================================================
   PC (desde 1024×600, apaisado). Se carga solo ahí: ver el <link media> de index.html.
   La partida ocupa toda la pantalla y las piezas se apoyan alrededor del tablero, como en una mesa:
   rivales a la izquierda, tu lugar abajo a la izquierda, tus escrituras en la mano, la placa roja a la derecha.
   Mismo mundo que el celular: cartulina, borde de tinta, letra del tablero.
   ====================================================================== */
:root { --out: cubic-bezier(.23, 1, .32, 1); --inout: cubic-bezier(.77, 0, .175, 1); --drawer: cubic-bezier(.32, .72, 0, 1);
  --lift: 0 8px 20px rgba(0, 0, 0, .42); }
.pc-only { display: revert; }
kbd { display: inline-block; font: 800 .8rem / 1 var(--board); letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px;
  background: var(--paper-hi); color: var(--ink); border: 2px solid var(--ink); }
.btn kbd { margin-left: 8px; vertical-align: .12em; }

/* ---------- INICIO: el afiche de la pantalla de carga, con los personajes parados adelante ---------- */
.home-poster { position: absolute; inset: 0 0 auto; height: 100dvh; display: flex; flex-direction: column;
  background: linear-gradient(135deg, #CFE8D2 0 24%, #9cc6dc 24% 41%, #e9f3ea 41% 59%, #9cc6dc 59% 76%, #CFE8D2 76%); }
#stage { flex: 1; min-height: 0; display: block; width: 72vw; margin-left: 28vw; cursor: pointer; touch-action: pan-y;
  -webkit-mask: linear-gradient(90deg, transparent 8%, #000 22%, #000 94%, transparent); mask: linear-gradient(90deg, transparent 8%, #000 22%, #000 94%, transparent); }
#screen-home { display: block; place-items: normal; align-content: normal; padding: 0; background: var(--bg); color: var(--ink); overflow: hidden auto; }
.home-card { position: relative; z-index: 2; width: auto; height: 100dvh; margin: 0; padding: clamp(50px, 8vh, 88px) 0 clamp(44px, 7vh, 72px) clamp(40px, 5vw, 96px);
  display: grid; grid-template-columns: minmax(340px, 30vw); align-content: center; gap: clamp(10px, 1.9vh, 20px);
  background: none; border: 0; box-shadow: none; pointer-events: none; }
.home-card > * { pointer-events: auto; }
#screen-home .logo { font-size: clamp(4.2rem, min(8.4vw, 15vh), 9rem); padding: .06em .16em .05em; border-width: 7px; outline-width: 5px; border-radius: 28px; justify-self: start;
  margin-left: -8px; box-shadow: 0 18px 34px rgba(22, 19, 13, .32); letter-spacing: .05em; animation: logoIn .7s var(--out) both; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-40px) rotate(-7deg) scale(1.08); } }
.tagline { margin: 4px 0 0; text-align: left; font-size: clamp(1.05rem, 1.35vw, 1.4rem); font-weight: 500; line-height: 1.3; text-wrap: balance; max-width: 22em; }
.home-modes, .home-panel { gap: clamp(8px, 1.3vh, 14px); }
.home-panel { padding: 22px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--lift); }
.play-mode { box-shadow: 0 8px 18px rgba(22, 19, 13, .28); border-radius: 14px; transition: transform .18s var(--out); }
.play-mode .pm-icon { width: clamp(72px, 6vw, 104px); }
.play-mode .pm-icon svg { width: 50%; height: auto; transition: transform .25s var(--out); }
.play-mode b { font-size: clamp(1.5rem, 1.9vw, 2.2rem); }
.play-mode small { font-size: clamp(.9rem, 1vw, 1.05rem); }
.play-mode > span:last-child { padding-block: clamp(9px, 1.5vh, 18px); }
.install, .donate { justify-self: start; align-self: center; }
.donate { margin: 0; }
/* Tino, colgado arriba del escenario */
.tino-host { position: absolute; right: clamp(32px, 4vw, 72px); top: clamp(60px, 9vh, 100px); width: min(380px, 27vw); }
.tino-host .tino-face { width: 92px; height: 92px; }
.tino-bubble { font-size: 1rem; box-shadow: 0 6px 14px rgba(22, 19, 13, .2); }
/* Nombre y tira de caras, al pie del escenario */
.car-foot { position: absolute; right: 0; width: 72vw; bottom: calc(clamp(44px, 7vh, 72px) + 62px); margin: 0; flex-direction: row; justify-content: center; align-items: center; gap: 18px; pointer-events: none; }
.car-name { font-size: clamp(2.2rem, 3.6vw, 4rem); color: var(--ink); -webkit-text-stroke: 8px var(--paper-hi); paint-order: stroke fill; }
.car-hear { pointer-events: auto; box-shadow: 0 4px 10px rgba(22, 19, 13, .25); }
.carousel { position: absolute; right: 15vw; width: 42vw; bottom: calc(clamp(22px, 4.5vmin, 44px) + 10px); }
.car-track { padding-block: 14px; margin: 0; gap: 10px; }
.car-track img { width: 44px; height: 44px; }
.car-track::before, .car-track::after { width: calc(50% - 32px); }
.about { position: relative; width: min(760px, calc(100% - 96px)); margin: 0 auto; margin-block: 56px 72px; font-size: 1rem; }
.about h2 { font: 800 2rem / 1.05 var(--board); letter-spacing: .03em; }
.about h3 { font: 800 1.4rem / 1.1 var(--board); letter-spacing: .03em; margin-top: 24px; }
body[data-screen="home"] .audio-ctrls { bottom: calc(clamp(22px, 4.5vmin, 44px) + 16px); right: 20px; }

/* ---------- SALA: elegir personaje, en una sola pantalla ---------- */
#screen-lobby { padding: 0; overflow: hidden;
  background: linear-gradient(135deg, #CFE8D2 0 24%, #9cc6dc 24% 41%, #e9f3ea 41% 59%, #9cc6dc 59% 76%, #CFE8D2 76%); }
.lobby { max-width: 1840px; height: 100%; padding: 16px clamp(20px, 2.4vw, 48px) 0; gap: 14px; flex: 1 1 auto; min-height: 0; }
.lobby-head { flex: none; }
.solo-head, .room-code { background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; padding: 6px 16px; color: var(--ink); box-shadow: 0 5px 12px rgba(22, 19, 13, .2); }
.room-code .code { color: var(--ink); font-size: 2rem; line-height: 1; }
.room-code .muted, .room-code:hover .muted { color: var(--ink2); }
.room-code { transition: transform .16s var(--out); }
.lobby-grid { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) clamp(330px, 25vw, 430px); gap: clamp(16px, 2vw, 36px); padding-bottom: 18px; }
.card.pick { background: none; border: 0; box-shadow: none; padding: 0; min-height: 0; display: grid; gap: 0 clamp(12px, 1.6vw, 28px);
  grid-template: auto auto minmax(0, 1fr) / clamp(300px, 27vw, 460px) minmax(0, 1fr);
  grid-template-areas: "name stage" "title stage" "grid stage"; position: relative; }
.card.pick::before { content: ""; grid-column: 1; grid-row: 1 / 4; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--lift); }
.card.pick > .field { grid-area: name; padding: 18px 18px 0; margin-bottom: 14px; position: relative; }
.card.pick > h2 { grid-area: title; padding: 0 18px; margin: 0 0 8px !important; position: relative; }
.card.pick > .char-grid { grid-area: grid; position: relative; max-height: none; min-height: 0; margin: 0 4px 6px 12px; padding: 4px 6px 12px 4px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); }
.char { padding: 18px 2px 6px; background: linear-gradient(var(--c) 0 10px, var(--ink) 10px 13px, var(--paper-hi) 13px); transition: transform .16s var(--out); }
.char img { width: 100%; max-width: 78px; height: auto; transition: transform .2s var(--out); }
.char .n { font-size: .95rem; }
.char .by:empty { display: none; }
.card.pick > .preview-wrap { grid-area: stage; height: auto; min-height: 0; margin: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
#preview { position: absolute; inset: 0; }
#preview-name { bottom: 2%; font-size: clamp(2.8rem, 5.4vw, 6rem); color: var(--ink); text-shadow: none; -webkit-text-stroke: 10px var(--paper-hi); paint-order: stroke fill; line-height: .95; pointer-events: none; }
#preview-name small { margin: 10px auto 0; width: fit-content; max-width: 90%; font: 600 1rem / 1.3 var(--fun); text-transform: none; letter-spacing: 0; color: var(--ink); -webkit-text-stroke: 0;
  padding: 7px 16px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; }
.pv-nav { width: 58px; height: 58px; font-size: 2rem; box-shadow: 0 5px 12px rgba(22, 19, 13, .25); transition: transform .14s var(--out), background .15s; }
.card.side { overflow-y: auto; min-height: 0; padding: 18px; border-radius: 18px; gap: 8px; box-shadow: var(--lift); }
.side h2 { margin-top: 10px !important; }
.lobby-bar { position: relative; margin: 0; padding: 12px clamp(20px, 2.4vw, 48px); flex: none; }
.lobby-bar-in { max-width: 1744px; }
.lobby-bar p { font-size: 1.1rem; }
.lobby-bar .btn.primary { font-size: 1.9rem; }

/* ---------- PARTIDA ---------- */
#screen-game, #screen-game.board-full { display: block; background: #1c0f07; }
#board-wrap { position: absolute; inset: 0; container-type: normal; }
#board3d { cursor: grab; }
#board3d:active { cursor: grabbing !important; }
.vignette { position: absolute; inset: 0; pointer-events: none; display: block;
  background: radial-gradient(ellipse 78% 82% at 50% 46%, transparent 52%, rgba(16, 7, 2, .62) 100%); }
#panel { position: absolute; inset: 0; display: block; background: none; border: 0; pointer-events: none; overflow: clip; }
#panel > * { pointer-events: auto; }
.tabs, .log-mini, .sheet-backdrop, .side-tools, .btns.desk-only { display: none !important; }

/* Cartel de turno y, colgado abajo, pozo y ronda */
#turn-banner { top: 14px; padding: 3px 20px 3px 4px; gap: 12px; font-size: 1.55rem; border-radius: 999px; overflow: visible; box-shadow: var(--lift); z-index: 3; }
#turn-banner img { width: 44px; height: 44px; border-width: 3px; }
#turn-banner .countdown { font-size: 1.55rem; min-width: 2.9em; }
#turn-banner .countdown.low { animation: low .5s ease-in-out infinite alternate; }
@keyframes low { to { transform: scale(1.12); } }
.pot { left: 50%; top: 60px; bottom: auto; transform: translateX(-50%); padding: 12px 18px 5px; border-radius: 0 0 14px 14px; font-size: .95rem; background: var(--paper-2); z-index: 2; white-space: nowrap; }

/* Lugares: cada jugador es una ficha con su personaje asomando por arriba */
.players { position: absolute; left: 18px; top: 22px; width: 236px; padding: 0; border: 0; display: flex; flex-direction: column; gap: clamp(12px, 2.2vh, 22px); pointer-events: none !important; }
.pl { pointer-events: auto; align-items: stretch; gap: 0; min-height: 70px; padding: 0; border-radius: 14px; box-shadow: var(--lift); flex-wrap: wrap;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 78%, #fff) 0 76px, var(--ink) 76px 79px, var(--paper-hi) 79px); transition: transform .22s var(--out); }
.pl img:not(.emoji) { position: absolute; left: 0; bottom: 0; width: 80px; height: 80px; margin-left: -2px; border: 0; border-radius: 0 0 0 11px; background: none; pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(22, 19, 13, .3)); }
.pl .info { margin-left: 79px; padding: 6px 8px 4px 10px; flex: 1 0 calc(100% - 79px); }
.pl .name { font-size: 1.2rem; }
.pl .money { font: 800 1.45rem / 1.05 var(--board); letter-spacing: .02em; }
.pl .icons { font-size: .85rem; }
.pl .holds { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 8px 7px 89px; min-height: 0; }
.pl .holds:empty { display: none; }
.holds .hg { display: inline-flex; gap: 1px; padding: 1px; background: var(--ink); border-radius: 4px; }
.holds .hg.full { box-shadow: 0 0 0 2px var(--gold); }
.holds i { width: 11px; height: 13px; border-radius: 2px; background: var(--c); color: #fff; font: 800 .68rem / 13px var(--board); text-align: center; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.holds i.m { opacity: .35; }
.pl.turn { transform: translateX(12px); box-shadow: 0 0 0 4px var(--gold), var(--lift); }
.pl.turn-in { animation: seatIn .45s var(--out); }
@keyframes seatIn { from { transform: translateX(0); } }
.pl.talking > img { box-shadow: none; filter: drop-shadow(0 0 5px #1FA457) drop-shadow(0 0 2px #1FA457); }
/* Las cartas de cada rival: un abanico chico que asoma al costado de su ficha (las fichitas de color quedan para el celular) */
.pl:not(.me):has(.rh) .holds { display: none; }
.rh { --step: min(15px, 96px / var(--n1)); position: absolute; left: calc(100% + 4px); top: 50%; width: calc(var(--step) * (var(--n) - 1) + 34px); height: 46px; margin-top: -23px; display: block; }
.pl.me .rh { display: none; }
.rc { position: absolute; top: 0; left: calc(var(--k) * var(--step)); width: 34px; height: 46px; display: block; background: linear-gradient(var(--c) 0 13px, var(--ink) 13px 15px, var(--paper-hi) 15px);
  border: 2px solid var(--ink); border-radius: 5px; box-shadow: 0 2px 0 rgba(22, 19, 13, .3); transform: rotate(var(--r)); transform-origin: 50% 160%;
  transition: transform .16s var(--out); color: var(--ink); }
.rc svg { position: absolute; left: 50%; bottom: 4px; width: 20px; height: 20px; margin-left: -10px; }
.rc b { position: absolute; left: 0; right: 0; top: -1px; color: #fff; font: 800 .7rem / 13px var(--board); text-align: center; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.rc b.hotel { color: #ffb3a8; }
.rc.full { box-shadow: 0 0 0 2px var(--gold), 0 2px 0 rgba(22, 19, 13, .3); }
.rc.mort { filter: grayscale(.85) brightness(.82); }
.pl:has(.rh) { z-index: 1; }
.pl:has(.rc:hover) { z-index: 5; }

/* Tu lugar: abajo a la izquierda y más grande */
.pl.me { position: fixed; left: 18px; bottom: 18px; width: 262px; min-height: 104px; align-content: flex-start;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 78%, #fff) 0 104px, var(--ink) 104px 107px, var(--paper-hi) 107px); }
.pl.me img:not(.emoji) { width: 126px; height: 126px; margin-left: -10px; }
.pl.me .info { margin-left: 107px; flex-basis: calc(100% - 107px); padding-top: 10px; }
.pl.me .holds { margin-left: 117px; }
.pl.me .name { font-size: 1.3rem; }
.pl.me .name::after { content: ""; }
.pl.me .money { font-size: 2.1rem; }
.pl.me.turn { transform: translateY(-6px); }
.pl.me.turn-in { animation-name: meIn; }
@keyframes meIn { from { transform: none; } }

/* Mano de escrituras: asoma por abajo y la carta señalada sube entera */
.hand { position: absolute; left: 50%; bottom: 0; translate: -50% 0; display: flex; justify-content: center; align-items: flex-end; height: 86px; max-width: calc(100vw - 800px); pointer-events: none !important; z-index: 6; transition: translate .28s var(--drawer); }
.hc { --w: 92px; position: relative; flex: 0 1 var(--w); min-width: 10px; height: 138px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; display: block;
  transform: translateY(calc(58px + var(--dy))) rotate(var(--r)); transform-origin: 50% 130%; transition: transform .22s var(--out); }
.hc.gap { margin-left: 10px; }
.hc::before { content: ""; position: absolute; left: 50%; top: 0; width: var(--w); height: 100%; margin-left: calc(var(--w) / -2); border-radius: 10px; border: 3px solid var(--ink);
  background: linear-gradient(var(--c, #E8E1CB) 0 34px, var(--ink) 34px 37px, var(--paper-hi) 37px); box-shadow: 0 -2px 12px rgba(0, 0, 0, .35); }
.hc.full::before { box-shadow: 0 0 0 3px var(--gold), 0 -2px 12px rgba(0, 0, 0, .35); }
.hc.mort::before { filter: grayscale(.85) brightness(.8); }
.hc > span { position: absolute; left: 50%; width: var(--w); margin-left: calc(var(--w) / -2); text-align: center; pointer-events: none; }
.hc-n { top: 5px; height: 27px; padding: 0 5px; display: grid; place-items: center; overflow: hidden; color: var(--ci, var(--ink)); font: 800 .86rem / .95 var(--board); letter-spacing: .01em; text-transform: uppercase; }
.hc-ico { top: 46px; color: var(--ink); font-size: 2rem; line-height: 1; }
.hc-ico svg { width: 42px; height: 42px; }
.hc-r { bottom: 12px; color: var(--ink); font: 800 1.15rem / 1 var(--board); }
.hc.mort .hc-r { font-size: .9rem; }
.hc-top { top: -9px; z-index: 1; display: flex; justify-content: center; gap: 2px; }
.hc-h { width: 13px; height: 13px; background: #1FA457; border: 2px solid var(--ink); clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%); }
.hc-h.hotel { width: 24px; background: #d62f2f; }
.hc:focus-visible { outline: none; transform: translateY(-58px) scale(1.16); z-index: 60 !important; }
.hc:focus-visible::before { box-shadow: 0 0 0 4px var(--gold), 0 14px 26px rgba(0, 0, 0, .5); }
.hc.new { animation: dealt .6s var(--out); }
@keyframes dealt { from { transform: translateY(-46vh) rotate(14deg) scale(1.5); opacity: 0; } 35% { opacity: 1; } }

/* Secciones y herramientas: piezas a la derecha; el nombre sale al señalar */
.rail { position: absolute; right: 16px; top: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 8; }
.rail-b, .board-tools .tool { position: relative; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 13px; border: 3px solid var(--ink); background: var(--paper); color: var(--ink);
  cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); transition: transform .14s var(--out), background .15s; }
.rail-b .ico svg, .board-tools .ico svg { width: 25px; height: 25px; }
.rail-b.on { background: var(--gold); }
.rail-b .badge { position: absolute; top: -8px; left: -8px; margin: 0; font-size: .85rem; }
.rail-b > span { position: absolute; right: calc(100% + 8px); top: 50%; padding: 5px 11px; border-radius: 9px; background: var(--ink); color: var(--paper); white-space: nowrap;
  font: 800 1.05rem / 1 var(--board); letter-spacing: .05em; text-transform: uppercase; opacity: 0; transform: translate(6px, -50%); transition: opacity .14s, transform .14s var(--out); pointer-events: none; }
.rail-b:focus-visible > span { opacity: 1; transform: translate(0, -50%); }
.board-tools { right: 16px; top: auto; bottom: 18px; flex-direction: column; gap: 8px; z-index: 4; }
.board-tools .tool { width: 42px; height: 42px; }
.board-tools .ico svg { width: 21px; height: 21px; }

/* Lo que va pasando: cae arriba a la derecha y se retira solo */
.events { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; position: absolute; right: 78px; top: 16px; width: 330px; pointer-events: none; z-index: 4; }
.ev-card { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 4px 16px 4px 4px; border-radius: 22px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  font-size: .95rem; font-weight: 500; line-height: 1.2; opacity: 1; transform: none; transition: opacity .35s ease, transform .35s var(--out); }
@starting-style { .ev-card { opacity: 0; transform: translateX(40px); } }
.ev-card.out { opacity: 0; transform: translateX(24px); transition-duration: .2s; }
.ev-card img:not(.emoji) { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 3px solid var(--c, var(--ink)); background: #fff; }
.ev-ico { width: 34px; text-align: center; }
.ev-t b { font-weight: 700; color: color-mix(in srgb, var(--c) 56%, #000); }
.ev-t .lg-money { font-weight: 700; color: var(--gold-ink); }

/* Acciones: abajo a la derecha, sin panel. La placa roja manda. */
.actions { position: absolute; right: 78px; bottom: 18px; width: 300px; padding: 0; border: 0; gap: 10px; align-items: stretch; z-index: 7; transition: transform .28s var(--drawer); pointer-events: none !important; }
.actions > * { pointer-events: auto; }
.actions .msg { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 14px; font-size: 1rem; box-shadow: var(--lift); }
.actions > .msg:only-child { align-self: flex-end; border-radius: 999px; padding: 7px 18px; }
.actions .btn { padding: 11px 14px; box-shadow: 0 5px 14px rgba(0, 0, 0, .35); }
.actions .btns:has(.roll-go), .actions .btns:has(.end-go) { order: 9; justify-content: flex-end; }
.actions .btn.roll-go, .actions .btn.end-go { flex: none; position: relative; width: 168px; height: 168px; padding: 0 12px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  white-space: normal; border: 5px solid #fff; outline: 4px solid var(--ink); box-shadow: 0 14px 28px rgba(0, 0, 0, .5), inset 0 -10px 0 rgba(0, 0, 0, .16); transition: transform .14s var(--out), background .15s; }
.actions .btn.roll-go { animation: goPulse 1.8s ease-in-out infinite; }
.roll-go .rg-ico, .end-go .rg-ico { display: grid; }
.roll-go .rg-ico svg, .end-go .rg-ico svg { width: 62px; height: 62px; }
.roll-go .rg-long { display: none; }
.roll-go .rg-short { display: block; font: 800 2rem / 1 var(--board); letter-spacing: .07em; }
.end-go { font-size: 1.3rem !important; line-height: 1 !important; }
.end-go .rg-ico svg { width: 44px; height: 44px; stroke-width: 3; }
.roll-go kbd, .end-go kbd { position: absolute; margin: 0 !important; left: 50%; bottom: -13px; transform: translateX(-50%); }
.actions .btn.roll-go:disabled, .actions .btn.end-go:disabled { animation: none; background: #8d867a; }
.buy-box { display: none; }
.buy-deed { display: block; }
.buy-deed .deed { padding: 12px 14px; border-radius: 18px; box-shadow: 0 20px 44px rgba(0, 0, 0, .55); }
.buy-deed .deed td { padding: 2px 4px; }
.buy-deed .deed-badge { width: 56px; height: 56px; margin: 2px auto 6px; }
.buy-deed.deal { animation: buyIn .5s var(--out); transform-origin: 100% 100%; }
@keyframes buyIn { from { opacity: 0; transform: translate(-30px, 70px) rotate(-9deg) scale(.82); } }
.actions:has(.buy-deed) { width: 310px; }
.actions .btn.good { font-size: 1.4rem; }
@media (max-height: 740px) { .buy-deed .deed-badge, .buy-deed .deed hr { display: none; } .buy-deed .deed table { font-size: .92rem; } }

/* Dados de la última tirada: aparecen grandes con el total y se van */
.dice-area { left: 50%; right: auto; top: auto; bottom: 112px; transform: translateX(-50%); align-items: center; gap: 12px; z-index: 5; transition: opacity .3s ease; }
.dice-area.fade { opacity: 0; }
.die { width: 64px; height: 64px; padding: 9px; border-width: 3px; border-radius: 15px; }
.die i { width: 11px; height: 11px; }
.dice-sum { display: block; margin-left: 4px; font: 800 5.4rem / .8 var(--board); color: var(--paper-hi); -webkit-text-stroke: 11px var(--ink); paint-order: stroke fill; font-variant-numeric: tabular-nums; animation: sumIn .4s cubic-bezier(.34, 1.4, .5, 1); }
@keyframes sumIn { from { transform: scale(1.6); opacity: 0; } }

/* Cajón de secciones */
.tab-body { position: absolute; right: 78px; top: 14px; bottom: 18px; width: min(390px, 32vw); background-color: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); z-index: 7;
  display: flex; flex-direction: column; overflow: hidden; visibility: hidden; opacity: 0; transform: translateX(36px); pointer-events: none !important;
  transition: transform .2s var(--drawer), opacity .16s ease, visibility 0s .2s; }
body.sheet-open .tab-body { visibility: visible; opacity: 1; transform: none; pointer-events: auto !important; transition: transform .3s var(--drawer), opacity .16s ease, visibility 0s; border-top: 3px solid var(--ink); }
body.sheet-open .actions { transform: translateX(calc(-1 * (min(390px, 32vw) + 16px))); }
body.sheet-open .events { display: none; }
body.sheet-open .hand { translate: -50% 150px; }   /* con el cajón abierto la mano se baja: no hay lugar para las dos */
.sheet-head { display: flex !important; align-items: center; justify-content: space-between; flex: none; padding: 22px 12px 10px 16px; border-bottom: 3px solid var(--ink); font: 800 1.6rem / 1 var(--board); letter-spacing: .04em; text-transform: uppercase; }
.sheet-head .modal-close { position: static; }
.tab { position: relative; inset: auto; flex: 1; min-height: 0; padding: 14px; }
.lg { font-size: .98rem; }

/* Globos: chat desde la ficha de cada uno, Tino desde el tablero */
.say-bubble { position: fixed; z-index: 9; max-width: 290px; padding: 9px 15px; background: var(--paper-hi); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--lift); font-size: 1rem; font-weight: 500; line-height: 1.25;
  overflow-wrap: anywhere; pointer-events: none; transform: translateY(-50%); transform-origin: 0 50%; transition: opacity .18s ease, transform .22s var(--out); }
.say-bubble::before { content: ""; position: absolute; left: -10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: inherit; border: 3px solid var(--ink); border-width: 0 0 3px 3px; transform: rotate(45deg); }
@starting-style { .say-bubble { opacity: 0; transform: translateY(-50%) scale(.92); } }
.say-bubble.out { opacity: 0; }
.tino-say { left: 0; top: 0; bottom: auto; width: max-content; max-width: 320px; padding: 9px 16px; border-radius: 18px; font-size: 1rem; transform: none; transition: opacity .2s ease; }
.tino-say img { display: none; }
.tino-say::after { content: ""; position: absolute; left: 26px; bottom: -10px; width: 14px; height: 14px; background: var(--paper); border: 3px solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* Dato del casillero bajo el mouse */
.tip { position: fixed; left: 0; top: 0; z-index: 30; display: block; min-width: 190px; max-width: 250px; padding: 0 0 8px; background: var(--paper-hi); color: var(--ink); border: 3px solid var(--ink); border-radius: 13px; overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5); pointer-events: none; opacity: 0; transition: opacity .13s ease; }
.tip.on { opacity: 1; }
.tip::before { content: ""; display: block; height: 12px; background: var(--c); border-bottom: 3px solid var(--ink); }
.tip-n { display: block; padding: 8px 12px 4px; font: 800 1.3rem / 1 var(--board); letter-spacing: .02em; text-transform: uppercase; }
.tip p { margin: 0; padding: 0 12px; font-size: .92rem; line-height: 1.3; }
.tip dl { margin: 0; padding: 0 12px; }
.tip dl div { display: flex; justify-content: space-between; gap: 14px; font-size: .95rem; line-height: 1.45; }
.tip dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip-o { display: flex; align-items: center; gap: 7px; padding: 0 12px 4px; font-weight: 600; font-size: .95rem; }
.tip img { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.tip-here { display: flex; gap: 3px; padding: 6px 12px 0; }


/* ---------- Ventanas, cartas y subasta: con el tamaño de una pantalla grande ---------- */
.toasts { top: 112px; }
.toast { font-size: 1.05rem; padding: 9px 20px; }
.modal-card { width: min(470px, 100%); padding: 32px 24px 24px; box-shadow: var(--m-shadow); }
.modal-card.wide { width: min(860px, 100%); }
.modal-card { animation: pcPop .24s var(--out); }
@keyframes pcPop { from { opacity: 0; transform: scale(.95) translateY(12px); } }
.card-popup { width: 440px; padding: 24px; }
.card-popup p { font-size: 1.35rem; line-height: 1.3; }
.card-popup .ch-seal { width: 60px; height: 60px; font-size: 2rem; }
.card-popup .ch-name b { font-size: 2rem; }
.arrest-card, .party-card, .ptitle-card { width: 440px; padding: 26px; }
.arrest-stack { width: 440px; }
.patrol { width: 360px; }
.arrest-title, .party-title, .ptitle-t { font-size: 3rem; }
.party-card img:not(.emoji), .ptitle-card img:not(.emoji) { width: 120px; height: 120px; }
.auction { width: min(820px, calc(100vw - 80px)); padding: 26px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0 28px; align-content: center; grid-auto-rows: min-content; }
.auction > * { grid-column: 2; }
.auction > .auction-deed { grid-column: 1; grid-row: 1 / span 12; margin: 0; align-self: center; animation: none; }
.auction h3 { font-size: 2rem; text-align: left; margin-top: 4px; }
.auction .center { text-align: left !important; }
.auction .who { text-align: left; font-size: 1.05rem; }
.auction .bid { font-size: 5.6rem; text-align: left; line-height: .95; margin: 8px 0 4px; }
.auction .btns .btn { padding: 13px; font-size: 1.4rem; }
#au-info { display: none; }
body #tutorial { left: 290px; width: 540px; }
.tut-who { width: 150px; height: 150px; }
body #tutorial p { font-size: 1.02rem; }

/* ---------- Señalar con el mouse ---------- */
@media (hover: hover) and (pointer: fine) {
  .play-mode:hover { transform: translateX(8px); box-shadow: 0 10px 24px rgba(22, 19, 13, .34); }
  .play-mode:hover .pm-icon svg { transform: rotate(-8deg) scale(1.12); }
  .room-code:hover { transform: translateY(-2px); }
  .char:not(.taken):hover { transform: translateY(-4px); }
  .char:not(.taken):hover img { transform: scale(1.1); }
  .pl:hover:not(.turn) { transform: translateX(6px); }
  .pl.me:hover:not(.turn) { transform: translateY(-4px); }
  .hc:hover { transform: translateY(-58px) scale(1.16); z-index: 60 !important; transition-duration: .14s; }
  .rc:hover { transform: rotate(0deg) translateY(-8px) scale(1.35); z-index: 30; }
  .pl:hover .rc:not(:hover) { transform: rotate(var(--r)) translateX(2px); }
  .hc:hover::before { box-shadow: 0 16px 30px rgba(0, 0, 0, .55); }
  /* La carta subida deja su lugar ocupado: sin esto el mouse la pierde y tiembla */
  .hc:hover::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 130px; }
  .rail-b:hover, .board-tools .tool:hover { background: var(--gold); transform: translateX(-3px); }
  .rail-b:hover > span { opacity: 1; transform: translate(0, -50%); }
  .actions .btn.roll-go:hover:not(:disabled), .actions .btn.end-go:hover:not(:disabled) { animation: none; transform: scale(1.06) rotate(-3deg); }
  .pv-nav:hover { transform: translateY(-50%) scale(1.08); }
}
.actions .btn.roll-go:active:not(:disabled), .actions .btn.end-go:active:not(:disabled) { animation: none; transform: scale(.95); }
.play-mode:active { transform: scale(.98); }
.hc:active { transform: translateY(-52px) scale(1.12); }

/* Más angosto (1024 a 1250): las piezas se achican para no pisar el tablero */
@media (max-width: 1250px) {
  .players { width: 190px; }
  .pl { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 78%, #fff) 0 58px, var(--ink) 58px 61px, var(--paper-hi) 61px); min-height: 60px; }
  .pl img:not(.emoji) { width: 64px; height: 64px; }
  .pl .info { margin-left: 61px; flex-basis: calc(100% - 61px); padding: 4px 6px 3px 8px; }
  .pl .holds { margin-left: 69px; }
  .pl .name { font-size: 1.05rem; } .pl .money { font-size: 1.2rem; }
  .pl.me { width: 218px; min-height: 88px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 78%, #fff) 0 84px, var(--ink) 84px 87px, var(--paper-hi) 87px); }
  .pl.me img:not(.emoji) { width: 104px; height: 104px; }
  .pl.me .info { margin-left: 87px; flex-basis: calc(100% - 87px); } .pl.me .holds { margin-left: 96px; } .pl.me .money { font-size: 1.7rem; }
  .hand { left: 246px; right: 364px; max-width: none; padding: 0 32px; translate: 0 0; }
  body.sheet-open .hand { translate: 0 150px; }
  .hc { --w: 80px; }
  .actions { width: 264px; } .actions:has(.buy-deed) { width: 272px; }
  .actions .btn.roll-go, .actions .btn.end-go { width: 136px; height: 136px; }
  .roll-go .rg-ico svg { width: 48px; height: 48px; } .roll-go .rg-short { font-size: 1.6rem; }
  .events { width: 250px; }
  body #tutorial { left: 230px; width: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  #screen-home .logo, .pl.turn-in, .hc.new, .buy-deed.deal, .dice-sum, .modal-card, .actions .btn.roll-go, #turn-banner .countdown.low { animation: none; }
  .hand, .hc, .rc, .pl, .rail-b, .ev-card, .actions, .say-bubble, .play-mode, .char, .char img { transition: none; }
  .tab-body, body.sheet-open .tab-body { transform: none; transition: opacity .16s ease; }
}
.actions .msg.wait { display: none; }   /* ya lo dice el cartel de turno */
.modal-card .tb-send-bar { bottom: -24px; margin: 10px -24px -24px; padding: 12px 24px 24px; }
