.b1-coleccion {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .45rem;
}
.b1-coleccion .hcard { padding: .35rem; }
.b1-coleccion .hopen {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  text-align: left;
  gap: .45rem;
  min-height: 56px;
}
.b1-coleccion .collection-art { min-height: 0; background: none; }
.b1-coleccion .collection-art .frame { width: 46px; height: 46px; }
.b1-coleccion .collection-art > .tag { display: none; }
.b1-coleccion .collection-copy { min-width: 0; padding: 0; }
.b1-coleccion .collection-actions { padding: .25rem; }
.b1-ultima { margin-block: .3rem .65rem; }
.b1-perfil { min-width: 0; }
.b1-perfil .hero-profile-meta { padding-block: .25rem; }
.b1-perfil .hero-profile-meta small { font-size: .75rem; }
.b1-perfil .hero-profile-tabs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.4rem), 1fr)); }
.b1-perfil .hero-profile-tabs button { font-size: .75rem; padding-inline: 1px; overflow-wrap: anywhere; }
.b1-niveles, .b1-habilidades, #modal:has(.b1-costes) .b1-costes { font-size: .875rem; }
.b1-niveles p, .b1-habilidades p, #modal:has(.b1-costes) #modalBody p { font-size: .8125rem; }
.b1-niveles button, .b1-niveles input, #modal:has(.b1-costes) .modalbuttons button {
  font-size: .875rem; max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
.b1-costes span { max-width: 100%; overflow-wrap: anywhere; }
.b1-perfil .hero-stage {
  height: clamp(210px, 33vh, 300px);
  min-height: clamp(170px, 31vh, 360px);
  background: radial-gradient(ellipse at 48% 80%, #423b2b, #15251e 68%);
}
.b1-perfil .hero-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.b1-menuFront {
  display: block;
  height: clamp(164px, 30vh, 350px);
  aspect-ratio: 2 / 3;
}
.b1-menuFront img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.b1-portraitHD { display: block; position: relative; overflow: hidden; width: 100%; height: 100%; }
.b1-portraitHD > img {
  position: absolute;
  width: 215%;
  max-width: none;
  height: auto;
  left: 50%;
  top: 43%;
  transform: translate(calc(-1 * var(--b1-rostro-x)), calc(-1 * var(--b1-rostro-y)));
  image-rendering: auto;
  visibility: hidden;
}
.b1-retrato-respaldo { display: block; width: 100%; height: 100%; }
.b1-retrato-respaldo svg { width: 100%; height: 100%; }
.b1-retrato-listo > img { visibility: visible; }
.b1-retrato-listo .b1-retrato-respaldo { visibility: hidden; }
.gi-retrato:has(.b1-portraitHD) .frame { width: 60px; height: 60px; }
.b1-niveles [role=status]:empty { display: none; }
.b1-niveles [role=status] { color: #e8c886; overflow-wrap: anywhere; }
.b1-resumen { display: flex; gap: .45rem; flex-wrap: wrap; align-items: baseline; }
.b1-costes { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .5rem; }
.b1-costes span { padding: .24rem .45rem; background: #142720; border: 1px solid #5a6041; border-radius: .4rem; }
.b1-falta { color: #ebc799; margin: .4rem 0; }
.b1-acciones { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.b1-acciones label { display: grid; gap: .15rem; }
.b1-acciones button, .b1-fuentes button, .b1-perfil .hero-profile-tabs button, .b1-diaria button,
.b1-niveles > button, .b1-niveles [data-b1-recuperar] { min-height: 44px; min-width: 44px; }
.b1-acciones input, .b1-fuentes input { min-height: 44px; min-width: 0; max-width: 100%; }
.b1-acciones input { width: 4.5em; min-width: 44px; }
.b1-fuentes { margin-top: .6rem; }
.b1-fuentes summary { min-height: 44px; align-content: center; }
.b1-victorias { list-style: none; padding: 0; margin: .4rem 0 0; }
.b1-victorias li { border-top: 1px solid var(--line); padding: .35rem 0; }
.b1-diaria { margin-block: .65rem; }
.b1-diaria button { margin-block: .5rem .25rem; }
.b1-perfil .b1-niveles .b1-acciones > label { grid-template-columns: auto minmax(44px, auto); align-items: center; }
.b1-habilidades { list-style: none; padding: 0; display: grid; gap: .45rem; }
.b1-habilidades details { border: 1px solid #56654a; border-radius: .45rem; padding: .5rem; }
.b1-habilidades summary > span { display: block; color: #bcc5a7; }
.b1-base-con-kit .panel > :not(.talent) { display: none; }
.b1-base-con-kit .panel:not(:has(.talent)) { display: none; }
@media (max-height: 420px) {
  .b1-perfil .hero-stage { min-height: 130px; }
  .b1-menuFront { height: 130px; }
}
@media (max-height: 420px) and (min-width: 500px) {
  .b1-perfil:not(:has(.hero-stage-gear:not([hidden]))) {
    display: grid;
    grid-template-columns: minmax(125px, 29%) minmax(0, 1fr);
    gap: 0 .65rem;
  }
  .b1-perfil:not(:has(.hero-stage-gear:not([hidden]))) > .hero-stage { grid-row: 1 / span 3; align-self: start; height: 145px; }
  .b1-perfil:not(:has(.hero-stage-gear:not([hidden]))) > :not(.hero-stage) { grid-column: 2; }
}
.b1-apoyo-saldo { margin: 0; font-size: .85em; opacity: .85; }
.b1-diaria + .b1-apoyo { margin-top: 0; }
/* R34 · ficha según referencias: cartela arriba, habilidades alrededor del personaje, flechas, detalle único y fila de estadísticas. */
.b1-perfil .hero-stage { position: relative; }
.b1-cartela { position: absolute; top: .35rem; left: 50%; transform: translateX(-50%); z-index: 2; display: grid; justify-items: center; line-height: 1.15; text-align: center; pointer-events: none; text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.b1-cartela small { font-size: .78em; letter-spacing: .08em; text-transform: uppercase; color: #cfe3ff; }
.b1-cartela.epic small, .b1-cartela.rarity-epic small { color: #e7b6ff; }
.b1-cartela span { font-size: .8em; opacity: .92; }
.b1-cartela b { font-size: 1.2em; color: #f6e7bd; }
.b1-orbita { position: absolute; z-index: 2; width: 58px; min-height: 58px; padding: 2px; display: grid; justify-items: center; align-content: center; gap: 0; border: 2px solid #d9b56a; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3a5a50, #14231f 70%); color: #f6e7bd; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.b1-orbita i { font-style: normal; font-size: 1.25em; line-height: 1; }
.b1-orbita small { font-size: .62em; line-height: 1.1; }
.b1-orbita.epica { border-color: #c98cf0; }
.b1-orbita.bloqueada { filter: grayscale(.85); opacity: .88; border-style: dashed; }
.b1-orbita.bloqueada small { color: #ff9c8a; font-weight: 700; }
.b1-orbita.elegida { outline: 3px solid #fff3c4; outline-offset: 2px; }
.b1-orbita-izq { left: 4%; } .b1-orbita-der { right: 4%; }
.b1-orbita-f0 { top: 24%; } .b1-orbita-f1 { top: 45%; } .b1-orbita-f2 { top: 66%; }
.b1-flecha { position: absolute; z-index: 2; bottom: 4%; width: 44px; height: 44px; border: 1px solid #d9b56a; border-radius: 6px; background: rgba(20, 35, 31, .85); color: #f6e7bd; font-size: 1.6em; line-height: 1; }
.b1-flecha-izq { left: 24%; } .b1-flecha-der { right: 24%; }
.b1-detalle { position: absolute; z-index: 3; left: 5%; right: 5%; bottom: 2%; max-height: 32%; overflow: auto; padding: .5rem .65rem; border: 1px solid #d9b56a; border-radius: 6px; background: rgba(16, 28, 25, .96); display: grid; gap: .15rem; cursor: pointer; }
.b1-detalle[hidden] { display: none; }
.b1-detalle p { margin: 0; font-size: .9em; }
.b1-detalle small { font-size: .78em; color: #d9b56a; }
.b1-fila { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .8rem; padding: .45rem .7rem; margin: .35rem 0; border: 1px solid rgba(217, 181, 106, .4); border-radius: 6px; background: rgba(0, 0, 0, .25); font-size: .95em; }
.b1-fila small { opacity: .75; margin-right: .2rem; }
.b1-perfil .hero-profile-meta { display: none; }
/* R34 · personaje protagonista: escenario más alto, cartela en su propia banda (no pisa la cabeza). Paisaje bajo: se conserva compacto. */
/* La acción «Subir nivel» con su coste y efecto debe seguir en el PRIMER encuadre a 320×640 (criterio R27-03): el escenario
   crece con el alto disponible, no a costa de la acción. */
@media (min-height: 560px) {
  .b1-perfil .hero-stage { height: clamp(244px, 38dvh, 290px); min-height: 244px; padding-top: 1.7rem; box-sizing: border-box; }
  .b1-cartela { grid-auto-flow: column; align-items: baseline; gap: .45rem; white-space: nowrap; }
  .b1-perfil .hero-figure { height: 100%; align-items: flex-end; min-height: 0; }
  .b1-perfil .b1-menuFront { height: 100%; max-height: 390px; }
  .b1-cartela span { display: none; }
}
@media (min-height: 760px) {
  .b1-perfil .hero-stage { height: clamp(330px, 46dvh, 470px); min-height: 330px; padding-top: 3.5rem; }
  .b1-cartela { grid-auto-flow: row; gap: 0; white-space: normal; }
  .b1-cartela span { display: inline; }
}
@media (max-width: 360px) {
  .b1-perfil .hero-profile-tabs { display: grid; grid-template-columns: repeat(4, 1fr); }
  .b1-perfil .hero-profile-tabs button { padding-inline: .15rem; font-size: .8em; min-width: 0; }
  .b1-fila { font-size: .86em; padding-block: .3rem; margin-block: .25rem; }
  .b1-fila span:last-child { display: none; }
}
@media (max-height: 559px) { .b1-cartela { display: none; } .b1-orbita { width: 46px; min-height: 46px; } .b1-orbita-f0 { top: 4%; } .b1-orbita-f1 { top: 38%; } .b1-orbita-f2 { top: 70%; } .b1-flecha { display: none; } .b1-detalle { max-height: 60%; } }
.b1-perfil .b1-menuFront { object-fit: contain; }
/* R34 · formación según referencias: campo protagonista con figuras mayores y «Combatir» siempre a mano (candidato). */
.b1-formacion .fm-combatir { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: center; padding: .5rem 0 .35rem; background: linear-gradient(transparent, rgba(14, 24, 21, .96) 35%); }
.b1-formacion .fm-combatir button { min-height: 48px; min-width: min(100%, 15rem); font-size: 1.08em; }
/* R34 · costes como imagen pequeña + cantidad (el nombre queda en title/aria-label). */
.b1-ico { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin-right: .25rem; }
.b1-ico svg { width: 100%; height: 100%; image-rendering: pixelated; }
.b1-coste { display: inline-flex; align-items: center; }
/* R34 · petición del usuario: sin recuadro alrededor de la imagen y el número del coste. */
.b1-costes .b1-coste { border: 0; background: none; box-shadow: none; padding: 0; margin-right: .9rem; font-size: 1.05em; }

/* R34 · formación del candidato (REF-04/11): figuras grandes sin tarjeta, rival en la escena, reserva debajo. */
.b1-formacion .fm-map .ffield { height: 304px; }
.b1-formacion .fm-map .ffield::after { left: 32.5%; top: 30px; }
.b1-formacion .fm-map .fpost { --fs: 64px; width: 66px; min-height: 80px; border: 0; background: none; padding: 0; overflow: visible; }
.b1-formacion .fm-map .fpost.free { border: 0; background: none; }
.b1-formacion .fm-map .fpost .fslot { width: 52px; height: 52px; margin: 6px 0; border: 2px dashed #b7c5ae; background: #14241d99; }
.b1-formacion .fm-map .fpost .ffig { width: 64px; height: 64px; }
.b1-formacion .fm-map .fpost .ffig::before { left: 10px; right: 10px; height: 8px; background: #06100dcc; }
.b1-formacion .fm-map .fpost[aria-pressed=true] { background: none; }
.b1-formacion .fm-map .fpost[aria-pressed=true] .ffig { outline: 2px solid var(--gold2); outline-offset: 1px; background: #f2cf8a2e; border-radius: 10px; }
.b1-formacion .fm-map .fpost b { max-width: 66px; font-size: 10px; line-height: 14px; }
.b1-formacion .fm-nv { position: absolute; top: -2px; right: -4px; font: 800 9px/13px system-ui, sans-serif; font-style: normal; color: #14241b; background: #f2cf8a; border-radius: 4px; padding: 0 3px; pointer-events: none; }
.b1-formacion .fm-deployed { display: none; }
.b1-formacion .fm-enemy { position: absolute; left: 82%; top: 54%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; pointer-events: none; z-index: 40; }
.b1-formacion .fm-enemy[hidden] { display: none; }
.b1-formacion .fm-enemy img { height: 104px; width: auto; max-width: 30cqw; image-rendering: pixelated; filter: drop-shadow(0 4px 0 #06100d99); }
.b1-formacion .fm-enemy b { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; line-height: 14px; color: #ffd9cc; background: #3a1712e6; border-radius: 4px; padding: 0 4px; }
.b1-formacion .fm-map .fband.fb-front { left: 35%; right: auto; }
@media (min-width: 700px) {
  .b1-formacion .fm-map .ffield { height: 380px; }
  .b1-formacion .fm-map .fpost { --fs: 84px; width: 88px; min-height: 102px; }
  .b1-formacion .fm-map .fpost .ffig { width: 84px; height: 84px; }
  .b1-formacion .fm-map .fpost b { max-width: 88px; font-size: 11px; }
  .b1-formacion .fm-enemy img { height: 136px; }
}
