/* BRASA 0.1 · R34 · KIT, TERCERA VUELTA (parche 23; candidato ?visualR34=1).
   Lo que la segunda vuelta dejó sin rehacer: ficha de héroe (REF-03/05), Taller (REF-05/27), academias del hogar, negociación del
   mostrador, «actual → siguiente» junto a la acción en Obras, 690×320 y texto al 200 %. Mismas piezas de css/kit-r34.css; las nuevas
   (medallón, gema, galón, peana, laurel, marco) las dibuja herramientas/r34/kit-sprites.mjs. Aquí no hay reglas ni datos. */

/* ================= FICHA DE HÉROE: UNA escena; el personaje delante, habilidades alrededor, subida junto a él (REF-03/05) ================= */
.visual-r34 #sheet.hero-sheet { background: #1a110b; }
.visual-r34 #sheet.hero-sheet .sheethead { position: absolute; z-index: 6; inset: 0 0 auto 0; height: calc(56px + env(safe-area-inset-top, 0px)); background: none; pointer-events: none; }
.visual-r34 #sheet.hero-sheet .sheethead > b { position: absolute; width: 1px; height: 1px; min-width: 0; min-height: 0; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; }
.visual-r34 #sheet.hero-sheet .sheethead > b::before { content: none; }
.visual-r34 #sheet.hero-sheet .sheethead .back { pointer-events: auto; }
.visual-r34 #sheet.hero-sheet .sheetbody { padding: 0; gap: 0; }
.visual-r34 #sheet.hero-sheet .b1-perfil { display: flex; flex-direction: column; gap: 0; width: min(100%, 560px); min-height: 100%; margin: 0 auto; }
.visual-r34 #sheet.hero-sheet .b1-perfil > * { flex: none; }

/* la escena: fondo de sala (sustituto: ARTE-R34-17), personaje sobre una peana de luz; sin marco ni caja */
.visual-r34 #sheet.hero-sheet .hero-stage { position: relative; isolation: isolate; box-sizing: border-box; height: clamp(262px, 47dvh, 500px); min-height: 0; padding: 0; border: 0; border-image: none; border-radius: 0; background: none; overflow: hidden; display: grid; place-items: end center; }
.visual-r34 #sheet.hero-sheet .hero-stage::before { content: ''; position: absolute; z-index: -2; inset: 0; background: linear-gradient(to bottom, #1a110b99 0, #1a110b00 22%, #1a110b00 60%, #1a110be6 90%, #1a110b 100%), url(../assets/ui/summon-standard.png) 50% 18% / cover no-repeat; image-rendering: pixelated; }
.visual-r34 #sheet.hero-sheet .hero-stage::after { content: ''; position: absolute; z-index: -1; left: 50%; bottom: 3%; width: min(64%, 300px); height: 34px; transform: translateX(-50%); background: var(--k-peana) center / 100% 100% no-repeat; image-rendering: pixelated; }
.visual-r34 #sheet.hero-sheet .hero-figure { position: relative; z-index: 0; height: 80%; min-height: 0; width: 100%; margin-bottom: 5%; display: flex; align-items: flex-end; justify-content: center; border: 0; background: none; box-shadow: none; filter: drop-shadow(0 6px 0 #0006); }
.visual-r34 #sheet.hero-sheet .hero-figure :is(img, canvas, svg) { max-height: 100%; height: 100%; width: auto; max-width: 78%; object-fit: contain; }

/* cartela: gema de rareza, rango, oficio y nombre (REF-03) */
.visual-r34 #sheet.hero-sheet .b1-cartela { top: calc(6px + env(safe-area-inset-top, 0px)); display: grid; grid-auto-flow: row; justify-items: center; gap: 1px; white-space: nowrap; padding-top: 36px; }
.visual-r34 #sheet.hero-sheet .b1-cartela::before { content: ''; position: absolute; left: 50%; top: 0; width: 30px; height: 34px; margin-left: -15px; background: var(--k-gema-raro) center / 30px 34px no-repeat; image-rendering: pixelated; }
.visual-r34 #sheet.hero-sheet .b1-cartela.r-epic::before { background-image: var(--k-gema-epico); }
.visual-r34 #sheet.hero-sheet .b1-cartela small { font: 400 14px/1 var(--k-fuente); letter-spacing: .08em; --k-c: #0c2a4a; color: #bfe6ff; text-shadow: var(--k-contorno-fino); }
.visual-r34 #sheet.hero-sheet .b1-cartela.r-epic small { --k-c: #2a1046; color: #ecc8ff; }
.visual-r34 #sheet.hero-sheet .b1-cartela span { display: block; font: 400 14px/1 var(--k-fuente); --k-c: #1c0f06; color: #f3e6c6; text-shadow: var(--k-contorno-fino); }
.visual-r34 #sheet.hero-sheet .b1-cartela b { font: 400 24px/1 var(--k-fuente); letter-spacing: .03em; --k-c: #1c0f06; color: #ffe9b8; text-shadow: var(--k-contorno); }

/* habilidades: medallón por tipo con su glifo; debajo, una palabra o el nivel que la abre */
.visual-r34 #sheet.hero-sheet .b1-orbita { width: 56px; height: 60px; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; filter: none; opacity: 1; overflow: visible; display: block; background: var(--k-g-raro) 16px 15px / 24px 24px no-repeat, var(--k-medallon-salvia) 0 0 / 56px 60px no-repeat; image-rendering: pixelated; }
.visual-r34 #sheet.hero-sheet .b1-orbita[data-b1-tipo="activa"] { background-image: var(--k-g-fighter), var(--k-medallon-brasa); }
.visual-r34 #sheet.hero-sheet .b1-orbita[data-b1-tipo="complemento"] { background-image: var(--k-g-mas), var(--k-medallon-brasa); }
.visual-r34 #sheet.hero-sheet .b1-orbita.epica { background-image: var(--k-g-epico), var(--k-medallon-morado); }
.visual-r34 #sheet.hero-sheet .b1-orbita.bloqueada { background-image: var(--k-g-candado), var(--k-medallon-piedra); }
.visual-r34 #sheet.hero-sheet .b1-orbita:active { background-position: 16px 17px, 0 2px; }
.visual-r34 #sheet.hero-sheet .b1-orbita i { display: none; }
.visual-r34 #sheet.hero-sheet .b1-orbita small { position: absolute; left: 50%; top: 54px; transform: translateX(-50%); padding: 2px 8px 4px; border: 0 solid transparent; border-image: var(--k-capsula) var(--k-bi-capsula); font: 400 13px/1 var(--k-fuente); color: #ffe9b8; white-space: nowrap; }
.visual-r34 #sheet.hero-sheet .b1-orbita.bloqueada small { color: #ff9c8a; font-weight: 400; }
.visual-r34 #sheet.hero-sheet .b1-orbita.elegida { outline: 0; filter: drop-shadow(0 0 0 #fff3c4) drop-shadow(0 0 6px #ffd66e); }
.visual-r34 #sheet.hero-sheet .b1-orbita-izq { left: max(10px, 4%); } .visual-r34 #sheet.hero-sheet .b1-orbita-der { right: max(10px, 4%); }
.visual-r34 #sheet.hero-sheet .b1-orbita-f0 { top: 30%; } .visual-r34 #sheet.hero-sheet .b1-orbita-f1 { top: 54%; } .visual-r34 #sheet.hero-sheet .b1-orbita-f2 { top: 76%; }
.visual-r34 #sheet.hero-sheet .hero-stage:has(.b1-orbita-f2) .b1-orbita-f0 { top: 22%; }
.visual-r34 #sheet.hero-sheet .hero-stage:has(.b1-orbita-f2) .b1-orbita-f1 { top: 45%; }
.visual-r34 #sheet.hero-sheet .hero-stage:has(.b1-orbita-f2) .b1-orbita-f2 { top: 68%; }

/* pasar de héroe: galones dorados a los lados, abajo */
.visual-r34 #sheet.hero-sheet .b1-flecha { z-index: 2; bottom: 5%; width: 44px; height: 48px; padding: 0; border: 0; border-radius: 0; box-shadow: none; color: transparent; font-size: 0; background: var(--k-galon) center / 24px 40px no-repeat; image-rendering: pixelated; }
.visual-r34 #sheet.hero-sheet .b1-flecha:active { background-position: center 6px; }
.visual-r34 #sheet.hero-sheet .b1-flecha-izq { left: max(8px, 3%); transform: none; } .visual-r34 #sheet.hero-sheet .b1-flecha-der { right: max(8px, 3%); transform: scaleX(-1); }
.visual-r34 #sheet.hero-sheet .hero-stage:has(.b1-orbita-f1) .b1-flecha-izq { left: 24%; } .visual-r34 #sheet.hero-sheet .hero-stage:has(.b1-orbita-f1) .b1-flecha-der { right: 24%; }

/* detalle de una habilidad: bocadillo apoyado al pie de la escena (REF-05) */
.visual-r34 #sheet.hero-sheet .b1-detalle { z-index: 4; left: 12px; right: 12px; bottom: 6px; max-height: 46%; padding: 10px 14px 14px; border: 0 solid transparent; border-image: var(--k-bocadillo) 7 7 9 7 fill / 14px 14px 18px 14px / 0 stretch; border-radius: 0; background: none; box-shadow: none; color: var(--k-tinta); }
.visual-r34 #sheet.hero-sheet .b1-detalle b { font: 400 18px/1.1 var(--k-fuente); color: #5a2a10; }
.visual-r34 #sheet.hero-sheet .b1-detalle small { display: block; font: 400 13px/1.15 var(--k-fuente); color: #8a5a1c; }
.visual-r34 #sheet.hero-sheet .b1-detalle p { font: 400 15px/1.2 var(--k-fuente); color: var(--k-tinta); }
.visual-r34 #sheet.hero-sheet .b1-detalle p.note { font-size: 13px; color: #5a3616; }

/* cifras esenciales: sin caja, sobre la escena oscura; el nivel entre laureles */
.visual-r34 #sheet.hero-sheet .b1-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; margin: 0; padding: 2px 10px 6px; border: 0; border-image: none; background: none; }
.visual-r34 #sheet.hero-sheet .b1-fila :is(span, b, small) { font: 400 16px/1 var(--k-fuente); --k-c: #1c0f06; color: #f3e6c6; text-shadow: var(--k-contorno-fino); opacity: 1; }
.visual-r34 #sheet.hero-sheet .b1-fila span:first-child { position: relative; flex: 0 0 100%; text-align: center; padding: 0 0 4px; }
.visual-r34 #sheet.hero-sheet .b1-fila span:first-child :is(b, small) { font-size: 22px; color: #ffe08a; text-shadow: var(--k-contorno); }
.visual-r34 #sheet.hero-sheet .b1-fila span:first-child::before, .visual-r34 #sheet.hero-sheet .b1-fila span:first-child::after { content: ''; display: inline-block; width: 28px; height: 28px; margin: 0 10px -6px; background: var(--k-laurel) center / 28px 28px no-repeat; image-rendering: pixelated; }
.visual-r34 #sheet.hero-sheet .b1-fila span:first-child::after { transform: scaleX(-1); }
.visual-r34 #sheet.hero-sheet .b1-fila span:last-child { display: inline; }

/* subida de nivel: coste en imagen + cantidad y UNA acción turquesa, centradas bajo el personaje (REF-05) */
.visual-r34 #sheet.hero-sheet .hero-profile-panel { padding: 0 12px 12px; gap: 6px; }
.visual-r34 #sheet.hero-sheet :is(.panel, .b1-niveles) { border: 0; border-image: none; border-radius: 0; background: none; box-shadow: none; padding: 0; }
.visual-r34 #sheet.hero-sheet .b1-niveles { display: grid; justify-items: center; gap: 4px; text-align: center; }
.visual-r34 #sheet.hero-sheet .b1-niveles [data-b1-contenido] { display: grid; justify-items: center; gap: 5px; width: 100%; }
.visual-r34 #sheet.hero-sheet .b1-niveles [role=status] { font: 400 14px/1.15 var(--k-fuente); color: #ffd66e; }
.visual-r34 #sheet.hero-sheet .b1-resumen { display: grid; justify-items: center; gap: 2px; }
.visual-r34 #sheet.hero-sheet .b1-resumen b { font: 400 16px/1 var(--k-fuente); color: #d9c7a0; text-shadow: none; }
.visual-r34 #sheet.hero-sheet .b1-resumen small { font: 400 13px/1 var(--k-fuente); color: #9fd6a4; }
.visual-r34 #sheet.hero-sheet .b1-costes { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.visual-r34 #sheet.hero-sheet .b1-coste b { font: 400 17px/1 var(--k-fuente); --k-c: #1c0f06; color: var(--k-crema); text-shadow: var(--k-contorno-fino); }
.visual-r34 #sheet.hero-sheet .b1-niveles .delta { margin: 0; font: 400 13px/1.15 var(--k-fuente); color: #c9b38a; text-shadow: none; }
.visual-r34 #sheet.hero-sheet .b1-niveles .b1-falta { margin: 0; font: 400 14px/1.15 var(--k-fuente); color: #ff9c8a; }
.visual-r34 #sheet.hero-sheet [data-b1-contenido] > .b1-acciones { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; order: 3; }
.visual-r34 #sheet.hero-sheet [data-b1-contenido] > .delta { order: 4; }
.visual-r34 #sheet.hero-sheet [data-b1-contenido] > .b1-fuentes { order: 5; }
.visual-r34 #sheet.hero-sheet [data-b1-contenido] > .b1-acciones > label { display: grid; grid-template-columns: none; justify-items: center; gap: 1px; font: 400 12px/1 var(--k-fuente); color: #c9b38a; text-shadow: none; }
.visual-r34 #sheet.hero-sheet .b1-acciones input { width: 52px; min-height: 44px; }
.visual-r34 #sheet.hero-sheet #upgradeBtn { min-width: min(210px, 62vw); min-height: 56px; font-size: 20px; }
.visual-r34 #sheet.hero-sheet .b1-fuentes { width: 100%; text-align: center; }
.visual-r34 #sheet.hero-sheet .b1-fuentes > summary { display: inline-grid; min-height: 44px; padding: 0 12px; list-style: none; font: 400 14px/1 var(--k-fuente); color: #c9a66c; text-shadow: none; }
.visual-r34 #sheet.hero-sheet .b1-fuentes > summary::-webkit-details-marker { display: none; }
.visual-r34 #sheet.hero-sheet .b1-fuentes > summary::before { content: '? '; color: #ffd66e; }
.visual-r34 #sheet.hero-sheet .b1-fuentes p { font: 400 14px/1.2 var(--k-fuente); color: #e9d9b5; margin: 4px 0; }
.visual-r34 #sheet.hero-sheet .b1-fuentes .b1-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.visual-r34 #sheet.hero-sheet .b1-victorias { color: #e9d9b5; }

/* lo secundario: líneas sobre la escena oscura, no cajas */
.visual-r34 #sheet.hero-sheet details.spec { padding: 0; border: 0; border-image: none; border-top: 2px solid #3a2412; background: none; }
.visual-r34 #sheet.hero-sheet details.spec > summary { min-height: 44px; font: 400 15px/1.1 var(--k-fuente); color: #e9cf9a; }
.visual-r34 #sheet.hero-sheet details.spec :is(p, dt, dd, li, small), .visual-r34 #sheet.hero-sheet .panel :is(p, small, .note, li, dd, dt, summary, span) { font: 400 14px/1.25 var(--k-fuente); color: #e9d9b5; text-shadow: none; }
.visual-r34 #sheet.hero-sheet .panel :is(h3, b) { font: 400 17px/1.1 var(--k-fuente); --k-c: #1c0f06; color: #ffe9b8; text-shadow: var(--k-contorno-fino); }
.visual-r34 #sheet.hero-sheet .panel h3 { margin: 6px 0 2px; }
.visual-r34 #sheet.hero-sheet .panel .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.visual-r34 #sheet.hero-sheet .b1-habilidades { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.visual-r34 #sheet.hero-sheet .b1-habilidades details { border: 0; border-top: 2px solid #3a2412; border-radius: 0; padding: 4px 0; }
.visual-r34 #sheet.hero-sheet .b1-habilidades summary { min-height: 44px; display: grid; align-content: center; gap: 2px; }
.visual-r34 #sheet.hero-sheet .b1-habilidades summary strong { font: 400 17px/1.1 var(--k-fuente); color: #ffe9b8; }
.visual-r34 #sheet.hero-sheet .b1-habilidades summary > span { font: 400 13px/1.1 var(--k-fuente); color: #c9a66c; }
.visual-r34 #sheet.hero-sheet .b1-habilidades p { font: 400 14px/1.25 var(--k-fuente); color: #e9d9b5; margin: 3px 0; }
.visual-r34 #sheet.hero-sheet [data-b1-habilidades] > h3 { display: none; }
/* historia: una página de libro (REF-31) */
.visual-r34 #sheet.hero-sheet [data-hero-section="history"] .panel { padding: 16px 18px 20px; border: 0 solid transparent; border-image: var(--k-pliego) 9 fill / 18px / 0 stretch; }
.visual-r34 #sheet.hero-sheet [data-hero-section="history"] .panel h3 { font: 400 20px/1.1 var(--k-fuente); color: #5a2a10; text-shadow: none; text-align: right; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px dotted #b98f55; }
.visual-r34 #sheet.hero-sheet [data-hero-section="history"] .panel p { font: 400 16px/1.35 var(--k-fuente); color: var(--k-tinta); margin: 0 0 8px; }
/* equipo: tres casillas alrededor del personaje */
.visual-r34 #sheet.hero-sheet .hero-stage-gear .gslot { border: 0 solid transparent; border-image: var(--k-casilla-azul) var(--k-bi-casilla); background: none; width: clamp(84px, 25%, 126px); min-height: 64px; padding: 4px 4px 6px; }
.visual-r34 #sheet.hero-sheet .hero-stage-gear .gslot.empty { border-image-source: var(--k-hueco); }
.visual-r34 #sheet.hero-sheet .hero-stage-gear [data-gear=weapon] { top: 30%; left: 3%; }
.visual-r34 #sheet.hero-sheet .hero-stage-gear [data-gear=armor] { top: 30%; right: 3%; }
.visual-r34 #sheet.hero-sheet .hero-stage-gear [data-gear=charm] { top: auto; bottom: 8%; right: 3%; }

/* secciones: cuatro discos con su palabra al pie, a la derecha (REF-03/05: Skins · Heroes · Skills) */
.visual-r34 #sheet.hero-sheet .hero-profile-tabs { order: 9; position: sticky; z-index: 5; bottom: 0; display: flex; justify-content: flex-end; gap: 2px; width: auto; margin: auto 0 0; padding: 14px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, #120a05 0, #120a05 62%, #120a0500 100%); }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button { flex: 0 0 64px; box-sizing: border-box; min-width: 0; min-height: 62px; height: 62px; padding: 48px 0 0; border: 0; border-image: none; border-radius: 0; overflow: visible; background: var(--k-g-nivel) center 9px / 24px 24px no-repeat, var(--k-redondo-madera) center 0 / 44px 48px no-repeat; image-rendering: pixelated; font: 400 13px/1 var(--k-fuente); --k-c: #1c0f06; color: #e9cf9a; text-shadow: var(--k-contorno-fino); white-space: nowrap; }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button[data-hero-tab="skills"] { background-image: var(--k-g-rayo), var(--k-redondo-madera); }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button[data-hero-tab="equipment"] { background-image: var(--k-g-yelmo), var(--k-redondo-madera); }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button[data-hero-tab="history"] { background-image: var(--k-g-libro), var(--k-redondo-madera); }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button.active { background-image: var(--k-g-nivel), var(--k-redondo-brasa); color: #ffe9b8; }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button.active[data-hero-tab="skills"] { background-image: var(--k-g-rayo), var(--k-redondo-brasa); }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button.active[data-hero-tab="equipment"] { background-image: var(--k-g-yelmo), var(--k-redondo-brasa); }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button.active[data-hero-tab="history"] { background-image: var(--k-g-libro), var(--k-redondo-brasa); }
.visual-r34 #sheet.hero-sheet .hero-profile-tabs button:active { background-position: center 11px, center 2px; }
.visual-r34 #sheet.hero-sheet:has(#sheetBack[style*="visible"]) .sheetbody { padding-bottom: 0; }

/* apaisado bajo (690×320): escena a la izquierda, todo lo demás a la derecha */
@media (max-height: 520px) and (min-width: 500px) {
  .visual-r34 #sheet.hero-sheet .b1-perfil { display: grid; grid-template-columns: minmax(210px, 40%) minmax(0, 1fr); grid-auto-rows: min-content; gap: 0 8px; width: 100%; }
  .visual-r34 #sheet.hero-sheet .b1-perfil > .hero-stage { grid-column: 1; grid-row: 1 / span 6; position: sticky; top: 0; height: 100dvh; align-self: start; }
  .visual-r34 #sheet.hero-sheet .b1-perfil > :not(.hero-stage) { grid-column: 2; }
  .visual-r34 #sheet.hero-sheet .b1-cartela { display: grid; padding-top: 0; top: 4px; }
  .visual-r34 #sheet.hero-sheet .b1-cartela::before, .visual-r34 #sheet.hero-sheet .b1-cartela span { display: none; }
  .visual-r34 #sheet.hero-sheet .b1-cartela b { font-size: 18px; }
  .visual-r34 #sheet.hero-sheet .b1-orbita { width: 44px; height: 48px; background-size: 20px 20px, 44px 48px; background-position: 12px 11px, 0 0; }
  .visual-r34 #sheet.hero-sheet .b1-orbita small { top: 42px; font-size: 12px; }
  .visual-r34 #sheet.hero-sheet .b1-orbita-f0 { top: 18%; } .visual-r34 #sheet.hero-sheet .b1-orbita-f1 { top: 50%; }
  .visual-r34 #sheet.hero-sheet .b1-flecha { display: block; bottom: 2%; }
  .visual-r34 #sheet.hero-sheet .b1-fila { padding-top: 6px; padding-right: 52px; }
  .visual-r34 #sheet.hero-sheet .b1-fila span:first-child { flex: 0 0 auto; padding: 0; }
  .visual-r34 #sheet.hero-sheet .b1-fila span:first-child::before, .visual-r34 #sheet.hero-sheet .b1-fila span:first-child::after { display: none; }
  .visual-r34 #sheet.hero-sheet .b1-fila span:first-child :is(b, small) { font-size: 16px; }
  .visual-r34 #sheet.hero-sheet #upgradeBtn { min-height: 48px; min-width: 170px; }
  .visual-r34 #sheet.hero-sheet .hero-profile-tabs { padding-top: 6px; }
}
@media (max-width: 359px) {
  .visual-r34 #sheet.hero-sheet .b1-cartela b { font-size: 20px; }
  .visual-r34 #sheet.hero-sheet .b1-cartela { padding-top: 30px; } .visual-r34 #sheet.hero-sheet .b1-cartela::before { width: 26px; height: 30px; margin-left: -13px; background-size: 26px 30px; }
  .visual-r34 #sheet.hero-sheet .hero-stage { height: clamp(244px, 41dvh, 290px); }
  .visual-r34 #sheet.hero-sheet .b1-orbita { width: 48px; height: 52px; background-size: 20px 20px, 48px 52px; background-position: 14px 13px, 0 0; }
  .visual-r34 #sheet.hero-sheet .b1-orbita small { top: 46px; font-size: 12px; padding-inline: 6px; }
  .visual-r34 #sheet.hero-sheet .b1-fila { gap: 2px 12px; padding-bottom: 2px; }
  .visual-r34 #sheet.hero-sheet .b1-fila :is(span, b, small) { font-size: 15px; }
  .visual-r34 #sheet.hero-sheet .b1-fila span:first-child :is(b, small) { font-size: 19px; }
  .visual-r34 #sheet.hero-sheet .b1-fila span:first-child::before, .visual-r34 #sheet.hero-sheet .b1-fila span:first-child::after { width: 22px; height: 22px; background-size: 22px 22px; margin-bottom: -5px; }
  .visual-r34 #sheet.hero-sheet #upgradeBtn { min-height: 50px; }
  .visual-r34 #sheet.hero-sheet .hero-profile-tabs button { flex-basis: 58px; }
}

/* ================= TALLER: la fragua es la pantalla; la pieza sobre el yunque, materiales en casillas y UNA acción (REF-05/27) ================= */
.visual-r34 #sheet.workshop-place .ws-page { padding: 0 0 12px; gap: 0; border: 0; }
.visual-r34 #sheet.workshop-place .ws-layout { display: flex; flex-direction: column; gap: 0; }
.visual-r34 #sheet.workshop-place .ws-layout > .ws-stage { order: 0; position: relative; min-height: clamp(190px, 31dvh, 330px); border: 0; border-image: none; border-bottom: 4px solid #2a1608; image-rendering: pixelated; }
.visual-r34 #sheet.workshop-place .ws-layout > .ws-stage > img { width: clamp(168px, 46vw, 264px); bottom: 2px; }
.visual-r34 #sheet.workshop-place .ws-layout .ws-floating { bottom: clamp(96px, 26vw, 152px); filter: drop-shadow(0 0 0 #1c0f06) drop-shadow(0 0 14px #ffb45a); }
.visual-r34 #sheet.workshop-place .ws-layout .ws-floating .itemicon, .visual-r34 #sheet.workshop-place .ws-layout .ws-floating .itemicon :is(img, svg) { width: 64px; height: 64px; }
.visual-r34 #sheet.workshop-place .ws-layout > .ws-controls { order: 1; margin-top: -24px; position: relative; z-index: 2; padding: 0 10px; }
.visual-r34 #sheet.workshop-place .ws-layout > .wsinfo { order: 2; }
/* cabecera: volver y «?» flotan sobre la escena; el rótulo largo se retira (lo dicen la placa del título y las reglas) */
.visual-r34 #sheet.workshop-place .wsbar { position: absolute; z-index: 3; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 8px; min-height: 0; background: none; border: 0; pointer-events: none; }
.visual-r34 #sheet.workshop-place .wsbar > * { pointer-events: auto; }
.visual-r34 #sheet.workshop-place .wsbar > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.visual-r34 #sheet.workshop-place .wsbar [data-ws-back] { min-width: 0; min-height: 44px; padding: 0 16px 6px 12px; font-size: 14px; }
.visual-r34 #sheet.workshop-place .wsbar [data-ws-back]::before, .visual-r34 #sheet.workshop-place .wsbar [data-ws-back]::after { content: none; }
/* estante: niveles de técnica en una fila de placas; familias como casillas con su dibujo */
.visual-r34 #sheet.workshop-place .wsshelf { display: grid; gap: 6px; justify-items: center; }
.visual-r34 #sheet.workshop-place .wsrow { justify-content: center; gap: 4px; }
.visual-r34 #sheet.workshop-place .ws-page .wsrow[aria-label="Tecnología"] .wsrec { min-width: 58px; min-height: 44px; padding: 0 10px 6px; }
.visual-r34 #sheet.workshop-place .ws-page .wsrow[aria-label="Familia"] .wsrec { display: grid; justify-items: center; align-content: center; gap: 1px; width: 76px; min-height: 64px; padding: 4px 2px 6px; border-image: var(--k-casilla-piedra) var(--k-bi-casilla); color: var(--k-tinta); text-shadow: none; }
.visual-r34 #sheet.workshop-place .ws-page .wsrow[aria-label="Familia"] .wsrec.sel { border-image-source: var(--k-casilla-oro); }
.visual-r34 #sheet.workshop-place .ws-page .wsrow[aria-label="Familia"] .wsrec :is(.itemicon, img, svg) { width: 32px; height: 32px; }
.visual-r34 #sheet.workshop-place .ws-page .wsrow[aria-label="Familia"] .wsrec small { font: 400 13px/1 var(--k-fuente); --k-c: #1c0f06; color: #fff6dc; text-shadow: var(--k-contorno-fino); opacity: 1; }
.visual-r34 #sheet.workshop-place .ws-page .wsrow[aria-label="Familia"] .wsrec :is(.itemicon, img, svg) { opacity: 1; filter: none; }
/* la pieza: nombre grande, un dato, quién la usa, materiales y Forjar; apoyado en el pergamino, sin tira */
.visual-r34 #sheet.workshop-place .ws-layout .wsinfo { justify-items: center; text-align: center; gap: 6px; padding: 10px 12px 0; border: 0; border-image: none; }
.visual-r34 #sheet.workshop-place .wsinfo > small:first-child { font: 400 13px/1 var(--k-fuente); color: #8a5a1c; letter-spacing: .04em; text-transform: uppercase; }
.visual-r34 #sheet.workshop-place .wsinfo > b { font: 400 22px/1.05 var(--k-fuente); --k-c: #3b2412; color: var(--k-crema); text-shadow: var(--k-contorno); }
.visual-r34 #sheet.workshop-place .wsinfo .st { font: 400 17px/1 var(--k-fuente); color: #7a2a14; }
.visual-r34 #sheet.workshop-place .wsinfo .who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.visual-r34 #sheet.workshop-place .ws-users { display: flex; justify-content: center; gap: 4px; }
.visual-r34 #sheet.workshop-place .wsmats { justify-content: center; gap: 6px; padding: 4px 0 2px; }
.visual-r34 #sheet.workshop-place .wsmats .mtile { flex-direction: column; justify-content: flex-start; gap: 0; width: 60px; min-width: 60px; min-height: 66px; padding: 7px 0 0; border: 0 solid transparent; border-image: var(--k-casilla-verde) var(--k-bi-casilla); border-radius: 0; background: none; box-shadow: none; }
.visual-r34 #sheet.workshop-place .wsmats .mtile.m-gold { border-image-source: var(--k-casilla-oro); }
.visual-r34 #sheet.workshop-place .wsmats .mtile.lack { border-image-source: var(--k-casilla-piedra); }
.visual-r34 #sheet.workshop-place .wsmats .mtile .ico { width: 28px; height: 28px; }
.visual-r34 #sheet.workshop-place .wsmats .mtile b { margin-top: 3px; font: 400 14px/1 var(--k-fuente); --k-c: #1c0f06; color: #fff6dc; text-shadow: var(--k-contorno-fino); }
.visual-r34 #sheet.workshop-place .wsmats .mtile b span { font-size: 12px; color: #e9cf9a; }
.visual-r34 #sheet.workshop-place .wsmats .mtile.lack b { color: #ffb39c; }
.visual-r34 #sheet.workshop-place .wsacts { justify-content: center; width: 100%; }
.visual-r34 #sheet.workshop-place .wsacts .primary { flex: 0 1 240px; min-height: 60px; font-size: 22px; }
.visual-r34 #sheet.workshop-place .wsacts .secondary { flex: 0 0 auto; }
.visual-r34 #sheet.workshop-place .ws-armors { margin: 10px 12px 0; padding: 0; border: 0; border-image: none; border-top: 2px dotted #b98f55; }
.visual-r34 #sheet.workshop-place .ws-armors summary { min-height: 44px; font: 400 15px/1 var(--k-fuente); color: #5a3616; text-shadow: none; }
.visual-r34 #sheet.workshop-place .ws-page > p.note { text-align: center; padding: 0 12px; }
@media (min-width: 900px) { .visual-r34 #sheet.workshop-place .ws-layout > .ws-stage > img { width: 264px; } .visual-r34 #sheet.workshop-place .ws-layout .ws-floating { bottom: 152px; } }
@media (max-height: 520px) and (min-width: 500px) {
  .visual-r34 #sheet.workshop-place .ws-layout { display: grid; grid-template-columns: minmax(200px, 38%) minmax(0, 1fr); gap: 0 8px; }
  .visual-r34 #sheet.workshop-place .ws-layout > .ws-stage { grid-column: 1; grid-row: 1 / span 2; min-height: 0; height: calc(100dvh - 56px); position: sticky; top: 0; border-bottom: 0; }
  .visual-r34 #sheet.workshop-place .ws-layout > .ws-stage > img { width: 150px; } .visual-r34 #sheet.workshop-place .ws-layout .ws-floating { bottom: 88px; }
  .visual-r34 #sheet.workshop-place .ws-layout > :is(.ws-controls, .wsinfo) { grid-column: 2; margin-top: 0; }
  .visual-r34 #sheet.workshop-place .ws-layout > .ws-controls { padding-top: 6px; }
  .visual-r34 #sheet.workshop-place .wsbar { right: 62%; }
}

/* ficha de héroe · pestaña Equipo: la figura modular no pisa las casillas */
.visual-r34 #sheet.hero-sheet .hero-stage:has(.hero-stage-gear:not([hidden])) .hero-figure { height: 62%; }
.visual-r34 #sheet.hero-sheet .hero-stage:has(.hero-stage-gear:not([hidden])) .hero-figure :is(img, canvas, svg) { max-width: 44%; }

/* ================= OBRAS: «actual → siguiente» junto a la acción (UI-07, REF-02) ================= */
.visual-r34 #sheet .bld-efecto { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; gap: 6px; margin: 6px 0 2px; padding: 8px 10px 10px; border: 0 solid transparent; border-image: var(--k-tira-hundida) var(--k-bi-tira); }
.visual-r34 #sheet .bld-efecto span { font: 400 14px/1.15 var(--k-fuente); color: #5a3616; text-align: right; }
.visual-r34 #sheet .bld-efecto b { font: 400 15px/1.15 var(--k-fuente); color: #1f6a3a; text-shadow: none; text-align: left; }
.visual-r34 #sheet .bld-efecto i { width: 28px; height: 28px; background: var(--k-relleno-turquesa) center / 20px 10px no-repeat; image-rendering: pixelated; transform: scaleX(-1); }

/* ================= ACADEMIA (hogar · H02): cabecera de madera, lugares como lingotes, ficha en pliego, ayuda con personaje ================= */
.visual-r34 .h02 { --h02-bg: #1f3329; --h02-text: #f3e6c6; --h02-muted: #5a3616; --h02-gold: #ffe9b8; font-family: var(--k-fuente); }
.visual-r34 .h02 :is(h1, h2, p, span, b, small, button, select, option, label, legend, li, input) { font-family: var(--k-fuente); font-weight: 400; letter-spacing: 0; }
.visual-r34 .h02-header { min-height: 56px; padding: 0 8px 8px; border: 0; background: var(--k-tablon) 0 100% / 64px 56px repeat-x, #7a4a22; }
.visual-r34 .h02-header h1 { font: 400 18px/1.1 var(--k-fuente); letter-spacing: .03em; --k-c: #1c0f06; color: #ffe9b8; text-shadow: var(--k-contorno-fino); }
.visual-r34 .h02-meta { font-size: 14px; color: #f3e6c6; }
.visual-r34 .h02-meta .cst b { color: var(--k-crema); }
.visual-r34 .h02 .h02-header button { width: 44px; height: 48px; padding: 0; border: 0; border-radius: 0; background: var(--k-g-volver) 10px 9px / 24px 24px no-repeat, var(--k-redondo-madera) 0 0 / 44px 48px no-repeat; box-shadow: none; font-size: 0; color: transparent; image-rendering: pixelated; }
.visual-r34 .h02 .h02-header [data-h02="ayuda"] { background-image: var(--k-g-ayuda), var(--k-redondo-madera); }
.visual-r34 .h02 .h02-header [data-h02="ayuda"][aria-expanded="true"] { background-image: var(--k-g-cerrar), var(--k-redondo-brasa); }
.visual-r34 .h02 .h02-header button:active { background-position: 10px 11px, 0 2px; }
.visual-r34 .h02-banco { font-size: 13px; color: #ffe9b8; }
.visual-r34 .h02 :is(.h02-tools, .h02-card, .h02-notice) button { min-height: 48px; padding: 0 20px 6px; border: 0 solid transparent; border-image: var(--k-btn-madera) var(--k-bi-btn); border-radius: 0; background: none; box-shadow: none; --k-c: #24130a; color: #ffe9b8; font: 400 16px/1 var(--k-fuente); text-shadow: var(--k-contorno-fino); }
.visual-r34 .h02 :is(.h02-tools, .h02-card, .h02-notice) button:active:not(:disabled) { border-image-source: var(--k-btn-madera-pulsado); padding-top: 4px; padding-bottom: 2px; }
.visual-r34 .h02 .h02-card .h02-primary { border-image-source: var(--k-btn-turquesa); --k-c: #0c3532; color: var(--k-crema); min-width: 120px; font-size: 18px; }
.visual-r34 .h02 .h02-card .h02-primary:active:not(:disabled) { border-image-source: var(--k-btn-turquesa-pulsado); }
.visual-r34 .h02 :is(.h02-tools, .h02-card, .h02-notice) button:disabled { border-image-source: var(--k-btn-piedra); --k-c: #4a453c; color: #e6dfcf; opacity: 1; }
.visual-r34 .h02-tools { gap: 4px; }
.visual-r34 .h02 .h02-tools button { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 1px; min-height: 56px; padding: 2px 6px 8px; font-size: 14px; }
.visual-r34 .h02-tools svg { width: 18px; height: 18px; }
.visual-r34 .h02-notice { padding: 6px 14px 10px; border: 0 solid transparent; border-image: var(--k-capsula) var(--k-bi-capsula); border-radius: 0; background: none; color: #ffe9b8; font-size: 14px; }
.visual-r34 .h02-card { gap: 6px; padding: 16px 18px 22px; border: 0 solid transparent; border-image: var(--k-pliego) 11 11 13 11 fill / 22px 22px 26px 22px / 0 stretch; border-radius: 0; background: none; box-shadow: none; color: var(--k-tinta); }
.visual-r34 .h02-card header h2 { font: 400 18px/1.1 var(--k-fuente); letter-spacing: .04em; text-transform: uppercase; color: #a3481c; }
.visual-r34 .h02 .h02-card [data-h02="cerrar"] { flex: 0 0 44px; width: 44px; height: 48px; min-height: 48px; padding: 0; border: 0; border-image: none; background: var(--k-g-cerrar) 10px 9px / 24px 24px no-repeat, var(--k-redondo-madera) 0 0 / 44px 48px no-repeat; font-size: 0; color: transparent; image-rendering: pixelated; }
.visual-r34 .h02 .h02-card [data-h02="editar"] { min-width: 44px; padding-inline: 12px; }
.visual-r34 .h02-body { scrollbar-color: #b98f55 transparent; }
.visual-r34 .h02-body :is(p, li, label, legend, span) { font-size: 15px; line-height: 1.2; color: var(--k-tinta); }
.visual-r34 .h02 .h02-card-status { color: #8a3a14; }
.visual-r34 .h02-body legend, .visual-r34 .h02-body label[data-h02-field] > span { font-size: 13px; color: #8a5a1c; text-transform: uppercase; letter-spacing: .04em; }
.visual-r34 .h02 select { min-height: 44px; padding: 4px 10px 6px; border: 0 solid transparent; border-image: var(--k-campo) 4 fill / 8px / 0 stretch; border-radius: 0; background: none; color: var(--k-crema); font: 400 16px/1.1 var(--k-fuente); }
.visual-r34 .h02 select option { background: #3a2412; color: #ffe9b8; }
.visual-r34 .h02-decision { justify-items: center; gap: 6px; padding: 4px 0 8px; margin-bottom: 8px; border: 0; border-bottom: 2px dotted #b98f55; background: none; text-align: center; }
.visual-r34 .h02-decision > div:first-child { display: grid; justify-items: center; gap: 2px; }
.visual-r34 .h02-decision .h02-coste { color: var(--k-tinta); }
.visual-r34 .h02-decision .h02-coste .cst b { font-size: 18px; color: var(--k-tinta); }
.visual-r34 .h02-decision .h02-efecto { font-size: 16px; color: #1f6a3a; }
.visual-r34 .h02-decision .h02-actions { justify-self: center; }
.visual-r34 .h02-actions { justify-content: center; gap: 8px; }
.visual-r34 .h02-check input { accent-color: #c9552a; }
.visual-r34 .h02-check:has(input:disabled) span { color: #8a7a5c; }
.visual-r34 .h02-scroll { color: #8a5a1c; font-size: 12px; text-align: center; }
.visual-r34 .h02-body ul button { width: 100%; text-align: left; }
.visual-r34 .h02-personaje { display: none; }
/* ayuda: sale el personaje; la escena se atenúa y el texto va en su bocadillo (REF-35) */
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-patio { filter: brightness(.38); }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card { overflow: visible; padding: 16px 18px 20px; border-image: var(--k-bocadillo) 7 7 9 7 fill / 14px 14px 18px 14px / 0 stretch; max-height: min(58%, calc(100% - 190px)); }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-personaje { display: block; position: absolute; z-index: -1; left: 6px; bottom: calc(100% - 44px); width: min(52vw, 200px); margin: 0; }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card::before { content: ''; position: absolute; left: 56px; top: -14px; width: 24px; height: 18px; background: var(--k-cola) center / 24px 18px no-repeat; }
@media (max-height: 420px) { .visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-personaje { display: none; } .visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card { max-height: calc(100% - 16px); } .visual-r34 .h02-header { min-height: 48px; } }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card header h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card header { justify-content: flex-end; margin-bottom: -40px; }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-body { padding-right: 46px; }

/* ================= MOSTRADOR · negociación con el cliente delante: pieza en casilla, precio en cifra grande, sin recuadro blanco ================= */
.visual-r34 dialog.comercio-juego .negociacion { border-width: 0 0 4px; border-radius: 0; background: none; box-shadow: none; outline: 0; }
.visual-r34 dialog.comercio-juego .objeto { gap: 10px; }
.visual-r34 dialog.comercio-juego .objeto [data-c="piezaIcono"] { display: grid; place-items: center; width: 60px; height: 60px; border: 0 solid transparent; border-image: var(--k-casilla-oro) var(--k-bi-casilla); box-sizing: border-box; }
.visual-r34 dialog.comercio-juego .objeto .itemicon, .visual-r34 dialog.comercio-juego .objeto .itemicon :is(img, svg) { width: 40px; height: 40px; border: 0; background: none; }
.visual-r34 dialog.comercio-juego .objeto output { padding: 0; border: 0; border-radius: 0; background: none; font: 400 24px/1 var(--k-fuente); --k-c: #1c0f06; color: #ffe08a; text-shadow: var(--k-contorno); }
.visual-r34 dialog.comercio-juego .objeto output :is(b, span) { font-size: 24px; color: #ffe08a; }
.visual-r34 dialog.comercio-juego .cara { border: 0; border-radius: 0; box-shadow: none; background: var(--k-redondo-madera) center / 100% 100% no-repeat; image-rendering: pixelated; }
.visual-r34 dialog.comercio-juego .cara[data-animo="inquieto"], .visual-r34 dialog.comercio-juego .cara[data-animo="enfadado"] { background-image: var(--k-redondo-brasa); }
.visual-r34 dialog.comercio-juego .cara[data-animo="feliz"] { background-image: var(--k-redondo-turquesa); }
.visual-r34 dialog.comercio-juego .aviso { font-size: 12px; opacity: .8; }

/* ================= 690×320 (móvil apaisado): defectos reales vistos al mirar las capturas ================= */
/* las pestañas al pie dejaban de ser el ancla de su fondo y éste tapaba la ficha ENTERA (Misiones, Tablón, Lonja, Agenda, Amigos) */
@media (max-height: 520px) { .visual-r34 :is(#sheet, .ed-panel) .am-pestanas { position: relative; bottom: auto; } }

/* retoques tras mirar 320, 690×320 y 1280 */
.visual-r34 #sheet.hero-sheet .hero-profile-tabs { background: #120a05; padding-top: 8px; box-shadow: 0 -4px 0 #2a1608, 0 -6px 0 #5a3616; }
.visual-r34 #sheet.hero-sheet .hero-profile-panel { padding-bottom: 20px; }
.visual-r34 #sheet.workshop-place .ws-page { width: min(100%, 560px); margin: 0 auto; box-sizing: border-box; }
.visual-r34 #sheet.workshop-place .ws-layout { align-items: stretch; grid-template-columns: none; }
.visual-r34 #sheet.workshop-place .ws-layout > * { width: 100%; box-sizing: border-box; min-width: 0; }
.visual-r34 #sheet.workshop-place .ws-layout > .ws-stage { grid-row: auto; }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card { padding-top: 34px; }
.visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card header { margin-top: -22px; }
@media (max-height: 380px) and (orientation: landscape) { .visual-r34 .h02:has(.h02-card:not([hidden])) .h02-header { background: #7a4a22 var(--k-tablon) 0 0 / 64px 56px repeat; } .visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card { padding-top: 16px; } .visual-r34 .h02:has(.h02-header [data-h02="ayuda"][aria-expanded="true"]) .h02-card header { margin-top: 0; } }
@media (max-height: 520px) and (min-width: 500px) { .visual-r34 #sheet.workshop-place .ws-page { width: 100%; } .visual-r34 #sheet.workshop-place .ws-layout { grid-template-columns: minmax(200px, 38%) minmax(0, 1fr); } }

/* ================= B3 · UNA ficha de edificio (gremio y refugio): ámbito, nivel, actual → siguiente, coste en casillas y UNA acción (REF-02) ================= */
.visual-r34 #sheet .bld .bhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.visual-r34 #sheet .bld .bhead > img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.visual-r34 #sheet .bld .bhead > b { flex: 1 1 auto; min-width: 0; }
.visual-r34 #sheet .bld .bhead .pips { flex: 0 0 auto; display: inline-flex; gap: 2px; }
.visual-r34 #sheet .bld-ambito { flex: none; padding: 2px 10px 6px; border: 0 solid transparent; border-image: var(--k-capsula) var(--k-bi-capsula); font: 400 13px/1 var(--k-fuente); color: #ffe08a; white-space: nowrap; }
.visual-r34 #sheet .bld.personal-card.vk .bld-efecto:not(:has(i)) { grid-template-columns: 1fr; }
.visual-r34 #sheet .bld.personal-card.vk .bld-efecto:not(:has(i)) span { text-align: center; }
.visual-r34 #sheet .bld .bld-efecto span { font-size: 15px; } .visual-r34 #sheet .bld .bld-efecto b { font-size: 16px; color: #1f6a3a; }
.visual-r34 #sheet .bld .acts { justify-items: center; }
.visual-r34 #sheet .bld .guild-cost { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.visual-r34 #sheet .bld .guild-cost .mtile { flex-direction: column; justify-content: flex-start; gap: 0; width: 60px; min-width: 60px; min-height: 66px; padding: 7px 0 0; border: 0 solid transparent; border-image: var(--k-casilla-verde) var(--k-bi-casilla); }
.visual-r34 #sheet .bld .guild-cost .mtile.m-gold { border-image-source: var(--k-casilla-oro); }
.visual-r34 #sheet .bld .guild-cost .mtile.lack { border-image-source: var(--k-casilla-piedra); }
.visual-r34 #sheet .bld .guild-cost .mtile .ico { width: 28px; height: 28px; }
.visual-r34 #sheet .bld .guild-cost .mtile b { margin-top: 3px; font: 400 14px/1 var(--k-fuente); --k-c: #1c0f06; color: #fff6dc; text-shadow: var(--k-contorno-fino); }
.visual-r34 #sheet .bld .guild-cost .mtile b span { font-size: 12px; color: #e9cf9a; text-shadow: var(--k-contorno-fino); }
.visual-r34 #sheet .bld .guild-cost .mtile.lack b { color: #ffb39c; }
.visual-r34 #sheet .bld :is([data-building-up], [data-refuge-up]) { width: min(100%, 280px); min-height: 56px; font-size: 20px; border-image-source: var(--k-btn-turquesa); --k-c: #0c3532; }
.visual-r34 #sheet .bld :is([data-building-up], [data-refuge-up]):active:not(:disabled) { border-image-source: var(--k-btn-turquesa-pulsado); }
.visual-r34 #sheet .bld :is([data-building-up], [data-refuge-up]):disabled { border-image-source: var(--k-btn-piedra); --k-c: #4a453c; }
.visual-r34 #sheet .bld .bhead .qmark { flex: none; }
.visual-r34 #sheet .bld .bhead > b { flex: 1 1 55%; }
.visual-r34 #sheet .bld .bhead .qmark { order: 1; }
.visual-r34 #sheet .bld .bhead .bld-ambito { order: 2; }
.visual-r34 #sheet .bld .bhead .pips { order: 3; margin-right: auto; }
.visual-r34 #sheet .bld.guild .acts { justify-items: center; }
.visual-r34 #sheet .bld.guild .guild-cost { justify-content: center; }
.visual-r34 #sheet .bld details.spec > summary { text-align: right; }

/* ================= CORRECCIONES DEL USUARIO (10 nov, 07:17): letras centradas y UN código de color para los botones =================
   Código de color (vale para todo el juego con el kit):
     turquesa = confirma, gasta o cobra (Subir nivel, Forjar, Construir, Mejorar, Invocar, Comprar, Enviar la salida, Cobrar, Ofrecer, Entrenar)
     ámbar    = te lleva a otro sitio o abre algo (Ir, Enviar de la fila del Tablón, Abrir mostrador, Ver…)
     madera   = secundario (Rellenar, Quitar, Copiar, Cancelar, Volver)
     brasa    = lo elegido (pestaña, filtro, destino activo) y lo que borra
     piedra   = no disponible */
.visual-r34 #sheet :is([data-craft], [data-shop-buy], [data-bag-upgrade], [data-bag-equip], #recruitBtn, #joinBtn, #ascendBtn, #ascendUniBtn, #tomeBtn, #talentBtn, [data-ws-equip], [data-crypt-enter], [data-crypt-sweep]):not(:disabled),
.visual-r34 #modal .modalbuttons .primary:not(:disabled),
.visual-r34 .view .vi-tiradas #summon1:not(:disabled),
.visual-r34 .view .am-tiradas button:not(:disabled) { border-image-source: var(--k-btn-turquesa); --k-c: #0c3532; color: var(--k-crema); }
.visual-r34 #sheet :is([data-craft], [data-shop-buy], [data-bag-upgrade], [data-bag-equip], #recruitBtn, #joinBtn, #ascendBtn, #ascendUniBtn, #tomeBtn, #talentBtn, [data-ws-equip]):active:not(:disabled),
.visual-r34 #modal .modalbuttons .primary:active:not(:disabled) { border-image-source: var(--k-btn-turquesa-pulsado); }
.visual-r34 #sheet :is(.vt-enviar, [data-go], [data-bld-go], [data-ws-again]):not(:disabled) { border-image-source: var(--k-btn-ambar); --k-c: #5a3208; color: var(--k-crema); }
.visual-r34 #sheet :is(.vt-enviar, [data-go], [data-bld-go], [data-ws-again]):active:not(:disabled) { border-image-source: var(--k-btn-ambar-pulsado); }
.visual-r34 #sheet [data-board-suggest]:not(:disabled) { border-image-source: var(--k-btn-madera); --k-c: #24130a; color: #ffe9b8; }
.visual-r34 #sheet [data-board-suggest]:active:not(:disabled) { border-image-source: var(--k-btn-madera-pulsado); }

/* letras centradas: todo lingote centra su rótulo en la cara (el labio de abajo no cuenta) */
.visual-r34 :is(#sheet, #modal, .ed-panel, #drawer) :is(.primary, .secondary, .am-accion, .am-lote, .ed-boton, .mini:not(.info)) { text-align: center; line-height: 1.05; }
.visual-r34 #sheet .or-entrada { display: grid; grid-template-columns: 1fr; justify-items: center; position: relative; padding-inline: 34px; }
.visual-r34 #sheet .or-entrada em { position: absolute; right: 26px; top: 50%; margin-top: -14px; }
.visual-r34 #sheet .actions > :is(.primary, .secondary) { padding-inline: 14px; min-width: 0; }
.visual-r34 #sheet .wide:is(.primary, .secondary) { height: auto; padding-top: 6px; padding-bottom: 12px; white-space: normal; }
.visual-r34 .maphudbtn { justify-content: center; text-align: center; }
.visual-r34 :is(#modal, #sheet) .actions :is(.primary, .secondary) { display: inline-grid; place-items: center; }
/* pestañas al pie: el rótulo queda a la MISMA altura en la elegida y en las demás (antes, la elegida lo bajaba) */
.visual-r34 :is(#sheet, .ed-panel) .am-pestanas button { display: flex; align-items: flex-start; justify-content: center; padding-top: 11px; text-align: center; }
.visual-r34 :is(#sheet, .ed-panel) .am-pestanas button:is(.active, [aria-pressed="true"], [aria-selected="true"]) { padding-top: 11px; }
.visual-r34 :is(#sheet, .ed-panel) .am-pestanas button > * { flex: none; }
/* ficha de héroe: las cuatro secciones, centradas */
.visual-r34 #sheet.hero-sheet .hero-profile-tabs { justify-content: center; gap: 10px; }
.visual-r34 #sheet.hero-sheet:has(#sheetBack[style*="visible"]) .hero-profile-tabs { padding-left: 64px; }
/* navegación: el nombre del destino cabe entero y queda centrado bajo su icono */
.visual-r34 .navbtn { align-items: center; text-align: center; }
.visual-r34 .navbtn > span { overflow: visible; max-width: none; }
@media (max-width: 419px) { .visual-r34 .navbtn { font-size: 10.5px; letter-spacing: 0; } .visual-r34 .navbtn.active { padding-inline: 0; border-image-width: 16px 14px 22px 14px; } }
/* (el estilo de .secondary dentro de #sheet gana por especificidad: aquí hace falta !important) */
.visual-r34 #sheet :is(.vt-enviar, [data-go], [data-bld-go], [data-ws-again], [data-b1-provisiones], [data-b1-patio], [data-b1-tablon], [data-b1-puerta], [data-b1-informes]):not(:disabled),
.visual-r34 .view :is(#objectiveGo, [data-go], [data-quest-go], [data-chal-watch]):not(:disabled) { border-image-source: var(--k-btn-ambar) !important; --k-c: #5a3208; color: var(--k-crema); }
.visual-r34 #sheet :is([data-bag-upgrade], [data-ws-equip], #ascendBtn, #ascendUniBtn, #tomeBtn, #talentBtn):not(:disabled),
.visual-r34 :is(#modal, #sheet) :is(#accEntrar, #nubeEntrar):not(:disabled),
.visual-r34 .view :is([data-tower-enter], [data-beast-enter], [data-crypt-enter], [data-lab-enter]):not(:disabled) { border-image-source: var(--k-btn-turquesa) !important; --k-c: #0c3532; color: var(--k-crema); }
.visual-r34 .view :is([data-bag-upgrade], [data-bag-equip]):not(:disabled) { border-image-source: var(--k-btn-turquesa) !important; --k-c: #0c3532; color: var(--k-crema); }

/* corrección del 10 nov, 07:38: nada de cuadros de formulario a la vista. La cantidad de subidas es una cápsula «×1» junto al botón */
.visual-r34 #sheet.hero-sheet .b1-cantidad-oculta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.visual-r34 #sheet.hero-sheet .b1-multi { flex: none; box-sizing: border-box; min-width: 52px; min-height: 44px; padding: 0 12px 6px; border: 0 solid transparent; border-image: var(--k-capsula) var(--k-bi-capsula); border-radius: 0; background: none; box-shadow: none; font: 400 18px/1 var(--k-fuente); --k-c: #1c0f06; color: #ffe08a; text-shadow: var(--k-contorno-fino); text-align: center; }
.visual-r34 #sheet.hero-sheet .b1-multi:active { transform: translateY(2px); }
/* casillas de verificación del sistema (lista de piezas del mostrador, acompañantes de la academia): casilla del kit con su marca */
.visual-r34 :is(dialog.comercio-juego, .h02, #sheet, #modal) input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 28px; height: 28px; margin: 0 6px 0 0; border: 0 solid transparent; border-image: var(--k-hueco) 5 fill / 10px / 0 stretch; background: none; vertical-align: middle; image-rendering: pixelated; }
.visual-r34 :is(dialog.comercio-juego, .h02, #sheet, #modal) input[type="checkbox"]:checked { background: var(--k-marca) center / 22px 18px no-repeat; }
.visual-r34 :is(dialog.comercio-juego, .h02, #sheet, #modal) input[type="checkbox"]:disabled { opacity: .5; }
.visual-r34 :is(dialog.comercio-juego, .h02, #sheet, #modal) input[type="checkbox"]:focus-visible { outline: 2px solid #ffe08a; outline-offset: 1px; }

/* ===== Corrección del usuario (10 nov, 09:04): los botones de abajo no casaban con las juntas de la madera =====
   El tablón se repetía cada 64 px sin relación con los cinco destinos. En la barra inferior cada tabla mide ahora
   exactamente un destino (20 %) y la junta cae entre dos botones (el dibujo trae la junta en su centro: −12,5 % la lleva
   al borde). Sin separación ni margen lateral, para que cada botón ocupe su tabla entera. Sólo móvil: en escritorio la
   navegación es una columna. */
@media (max-width: 899px) {
  .visual-r34 .nav { gap: 0; padding-left: 0; padding-right: 0; background: linear-gradient(#1c0f06, #1c0f06) 0 0 / 100% 2px no-repeat, linear-gradient(#b07a44, #b07a44) 0 2px / 100% 2px no-repeat, var(--k-tablon) -12.5% 4px / 20% 56px repeat-x, #5a3416; }
  .visual-r34 .navbtn { flex: 1 1 0; }
}
