:root {
  --ink: #211E1E;
  --ink-2: #3a3636;
  --muted: rgba(33, 30, 30, .64);
  --line: rgba(33, 30, 30, .12);
  --line-2: rgba(33, 30, 30, .22);
  --paper: #FFFFFF;
  --alt: #F7F7F7;
  --sand: #C9B79C;
  --sand-soft: #f3eee6;
  --bronze: #8a6d47;
  --rust: #AD5207;
  --ok: #2f6b45;
  --ok-soft: #e7f1ea;
  --doubt: #9a5a0a;
  --doubt-soft: #fbf0df;
  --sw-bg: #f3f1ed;
  --radius: 6px;
  --font-h: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-b: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --top-h: 64px;
  --tool-h: 58px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + var(--tool-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--font-b); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-h); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }
svg { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--bronze); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 3px; height: 14px; background: var(--sand); }
.eyebrow-light { color: var(--sand); }
.muted { color: var(--muted); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sand-soft); }
.btn-outline-light { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); min-height: 40px; padding: 0 14px; border-radius: var(--radius); font-weight: 600; font-size: 14px; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }

.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--rust); border-radius: 4px; transition: width .4s ease; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); height: var(--top-h); }
.top-in { max-width: 1320px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 24px; padding: 0 24px; }
.brand { display: block; flex: none; }
.logo { height: 40px; width: auto; }
.top-progress { flex: 1; max-width: 360px; margin-left: auto; }
.tp-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.tp-label b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Portada */
.hero { position: relative; background: #141212; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 18, 18, .92) 0%, rgba(20, 18, 18, .55) 55%, rgba(20, 18, 18, .2) 100%); }
.hero-in { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 96px 24px 80px; }
.hero h1 { font-size: clamp(42px, 7vw, 92px); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin: 22px 0 24px; }
.lede { font-size: clamp(16px, 1.6vw, 19px); max-width: 560px; color: rgba(255, 255, 255, .82); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 36px 0 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .2); max-width: 620px; }
.hero-meta dt { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.hero-meta dd { margin: 4px 0 0; font-weight: 700; font-family: var(--font-h); letter-spacing: .02em; text-transform: uppercase; font-size: 14px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Cómo funciona */
.how { background: var(--alt); border-bottom: 1px solid var(--line); }
.how-in { max-width: 1320px; margin: 0 auto; padding: 56px 24px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px 64px; align-items: start; }
.how-intro h2 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 14px; }
.how-intro p { color: var(--muted); max-width: 520px; }
.how-intro b { color: var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.steps span { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--font-h); }
.badges { grid-column: 1 / -1; list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.badges li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 13.5px; background: #fff; }
.badges b { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 10px; font-family: var(--font-h); font-size: 12.5px; letter-spacing: .04em; }

/* Barra de herramientas */
.toolbar { position: sticky; top: var(--top-h); z-index: 30; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.toolbar-in { max-width: 1320px; margin: 0 auto; padding: 10px 24px; display: flex; gap: 14px; align-items: center; min-height: var(--tool-h); }
.seg { display: inline-flex; background: var(--alt); border: 1px solid var(--line); border-radius: 8px; padding: 3px; flex: none; }
.view-btn { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--muted); min-height: 36px; }
.view-btn[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.search { flex: 1; max-width: 420px; margin-left: auto; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px 0 38px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--ink); }
.chips { display: none; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; text-decoration: none; background: #fff; white-space: nowrap; }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Estructura */
.layout { max-width: 1320px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
.side { position: sticky; top: calc(var(--top-h) + var(--tool-h) + 24px); align-self: start; padding: 32px 0; max-height: calc(100vh - var(--top-h) - var(--tool-h) - 24px); overflow-y: auto; }
.toc { display: grid; gap: 2px; }
.toc a { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: var(--radius); text-decoration: none; font-size: 14px; color: var(--muted); border-left: 2px solid transparent; }
.toc a:hover { background: var(--alt); color: var(--ink); }
.toc a.is-active { color: var(--ink); background: var(--alt); border-left-color: var(--rust); font-weight: 600; }
.toc-num { font-family: var(--font-h); font-weight: 700; font-size: 13px; color: var(--bronze); display: grid; place-items: center; }
.toc-num svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.toc-st { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.toc-st svg, .status svg { width: 15px; height: 15px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.toc a.is-done .toc-name { color: var(--ink); }
.side-card { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--alt); }
.sc-pct { font-family: var(--font-h); font-weight: 800; font-size: 34px; letter-spacing: -.03em; margin-bottom: 8px; }
.side-card p { font-size: 13px; color: var(--muted); margin: 12px 0 14px; }

main { padding: 32px 0 80px; min-width: 0; }
main:focus { outline: none; }

/* Capítulo */
.chapter { padding-top: 40px; }
.chapter + .chapter { margin-top: 40px; border-top: 1px solid var(--line); }
.ch-head { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 24px; align-items: start; margin-bottom: 28px; }
.ch-num { font-family: var(--font-h); font-weight: 800; font-size: 64px; line-height: .85; color: var(--sand); letter-spacing: -.05em; }
.ch-num-room { width: 64px; height: 64px; border-radius: 12px; background: var(--sand-soft); display: grid; place-items: center; color: var(--bronze); }
.ch-num-room svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ch-head h2 { font-size: clamp(28px, 3.6vw, 44px); margin: 10px 0 10px; }
.ch-intro { color: var(--muted); max-width: 640px; }
.std-btn { margin-top: 6px; }

/* Partida */
.item { border: 1px solid var(--line); border-radius: 10px; padding: 26px; margin-top: 18px; background: #fff; transition: box-shadow .3s; }
.item.flash { box-shadow: 0 0 0 3px var(--sand); }
.item-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.code { flex: none; font-family: var(--font-h); font-weight: 700; font-size: 13px; background: var(--sand-soft); border: 1px solid #e6dccb; color: var(--bronze); padding: 4px 9px; border-radius: 4px; margin-top: 2px; }
.item-titles { flex: 1; min-width: 0; }
.item h3 { font-size: 22px; }
.item-sub { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--bronze); margin-top: 4px; font-weight: 600; }
.status-slot { flex: none; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.status-done { background: var(--ok-soft); color: var(--ok); }
.status-todo { background: var(--alt); color: var(--muted); border: 1px solid var(--line); }
.status-doubt { background: var(--doubt-soft); color: var(--doubt); }

.item-grid { display: grid; gap: 24px; }
.item.has-media .item-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.item-text p { color: var(--ink-2); font-size: 15.5px; }
.item-text b { color: var(--ink); font-weight: 600; }
.specs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
.specs li { font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 9px; background: #fff; }
.budget { display: inline-flex !important; align-items: center; gap: 8px; margin-top: 14px !important; font-weight: 600; font-size: 14px !important; background: var(--sand-soft); border-radius: 4px; padding: 6px 12px; color: var(--ink) !important; }
.budget svg { width: 16px; height: 16px; fill: none; stroke: var(--bronze); stroke-width: 1.6; stroke-linejoin: round; }
.note, .important { margin-top: 16px; border-left: 3px solid var(--sand); background: var(--alt); padding: 12px 14px; font-size: 14px; color: var(--ink-2); border-radius: 0 4px 4px 0; }
.item-media { display: grid; gap: 14px; align-content: start; }
.fig { margin: 0; }
.fig figcaption { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 8px; padding-left: 9px; border-left: 2px solid var(--sand); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--alt); border-radius: 6px; overflow: hidden; cursor: zoom-in; }
.zoom img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.zoom:hover img { transform: scale(1.03); }
.fig-layers { background: var(--alt); border-radius: 6px; padding: 16px; }
.layers { width: 100%; height: auto; display: block; }
.ly-lead { stroke: var(--muted); stroke-width: 1; }
.ly-label { font: 500 11.5px var(--font-b); fill: var(--ink); }

/* Grupos de elección */
.groups { margin-top: 8px; }
.group { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line-2); }
.group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.group-label { font-weight: 700; font-size: 15px; }
.pending-dot { font-size: 11.5px; font-weight: 600; color: var(--rust); display: inline-flex; align-items: center; gap: 6px; }
.pending-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rust); }
.group-hint { font-size: 13.5px; color: var(--muted); margin-top: 4px !important; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.options.has-desc { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.opt { display: flex; flex-direction: column; text-align: left; padding: 0; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.opt:hover { border-color: var(--ink); transform: translateY(-1px); }
.opt.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.opt-sw { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--sw-bg); border-bottom: 1px solid var(--line); }
.opt-sw svg, .opt-sw img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opt-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; box-shadow: 0 0 0 2px #fff; }
.opt-check svg { position: static; width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.opt.is-on .opt-check { opacity: 1; transform: none; }
.opt-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.opt-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.opt-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.opt-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }
.tag { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .02em; border-radius: 3px; padding: 2px 7px; margin-top: 4px; }
.tag-std { background: var(--ok-soft); color: var(--ok); }
.tag-opt { background: var(--sand-soft); color: var(--bronze); }
.tag-extra { background: #f8e6d7; color: var(--rust); }

.group-confirm { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.confirm-row { display: flex; gap: 10px; flex-wrap: wrap; }
.confirm-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: 14px; transition: all .15s; }
.confirm-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirm-btn:hover { border-color: var(--ink); }
.confirm-btn.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.confirm-btn.is-doubt.is-on { background: var(--doubt); border-color: var(--doubt); }

.notes-wrap { margin-top: 18px; }
.notes-toggle { border: 0; background: none; padding: 0; color: var(--bronze); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.notes-box { display: none; margin-top: 10px; }
.notes-wrap.is-open .notes-box { display: block; }
.notes-box textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; background: #fff; color: var(--ink); }
.notes-box textarea:focus { outline: none; border-color: var(--ink); }

/* Partidas no incluidas y ventajas */
.excluded { counter-reset: ex; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.excluded li { counter-increment: ex; display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 14.5px; background: #fff; }
.excluded li::before { content: counter(ex, decimal-leading-zero); font-family: var(--font-h); font-weight: 700; color: var(--sand); flex: none; }
.important { border-left-color: var(--rust); margin-top: 18px; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.adv { border: 1px solid var(--line); border-radius: 10px; padding: 24px; background: #fff; }
.adv-k { width: 48px; height: 48px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--font-h); font-weight: 800; font-size: 24px; margin-bottom: 16px; }
.adv h3 { font-size: 20px; margin-bottom: 8px; }
.adv-badge { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 3px 8px; border-radius: 3px; margin-bottom: 10px; }
.adv p { font-size: 14.5px; color: var(--ink-2); }

.empty { padding: 60px 0; text-align: center; color: var(--muted); display: grid; gap: 14px; justify-items: center; }

/* Final y pie */
.final { background: var(--ink); color: #fff; }
.final-in { max-width: 1320px; margin: 0 auto; padding: 72px 24px; }
.final h2 { font-size: clamp(32px, 4.4vw, 56px); margin: 16px 0 14px; }
.final p { color: rgba(255, 255, 255, .72); max-width: 520px; margin-bottom: 26px; }
.foot { border-top: 1px solid var(--line); background: #fff; }
.foot-in { max-width: 1320px; margin: 0 auto; padding: 32px 24px 40px; display: grid; gap: 10px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--ink); }
.foot .logo { height: 34px; margin-bottom: 6px; }

/* Barra móvil */
.mbar { display: none; }

/* Panel resumen */
.summary { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.summary.is-open { visibility: visible; }
.sum-backdrop { position: absolute; inset: 0; background: rgba(20, 18, 18, .5); opacity: 0; transition: opacity .25s; }
.summary.is-open .sum-backdrop { opacity: 1; }
.sum-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: #fff; overflow-y: auto; padding: 0 32px 48px; transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain; }
.summary.is-open .sum-panel { transform: none; }
.sum-head { position: sticky; top: 0; background: #fff; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 24px 0 16px; border-bottom: 1px solid var(--line); }
.sum-head h2 { font-size: 32px; margin-top: 6px; }
.sum-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; display: grid; place-items: center; }
.sum-close svg, .lb-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.print-head { display: none; }
.sum-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0 16px; }
.stat { background: var(--alt); border-radius: 8px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--font-h); font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); line-height: 1.3; display: block; }
.pending-box { border: 1px solid #efd3bd; background: #fdf5ee; border-radius: 8px; padding: 14px 16px; font-size: 14px; }
.pending-box.is-ok { border-color: #c9e0cf; background: var(--ok-soft); color: var(--ok); }
.pending-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pending-links a { font-size: 12.5px; background: #fff; border: 1px solid #efd3bd; border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.pending-links span { font-size: 12.5px; color: var(--muted); padding: 3px 4px; }
.sum-ch { margin-top: 26px; }
.sum-ch h3 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); font-family: var(--font-b); font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.sum-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sum-table th, .sum-table td { text-align: left; vertical-align: top; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.sum-table th { width: 34%; font-weight: 600; }
.sum-code { font-family: var(--font-h); font-size: 11.5px; color: var(--bronze); margin-right: 4px; }
.sum-g { color: var(--muted); width: 30%; }
.sum-v { font-weight: 600; }
.is-pending .sum-v a { color: var(--rust); }
.sum-note td { font-style: italic; color: var(--ink-2); font-size: 13.5px; background: var(--alt); }

.send { margin-top: 36px; padding: 24px; border-radius: 10px; background: var(--alt); border: 1px solid var(--line); }
.send h3 { font-size: 24px; margin-bottom: 6px; }
.send .muted { font-size: 14px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.fields label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; }
.fields .full { grid-column: 1 / -1; }
.fields input, .fields textarea { width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 12px; font: inherit; font-size: 16px; font-weight: 400; background: #fff; color: var(--ink); }
.fields textarea { height: auto; padding: 10px 12px; resize: vertical; }
.fields input:focus, .fields textarea:focus { outline: none; border-color: var(--ink); }
.fields .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.fields .check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--ink); }
.hp { position: absolute !important; left: -9999px; }
.send-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.form-msg:empty { display: none; }
.form-msg { margin-top: 16px; padding: 12px 14px; border-radius: 6px; font-size: 14.5px; }
.form-msg.is-ok { background: var(--ok-soft); color: var(--ok); }
.form-msg.is-err { background: #fdf0ec; color: #8d2b10; }
.sent-info { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.reset { margin-top: 18px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }

/* Visor de imagen */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(15, 14, 14, .92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 1200px; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 4px; }
.lightbox figcaption { color: rgba(255, 255, 255, .75); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; text-align: center; margin-top: 12px; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 95; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── Fotos en las opciones ── */
.opt-sw.is-photo img { transition: transform .4s ease; }
.opt:hover .opt-sw.is-photo img { transform: scale(1.04); }
.src-badge { position: absolute; left: 6px; bottom: 6px; z-index: 1; font-size: 10px; font-weight: 600; letter-spacing: .02em; line-height: 1; padding: 4px 6px; border-radius: 3px; background: rgba(255, 255, 255, .92); color: var(--ink); max-width: calc(100% - 44px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-badge.src-obra { background: rgba(33, 30, 30, .82); color: #fff; }
.src-badge.src-prov { background: rgba(243, 238, 230, .95); color: var(--bronze); }
.fig .src-badge { left: 8px; bottom: 8px; }
.zoom { position: relative; }
.opt-zoom { position: absolute; right: 6px; bottom: 6px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; cursor: zoom-in; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.opt-zoom svg { position: static !important; width: 16px !important; height: 16px !important; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.opt-zoom:hover { background: #fff; }
.plain { background: var(--sand-soft); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.plain-k { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--bronze); margin-bottom: 4px; }
.plain p { font-size: 15.5px !important; color: var(--ink) !important; }


/* ── Secciones nuevas ── */
.sec-in { max-width: 1320px; margin: 0 auto; padding: 72px 24px; }
.sec-head { max-width: 720px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 48px); margin: 12px 0 10px; }
.sec-lede { color: var(--muted); font-size: 17px; }
.fine { font-size: 13px; color: var(--muted); margin-top: 16px !important; max-width: 760px; }
.imagina { background: #fff; }
.gtabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.gtabs::-webkit-scrollbar { display: none; }
.gtab { flex: none; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; min-height: 40px; }
.gtab small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.gtab[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.gtab[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }
.gal { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 10px; }
.gal-item { position: relative; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--alt); cursor: zoom-in; }
.gal-item.is-big { grid-column: span 2; grid-row: span 2; }
.gal-item.is-wide { grid-column: span 2; }
.gal { grid-auto-flow: dense; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gal-item:hover img { transform: scale(1.04); }
.gal-place { position: absolute; left: 10px; bottom: 10px; background: rgba(33, 30, 30, .78); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 4px; }
.proceso { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; counter-reset: st; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.step-img { position: relative; padding: 0; border: 0; display: block; aspect-ratio: 4 / 3; overflow: hidden; cursor: zoom-in; background: var(--alt); }
.step-img img { width: 100%; height: 100%; object-fit: cover; }
.step-n { position: absolute; left: 10px; top: 10px; font-family: var(--font-h); font-weight: 800; font-size: 15px; background: var(--ink); color: #fff; border-radius: 4px; padding: 3px 8px; }
.step-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.step-body h3 { font-size: 17px; }
.step-body p { font-size: 13.5px; color: var(--muted); flex: 1; }
.step-body a { font-size: 13px; font-weight: 600; color: var(--bronze); text-decoration: none; }
.step-body a:hover { text-decoration: underline; }
.room-banner { position: relative; border-radius: 12px; overflow: hidden; height: 260px; margin-bottom: 24px; background: #222; }
.room-banner img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.room-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 18, 18, .75), rgba(20, 18, 18, 0) 65%); }
.room-banner-txt { position: absolute; left: 24px; bottom: 20px; z-index: 1; color: #fff; }
.room-banner-txt h2 { font-size: clamp(28px, 3.6vw, 42px); margin-top: 8px; }
.glosario { background: #fff; border-top: 1px solid var(--line); }
.gl { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; margin: 0; }
.gl-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.gl dt { font-family: var(--font-h); font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.gl dd { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.credits { margin-top: 10px; font-size: 12.5px; }
.credits summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.credits p { margin: 8px 0 !important; }
.credits ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.lb-nav { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); place-items: center; }
.lightbox.has-nav .lb-nav { display: grid; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-nav svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1080px) {
  .steps-line { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gal { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; }
}
@media (max-width: 640px) {
  .sec-in { padding: 48px 16px; }
  .steps-line { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .steps-line::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 78%; scroll-snap-align: start; }
  .gal { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: 8px; }
  .room-banner { height: 180px; }
  .lb-nav { width: 40px; height: 40px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .src-badge { font-size: 9px; }
}

/* ── Modo catálogo: solo recorrer y probar opciones ── */
.only-catalog { display: none; }
.is-catalog .only-catalog { display: revert; }
.is-catalog .hero-cta.only-catalog, .is-catalog .steps.only-catalog { display: flex; }
.is-catalog .steps.only-catalog { display: grid; }
.is-catalog .only-full,
.is-catalog [data-open-summary],
.is-catalog .top-progress,
.is-catalog .side-card,
.is-catalog .mbar,
.is-catalog .std-btn,
.is-catalog .toc-st,
.is-catalog .notes-wrap { display: none !important; }
.is-catalog .final-in .hero-cta { margin-top: 0; }
.status-choice { background: var(--sand-soft); color: var(--bronze); }
.status-incl { background: var(--ok-soft); color: var(--ok); }
.count-dot { font-size: 12px; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { display: none; }
  .chips { display: flex; }
  :root { --tool-h: 104px; }
}
@media (max-width: 820px) {
  .how-in { grid-template-columns: 1fr; padding: 40px 16px; }
  .item.has-media .item-grid { grid-template-columns: 1fr; }
  .item-media { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .sum-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --top-h: 56px; --tool-h: 100px; }
  .top-in, .toolbar-in, .hero-in, .final-in, .foot-in, .layout { padding-left: 16px; padding-right: 16px; }
  .top-in { gap: 12px; }
  .top-progress, .top .btn { display: none; }
  .logo { height: 34px; }
  .hero-in { padding-top: 64px; padding-bottom: 56px; }
  .hero::after { background: linear-gradient(180deg, rgba(20, 18, 18, .6), rgba(20, 18, 18, .9)); }
  .toolbar-in { gap: 8px; min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .hide-s { display: none; }
  .view-btn { padding: 6px 10px; font-size: 13.5px; min-height: 34px; text-transform: capitalize; }
  .search { max-width: none; min-width: 0; }
  .search input { height: 40px; font-size: 16px; padding-left: 34px; }
  .search svg { left: 10px; }
  .chips { padding-bottom: 8px; }
  .chapter { padding-top: 28px; }
  .ch-head { grid-template-columns: 1fr; }
  .ch-num { font-size: 48px; }
  .std-btn { justify-self: start; }
  .item { padding: 18px 16px; border-radius: 8px; margin-left: -4px; margin-right: -4px; }
  .item h3 { font-size: 19px; }
  .item-head { flex-wrap: wrap; gap: 10px; }
  .options, .options.has-desc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .opt-desc { font-size: 12.5px; }
  main { padding-bottom: 120px; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 14px; align-items: center; box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); }
  .mbar-p { flex: 1; font-size: 13px; }
  .mbar-p b { display: block; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
  .toast { bottom: 84px; }
  .sum-panel { padding: 0 16px 40px; }
  .sum-head h2 { font-size: 26px; }
  .fields { grid-template-columns: 1fr; }
  .sum-table th { width: auto; }
  .sum-table, .sum-table tbody, .sum-table tr { display: block; }
  .sum-table tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
  .sum-table th { grid-column: 1 / -1; border: 0; padding-bottom: 0; }
  .sum-table td { border: 0; }
  .sum-note td { grid-column: 1 / -1; }
  .send { padding: 18px 16px; }
  .send-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ── Impresión: solo el resumen ── */
@media print {
  @page { margin: 14mm; }
  body > *:not(.summary) { display: none !important; }
  .summary, .summary.is-open { position: static; visibility: visible; }
  .sum-backdrop, .sum-head, .send, #sum-pending .pending-links { display: none !important; }
  .sum-panel { position: static; transform: none; width: auto; padding: 0; overflow: visible; }
  .print-head { display: flex; align-items: center; gap: 18px; border-bottom: 2px solid #000; padding-bottom: 12px; }
  .print-head .logo { height: 40px; }
  .print-head b { display: block; font-size: 15px; }
  .print-head span { display: block; font-size: 12px; color: #555; }
  .sum-stats { grid-template-columns: repeat(4, 1fr); }
  .stat { border: 1px solid #ddd; background: none; }
  .sum-ch { break-inside: avoid-page; }
  .sum-table tr { break-inside: avoid; }
  .sum-table, .sum-table tbody { display: table-row-group; }
  .sum-table { display: table; }
  .sum-table tr { display: table-row; }
  .tag { border: 1px solid currentColor; }
}
