/* hecho por r3k1 */
:focus-visible { outline-color: var(--acento-2) }
::selection { background: var(--acento-2); color: var(--fondo) }
.marca { display: flex; align-items: center; gap: 12px }
.marca svg { width: 64px }
.marca .rojo path, .rojo { fill: var(--acento-2) }
.pie-grande .pie-lema span { color: var(--acento-2) }
.marca-nombre { font-family: var(--anton); text-transform: uppercase; font-size: 20px; line-height: 1.3; padding-top: .12em; letter-spacing: .01em; padding-left: 12px; border-left: 1px solid var(--linea); white-space: nowrap }
.mini { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gris) }

.escribir { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--boton); color: var(--tinta); font-size: 15px; font-weight: 600; transition: scale .3s var(--muelle), background-color .3s, color .3s }
.escribir svg { width: 22px; height: 22px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
.escribir:active { scale: .94 }
.escribir[aria-pressed="true"] { background: var(--acento); color: var(--acento-txt) }

.boton.chico { height: 44px; padding: 0 18px; gap: 8px; font-size: 14px }
.boton.chico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px }

.migas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--gris); padding-top: clamp(20px, 4vh, 40px) }
.migas a { display: inline-flex; align-items: center; min-height: 44px; transition: color .25s }
.migas span[aria-hidden] { opacity: .5 }

.bloque { padding-top: clamp(72px, 12vh, 140px) }
.bloque-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vh, 44px) }
.seccion { font-size: clamp(44px, 7vw, 112px) }
.seccion small { font-family: var(--geist); font-size: 15px; font-weight: 600; color: var(--gris); letter-spacing: .02em; text-transform: none; vertical-align: top; margin-left: 10px }

/* portada */
.heroe { display: grid; grid-template-columns: 1.35fr .65fr; gap: 32px; align-items: center; padding-top: clamp(32px, 8vh, 96px); min-height: min(78svh, 820px) }
.titular { font-size: clamp(76px, 15.5vw, 260px); margin-top: 18px }
.titular .letra { display: inline-block; cursor: default; touch-action: manipulation }
.heroe .sub { font-family: var(--anton); text-transform: uppercase; font-size: clamp(26px, 3.4vw, 52px); line-height: 1; margin-top: 18px }
.heroe .sub .rota { display: inline-block; color: var(--acento-2); min-width: 4ch }
.lema { max-width: 52ch; margin-top: 22px; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; color: var(--gris) }
.heroe-escriba { position: relative; justify-self: center; width: min(100%, 360px) }

.rejilla-juegos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 20px }
.envuelve { position: relative }
.tarjeta-juego { position: relative; display: grid; grid-template-rows: auto 1fr; height: 100%; border-radius: 24px; border: 1px solid var(--linea); background: var(--celda); overflow: hidden; transition: border-color .35s }
.tj-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--boton) }
.tj-img img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--suave) }
.tj-txt { display: grid; align-content: start; gap: 8px; padding: 22px 80px 24px 24px }
.tj-txt h3 { font-family: var(--anton); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 3vw, 44px); line-height: .95 }
.tj-txt p { color: var(--gris); line-height: 1.45 }
.tj-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600 }
.punto { width: 9px; height: 9px; border-radius: 50%; background: var(--tono, var(--acento)); flex: none }
.tarjeta-juego .ir { position: absolute; right: 20px; bottom: 22px; background: var(--boton) }
.monograma { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--anton); font-size: clamp(60px, 9vw, 120px); color: color-mix(in srgb, var(--tono, var(--acento)) 75%, var(--tinta)); background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--tono, var(--acento)) 26%, transparent), transparent 70%), var(--boton); text-transform: uppercase }
.nueva { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 260px; border: 1px dashed var(--gris); border-radius: 24px; color: var(--tinta); font-weight: 600; transition: border-color .3s, background-color .3s }
.nueva .mas { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--acento); color: var(--acento-txt); font-size: 30px; line-height: 1 }
.vacio { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 48px 20px; border: 1px solid var(--linea); border-radius: 24px; background: var(--celda); color: var(--gris) }
.vacio strong { color: var(--tinta); font-family: var(--anton); font-weight: 400; text-transform: uppercase; font-size: 32px }

/* controles de escritura */
.controles { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 6px }
.controles button, .control { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--fondo) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--linea); color: var(--tinta); font-size: 14px; font-weight: 600; transition: border-color .25s, scale .16s ease-out }
.controles button:active, .control:active { scale: .94 }
.controles button[disabled] { opacity: .35; cursor: default }
.controles svg, .control svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.control { display: inline-flex; gap: 8px; backdrop-filter: none; background: var(--boton) }

.barra-escribir { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--celda) 88%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border: 1px solid var(--linea); box-shadow: 0 18px 50px -20px rgba(0, 0, 0, .55); translate: -50% 0 }
.barra-escribir .be-estado { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 12px; font-size: 14px; font-weight: 600; white-space: nowrap }
.barra-escribir .be-estado i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--acento-2) }
.barra-escribir .be-estado i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--acento-2); opacity: 0; animation: latido 2.4s var(--suave) infinite }
.barra-escribir button { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--boton); white-space: nowrap; transition: scale .16s ease-out }
.barra-escribir button:active { scale: .95 }
.barra-escribir svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
body.escribiendo { padding-bottom: 90px }

/* juego */
.hj-rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; padding-top: clamp(16px, 4vh, 48px) }
.hj-rejilla .gigante { font-size: clamp(60px, 8.6vw, 156px); margin-top: 16px }
.hj-sub { font-family: var(--anton); text-transform: uppercase; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.05; margin-top: 14px; color: var(--acento-texto) }
.hj-portada { position: relative; aspect-ratio: 16 / 10; border-radius: 24px; overflow: hidden; border: 1px solid var(--linea); background: var(--boton) }
.hj-portada img { width: 100%; height: 100%; object-fit: cover }
.prosa.corta { margin-top: 18px; color: var(--gris) }
.prosa.corta p { font-size: 17px }

.subnav { position: sticky; top: 76px; z-index: 30; margin-top: clamp(48px, 8vh, 96px) }
.subnav .envoltura { display: flex }
.subnav-pista { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid var(--linea); background: color-mix(in srgb, var(--fondo) 80%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); overflow-x: auto; scrollbar-width: none; max-width: 100% }
.subnav-pista::-webkit-scrollbar { display: none }
.subnav-pildora { position: absolute; top: 4px; left: 0; height: calc(100% - 8px); width: 0; border-radius: 999px; background: var(--acento); pointer-events: none }
.subnav a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--gris); white-space: nowrap; transition: color .3s }
.subnav a small { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums }
.subnav a[aria-current] { color: var(--acento-txt) }

.indice { list-style: none; display: grid; border-top: 1px solid var(--linea) }
.fila { position: relative; border-bottom: 1px solid var(--linea) }
.fila > a { display: grid; grid-template-columns: clamp(56px, 7vw, 110px) 1fr auto auto; align-items: center; gap: clamp(14px, 2.4vw, 36px); padding: clamp(20px, 3vh, 30px) 8px; border-radius: 18px; transition: background-color .35s }
.fila-num { font-family: var(--anton); font-size: clamp(30px, 3.6vw, 56px); line-height: 1; color: var(--acento-2) }
.fila-tit { display: block; font-family: var(--anton); text-transform: uppercase; font-size: clamp(26px, 3vw, 46px); line-height: .98 }
.fila-res { display: block; margin-top: 8px; color: var(--gris); max-width: 64ch; line-height: 1.45 }
.fila-img { width: clamp(84px, 11vw, 168px); aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--boton) }
.fila-img img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--suave) }
.fila .ir { background: var(--boton) }
.fila .controles { top: 50%; translate: 0 -50%; right: 76px }

.rejilla-fichas { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); gap: clamp(12px, 1.6vw, 20px) }
.rejilla-fichas.ancha { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)) }
.tarjeta-ficha { display: grid; gap: 4px; height: 100%; padding: 10px 10px 18px; border-radius: 24px; border: 1px solid var(--linea); background: var(--celda); transition: border-color .35s }
.tf-img { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--boton); margin-bottom: 10px }
.ancha .tf-img { aspect-ratio: 16 / 9 }
.tf-img img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--suave) }
.tf-img .monograma { font-size: clamp(48px, 6vw, 84px) }
.tf-tipo { padding: 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acento-texto) }
.tarjeta-ficha h3 { padding: 0 8px; font-family: var(--anton); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 2vw, 30px); line-height: 1 }
.tf-rol { padding: 0 8px; font-size: 14px; color: var(--gris); line-height: 1.4 }
.rejilla-fichas .controles { top: 18px; right: 18px }

/* texto */
.prosa { font-size: clamp(17px, 1.25vw, 19px); line-height: 1.72 }
.prosa > * + * { margin-top: 1.1em }
.prosa h2 { font-family: var(--anton); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 3vw, 44px); line-height: 1; margin-top: 1.6em }
.prosa strong { font-weight: 650; color: var(--tinta) }
.prosa blockquote { padding: 4px 0 4px 22px; border-left: 3px solid var(--acento-2); font-size: 1.12em; color: var(--tinta) }
.prosa ul { padding-left: 1.2em }
.prosa li + li { margin-top: .4em }
.prosa li::marker { color: var(--acento-2) }
.separa { border: 0; height: 24px; margin: 2.2em auto; width: 120px; background: radial-gradient(circle, var(--gris) 2px, transparent 2.5px) 0 50% / 40px 24px repeat-x; opacity: .7 }
.mencion { color: var(--acento-texto); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, var(--acento-texto) 45%, transparent); transition: text-decoration-color .25s }
.mencion.rota { color: inherit; text-decoration-style: dotted; text-decoration-color: var(--gris); font-weight: 500 }
.spoiler:focus-visible { outline: 2px solid var(--acento-2); outline-offset: 2px }
.spoiler { display: inline; padding: 1px 6px; margin: 0 -2px; border-radius: 6px; background: var(--boton); color: transparent; font: inherit; line-height: inherit; text-align: inherit; cursor: pointer; transition: color .4s, background-color .4s; -webkit-box-decoration-break: clone; box-decoration-break: clone; text-shadow: 0 0 9px color-mix(in srgb, var(--tinta) 55%, transparent) }
.spoiler:not(.visto) * { color: transparent; text-decoration-color: transparent }
.spoiler.visto { color: inherit; background: color-mix(in srgb, var(--acento-2) 14%, transparent); text-shadow: none; cursor: text }

.tarjetita { position: fixed; z-index: 70; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; width: 280px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--celda); border: 1px solid var(--linea); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .5); pointer-events: none; opacity: 0 }
.tarjetita .tt-img { position: relative; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--boton) }
.tarjetita .tt-img img { width: 100%; height: 100%; object-fit: cover }
.tarjetita .monograma { font-size: 26px }
.tarjetita b { display: block; font-family: var(--anton); font-weight: 400; text-transform: uppercase; font-size: 20px; line-height: 1 }
.tarjetita small { display: block; margin-top: 4px; font-size: 13px; color: var(--gris); line-height: 1.35 }

/* capítulo */
.barra-lectura { position: fixed; left: 0; right: 0; top: 0; z-index: 50; height: 3px; pointer-events: none }
.barra-lectura i { position: absolute; inset: 0; background: var(--acento-2); transform-origin: 0 50%; transform: scaleX(0) }
.cap-rejilla { display: grid; grid-template-columns: 250px minmax(0, 1fr) 250px; gap: clamp(28px, 4vw, 72px); align-items: start; padding-top: clamp(16px, 4vh, 40px) }
.cap-lado { position: sticky; top: 100px }
.cap-indice summary { display: none }
.cap-indice ol { list-style: none; display: grid; gap: 2px; margin-top: 14px; counter-reset: cap }
.cap-indice a { display: grid; grid-template-columns: 30px 1fr; gap: 8px; min-height: 44px; align-items: center; padding: 8px 12px; border-radius: 14px; font-size: 15px; font-weight: 500; color: var(--gris); line-height: 1.3; transition: color .25s, background-color .25s }
.cap-indice a span { font-family: var(--anton); font-size: 16px; color: inherit }
.cap-indice a[aria-current] { color: var(--tinta); background: var(--boton) }
.cap-indice a[aria-current] span { color: var(--acento-texto) }
.cap-texto { max-width: 70ch; width: 100%; justify-self: center }
.cap-texto .gigante { font-size: clamp(52px, 6.4vw, 112px); margin-top: 16px }
.cap-res { margin-top: 18px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--gris) }
.cap-img { margin-top: 32px; border-radius: 24px; overflow: hidden; border: 1px solid var(--linea); background: var(--boton) }
.cap-texto .prosa { margin-top: 36px }
.cap-gente ul { list-style: none; display: grid; gap: 4px; margin-top: 14px }
.persona { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; min-height: 56px; padding: 6px 10px 6px 6px; border-radius: 16px; transition: background-color .25s }
.persona .p-img { position: relative; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--boton) }
.persona .p-img img { width: 100%; height: 100%; object-fit: cover }
.persona .monograma { font-size: 20px }
.persona b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25 }
.persona small { display: block; font-size: 13px; color: var(--gris); line-height: 1.3 }
.cap-pasos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: clamp(56px, 9vh, 96px) }
.paso { display: grid; gap: 8px; min-height: 120px; padding: 22px 24px; border-radius: 24px; border: 1px solid var(--linea); background: var(--celda); transition: border-color .35s }
.paso small { font-size: 13px; font-weight: 600; color: var(--gris); letter-spacing: .06em; text-transform: uppercase }
.paso b { font-family: var(--anton); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 2.2vw, 32px); line-height: 1 }
.paso.sig { text-align: right; justify-items: end }
.paso.sin { visibility: hidden }

/* ficha */
.fi-rejilla { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 88px); align-items: center; padding-top: clamp(16px, 4vh, 40px) }
.fi-retrato { position: relative; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; border: 1px solid var(--linea); background: var(--boton) }
.fi-retrato.ancho { aspect-ratio: 16 / 11 }
.fi-retrato img { width: 100%; height: 100%; object-fit: cover }
.fi-retrato .monograma { font-size: clamp(110px, 16vw, 240px) }
.fi-cab .gigante { font-size: clamp(56px, 7.6vw, 140px); margin-top: 16px }
.fi-rol { margin-top: 14px; font-size: clamp(18px, 1.5vw, 22px); color: var(--gris); line-height: 1.4 }
.fi-frase { margin-top: 22px; font-family: "Caveat Brush", cursive; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; color: var(--acento-2); rotate: -2deg; transform-origin: 0 50% }
.fi-datos { display: grid; margin-top: 30px; border-top: 1px solid var(--linea) }
.fi-datos div { display: grid; grid-template-columns: minmax(110px, .5fr) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--linea) }
.fi-datos dt { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); padding-top: 3px }
.fi-datos dd { font-weight: 500; line-height: 1.45 }
.fi-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 96px); align-items: start; margin-top: clamp(64px, 10vh, 120px) }
.fi-cuerpo .prosa { max-width: 70ch }
.fi-lado { display: grid; gap: 36px; position: sticky; top: 100px }
.fi-lado ul { list-style: none; display: grid; gap: 4px; margin-top: 14px }
.fi-aparece a { display: flex; gap: 12px; align-items: baseline; min-height: 44px; padding: 10px 12px; border-radius: 14px; font-weight: 500; line-height: 1.3; transition: background-color .25s }
.fi-aparece a span { font-family: var(--anton); color: var(--acento-texto) }

/* personajes */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px }
.filtro { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--linea); font-size: 14px; font-weight: 600; color: var(--gris); transition: color .25s, border-color .25s, background-color .25s }
.filtro[aria-pressed="true"] { color: var(--fondo); background: var(--tinta); border-color: var(--tinta) }
.buscar { position: relative; margin-left: auto; flex: 0 1 300px }
.buscar input { width: 100%; height: 48px; padding: 0 18px 0 46px; border-radius: 999px; border: 1px solid var(--linea); background: var(--celda); color: var(--tinta); font: inherit; font-size: 16px }
.buscar input::placeholder { color: var(--gris); opacity: 1 }
.buscar svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--gris); stroke-width: 2; stroke-linecap: round; pointer-events: none }
.tf-juego { padding: 0 8px; margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gris) }
.tf-juego .punto { width: 7px; height: 7px }
.nada { padding: 40px 0; color: var(--gris) }

/* 404 */
.perdido { display: grid; justify-items: center; text-align: center; padding-top: clamp(32px, 7vh, 80px) }
.perdido .gigante { font-size: clamp(120px, 26vw, 360px); line-height: .85 }
.perdido p { max-width: 40ch; margin-top: 18px; color: var(--gris); font-size: 18px; line-height: 1.5 }
.perdido .heroe-escriba { width: min(70vw, 260px); margin-top: 8px }

/* escriba */
.escriba-btn { position: relative; display: block; width: 100%; touch-action: manipulation; border-radius: 32px }
.escriba-btn svg { display: block; width: 100%; height: auto; overflow: visible }
.es-tapa { fill: var(--acento) }
.es-lomo { fill: var(--acento-hondo) }
.es-paginas { fill: #efe6d2 }
.es-rayas { stroke: #cbbf9f; stroke-width: 2; stroke-linecap: round }
.es-blanco { fill: #ffffff }
.es-pupila { fill: #111113 }
.es-brillo { fill: #ffffff }
.es-boca { fill: none; stroke: #111113; stroke-width: 4; stroke-linecap: round }
.es-boca-o { fill: #111113; opacity: 0 }
.es-cinta { fill: var(--tinta) }
.es-titulo { fill: color-mix(in srgb, var(--acento-txt) 70%, transparent) }
.es-sombra { fill: #000; opacity: .28 }
:root[data-tema="claro"] .es-sombra { opacity: .12 }
.es-mejilla { fill: #ff8fa8; opacity: .55 }
.toca { position: absolute; left: -6%; top: 6%; font-family: "Caveat Brush", cursive; font-size: clamp(26px, 2.4vw, 34px); color: var(--acento-2); rotate: -10deg; pointer-events: none; line-height: 1 }
.toca svg { display: block; width: 54px; height: 40px; margin: 4px 0 0 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round }
.es-letra { position: absolute; left: 50%; top: 42%; z-index: 2; font-family: var(--anton); font-size: 30px; line-height: 1; color: var(--acento-2); pointer-events: none }

/* hojas (editor) */
.hoja { margin: 0 0 0 auto; width: min(640px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--linea); background: var(--fondo); color: var(--tinta); overflow: hidden; overscroll-behavior: contain }
.hoja[open] { display: grid; grid-template-rows: auto 1fr auto }
.hoja::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s }
.hoja.viva::backdrop { opacity: 1 }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 16px 28px; border-bottom: 1px solid var(--linea) }
.hoja-cab h2 { font-family: var(--anton); font-weight: 400; text-transform: uppercase; font-size: 30px; line-height: 1 }
.cerrar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--boton); flex: none; transition: scale .3s var(--muelle) }
.cerrar:active { scale: .9 }
.cerrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round }
.hoja-cuerpo { overflow-y: auto; padding: 24px 28px 40px; display: grid; gap: 22px; align-content: start; overscroll-behavior: contain }
.hoja-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 14px 28px; border-top: 1px solid var(--linea); padding-bottom: max(14px, env(safe-area-inset-bottom)) }
.hoja-pie .derecha { display: flex; gap: 10px; margin-left: auto }
.hoja-mini { margin: auto; height: auto; max-height: calc(100dvh - 32px); width: min(440px, calc(100vw - 32px)); border: 1px solid var(--linea); border-radius: 24px }
.hoja-mini .hoja-cuerpo { padding-bottom: 28px }

.campo { display: grid; gap: 8px }
.campo > span, .campo legend, .campo-titulo { font-size: 14px; font-weight: 600; color: var(--tinta) }
.campo small, .ayuda { font-size: 13px; color: var(--gris); line-height: 1.5 }
.ayuda code { font-family: ui-monospace, monospace; font-size: 12px; padding: 1px 5px; border-radius: 6px; background: var(--boton); color: var(--tinta) }
.campo input:not([type="file"], [type="radio"], [type="color"], [type="checkbox"]), .campo textarea, .campo select, .fila-dato input, .fila-dato select { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--linea); background: var(--celda); color: var(--tinta); font: inherit; font-size: 16px; line-height: 1.5; transition: border-color .25s }
.campo textarea { min-height: 280px; resize: vertical; font-size: 16px; line-height: 1.65 }
.campo textarea.corta { min-height: 110px }
.campo input:focus-visible, .campo textarea:focus-visible, .campo select:focus-visible, .fila-dato input:focus-visible, .fila-dato select:focus-visible { outline: 2px solid var(--acento-2); outline-offset: 0; border-color: transparent }
.campo select, .fila-dato select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px }
fieldset.campo { border: 0; min-width: 0 }
.herramientas { display: flex; flex-wrap: wrap; gap: 6px }
.herramientas button { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--boton); font-size: 14px; font-weight: 600; transition: scale .16s ease-out }
.herramientas button:active { scale: .94 }
.herramientas button[aria-pressed="true"] { background: var(--tinta); color: var(--fondo) }
.herramientas .lista-menciones { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: 16px; border: 1px solid var(--linea) }
.vista-previa { padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--linea); min-height: 120px }
.pastillas { display: flex; flex-wrap: wrap; gap: 6px }
.pastillas label { position: relative }
.pastillas input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer }
.pastillas span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linea); font-size: 14px; font-weight: 600; color: var(--gris); transition: color .25s, background-color .25s, border-color .25s }
.pastillas input:checked + span { background: var(--tinta); color: var(--fondo); border-color: var(--tinta) }
.pastillas input:focus-visible + span { outline: 2px solid var(--acento-2); outline-offset: 3px }
.muestras { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }
.muestra { position: relative; width: 44px; height: 44px }
.muestra input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100% }
.muestra span { position: absolute; inset: 4px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: inset .35s var(--muelle) }
.muestra input:checked + span { inset: 0; box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--tinta) }
.muestra input:focus-visible + span { outline: 2px solid var(--acento-2); outline-offset: 6px }
.muestra.otro span { background: conic-gradient(#e5243b, #f2b33d, #9bdc3c, #2fd3a7, #3ba3ff, #a45cf6, #ff5fa8, #e5243b) }
.muestra.otro input[type="color"] { opacity: 0 }
.muestra.general span { background: var(--boton); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--tinta) }
.muestra-prueba { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; font-size: 14px; color: var(--gris) }
.muestra-prueba .boton { pointer-events: none }
.campo-img { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center }
.ci-vista { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--boton); border: 1px solid var(--linea); display: grid; place-items: center; color: var(--gris); font-size: 13px }
.ci-vista img { width: 100%; height: 100%; object-fit: cover }
.ci-botones { display: flex; flex-wrap: wrap; gap: 8px }
.ci-botones label { position: relative; overflow: hidden }
.ci-botones input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0 }
.ci-botones label:focus-within { outline: 2px solid var(--acento-2); outline-offset: 3px }
.fila-dato { display: grid; grid-template-columns: 1fr 1.4fr 44px; gap: 8px; align-items: center }
.fila-dato button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--boton) }
.fila-dato button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round }
.lista-filas { display: grid; gap: 8px }
.anadir { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px dashed var(--gris); font-size: 14px; font-weight: 600 }
.aviso { min-height: 1.4em; font-size: 14px; font-weight: 600; color: var(--acento-texto) }
.borrar { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 999px; color: var(--acento-texto); font-weight: 600; font-size: 14px; transition: background-color .25s, color .25s }
.borrar svg { width: 18px; height: 18px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.borrar.seguro { background: var(--acento); color: var(--acento-txt) }
.guardar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round }
.guardar[disabled] { cursor: progress }
.candado { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: var(--boton); color: var(--tinta) }
.candado svg { width: 34px; height: 34px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round }
.candado .cuerpo { fill: currentColor; stroke: none }
.candado.abierto { background: var(--acento); color: var(--acento-txt) }

@media (hover: hover) and (pointer: fine) {
  .migas a:hover { color: var(--tinta) }
  .tarjeta-juego:hover, .tarjeta-ficha:hover, .paso:hover { border-color: var(--gris) }
  .tarjeta-juego:hover .tj-img img, .tarjeta-ficha:hover .tf-img img, .fila > a:hover .fila-img img { scale: 1.04 }
  .fila > a:hover { background: var(--celda) }
  .subnav a:not([aria-current]):hover, .cap-indice a:not([aria-current]):hover { color: var(--tinta) }
  .persona:hover, .fi-aparece a:hover { background: var(--celda) }
  .mencion:hover { text-decoration-color: currentColor }
  .nueva:hover { border-color: var(--tinta); background: var(--celda) }
  .filtro:not([aria-pressed="true"]):hover { color: var(--tinta); border-color: var(--gris) }
  .controles button:not([disabled]):hover, .control:hover { border-color: var(--gris) }
  .pastillas label:hover input:not(:checked) + span { color: var(--tinta); border-color: var(--gris) }
  .borrar:not(.seguro):hover { background: color-mix(in srgb, var(--acento-2) 12%, transparent) }
  .barra-escribir button:hover, .herramientas button:hover, .cerrar:hover, .escribir:hover { filter: brightness(1.15) }
  .campo input:not([type="file"], [type="radio"], [type="color"], [type="checkbox"]):hover, .campo textarea:hover { border-color: var(--gris) }
}

@media (max-width: 1180px) {
  .cap-rejilla { grid-template-columns: 220px minmax(0, 1fr) }
  .cap-gente { grid-column: 2 }
  .cap-gente.cap-lado { position: static }
}

@media (max-width: 960px) {
  .heroe { grid-template-columns: 1fr; min-height: 0 }
  .heroe-escriba { width: min(62vw, 280px); justify-self: end; margin-top: -20px }
  .hj-rejilla, .fi-rejilla, .fi-cuerpo { grid-template-columns: 1fr }
  .hj-portada { order: -1 }
  .fi-retrato { max-width: 520px; width: 100% }
  .fi-lado { position: static }
  .cap-rejilla { grid-template-columns: 1fr; gap: 24px }
  .cap-lado { position: static }
  .cap-gente { grid-column: auto }
  .cap-indice { border: 1px solid var(--linea); border-radius: 20px; background: var(--celda) }
  .cap-indice summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 18px; cursor: pointer; list-style: none; font-weight: 600 }
  .cap-indice summary::-webkit-details-marker { display: none }
  .cap-indice summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: rotate .4s var(--muelle) }
  .cap-indice[open] summary svg { rotate: 180deg }
  .cap-indice > .mini { display: none }
  .cap-indice ol { margin: 0; padding: 0 8px 10px }
  .cap-texto { justify-self: stretch }
}

@media (max-width: 860px) {
  .subnav { top: 68px }
  .marca svg { width: 54px }
  .marca-nombre { font-size: 17px; padding-left: 10px }
  .escribir { width: 48px; padding: 0; justify-content: center }
  .escribir-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
}

@media (max-width: 640px) {
  .fila > a { grid-template-columns: 44px 1fr auto; padding-right: 4px }
  .fila-img { display: none }
  .fila .controles { position: static; translate: none; padding: 0 0 16px 58px }
  .cap-pasos { grid-template-columns: 1fr }
  .paso.sin { display: none }
  .tj-txt { padding: 20px 76px 22px 20px }
  .campo-img { grid-template-columns: 1fr }
  .ci-vista { max-width: 240px }
  .hoja-cuerpo { padding: 20px 16px 32px }
  .hoja-cab { padding-left: 16px }
  .hoja-pie { padding-left: 12px; padding-right: 12px }
  .barra-escribir { left: 16px; right: 16px; translate: none; justify-content: space-between }
  .barra-escribir .be-estado span { display: none }
  .buscar { flex-basis: 100%; margin-left: 0 }
  .fi-datos div { grid-template-columns: 1fr; gap: 4px }
  .toca { left: -14%; top: 0 }
}

@media (prefers-reduced-motion: reduce) {
  .barra-escribir .be-estado i::after { animation: none }
  .tarjeta-juego .tj-img img, .tf-img img, .fila-img img { transition: none }
}
