/* HEXplore It · mesa BGA — vista superior, material sin deformar y dados de resina en movimiento.
 * Este archivo anula únicamente la presentación de tabletop.css; no altera reglas ni tiradas. */
body.tt-playmode {
  background:#101b1c;
  --tt-arcane:#a7aecf;
}
body.tt-playmode .tt-scene {
  container-type:size;
  background:
    radial-gradient(ellipse at 52% 30%,rgba(69,79,72,.65),transparent 75%),
    repeating-linear-gradient(93deg,rgba(23,45,40,.4) 0 2px,rgba(11,28,27,.5) 2px 59px),
    linear-gradient(120deg,#162927,#0e1b1c);
}
body.tt-playmode .tt-scene::before {
  content:"";pointer-events:none;position:absolute;z-index:0;
  width:min(76cqw,72cqh);height:min(76cqw,72cqh);
  border:1px solid rgba(160,176,208,.09);
  border-radius:50%;
  top:2%;left:50%;transform:translateX(-50%);
  box-shadow:0 0 0 13px rgba(173,158,206,.028),0 0 0 29px rgba(178,188,217,.017),
             inset 0 0 70px rgba(119,124,180,.025);
}
body.tt-playmode .tt-table-grain {z-index:0}
body.tt-playmode .tt-table-edge {border:4px solid #302d25;
  box-shadow:inset 0 0 0 2px rgba(209,176,114,.5),inset 0 0 0 6px #111d1c,0 0 0 1px #a29572;
}
body.tt-playmode .tt-table-stamp {color:#d4c2a1}
body.tt-playmode .tt-focus {filter:drop-shadow(0 0 12px rgba(152,170,230,.33))}
body.tt-playmode .tt-focus::after {
  border:2px solid rgba(209,203,244,.91);
  box-shadow:0 0 15px rgba(111,126,208,.58),inset 0 0 10px rgba(139,117,205,.12);
}
body.tt-playmode .tt-board-unit {left:24%;top:18%;width:52%;height:auto!important;aspect-ratio:1000/593;
  transform:none!important;rotate:0deg!important;skew:0deg!important;
}
body.tt-playmode .tt-board-frame {
  display:block;position:relative;width:100%;height:100%;min-height:0;max-height:none;
  box-sizing:border-box;flex:none;overflow:hidden;
  border:1px solid #b1a378;border-radius:4px;
  background:#22352d;transform:none!important;rotate:0deg!important;skew:0deg!important;
  box-shadow:0 10px 24px #03080692,0 0 0 3px #1a221d;
}
body.tt-playmode .tt-original-map {
  position:absolute;inset:0;width:100%;height:100%;display:block;
  object-fit:contain;object-position:center;transform:none!important;
  rotate:0deg!important;skew:0deg!important;filter:none;
}
body.tt-playmode .tt-map-touch {z-index:1}
body.tt-playmode .tt-party-marker,body.tt-playmode .tt-waypoint {z-index:4}
body.tt-playmode .tt-board-corner {color:#c7d0c7;font-size:9px}

/* La superficie de recorte respeta siempre su proporción (sin anchura y altura independientes).
   cqw/cqh miden la caja disponible y calculan el mayor rectángulo que cabe sin deformarse. */
body.tt-playmode .tt-art-fit {
  display:grid;place-items:center;
  position:relative;width:100%;height:100%;min-width:0;min-height:0;
  max-width:100%;max-height:100%;container-type:size;overflow:hidden;
}
body.tt-playmode .tt-art-fit > .game-component-crop {
  position:relative;flex:none;box-sizing:content-box;
  width:min(100cqw,calc(100cqh * var(--cut-aspect)));
  height:auto;max-width:none!important;max-height:none!important;min-width:0;min-height:0;
  aspect-ratio:var(--cut-aspect);overflow:hidden;
  transform:none!important;rotate:0deg!important;skew:0deg!important;
  filter:drop-shadow(0 5px 5px #02050285);
}
body.tt-playmode .tt-art-fit > .game-component-crop > img {
  display:block;position:absolute!important;
  width:var(--cut-width)!important;height:var(--cut-height)!important;
  min-width:0!important;min-height:0!important;
  max-width:none!important;max-height:none!important;
  left:var(--cut-left)!important;top:var(--cut-top)!important;
  object-fit:fill!important;object-position:left top!important;
  transform:none!important;rotate:0deg!important;skew:0deg!important;
}
body.tt-playmode .tt-object > .tt-art-fit,
body.tt-playmode .tt-single-die .tt-art-fit,
body.tt-playmode .tt-king-marker .tt-art-fit {width:100%;height:100%;max-width:100%;max-height:100%}
body.tt-playmode .tt-object {transform:none!important;rotate:0deg!important;skew:0deg!important}
body.tt-playmode .tt-object:hover:not(.tt-single-die) {filter:brightness(1.09)}
body.tt-playmode .tt-role-mat,
body.tt-playmode .tt-race-card,
body.tt-playmode .tt-quest-card,
body.tt-playmode .tt-circ-card,
body.tt-playmode .tt-combat-mat,
body.tt-playmode .tt-enemy-card,
body.tt-playmode .tt-card-track {transform:none!important;rotate:0deg!important}
body.tt-playmode .tt-hero-zone {align-items:stretch}
body.tt-playmode .tt-role-mat {width:100%;height:74%}
body.tt-playmode .tt-race-card {width:79%;height:24%;align-self:center}
body.tt-playmode .tt-mode-hero .tt-role-mat {width:70%;height:100%}
body.tt-playmode .tt-mode-hero .tt-race-card {width:27%;height:79%;align-self:center;margin:0}
body.tt-playmode .tt-sheet-pins {left:10%;right:10%;width:auto;bottom:1px;font-size:10px}
body.tt-playmode .tt-top-decks {gap:9px}
body.tt-playmode .tt-card-track {width:56%}
body.tt-playmode .tt-circ-card,body.tt-playmode .tt-quest-card {width:20%;height:100%}
body.tt-playmode .tt-mode-cards .tt-card-track {width:51%}
body.tt-playmode .tt-mode-cards .tt-circ-card,body.tt-playmode .tt-mode-cards .tt-quest-card {width:22%}
body.tt-playmode .tt-combat-mat {height:100%;width:76%}

/* Los tres dados son objetos independientes. La rotación ocurre sobre la pieza entera:
   la imagen del dado conserva exactamente su relación de aspecto. */
body.tt-playmode .tt-dice-zone {gap:9px}
body.tt-playmode .tt-dice-group {display:grid;place-items:center;width:71%;height:92%;min-width:0;min-height:0}
body.tt-playmode .tt-skill-dice {position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;justify-items:stretch;gap:6px;width:100%;height:100%;min-width:0;min-height:0}
body.tt-playmode .tt-single-die {position:relative;display:grid;place-items:center;min-width:0;min-height:0;
  border:0;background:transparent;padding:0;cursor:pointer;touch-action:manipulation}
body.tt-playmode .tt-die-hit {display:grid;grid-template-rows:minmax(0,1fr) auto;
  width:100%;height:100%;max-width:100%;background:transparent;color:#e8e2d5;overflow:visible}
body.tt-playmode .tt-die-art {display:grid;place-items:center;width:100%;height:100%;min-height:0;min-width:0;
  will-change:transform;transform-origin:50% 62%;transform-style:preserve-3d}
body.tt-playmode .tt-die-art .tt-art-fit {overflow:visible}
body.tt-playmode .tt-die-name {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  width:100%;margin:0;text-align:center;color:#d9d3c4;font:700 9px/1.1 var(--sans)}
body.tt-playmode .tt-die-outcome {position:absolute;z-index:4;top:-5px;right:-3px;min-width:20px;height:20px;
  display:grid;place-items:center;padding:2px;border:1px solid #ecdcac;border-radius:50%;
  background:#223329;color:#ffefcf;font-weight:800;font-size:11px;
  box-shadow:0 0 8px #cdb38899}
body.tt-playmode .tt-single-green .tt-die-outcome {border-color:#9bd39d;background:#235138}
body.tt-playmode .tt-single-yellow .tt-die-outcome {border-color:#f2d27f;background:#514321}
body.tt-playmode .tt-single-blue .tt-die-outcome {border-color:#91c6e8;background:#21445d}
body.tt-playmode .tt-hex-die {display:grid;place-items:center;width:28%;height:88%;align-self:center}
body.tt-playmode .tt-hex-die .tt-die-art {grid-area:1/1/2/2;width:100%;height:100%;min-width:0;min-height:0;display:grid;place-items:center;will-change:transform;transform-origin:50% 62%}
body.tt-playmode .tt-hex-die .tt-art-fit {grid-area:1/1/2/2;height:100%;width:100%}
body.tt-playmode .tt-dice-group.tt-focus::after {border-color:rgba(181,169,230,.8);
  box-shadow:0 0 16px rgba(148,133,232,.4)}
body.tt-playmode .tt-dice-caption {font-size:8px;color:#e8d7ba;top:100%;margin-top:2px}
body.tt-playmode .tt-die-hit:focus-visible {outline:2px solid #ddcca2;outline-offset:2px}
body.tt-playmode .tt-dice-zone.is-rolling .tt-die-art,
body.tt-playmode .tt-hex-die.is-rolling .tt-die-art {
  animation:tt-physical-roll .82s cubic-bezier(.22,.61,.24,1) both;
}
body.tt-playmode .tt-dice-zone.is-rolling .tt-single-die:nth-child(2) .tt-die-art {animation-delay:.06s}
body.tt-playmode .tt-dice-zone.is-rolling .tt-single-die:nth-child(3) .tt-die-art {animation-delay:.11s}
body.tt-playmode .tt-dice-zone.is-rolling .tt-hex-die .tt-die-art {animation-delay:.03s}
body.tt-playmode .tt-dice-zone.is-rolling .tt-single-die {pointer-events:none}
body.tt-playmode .tt-dice-zone.is-rolling::before {
  content:"";position:absolute;z-index:1;inset:-14px;border-radius:50%;
  pointer-events:none;background:radial-gradient(ellipse at center,rgba(153,130,215,.14),transparent 63%);
  animation:tt-arcane-pulse .9s ease-out both;
}
@keyframes tt-physical-roll {
  0% {transform:translate3d(0,0,0) rotate(0) rotateY(0) scale(1);filter:blur(0)}
  18% {transform:translate3d(4px,-25px,4px) rotate(75deg) rotateY(50deg) scale(1.07);filter:blur(.6px)}
  38% {transform:translate3d(-7px,-8px,4px) rotate(176deg) rotateY(150deg) scale(.93);filter:blur(1px)}
  59% {transform:translate3d(7px,-20px,0) rotate(265deg) rotateY(250deg) scale(1.04);filter:blur(.7px)}
  77% {transform:translate3d(-2px,-3px,0) rotate(333deg) rotateY(345deg) scale(.985);filter:blur(.25px)}
  89% {transform:translate3d(1px,-8px,0) rotate(354deg) rotateY(360deg) scale(1.025);filter:blur(0)}
  100% {transform:translate3d(0,0,0) rotate(360deg) rotateY(360deg) scale(1);filter:blur(0)}
}
@keyframes tt-arcane-pulse {
  0% {opacity:0;transform:scale(.45)}
  36% {opacity:1;transform:scale(1.04)}
  100% {opacity:0;transform:scale(1.3)}
}
body.tt-playmode .tt-roll-result {font-size:12px}
body.tt-playmode .tt-skill-results {display:none}
body.tt-playmode .tt-table-note {color:#dedaca}

/* Zonas destacadas al tocar: pequeñas marcas arcanas, sin interfaces ajenas al juego. */
body.tt-playmode .tt-choice-set {border-color:#b7afc9;
  box-shadow:0 12px 26px #000c,0 0 20px rgba(144,130,195,.16)}
body.tt-playmode .tt-choice-button {border-color:#c1b7ca;background:linear-gradient(#3e5549,#263a35)}
body.tt-playmode .tt-choice-button:hover {background:#526954;border-color:#eee2b8}
body.tt-playmode .tt-spotlight .tt-board-frame {outline-color:#beb8da;box-shadow:0 0 25px rgba(152,136,208,.4),0 9px 25px #0009}
body.tt-playmode .tt-waypoint {background:rgba(150,144,205,.26);border-color:#d7c7ea;color:#fff0cb}
body.tt-playmode .tt-waypoint:hover {background:rgba(154,140,213,.48)}
body.tt-playmode .tt-table-stamp {text-shadow:0 2px 7px #000}

/* Móvil vertical: tablero horizontal intacto, tarjetón en su propia zona y dados sobre la mesa.
   No se fuerza nunca a rellenar una caja estrecha al arte de la carta. */
@media(max-width:760px) {
 body.tt-playmode .tt-board-unit {left:11%;top:18%;width:78%;height:auto!important}
 body.tt-playmode .tt-board-corner {font-size:7px;margin-top:2px}
 body.tt-playmode .tt-top-decks {left:12%;top:4%;width:76%;height:12%;gap:4px}
 body.tt-playmode .tt-card-track {width:53%;height:100%}
 body.tt-playmode .tt-circ-card,body.tt-playmode .tt-quest-card {width:21%;height:100%}
 body.tt-playmode .tt-hero-zone {
   left:11%;top:44%;width:78%;height:20%;display:flex;flex-direction:row;
   align-items:center;justify-content:center;gap:2%;z-index:8
 }
 body.tt-playmode .tt-role-mat {width:70%;height:100%}
 body.tt-playmode .tt-race-card {width:25%;height:100%;align-self:center}
 body.tt-playmode .tt-sheet-pins {font-size:7px;bottom:2px;left:12%;right:12%;padding:2px}
 body.tt-playmode .tt-dice-zone {
   left:11%;top:66%;width:78%;height:12%;gap:3%;justify-content:center
 }
 body.tt-playmode .tt-dice-group {width:73%;height:100%}
 body.tt-playmode .tt-skill-dice {gap:4px}
 body.tt-playmode .tt-hex-die {width:24%;height:92%}
 body.tt-playmode .tt-die-name {font-size:8px}
 body.tt-playmode .tt-dice-caption {font-size:8px}
 body.tt-playmode .tt-table-tokens {left:2%;top:43%;width:9%;height:12%}
 body.tt-playmode .tt-table-note {left:4%;max-width:92%;font-size:8px}
 body.tt-playmode .tt-mode-hero .tt-hero-zone {
   left:8%;top:20%;width:84%;height:42%;gap:3%;opacity:1
 }
 body.tt-playmode .tt-mode-hero .tt-role-mat {width:71%;height:100%}
 body.tt-playmode .tt-mode-hero .tt-race-card {width:26%;height:90%}
 body.tt-playmode .tt-mode-hero .tt-board-unit {opacity:.25;left:11%;top:18%;width:78%}
 body.tt-playmode .tt-mode-hero .tt-dice-zone {opacity:.7;top:65%;height:12%}
 body.tt-playmode .tt-mode-dice .tt-dice-zone {left:6%;top:23%;width:88%;height:35%;gap:3%}
 body.tt-playmode .tt-mode-dice .tt-dice-group {width:73%;height:100%}
 body.tt-playmode .tt-mode-dice .tt-hex-die {width:24%;height:95%}
 body.tt-playmode .tt-mode-dice .tt-board-unit {opacity:.35}
 body.tt-playmode .tt-mode-cards .tt-top-decks {left:9%;top:21%;width:82%;height:38%;gap:2%}
 body.tt-playmode .tt-mode-cards .tt-card-track {width:48%;height:100%}
 body.tt-playmode .tt-mode-cards .tt-circ-card,
 body.tt-playmode .tt-mode-cards .tt-quest-card {width:23%;height:100%}
 body.tt-playmode .tt-mode-combat .tt-combat-overlay {left:9%;top:19%;width:82%;height:41%;gap:6px}
 body.tt-playmode .tt-mode-combat .tt-combat-mat {height:100%;width:72%}
 body.tt-playmode .tt-mode-combat .tt-hero-zone {left:11%;top:63%;width:76%;height:15%;opacity:.85}
 body.tt-playmode .tt-mode-combat .tt-dice-zone {left:4%;top:50%;width:36%;height:14%;z-index:15}
 body.tt-playmode .tt-mode-combat .tt-top-decks {opacity:.3}
 body.tt-playmode .tt-quest-card,body.tt-playmode .tt-circ-card {max-width:none}
 body.tt-playmode .tt-king-marker .tt-art-fit {height:100%}
}
@media(max-width:440px) {
 body.tt-playmode .tt-board-unit {left:7%;width:86%;top:20%}
 body.tt-playmode .tt-top-decks {left:9%;width:82%;top:7%;height:11%}
 body.tt-playmode .tt-hero-zone {left:8%;width:84%;top:46%;height:18%}
 body.tt-playmode .tt-dice-zone {left:8%;width:84%;top:67%;height:11%}
 body.tt-playmode .tt-table-tokens {top:47%;width:8%}
 body.tt-playmode .tt-mode-hero .tt-hero-zone {left:6%;width:88%;top:22%;height:39%}
 body.tt-playmode .tt-mode-dice .tt-dice-zone {top:25%;height:32%}
 body.tt-playmode .tt-mode-cards .tt-top-decks {top:22%;height:38%}
 body.tt-playmode .tt-mode-combat .tt-combat-overlay {top:20%;height:39%}
 body.tt-playmode .tt-die-name {font-size:7px}
}
@media(max-height:600px) {
 body.tt-playmode .tt-board-unit {top:13%;width:60%;left:20%}
 body.tt-playmode .tt-hero-zone {top:19%;left:80%;width:18%;height:40%;display:flex;flex-direction:column}
 body.tt-playmode .tt-role-mat {width:100%;height:75%}
 body.tt-playmode .tt-race-card {width:78%;height:22%}
 body.tt-playmode .tt-dice-zone {top:54%;left:4%;width:27%;height:20%}
 body.tt-playmode .tt-top-decks {top:2%;left:22%;width:56%;height:12%}
 body.tt-playmode .tt-mode-dice .tt-dice-zone {left:24%;top:17%;width:52%;height:44%}
 body.tt-playmode .tt-mode-hero .tt-hero-zone {left:29%;top:12%;width:53%;height:54%;flex-direction:row}
 body.tt-playmode .tt-mode-hero .tt-role-mat {height:100%;width:69%}
 body.tt-playmode .tt-mode-hero .tt-race-card {height:80%;width:28%}
 body.tt-playmode .tt-mode-cards .tt-top-decks {left:17%;top:16%;width:65%;height:46%}
 body.tt-playmode .tt-mode-combat .tt-combat-overlay {left:18%;top:14%;width:62%;height:50%}
}
@media(prefers-reduced-motion:reduce) {
 body.tt-playmode .tt-dice-zone.is-rolling .tt-die-art,
 body.tt-playmode .tt-dice-zone.is-rolling .tt-hex-die .tt-art-fit,
 body.tt-playmode .tt-dice-zone.is-rolling::before {animation:none!important;filter:none!important}
}

/* Ampliación fiel al material: tampoco se deforma al abrir cartas y tarjetones. */
body.tt-playmode .real-image-viewport,
body.tt-playmode .component-zoom-display {
  container-type:size;
}
body.tt-playmode .component-zoom-display .game-component-crop {
  width:min(96cqw,calc(96cqh * var(--cut-aspect)))!important;
  height:auto!important;
  max-width:none!important;
  max-height:none!important;
  aspect-ratio:var(--cut-aspect);
  flex:none;
  transform:none!important;
  rotate:0deg!important;
}
body.tt-playmode .component-zoom-display .game-component-crop > img {
  width:var(--cut-width)!important;height:var(--cut-height)!important;
  max-width:none!important;max-height:none!important;
  object-fit:fill!important;
}
body.tt-playmode .tt-die-art {
  filter:drop-shadow(0 7px 5px #0009);
}
body.tt-playmode .tt-single-die:not(.tt-hex-die):hover .tt-die-art {
  filter:drop-shadow(0 7px 7px rgba(157,154,207,.5));
}
