/* Primera · dirección de interfaz.
   Marcos pintados (arte/interfaz) para el HUD y marcos dibujados para ventanas, ranuras y controles.
   --u equivale a un píxel de las propuestas, dibujadas a 1800 de ancho. */
:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: var(--serif);
  --u: clamp(.74px, calc(100vw / 1800), 1.08px);
  --marfil: #f1e5c9; --ivory: #f1e5c9; --parchment: #dcc087; --muted: #ab9f89; --apagado: #ab9f89;
  --bronce: #9b7a45; --bronce-claro: #e6c680; --bronce-hondo: #5e4829; --line: #9b7a4552;
  --tinta: #151310; --tinta-clara: #221e18; --carbon: #0c0b09;
  --rojo: #8d2d22; --rojo-claro: #e9695a; --verde: #86c66d; --azul: #5f8fc4;
  --vellum-ink: #33251b;
  --folio: url("arte/interfaz/folio.webp");
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .78 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --esq-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg fill='none' stroke-linecap='square'%3E%3Cpath d='M1.5 17V1.5H17' stroke='%23e6c680' stroke-width='1.6'/%3E%3Cpath d='M6 24V10.5Q6 6 10.500 6H24' stroke='%238a6a39' stroke-width='1'/%3E%3Cpath d='M1.5 1.5 8 8' stroke='%23e6c680' stroke-width='1.2'/%3E%3C/g%3E%3Cpath d='M10.5 6.8 14.200 10.5 10.500 14.200 6.800 10.500Z' fill='%23e6c680' stroke='%23181410' stroke-width='.8'/%3E%3C/svg%3E");
  --esq-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg transform='matrix(-1 0 0 1 30 0)'%3E%3Cg fill='none' stroke-linecap='square'%3E%3Cpath d='M1.5 17V1.5H17' stroke='%23e6c680' stroke-width='1.6'/%3E%3Cpath d='M6 24V10.5Q6 6 10.500 6H24' stroke='%238a6a39' stroke-width='1'/%3E%3Cpath d='M1.5 1.5 8 8' stroke='%23e6c680' stroke-width='1.2'/%3E%3C/g%3E%3Cpath d='M10.5 6.8 14.200 10.5 10.500 14.200 6.800 10.500Z' fill='%23e6c680' stroke='%23181410' stroke-width='.8'/%3E%3C/g%3E%3C/svg%3E");
  --esq-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg transform='matrix(1 0 0 -1 0 30)'%3E%3Cg fill='none' stroke-linecap='square'%3E%3Cpath d='M1.5 17V1.5H17' stroke='%23e6c680' stroke-width='1.6'/%3E%3Cpath d='M6 24V10.5Q6 6 10.500 6H24' stroke='%238a6a39' stroke-width='1'/%3E%3Cpath d='M1.5 1.5 8 8' stroke='%23e6c680' stroke-width='1.2'/%3E%3C/g%3E%3Cpath d='M10.5 6.8 14.200 10.5 10.500 14.200 6.800 10.500Z' fill='%23e6c680' stroke='%23181410' stroke-width='.8'/%3E%3C/g%3E%3C/svg%3E");
  --esq-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cg transform='matrix(-1 0 0 -1 30 30)'%3E%3Cg fill='none' stroke-linecap='square'%3E%3Cpath d='M1.5 17V1.5H17' stroke='%23e6c680' stroke-width='1.6'/%3E%3Cpath d='M6 24V10.5Q6 6 10.500 6H24' stroke='%238a6a39' stroke-width='1'/%3E%3Cpath d='M1.5 1.5 8 8' stroke='%23e6c680' stroke-width='1.2'/%3E%3C/g%3E%3Cpath d='M10.5 6.8 14.200 10.5 10.500 14.200 6.800 10.500Z' fill='%23e6c680' stroke='%23181410' stroke-width='.8'/%3E%3C/g%3E%3C/svg%3E");
  --celda: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' preserveAspectRatio='none'%3E%3Crect x='3' y='3' width='54' height='54' fill='%2313110e' stroke='%235b4829' vector-effect='non-scaling-stroke'/%3E%3Crect x='6' y='6' width='48' height='48' fill='none' stroke='%232a2218' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M30 25v10M25 30h10' stroke='%23ffffff' stroke-opacity='.07' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --ico-ataque: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8cbb0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4l11 11M4 4v3l9.500 9.500M4 4h3l9.500 9.500M13 18l5-5M17 17l3 3M20 4L9 15M20 4v3l-9.500 9.500M20 4h-3L7.500 13.500M11 18l-5-5M7 17l-3 3'/%3E%3C/svg%3E");
  --ico-defensa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d8cbb022' stroke='%23d8cbb0' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M12 2.500 20 5.500v6c0 5-3.500 8.500-8 10-4.500-1.500-8-5-8-10v-6Z'/%3E%3Cpath d='M12 6v12' stroke-width='1'/%3E%3C/svg%3E");
  --ico-peso: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d8cbb022' stroke='%23d8cbb0' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M7 9h10l3 11H4Z'/%3E%3Cpath d='M9.500 9a2.500 2.500 0 1 1 5 0'/%3E%3C/svg%3E");
  --ico-alerta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f08a7a' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M12 3 22 20H2Z'/%3E%3Cpath d='M12 9.500v5M12 17.300v.2'/%3E%3C/svg%3E");
  --ico-balanza: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c680' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M12 4v16M7 20h10M4 7h16M6.500 7 3.500 14h6ZM17.500 7l-3 7h6Z'/%3E%3C/svg%3E");
  --punta: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%);
}
body { font-family: var(--serif); font-variant-numeric: lining-nums; }
kbd { border-color: #8a6a39; border-radius: 2px; background: #17140fe6; color: #ecd9ad; font: 600 11px/1.2 var(--serif); }

/* ───────── Título del lugar ───────── */
#stage :is(.place, .exp-banner) {
  left: var(--left); top: 0; display: block; min-height: calc(var(--u) * 126); padding: calc(var(--u) * 18) 0 0 calc(var(--u) * 86);
  color: var(--marfil); text-shadow: 0 2px 3px #0c0a08, 0 2px 14px #0c0a08; pointer-events: none;
}
#stage :is(.place, .exp-banner)::before {
  content: ""; position: absolute; left: 0; top: 0; width: calc(var(--u) * 68); aspect-ratio: 127 / 237;
  background: url("arte/interfaz/estandarte.webp") center / contain no-repeat; filter: drop-shadow(0 4px 6px #000a);
}
#stage :is(.place .realm, .exp-banner small) {
  display: flex; align-items: center; gap: calc(var(--u) * 12); margin: 0 0 calc(var(--u) * 2);
  color: #ecd9ad; font: 500 calc(var(--u) * 20) / 1.2 var(--serif); letter-spacing: .22em; text-transform: uppercase;
}
#stage :is(.place .realm, .exp-banner small)::after {
  content: ""; width: calc(var(--u) * 78); height: 5px;
  background: linear-gradient(90deg, #d9b46c, transparent) 0 50% / 100% 1px no-repeat, radial-gradient(circle at 9px 50%, #e6c680 2.4px, transparent 3px);
}
#stage :is(.place, .exp-banner) h1 { font: 500 calc(var(--u) * 47) / 1.06 var(--serif); letter-spacing: 0; color: #f5e9cc; white-space: nowrap; }
#stage :is(.place > div, .exp-banner)::after {
  content: ""; display: block; width: calc(var(--u) * 318); aspect-ratio: 490 / 53; margin: calc(var(--u) * 2) 0 0 calc(var(--u) * -4);
  background: url("arte/interfaz/filete.webp") left center / contain no-repeat; filter: drop-shadow(0 1px 1px #000) drop-shadow(0 0 5px #000c);
}

/* ───────── Placa: botón con extremos en punta ───────── */
#stage .placa, #stage .near, #stage .exp-party, #stage #exp-actions button, #stage .exp-region, #stage .exp-dodge {
  --alto: calc(var(--u) * 66);
  box-sizing: border-box; height: var(--alto); min-height: 0; min-width: calc(var(--alto) * 2.4); padding: 0 calc(var(--alto) * .1);
  display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--alto) * .16);
  border-style: solid; border-color: transparent; border-width: calc(var(--alto) * .22) calc(var(--alto) * .5);
  border-image: url("arte/interfaz/placa.webp") 30 74 fill / calc(var(--alto) * .22) calc(var(--alto) * .5) stretch;
  border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 4px 6px #000b);
  color: var(--marfil); font: 500 calc(var(--alto) * .42) / 1 var(--serif); letter-spacing: .01em; white-space: nowrap; text-shadow: 0 1px 2px #000;
}
#stage .placa img, #stage .near img { width: calc(var(--alto) * .78); height: calc(var(--alto) * .78); margin: calc(var(--alto) * -.2) 0; object-fit: contain; filter: drop-shadow(0 2px 2px #000c); }
#stage .placa kbd, #stage .near kbd { display: none; }
#stage :is(.placa, .near, .exp-party, #exp-actions button, .exp-region, .exp-dodge):is(:hover, :focus-visible) { filter: drop-shadow(0 4px 6px #000b) brightness(1.22); color: #fff6dc; background: none; }
#stage .placa:active { transform: translateY(1px); }
#stage .world-actions { right: var(--left); bottom: var(--bottom); gap: calc(var(--u) * 14); align-items: center; }
#stage .world-actions > button { flex: none; }
#stage .world-actions #run-control { display: none; }
#stage #war-control[aria-pressed=true] { color: #ffc2ae; filter: drop-shadow(0 0 10px #d2402d) drop-shadow(0 4px 6px #000b); background: none; }
#stage .redondo {
  width: 46px; height: 46px; min-width: 0; padding: 0; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #b08a4c; background: radial-gradient(circle at 50% 35%, #2c271e, #131210 75%);
  box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #5e4829, 0 4px 8px #000a;
}
#stage .redondo img { width: 24px; height: 24px; }
#stage #show-help img { display: none; }
#stage #show-help::before { content: "?"; color: #ecd9ad; font: 500 24px / 1 var(--serif); }
#stage .redondo :is(span, kbd) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#stage .redondo:is(:hover, :focus-visible, [aria-pressed=true]) { border-color: #f0cf86; background: radial-gradient(circle at 50% 35%, #4a3a22, #17130f 75%); }
#stage .exp-party { --alto: calc(var(--u) * 54); right: var(--left); bottom: calc(var(--bottom) + var(--u) * 82); letter-spacing: 0; }
#stage .near { --alto: calc(var(--u) * 58); }
#stage .near kbd { display: inline-grid; }

/* ───────── Estado: salud, maná y vigor ───────── */
#stage :is(.character-status, .exp-vitals) {
  left: var(--left); bottom: var(--bottom); top: auto; right: auto; box-sizing: border-box;
  width: calc(var(--u) * 452); height: calc(var(--u) * 138); min-width: 0; padding: 0 calc(var(--u) * 2) 0 calc(var(--u) * 6);
  display: grid; grid-auto-rows: 1fr; align-items: center;
  border-style: solid; border-color: transparent;
  border-width: calc(var(--u) * 18) calc(var(--u) * 32) calc(var(--u) * 18) calc(var(--u) * 84);
  border-image: url("arte/interfaz/estado.webp") 26 47 26 122 / calc(var(--u) * 18) calc(var(--u) * 32) calc(var(--u) * 18) calc(var(--u) * 84) stretch;
  border-radius: 0; background: #151512 padding-box; box-shadow: none; filter: drop-shadow(0 5px 8px #000b);
}
#stage .character-status .identity {
  position: absolute; left: calc(var(--u) * -84); top: calc(var(--u) * -18); width: calc(var(--u) * 86); height: calc(100% + var(--u) * 36);
  min-height: 0; padding: 0; border: 0; border-radius: 30% 0 0 30%; background: none; cursor: pointer;
}
#stage :is(.vital, .exp-vitals > div) {
  display: grid; grid-template-columns: calc(var(--u) * 28) calc(var(--u) * 58) minmax(0, 1fr) auto; align-items: center; gap: calc(var(--u) * 7);
  color: var(--marfil); font: 500 calc(var(--u) * 21) / 1 var(--serif); font-variant-numeric: lining-nums tabular-nums;
}
#stage :is(.vital, .exp-vitals > div)::before { content: ""; width: calc(var(--u) * 27); height: calc(var(--u) * 27); background: var(--icono) center / contain no-repeat; filter: drop-shadow(0 1px 1px #000); }
#stage :is(.vital.health, .exp-vitals > div:nth-of-type(1)) { --icono: url("arte/interfaz/salud.webp"); --bar: #8f1f1b; --bright: #e4543f; }
#stage :is(.vital.mana, .exp-vitals > div:nth-of-type(2)) { --icono: url("arte/interfaz/mana.webp"); --bar: #1f55a6; --bright: #5aa9f0; }
#stage :is(.vital.energy, .exp-vitals > div:nth-of-type(3)) { --icono: url("arte/interfaz/vigor.webp"); --bar: #b6730f; --bright: #f5c53c; }
#stage :is(.vital span, .exp-vitals > div > span) { width: auto; color: var(--marfil); }
#stage .vital i {
  position: relative; display: block; height: calc(var(--u) * 17); padding: 2px; overflow: visible; border: 0; border-radius: 0;
  background: linear-gradient(#d7b469, #7a5c2e); box-shadow: none; clip-path: var(--punta);
}
#stage .vital i::before { content: ""; position: absolute; inset: 1.5px; background: #0d0c0a; clip-path: var(--punta); }
#stage .vital i b {
  position: relative; display: block; height: 100%; min-width: 14px; border-radius: 0; clip-path: var(--punta);
  background: linear-gradient(#ffffff59, #fff0 42%, #0000004d), linear-gradient(90deg, var(--bar), var(--bright));
}
#stage .vital output { min-width: calc(var(--u) * 84); text-align: right; white-space: nowrap; }
#stage .vital output::after { content: " / " attr(data-max); }
#stage .character-status .gold {
  position: absolute; right: calc(var(--u) * -30); top: calc(var(--u) * -64); display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 8px;
  border: 1px solid #8a6a39; background: #14120fe8; box-shadow: inset 0 0 0 1px #0c0b09, 0 3px 8px #000a;
  color: #ecd9ad; font: 500 calc(var(--u) * 21) / 1.3 var(--serif); font-variant-numeric: tabular-nums;
}
#stage .character-status .gold img { width: calc(var(--u) * 24); height: calc(var(--u) * 24); }
/* En combate, la misma placa con medidores nativos. */
#stage .exp-vitals { padding-top: 0; }
#stage .exp-vitals > strong { position: absolute; left: calc(var(--u) * -80); top: calc(var(--u) * -52); font: 500 calc(var(--u) * 24) var(--serif); color: #f5e9cc; text-shadow: 0 2px 3px #000, 0 0 10px #000; white-space: nowrap; }
#stage .exp-vitals .exp-company-vitals { position: absolute; left: calc(var(--u) * -80); top: calc(var(--u) * -86); margin: 0; font: calc(var(--u) * 17) var(--serif); color: #cfe3bd; text-shadow: 0 1px 3px #000; white-space: nowrap; }
#stage .exp-vitals meter {
  appearance: none; -webkit-appearance: none; width: 100%; height: calc(var(--u) * 17); border: 0; background: #0d0c0a;
  outline: 2px solid #a8854a; outline-offset: -2px; clip-path: var(--punta);
}
#stage .exp-vitals meter::-webkit-meter-bar { background: #0d0c0a; border: 0; border-radius: 0; height: 100%; }
#stage .exp-vitals meter::-webkit-meter-optimum-value, #stage .exp-vitals meter::-webkit-meter-suboptimum-value, #stage .exp-vitals meter::-webkit-meter-even-less-good-value {
  border-radius: 0; background: linear-gradient(#ffffff59, #fff0 42%, #0000004d), linear-gradient(90deg, var(--bar), var(--bright));
}
#stage .exp-vitals meter::-moz-meter-bar { background: linear-gradient(90deg, var(--bar), var(--bright)); }
#stage .exp-vitals > div > output { min-width: calc(var(--u) * 84); text-align: right; white-space: nowrap; }
#stage .exp-vitals > div > output[data-max]::after { content: " / " attr(data-max); }
#stage .exp-vitals > div.bajo > output { color: #ffab98; }
#stage .exp-vitals > div.bajo meter { outline-color: #e9695a; animation: primera-pulso 1.1s ease-in-out infinite; }
@keyframes primera-pulso { 50% { filter: brightness(1.7); } }
#stage .exp-field.espiritu .exp-vitals { filter: grayscale(.85) brightness(.9) drop-shadow(0 5px 8px #000b); }
#stage .exp-field.espiritu .exp-msg { color: #d3ecee; }
#stage #exp-impacto:not(:empty) {
  position: absolute; left: calc(100% + var(--u) * 46); bottom: calc(var(--u) * 20); display: block; margin: 0; padding: 8px 16px; white-space: nowrap;
  border: 1px solid #b0483a; background: linear-gradient(#4a1712f2, #2a0f0cf2); box-shadow: inset 0 0 0 1px #0c0b09, 0 4px 10px #000a;
  color: #ffd9cf; font: 500 calc(var(--u) * 22) var(--serif);
}
#stage #exp-impacto:not(:empty)::before { content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin: 0 .5em -.16em 0; background: url("arte/interfaz/salud.webp") center / contain no-repeat; }
#stage #exp-impacto[data-tipo=defensa]:not(:empty)::before { background-image: var(--ico-defensa); }
#stage #exp-impacto[data-tipo=defensa]:not(:empty) { border-color: #5f8fc4; background: linear-gradient(#152a45f2, #0e1a2cf2); color: #d7e8fb; }

/* ───────── Brújula y encargo ───────── */
#stage .nav-hud { right: var(--left); top: calc(var(--u) * 12); width: calc(var(--u) * 250); gap: calc(var(--u) * 16); justify-items: end; }
#stage .radar { position: relative; filter: drop-shadow(0 5px 8px #000a); }
#stage .radar-dial { position: relative; display: block; width: calc(var(--u) * 190); height: auto; aspect-ratio: 298 / 323; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#stage .radar-dial canvas { position: absolute; left: 49.7%; top: 48%; width: 74%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: #2a2a22; }
#stage .radar-dial::after { content: ""; position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none; background: url("arte/interfaz/brujula.webp") center / 100% 100% no-repeat; pointer-events: none; }
#stage .north { display: none; }
/* Mundo único: el minimapa va girado 45° como el radar de Ultima Online y la brújula gira con él (el norte arriba a la derecha). */
.orbe-mundo #stage #show-map .radar-dial::after { transform: rotate(45deg); transform-origin: 49.7% 48%; }
#stage .radar-caption {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin: 2px 0 0; padding: 2px 10px; opacity: 0; transition: opacity .15s;
  border: 1px solid #8a6a39; background: #14120fee; color: #ecd9ad; font: 500 13px var(--serif); letter-spacing: .08em; text-transform: none; white-space: nowrap; pointer-events: none;
}
#stage :is(.radar, #exp-map):is(:hover, :focus-visible) .radar-caption { opacity: 1; }
#stage .radar:is(:hover, :focus-visible) .radar-dial::after { filter: brightness(1.2); }
#stage .encargo { display: grid; justify-items: end; gap: calc(var(--u) * 8); width: 100%; }
#stage #encargo-toggle { --alto: calc(var(--u) * 60); min-width: calc(var(--u) * 238); justify-content: flex-start; }
#stage #encargo-toggle > span { flex: 1; text-align: left; }
#stage .chevron { width: 8px; height: 8px; margin: -4px 4px 0 0; border: solid #ecd9ad; border-width: 0 2px 2px 0; rotate: 45deg; transition: rotate .15s; }
#stage #encargo-toggle[aria-expanded=false] .chevron { rotate: -45deg; margin-top: 0; }
#stage .quest-strip {
  display: block; width: calc(var(--u) * 238); min-width: 190px; padding: 9px 13px 10px; text-align: left;
  border: 1px solid #7a5d31; border-radius: 0; background: var(--grano), linear-gradient(#1b1915ee, #121110ee);
  box-shadow: inset 0 0 0 1px #0c0b09, inset 0 0 0 2px #3a2f1f, 0 5px 12px #000a;
}
#stage .quest-strip small { display: none; }
#stage .quest-strip .objective { margin: 0; font: 15px / 1.3 var(--serif); color: var(--marfil); }
#stage .quest-strip:is(:hover, :focus-visible) { border-color: #e6c680; background-color: #1f1c17; }
#stage .exp-field #exp-map { position: absolute; top: calc(var(--u) * 12); right: var(--left); left: auto; display: grid; justify-items: center; gap: 4px; padding: 0; border: 0; background: none; box-shadow: none; filter: drop-shadow(0 5px 8px #000a); }
#stage .exp-region { --alto: calc(var(--u) * 54); position: absolute; top: calc(var(--u) * 232); right: var(--left); z-index: 1; }
#stage .exp-dodge { --alto: calc(var(--u) * 54); }

/* ───────── Barra del personaje ───────── */
#stage .dock-wrap { bottom: calc(var(--bottom) - var(--u) * 4); gap: calc(var(--u) * 10); }
#stage .dock {
  box-sizing: border-box; width: calc(var(--u) * 660); height: calc(var(--u) * 152); padding: 0; gap: 0; align-items: stretch;
  border-style: solid; border-color: transparent;
  border-width: calc(var(--u) * 36) calc(var(--u) * 33) calc(var(--u) * 33) calc(var(--u) * 32);
  border-image: url("arte/interfaz/barra.webp") 57 52 52 50 / calc(var(--u) * 36) calc(var(--u) * 33) calc(var(--u) * 33) calc(var(--u) * 32) stretch;
  border-radius: 0; background: #1a1b16 padding-box; box-shadow: none; filter: drop-shadow(0 6px 9px #000b);
}
#stage .dock button {
  position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; margin: calc(var(--u) * -30) 0 calc(var(--u) * -4); padding: 0 calc(var(--u) * 6);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0;
  border: 0; border-radius: 0; outline-offset: -3px; background: none;
  color: var(--marfil); font: 500 calc(var(--u) * 23) / 1.15 var(--serif); letter-spacing: 0; text-shadow: 0 1px 2px #000;
}
#stage .dock button img { width: calc(var(--u) * 86); height: calc(var(--u) * 80); object-fit: contain; filter: drop-shadow(0 4px 3px #000c); transition: transform .12s; }
#stage .dock button + button::before { content: ""; position: absolute; left: -3px; top: 46%; width: 6px; height: 6px; rotate: 45deg; background: #8a6a39; box-shadow: 0 0 0 1px #0c0b09; }
#stage .dock button:is(:hover, :focus-visible) { background: none; color: #fff6dc; }
#stage .dock button:is(:hover, :focus-visible) img { transform: translateY(-2px) scale(1.05); }
#stage .dock button[aria-pressed=true] {
  color: #ffe9b0; outline: 0;
  background: radial-gradient(ellipse at 50% 55%, #a06a1e59, transparent 68%), linear-gradient(#e6c680, #e6c680) 50% 100% / 46% 2px no-repeat;
}
#stage .dock kbd { position: absolute; right: 8%; top: calc(var(--u) * 14); opacity: 0; transition: opacity .12s; font-size: 10px; }
#stage .dock button:is(:hover, :focus-visible) kbd { opacity: 1; }

/* ───────── Avisos del mundo ───────── */
#accion-feedback, #stage .exp-notify {
  padding: 9px 20px; border: 1px solid #9b7a45; border-radius: 0; background: var(--grano), linear-gradient(#1f1c17f5, #131210f5);
  box-shadow: inset 0 0 0 1px #0c0b09, inset 0 0 0 2px #3a2f1f, 0 6px 16px #000b; color: var(--marfil); font: 16px / 1.35 var(--serif);
}
#stage .exp-msg { font: 17px var(--serif); color: #f5e9cc; text-shadow: 0 2px 3px #000, 0 0 12px #000; }
#stage .exp-msg:not(:empty) {
  left: 50%; width: max-content; max-width: min(720px, 90vw); transform: translateX(-50%); bottom: calc(var(--bottom) + 158px); padding: 8px 46px;
  background: linear-gradient(90deg, transparent, #141210e0 16%, #141210e0 84%, transparent),
    linear-gradient(90deg, transparent, #9b7a45 30%, #9b7a45 70%, transparent) 0 0 / 100% 1px no-repeat, linear-gradient(90deg, transparent, #9b7a45 30%, #9b7a45 70%, transparent) 0 100% / 100% 1px no-repeat;
}
#stage .exp-target:not(:empty) {
  top: calc(var(--u) * 20); min-width: 240px; max-width: 60%; padding: 6px 22px 15px; text-align: center; border: 0; border-bottom: 0;
  background: linear-gradient(90deg, #c9483a var(--vida-objetivo, 0%), #f0d39a var(--vida-objetivo, 0%), #f0d39a max(var(--vida-objetivo, 0%), var(--vida-fantasma, 0%)), #1a0d0b max(var(--vida-objetivo, 0%), var(--vida-fantasma, 0%))) 50% calc(100% - 4px) / calc(100% - 28px) 7px no-repeat,
    linear-gradient(90deg, #7a5c2e, #d7b469, #7a5c2e) 50% calc(100% - 2px) / calc(100% - 24px) 11px no-repeat,
    linear-gradient(90deg, transparent, #141210e0 12%, #141210e0 88%, transparent);
  color: #f5e9cc; font: 500 18px var(--serif); text-shadow: 0 1px 2px #000;
}
#stage .exp-target:empty { display: none; }
/* Nombre del objetivo por rango, con los colores de rareza del equipo (cliente/golpes.js). */
#stage .exp-target[data-rango="magico"] { color: #a9c3ff; }
#stage .exp-target[data-rango="raro"] { color: #f2d36b; }
#stage .exp-target[data-rango="jefe"] { color: #f0a050; }

/* ───────── Ventanas ───────── */
#stage :is(.surface, .exp-sheet) {
  padding: 8px; border: 2px solid var(--bronce); border-image: linear-gradient(135deg, #f0d594, #9b7a45 22%, #5e4829 50%, #a8854a 78%, #f0d594) 1; border-radius: 0; color: var(--marfil);
  background: var(--grano), radial-gradient(120% 70% at 18% 0%, #2b251c 0, #181613 52%, #100f0d 100%);
  box-shadow: 0 0 0 1px #0a0908, 0 0 0 3px #2a2116, 0 0 0 4px #0a0908, inset 0 0 0 1px #0a0908, inset 0 0 0 5px #161411, inset 0 0 0 6px #6a5330, 0 22px 70px #000d;
}
#stage :is(.surface, .exp-sheet)::before, #stage :is(.surface, .exp-sheet)::after {
  content: ""; position: absolute; left: 0; right: 0; height: 36px; z-index: 4; pointer-events: none;
}
#stage :is(.surface, .exp-sheet)::before { top: 0; background: var(--esq-tl) left top / 36px no-repeat, var(--esq-tr) right top / 36px no-repeat; }
#stage :is(.surface, .exp-sheet)::after { bottom: 0; background: var(--esq-bl) left bottom / 36px no-repeat, var(--esq-br) right bottom / 36px no-repeat; }
#stage .surface { --pie: calc(var(--u) * 152 + var(--bottom) + 12px); z-index: 9; top: 14px; transform: none; max-height: calc(100dvh - var(--pie) - 14px); }
#stage .exp-sheet::backdrop { background: #07060699; }
#stage :is(.panel-head, .exp-sheet > header) {
  position: relative; min-height: 60px; gap: 12px; padding: 8px 10px 9px 18px; border: 0; touch-action: none;
  background: linear-gradient(90deg, #17140fed 20%, #1a1611c9 60%, #15120ef2), var(--ilustracion, none) center 38% / cover, #17140f;
}
#stage :is(.panel-head, .exp-sheet > header)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 9px; pointer-events: none;
  background: linear-gradient(#e6c680, #e6c680) 50% 50% / 7px 7px no-repeat, linear-gradient(90deg, transparent, #9b7a45 14%, #e6c680 50%, #9b7a45 86%, transparent) 50% 50% / 100% 1px no-repeat;
  mask: linear-gradient(#000, #000);
}
#stage .exp-sheet > header { position: sticky; top: 0; z-index: 2; }
#stage :is(.kicker, .exp-sheet header small) { margin: 0 0 1px; color: #c9ab6e; font: 500 11px / 1.2 var(--serif); letter-spacing: .24em; text-transform: uppercase; }
#stage :is(.panel-head h2, .exp-sheet h2) { margin: 0; font: 500 clamp(24px, 2.1vw, 31px) / 1.08 var(--serif); letter-spacing: .005em; color: #f5e9cc; text-shadow: 0 2px 3px #000; }
#panel:is([data-view=mochila], [data-view=equipo], [data-view=stats], [data-view=habilidades], [data-view=diario]) { --ilustracion: none; }
#panel:is([data-view=mochila], [data-view=equipo], [data-view=stats], [data-view=habilidades], [data-view=diario]) .kicker { display: none; }
#panel:is([data-view=mochila], [data-view=equipo], [data-view=stats], [data-view=habilidades], [data-view=diario]) .panel-head::before {
  content: ""; flex: none; width: 46px; height: 46px; margin: -4px 0; background: var(--emblema) center / contain no-repeat; filter: drop-shadow(0 3px 3px #000b);
}
#panel[data-view=mochila] { --emblema: url("arte/interfaz/mochila.webp"); }
#panel[data-view=equipo] { --emblema: url("arte/interfaz/equipo.webp"); }
#panel[data-view=stats] { --emblema: url("arte/interfaz/atributos.webp"); }
#panel[data-view=habilidades] { --emblema: url("arte/interfaz/habilidades.webp"); }
#panel[data-view=diario] { --emblema: url("arte/interfaz/diario.webp"); }
#stage .surface .close, #stage #exp-sheet #exp-close {
  flex: 0 0 38px; width: 38px; height: 38px; min-width: 0; min-height: 0; padding: 0; display: grid; place-items: center;
  border: 1px solid #9b7a45; border-radius: 2px; background: linear-gradient(#33261a, #19130e); box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #5e4829;
  color: #ecd9ad; font: 24px / 1 var(--serif);
}
#stage .surface .close img { width: 20px; height: 20px; }
#stage .surface .close:is(:hover, :focus-visible), #stage #exp-sheet #exp-close:is(:hover, :focus-visible) { border-color: #f0cf86; background: linear-gradient(#5a2a1e, #2a130e); }
#stage :is(#panel-body, #map-body, #help-body, #exp-content) { padding: 14px 18px 18px; scrollbar-width: thin; scrollbar-color: #7a5d31 #12110e; }
#stage .surface p, #stage .muted, #stage .surface .muted, #stage .exp-sheet p { color: var(--muted); font: 14px / 1.45 var(--serif); }
#stage :is(.surface, .exp-sheet) h3 { display: block; overflow: hidden; margin: 16px 0 8px; color: #e6c680; font: 500 19px / 1.2 var(--serif); letter-spacing: .01em; }
#stage :is(.surface, .exp-sheet) h3::after { content: ""; display: inline-block; width: 100%; height: 1px; margin: 0 -100% 0 12px; vertical-align: middle; background: linear-gradient(90deg, #9b7a45, transparent 70%); }
#stage :is(.surface, .exp-sheet) h3:first-child { margin-top: 2px; }
#stage :is(.surface, .exp-sheet) a { color: #e6c680; }

/* ───────── Botones, pestañas y campos ───────── */
#stage .surface button:not(.close, .bag-object, .ranura, .pack-tile, .worn-tile), #stage .exp-sheet button:not(.close, .atlas-pin) {
  min-height: 40px; padding: 6px 15px; border: 1px solid #7a5d31; border-radius: 2px;
  background: linear-gradient(#2f2a21, #1a1814); box-shadow: inset 0 1px #ffffff12, inset 0 0 0 2px #0e0d0b, 0 2px 5px #0006;
  color: #eddfbf; font: 500 15px / 1.15 var(--serif); letter-spacing: .01em; text-shadow: 0 1px 1px #000;
}
#stage .surface button:not(.close, .bag-object, .ranura, .pack-tile, .worn-tile):is(:hover, :focus-visible):not(:disabled),
#stage .exp-sheet button:not(.close, .atlas-pin):is(:hover, :focus-visible):not(:disabled) { border-color: #f0cf86; background: linear-gradient(#433a2b, #231f19); color: #fff6dc; }
#stage :is(.surface, .exp-sheet) button[aria-pressed=true]:not(.close, .bag-object, .ranura, .pack-tile, .worn-tile, .atlas-pin) {
  border-color: #d9a05c !important; background: linear-gradient(#77291f, #3d1611) !important; color: #ffe9c2 !important; box-shadow: inset 0 1px #ffffff1f, inset 0 0 0 2px #2a0f0b;
}
#stage :is(.surface, .exp-sheet) button.primary {
  border-color: #f2d795; background: linear-gradient(#d2ad66, #92713a); box-shadow: inset 0 1px #fff5, inset 0 0 0 2px #6b5127, 0 2px 6px #0008;
  color: #1c130a; font-weight: 600; text-shadow: 0 1px #ffffff40; clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 9px 100%, 0 50%); padding-inline: 24px;
}
#stage :is(.surface, .exp-sheet) button.primary:is(:hover, :focus-visible):not(:disabled) { background: linear-gradient(#e6c680, #a8854a); color: #120c06; }
#stage :is(.surface, .exp-sheet) button:disabled { opacity: .45; filter: grayscale(.7); }
#stage :is(.surface, .exp-sheet) :focus-visible { outline: 2px solid #f6d58a; outline-offset: -2px; }
#stage :is(.surface, .exp-sheet) :is(input, select) { min-height: 40px; padding: 6px 10px; border: 1px solid #7a5d31; border-radius: 2px; background: #100f0d; box-shadow: inset 0 2px 5px #000a; color: #f5e9cc; font: 16px var(--serif); }
#stage :is(.surface, .exp-sheet) label { color: #cdbf9f; font: 15px var(--serif); }
#stage :is(.surface, .exp-sheet) input:is([type=checkbox], [type=radio]) { width: 18px; height: 18px; min-height: 0; margin: 0 9px 0 0; padding: 0; flex: none; accent-color: #c9a35c; box-shadow: none; vertical-align: -3px; }
#stage .exp-sheet label:has(> input:is([type=checkbox], [type=radio])) { display: flex; align-items: center; gap: 0; }
#stage :is(.surface, .exp-sheet) input[type=range] { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; accent-color: #c9a35c; }
#stage :is(.doll-modes, .layer-tabs, .folio-tabs, .build-tabs, .establo-tabs) { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0 0 8px; border: 0; background: linear-gradient(90deg, #9b7a45, #9b7a4530) 0 100% / 100% 1px no-repeat; }
#stage :is(.doll-modes, .layer-tabs, .folio-tabs, .build-tabs, .establo-tabs) > button { flex: 0 1 auto; min-width: 104px; min-height: 38px; padding: 5px 16px; font-size: 15.5px; text-align: center; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px); }
#stage .actions { gap: 6px; }

/* ───────── Filas, valores y avisos ───────── */
#stage .row { gap: 12px; padding: 9px 2px; border-bottom: 0; background: linear-gradient(90deg, #9b7a4555, #9b7a4510) 0 100% / 100% 1px no-repeat; }
#stage .row .item strong { color: #f1e5c9; font: 500 16.5px / 1.2 var(--serif); }
#stage .row .item .muted { font-size: 13px; }
#stage .pill { padding: 3px 6px; color: #ecd9ad; font: 500 16px var(--serif); font-variant-numeric: tabular-nums; }
#stage .item-symbol { width: 46px; height: 46px; padding: 5px; border: 1px solid #5b4829; background: radial-gradient(circle at 50% 35%, #2c261d, #14120f 78%); box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #2f2619; }
#stage .panel-notice { margin: 0 0 10px; padding: 8px 12px; border: 1px solid #7a5d31; border-left: 3px solid #e6c680; background: #2a2114; color: #f5dfa8 !important; font: 15px / 1.4 var(--serif); }
#stage .sobrecarga {
  display: flex; align-items: center; gap: 8px; margin: 8px 0; padding: 6px 12px 6px 34px; border: 1px solid #b0483a;
  background: var(--ico-alerta) 9px 50% / 18px no-repeat, linear-gradient(#55201a, #33120e); color: #ffb9ab !important; font: 500 15px var(--serif);
}
#stage details.ayuda { margin-top: 12px; border-top: 1px solid #9b7a4530; }
#stage details.ayuda > summary { padding: 9px 2px 4px; color: #c9ab6e; font: 14px var(--serif); cursor: pointer; }
#stage details.ayuda > summary:hover { color: #f0cf86; }
#stage .help-row { padding: 10px 0; border-bottom: 0; background: linear-gradient(90deg, #9b7a4555, #9b7a4510) 0 100% / 100% 1px no-repeat; font: 15px var(--serif); }
#stage .help-row b { font-weight: 500; color: #f1e5c9; }
#stage .meter { height: 6px; border-radius: 0; background: #0d0c0a; }
#stage .meter > i { background: linear-gradient(90deg, #8a6a39, #e6c680); }

/* ───────── Ranuras ───────── */
#stage :is(.ranura, .pack-tile, .quiver-slot, .layer-grid > button) {
  position: relative; box-sizing: border-box; min-width: 0; min-height: 0; padding: 6px; display: grid; place-items: center;
  border: 1px solid #6a5330; border-radius: 2px; background: radial-gradient(circle at 50% 34%, #2f281e, #14120f 76%);
  box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #33291b; color: #eddfbf; font: 12px / 1.1 var(--serif);
}
#stage :is(.ranura, .pack-tile) { width: var(--lado, 58px); height: var(--lado, 58px); }
#stage :is(.ranura, .pack-tile) img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px #000c); pointer-events: none; }
/* El ícono se ajusta a su casilla sea cual sea su proporción. En una rejilla, la altura en % de un hijo no se
   resuelve y la imagen tomaba su alto natural: las piernas y las armas largas salían de la ranura y de la mochila. */
#stage :is(.ranura, .pack-tile) > img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); max-width: none; max-height: none; }
#stage .surface button.bag-object > :is(img, .bag-art) { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); max-width: none; max-height: none; object-fit: contain; }
#stage .ranura.vacia img { opacity: .2; filter: grayscale(1) brightness(1.3); }
#stage .worn-tile.ranura { border-color: #5f8fc4; box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #274262; background: radial-gradient(circle at 50% 34%, #26303b, #121519 76%); }
#stage :is(.ranura, .pack-tile, .layer-grid > button):is(:hover, :focus-visible, [aria-pressed=true]) {
  border-color: #f4d48c !important; box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #b98a3c, 0 0 14px #e2ad4a70; background: radial-gradient(circle at 50% 40%, #5a4420, #17130e 78%) !important;
}
#stage .ranura small { position: absolute; left: 2px; right: 2px; bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 10px var(--serif); color: #ecd9ad; text-shadow: 0 1px 2px #000; }
#stage .quiver-slot { width: var(--lado, 58px); height: var(--lado, 58px); padding: 4px; }
#stage .quiver-slot i { flex: none; }
#stage .quiver-slot :is(span, small) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ───────── Equipo ───────── */
#stage .doll-presentation, #stage .wardrobe .doll-presentation, #stage .look-comparison figure {
  border: 1px solid #6a5330; border-radius: 0; box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 40px #000a;
  background: #41372d url("arte/vecinos/hornacina.webp") center / cover no-repeat;
}
#stage .doll-stage .live-doll { cursor: default; }
#stage .wardrobe .doll-numbers, #stage .look-comparison figcaption {
  display: flex; flex-flow: row wrap; justify-content: space-evenly; gap: 2px 18px; width: auto; padding: 8px 6px; border-top: 1px solid #6a5330;
  background: linear-gradient(#1c1915f0, #121110f0); color: #f1e5c9;
}
#stage .wardrobe .doll-numbers :is(strong, span) { font: 500 16px var(--serif); color: #f1e5c9; }
#stage .wardrobe .doll-numbers span { color: var(--muted); }
#stage .wardrobe { --lado: clamp(42px, 5.5vh, 58px); display: grid; gap: 12px; }
#stage .wardrobe-plate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; margin: 0; align-items: stretch; }
#stage .wardrobe .worn-rail { display: grid; grid-template-columns: 1fr; gap: 6px; align-content: space-between; max-height: none; overflow: visible; }
#stage .wardrobe .doll-stage { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
#stage .wardrobe .doll-presentation { grid-template-columns: minmax(0, 1fr); min-width: 0; }
#stage .wardrobe .live-doll { min-width: 0; }
#stage .wardrobe .doll-presentation { height: calc(var(--lado) * 7 + 36px); min-height: 0; }
#stage .wardrobe .ranuras-extra, #stage .prueba-movimiento { grid-column: 1 / -1; }
#stage .wardrobe .ranuras-extra { display: flex; flex-wrap: wrap; gap: 6px; }
#stage .prueba-movimiento { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
#stage .prueba-movimiento > small { color: #c9ab6e; font: 13px var(--serif); letter-spacing: .04em; }
#stage .prueba-movimiento .layer-tabs { flex: 1; margin: 0; padding: 0; background: none; }
#stage .prueba-movimiento .layer-tabs > button { min-width: 0; min-height: 34px; padding: 4px 12px; font-size: 14px; }
#stage .ficha-nombre { display: grid; gap: 1px; margin: 0 0 4px; padding: 0 2px 10px; background: linear-gradient(90deg, #9b7a4555, #9b7a4510) 0 100% / 100% 1px no-repeat; }
#stage .ficha-nombre strong { color: #f5e9cc; font: 500 21px / 1.15 var(--serif); }
#stage .ficha-nombre small { color: var(--muted); font: 13px var(--serif); }
#stage .wardrobe .layer-detail { margin: 0; padding: 0; border: 0; }
#stage .wardrobe .layer-detail:empty { display: none; }
#stage .ficha-datos { display: grid; align-content: start; gap: 0; }
#stage .ficha-datos dl { display: grid; gap: 9px; margin: 0; padding: 12px 2px; background: linear-gradient(90deg, #9b7a4555, #9b7a4510) 0 100% / 100% 1px no-repeat; }

#stage .dato { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 500 18px / 1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
#stage .dato dt { display: flex; align-items: center; gap: 11px; color: #f1e5c9; }
#stage .dato dt::before { content: ""; width: 24px; height: 24px; background: var(--icono) center / contain no-repeat; }
#stage .dato dd { margin: 0; color: #f5e9cc; white-space: nowrap; }
#stage .dato.ataque { --icono: var(--ico-ataque); } #stage .dato.defensa { --icono: var(--ico-defensa); } #stage .dato.peso { --icono: var(--ico-peso); }
#stage .dato.salud { --icono: url("arte/interfaz/salud.webp"); } #stage .dato.mana { --icono: url("arte/interfaz/mana.webp"); } #stage .dato.vigor { --icono: url("arte/interfaz/vigor.webp"); }
#stage .dato.alerta dd { color: var(--rojo-claro); }
#stage .wardrobe-pack { margin: 0; padding: 0; border: 0; background: none; }
#stage .wardrobe-pack h3 { margin: 14px 0 8px; font-size: 18px; }
#stage .wardrobe-pack h3:first-child { margin-top: 0; }
#stage .wardrobe-pack .layer-detail .row { padding: 2px 0 6px; background: none; }
#stage .comparacion-viva {
  display: block; min-height: 58px; margin: 0; padding: 9px 12px 9px 46px; border: 1px solid #6a5330;
  background: var(--ico-balanza) 12px 50% / 24px no-repeat, linear-gradient(#211d17, #15130f); box-shadow: inset 0 0 0 2px #0c0b09;
  color: #f1e5c9; font: 15.5px / 1.35 var(--serif);
}
#stage .wardrobe .pack-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--lado), 1fr)); gap: 6px; max-height: none; padding: 0; overflow: visible; }
#stage .pack-strip .pack-tile { flex: none; width: 100%; height: auto; aspect-ratio: 1; }
#stage .pack-tile > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#stage .pack-tile > small { position: absolute; right: 3px; bottom: 2px; max-width: calc(100% - 6px); overflow: hidden; white-space: nowrap; font: 600 10.5px var(--serif); color: #ecd9ad; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
#stage .pack-tile.igual > small { display: none; }
#stage .pack-tile.mejora > small { color: var(--verde); } #stage .pack-tile.peor > small { color: var(--rojo-claro); }
#stage .equipment-catalog { margin-top: 0; border-top: 1px solid #9b7a4530; }
#stage .equipment-catalog summary { padding: 9px 2px; color: #c9ab6e; font: 14px var(--serif); }
#stage .layer-grid { gap: 6px; }
#stage .surface .layer-grid > button { min-height: 62px; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 5px 3px 4px; }
#stage .reference-layer { font: 12px / 1.25 var(--serif); }
#stage .doll-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid #9b7a4530; }
#stage .surface .doll-links button { flex: 0 1 auto; min-height: 36px; padding: 4px 12px 4px 8px; gap: 6px; font-size: 14px; }
#stage .doll-links img { width: 22px; height: 22px; }
#stage .appearance-field, #stage .outfit-card { padding: 10px 0; border-bottom: 0; background: linear-gradient(90deg, #9b7a4555, #9b7a4510) 0 100% / 100% 1px no-repeat; }
#stage .appearance-field legend { padding: 0; color: #e6c680; font: 500 16px var(--serif); }
#stage fieldset.appearance-field { margin: 0; border: 0; padding-inline: 0; }
#stage .look-comparison figcaption { font: 500 16px var(--serif); }
/* Vestidor: cuerpo, conjuntos y monturas comparten el retrato centrado */
#stage #panel-body > .doll-presentation { max-width: 460px; height: clamp(220px, 34vh, 330px); margin: 0 auto 12px; }
#stage #panel-body > .doll-presentation .doll-numbers { display: flex; flex-direction: column; gap: 6px; padding: 0 16px; border: 0; background: none; color: #f1e5c9; font: 500 18px var(--serif); }
#stage #panel-body > .doll-presentation .doll-numbers span { color: var(--muted); font: 14px var(--serif); }
#stage .appearance-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 26px; }
#stage .outfit-card h3 { margin-top: 2px; }
#stage .outfit-slots { gap: 6px; margin: 8px 0 10px; padding: 0; list-style: none; color: #dccfb2; font: 14px var(--serif); }
#stage .outfit-slots li { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid #5b4829; background: #14120f; }
#stage .outfit-slots img { width: 28px; height: 28px; }
#stage .outfit-slots small { color: var(--muted); font-size: 12px; }

/* ───────── Mochila ───────── */
#stage .bag-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 16px; min-height: 0; margin: 0 0 4px; padding: 0 2px 9px; border: 0; background: linear-gradient(90deg, #9b7a4555, #9b7a4510) 0 100% / 100% 1px no-repeat; color: #f1e5c9; font: 16px var(--serif); font-variant-numeric: lining-nums tabular-nums; }
#stage .bag-summary > span { color: #cdbf9f; font: 15px var(--serif); }
#stage .bag-peso { display: flex; align-items: center; gap: 7px; }
#stage .bag-peso::before { content: ""; width: 20px; height: 20px; background: var(--ico-peso) center / contain no-repeat; }
#stage .bag-peso b { color: #f5e9cc; font-weight: 500; }
#stage .bag-summary.alerta .bag-peso b { color: var(--rojo-claro); }
#stage .bag-oro { display: flex; align-items: center; gap: 6px; margin-left: auto; color: #ecd9ad; font-weight: 500; }
#stage .bag-oro img { width: 22px; height: 22px; }
#stage .bag-frame { position: relative; width: 100%; max-width: none; margin: 10px 0 8px; filter: none; }
#stage .bag-face { position: absolute; inset: 0; background: var(--celda) 0 0 / calc(100% / var(--cols)) calc(100% / var(--rows)); }
#stage .surface button.bag-object {
  width: calc(100% / var(--cols) - 8px); height: calc(100% / var(--rows) - 8px); min-width: 0; min-height: 0; padding: 5px;
  border: 1px solid transparent; border-radius: 1px; background: none; box-shadow: none;
}
#stage .surface button.bag-object:is(:hover, :focus-visible) { border-color: #b98a3c; background: radial-gradient(circle, #5a442055, transparent 72%); }
#stage .surface button.bag-object[aria-pressed=true] { border-color: #f4d48c; box-shadow: inset 0 0 0 2px #b98a3c, 0 0 14px #e2ad4a70; background: radial-gradient(circle, #7a561f66, transparent 74%); }
#stage .surface button.bag-object.dragging { border-style: dashed; background: #5a442055; }
#stage .bag-object small { right: 2px; bottom: 0; min-width: 0; padding: 0; border: 0; background: none; color: #f5e9cc; font: 600 14px / 1 var(--serif); text-shadow: 0 1px 2px #000, 0 0 4px #000, 0 0 2px #000; }
#stage .bag-detail { min-height: 62px; }
#stage .bag-target { margin-top: 8px; padding: 6px 10px 6px 6px; border: 1px dashed #7a5d31; border-radius: 0; background: #100f0d99; }
#stage .bag-target > span { color: var(--muted); font: 13.5px var(--serif); }
#stage .bag-pie { display: flex; justify-content: flex-end; margin-top: 8px; }
#stage .surface .bag-pie button { min-height: 34px; padding: 4px 12px; font-size: 13.5px; }
#stage .bag-tab { border: 1px solid #9b7a45; border-radius: 0; background: var(--grano), linear-gradient(#211d17, #131210); box-shadow: inset 0 0 0 2px #0c0b09, 0 5px 12px #000a; color: #f1e5c9; font: 500 16px var(--serif); padding: 6px 14px 6px 8px; }
#stage .surface .bag-lock { min-height: 34px; padding: 4px 10px; font-size: 13px; }

/* ───────── Atributos y habilidades ───────── */
#stage .hoja-atributos { display: grid; gap: 0 28px; }
#stage .recurso { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 3px 12px; padding: 8px 2px; font: 500 17px var(--serif); font-variant-numeric: lining-nums tabular-nums; }
#stage .recurso > span { color: #f1e5c9; } #stage .recurso > b { font-weight: 500; color: #f5e9cc; }
#stage .recurso > small { grid-column: 2 / -1; margin: 0; font-size: 12.5px; }
#stage .recurso .meter { display: block; height: 14px; padding: 2px; background: linear-gradient(#d7b469, #7a5c2e); clip-path: var(--punta); position: relative; }
#stage .recurso .meter::before { content: ""; position: absolute; inset: 1.5px; background: #0d0c0a; clip-path: var(--punta); }
#stage .recurso .meter > i { position: relative; display: block; height: 100%; min-width: 12px; clip-path: var(--punta); background: linear-gradient(#ffffff59, #fff0 42%, #0000004d), linear-gradient(90deg, var(--bar), var(--bright)); }
#stage .recurso.salud { --bar: #8f1f1b; --bright: #e4543f; } #stage .recurso.mana { --bar: #1f55a6; --bright: #5aa9f0; } #stage .recurso.vigor { --bar: #b6730f; --bright: #f5c53c; }
#stage .skill-entry { gap: 10px; padding: 8px 0; border-bottom: 1px solid #68502d4d; }
#stage .skill-entry > div > b { font: 600 16px var(--serif); }
#stage .skill-entry > div > small, #stage .skill-entry > span > small { font-size: 12px; }
#stage .skill-entry > span { font: 500 16px var(--serif); font-variant-numeric: tabular-nums; }
#stage .surface .skill-entry > button { min-width: 96px; min-height: 34px; padding: 4px 8px; font-size: 13.5px; }
#stage .surface .skill-find { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }

/* ───────── Diario, libro y banco ───────── */
.cuaderno-abierto, .banco-contenedores { display: grid; gap: 16px; }
#stage #panel[data-view=diario] .cuaderno-abierto, #stage #panel[data-view=habilidades] #panel-body {
  --muted: #51402c; --line: #68502d4d; color: var(--vellum-ink); background: #d1b68b var(--folio) center / 100% 100% no-repeat;
}
#stage .cuaderno-abierto { padding: 22px 6%; }
#stage .cuaderno-abierto h3, #stage #panel[data-view=habilidades] #panel-body :is(h3, label, .skill-entry > span, .skill-change, .pill, summary, .bag-summary strong, .bag-summary span) { color: #4a3016; }
#stage .cuaderno-abierto h3::after, #stage #panel[data-view=habilidades] #panel-body h3::after { background: linear-gradient(90deg, #6b4a22, transparent); }
#stage .cuaderno-abierto :is(p, .journal-list, .muted, .pill, strong), #stage #panel[data-view=habilidades] #panel-body :is(p, .muted, small, b) { color: #4a3826; }
#stage .cuaderno-abierto .row .item strong { color: #2f2115; }
#stage #panel[data-view=habilidades] #panel-body { padding: 30px 9% 44px 14%; background-size: 200% 100%; background-position: left; }
#stage #panel[data-view=habilidades] #panel-body :is(input, select) { border-color: #6b4a22; background: #f4e7c8; box-shadow: inset 0 1px 4px #4a301633; color: #2f2115; }
#stage #panel[data-view=habilidades] .layer-tabs { background: linear-gradient(90deg, #6b4a22aa, transparent) 0 100% / 100% 1px no-repeat; }
#stage #panel[data-view=habilidades] .layer-tabs > button { min-width: 0; }
#stage #panel[data-view=habilidades] #panel-body a { color: #6b2a1c; }
#stage #panel[data-view=habilidades] .bag-summary { background: linear-gradient(90deg, #6b4a22aa, transparent) 0 100% / 100% 1px no-repeat; }
#stage .cuaderno-abierto .row { background: linear-gradient(90deg, #6b4a22aa, transparent) 0 100% / 100% 1px no-repeat; }
#stage .journal-list { font: 14.5px / 1.45 var(--serif); }
#stage .banco-contenedores > section, #stage :is(.build-card, .establo-card, .magia-card, .build-details, .exp-task, .campo-guia article, .tomo-portada, .solar-anuncio) {
  padding: 12px; border: 1px solid #6a5330; border-radius: 0; background: linear-gradient(126deg, #24201a, #171512); box-shadow: inset 0 0 0 2px #0c0b09;
}
#stage .exp-task h3 { font: 500 19px var(--serif); }
#stage .exp-task h4 { margin: 0; color: #f1e5c9; font: 500 17px / 1.2 var(--serif); }
#stage .solar-anuncio > h3 { grid-column: 1 / -1; margin: 0; }
/* Taller: recetario en tarjetas */
#stage .exp-sheet[data-view=taller] { width: min(880px, 94vw); }
#stage .exp-task.recetario { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; grid-column: 1 / -1; }
#stage .recetario > h3 { grid-column: 1 / -1; margin: 0 0 2px; }
#stage .receta { display: grid; grid-template-rows: auto 1fr auto auto; gap: 8px; align-content: start; }
#stage .receta > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 7px; background: linear-gradient(90deg, #9b7a4588, transparent) 0 100% / 100% 1px no-repeat; }
#stage .receta > header small { color: #c9ab6e; font: 500 11px var(--serif); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
#stage .receta-materiales { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; font: 15px var(--serif); font-variant-numeric: lining-nums tabular-nums; }
#stage .receta-materiales li { display: flex; justify-content: space-between; gap: 10px; color: #dccfb2; }
#stage .receta-materiales b { font-weight: 500; white-space: nowrap; }
#stage .receta-materiales .completo b { color: var(--verde); } #stage .receta-materiales .completo b::after { content: " ✓"; }
#stage .receta-materiales .falta, #stage .receta-materiales .falta b { color: var(--rojo-claro); } #stage .receta-materiales .falta b::after { content: " ✕"; }
#stage .exp-sheet .receta-aviso { margin: 0; padding: 4px 10px 4px 30px; border: 1px solid #b0483a; background: var(--ico-alerta) 8px 50% / 16px no-repeat, linear-gradient(#55201a, #33120e); color: #ffb9ab; font: 500 13.5px var(--serif); }
#stage .receta > footer { display: flex; gap: 6px; align-items: stretch; }
#stage .receta > footer select { flex: 0 0 62px; min-height: 38px; padding: 4px 6px; }
#stage .exp-sheet .receta > footer button { flex: 1; min-width: 0; margin: 0; min-height: 38px; padding: 4px 10px; font-size: 14px; text-align: center; }
/* Banco */
#stage .banco-oro { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
#stage .caudal { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 1px solid #6a5330; background: linear-gradient(126deg, #24201a, #171512); box-shadow: inset 0 0 0 2px #0c0b09; }
#stage .caudal img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 2px #000c); }
#stage .caudal span { display: grid; color: #f1e5c9; font: 500 16.5px / 1.2 var(--serif); }
#stage .caudal small { color: var(--muted); font: 13px var(--serif); }
#stage .caudal b { color: #f0d594; font: 500 24px var(--serif); font-variant-numeric: lining-nums tabular-nums; }
#stage .banco-traslado { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 4px; }
#stage .banco-traslado label { margin: 0; } #stage .surface .banco-traslado input[type=number] { width: 120px; margin: 0; }
#stage .banco-traslado .actions { margin: 0 0 0 auto; }
#stage .exp-row { padding: 7px 0; border-bottom: 0; background: linear-gradient(90deg, #9b7a4555, #9b7a4510) 0 100% / 100% 1px no-repeat; font: 15px var(--serif); }
#stage .exp-row strong { color: #ecd9ad; font-weight: 500; }
#stage .exp-log { font: 13.5px / 1.45 var(--serif); color: var(--muted); }
#stage .exp-sheet .valde-option { display: flex; }
#stage .exp-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
#stage .exp-menu button { text-align: left; }
#stage #exp-content { gap: 10px; }
#stage #exp-content > button:not(.primary) { justify-self: start; min-width: min(280px, 100%); text-align: left; }
#stage #exp-content > button.primary { justify-self: center; min-width: min(300px, 100%); text-align: center; }
#stage #exp-content > p { margin: 0; }
#stage #exp-content > h3 { margin: 8px 0 0; }

/* ───────── Mapa y cuaderno de campo ───────── */
#stage #map-panel { width: min(680px, calc(100% - 2 * var(--left))); }
#stage #bigmap { border: 1px solid #6a5330; border-radius: 0; box-shadow: inset 0 0 0 2px #0c0b09; }
#stage .destinations { gap: 6px; }
.mapa-pintado { position: relative; isolation: isolate; aspect-ratio: 3 / 2; border: 1px solid #8a724f; box-shadow: 0 0 0 2px #0c0b09, 0 0 0 3px #5e4829; background: #5d5038 url("arte/interfaz/region.webp") center / cover; }
#stage .mapa-pintado button { position: absolute; transform: translate(-50%, -100%); min-height: 34px; max-width: 45%; padding: 5px 14px; border: 1px solid #8a724f; background: #e9d9b4; box-shadow: 0 2px 8px #0c0a08; color: #2b1d10; font: 500 16px var(--serif); text-shadow: none; }
#stage .mapa-pintado button:is(:hover, :focus-visible) { background: #fff3d2 !important; color: #1c120a !important; }
.mapa-pintado button::after { content: ""; position: absolute; left: calc(50% - 4px); bottom: -6px; width: 8px; height: 8px; transform: rotate(45deg); background: #e6c680; border: 1px solid #49361b; }
.pin-cantera { left: 25%; top: 62%; } .pin-paso { left: 62%; top: 43%; }
#stage .camp-chart { margin: 0; }
#stage .camp-chart img { display: block; width: 100%; max-height: 230px; object-fit: cover; border: 1px solid #967b51; }
#stage .camp-chart figcaption { padding: 6px 0; font: 14px var(--serif); color: #dec698; }
#stage .campo-guia { display: grid; grid-template-columns: minmax(125px, 1fr) minmax(0, 1.45fr); gap: 14px; }
#stage .campo-guia nav { display: grid; align-content: start; gap: 4px; }
#stage .campo-guia nav button { display: flex; align-items: center; gap: 6px; padding: 2px 6px; text-align: left; }
.bestia-figura { display: block; width: 38px; aspect-ratio: 1; flex: none; background-repeat: no-repeat; background-size: 800% 100%; background-position: 57.142857% center; }
.bestia-figura.lobo { background-size: 100% 800%; background-position: center 57.142857%; }
#stage .campo-guia article { min-width: 0; align-self: start; }
.campo-grabado { display: grid; place-items: end center; height: clamp(145px, 26vh, 270px); border: 1px solid #887456; background: linear-gradient(#1c181a22, #1d171a24), url("arte/vecinos/hornacina.webp") center / cover; }
.campo-grabado .bestia-figura { width: auto; height: 91%; max-width: 100%; }
#stage .campo-guia article small { display: block; margin-top: 12px; color: #d7bb81; }
#stage .campo-guia article h3 { margin: 3px 0 8px; }

/* ───────── Barra de combate ───────── */
#stage #exp-bar, #stage .exp-ritual {
  bottom: var(--bottom); gap: 6px; padding: 8px 10px; border: 1px solid var(--bronce); border-radius: 0;
  background: var(--grano), linear-gradient(#1e1c17f2, #121110f2); box-shadow: 0 0 0 1px #0a0908, 0 0 0 2px #4d3c22, inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #5e4829, 0 6px 14px #000b;
}
#stage #exp-bar button, #stage .exp-ritual button {
  position: relative; min-width: 64px; min-height: 64px; padding: 40px 6px 5px; display: grid; justify-items: center; align-content: end; gap: 0;
  border: 1px solid #6a5330; border-radius: 2px; background-color: #14120f; background-repeat: no-repeat; background-position: center 6px; background-size: 38px 34px;
  box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #33291b; color: #eddfbf; font: 500 13px / 1.1 var(--serif); text-shadow: 0 1px 2px #000;
}
#stage #exp-bar button:is(:hover, :focus-visible, [aria-pressed=true]), #stage .exp-ritual button:is(:hover, :focus-visible, [aria-pressed=true]) { border-color: #f4d48c; box-shadow: inset 0 0 0 2px #0c0b09, inset 0 0 0 3px #b98a3c, 0 0 14px #e2ad4a70; color: #fff6dc; }
#stage #exp-bar kbd { position: absolute; right: 3px; top: 3px; min-width: 16px; font: 600 10px var(--serif); color: #ecd9ad; }
#stage #exp-bar button:nth-child(7) { background-image: url("arte/interfaz/habilidades.webp"); }
#stage #exp-bar button:nth-child(8) { background-image: url("arte/interfaz/guerra.webp"); }
#stage #exp-bar button:nth-child(9) { background-image: url("arte/interfaz/vigor.webp"); background-size: 26px 30px; background-position: center 8px; }
#stage #exp-bar button[data-espera] { opacity: .92; }
#stage #exp-bar button[data-espera]::after { content: attr(data-espera); position: absolute; inset: 3px; display: grid; place-items: center; background: #0d0c0ad9; font: 600 18px var(--serif); color: #ffe9b5; }
#stage #exp-actions { bottom: calc(var(--bottom) + 96px); gap: 10px; }
#stage #exp-actions button { --alto: calc(var(--u) * 56); }
#stage #exp-actions :is(#do-revivir, #do-sanador, #do-aceptar-vida) { color: #ffe9b0; filter: drop-shadow(0 0 9px #e2ad4a) drop-shadow(0 4px 6px #000b); }
#stage #exp-vigor::-webkit-meter-optimum-value { background: linear-gradient(#ffffff59, #fff0 42%, #0000004d), linear-gradient(90deg, #b6730f, #f5c53c); }
#stage .sigilo-aviso, #stage .sigilo-inspeccion, #stage .sigilo-resultado { padding: 9px 12px; border: 1px solid #6a5330; border-left: 3px solid #e6c680; background: #2a2114; color: #f1e5c9; }
#stage .sigilo-inspeccion { border-left-color: #5f8fc4; }
.sigilo-inspeccion small { color: #d3bd87; }

/* ───────── Escritorio amplio ───────── */
@media (min-width: 820px) and (min-height: 520px) {
  #stage #panel:is([data-view=bestiario], [data-view=diario], [data-view=banco], [data-view=stats]) { width: min(860px, calc(100% - 2 * var(--right))); }
  #stage #panel[data-view=equipo] { left: 50%; right: auto; transform: translateX(-50%); width: min(1080px, calc(100% - 2 * var(--right))); }
  #stage #panel[data-view=mochila] { width: min(440px, calc(100vw - 34px)); }
  #stage #panel[data-view=habilidades] { width: min(540px, calc(100vw - 34px)); }
  #stage .wardrobe { grid-template-columns: minmax(170px, 210px) minmax(0, 1fr) minmax(250px, 300px); grid-template-areas: "datos placa pack" "catalogo catalogo catalogo"; gap: 12px 18px; align-items: start; }
  #stage .ficha-datos { grid-area: datos; } #stage .wardrobe-plate { grid-area: placa; } #stage .wardrobe-pack { grid-area: pack; } #stage .equipment-catalog { grid-area: catalogo; }
  #stage .wardrobe-pack { padding: 12px; border: 1px solid #6a5330; background: linear-gradient(#1b1814, #131210); box-shadow: inset 0 0 0 2px #0c0b09; }
  #stage .wardrobe .pack-strip { grid-template-columns: repeat(4, 1fr); }
  #stage .look-comparison canvas { height: clamp(250px, 40vh, 365px); }
  #stage .hoja-atributos { grid-template-columns: 1fr 1fr; }
  #stage .cuaderno-abierto, #stage .banco-contenedores { grid-template-columns: 1fr 1fr; gap: 12%; }
  #stage .cuaderno-abierto { min-height: 300px; }
  #stage .banco-contenedores { gap: 12px; }
  #stage .exp-sheet:is([data-view=parcelas], [data-view=taller], [data-view=sociedades], [data-view=consejo], [data-view=navio], [data-view=ajustes], [data-view=carta]) { width: min(760px, 91vw); }
  #stage .exp-sheet:is([data-view=parcelas], [data-view=taller], [data-view=ajustes], [data-view=carta]) #exp-content { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  #stage .exp-sheet:is([data-view=parcelas], [data-view=taller], [data-view=ajustes], [data-view=carta]) #exp-content > :not(.exp-task) { grid-column: 1 / -1; }
}
@media (max-width: 819px) {
  #stage .ficha-datos { grid-template-columns: 1fr 1fr; gap: 0 18px; }
  #stage .ficha-nombre { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  #stage .ficha-datos dl { align-content: start; padding: 8px 0 10px; }
  #stage .ficha-datos dl:last-of-type, #stage .ficha-datos .sobrecarga { grid-column: 1 / -1; }
  #stage .dato { font-size: 16px; } #stage .dato dt::before { width: 20px; height: 20px; }
}

/* ───────── Pantallas táctiles y estrechas ───────── */
@media (pointer: coarse), (max-width: 710px) {
  :root { --u: .56px; }
  #stage :is(.place, .exp-banner) { min-height: 0; padding-top: 10px; }
  #stage :is(.place > div, .exp-banner)::after { display: none; }
  #stage :is(.place, .exp-banner) h1 { font-size: 24px; } #stage :is(.place .realm, .exp-banner small) { font-size: 10px; }
  #stage :is(.character-status, .exp-vitals) { --u: .5px; top: calc(var(--top) + 62px); bottom: auto; left: var(--left); pointer-events: none; }
  #stage :is(.vital span, .exp-vitals > div > span) { display: none; }
  #stage :is(.vital, .exp-vitals > div) { grid-template-columns: 14px minmax(0, 1fr) auto; font-size: 11px; }
  #stage .character-status .identity { pointer-events: auto; }
  #stage .character-status .gold { top: auto; bottom: -34px; right: auto; left: -40px; font-size: 12px; }
  #stage .character-status .gold img { width: 15px; height: 15px; }
  #stage .nav-hud { width: 168px; gap: 6px; }
  #stage .radar-dial { width: 92px; }
  #stage #encargo-toggle { --alto: 36px; min-width: 124px; }
  #stage .quest-strip { width: 100%; max-width: 160px; min-width: 0; padding: 6px 8px; } #stage .quest-strip .objective { font-size: 12.5px; }
  #stage .world-actions { bottom: calc(var(--bottom) + 86px); flex-direction: column; align-items: flex-end; gap: 8px; }
  #stage .world-actions .placa { --alto: 40px; min-width: 0; width: 46px; border-width: 9px 20px; border-image-width: 9px 20px; padding: 0; }
  #stage .world-actions .placa > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #stage .world-actions .placa img { margin: -12px -14px; width: 30px; height: 30px; }
  #stage .world-actions #run-control { display: grid; }
  #stage .surface { --pie: calc(78px + var(--bottom) + 10px); top: var(--top); }
  #stage .dock-wrap { width: calc(100% - var(--left) - var(--right)); bottom: var(--bottom); }
  #stage .dock { width: 100%; max-width: 420px; height: 78px; border-width: 18px 17px 17px 16px; border-image-width: 18px 17px 17px 16px; margin-inline: auto; }
  #stage .dock button { margin: -10px 0 -7px; font-size: 12px; } #stage .dock button img { width: 40px; height: 38px; }
  #stage .dock kbd { display: none; }
  /* Arriba a la derecha: abajo quedan la palanca, las acciones del Paso y la barra. */
  #stage .exp-party { --alto: 34px; top: 214px; bottom: auto; left: auto; right: var(--left); }
  #stage.afueras .exp-party { top: 146px; }
  #stage #exp-bar { width: calc(100% - 12px); justify-content: center; gap: 2px; padding: 4px; }
  #stage #exp-bar button { min-width: 0; flex: 1; min-height: 54px; padding: 34px 1px 3px; overflow: hidden; font-size: 9.5px; letter-spacing: -.01em; background-size: 30px 27px; }
  #stage #exp-bar kbd { font-size: 8px; min-width: 12px; padding: 0 2px; }
  #stage #exp-map .radar-dial { width: 78px; }
  #stage .exp-target:not(:empty) { top: auto; bottom: calc(var(--bottom) + 150px); min-width: 0; max-width: 88%; font-size: 15px; white-space: nowrap; }
  #stage .exp-msg:not(:empty) { bottom: calc(var(--bottom) + 196px); padding-inline: 20px; font-size: 14px; }
  #stage #exp-actions { bottom: calc(var(--bottom) + 74px); flex-wrap: wrap; justify-content: center; max-width: 96vw; white-space: normal; }
  #stage #exp-actions button { --alto: 36px; }
  #stage .exp-region { top: 104px; --alto: 32px; }
  #stage .exp-dodge { --alto: 34px; }
  #stage #exp-impacto:not(:empty) { left: 0; bottom: -52px; font-size: 13px; padding: 4px 10px; }
  #stage .exp-vitals > strong { font-size: 13px; top: -24px; left: -40px; }
  #stage .cuaderno-abierto { background-size: 200% 100% !important; background-position: left !important; }
  #stage .campo-guia { grid-template-columns: minmax(108px, .85fr) minmax(0, 1fr); gap: 6px; }
  #stage .campo-guia nav button { font-size: 12px; min-height: 44px; }
  #stage .campo-guia article { padding: 6px; }
  #stage .campo-guia nav .bestia-figura { width: 27px; }
  #stage .wardrobe { --lado: 44px; }
  #stage :is(#panel-body, #map-body, #help-body, #exp-content) { padding: 10px 10px 14px; }
  #stage :is(.surface, .exp-sheet) { padding: 6px; }
}
@media (max-height: 580px) and (min-width: 581px) {
  :root { --u: .6px; }
  #stage :is(.place > div, .exp-banner)::after { display: none; }
}

/* ───────── Preferencias de accesibilidad ───────── */
.primera-movimiento-reducido #stage :is(button, .vital i b, .surface, .exp-sheet, #exp-impacto, img) { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { #stage :is(button, .vital i b, .surface, .exp-sheet, #exp-impacto, img) { animation: none !important; transition: none !important; } }
.valde-contraste #stage :is(.surface, .exp-sheet, .exp-task) { background: #0d0c0a; color: #fff6dc; }
.valde-contraste #stage :is(.panel-head, .exp-sheet header) { background: #17140f; }
.valde-contraste #stage .surface :is(p, .muted), .valde-contraste #stage .exp-sheet p { color: #e8dec4; }
.valde-contraste #stage .cuaderno-abierto p { color: #2a1b0f; }
.valde-contraste #stage :is(.ranura, .pack-tile, .item-symbol) { border-color: #e6c680; }

/* Lecciones de los maestros (orbe.js, hojaMaestro): lo que dice el maestro y el pago en oro. */
#orbe-hoja .orbe-dicho { margin: 0; padding: 8px 10px; border-left: 2px solid #c9a86a; background: #c9a86a14; font: italic 15px var(--serif); color: #efe1c4; }
#orbe-hoja .orbe-leccion { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
#orbe-hoja .orbe-leccion h3, #orbe-hoja .orbe-leccion .orbe-nota { grid-column: 1 / -1; margin: 0; }
#orbe-hoja .exp-row button:disabled { opacity: .45; }
