/* Layout: una biblioteca de holocrones. Estante de tomos como lomos verticales,
   lector a ~66 caracteres con índice lateral y fichas como lecturas de datos en monoespaciada. */
:root {
  --bg: #0c0e13;
  --bg-2: #13161e;
  --bg-3: #1b1f29;
  --fg: #e7e3d7;
  --fg-2: #a39f93;
  --line: #2a2f3b;
  --brass: #d3aa55;
  --brass-soft: rgba(211, 170, 85, .13);
  --prop: #7cc4d6;
  --prop-soft: rgba(124, 196, 214, .12);
  --auth: #9cc58a;
  --auth-soft: rgba(156, 197, 138, .13);
  --star: 231, 227, 215;

  --f-display: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', Georgia, serif;
  --f-body: 'Literata', Georgia, 'Times New Roman', serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, 'Courier New', monospace;

  --step--1: .82rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.55rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.6rem, 6vw, 4.6rem);

  --radius: 6px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eceef2; --bg-2: #f8f9fb; --bg-3: #e1e4ea; --fg: #1a1d25; --fg-2: #565c69; --line: #cdd2da;
    --brass: #8a6418; --brass-soft: rgba(138, 100, 24, .11); --prop: #1d6b80; --prop-soft: rgba(29, 107, 128, .1);
    --auth: #3f6b2b; --auth-soft: rgba(63, 107, 43, .1); --star: 40, 46, 60;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eceef2; --bg-2: #f8f9fb; --bg-3: #e1e4ea; --fg: #1a1d25; --fg-2: #565c69; --line: #cdd2da;
  --brass: #8a6418; --brass-soft: rgba(138, 100, 24, .11); --prop: #1d6b80; --prop-soft: rgba(29, 107, 128, .1);
  --auth: #3f6b2b; --auth-soft: rgba(63, 107, 43, .1); --star: 40, 46, 60;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
img { max-width: 100%; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.label, .eyebrow {
  font: 500 .72rem/1.3 var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.eyebrow { color: var(--brass); }
.muted { color: var(--fg-2); }
.mono { font-family: var(--f-mono); }

/* ------------------------------------------------ barra superior */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 18px; min-height: 56px; }
.brand {
  font: 700 1rem/1 var(--f-display);
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
}
.brand-mark {
  width: 18px; height: 18px; border: 1.5px solid var(--brass); transform: rotate(45deg);
  display: grid; place-items: center;
}
.brand-mark::after { content: ''; width: 6px; height: 6px; background: var(--brass); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font: 500 .78rem/1 var(--f-mono);
  letter-spacing: .06em;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 4px;
  color: var(--fg-2);
  white-space: nowrap;
}
.nav a:hover { color: var(--fg); background: var(--bg-3); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--brass-soft); }
.tools { display: flex; gap: 6px; }
.tool-btn {
  font: 500 .72rem/1 var(--f-mono);
  letter-spacing: .05em;
  color: var(--fg-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  cursor: pointer;
  white-space: nowrap;
}
.tool-btn:hover { color: var(--fg); border-color: var(--fg-2); }
@media (max-width: 1000px) {
  .topbar-in { flex-wrap: wrap; gap: 8px 12px; padding-block: 10px; }
  .nav { order: 3; flex-basis: 100%; }
  .tools { margin-left: auto; }
}

/* ------------------------------------------------ marcas de canon */
.prop { border-bottom: 1px dotted var(--prop); cursor: help; }
.hide-prop .prop { border-bottom: 0; }
.badge {
  display: inline-block;
  font: 500 .64rem/1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 6px;
  border-radius: 3px;
  vertical-align: middle;
  white-space: nowrap;
}
.b-o { color: var(--brass); background: var(--brass-soft); }
.b-a { color: var(--auth); background: var(--auth-soft); }
.b-p { color: var(--prop); background: var(--prop-soft); }
.badges { display: inline-flex; gap: 4px; flex-wrap: wrap; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--fc, var(--fg-2)); flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 .74rem/1 var(--f-mono);
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  cursor: pointer;
}
a.chip:hover, button.chip:hover { border-color: var(--fg-2); color: var(--fg); }
button.chip[aria-pressed="true"] { background: var(--bg-3); border-color: var(--fg-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 .82rem/1 var(--f-mono);
  letter-spacing: .04em;
  padding: 12px 16px;
  border-radius: 4px;
  text-decoration: none;
  background: var(--brass);
  color: var(--bg);
  border: 1px solid var(--brass);
  cursor: pointer;
}
.btn:hover { color: var(--bg); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brass); color: var(--brass); filter: none; }

/* ------------------------------------------------ portada */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-in { position: relative; padding-block: 72px 64px; display: grid; gap: 22px; }
.hero-title {
  font: 700 var(--step-4)/.98 var(--f-display);
  letter-spacing: .04em;
}
.hero-title span { color: var(--brass); }
.lede { font-size: var(--step-1); max-width: 40ch; line-height: 1.55; }
.hero-meta { font: 400 .8rem/1.6 var(--f-mono); color: var(--fg-2); }
.hero-meta b { color: var(--fg); font-weight: 500; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }

.block { padding-block: 56px 8px; }
.sec-head { display: grid; gap: 8px; margin-bottom: 26px; max-width: 68ch; }
.sec-head h2 { font: 700 var(--step-2)/1.15 var(--f-display); letter-spacing: .03em; }
.sec-head p { color: var(--fg-2); }

/* balance de poder */
.power { display: grid; gap: 10px; margin-bottom: 26px; }
.power-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; gap: 2px; }
.power-bar span { background: var(--fc); display: block; }
.power-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 400 .76rem/1.4 var(--f-mono); color: var(--fg-2); }
.power-legend span { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.status {
  display: grid; gap: 8px; align-content: start;
  padding: 18px 18px 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--fc);
  border-radius: var(--radius);
  text-decoration: none;
}
.status:hover { color: inherit; border-color: var(--fg-2); border-left-color: var(--fc); }
.status h3 { font: 600 1.05rem/1.25 var(--f-body); display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.status p { font-size: .92rem; color: var(--fg-2); }
.pill { font: 500 .68rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg); background: var(--bg-3); padding: 5px 7px; border-radius: 3px; white-space: nowrap; }

/* estante de tomos */
.shelf { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; }
.spine {
  position: relative;
  height: var(--h, 320px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 12px;
  padding: 18px 8px 14px;
  text-decoration: none;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 4px 4px 2px 2px;
  transition: transform .25s ease, border-color .25s ease;
}
.spine:hover { transform: translateY(-6px); border-color: var(--brass); color: inherit; }
.spine-bands { position: absolute; top: 0; left: 0; right: 0; height: 4px; display: flex; border-radius: 4px 4px 0 0; overflow: hidden; }
.spine-bands i { flex: 1; background: var(--fc); }
.spine-num { font: 700 1.6rem/1 var(--f-display); color: var(--brass); }
.spine-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 600 1rem/1.15 var(--f-display);
  letter-spacing: .05em;
  text-align: left;
  max-height: 100%;
  overflow: hidden;
}
.spine-years { font: 400 .66rem/1.3 var(--f-mono); color: var(--fg-2); text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 820px) {
  .shelf { grid-template-columns: 1fr; gap: 8px; }
  .spine { height: auto; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; justify-items: start; align-items: center; gap: 2px 12px; padding: 16px 14px 14px; }
  .spine-num { grid-row: span 2; justify-self: center; }
  .spine-title { writing-mode: horizontal-tb; transform: none; font-size: 1.02rem; }
  .spine-years { text-align: left; }
  .spine:hover { transform: none; }
}

.legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.legend-item { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.legend-item p { font-size: .92rem; color: var(--fg-2); }

/* ------------------------------------------------ lector de tomos */
.page { padding-block: 34px 80px; }
.crumbs { font: 400 .76rem/1.4 var(--f-mono); color: var(--fg-2); margin-bottom: 26px; }
.crumbs a { text-decoration: none; }
.tomo-head { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.tomo-num { font: 700 clamp(4rem, 12vw, 7.5rem)/.8 var(--f-display); color: var(--brass); letter-spacing: .02em; }
.tomo-head h1 { font: 700 var(--step-3)/1.1 var(--f-display); letter-spacing: .02em; margin: 8px 0 14px; }
@media (max-width: 560px) { .tomo-head { grid-template-columns: 1fr; gap: 6px; } }

.reader-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 84px; display: grid; gap: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: c; }
.toc li a {
  display: grid; grid-template-columns: 22px 1fr; gap: 6px;
  font-size: .88rem; line-height: 1.35;
  text-decoration: none; color: var(--fg-2);
  padding: 6px 8px; border-radius: 4px;
}
.toc li a:hover { color: var(--fg); background: var(--bg-3); }
.toc li a span { font: 500 .72rem/1.6 var(--f-mono); color: var(--brass); }
.toc-pager { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.toc-pager a { font: 400 .76rem/1.4 var(--f-mono); text-decoration: none; color: var(--fg-2); }
@media (max-width: 900px) {
  .reader-grid { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
}

.prose { max-width: 68ch; min-width: 0; }
.record { margin: 0 0 34px; padding: 18px 20px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; }
.record figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.record blockquote { margin: 0; font-style: italic; line-height: 1.65; }
.record .note { font: 400 .76rem/1.5 var(--f-mono); color: var(--fg-2); }
.synopsis { font-size: var(--step-1); line-height: 1.55; margin-bottom: 44px; color: var(--fg); }

.chapter { padding-top: 10px; margin-bottom: 48px; }
.chapter header { display: grid; gap: 6px; margin-bottom: 20px; }
.chapter h2 { font: 700 var(--step-2)/1.15 var(--f-display); letter-spacing: .02em; }
.ch-src { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chapter > p { font-size: 1.07rem; line-height: 1.78; margin-bottom: 1.05em; hyphens: auto; }
.chapter > p:first-of-type::first-letter {
  font: 700 3.1em/.85 var(--f-display);
  float: left;
  margin: .06em .1em 0 0;
  color: var(--brass);
}
.divider { border: 0; height: 1px; background: var(--line); margin: 52px 0 40px; }

.sheet { display: grid; gap: 14px; margin-bottom: 40px; }
.sheet h2 { font: 700 var(--step-2)/1.15 var(--f-display); letter-spacing: .02em; }
.facts { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { font: 500 .72rem/1.6 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); padding-right: 14px; }
.facts dd { font-size: .96rem; }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}
.hooks { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.hooks li::marker { color: var(--brass); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.pager a {
  display: grid; gap: 4px; padding: 16px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.pager a:hover { border-color: var(--brass); color: inherit; }
.pager a.next { text-align: right; grid-column: 2; }
.pager strong { font: 600 1rem/1.3 var(--f-display); }

/* ------------------------------------------------ facciones */
.fac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.fac-card {
  display: grid; gap: 10px; align-content: start;
  padding: 22px; text-decoration: none;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.fac-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--fc); }
.fac-card:hover { border-color: var(--fg-2); color: inherit; }
.fac-card h3 { font: 700 1.3rem/1.2 var(--f-display); letter-spacing: .02em; }
.fac-card p { font-size: .92rem; color: var(--fg-2); }
.fac-card .lema { font-style: italic; color: var(--fg); }

.fac-head { display: grid; gap: 12px; padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line); position: relative; }
.fac-head::before { content: ''; width: 64px; height: 4px; background: var(--fc); border-radius: 2px; }
.fac-head h1 { font: 700 var(--step-3)/1.1 var(--f-display); letter-spacing: .02em; }
.fac-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.fac-side { position: sticky; top: 84px; display: grid; gap: 16px; padding: 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.fac-side dl { margin: 0; display: grid; gap: 12px; }
.fac-side dt { font: 500 .68rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.fac-side dd { margin: 2px 0 0; font-size: .92rem; }
@media (max-width: 940px) { .fac-layout { grid-template-columns: 1fr; } .fac-side { position: static; } }
.fac-main { display: grid; gap: 44px; min-width: 0; max-width: 72ch; }
.fac-sec { display: grid; gap: 14px; }
.fac-sec h2 { font: 700 var(--step-2)/1.15 var(--f-display); letter-spacing: .02em; }
.era-list { list-style: none; margin: 0; padding: 0; display: grid; }
.era-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; position: relative; }
.era-list li::before { content: ''; width: 9px; height: 9px; margin-top: 8px; border: 2px solid var(--fc); border-radius: 50%; background: var(--bg); z-index: 1; }
.era-list li::after { content: ''; position: absolute; left: 6px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.era-list li:last-child::after { display: none; }
.era-list h3 { font: 600 1rem/1.4 var(--f-body); margin-bottom: 3px; }
.era-list p { font-size: .95rem; color: var(--fg-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .68rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--f-mono); font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.unit-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.unit { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.unit h3 { font: 600 1rem/1.4 var(--f-body); }
.unit p { font-size: .94rem; color: var(--fg-2); }
@media (max-width: 560px) { .unit { grid-template-columns: 1fr; gap: 4px; } }
.rel { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rel:first-child { border-top: 1px solid var(--line); }
.rel a { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.rel p { flex-basis: 100%; font-size: .93rem; color: var(--fg-2); }
.play { padding: 18px 20px; background: var(--brass-soft); border-radius: var(--radius); display: grid; gap: 10px; }

/* ------------------------------------------------ personajes */
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
.person { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); border-left: 3px solid var(--fc); }
.person summary { list-style: none; cursor: pointer; padding: 16px 18px; display: grid; gap: 4px; }
.person summary::-webkit-details-marker { display: none; }
.person summary h3 { font: 700 1.12rem/1.25 var(--f-display); letter-spacing: .02em; display: flex; justify-content: space-between; gap: 10px; }
.person summary h3::after { content: '+'; font: 400 1.1rem/1 var(--f-mono); color: var(--fg-2); }
.person[open] summary h3::after { content: '–'; }
.person summary p { font-size: .88rem; color: var(--fg-2); }
.person .body { padding: 0 18px 18px; display: grid; gap: 12px; }
.person .body p { font-size: .95rem; }
.person.flash { border-color: var(--brass); }
.kv { font: 400 .76rem/1.5 var(--f-mono); color: var(--fg-2); }
.kv b { color: var(--fg); font-weight: 500; }

/* ------------------------------------------------ batallas y cronología */
.rows { display: grid; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.row.flash { background: var(--brass-soft); }
.row-year { font: 500 .9rem/1.4 var(--f-mono); color: var(--brass); font-variant-numeric: tabular-nums; }
.row h3 { font: 700 1.15rem/1.3 var(--f-display); letter-spacing: .02em; margin-bottom: 8px; }
.row .facts { grid-template-columns: 130px minmax(0, 1fr); border-top: 0; }
.row .facts dt, .row .facts dd { padding: 6px 0; border-bottom: 0; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; gap: 6px; } .row .facts { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline .t-year { font: 500 .82rem/1.5 var(--f-mono); color: var(--brass); font-variant-numeric: tabular-nums; }
.timeline .t-body { display: grid; gap: 6px; }
.timeline .t-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font: 400 .72rem/1 var(--f-mono); color: var(--fg-2); }
.timeline .t-meta a { text-decoration: none; }
.tl-era { font: 700 .95rem/1.3 var(--f-display); letter-spacing: .06em; color: var(--fg-2); padding: 26px 0 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* ------------------------------------------------ mapa */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 940px) { .map-layout { grid-template-columns: 1fr; } }
.map-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.map-box svg { display: block; width: 100%; min-width: 640px; height: auto; }
.map-ring { fill: none; stroke: var(--line); stroke-width: .25; }
.map-grid { stroke: var(--line); stroke-width: .12; }
.map-sphere { stroke-width: .3; }
.map-pt { cursor: pointer; }
.map-pt circle.core { stroke: var(--bg); stroke-width: .5; }
.map-pt circle.halo { fill: transparent; stroke: var(--brass); stroke-width: .4; opacity: 0; }
.map-pt.sel circle.halo, .map-pt:focus circle.halo { opacity: 1; }
.map-pt:focus { outline: none; }
.map-pt text { font: 500 2.5px var(--f-mono); fill: var(--fg); letter-spacing: .05px; }
.map-pt.dim { opacity: .22; }
.map-route { fill: none; stroke: var(--fg-2); stroke-width: .3; stroke-dasharray: 1 1; }
.map-note { font: 400 2.2px var(--f-mono); fill: var(--fg-2); }
.map-panel { display: grid; gap: 12px; padding: 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.map-panel h3 { font: 700 1.2rem/1.25 var(--f-display); }
.map-panel p { font-size: .94rem; }
select {
  font: 500 .8rem/1 var(--f-mono); color: var(--fg); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px;
  max-width: 100%; min-width: 0;
}
.map-controls select { flex: 1 1 220px; max-width: 460px; }
.map-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.map-controls label { font: 500 .72rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }

/* ------------------------------------------------ glosario y canon */
.gloss { display: grid; grid-template-columns: 230px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
.gloss dt, .gloss dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.gloss dt { font-weight: 600; padding-right: 16px; display: grid; gap: 6px; align-content: start; justify-items: start; }
.gloss dd { color: var(--fg-2); font-size: .96rem; }
@media (max-width: 640px) { .gloss { grid-template-columns: 1fr; } .gloss dt { border-bottom: 0; padding-bottom: 4px; } }
.qa { display: grid; border-top: 1px solid var(--line); }
.qa div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.qa dt { font-weight: 600; font-size: .95rem; }
.qa dd { margin: 0; color: var(--fg-2); font-size: .95rem; }
@media (max-width: 640px) { .qa div { grid-template-columns: 1fr; gap: 4px; } }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.checklist li { padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line); position: relative; font-size: .95rem; }
.checklist li::before { content: ''; position: absolute; left: 2px; top: 16px; width: 12px; height: 12px; border: 1.5px solid var(--fc, var(--prop)); border-radius: 2px; }
.canon-grid { display: grid; gap: 52px; max-width: 900px; }
.export { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toast { font: 400 .78rem/1.4 var(--f-mono); color: var(--auth); min-height: 1.4em; }
.copy-fallback { width: 100%; min-height: 160px; font: 400 .75rem/1.5 var(--f-mono); background: var(--bg-2); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 10px; }

.footer { border-top: 1px solid var(--line); padding-block: 26px 40px; margin-top: 40px; font: 400 .74rem/1.6 var(--f-mono); color: var(--fg-2); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
