/* ==========================================================================
   Puebler · Hoja de estilos
   Diseño plano y editorial (sin degradados). Contenido a pantalla completa,
   separado por líneas y no encerrado en tarjetas.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f6f6f3;
  --surface-2: #eeeeea;
  --ink: #1f2328;
  --ink-soft: #3b4148;
  --muted: #6b7280;
  --line: #e3e3de;
  --accent: #1B4332;
  --accent-2: #2D6A4F;
  --accent-ink: #ffffff;
  --link: #2D6A4F;
  --gold: #D4A017;
  --night: #1B2433;
  --red: #B5121B;
  --leaf: #52B788;
  --header-h: 128px;
  color-scheme: light;
}
[data-mode="dark"] {
  --bg: #10151d;
  --surface: #161d28;
  --surface-2: #1d2633;
  --ink: #e7e9ec;
  --ink-soft: #c9cdd3;
  --muted: #9aa3ae;
  --line: #273142;
  --accent: #52B788;
  --accent-2: #74c69d;
  --accent-ink: #0d1a13;
  --link: #74c69d;
  color-scheme: dark;
}
html.hc { --muted: #2b2b2b; --line: #000; --ink: #000; --bg: #fff; --surface: #fff; --link: #003d1f; }
html.hc[data-mode="dark"] { --muted: #f0f0f0; --line: #fff; --ink: #fff; --bg: #000; --surface: #000; --link: #b7f5cf; }
html.hc a { text-decoration: underline; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Roboto', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  padding-bottom: 72px;
}
@media (min-width: 768px) { body { padding-bottom: 0; } }
a { color: inherit; }
img { max-width: 100%; }
.ico { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.wrap { max-width: 1280px; margin: 0 auto; }
.muted { color: var(--muted); }
.line { border-color: var(--line) !important; }
.line-bg { background: var(--line); }
.surface { background: var(--surface); }
.ink-soft { color: var(--ink-soft); }
.accent { color: var(--accent); }
.text-link { color: var(--link); }
.text-link:hover { text-decoration: underline; }
.font-slab { font-family: 'Roboto Slab', Georgia, serif; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--gold); color: var(--night); padding: 8px 14px; font-weight: 700; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── Encabezado ─────────────────────────────────────────── */
.site-header { background: var(--night); color: #fff; position: relative; z-index: 40; }
.header-search { align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 0 12px; height: 40px; }
.header-search input { flex: 1; background: transparent; border: 0; color: #fff; outline: none; font-size: 14px; }
.header-search input::placeholder { color: rgba(255,255,255,.5); }
.hdr-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #fff; background: transparent; border: 0; cursor: pointer; }
.hdr-btn:hover { background: rgba(255,255,255,.08); }
[data-mode="dark"] .i-moon, [data-mode="light"] .i-sun { display: none; }
.notif-dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.btn-seal { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--night); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; text-decoration: none; border: 0; cursor: pointer; }
.btn-seal:hover { background: #e3b02a; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu-panel { position: absolute; right: 0; top: 48px; width: 260px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 18px 40px -12px rgba(0,0,0,.35); z-index: 60; }
.user-menu-panel a, .user-menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; font-size: 14px; text-decoration: none; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; }
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--surface); }

.main-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a { display: block; padding-bottom: 10px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; text-decoration: none; color: rgba(255,255,255,.82); border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #fff; }
.main-nav a.is-active { color: #fff; border-bottom-color: #fff; }
.main-nav li + li.sep a { border-left: 1px solid #4b5563; padding-left: 24px; }

/* ── Migas de pan ──────────────────────────────────────── */
.crumbs { background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 11px; color: var(--muted); }
.crumbs .wrap { display: flex; flex-wrap: wrap; align-items: center; }
.crumb { text-decoration: none; }
.crumb:not(.is-current):hover { text-decoration: underline; }
.crumb::after { content: '>'; margin: 0 8px; color: #b8b8b8; }
.crumb:last-child::after { content: ''; }
.crumb.is-current { font-weight: 600; color: var(--ink); }

/* ── Hero editorial ────────────────────────────────────── */
.hero { position: relative; height: 18rem; overflow: hidden; background: #000; }
@media (min-width: 768px) { .hero { height: 21rem; } }
.hero > img, .hero > .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.hero-inner { position: absolute; inset: 0; display: flex; align-items: center; }
.hero-panel { background: rgba(255,255,255,.92); color: #111827; padding: 28px 32px; max-width: 42rem; }
.hero-panel h1, .hero-panel h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; font-weight: 700; text-transform: uppercase; }
.hero-bar { width: 64px; height: 4px; background: #9ca3af; margin-top: 16px; }

/* ── Títulos y bloques editoriales ─────────────────────── */
.side-title { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; padding-bottom: 8px; margin-bottom: 20px; border-bottom: 3px solid var(--ink); }
.sec-title { font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 18px; }
.sec-title-accent { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; letter-spacing: -.01em; }
.bar-title { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; border-left: 4px solid var(--accent); padding-left: 12px; margin-bottom: 18px; }
.accent-box { background: var(--surface); border-left: 4px solid var(--accent); padding: 16px; }
.accent-box h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.rule { height: 1px; background: var(--line); border: 0; margin: 24px 0; }
.mini-bar { width: 40px; height: 2px; background: var(--accent); margin-bottom: 12px; }
.side-links li { font-weight: 600; }
.side-links a { text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.side-links a:hover, .side-links a.is-active { color: var(--accent); }
.kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

/* ── Botones y formularios ─────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; border: 1px solid transparent; border-radius: 2px; cursor: pointer; text-decoration: none; line-height: 1.2; background: transparent; color: inherit; transition: background .15s ease, color .15s ease; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-dark { background: var(--night); color: #fff; }
.btn-dark:hover { background: #26324a; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: #991b1b; color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: inherit; cursor: pointer; text-decoration: none; }
.chip.is-on, .chip:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.field { display: block; margin-bottom: 16px; }
.field > span:first-child, .label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.inp, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px;
}
.field textarea { min-height: 110px; resize: vertical; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.err { font-size: 12px; color: #b91c1c; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.file-drop { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed var(--line); background: var(--surface); cursor: pointer; }
.file-drop input { font-size: 13px; }

/* ── Tabla ────────────────────────────────────────────── */
.tbl { width: 100%; font-size: 14px; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); background: var(--surface); padding: 12px 14px; font-weight: 700; }
.tbl td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: var(--surface); }

.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; color: #fff; border-radius: 2px; }

/* ── Diseño principal: mapa 60% + feed 40% ─────────────── */
.app-split { display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .app-split { grid-template-columns: 3fr 2fr; height: calc(100vh - var(--header-h)); }
  .app-split > .app-map { height: 100%; position: relative; }
  .app-split > .app-feed { height: 100%; overflow-y: auto; border-left: 1px solid var(--line); }
}
.app-map { height: 46vh; position: relative; background: var(--surface-2); }
.map-canvas { position: absolute; inset: 0; }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; font-size: 12px; max-width: 240px; }
.map-legend .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: middle; }
.map-tools { position: absolute; right: 12px; top: 12px; z-index: 500; display: flex; flex-direction: column; gap: 6px; }
.map-tools button { background: var(--bg); color: var(--ink); border: 1px solid var(--line); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.map-grey .leaflet-tile-pane { filter: grayscale(1) contrast(.95); }
.leaflet-container { font-family: 'Roboto', sans-serif; background: var(--surface-2); }
.pb-pin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pb-gem { width: 22px; height: 22px; }
.pb-avatar { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--gold); overflow: hidden; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.leaflet-popup-content a { color: var(--accent-2); font-weight: 600; }

.feed-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 0; background: var(--bg); z-index: 5; scrollbar-width: none; }
.feed-tabs a { padding: 14px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.feed-tabs a.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* ── Publicación (sin tarjeta: a pantalla, separada por líneas) ─ */
.post { border-bottom: 1px solid var(--line); padding: 20px 16px; position: relative; }
@media (min-width: 768px) { .post { padding: 24px 20px; } }
.post:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.post-head { display: flex; align-items: flex-start; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 120px; height: 120px; border: 4px solid var(--bg); }
.who { min-width: 0; flex: 1; }
.who-name { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.who-name:hover { text-decoration: underline; }
.who-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.badges { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.badge { display: inline-block; flex-shrink: 0; }
[data-mode="dark"] .badge .badge-stroke { stroke: #e7e9ec !important; }
.company-chip { display: inline-flex; width: 16px; height: 16px; border-radius: 3px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.company-chip img { width: 100%; height: 100%; object-fit: cover; }
.type-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--tag, var(--accent)); }
.type-tag::before { content: ''; width: 16px; height: 2px; background: currentColor; }
[data-mode="dark"] .type-tag { filter: brightness(1.7); }
.post-title { font-size: 1.2rem; font-weight: 700; margin: 10px 0 6px; line-height: 1.25; }
.post-title a { text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.post-body { color: var(--ink-soft); font-size: 15px; }
.post-body p { margin: 0 0 10px; }
.post-body a.mention, .post-body a.tag { color: var(--link); text-decoration: none; font-weight: 500; }
.post-media { margin: 14px -16px 0; display: grid; gap: 2px; }
@media (min-width: 768px) { .post-media { margin: 14px 0 0; } }
.post-media.n2 { grid-template-columns: 1fr 1fr; }
.post-media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media.n3 a:first-child { grid-row: span 2; }
.post-media.n4 { grid-template-columns: 1fr 1fr; }
.post-media a { display: block; overflow: hidden; background: var(--surface-2); }
.post-media img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; display: block; transition: transform .5s ease; }
.post-media.n1 img { aspect-ratio: 4 / 3; }
.post-media a:hover img { transform: scale(1.03); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 10px 12px 10px 0; }
.facts dt { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.place-line { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--link); text-decoration: none; font-weight: 500; }
.place-line:hover { text-decoration: underline; }
.gem-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #8a6a00; text-transform: uppercase; letter-spacing: .08em; }
[data-mode="dark"] .gem-tag { color: var(--gold); }
.stamp-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.stamp-state.ok { color: #1B4332; }
[data-mode="dark"] .stamp-state.ok { color: var(--leaf); }
.stamp-state.pending { color: #a16207; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 14px; }
.act { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 13px; color: var(--ink-soft); background: transparent; border: 0; cursor: pointer; border-radius: 2px; text-decoration: none; }
.act:hover { background: var(--surface-2); color: var(--ink); }
.act.is-on { color: var(--accent); font-weight: 700; }
.act .n { font-variant-numeric: tabular-nums; }
.react-wrap { position: relative; }
.react-pop { position: absolute; bottom: 100%; left: 0; display: none; gap: 2px; padding: 6px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); z-index: 20; }
.react-wrap:hover .react-pop, .react-wrap:focus-within .react-pop, .react-pop.open { display: flex; }
.react-pop button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; font-size: 10px; background: none; border: 0; cursor: pointer; color: var(--ink-soft); min-width: 62px; }
.react-pop button:hover, .react-pop button.is-on { background: var(--surface); color: var(--accent); }
.react-summary { font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.react-summary span { display: inline-flex; align-items: center; gap: 4px; }
.reshare-note { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.embedded { border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin-top: 10px; }

/* Comentarios */
.comments { margin-top: 18px; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.comment .c-body { font-size: 14px; color: var(--ink-soft); }
.comment.is-best { background: color-mix(in srgb, var(--gold) 9%, transparent); margin: 0 -12px; padding: 12px; }
.comment .replies { margin-top: 6px; }
.best-label { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a6a00; display: inline-flex; gap: 4px; align-items: center; }
.useful-label { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

/* ── Perfil ───────────────────────────────────────────── */
.profile-cover { position: relative; height: 15rem; background: var(--night); overflow: hidden; }
@media (min-width: 768px) { .profile-cover { height: 19rem; } }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.profile-head { position: relative; margin-top: -64px; }
.stat-strip { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-strip > * { padding: 12px 18px 12px 0; margin-right: 18px; text-decoration: none; }
.stat-strip b { display: block; font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.stat-strip span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.level-bar { height: 6px; background: var(--surface-2); overflow: hidden; }
.level-bar > div { height: 100%; background: var(--accent); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.styles-list { display: flex; flex-wrap: wrap; gap: 6px; }
.style-tag { font-size: 12px; padding: 3px 9px; background: var(--surface-2); border-radius: 999px; }
.progress-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.progress-row .level-bar { grid-column: 1 / -1; height: 4px; }
.done-mark { color: var(--accent); }

/* ── Pasaporte ────────────────────────────────────────── */
.vault { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 20px; scrollbar-width: thin; }
.vault > * { scroll-snap-align: center; flex-shrink: 0; }
.passport-cover {
  --leather: #5C381E; --gold: #D4A017;
  position: relative; display: block; width: 300px; height: 420px; border: 0; padding: 0; cursor: pointer;
  border-radius: 6px 18px 18px 6px; overflow: hidden; background-color: var(--leather); color: var(--gold); text-decoration: none;
  box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 20px 40px -12px rgba(30,20,10,.55); transition: transform .25s ease;
}
.passport-cover:hover { transform: translateY(-3px) rotate(-.4deg); }
.passport-cover.sm { width: 210px; height: 296px; }
.leather-tex { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; mix-blend-mode: multiply; }
.p-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: rgba(0,0,0,.32); border-right: 1px solid rgba(255,255,255,.08); }
.p-stitch { position: absolute; left: 30px; top: 12px; bottom: 12px; right: 12px; border: 1.5px dashed color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 4px 12px 12px 4px; }
.p-frame { position: absolute; left: 40px; top: 24px; bottom: 24px; right: 22px; border: 1px solid color-mix(in srgb, var(--gold) 75%, transparent); box-shadow: inset 0 0 0 4px rgba(0,0,0,.14), inset 0 0 0 5px color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 2px 8px 8px 2px; }
.p-content { position: absolute; left: 40px; right: 22px; top: 24px; bottom: 24px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 22px 10px 18px; text-align: center; }
.p-gold { color: var(--gold); text-shadow: 0 1.5px 0 rgba(0,0,0,.55); }
.p-republic { font-size: 10px; font-weight: 800; letter-spacing: .38em; }
.p-title { font-family: 'Roboto Slab', Georgia, serif; font-size: 28px; font-weight: 800; letter-spacing: .08em; line-height: 1; }
.passport-cover.sm .p-title { font-size: 19px; }
.p-sub { font-size: 10px; font-weight: 700; letter-spacing: .28em; }
.passport-emblem { width: 150px; height: 150px; filter: drop-shadow(0 1.5px 0 rgba(0,0,0,.55)); }
.passport-cover.sm .passport-emblem { width: 100px; height: 100px; }
.p-chip { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.passport-cover.sm .p-chip span, .passport-cover.sm .p-republic { display: none; }

.passport-book { background: #F7F0DF; color: #1f160c; border-left: 12px solid var(--leather, #5E3A20); border-radius: 6px 18px 18px 6px; box-shadow: 0 14px 30px rgba(60,35,15,.18); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='28'%3E%3Crect y='27' width='8' height='1' fill='%237a4e2d' fill-opacity='.07'/%3E%3C/svg%3E"); }
.passport-book.opening { animation: abrir .6s cubic-bezier(.2,.8,.2,1) both; transform-origin: left center; }
@keyframes abrir { from { opacity: 0; transform: perspective(1200px) rotateY(-70deg); } to { opacity: 1; transform: none; } }
.pb-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px dashed #C9B48F; }
.pb-head span { font-family: 'Roboto Slab', Georgia, serif; font-size: 13px; font-weight: 800; letter-spacing: .16em; color: #5E3A20; }
.holder { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px dashed #C9B48F; }
.holder img { width: 72px; height: 86px; object-fit: cover; border-radius: 6px; border: 2px solid #C9B48F; }
.holder .lbl { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #7A5A3A; }
.holder .nm { font-family: 'Roboto Slab', Georgia, serif; font-size: 20px; font-weight: 800; }
.pb-bar { height: 6px; border-radius: 999px; background: #E6DCC4; overflow: hidden; }
.pb-bar > div { height: 100%; background: #2D9D5F; border-radius: 999px; }
.dept-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.dept-pages::-webkit-scrollbar { display: none; }
.dept-page { flex: 0 0 100%; scroll-snap-align: start; padding: 18px 20px 24px; }
.dept-page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.dept-page-head h3 { margin: 0; font-family: 'Roboto Slab', Georgia, serif; font-size: 17px; font-weight: 800; color: var(--ink-c, #3A2E22); }
.dept-elements { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: #6B5A45; margin-bottom: 14px; }
.dept-elements span { display: inline-flex; align-items: center; gap: 4px; }
.sub-progress { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; margin-bottom: 18px; font-size: 11px; color: #4a3b2a; }
.sub-progress .pb-bar { height: 4px; margin-top: 3px; }
.stamps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
@media (min-width: 560px) { .stamps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stamps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stamp-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; text-decoration: none; color: #3A2E22; }
.stamp-cell > span { font-size: 12px; font-weight: 700; }
.stamp-cell small { font-size: 10px; color: #7A5A3A; }
.stamp-svg { width: 118px; height: 118px; opacity: .93; transition: transform .2s ease; }
a.stamp-cell:hover .stamp-svg { transform: scale(1.07) rotate(0deg) !important; opacity: 1; }
.stamp-pending { width: 112px; height: 112px; border-radius: 50%; border: 2px dashed #C9B48F; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 800; letter-spacing: .06em; color: #6B5A45; overflow: hidden; position: relative; }
.stamp-pending img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) sepia(.35); opacity: .28; }
.stamp-pending span { position: relative; }
.page-dots { display: flex; justify-content: center; gap: 6px; padding: 0 0 16px; }
.page-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: #C9B48F; cursor: pointer; padding: 0; }
.page-dots button.is-on { background: #5E3A20; width: 22px; border-radius: 4px; }
.pager-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #C9B48F; background: transparent; color: #5E3A20; border-radius: 50%; cursor: pointer; }
.big-stamp { width: 160px; height: 160px; }

/* ── Pasabordo ────────────────────────────────────────── */
.bpass { display: flex; max-width: 460px; background: #fafbfc; color: #0b1d3a; border: 1px solid #cbd5e1; border-radius: 22px; overflow: hidden; box-shadow: 0 25px 50px -20px rgba(0,0,0,.45); font-family: 'Roboto', sans-serif; }
.bpass-main { flex: 1; padding: 18px 20px; border-right: 2px dashed #cbd5e1; display: flex; flex-direction: column; min-width: 0; }
.bpass-top { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #0b1d3a; padding-bottom: 12px; }
.bpass-top svg.bc { width: 54px; height: 54px; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 4px; }
.bpass-grid { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; }
.bpass-grid dt { font-size: 8px; font-weight: 800; letter-spacing: .12em; color: #64748b; }
.bpass-grid dd { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpass-title { text-align: center; margin: 12px 0 4px; }
.bpass-title h3 { margin: 0; font-family: 'Roboto Slab', Georgia, serif; font-size: 28px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; line-height: 1.05; }
.bpass-route { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; background: #0b1d3a; color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.bpass-photo { position: relative; margin: 14px auto 10px; width: 200px; height: 200px; border: 4px solid #0b1d3a; border-radius: 16px; overflow: hidden; background: #e2e8f0; }
.bpass-photo img { width: 100%; height: 100%; object-fit: cover; }
.bpass-mode { position: absolute; left: -2px; bottom: -2px; background: #1d4ed8; color: #fff; border: 2px solid #fff; border-radius: 12px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 900; letter-spacing: .1em; transform: rotate(-8deg); }
.bpass-stamp { position: absolute; right: -2px; bottom: -4px; background: #fef08a; border: 1px solid #334155; padding: 5px 8px; font-size: 9px; font-weight: 800; text-align: center; transform: rotate(5deg); max-width: 120px; line-height: 1.2; }
.bpass-foot { border-top: 1px solid #cbd5e1; padding-top: 10px; margin-top: auto; }
.bpass-foot .bcl { background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 4px; display: block; }
.bpass-foot .bcl svg { width: 100%; height: 44px; display: block; }
.bpass-side { width: 66px; background: #F2B632; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 16px 0 0; position: relative; }
.bpass-side .vt { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; letter-spacing: .3em; font-size: 10px; }
.bpass-side .vt.big { font-family: 'Roboto Slab', Georgia, serif; font-size: 15px; letter-spacing: .3em; }
.bpass-side .red { width: 100%; background: #B5121B; color: #fff; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; border-top: 2px dashed #7f1d1d; font-size: 6.5px; font-weight: 900; text-align: center; text-transform: uppercase; }
.bpass-notch { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); right: -11px; }

/* ── Baúl ─────────────────────────────────────────────── */
.capsule-lock { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--surface); border-left: 4px solid #6B4226; margin-top: 12px; }
.capsule-lock .ico { color: #6B4226; }
[data-mode="dark"] .capsule-lock .ico { color: var(--gold); }

/* ── Sellar (formulario) ──────────────────────────────── */
.type-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .type-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.type-picker a { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; text-decoration: none; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.type-picker a:hover, .type-picker a.is-active { background: var(--surface); }
.type-picker a.is-active { box-shadow: inset 0 -3px 0 var(--tag); }
.type-picker b { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--tag); }
[data-mode="dark"] .type-picker b { filter: brightness(1.7); }
.type-picker small { font-size: 12px; color: var(--muted); }
.evidence { display: grid; gap: 0; border-top: 1px solid var(--line); }
.evidence > div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.evidence .st { margin-left: auto; font-size: 12px; font-weight: 700; white-space: nowrap; }
.evidence .st.ok { color: var(--accent); }
.evidence .st.no { color: var(--muted); }
.score-meter { height: 8px; background: var(--surface-2); position: relative; }
.score-meter > div { height: 100%; background: var(--accent); }
.score-meter::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: 60%; width: 2px; background: var(--ink); }
.transport-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.transport-picker label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--line); cursor: pointer; font-size: 11px; text-align: center; }
.transport-picker input { position: absolute; opacity: 0; }
.transport-picker label:has(input:checked) { border-color: var(--accent); background: var(--surface); color: var(--accent); font-weight: 700; }

/* ── Logros y rutas ───────────────────────────────────── */
.ach-list > div { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ach-list .locked { opacity: .7; }
.route-row { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.route-steps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.route-steps span { font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; display: inline-flex; gap: 4px; align-items: center; }
.route-steps span.ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ── Radar ────────────────────────────────────────────── */
.radar-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.radar-ring { width: 220px; height: 220px; border-radius: 50%; border: 1px solid var(--line); position: relative; margin: 0 auto; }
.radar-ring::before, .radar-ring::after { content: ''; position: absolute; inset: 30px; border-radius: 50%; border: 1px solid var(--line); }
.radar-ring::after { inset: 70px; }
.radar-sweep { position: absolute; left: 50%; top: 50%; width: 50%; height: 2px; background: var(--accent); transform-origin: 0 50%; animation: sweep 3.2s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* ── Verificación ─────────────────────────────────────── */
.timeline-v { border-left: 2px solid var(--line); margin-left: 8px; }
.timeline-v > div { position: relative; padding: 0 0 22px 22px; }
.timeline-v > div::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.timeline-v > div.ev-admin::before { border-color: #C2410C; }
.timeline-v > div.ev-ok::before { background: var(--accent); border-color: var(--accent); }
.req-list li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 14px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ── Navegación inferior (móvil) ──────────────────────── */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: var(--bg); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .bottom-nav { display: none; } }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; text-decoration: none; color: var(--muted); }
.bottom-nav a.is-active { color: var(--accent); font-weight: 700; }
.bottom-nav .bn-seal { width: 58px; height: 58px; margin: -26px auto 0; border-radius: 50%; background: var(--gold); color: var(--night); justify-content: center; box-shadow: 0 8px 20px -6px rgba(0,0,0,.45); border: 4px solid var(--bg); }

/* ── Notificaciones, toasts, panel accesibilidad ──────── */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 520px); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: 14px; font-weight: 500; background: var(--night); color: #fff; box-shadow: 0 18px 40px -12px rgba(0,0,0,.5); border-left: 4px solid var(--gold); animation: tin .25s ease; }
.toast-success { border-left-color: var(--leaf); }
.toast-error { border-left-color: #ef4444; }
.toast-x { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.offline-bar { display: flex; align-items: center; justify-content: center; gap: 8px; background: #7c2d12; color: #fff; font-size: 13px; padding: 8px 12px; }
.a11y-panel { position: fixed; right: 16px; top: 70px; z-index: 1500; width: 300px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 18px 40px -12px rgba(0,0,0,.4); padding: 16px; }
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.notif.unread { background: color-mix(in srgb, var(--leaf) 8%, transparent); }
.notif .ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--accent); flex-shrink: 0; }

/* ── Pie ──────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 80px; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.foot-title { font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; margin-bottom: 4px; }

/* ── Utilidades varias ────────────────────────────────── */
.hover-lift { transition: transform .2s ease; }
.hover-lift:hover { transform: translateY(-4px); }
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform .5s ease; }
.img-zoom:hover img { transform: scale(1.05); }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty .ico { width: 40px; height: 40px; margin-bottom: 10px; color: var(--line); }
.prose-legal h2 { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; margin: 32px 0 10px; }
.prose-legal p, .prose-legal li { color: var(--ink-soft); font-size: 15px; }
.prose-legal ul { padding-left: 20px; list-style: disc; }
.prose-legal ol { padding-left: 20px; list-style: decimal; }
.load-more { display: block; width: 100%; padding: 18px; text-align: center; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: none; border: 0; color: var(--link); cursor: pointer; }
.qr-box { background: #fff; padding: 12px; display: inline-block; border: 1px solid var(--line); }
.postcard { width: 100%; max-width: 860px; aspect-ratio: 3 / 2; background: #FBF7EC; color: #2b2116; display: grid; grid-template-columns: 1.25fr 1fr; border: 1px solid #e0d6bd; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.postcard .pc-img { position: relative; overflow: hidden; }
.postcard .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.postcard .pc-text { padding: 26px; display: flex; flex-direction: column; border-left: 1px dashed #c9b48f; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
html.reduce-motion *, html.reduce-motion *::before { animation: none !important; transition: none !important; }

@media print {
  .site-header, .bottom-nav, .site-footer, .crumbs, .actions, .no-print { display: none !important; }
  body { padding: 0; }
}

/* Elementos que la interfaz muestra/oculta con JS (no interfiere con las utilidades responsivas). */
.is-hidden { display: none !important; }
@media (max-width: 639px) { .btn-seal.hidden { display: none; } }
