/* ═══════════════════════════════════════════════════════════════
   BOARD ORACLE — design system "flash tradicional"
   papel envejecido · tinta negra · rojo sangre · mostaza · teal
   ═══════════════════════════════════════════════════════════════ */

/* fuentes self-hosted (subset latin, woff2) — sin llamadas a terceros */
@font-face {
  font-family: 'Rye';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/rye.woff2') format('woff2');
}
@font-face {
  font-family: 'Alfa Slab One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/alfa-slab-one.woff2') format('woff2');
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/oswald-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/special-elite.woff2') format('woff2');
}

:root {
  --paper: #ead9b0;
  --paper2: #f6ecd2;
  --paper-dk: #d8c491;
  --ink: #1b1510;
  --ink-soft: #3a2f26;
  --blood: #a8232a;
  --blood-dk: #7c151b;
  --gold: #d9a441;
  --gold-soft: #e9c988;
  --teal: #33604f;
  --shadow: rgba(27, 21, 16, 0.9);

  --f-display: 'Rye', 'Alfa Slab One', serif;
  --f-slab: 'Alfa Slab One', 'Rye', serif;
  --f-ui: 'Oswald', 'Arial Narrow', sans-serif;
  --f-type: 'Special Elite', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-ui);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 90% at 50% 20%, var(--paper) 55%, var(--paper-dk) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
}

/* trama de puntos (halftone) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--ink) 1px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

/* grano de papel */
.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 50;
}

.ic { width: 28px; height: 28px; vertical-align: middle; flex: none; }
.flip { transform: scaleX(-1); }

/* ─────────────── header ─────────────── */

.site-head {
  position: relative;
  text-align: center;
  padding: 26px 16px 10px;
  z-index: 1;
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 3vw, 26px);
}

.head-bird { width: clamp(40px, 8vw, 64px); height: clamp(40px, 8vw, 64px); }

.logo {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 7vw, 4rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--gold), 5px 5px 0 rgba(27, 21, 16, 0.25);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  transition: transform 0.2s ease;
}
.logo:hover { transform: rotate(-1deg) scale(1.02); }
.logo-star { width: 0.6em; height: 0.6em; }

.tagline {
  font-family: var(--f-type);
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  margin-top: 6px;
  color: var(--blood);
  letter-spacing: 0.06em;
}
.subline {
  font-family: var(--f-ui);
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.top-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.region-select {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 5px 8px;
  border: 2.5px solid var(--ink);
  background: var(--paper2);
  color: var(--ink);
  cursor: pointer;
}
.region-select:hover { background: var(--gold-soft); }
.lang-btn {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border: 2.5px solid var(--ink);
  background: var(--paper2);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:first-child { border-right-width: 1.25px; }
.lang-btn:last-child { border-left-width: 1.25px; }
.lang-btn.on { background: var(--ink); color: var(--paper2); }
.lang-btn:hover:not(.on) { background: var(--gold-soft); }

/* ─────────────── layout ─────────────── */

main {
  flex: 1;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 18px 16px 48px;
  position: relative;
  z-index: 1;
}

.sheet {
  opacity: 0;
  transform: translateY(16px) rotate(-0.6deg);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.sheet.in { opacity: 1; transform: none; }

/* título tipo cinta (banner de flash) */
.banner-title {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 18px 0 26px;
  font-family: var(--f-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
}
.banner-title span {
  position: relative;
  background: var(--blood);
  color: var(--paper2);
  padding: 10px 34px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  text-align: center;
}
/* puntas dobladas de la cinta */
.banner-title span::before,
.banner-title span::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 24px;
  height: calc(100% - 2px);
  background: var(--blood-dk);
  border: 3px solid var(--ink);
  z-index: -1;
}
.banner-title span::before {
  left: -22px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%);
}
.banner-title span::after {
  right: -22px;
  clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%);
}
.banner-title.big span { font-size: 1.2em; padding: 12px 42px; }

.rib-title {
  font-family: var(--f-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px double var(--ink);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.hint {
  font-family: var(--f-type);
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.center { text-align: center; justify-content: center; }
.muted { font-family: var(--f-type); color: var(--ink-soft); font-size: 0.9rem; }

/* ─────────────── botones ─────────────── */

.btn {
  font-family: var(--f-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.92rem;
  padding: 11px 22px;
  border: 3px solid var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background:
    linear-gradient(to right, var(--ink) 50%, var(--paper2) 50%);
  background-size: 205% 100%;
  background-position: 100% 0;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: background-position 0.28s ease, color 0.28s ease,
              transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { background-position: 0 0; color: var(--paper2); }
.btn:hover .ic { filter: invert(1) hue-rotate(180deg); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }

.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
}
.btn-ghost:hover { background-position: 0 0; }

.btn-mini {
  font-size: 0.72rem;
  padding: 5px 10px;
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--shadow);
}
.btn-danger { border-color: var(--blood); color: var(--blood); }
.btn-danger:hover { background: var(--blood); background-position: 0 0; color: var(--paper2); }

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.nav-row.center { justify-content: center; }

button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px dashed var(--blood);
  outline-offset: 3px;
}

/* ─────────────── home: elegir disciplina ─────────────── */

.pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 10px 0 34px;
}
@media (max-width: 640px) { .pick-grid { grid-template-columns: 1fr; } }

.pick-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px 30px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: -10px;
  box-shadow: 6px 6px 0 var(--shadow);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
}
.pick-card:hover {
  transform: rotate(-1.2deg) translateY(-4px);
  box-shadow: 9px 10px 0 var(--shadow);
  background: var(--gold-soft);
}
.pick-sn:hover { transform: rotate(1.2deg) translateY(-4px); }

.pick-ic { width: 96px; height: 96px; }
.pick-name {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  letter-spacing: 0.05em;
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--gold);
}
.pick-sub { font-family: var(--f-type); font-size: 0.85rem; color: var(--blood); }

.pick-deco { position: absolute; width: 34px; height: 34px; opacity: 0.35; }
.pick-deco.d1 { top: 14px; left: 14px; transform: rotate(-12deg); }
.pick-deco.d2 { bottom: 14px; right: 14px; transform: rotate(10deg); }

.profiles-box {
  background: var(--paper2);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  padding: 18px 20px;
}
.profile-list { list-style: none; }
.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 2px dotted var(--ink-soft);
  flex-wrap: wrap;
}
.profile-item:last-child { border-bottom: none; }
.profile-name {
  font-weight: 500;
  font-size: 1.02rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.profile-name .ic { width: 24px; height: 24px; }
.profile-name em {
  font-family: var(--f-type);
  font-style: normal;
  font-size: 0.75rem;
  color: var(--paper2);
  background: var(--teal);
  border: 2px solid var(--ink);
  padding: 1px 8px;
}
.profile-actions { display: inline-flex; gap: 8px; }

/* ─────────────── progreso ─────────────── */

.progress { margin-bottom: 8px; }
.progress-track {
  position: relative;
  height: 16px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
}
.progress-fill {
  position: relative;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg, var(--blood), var(--blood) 8px, var(--blood-dk) 8px, var(--blood-dk) 16px);
  transition: width 0.4s ease;
}
.progress-dagger {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%) rotate(90deg);
}
.progress-label {
  display: block;
  text-align: right;
  font-family: var(--f-type);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ─────────────── formularios ─────────────── */

.fields {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.big-field { min-width: min(320px, 100%); }

.field-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
}

.field-wrap { position: relative; display: flex; }
.field-wrap input {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 1.7rem;
  width: 100%;
  padding: 10px 74px 10px 16px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  box-shadow: inset 3px 3px 0 rgba(27, 21, 16, 0.12);
  color: var(--ink);
}
.field-wrap input.bad { border-color: var(--blood); background: #f2d7cf; }

.field-unit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-type);
  font-size: 0.8rem;
  background: var(--ink);
  color: var(--paper2);
  padding: 3px 9px;
}

.field-err {
  font-family: var(--f-type);
  color: var(--blood);
  font-size: 0.82rem;
  min-height: 1.1em;
}

.convert-hint {
  font-family: var(--f-type);
  font-size: 0.85rem;
  color: var(--teal);
  min-height: 1.2em;
}

.tabs { display: flex; justify-content: center; gap: 0; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  font-family: var(--f-ui);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  padding: 9px 18px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  margin-left: -3px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}
.tab:first-child { margin-left: 0; }
.tab.on { background: var(--ink); color: var(--paper2); }
.tab:hover:not(.on) { background: var(--gold-soft); }

/* ─────────────── opciones (estilo / nivel) ─────────────── */

.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.opt-grid-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.opt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px 14px 18px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  font-family: var(--f-ui);
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.opt-card:hover {
  transform: rotate(-0.8deg) translateY(-3px);
  box-shadow: 6px 7px 0 var(--shadow);
  background: var(--gold-soft);
}
.opt-card.on { background: var(--gold); }
.opt-ic { width: 52px; height: 52px; }
.opt-name {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1rem;
}
.opt-desc { font-family: var(--f-type); font-size: 0.8rem; color: var(--ink-soft); }

/* ─────────────── resultados ─────────────── */

.verdict-head { text-align: center; }
.verdict-ic { width: 74px; height: 74px; margin-bottom: -6px; }

.chip {
  display: inline-block;
  font-family: var(--f-type);
  font-size: 0.82rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper2);
  padding: 5px 16px;
  margin: 4px 0 22px;
}

.warn-box {
  border: 3px dashed var(--blood);
  background: rgba(217, 164, 65, 0.22);
  padding: 14px 18px;
  margin-bottom: 22px;
}
.warn-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blood);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.warn-title .ic { width: 26px; height: 26px; }
.warn-box ul { list-style: none; }
.warn-box li {
  font-family: var(--f-type);
  font-size: 0.88rem;
  padding: 4px 0 4px 20px;
  position: relative;
}
.warn-box li::before {
  content: '✖';
  position: absolute;
  left: 0;
  color: var(--blood);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 18px;
}

.spec-card {
  background: var(--paper2);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  padding: 16px 18px 14px;
  opacity: 0;
  transform: translateY(12px);
  animation: card-in 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes card-in { to { opacity: 1; transform: none; } }

.spec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px double var(--ink);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.spec-ic { width: 34px; height: 34px; }
.spec-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.88rem;
}
.spec-value {
  font-family: var(--f-slab);
  font-size: 1.75rem;
  color: var(--blood);
  line-height: 1.15;
  text-shadow: 1.5px 1.5px 0 rgba(27, 21, 16, 0.18);
}
.spec-range, .spec-sub {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 3px;
}
.spec-sub { color: var(--teal); font-weight: 600; }
.spec-why {
  font-family: var(--f-type);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 10px;
  border-top: 2px dotted var(--ink-soft);
  padding-top: 8px;
}

/* toggle de presupuesto */
.budget-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 6px;
}
.budget-label {
  font-family: var(--f-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
}
.budget-label .ic { width: 22px; height: 22px; }
.tab-sm { padding: 6px 16px; font-size: 0.8rem; }
.budget-hint { margin-bottom: 22px; font-size: 0.78rem; }

/* links a tiendas por spec */
.shop-row {
  font-family: var(--f-ui);
  font-size: 0.8rem;
  margin-top: 10px;
  border-top: 2px dashed var(--gold);
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.shop-label {
  font-family: var(--f-type);
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.shop-row a {
  color: var(--teal);
  font-weight: 600;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
  white-space: nowrap;
}
.shop-row a::after { content: ' ↗'; font-size: 0.75em; }
.shop-row a:hover { color: var(--blood); }
.shop-sep { color: var(--ink-soft); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
}
.save-row { display: inline-flex; gap: 0; }
.name-input {
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  border-right: none;
  background: var(--paper2);
  width: 150px;
}

.disclaimer {
  font-family: var(--f-type);
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 26px;
  opacity: 0.85;
}

/* fuentes de los datos */
.sources {
  margin: 18px auto 0;
  max-width: 620px;
  border: 2px dashed var(--ink-soft);
  background: rgba(246, 236, 210, 0.65);
  padding: 12px 18px;
}
.sources summary {
  cursor: pointer;
  font-family: var(--f-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.sources summary::-webkit-details-marker { display: none; }
.sources summary .ic { width: 20px; height: 20px; }
.sources summary:hover { color: var(--blood); }
.sources p {
  font-family: var(--f-type);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 12px 0 6px;
}
.sources ul { list-style: none; }
.sources li {
  font-family: var(--f-type);
  font-size: 0.78rem;
  padding: 3px 0 3px 20px;
  position: relative;
}
.sources li::before {
  content: '★';
  position: absolute;
  left: 2px;
  color: var(--gold);
}
.sources a {
  color: var(--blood);
  font-weight: 700;
  text-underline-offset: 2px;
}
.sources a:hover { color: var(--blood-dk); }

/* ─────────────── ficha ─────────────── */

#ficha-wrap { display: none; }
#ficha-wrap.open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
}
.ficha-back {
  position: fixed;
  inset: 0;
  background: rgba(27, 21, 16, 0.62);
}
.ficha {
  position: relative;
  max-width: 460px;
  margin: 5vh auto;
  padding: 0 14px 40px;
}
.ficha-card {
  background: var(--paper2);
  border: 4px solid var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: -12px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
  padding: 26px 26px 18px;
}
.ficha-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}
.ficha-head .ic { width: 36px; height: 36px; }
.ficha-brand {
  font-family: var(--f-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 var(--gold);
}
.ficha-disc {
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: var(--paper2);
  background: var(--blood);
  border: 2.5px solid var(--ink);
  padding: 5px 10px;
  margin: 8px 0 10px;
}
.ficha-rider {
  font-family: var(--f-type);
  text-align: center;
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.ficha-table { width: 100%; border-collapse: collapse; }
.ficha-table th, .ficha-table td {
  border-bottom: 2px dotted var(--ink-soft);
  padding: 7px 4px;
  font-size: 0.85rem;
  vertical-align: top;
}
.ficha-table th {
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  width: 42%;
}
.ficha-table td { text-align: right; font-family: var(--f-slab); font-size: 0.9rem; color: var(--blood-dk); }
.ficha-table td small {
  display: block;
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--teal);
}
.ficha-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-family: var(--f-type);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.ficha-foot .ic { width: 18px; height: 18px; }
.ficha .hint { color: var(--paper2); margin-top: 16px; }
.ficha .nav-row { margin-top: 12px; }

/* ─────────────── toast ─────────────── */

#toast {
  visibility: hidden;
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 120%);
  background: var(--ink);
  color: var(--paper2);
  font-family: var(--f-type);
  font-size: 0.9rem;
  border: 3px solid var(--gold);
  padding: 12px 24px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
#toast.show { transform: translate(-50%, 0); }

/* ─────────────── footer ─────────────── */

.site-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 16px 30px;
  border-top: 3px double var(--ink);
  margin-top: 20px;
  position: relative;
  z-index: 1;
}
.site-foot p {
  font-family: var(--f-type);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.site-foot .ic { width: 30px; height: 30px; opacity: 0.75; }

/* ─────────────── páginas guía (SEO) ─────────────── */

.guide {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 10px 18px 48px;
  position: relative;
  z-index: 1;
}
.guide-logo {
  text-decoration: none;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
}
.guide-intro {
  font-family: var(--f-type);
  font-size: 0.98rem;
  margin: 4px 0 26px;
  line-height: 1.65;
}
.guide p { line-height: 1.6; margin: 10px 0 18px; font-size: 0.98rem; }
.guide .rib-title { margin-top: 34px; font-size: 1.05rem; }
.guide a { color: var(--blood); font-weight: 600; text-underline-offset: 2px; }
.guide a.btn { text-decoration: none; }

.guide-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper2);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  margin: 8px 0 20px;
  font-size: 0.9rem;
}
.guide-table th, .guide-table td {
  padding: 8px 12px;
  border-bottom: 2px dotted var(--ink-soft);
  text-align: left;
}
.guide-table thead th {
  background: var(--ink);
  color: var(--paper2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  border-bottom: 3px solid var(--ink);
}
.guide-table tbody tr:last-child td { border-bottom: none; }
.guide-table td:first-child { font-weight: 600; }

.guide-faq dt {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  margin-top: 16px;
  color: var(--blood-dk);
}
.guide-faq dd {
  font-family: var(--f-type);
  font-size: 0.88rem;
  margin: 6px 0 0 0;
  line-height: 1.6;
}

.guide-cta {
  text-align: center;
  border: 3px dashed var(--ink);
  background: var(--paper2);
  padding: 22px 18px;
  margin: 36px 0 20px;
}
.guide-cta p { font-family: var(--f-type); margin: 0 0 14px; }
.guide-cta .btn { margin: 4px 6px; }

.site-foot a { color: var(--blood); font-weight: 600; }
.foot-col { flex-direction: column; gap: 10px; }
.foot-nav {
  font-family: var(--f-ui);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.foot-nav span { color: var(--gold); }
.foot-credit-row { display: flex; align-items: center; gap: 16px; }

/* ─────────────── impresión: solo la ficha ─────────────── */

@media print {
  body:has(#ficha-wrap.open) .grain,
  body:has(#ficha-wrap.open) .site-head,
  body:has(#ficha-wrap.open) main,
  body:has(#ficha-wrap.open) .site-foot,
  body:has(#ficha-wrap.open) #toast,
  body:has(#ficha-wrap.open) .ficha-back,
  body:has(#ficha-wrap.open) .ficha .hint,
  body:has(#ficha-wrap.open) .ficha .nav-row { display: none !important; }

  body:has(#ficha-wrap.open) { background: #fff; }
  body:has(#ficha-wrap.open)::before { display: none; }
  body:has(#ficha-wrap.open) #ficha-wrap.open { position: static; overflow: visible; }
  body:has(#ficha-wrap.open) .ficha { margin: 0 auto; box-shadow: none; }
  body:has(#ficha-wrap.open) .ficha-card { box-shadow: none; }
}

/* ─────────────── accesibilidad ─────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .sheet { opacity: 1; transform: none; }
  .spec-card { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .top-controls { position: static; margin-top: 10px; justify-content: center; }
  .nav-row .btn { flex: 1; justify-content: center; }
  .actions .btn { width: 100%; justify-content: center; }
  .save-row { width: 100%; }
  .save-row .btn { flex: 1; justify-content: center; }
  .name-input { flex: 1; }
}
