/* Presentación HD: frentes y retratos nuevos; Equipo conserva la variante del banco. */
.phd-arte { display: block; overflow: hidden; max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.phd-portraitHD { width: 100%; height: 100%; }
.phd-equipo { display: inline-flex; width: 100%; height: 100%; align-items: flex-end; justify-content: center; min-width: 0; min-height: 0; }
.phd-equipo > :is(svg, img) { max-height: 100%; max-width: 100%; height: 100%; width: auto; }
.hero-figure > .phd-menuFront { height: 100%; width: auto; max-width: 100%; }
.ffig > .phd-menuFront, .fmghost > .phd-menuFront { width: 100%; height: 100%; }
.bv-figura > .phd-menuFront { width: 100%; height: 100%; }

/* La ficha ocupa la pantalla disponible; no hereda la columna móvil de 560/700 px. */
.visual-r34 #sheet.hero-sheet:has(.beta-profile-hd) { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: auto; background: #19130e; }
.visual-r34 #sheet.hero-sheet:has(.beta-profile-hd) .sheetbody { padding: 0; overflow-x: hidden; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd { display: flex; flex-direction: column; width: 100%; max-width: none; margin: 0; min-height: 100%; gap: 0; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd > * { flex-shrink: 0; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-stage { order: 0; position: relative; top: auto; grid-column: auto; grid-row: auto; width: 100%; height: clamp(250px, 42dvh, 420px); min-height: 0; overflow: hidden; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage::before { background: linear-gradient(0deg, #19130e 0%, #19130e00 25%, #19130e22 100%), url('../assets/invocacion-escena/normal.webp') center 54% / cover no-repeat; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage::after { bottom: 5%; width: 52%; max-width: 360px; height: 30px; opacity: .8; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-figure { height: 77%; width: 100%; margin-bottom: 6%; align-self: end; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-figure > :is(svg, img, .phd-equipo) { width: auto; height: 100%; max-width: 78%; max-height: 100%; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-figure .phd-equipo > :is(svg, img) { width: auto; height: 100%; max-width: 100%; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-meta { order: 1; display: flex; padding: 12px 16px; border: 0; border-image: none; background: #292017; gap: 8px 12px; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta :is(div, span, small) { color: #e9d9b5; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta h2 { font-size: 26px; line-height: 1.1; margin: 0 0 4px; color: #ffe8aa; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta small { font-size: 14px; line-height: 1.3; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta .tag { color: #c6b18f; font-size: 14px; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd > .b1-fila { order: 1; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-tabs { order: 2; position: sticky; top: 0; bottom: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; padding: 8px 6px; margin: 0; gap: 0; box-shadow: 0 2px 0 #6f4f27; background: #21170f; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-tabs button { width: 100%; min-width: 0; flex-basis: auto; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-panel { order: 3; min-width: 0; padding: 18px 16px 24px; align-content: start; gap: 16px; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-panel .panel { min-width: 0; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-panel .actions { gap: 10px; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-panel :is(button, summary) { min-height: 44px; }
/* La habilidad que ya se puede usar precede a las futuras todavía bloqueadas. */
.visual-r34 #sheet.hero-sheet .beta-profile-hd [data-hero-section="skills"] > [data-b1-habilidad-base] { order: -1; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage:has(.hero-stage-gear:not([hidden])) .hero-figure { height: 74%; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage:has(.hero-stage-gear:not([hidden])) .hero-figure :is(svg, img) { max-width: 100%; }
.visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage:has(.hero-stage-gear:not([hidden])) .hero-figure > .phd-equipo { max-width: 48%; }

@media (max-width: 599px) {
  /* Nombre y nivel comparten fila: deja visibles coste y efecto en 320×640 sin reducir al héroe. */
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 4px 8px; padding: 9px 14px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta > div { display: contents; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta h2 { grid-column: 1; grid-row: 1; min-width: 0; margin: 0; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta small { grid-column: 1 / -1; grid-row: 2; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta > .tag { grid-column: 2; grid-row: 1; font-size: 12px; white-space: nowrap; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-tabs { padding-block: 6px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-tabs button { min-height: 58px; height: 58px; padding-top: 44px; background-size: 22px 22px, 40px 44px; background-position: center 7px, center top; }
}

@media (min-width: 1000px), (min-width: 600px) and (max-height: 500px) {
  .visual-r34 #sheet.hero-sheet:has(.beta-profile-hd) { width: min(96vw, 1440px); height: 90dvh; max-height: 90dvh; inset: 0; box-shadow: 0 0 0 2px #805d35, 0 20px 60px #000b; }
  .visual-r34 #sheet.hero-sheet:has(.beta-profile-hd) .sheetbody { overflow: hidden; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd { display: grid; grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr); grid-template-rows: auto auto auto minmax(0, 1fr); height: 100%; min-height: 0; align-content: stretch; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-stage { grid-column: 1; grid-row: 1 / 5; height: 100%; align-self: stretch; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage::before { background-position: center; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-figure { height: 75%; margin-bottom: 9%; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage::after { bottom: 8%; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-meta { grid-column: 2; grid-row: 1; align-content: start; justify-content: flex-start; padding: 56px 24px 18px; background: #292017; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta > div { width: 100%; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta h2 { font-size: clamp(28px, 3vw, 38px); }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .b1-fila { grid-column: 2; grid-row: 2; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-tabs { grid-column: 2; grid-row: 3; position: relative; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-panel { grid-column: 2; grid-row: 4; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 22px 24px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-panel :is(p, .note, small) { font-size: 16px; line-height: 1.4; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage-gear .gslot { width: min(24%, 150px); min-height: 80px; }
}
@media (min-width: 600px) and (max-height: 500px) {
  .visual-r34 #sheet.hero-sheet:has(.beta-profile-hd) { width: 100vw; height: 100dvh; max-height: 100dvh; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd { grid-template-columns: minmax(230px, 45%) minmax(0, 1fr); }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-meta { padding: 10px 52px 8px 12px; gap: 2px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta h2 { font-size: 23px; margin-bottom: 2px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-meta :is(small, .tag) { font-size: 12px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-figure { height: 78%; margin-bottom: 5%; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-tabs { padding: 4px 2px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-profile-tabs button { min-height: 48px; height: 48px; padding-top: 34px; background-size: 18px 18px, 32px 36px; background-position: center 7px, center top; font-size: 12px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd > .hero-profile-panel { padding: 12px; gap: 12px; }
  .visual-r34 #sheet.hero-sheet .beta-profile-hd .hero-stage-gear .gslot { min-height: 56px; width: 28%; }
}
