/* Barra Norte · the public site, including the static reading room. */
:root {
  color-scheme: light;
  --bg: #f7efdf;
  --surface: #fffaea;
  --raised: #e4e6d3;
  --ink: #192f28;
  --soft: #454f43;
  --quiet: #595c4e;
  --accent: #841f26;
  --accent-solid: #8e242b;
  --edge: #c4b695;
  --focus: #235a51;
  --archive-yellow: #ffdc72;
  --archive-light: #ffe599;
  --archive-dark: #252b20;
  --enamel: #f8edda;
  --pine: #173d36;
  --wine: #811f27;
  --gold: #99773c;
  --display: "Plex", "Trebuchet MS", sans-serif;
  --header-height: 3.125rem;
  --navigation-height: 3.65rem;
  --site-gutter: clamp(16px, 4vw, 72px);
}
html { scroll-padding-block-start: calc(var(--navigation-height) + 1rem); }
body { background: var(--bg); color: var(--ink); }
.barra-cabecera {
  width: 100%; margin: 0; min-height: var(--header-height);
  padding: .12rem clamp(1.05rem, 3.5vw, 5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  color: var(--ink); background: linear-gradient(98deg, #f8efdc, #f0dfc0 65%, #faefd9);
}
.barra-marca, .barra-comunidad a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); font-size: clamp(.95rem, 1.3vw, 1.25rem);
  font-weight: 600; text-decoration: none; line-height: 1.15;
}
.barra-marca { font-size: clamp(1.12rem, 1.6vw, 1.65rem); letter-spacing: -.035em; }
.barra-comunidad { display: flex; align-items: center; gap: clamp(.9rem, 2.8vw, 2.8rem); }
.barra-cabecera a:hover { color: var(--wine); text-decoration: underline; text-underline-offset: .23em; }

nav.view-navigation.barra-teclado {
  width: 100%; height: auto; min-height: var(--navigation-height); margin: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  padding: 3px max(5vw, calc((100% - 88rem) / 2)) 4px; align-items: stretch;
  position: sticky; inset-block-start: 0; z-index: 35;
  border: 0; border-top: 1px solid #aa8d55;
  background: linear-gradient(180deg,#ffedc5 0,#bea272 3px,#705538 12%,#b49a6d 75%,#fce5b5 84%,#6c5034 96%,#e0c495 100%);
  box-shadow: 0 2px 3px #55371828;
}
.barra-teclado > .barra-tecla {
  --key-hi: #fff8e4; --key-lo: #efdcba; --key-mid: #f6e8ca;
  position: relative; display:flex; align-items:center; justify-content:center;
  min-height: 3rem; min-width: 0; width: auto; margin: 0; padding: .47em .4em .58em;
  color: var(--ink); font: 600 clamp(.99rem, 1.6vw, 1.52rem)/1.15 var(--font);
  letter-spacing: -.035em; text-align:center; text-decoration:none; white-space: normal;
  border: 1px solid #9a7a48; border-bottom-color: #785f3c;
  border-radius: 17px 17px 4px 4px / 17px 17px 4px 4px;
  background: linear-gradient(176deg, var(--key-hi) 1%, var(--key-mid) 42%, var(--key-lo) 100%);
  box-shadow: inset 0 1px 0 1px #fffbee, inset 3px 0 2px -1px #fcf4d8, inset -3px -1px 2px 0 #b6996e, inset 0 0 0 2px #e6ca90;
  transition: filter .14s ease, box-shadow .14s ease;
}
.barra-teclado > .barra-tecla:first-child { border-top-left-radius: 30px 24px; }
.barra-teclado > .barra-tecla:last-child { border-top-right-radius: 30px 24px; }
.barra-teclado > .barra-tecla-archivo { --key-hi: #fff1a9; --key-mid: #ffde79; --key-lo: #edbe55; }
.barra-teclado > .barra-tecla::after {
  content: ""; position: absolute; bottom: .28rem;
  left: 50%; width: min(45%, 5.4em); height: 3px; border: 0; border-radius: 8px;
  background: currentColor; transform: translateX(-50%) scaleX(0); transform-origin: center;
}
.barra-teclado > .barra-tecla[aria-current="page"]::after { transform: translateX(-50%) scaleX(1); }
@media (hover: hover) {
  .barra-teclado > .barra-tecla:hover { color: #52221a; filter: brightness(1.035); box-shadow: inset 0 1px 0 2px #fff9db, inset -2px -2px 0 #a68b60; }
}
.barra-teclado > .barra-tecla:active { box-shadow: inset 0 2px 4px #78634677, inset 1px 0 2px #bfa475; }
.barra-teclado > .barra-tecla:focus-visible { z-index: 1; outline: 3px solid var(--pine); outline-offset: -6px; }
body .site-footer { color: var(--quiet); font-size: .9rem; }
body .footer-links { flex-wrap: wrap; column-gap: clamp(.9rem, 2.6vw, 2.1rem); }

.page-main, .home-page .workspace[data-view="archive"] {
  width: min(76rem, calc(100% - var(--site-gutter) * 2)); margin-inline: auto;
  padding-block: clamp(1.15rem, 3.5vw, 3rem) 2.5rem;
}
.home-page .workspace[data-view="archive"] { width: 100%; }
.archive-core, .archive-index, .legal-page { max-width: 69rem; }
.archive-reader, .page-main > .archive-entry { max-width: 49rem; margin-inline: auto; }
.page-main .breadcrumbs {
  display: flex; align-items: center; margin: 0 0 1.2rem; gap: .45rem;
  color: var(--quiet); font-size: .89rem; line-height: 1.45;
}
.breadcrumbs a { color: var(--pine); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .23em; }
.breadcrumbs a:hover { color: var(--wine); }
.breadcrumbs [aria-current] { color: var(--ink); }
.archive-core .archive-core-head {
  min-height: 0; margin-bottom: 1.2rem;
  padding: clamp(1.1rem, 2.7vw, 2.3rem) clamp(1.05rem, 3.4vw, 3.15rem);
  column-gap: 1.1rem; row-gap: .27rem;
  border: 1px solid #69837b; border-radius: 3px 28px 4px 4px;
  background: linear-gradient(112deg, #204b41 4%, #315c4d 70%, #466a55);
  color: #fff8e7;
  box-shadow: inset 0 1px 0 #a6bba1, inset 0 -4px 0 #dbc294, inset 0 -6px 0 #74896f;
}
.archive-core-head::after, .archive-directory-head::after { display:none; }
.archive-core .archive-core-head :is(h1,h2) {
  margin: 0; max-width: none; color: #fff6df; font: 600 clamp(2.2rem, 4.65vw, 4.45rem)/1.03 var(--display);
  letter-spacing: -.065em;
}
.archive-core .archive-core-head :is(.panel-kicker,.eyebrow) {
  margin: 0 0 .45rem; color: #f5dfb2; font-size: .87rem; line-height: 1.3; letter-spacing: .025em; text-transform: none;
}
.archive-core .archive-core-head .archive-collection-total, .archive-core .archive-core-head .spoiler-note {
  color: #f8efdb; margin: .4rem 0 0; font-size: .89rem; line-height:1.45;
}
/* Los espacios internos agrupan una etiqueta con su control. Los mayores
   separan el buscador de la colección a la que afecta. */
.archive-core .archive-tools {
  gap: var(--bn-espacio-3) var(--bn-espacio-4);
  margin-block: 0 var(--bn-entre-secciones);
}
.archive-core .archive-search-control > label { margin-block-end: var(--bn-espacio-2); }
.archive-core .search-field { min-width: 0; }
.archive-search-control .search-field {
  min-height: 50px; border: 1px solid #8a795c; border-radius: 9px;
  color: var(--pine); background: #fffbef; box-shadow: inset 0 1px 3px #5d44281c;
}
.archive-search-control .search-field input { min-height: 48px; color: var(--ink); background: transparent; }
.archive-search-control .search-field input::placeholder { color: #62685b; }
.archive-search-control .search-field:focus-within { outline: 2px solid var(--focus); border-color: var(--focus); }
.archive-tools .archive-random, .archive-more, .archive-filter-controls > summary, .archive-empty button {
  color: var(--ink); border: 1px solid #937c50; background: #f5e9d2; border-radius: 8px;
  font-size: .94rem;
}
.archive-tools .archive-random { font-weight: 600; }
@media (min-width: 641px) {
  body .archive-core .archive-tools .archive-random { min-height: 50px; }
}
.archive-tools .archive-random:hover, .archive-more:hover, .archive-filter-controls > summary:hover, .archive-filter-controls[open] > summary, .archive-empty button:hover {
  color: var(--pine); border-color: var(--pine); background: #e3e7d5;
}
.archive-filter-controls > summary::after { border-color: var(--pine); }
.archive-filter-fields { border-color: var(--edge); background: var(--surface); box-shadow: 0 8px 26px #493b2626; }
.archive-filter-fields select { background: #fffaf0; color: var(--ink); border-color: #827252; }
.archive-core .archive-results-head {
  column-gap: var(--bn-espacio-4);
  row-gap: var(--bn-espacio-2);
  padding-block-end: var(--bn-espacio-3);
  margin-block: 0 var(--bn-espacio-4);
  border-color: var(--edge);
}
.archive-core .archive-results-label { gap: var(--bn-espacio-1) var(--bn-espacio-3); }
.archive-core .archive-filter-fields { top: 100%; }
.archive-core .archive-filter-fields select { max-width: 100%; }
.archive-core .archive-result-card { min-width: 0; overflow-wrap: anywhere; }
.archive-core .archive-result-link:focus-visible::after { border-radius: var(--bn-radio-ficha); }
.archive-results-label h2, .archive-results-label h3 { font: 600 1.52rem/1.1 var(--font); letter-spacing: -.055em; }
.archive-results-actions button { color: var(--wine); }
.archive-results-head .archive-results-count { color: var(--soft); }
.archive-results-grid { gap: var(--bn-espacio-4); }
.archive-result-card {
  --bn-radio-ficha: 3px 17px 3px 3px;
  min-height: 8rem; padding: .95rem 1.2rem 1.1rem;
  background: linear-gradient(112deg, #fff9e9, #fbf3e2);
  border: 1px solid #c9bb9a; border-radius: var(--bn-radio-ficha);
  box-shadow: inset 0 -2px 0 #d9cdb355; color: var(--ink);
}
.archive-result-card:hover, .archive-result-card:focus-within, .archive-result-card:focus-visible {
  border-color: #738775; background: #edf0df; color: var(--pine); transform: none;
}
.archive-result-card .archive-result-section {
  color: var(--wine); font-size: .8rem; letter-spacing:.025em; line-height:1.35;
  font-weight:600; text-transform: none;
}
.archive-result-card strong { color: var(--ink); font: 600 clamp(1.25rem, 2vw, 1.64rem)/1.12 var(--display); letter-spacing: -.045em; }
.archive-result-card p { color: var(--soft); }
.archive-result-link:focus-visible::after { outline-color: var(--focus); }
.archive-result-mention summary, .archive-index-access a, .archive-fallback a { color: var(--wine); }
.archive-result-card mark { background: #f8dd8b; color: #3a3721; }
.archive-index-access a, .archive-fallback a { text-decoration: underline; text-underline-offset: .22em; border-bottom:0; }
.archive-empty, .archive-fallback { background: var(--surface); }

.archive-index .entry-head:not(.archive-core-head), .archive-entry > .entry-head, .legal-head {
  padding: 0 0 clamp(1rem,2.4vw,1.8rem); margin: 0 0 1.4rem; border-bottom: 3px double #a89060;
}
.archive-index .entry-head:not(.archive-core-head) h1, .archive-entry > .entry-head :is(h1,h2), .legal-page h1 {
  font: 600 clamp(2.4rem, 5.2vw, 4.65rem)/1.025 var(--display);
  color: var(--pine); letter-spacing: -.063em; margin: 0; max-width: 26ch;
}
.archive-section-total { font-size: .95rem; margin: .55rem 0 0; color: var(--quiet); }
.archive-section-jumps {
  display:flex; flex-wrap:wrap; gap:.3rem 1.25rem; margin-bottom: 2rem;
}
.archive-section-jumps a { display:inline-flex; align-items:center; min-height:44px; text-decoration:underline; text-underline-offset:.2em; color:var(--wine); }
.archive-group { scroll-margin-block-start: 1rem; }
.archive-group h2 { font: 600 clamp(1.4rem,2.5vw,2.05rem)/1.2 var(--display); letter-spacing:-.043em; color:var(--pine); }
.archive-group h2 a:hover { text-decoration:underline; text-underline-offset:.2em; }
.archive-list .archive-row { border-color:var(--edge); padding-inline: .5rem; }
.archive-list .archive-row:hover { background:#ebe5d3; color:var(--pine); }
.archive-entry, .legal-grid { max-width: 49rem; }
.archive-entry .entry-body, .archive-entry .entry-related, .archive-entry .entry-subtitle { color:var(--ink); }
.entry-meta { color:var(--quiet); font-size:.9rem; }
.entry-body, .entry-subtitle, .entry-related { font-size:clamp(1.04rem,1.6vw,1.18rem); }
.entry-body a, .entry-related a, .legal-item a { color:var(--wine); }
.spoiler-gate > summary { color:var(--pine); background:#e2e8d7; border-color:#97ab91; border-radius:6px 17px 6px 6px; font-size:.99rem; font-weight:600; }
.spoiler-gate > summary:hover { background:#d7e2ca; }
.legal-head > p { margin-top:.8rem; }
.legal-item { border-color: var(--edge); }
.legal-label, .entry-related h2 { color:var(--pine); font-weight:600; }
#main .reader-toolbar { font-size: .93rem; }
.archive-reader .reader-toolbar {
  flex-wrap: wrap;
  gap: var(--bn-espacio-2) var(--bn-espacio-4);
  padding-bottom: var(--bn-espacio-4);
}
.archive-reader .reader-toolbar :is(button, a) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: .45rem .7rem;
  gap: var(--bn-espacio-2);
  color: var(--pine);
  background: #fff8e8;
  border: 1px solid #938260;
  border-radius: .53rem;
  text-decoration: none;
  text-align: start;
  line-height: 1.35;
}
.archive-reader .reader-toolbar :is(button, a) span {
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
}
.archive-reader .reader-toolbar :is(button, a):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) {
  .archive-reader .reader-toolbar :is(button, a):hover { background: #e5e9d8; border-color: var(--pine); }
}
.archive-reader .reader-toolbar :is(button, a):active { background: #d6dfc9; }
.reader-toolbar .icon { color: var(--wine); flex: none; }
@media (max-width: 740px) {
  :root { --site-gutter: 1rem; --navigation-height: 3.25rem; }
  nav.view-navigation.barra-teclado { gap: 0; padding: 2px .4rem 3px; grid-template-columns: .92fr 1.42fr .84fr; }
  .barra-teclado > .barra-tecla { font-size: clamp(.91rem, 3.5vw, 1.1rem); min-height: 2.9rem; border-radius: 12px 12px 3px 3px; }
  .barra-teclado > .barra-tecla:first-child { border-top-left-radius: 19px; }
  .barra-teclado > .barra-tecla:last-child { border-top-right-radius: 19px; }
  .barra-comunidad { gap: .95rem; }
  .page-main .breadcrumbs { margin-bottom: .65rem; line-height: 1.3; }
  .archive-core .archive-core-head { padding:.85rem 1rem 1rem; margin-bottom:.55rem; }
  .archive-core .archive-core-head :is(h1,h2) { font-size: clamp(2.05rem, 8.5vw, 3rem); }
  .archive-core .archive-core-head .spoiler-note { margin-top:.2rem; max-width: none; text-align:left; }
  .archive-result-card { min-height: 0; padding: var(--bn-espacio-4); }
  .archive-results-grid { gap: var(--bn-espacio-3); }
}
@media (max-width: 640px) {
  .archive-core .archive-search-control > label { margin: 0; }
  .archive-tools .archive-random { min-height:44px; border:0; background:transparent; color:var(--wine); padding:0 .2rem; }
}
@media (max-width: 420px) {
  .barra-cabecera { min-height:44px; gap:.65rem; padding:0 .9rem; }
  .barra-marca { font-size:1.05rem; }
  .barra-comunidad a { font-size:.9rem; }
}
@media (prefers-reduced-motion: reduce) { .barra-teclado > .barra-tecla { transition:none; } }
@media print {
  .barra-cabecera, .barra-teclado { display:none !important; }
  .archive-core .archive-core-head { color:#17221e; background:#fff; box-shadow:none; border:0; }
  .archive-core .archive-core-head :is(h1,h2,.eyebrow,.archive-collection-total,.spoiler-note) { color:#17221e; }
}

/* Marco común · v17 */
/* Barra Norte / v17. Cabecera y pie siguen el mismo eje que los controles de la obra. */
:root {
  --bn-ancho: 74rem;
  --bn-margen: clamp(1rem, 4vw, 4.5rem);
  --bn-contenido: min(var(--bn-ancho), calc(100% - 2 * var(--bn-margen)));
  --bn-riel: linear-gradient(180deg, #322c23 0%, #a6906b 12%, #ffffeb 23%, #c5bb9f 38%, #737267 53%, #282f2a 61%, #a09472 76%, #f9e3b2 88%, #74664d 100%);
  --bn-esmalte: #153b34;
  --bn-porcelana: #fff4d9;
  --bn-tipo: "Plex", system-ui, sans-serif;
  --bn-borde-pagina: max(var(--bn-margen), calc((100% - var(--bn-ancho)) / 2));
}
.barra-cabecera {
  min-height: 3.65rem;
  padding: .23rem var(--bn-borde-pagina);
  gap: 1.15rem;
  color: #fff5df;
  background: linear-gradient(118deg, #142f29 5%, #1c3c34 58%, #16332e);
  box-shadow: inset 0 -1px #8f8e71;
}
.barra-marca {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  align-self: center;
  width: fit-content;
  min-height: 44px;
  min-width: 0;
  gap: .57rem;
  line-height: 1;
  white-space: nowrap;
}
.barra-cabecera a.barra-marca, .bn-pie a.barra-marca {
  color: #fff3da;
  text-decoration: none;
  border: 0;
}
.barra-cabecera .bn-firma, .bn-pie .bn-firma {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.bn-firma {
  font: 600 clamp(1.08rem, 1.45vw, 1.43rem)/1.12 var(--bn-tipo);
  letter-spacing: -.05em;
}
/* Sede reservada al futuro logotipo. La superficie 32 × 30 no cambia al sustituir el monograma. */
.bn-insignia {
  display: inline-grid;
  place-content: center;
  flex: none;
  box-sizing: border-box;
  width: 2rem;
  height: 1.875rem;
  padding: 0 .11em .13em 0;
  color: #173c34;
  background: linear-gradient(140deg, #fff5d8, #e0ce9f);
  border: 1px solid #e4d3ad;
  border-radius: 47% 25% 44% 24%;
  box-shadow: inset 0 -2px 0 #b5a477, 0 1px 2px #071a1755;
  font: italic 700 1.17rem/1 Georgia, "Times New Roman", serif;
  letter-spacing: -.14em;
}
.barra-comunidad {
  display: flex;
  flex: none;
  align-items: center;
  gap: .48rem;
}
.barra-comunidad a {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .43rem;
  min-height: 44px;
  padding: .5rem .85rem;
  color: #f3ead6;
  text-decoration: none;
  font: 500 .9rem/1.1 var(--bn-tipo);
}
.barra-comunidad a::before {
  content: "";
  position: absolute;
  inset: .28rem 0;
  z-index: -1;
  border: 1px solid #82907b;
  border-radius: .75rem .22rem .75rem .22rem;
  background: #d3ddc60a;
  box-shadow: inset 1px 0 #ddd5b829;
  transition: background-color .15s, border-color .15s;
}
.barra-comunidad a::after, .bn-pie-enlaces a[target="_blank"]::after {
  content: "";
  display: inline-block;
  flex: none;
  width: .44rem;
  height: .44rem;
  color: #cbcfb8;
  border-top: 1px solid;
  border-right: 1px solid;
  background: linear-gradient(135deg, transparent 44%, currentColor 45% 55%, transparent 56%);
}
@media (hover: hover) {
  .barra-cabecera a.barra-marca:hover, .bn-pie a.barra-marca:hover {
    color: #fff8f1;
    text-decoration: none;
  }
  .barra-marca:hover .bn-insignia { background: #fff5d5; }
  .barra-cabecera .barra-comunidad a:hover { color: #fff8e6; text-decoration: none; }
  .barra-comunidad a:hover::before { background: #37574a; border-color: #d1c6a2; }
}
.barra-cabecera .barra-comunidad a:active { color: #fff6db; }
.barra-comunidad a:active::before { background: #0c2621; box-shadow: inset 0 1px 3px #001c16; }
.barra-marca:active .bn-insignia { box-shadow: inset 0 1px 2px #83744d; }
.barra-cabecera a:focus-visible, .bn-pie a:focus-visible {
  outline: 2px solid #ffdb91;
  outline-offset: 3px;
  border-radius: 3px;
}

/* El bisel dibuja por separado el contorno de cada tecla, incluidas las esquinas. */
nav.view-navigation.barra-teclado {
  --bn-base-tecla: .54rem;
  --bn-solape: 1.32rem;
  isolation: isolate;
  width: 100%;
  height: auto;
  min-height: 3.65rem;
  column-gap: 2px;
  padding: 0 var(--bn-borde-pagina) var(--bn-base-tecla);
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 0;
  background: #193b33;
  box-shadow: none;
}
#barra-escena:not([hidden]):not([inert]) + nav.barra-teclado {
  margin-block-start: calc(-1 * var(--bn-solape));
  background: linear-gradient(180deg, transparent var(--bn-solape), #193b33 var(--bn-solape));
}
nav.barra-teclado::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px var(--bn-borde-pagina) var(--bn-base-tecla);
  border-radius: 1.3rem 1.3rem 0 0;
  background: #282e27;
}
nav.barra-teclado::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--bn-base-tecla);
  pointer-events: none;
  background:
    linear-gradient(101deg, transparent 2%, #fff8d857 12%, transparent 20%, #5a5e572f 39%, #fffadf77 62%, transparent 68%),
    var(--bn-riel);
  box-shadow: 0 2px 3px #211d1a42;
}
.barra-teclado > a.barra-tecla {
  --bn-key-top: #fffaf0;
  --bn-key-light: #f8eed9;
  --bn-key-edge: #d5c6a6;
  --bn-key-foot: #eee1c4;
  --bn-lente: #a7a78a;
  min-height: 3.23rem;
  min-width: 0;
  gap: .52rem;
  align-items: center;
  padding: .54rem .4rem;
  border: 3px solid transparent;
  border-bottom-width: 2px;
  border-radius: .96rem .96rem .29rem .29rem;
  background:
    linear-gradient(114deg, transparent 6%, #fff7dc35 14%, transparent 25%) padding-box,
    linear-gradient(174deg, var(--bn-key-top), var(--bn-key-light) 49%, var(--bn-key-edge) 80%, var(--bn-key-foot) 100%) padding-box,
    linear-gradient(119deg, #605238 0%, #d2b37f 6%, #fffbe6 11%, #9a8d70 17%, #ece6d4 29%, #a4947b 48%, #fff6cd 62%, #af9a74 67%, #574e40 81%, #d5c7a2 95%, #ffefbf 100%) border-box;
  box-shadow:
    inset 0 1px 1px #ffffedb3,
    inset 1px 0 1px #fff5dc88,
    inset -1px -2px 2px #71594170,
    0 1px 1px #1c201c88;
  color: #263d32;
  font: 600 clamp(.98rem, 1.36vw, 1.24rem)/1.14 var(--bn-tipo);
  letter-spacing: -.025em;
  text-shadow: 0 1px #fffff378;
  transition: color .14s, box-shadow .14s;
}
.barra-teclado > a.barra-tecla:first-child { border-top-left-radius: 1.42rem; }
.barra-teclado > a.barra-tecla:last-child { border-top-right-radius: 1.42rem; }
.barra-teclado > a.barra-tecla::before {
  content: "";
  flex: none;
  width: .48rem;
  height: .48rem;
  border-radius: 50%;
  border: 1px solid #796f57;
  background: var(--bn-lente);
  box-shadow: inset 0 1px 1px #343b2f80, 0 1px #fff3ca9c;
}
.barra-teclado > a.barra-tecla::after { content: none; }
.barra-teclado > a.barra-tecla:is([aria-current="page"],[aria-current="location"]) {
  --bn-key-top: #456b5e;
  --bn-key-light: #32584c;
  --bn-key-edge: #224437;
  --bn-key-foot: #395c4d;
  --bn-lente: #ffdb8d;
  color: #fff5dc;
  text-shadow: 0 1px #1d362b;
  box-shadow: inset 0 2px 3px #102e25a8, inset 0 -1px 1px #cdd7b27a;
}
.barra-teclado > a.barra-tecla:is([aria-current="page"],[aria-current="location"])::before {
  border-radius: 3px;
  border-color: #655735;
  box-shadow: 0 0 0 1px #ccbb8673, 0 0 6px #ffdc883b;
}
@media (hover: hover) {
  .barra-teclado > a.barra-tecla:hover {
    --bn-key-top: #fff8df;
    --bn-key-light: #f3dfb3;
    --bn-key-edge: #d6bb84;
    --bn-key-foot: #ead2a0;
    color: #493c21;
    filter: none;
  }
  .barra-teclado > a.barra-tecla:is([aria-current="page"],[aria-current="location"]):hover {
    --bn-key-top: #4a7464;
    --bn-key-light: #3c6554;
    --bn-key-edge: #365646;
    --bn-key-foot: #436b59;
    color: #fff9e6;
  }
}
.barra-teclado > a.barra-tecla:active {
  box-shadow: inset 0 3px 4px #55452e8a, inset 1px 0 2px #594d3b52;
}
.barra-teclado > a.barra-tecla:focus-visible {
  outline: 2px dashed #293f35;
  outline-offset: -7px;
  z-index: 1;
}
.barra-teclado > a.barra-tecla:is([aria-current="page"],[aria-current="location"]):focus-visible { outline-color: #ffedc5; }

/* Mantener el pie al final de la ventana en las secciones de texto breve. */
body:has(> .bn-pie) {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body:has(> .bn-pie) > main { flex-grow: 1; }
body .site-footer.bn-pie {
  position: relative;
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: start;
  gap: 1rem clamp(2.2rem, 6vw, 6rem);
  margin: 0;
  padding: clamp(2.1rem, 4vw, 3.8rem) var(--bn-borde-pagina) clamp(2.2rem, 4vw, 4rem);
  background: #193b33;
  color: #e9e5d3;
  border: 0;
}
.bn-pie::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(#958769, #e9dbba, #575e4f);
}
.bn-pie .bn-pie-firma p {
  margin: .55rem 0 0;
  font: 400 .86rem/1.45 var(--bn-tipo);
  color: #d1d1b9;
}
.bn-pie .barra-marca { max-width: 100%; }
.bn-pie-enlaces {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-content: start;
  overflow-wrap: anywhere;
}
.bn-pie-enlaces > span {
  margin-bottom: .35rem;
  color: #c8cbb1;
  font: 600 .79rem/1.45 var(--bn-tipo);
  letter-spacing: .06em;
}
.bn-pie-enlaces a {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: .52rem;
  min-height: 44px;
  color: #fff4db;
  font: 500 .97rem/1.25 var(--bn-tipo);
  text-decoration: none;
}
.bn-pie-enlaces a:hover { color: #ffe4a8; text-decoration: underline; text-underline-offset: .24em; }
@media (max-width: 740px) {
  nav.view-navigation.barra-teclado {
    --bn-base-tecla: .42rem;
    --bn-solape: .65rem;
    min-height: 3.23rem;
    column-gap: 1px;
    grid-template-columns: .9fr 1.48fr .78fr;
  }
  .barra-teclado > a.barra-tecla {
    min-height: 2.85rem;
    gap: .32rem;
    padding: .5rem .16rem;
    font-size: clamp(.86rem, 3vw, 1.05rem);
  }
  .barra-teclado > a.barra-tecla::before { width: .36rem; height: .36rem; }
  body .site-footer.bn-pie {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(7.5rem, 45%)), 1fr));
    gap: 1.35rem 1rem;
  }
  .bn-pie-firma { grid-column: 1 / -1; }
  .bn-pie .bn-pie-firma p { margin-top: .2rem; }
}
@media (max-width: 440px) {
  .barra-cabecera { min-height: 3.15rem; padding: 0 var(--bn-borde-pagina); flex-wrap: wrap; gap: 0 .35rem; }
  .barra-cabecera .barra-comunidad { margin-inline-start: auto; }
  .barra-cabecera .barra-marca { gap: .42rem; }
  .barra-cabecera .bn-insignia { width: 1.68rem; height: 1.63rem; font-size: 1.03rem; }
  .barra-cabecera .bn-firma { font-size: 1.01rem; }
  .barra-comunidad { gap: .26rem; }
  .barra-cabecera .barra-comunidad a { padding-inline: .43rem; font-size: .79rem; }
  .barra-comunidad a::after { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .barra-escena[data-animar] + nav.barra-teclado { transition: margin-block-start 440ms cubic-bezier(.33,.03,.17,1); }
}
@media (prefers-reduced-motion: reduce) {
  .barra-comunidad a::before, .barra-teclado > a.barra-tecla { transition: none; }
}
@media (forced-colors: active) {
  .bn-insignia, .barra-comunidad a::before, .barra-teclado > a.barra-tecla { border: 1px solid ButtonText; }
  .barra-teclado > a.barra-tecla:is([aria-current="page"],[aria-current="location"]) { border: 3px double Highlight; text-decoration: underline; }
  .barra-teclado > a.barra-tecla:focus-visible { outline: 2px dashed Highlight; }
  .barra-teclado > a.barra-tecla::before { display: none; }
}
@media print {
  .barra-cabecera, nav.view-navigation.barra-teclado, body .site-footer.bn-pie { display: none; }
}

/* Salas · v17 */
/* Sala de escucha, buscador y lectura. El escenario es panorámico y los
   mandos, la lista y los pies se componen sobre una única caja editorial. */
:root {
  --bn-mesa: min(var(--bn-ancho, 76rem), calc(100% - 2 * var(--bn-margen, clamp(1rem, 4vw, 4rem))));
  --bn-espacio-1: .25rem;
  --bn-espacio-2: .5rem;
  --bn-espacio-3: .75rem;
  --bn-espacio-4: 1rem;
  --bn-espacio-6: 1.5rem;
  --bn-espacio-8: 2rem;
  --bn-aire-seccion: clamp(2rem, 4vw, 3.5rem);
  --bn-bajo-encabezado: var(--bn-espacio-6);
  --bn-entre-secciones: var(--bn-espacio-8);
  --bn-texto: #203d34;
  --bn-laton-linea: #b7a982;
  --bn-titulo: clamp(2.5rem, 4.35vw, 4.3rem);
}
@media (min-width: 768px) {
  :root {
    --bn-bajo-encabezado: var(--bn-espacio-8);
    --bn-entre-secciones: 2.5rem;
  }
}
.barra-home #view-stage, .barra-home #workspace > .barra-reproductor:not(.is-floating), body .page-main {
  width: var(--bn-mesa);
  max-width: none;
  margin-inline: auto;
  box-sizing: border-box;
}
.barra-home #view-stage, body .page-main {
  padding: var(--bn-aire-seccion) 0 clamp(2rem, 4.9vw, 4.6rem);
}
.barra-home #workspace > .barra-reproductor:not(.is-floating) {
  padding: var(--bn-aire-seccion) 0 0;
  background: none;
  border: none;
  box-shadow: none;
}
.barra-home #workspace[data-view="listen"] > #view-stage {
  padding-top: clamp(1.45rem, 3vw, 2.45rem);
}
.barra-home .novel-panel, .barra-home .archive-browser, .page-main > :is(.archive-core, .archive-index, .legal-page) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.barra-home .archive-reader, .page-main > .archive-entry {
  width: min(100%, 49rem);
  margin-inline: auto;
}
.page-main > .archive-entry .entry-body { overflow-wrap: anywhere; }

/* El mismo titular, el mismo ancho de trazo y la misma línea inferior en
   Escuchar, Archivo, Novela y las páginas que genera el servidor. */
body .bn-encabezado,
.barra-home .novel-panel .bn-encabezado,
.archive-core .archive-core-head.bn-encabezado,
.archive-index .entry-head.bn-encabezado,
.archive-entry > .entry-head.bn-encabezado {
  display: block;
  position: relative;
  min-height: 0;
  border: 0;
  border-bottom: 1px solid var(--bn-laton-linea);
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--bn-texto);
  padding: 0 0 var(--bn-espacio-4);
  margin: 0 0 var(--bn-bajo-encabezado);
  overflow: visible;
}
body .bn-encabezado::after { display: none; }
body .bn-encabezado :is(h1, h2),
.barra-home .novel-panel .bn-encabezado h2,
.archive-core .bn-encabezado.archive-core-head :is(h1, h2),
.archive-index .entry-head.bn-encabezado h1,
.archive-entry > .entry-head.bn-encabezado :is(h1, h2),
.legal-page .bn-encabezado h1 {
  position: static;
  color: var(--bn-texto);
  margin: 0;
  max-width: 33ch;
  font: 500 var(--bn-titulo)/1.075 var(--font, "Plex", sans-serif);
  letter-spacing: -.052em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.barra-home #selected-title:focus, .barra-home #novel-title:focus, .barra-home #archive-title:focus { outline: none; }
body .archive-core .archive-core-head.bn-encabezado {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem 1.2rem;
  align-items: end;
}
body .archive-core .bn-encabezado .archive-collection-total,
body .archive-core .bn-encabezado .spoiler-note,
.archive-section-total, .legal-page .bn-encabezado p {
  color: #4a5749;
  font: 400 .98rem/1.5 var(--font);
  letter-spacing: normal;
  max-width: none;
}
body .archive-core .bn-encabezado .archive-collection-total { margin: var(--bn-espacio-2) 0 0; }
body .archive-core .bn-encabezado .spoiler-note {
  grid-column: 2;
  grid-row: 1 / span 3;
  max-width: 27ch;
  align-self: end;
  margin: 0;
  padding: 0 0 0 .72rem;
  border-inline-start: 2px solid #a68c56;
  text-align: start;
  font-size: .89rem;
}
.legal-page .bn-encabezado p { margin: .65rem 0 0; }
.barra-home .novel-panel .novel-content { padding: .2rem 0 2rem; }
.barra-home .novel-community { max-width: 48ch; font-size: clamp(1.08rem, 1.9vw, 1.3rem); }
.barra-home .novel-community .secondary-button {
  min-height: 44px;
  padding: .7rem 1.15rem;
  background: #2d594a;
  border: 1px solid #214938;
  border-radius: .38rem;
  color: #fff8e4;
}

/* Un solo aparato. El pulsador de baquelita, el dial y la rejilla se
   dibujan en CSS y escalan como piezas del mismo frontal. */
.bn-consola {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #304f43;
  border-radius: 1.25rem 1.25rem .75rem .75rem;
  background: #20493e;
  color: #fff7df;
  box-shadow: 0 2px 0 #e7d8b8, 0 3px 0 #b0a381;
}
.bn-transporte {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(3rem, 1fr) auto;
  align-items: center;
  column-gap: clamp(1rem, 4vw, 4.5rem);
  padding: clamp(1.25rem, 2.9vw, 2.5rem) clamp(1.25rem, 3.6vw, 3.1rem);
  background:
    linear-gradient(168deg, #70a68e30, transparent 38%),
    linear-gradient(110deg, #335e4e, #245044 52%, #183d34);
  border-radius: inherit;
  box-shadow: inset 0 1px 0 #99b29a, inset 0 -3px 0 #173c31;
}
.bn-transporte::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  display: block;
  justify-self: center;
  width: min(100%, 20rem);
  height: 2.1rem;
  opacity: .63;
  background: repeating-linear-gradient(0deg, #172f28 0 1px, #87a190 1px 2px, transparent 2px 5px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14% 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14% 86%, transparent);
  pointer-events: none;
}
.bn-transporte .barra-escuchar {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  gap: clamp(.7rem, 1.5vw, 1.15rem);
  min-height: 54px;
  padding: 0 .2rem 0 0;
  background: transparent;
  border: none;
  border-radius: 3rem .4rem .4rem 3rem;
  color: #fff7df;
  font: 500 clamp(1.08rem, 1.65vw, 1.43rem)/1.26 var(--font);
  text-align: start;
  letter-spacing: -.025em;
}
.bn-transporte .barra-play {
  flex: 0 0 auto;
  width: clamp(3.55rem, 5vw, 4.55rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #21382b;
  color: #224d3e;
  background:
    radial-gradient(ellipse at 30% 15%, #fffcefbb 0, transparent 58%) padding-box,
    linear-gradient(155deg, #f8edc9, #e0d2ac 70%, #efdfb9) padding-box;
  box-shadow: inset 0 0 0 1px #fff3cc, inset 0 -3px 1px #af9a74,
              0 0 0 2px #99ac93, 0 0 0 3px #294b3c, 0 4px 5px #122c2566;
}
.bn-transporte .barra-play::before { border-block-width: .54rem; border-inline-start-width: .9rem; }
@media (hover: hover) {
  .bn-transporte .barra-escuchar:hover { color: #fff; }
  .bn-transporte .barra-escuchar:hover .barra-play {
    color: #173a2e;
    background: linear-gradient(140deg, #fffcea, #f1e4ba);
    box-shadow: inset 0 -2px 2px #b19d75, 0 0 0 2px #d2dec2, 0 0 0 3px #294b3c, 0 4px 6px #122c2588;
  }
}
.bn-transporte .barra-escuchar:active .barra-play {
  transform: translateY(1px);
  box-shadow: inset 1px 2px 3px #9f8c62, 0 0 0 2px #9caa89;
}
.bn-transporte .barra-escuchar:focus-visible { outline: 2px solid #fff4cb; outline-offset: 6px; }
.bn-esfera {
  grid-column: 3;
  grid-row: 1;
  padding: .62rem 1rem .7rem;
  min-width: 8.25rem;
  text-align: center;
  border: 1px solid #13382c;
  border-radius: .6rem;
  background: linear-gradient(165deg, #162e26, #203b31);
  box-shadow: inset 0 2px 4px #0f271c88, 0 1px 0 #70927a;
}
.bn-etiqueta-tiempo {
  display: block;
  color: #d3ddc8;
  font: 500 .75rem/1.25 var(--font);
  letter-spacing: .045em;
}
.bn-esfera .barra-duracion {
  display: block;
  margin-top: .11rem;
  padding: 0;
  color: #fff0c1;
  border: 0;
  font: 500 clamp(1.18rem, 2vw, 1.61rem)/1.18 var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
}
.barra-home .barra-embed {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  width: 100%;
}
.barra-home .barra-embed iframe {
  display: block;
  width: 100%;
  height: 200px;
  border: none;
  border-radius: 0;
  background: transparent;
  color-scheme: light;
}
.barra-home .barra-reproductor.has-player .bn-consola {
  border-radius: .38rem;
  background: #29584e;
  border-color: #244b42;
  box-shadow: none;
}
.barra-home .has-player .bn-transporte { display: none; }
.barra-home .barra-controles {
  display: flex;
  width: 100%;
  gap: .25rem 1.25rem;
  flex-wrap: wrap;
  margin: .65rem 0 0;
  color: #465348;
  font-size: .93rem;
}
.barra-home .barra-privacidad a, .barra-home .barra-externo {
  color: #315645;
  text-underline-offset: .2em;
}
.barra-home .barra-privacidad a:hover, .barra-home .barra-externo:hover { color: #77262b; }
.barra-home .barra-externo { display: inline-flex; align-items: center; min-height: 44px; }
.barra-home .barra-pasos { gap: .25rem; margin-inline-start: auto; color: #334e40; }
.barra-home .barra-pasos button {
  width: 44px;
  height: 44px;
  color: #254c3c;
  border: 1px solid #abac90;
  border-radius: 50%;
  background: linear-gradient(160deg, #fdf7e7, #e9dfc8);
  box-shadow: inset 0 1px 0 #fff8e6;
}
.barra-home .barra-pasos button:disabled {
  color: #828578;
  border-color: #d2cbb8;
  background: transparent;
  box-shadow: none;
}
.barra-home .barra-pasos button:not(:disabled):hover { color: #fff5d9; background: #305845; }
.barra-home .barra-pasos > span { min-width: 3.8rem; text-align: center; }
.barra-home .workspace .barra-reproductor.is-floating {
  background: #f7efdf;
  padding-inline: 1rem;
  color: var(--bn-texto);
}
.barra-home .is-floating .bn-encabezado { margin-bottom: .85rem; padding-bottom: .65rem; }
.barra-home .is-floating .bn-encabezado h2 { font-size: 1.55rem; }
.barra-home .is-floating .barra-controles { gap: .25rem .65rem; }
.barra-home .is-floating .barra-pasos { gap: 0; }
.barra-home .is-floating .barra-pasos > span { min-width: 3.3rem; }
@media (max-width: 680px) {
  body .archive-core .archive-core-head.bn-encabezado { display: block; }
  body .archive-core .bn-encabezado .spoiler-note { max-width: none; margin-top: var(--bn-espacio-2); }
  .bn-transporte { grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; }
  .bn-esfera { grid-column: 2; min-width: 0; }
  .bn-transporte::before { display: none; }
  .barra-home .barra-controles { gap: 0 .65rem; }
  .barra-home .barra-privacidad { flex-basis: 100%; }
}
@media (max-width: 430px) {
  .bn-transporte { padding: 1rem .78rem; gap: .45rem; }
  .bn-transporte .barra-escuchar { gap: .55rem; font-size: 1.02rem; }
  .bn-transporte .barra-play { width: 2.85rem; }
  .bn-esfera { padding: .54rem .63rem; }
  .bn-esfera .barra-duracion { font-size: 1.04rem; }
  .bn-etiqueta-tiempo { font-size: .72rem; }
}
@media (forced-colors: active) {
  .bn-transporte .barra-escuchar, .bn-transporte .barra-play, .bn-esfera { border: 1px solid ButtonText; }
  .bn-transporte .barra-play::before { forced-color-adjust: none; color: ButtonText; }
  .bn-transporte::before { display: none; }
}

/* El primer episodio tiene un enlace real desde el primer renderizado. El
   reproductor integrado toma su sitio cuando los datos y los controles existen. */
.bn-transporte .bn-play-directo { text-decoration: none; }
#activate-player:not([hidden]) + .bn-play-directo,
.barra-reproductor.has-player .bn-play-directo { display: none; }
.barra-home:not(.is-enhanced) #episode-external { display: none; }
.barra-home:not(.is-enhanced) .barra-controles:has([hidden]#player-privacy) { margin: 0; }
#inicio { scroll-margin-top: 0; }

/* En WebKit y otros motores modernos las anclas eligen una sala aun si el
   visor descarta los scripts. Las URL compartidas y Atrás funcionan de forma
   nativa. El archivo de lectura también admite destinos dentro del directorio. */
@supports selector(body:has(:target)) {
  .barra-home:not(.is-enhanced) :is(#archive-browser, #novel-panel) {
    display: none;
  }
  .barra-home:not(.is-enhanced):has(:is(#escuchar, #archivo, #novela, #bn-directorio, [id^="bn-grupo-"], [id^="bn-ficha-"]):target) #barra-escena {
    display: none;
  }
  .barra-home:not(.is-enhanced):has(:is(#escuchar, #archivo, #novela, #bn-directorio, [id^="bn-grupo-"], [id^="bn-ficha-"]):target) nav.barra-teclado {
    margin-block-start: 0;
    background: #193b33;
  }
  .barra-home:not(.is-enhanced):has(:is(#archivo, #novela, #bn-directorio, [id^="bn-grupo-"], [id^="bn-ficha-"]):target) :is(#escuchar, #home-content) {
    display: none;
  }
  .barra-home:not(.is-enhanced):has(:is(#archivo, #bn-directorio, [id^="bn-grupo-"], [id^="bn-ficha-"]):target) #archive-browser,
  .barra-home:not(.is-enhanced):has(#novela:target) #novel-panel {
    display: block;
    margin-block-start: 0;
  }
  .barra-home:not(.is-enhanced):not(:has(:is(#archivo, #novela, #bn-directorio, [id^="bn-grupo-"], [id^="bn-ficha-"]):target)) #view-stage {
    padding-block-start: clamp(1.45rem, 3vw, 2.45rem);
  }
}

/* El desplazamiento nativo también debe presentar la sala completa, incluida
   su cabecera, al abrirla desde otra tecla más abajo en la página. */
.barra-home:not(.is-enhanced) :is(#escuchar, #archivo, #novela) {
  scroll-margin-block-start: calc(4rem + var(--navigation-height) + var(--bn-aire-seccion));
}

/* Barra Norte · oro pulido. El metal rodea el esmalte y continúa en el raíl. */
:root {
  --bn-oro-pulido: linear-gradient(115deg, #63380f 0%, #b98330 5%, #f3c05e 9%, #ffe8a0 12%,
    #cb9138 16%, #895116 23%, #ce963b 36%, #f8cc72 48%, #9f6523 56%, #ffe09a 65%,
    #edb957 69%, #b17a2b 80%, #6f4217 86%, #b67f2d 94%, #edc16b 100%);
  --bn-riel: linear-gradient(180deg, #58320e 0%, #a97122 13%, #ffe2a0 21%, #ffd16e 38%,
    #bf842a 52%, #81501c 68%, #d19a45 81%, #fff0ab 89%, #986326 100%);
  --bn-papel-boton: #faf1d9;
  --bn-texto-boton: #284b3b;
}
nav.barra-teclado::after {
  background: linear-gradient(104deg, transparent 9%, #fff1b13f 13%, transparent 18%, transparent 61%, #ffebaa55 65%, transparent 70%), var(--bn-riel);
  box-shadow: 0 1px 0 #63482080, 0 3px 5px #4431132b;
}
.barra-teclado > a.barra-tecla {
  --bn-key-top: #fff8e7;
  --bn-key-light: #f7eace;
  --bn-key-edge: #dfcda8;
  --bn-key-foot: #f0dfbc;
  --bn-piloto-radio: 50%;
  --bn-piloto-borde: #7b6941;
  border-width: 3px 4px 3px;
  background:
    linear-gradient(114deg, transparent 9%, #fff8dc3b 15%, transparent 25%) padding-box,
    linear-gradient(174deg, var(--bn-key-top), var(--bn-key-light) 47%, var(--bn-key-edge) 84%, var(--bn-key-foot)) padding-box,
    var(--bn-oro-pulido) border-box;
  box-shadow: inset 0 1px 1px #fff4cfa8, inset -1px -2px 2px #94764162, 0 1px 1px #291b0991;
  touch-action: manipulation;
}
.barra-teclado > a.barra-tecla:is([aria-current="page"],[aria-current="location"]),
:where(.barra-home:not(.is-enhanced):not(:has(:is(#archivo,#novela,#bn-legal,#bn-directorio,[id^="bn-grupo-"],[id^="bn-ficha-"]):target))) .barra-teclado > a.barra-tecla[data-view="listen"],
:where(.barra-home:not(.is-enhanced):has(:is(#archivo,#bn-directorio,[id^="bn-grupo-"],[id^="bn-ficha-"]):target)) .barra-teclado > a.barra-tecla[data-view="archive"],
:where(.barra-home:not(.is-enhanced):has(#novela:target)) .barra-teclado > a.barra-tecla[data-view="novel"] {
  --bn-key-top: #446d5b;
  --bn-key-light: #315747;
  --bn-key-edge: #204638;
  --bn-key-foot: #315342;
  --bn-lente: #ffc458;
  --bn-piloto-radio: 2px;
  --bn-piloto-borde: #795723;
  color: #fff6df;
  text-shadow: 0 1px #1a372b;
  box-shadow: inset 1px 2px 4px #132d26a6, inset 0 -1px 0 #abc3a366, 0 1px 1px #291b0980;
}
.barra-teclado > a.barra-tecla::before {
  border-radius: var(--bn-piloto-radio);
  border-color: var(--bn-piloto-borde);
}
@media (hover: hover) and (pointer: fine) {
  .barra-teclado > a.barra-tecla:hover { filter: brightness(1.055); }
}
.barra-teclado > a.barra-tecla:active {
  box-shadow: inset 1px 3px 5px #5d401990, inset 0 -1px 0 #ffde914d;
  transform: translateY(1px);
}
.barra-teclado > a.barra-tecla:focus-visible {
  outline: 2px solid #aa4b0f;
  outline-offset: -7px;
  box-shadow: inset 0 0 0 3px #fff3be;
}
.bn-pie::before { background: var(--bn-riel); }
.bn-pie-enlaces a:hover { text-decoration: none; color: #ffdc93; }

/* Acciones sueltas de la enciclopedia y destinos fuera de la sala de escucha. */
.archive-core .archive-fallback {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.archive-core .archive-index-access { margin-block: 1.15rem 0; }
:where(.archive-core,.archive-index) :is(.archive-index-access,.archive-fallback,.archive-section-jumps) a,
body .archive-section-jumps a,
.barra-home #episode-external, body .bn-enlace-accion, body .archive-tools .archive-random {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .64em;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: .46rem .87rem;
  border: 1px solid #937c50;
  border-radius: .53rem;
  background: linear-gradient(160deg, #fff6df, #f2e6ca);
  box-shadow: inset 0 1px 0 #fff9ec;
  color: var(--bn-texto-boton);
  font: 570 .94rem/1.25 var(--bn-tipo);
  letter-spacing: -.012em;
  text-align: start;
  text-decoration: none;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
.archive-core :is(.archive-index-access,.archive-fallback) a::after,
.barra-home #episode-external::after {
  content: "";
  flex: none;
  inline-size: .43em;
  block-size: .43em;
  border-block-start: 1.7px solid currentColor;
  border-inline-end: 1.7px solid currentColor;
  transform: rotate(45deg);
}
.barra-home #episode-external::after {
  inline-size: .52em;
  block-size: .52em;
  transform: none;
  background: linear-gradient(135deg, transparent 43%, currentColor 45% 55%, transparent 57%);
}
body .archive-section-jumps { gap: .5rem; }
.barra-home .barra-controles { row-gap: .48rem; }
.barra-home .barra-privacidad a {
  display: inline;
  padding-inline: .1em;
  white-space: nowrap;
  font-weight: 600;
  text-decoration: none;
}
.barra-home .barra-privacidad a::after {
  content: "↗";
  margin-inline-start: .22em;
  font-size: .82em;
}
.barra-home .barra-privacidad a:hover { color: #7d421e; }
@media (hover:hover) {
  .archive-core :is(.archive-index-access,.archive-fallback) a:hover, body .archive-section-jumps a:hover,
  .barra-home #episode-external:hover, body .bn-enlace-accion:hover, body .archive-tools .archive-random:hover {
    color: #214836;
    background: #e0e7d4;
    border-color: #65775f;
    text-decoration: none;
  }
}
.archive-core :is(.archive-index-access,.archive-fallback) a:active, body .archive-section-jumps a:active,
.barra-home #episode-external:active, body .bn-enlace-accion:active, body .archive-tools .archive-random:active {
  background: #d1ddc5;
  box-shadow: inset 1px 1px 2px #6a6e4f55;
}
.archive-core :is(.archive-index-access,.archive-fallback) a:focus-visible, body .archive-section-jumps a:focus-visible,
.barra-home #episode-external:focus-visible, body .bn-enlace-accion:focus-visible, body .archive-tools .archive-random:focus-visible {
  outline: 2px solid #315947;
  outline-offset: 2px;
}
.barra-home .bn-transporte .barra-escuchar { min-width: 0; text-decoration: none; }
.barra-home .bn-transporte .barra-escuchar > :last-child { overflow-wrap: break-word; }
@media (max-width: 740px) {
  .barra-teclado > a.barra-tecla { border-width: 3px; }
}
@media (max-width: 380px) {
  nav.view-navigation.barra-teclado {
    grid-template-columns: minmax(max-content, .9fr) minmax(0, 1.48fr) minmax(max-content, .78fr);
  }
  .barra-teclado > a.barra-tecla { gap: .20rem; padding-inline: .1rem; }
  body .archive-section-jumps a { font-size: .89rem; }
  .barra-home .barra-controles { column-gap: .44rem; }
  .barra-home #episode-external { padding-inline: .56rem; gap: .45em; }
  .barra-home .barra-pasos { gap: .08rem; }
  .barra-home .barra-pasos > span { min-width: 3.05rem; }
}
@media (forced-colors: active) {
  .barra-teclado > a.barra-tecla,
  :is(.archive-index-access,.archive-fallback,.archive-section-jumps) a, .barra-home #episode-external, body .bn-enlace-accion {
    border: 1px solid ButtonText;
  }
  .barra-teclado > a.barra-tecla:focus-visible { outline-color: Highlight; }
}

/* El perímetro de la página y el ancho de lectura son decisiones distintas.
   El marco sigue los bordes de la ventana incluso en un monitor ultrapanorámico. */
:root {
  --bn-margen-marco: clamp(1rem, 2.45vw, 4rem);
  --bn-ancho-audio: 96rem;
}
.barra-cabecera, body .site-footer.bn-pie {
  padding-inline: var(--bn-margen-marco);
}
.barra-home .player-recall:not([hidden]) {
  margin-inline-end: var(--bn-margen-marco);
}

.bn-reticula {
  width: 100%;
  flex: 1 0 auto;
  box-sizing: border-box;
  padding-inline: var(--bn-margen-marco);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "sala" "izquierda" "derecha";
  align-content: start;
}
.bn-reticula > main {
  min-width: 0;
  grid-area: sala;
}
.bn-lateral {
  min-width: 0;
  overflow-wrap: anywhere;
  padding-block: var(--bn-aire-seccion);
}
/* Cada módulo lateral se envuelve en un elemento HTML, por ejemplo <p> o
   <section>. Los comentarios y la indentación dejan la banda libre. */
.bn-lateral:not(:has(> *)) { display: none; }
.bn-lateral-izquierda { grid-area: izquierda; }
.bn-lateral-derecha { grid-area: derecha; }
@media (min-width: 64rem) {
  .bn-reticula {
    --bn-ala: max(0px, calc(12vw - 7rem));
    grid-template-columns: var(--bn-ala) minmax(0, 1fr) var(--bn-ala);
    grid-template-areas: "izquierda sala derecha";
  }
  /* Un solo módulo lateral reserva la misma pista a ambos lados:
     la columna de lectura mantiene su eje aunque se llene una sola banda. */
  .bn-reticula:has(> .bn-lateral > *) {
    --bn-ala: clamp(11rem, 16vw, 23rem);
    column-gap: clamp(1rem, 2vw, 3rem);
  }
}
.barra-home .bn-reticula #view-stage,
.barra-home .bn-reticula #workspace > .barra-reproductor:not(.is-floating),
.bn-reticula > main.page-main {
  width: 100%;
  max-width: none;
  margin-inline: auto;
}
.barra-home .bn-reticula #workspace > .barra-reproductor:not(.is-floating),
.barra-home .bn-reticula #workspace[data-view="listen"] > #view-stage,
.barra-home:not(.is-enhanced) .bn-reticula #home-content {
  max-width: var(--bn-ancho-audio);
  margin-inline: auto;
}
/* El texto de lectura conserva su medida, aunque la cuadrícula del Archivo crezca. */
.bn-reticula .archive-entry .entry-body,
.bn-reticula .legal-item > p {
  overflow-wrap: anywhere;
  max-width: 75ch;
}
.bn-saga-escritorio { display: none; }
@media (min-width: 64rem) {
  .barra-escena-interior .bn-ventana { display: none; }
  .bn-saga-escritorio {
    display: block;
    position: absolute;
    isolation: isolate;
    top: 11%;
    right: clamp(3rem, 5vw, 10rem);
    width: min(29vw, 27em);
    max-width: 36ch;
    margin: 0;
    color: #fffae9;
    font: 480 clamp(1.05rem, 1.24vw, 1.65rem)/1.44 var(--bn-tipo);
    text-wrap: pretty;
    letter-spacing: -.015em;
    text-shadow: 0 1px 3px #06120d, 0 1px 8px #081e16;
  }
  .bn-saga-escritorio::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -70% -17%;
    background: radial-gradient(ellipse at center, #09231fd9 12%, #0b251eb8 45%, transparent 73%);
    pointer-events: none;
  }
}
@media print {
  .bn-reticula { display: block; padding: 0; }
  .bn-lateral, .bn-saga-escritorio { display: none; }
}

/* Búsqueda, herramientas y lectura del índice comparten el eje de los resultados. */
.archive-core .archive-tools:not([hidden]) { display: block; }
.archive-core .archive-tools .archive-search-control { display: grid; gap: .5rem; }
.archive-core .archive-tools .archive-search-control > label,
.archive-core .archive-tools .search-field { grid-area: auto; margin: 0; }

.archive-core .archive-results-actions .bn-filtro,
.archive-core .archive-pagination .archive-more,
.archive-core .archive-pagination .archive-index-access a {
  display: inline-flex; align-items: center; justify-content: center;
  width: fit-content; max-width: 100%; min-height: 44px;
  padding: .5rem .85rem; gap: .65rem; margin: 0;
  border: 1px solid #85704b; border-radius: .53rem;
  background: #f7ecd4; color: #293d32;
  font: 550 .94rem/1.3 var(--bn-tipo); letter-spacing: -.012em;
  text-align: start; text-decoration: none; overflow-wrap: anywhere;
}
.archive-core .bn-filtro::after, .archive-core .archive-more::after {
  content: ""; flex: 0 0 .48em; width: .48em; height: .48em;
  border: solid currentColor; border-width: 0 1.75px 1.75px 0;
  transform: translateY(-.1em) rotate(45deg);
}
.archive-core .archive-results-actions .bn-filtro[aria-expanded="true"] { background: #e1e9d8; border-color: #687c64; }
.archive-core .bn-filtro[aria-expanded="true"]::after { transform: translateY(.12em) rotate(225deg); }
.archive-core .archive-filter-fields:not([hidden]) {
  position: static; width: auto; max-width: none; z-index: auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem 1.25rem;
  border: 0; border-bottom: 1px solid var(--edge);
  border-radius: 0; padding: 0 0 1rem; margin: 0 0 1.25rem; background: transparent; box-shadow: none;
}
.archive-core .archive-filter-fields > label { min-width: 0; gap: .5rem; font-size: .925rem; font-weight: 550; color: var(--pine); }
/* El dibujo de la flecha deja la misma distancia al borde que la etiqueta. */
.archive-core .archive-filter-fields select {
  appearance: none;
  padding: .6rem 2.45rem .6rem .8rem;
  border: 1px solid #85704b; border-radius: .53rem;
  color: var(--pine); font: 450 1rem/1.35 var(--bn-tipo);
  background: linear-gradient(45deg, transparent 43%, currentColor 45% 60%, transparent 62%) right 1.18rem center / .38rem .45rem no-repeat,
              linear-gradient(-45deg, transparent 43%, currentColor 45% 60%, transparent 62%) right .83rem center / .38rem .45rem no-repeat,
              #fffaf0;
}
@media (forced-colors: active) {
  .archive-core .archive-filter-fields select { appearance: auto; background: Field; color: FieldText; }
}
.archive-core .archive-filter-fields[hidden], .archive-core .archive-pagination [hidden] { display: none; }
.archive-core .archive-pagination {
  display: grid; grid-template-areas: "access more"; grid-template-columns: minmax(0,1fr) auto;
  align-items: start; gap: 1rem; margin-block-start: 1.5rem;
}
.archive-core .archive-pagination .archive-index-access { grid-area: access; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.archive-core .archive-pagination .archive-more { grid-area: more; justify-self: end; color: #fff7df; background: #295442; border-color: #254c3c; }
.archive-core .archive-index-access .archive-random::after { content: none; }
@media (hover: hover) {
  .archive-core .archive-results-actions .bn-filtro:hover,
  .archive-core .archive-pagination .archive-index-access a:hover { background: #e4ead9; border-color: #64765d; }
  .archive-core .archive-pagination .archive-more:hover { color: #fff7df; background: #193e31; }
}
.archive-core :is(.bn-filtro, .archive-more):focus-visible { outline: 2px solid #315947; outline-offset: 3px; }
.archive-core :is(.bn-filtro, .archive-more):active { box-shadow: inset 0 2px 3px #162b284d; }

.bn-indice .bn-encabezado { display: grid; gap: .65rem; }
.bn-indice .archive-collection-total { margin: 0; color: var(--soft); }
.bn-iniciales { display: flex; flex-wrap: wrap; gap: .35rem; margin-block-end: 1.5rem; }
.bn-iniciales a {
  display: inline-grid; place-items: center; min-width: 2.5rem; min-height: 44px;
  padding: .3rem; background: #fbf4e4; border: 1px solid #a49169; border-radius: .4rem;
  color: var(--pine); text-decoration: none; font-weight: 550;
}
.bn-lista-completa { padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--edge); }
.bn-lista-completa .archive-row { display: flex; gap: .5rem 1.5rem; align-items: baseline; justify-content: space-between; padding: .75rem .4rem; min-height: 44px; }
.bn-lista-completa .archive-row > strong { min-width: 0; overflow-wrap: anywhere; }
.bn-lista-completa .archive-row > span { text-align: end; }
.bn-indice :is(li[id], .archive-row[id]) { scroll-margin-block-start: calc(var(--navigation-height, 3.25rem) + 1.5rem); }
.bn-indice a:focus-visible { outline: 2px solid #315947; outline-offset: 2px; }
@media (max-width: 640px) {
  .archive-core .archive-filter-fields:not([hidden]) { grid-template-columns: 1fr; }
  .archive-core .archive-pagination { grid-template: "more" auto "access" auto / 1fr; gap: .75rem; }
  .bn-lista-completa .archive-row { flex-wrap: wrap; justify-content: normal; gap: .22rem .75rem; }
  .bn-lista-completa .archive-row > span { text-align: start; }
}
@media (min-width: 1000px) {
  :is(.archive-core, .archive-index) .archive-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  }
}
