/* =====================================================================
   PUEBLER — Sistema de diseño. Colores del logo: azul noche, rojo y blanco.
   A pantalla completa, sin tarjetas flotantes y sin degradados.
   ===================================================================== */
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../vendor/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('../vendor/fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700 800; font-display: swap; src: url('../vendor/fonts/poppins-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 600; font-display: swap; src: url('../vendor/fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 800; font-display: swap; src: url('../vendor/fonts/fraunces-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 600; font-display: swap; src: url('../vendor/fonts/fraunces-latin-600-italic.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 500; font-display: swap; src: url('../vendor/fonts/caveat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 700; font-display: swap; src: url('../vendor/fonts/caveat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Dancing Script'; font-weight: 600; font-display: swap; src: url('../vendor/fonts/dancing-script-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Special Elite'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/special-elite-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Yellowtail'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/yellowtail-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Courier Prime'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/courier-prime-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Courier Prime'; font-weight: 700; font-display: swap; src: url('../vendor/fonts/courier-prime-latin-700-normal.woff2') format('woff2'); }

:root {
  --puebler-navy: #1B2635;
  --puebler-red: #A8112B;
  --puebler-red-light: #FBEAED;
  --puebler-blue: #23466E;
  --puebler-blue-dark: #1B2635;
  --puebler-blue-light: #E8EEF6;
  --puebler-green: #2D6A4F;
  --puebler-gold: #C9A227;
  --puebler-bg: #F5F7FA;
  --puebler-surface: #FFFFFF;
  --puebler-surface-2: #F8F9FC;
  --puebler-text: #1F2733;
  --puebler-text-muted: #6F7B8B;
  --puebler-border: #E6E9EE;
  --puebler-border-soft: #EFF1F5;
  --puebler-shadow-md: 0 4px 16px rgba(27, 38, 53, .12);
  --font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sidebar-w: 256px;
  --topbar-h: 68px;
  --bottom-nav-h: 0px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --puebler-blue: #9DB9DB;
  --puebler-blue-dark: #C6D6EA;
  --puebler-blue-light: #1D2B3F;
  --puebler-red-light: #3A1820;
  --puebler-bg: #0E1520;
  --puebler-surface: #141D2B;
  --puebler-surface-2: #192435;
  --puebler-text: #E8ECF2;
  --puebler-text-muted: #94A1B3;
  --puebler-border: #26334A;
  --puebler-border-soft: #1F2B3F;
  --puebler-shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-heading); font-size: 15px; line-height: 1.55; color: var(--puebler-text); background: var(--puebler-bg); min-height: 100dvh; overflow-x: hidden; }
h1, h2, h3, h4, h5, p, ul, ol, dl, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.25; }
img, video, svg { max-width: 100%; }
img, video { height: auto; display: block; }
a { color: var(--puebler-blue); text-decoration: none; }
a:hover { color: var(--puebler-red); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--puebler-blue); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pb-skip { position: absolute; left: -999px; top: 8px; background: var(--puebler-navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 2000; }
.pb-skip:focus { left: 8px; color: #fff; }

/* ---------- Estructura: barra lateral + contenido a pantalla completa ---------- */
.pb-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--puebler-surface); border-right: 1px solid var(--puebler-border); display: flex; flex-direction: column; z-index: 300; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pb-logo { display: flex; align-items: center; gap: 12px; padding: 20px 22px 14px; font-size: 22px; font-weight: 700; color: var(--puebler-navy); letter-spacing: .2px; }
:root[data-theme="dark"] .pb-logo { color: #fff; }
.pb-logo img { width: 40px; height: 40px; border-radius: 11px; }
.pb-logo span b { color: var(--puebler-red); }
.pb-sellar { margin: 4px 16px 12px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--puebler-red); color: #fff; font-weight: 600; padding: 12px 16px; border-radius: 999px; }
.pb-sellar:hover { background: #8E0E24; color: #fff; }
.pb-menu { list-style: none; padding: 0 12px 16px; margin: 0; flex: 1; }
.pb-menu a { display: flex; align-items: center; gap: 14px; padding: 10px 14px; color: var(--puebler-text-muted); font-weight: 500; border-radius: 12px; font-size: 14.5px; position: relative; }
.pb-menu a i { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.pb-menu a:hover, .pb-menu a.active { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); }
.pb-menu a.active { font-weight: 600; }
.pb-menu a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--puebler-red); }
.pb-menu .pb-menu-sep { margin: 12px 14px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--puebler-text-muted); }
.pb-menu .pb-count { margin-left: auto; background: var(--puebler-red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.pb-shell { margin-left: var(--sidebar-w); min-height: 100dvh; display: flex; flex-direction: column; }
.pb-topbar { position: sticky; top: 0; z-index: 200; height: var(--topbar-h); background: var(--puebler-surface); border-bottom: 1px solid var(--puebler-border); display: flex; align-items: center; gap: 14px; padding: 0 24px; }
.pb-burger { display: none; width: 42px; height: 42px; border-radius: 50%; font-size: 19px; color: var(--puebler-text); flex-shrink: 0; }
.pb-burger:hover { background: var(--puebler-blue-light); }
.pb-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; background: var(--puebler-bg); border: 1px solid transparent; padding: 0 18px; height: 44px; border-radius: 999px; color: var(--puebler-text-muted); }
.pb-search:focus-within { border-color: var(--puebler-blue); background: var(--puebler-surface); }
.pb-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; color: var(--puebler-text); min-width: 0; }
.pb-top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pb-icon-btn { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 19px; color: var(--puebler-text-muted); }
.pb-icon-btn:hover { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); }
.pb-dot { position: absolute; top: 8px; right: 8px; min-width: 9px; height: 9px; background: var(--puebler-red); border-radius: 50%; border: 2px solid var(--puebler-surface); }
.pb-main { flex: 1; min-width: 0; background: var(--puebler-surface); }
.pb-backdrop { display: none; position: fixed; inset: 0; background: rgba(15, 22, 33, .5); z-index: 290; }
.pb-bottomnav { display: none; }

/* ---------- Tipografía y utilidades ---------- */
.pb-page-head { padding: 24px 28px 18px; border-bottom: 1px solid var(--puebler-border); display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.pb-page-head h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.3px; }
.pb-page-head p { color: var(--puebler-text-muted); max-width: 760px; margin-top: 4px; }
.pb-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--puebler-red); }
.pb-muted { color: var(--puebler-text-muted); }
.pb-small { font-size: .84rem; }
.pb-pad { padding: 22px 28px; }
.pb-section { padding: 22px 28px; border-bottom: 1px solid var(--puebler-border); }
.pb-section > h2, .pb-h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pb-section > h2 a, .pb-h2 a { font-size: .8rem; font-weight: 600; }
.pb-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.pb-cols > .pb-col-main { min-width: 0; border-right: 1px solid var(--puebler-border); min-height: calc(100dvh - var(--topbar-h)); }
.pb-cols > .pb-col-side { position: sticky; top: var(--topbar-h); max-height: calc(100dvh - var(--topbar-h)); overflow-y: auto; scrollbar-width: thin; }
.pb-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.pb-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; }
.pb-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pb-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pb-grow { flex: 1; min-width: 0; }
.pb-stack > * + * { margin-top: 12px; }
.pb-empty { padding: 56px 24px; text-align: center; color: var(--puebler-text-muted); }
.pb-empty i { font-size: 2.2rem; color: var(--puebler-border); display: block; margin-bottom: 12px; }
.pb-empty h3 { color: var(--puebler-text); font-size: 1.05rem; margin-bottom: 4px; }
.pb-note { padding: 12px 16px; border-left: 4px solid var(--puebler-blue); background: var(--puebler-surface-2); font-size: .88rem; }
.pb-note.is-warn { border-color: var(--puebler-gold); }
.pb-note.is-danger { border-color: var(--puebler-red); }
.pb-note.is-ok { border-color: var(--puebler-green); }

/* ---------- Botones y formularios ---------- */
.pb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: .9rem; background: var(--puebler-navy); color: #fff; border: 1px solid var(--puebler-navy); white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.pb-btn:hover { background: #111A27; color: #fff; }
:root[data-theme="dark"] .pb-btn { background: #E8ECF2; color: #141D2B; border-color: #E8ECF2; }
.pb-btn-red { background: var(--puebler-red); border-color: var(--puebler-red); color: #fff !important; }
.pb-btn-red:hover { background: #8E0E24; }
.pb-btn-ghost { background: transparent; color: var(--puebler-text); border-color: var(--puebler-border); }
:root[data-theme="dark"] .pb-btn-ghost { background: transparent; color: var(--puebler-text); border-color: var(--puebler-border); }
.pb-btn-ghost:hover { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); border-color: var(--puebler-blue-light); }
.pb-btn-sm { min-height: 34px; padding: 0 14px; font-size: .82rem; }
.pb-btn-block { width: 100%; }
.pb-btn[disabled], .pb-btn.is-disabled { opacity: .5; pointer-events: none; }
.pb-link-danger { color: var(--puebler-red); font-weight: 600; }
.pb-field { display: block; margin-bottom: 16px; }
.pb-field > span, .pb-label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 6px; }
.pb-field small { display: block; color: var(--puebler-text-muted); font-size: .78rem; margin-top: 5px; }
.pb-input, .pb-select, .pb-textarea { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--puebler-border); border-radius: 12px; background: var(--puebler-surface); color: var(--puebler-text); font-size: .92rem; }
.pb-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.pb-input:focus, .pb-select:focus, .pb-textarea:focus { outline: 0; border-color: var(--puebler-blue); box-shadow: 0 0 0 3px var(--puebler-blue-light); }
.pb-check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; margin-bottom: 12px; cursor: pointer; }
.pb-check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--puebler-navy); flex-shrink: 0; }
.pb-form { max-width: 760px; }
.pb-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.pb-switch { appearance: none; width: 46px; height: 26px; border-radius: 999px; background: var(--puebler-border); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.pb-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.pb-switch:checked { background: var(--puebler-green); }
.pb-switch:checked::after { transform: translateX(20px); }
.pb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--puebler-border); font-size: .82rem; font-weight: 600; color: var(--puebler-text); background: var(--puebler-surface); white-space: nowrap; }
a.pb-chip:hover, .pb-chip.active, label.pb-chip:has(input:checked) { background: var(--puebler-navy); border-color: var(--puebler-navy); color: #fff; }
label.pb-chip { cursor: pointer; }
label.pb-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pb-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; background: var(--puebler-blue-light); color: var(--puebler-blue-dark); white-space: nowrap; }
.pb-pill.is-ok { background: #E3F3EA; color: #1E5B40; }
.pb-pill.is-warn { background: #FBF1D3; color: #7A5B00; }
.pb-pill.is-danger { background: var(--puebler-red-light); color: var(--puebler-red); }
.pb-pill.is-gold { background: #F8EFCF; color: #7A5B00; }
:root[data-theme="dark"] .pb-pill.is-ok { background: #173326; color: #9ED9BB; }
:root[data-theme="dark"] .pb-pill.is-warn, :root[data-theme="dark"] .pb-pill.is-gold { background: #3A300F; color: #EBD58A; }
.pb-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--puebler-border); overflow-x: auto; scrollbar-width: none; background: var(--puebler-surface); }
.pb-tabs::-webkit-scrollbar { display: none; }
.pb-tabs a { padding: 14px 14px 12px; font-weight: 600; font-size: .9rem; color: var(--puebler-text-muted); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.pb-tabs a:hover { color: var(--puebler-text); }
.pb-tabs a.active { color: var(--puebler-blue-dark); border-color: var(--puebler-red); }
.pb-progress { height: 8px; border-radius: 999px; background: var(--puebler-border); overflow: hidden; }
.pb-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--puebler-green); }
.pb-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pb-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--puebler-text-muted); padding: 10px 14px; border-bottom: 1px solid var(--puebler-border); white-space: nowrap; }
.pb-table td { padding: 12px 14px; border-bottom: 1px solid var(--puebler-border-soft); vertical-align: top; }
.pb-table-wrap { overflow-x: auto; }
.pb-list { list-style: none; padding: 0; margin: 0; }
.pb-list > li, .pb-row { display: flex; gap: 14px; align-items: center; padding: 14px 28px; border-bottom: 1px solid var(--puebler-border-soft); }
.pb-row-link { color: var(--puebler-text); }
.pb-row-link:hover { background: var(--puebler-surface-2); color: var(--puebler-text); }
.pb-row h3, .pb-row h4 { font-size: .96rem; font-weight: 600; }
.pb-row p { font-size: .84rem; color: var(--puebler-text-muted); }
.pb-thumb { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--puebler-blue-light); }
.pb-icon-circle { width: 42px; height: 42px; border-radius: 50%; background: var(--puebler-blue-light); color: var(--puebler-blue-dark); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.pb-stat-row { display: flex; border-bottom: 1px solid var(--puebler-border); overflow-x: auto; scrollbar-width: none; }
.pb-stat-row > * { flex: 1 0 auto; min-width: 120px; padding: 16px 22px; border-right: 1px solid var(--puebler-border); display: flex; flex-direction: column; color: var(--puebler-text); }
.pb-stat-row > *:last-child { border-right: 0; }
.pb-stat-row strong { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.pb-stat-row span { font-size: .72rem; color: var(--puebler-text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pb-stars { color: #E0A800; font-size: .8rem; display: inline-flex; gap: 2px; }
.pb-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; font-size: .9rem; }
.pb-kv dt { color: var(--puebler-text-muted); font-weight: 600; }
.pb-kv dd { margin: 0; }
.pb-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.pb-bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.pb-bars i { display: block; width: 100%; max-width: 26px; background: var(--puebler-blue); border-radius: 4px 4px 0 0; min-height: 2px; }
.pb-bars small { font-size: .62rem; color: var(--puebler-text-muted); margin-top: 4px; }
.pb-bars b { font-size: .66rem; }

/* ---------- Avatares, rangos (nube) y checks ---------- */
.pb-avatar { position: relative; display: inline-flex; flex-shrink: 0; line-height: 0; }
.pb-avatar-img { border-radius: 50%; overflow: hidden; display: block; background: var(--puebler-blue-light); }
.pb-avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.pb-rank { position: absolute; right: -3px; bottom: -3px; border-radius: 50%; background: var(--puebler-surface); box-shadow: 0 0 0 2px var(--puebler-surface); line-height: 0; cursor: default; }
.pb-rank svg { width: 100%; height: 100%; }
.pb-cloud { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(.9); background: var(--puebler-navy); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.2; padding: 5px 10px; border-radius: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 50; }
.pb-cloud::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--puebler-navy); }
.pb-rank:hover .pb-cloud, .pb-rank:focus .pb-cloud, .pb-rank.is-open .pb-cloud { opacity: 1; transform: translateX(-50%) scale(1); }
.pb-badges { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; vertical-align: -3px; }
.pb-badge { display: inline-flex; align-items: center; gap: 3px; line-height: 0; color: #292D32; border-radius: 6px; }
:root[data-theme="dark"] .pb-badge { color: #D5DCE6; }
.pb-entity-logo { border-radius: 4px; object-fit: cover; border: 1px solid var(--puebler-border); }
.pb-uname { font-weight: 600; color: var(--puebler-text); }
.pb-uname:hover { color: var(--puebler-red); }
.pb-popover { position: absolute; z-index: 900; width: 280px; max-width: calc(100vw - 24px); background: var(--puebler-surface); border: 1px solid var(--puebler-border); border-radius: 14px; box-shadow: var(--puebler-shadow-md); padding: 14px 16px; font-size: .84rem; line-height: 1.5; }
.pb-popover h5 { font-size: .9rem; margin-bottom: 8px; }
.pb-popover dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.pb-popover dt { color: var(--puebler-text-muted); }
.pb-popover dd { margin: 0; font-weight: 600; }
.pb-menu-pop { position: absolute; z-index: 900; min-width: 240px; background: var(--puebler-surface); border: 1px solid var(--puebler-border); border-radius: 14px; box-shadow: var(--puebler-shadow-md); padding: 6px; }
.pb-menu-pop a, .pb-menu-pop button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: .88rem; font-weight: 500; color: var(--puebler-text); text-align: left; }
.pb-menu-pop a:hover, .pb-menu-pop button:hover { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); }
.pb-menu-pop i { width: 18px; text-align: center; color: var(--puebler-text-muted); }
.pb-menu-pop .is-danger, .pb-menu-pop .is-danger i { color: var(--puebler-red); }

/* ---------- Feed: historias, redactor y huellas ---------- */
.pb-stories { display: flex; gap: 12px; overflow-x: auto; padding: 18px 28px; border-bottom: 1px solid var(--puebler-border); scrollbar-width: none; }
.pb-stories::-webkit-scrollbar { display: none; }
.pb-story { width: 122px; height: 176px; border-radius: 18px; position: relative; overflow: hidden; flex-shrink: 0; background: var(--puebler-navy) center/cover; color: #fff; display: block; }
.pb-story:hover { color: #fff; }
.pb-story .pb-story-shade { position: absolute; inset: auto 0 0 0; height: 62%; background: rgba(15, 22, 33, .58); }
.pb-story .pb-avatar { position: absolute; top: 10px; left: 10px; z-index: 2; }
.pb-story .pb-avatar-img { box-shadow: 0 0 0 3px var(--puebler-red); }
.pb-story-info { position: absolute; left: 12px; right: 10px; bottom: 12px; z-index: 2; }
.pb-story-info h4 { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.pb-story-info p { font-size: 10.5px; opacity: .85; margin-top: 2px; }
.pb-story-info i { font-size: 15px; margin-bottom: 6px; display: block; color: #F6C453; }
.pb-story.is-new { background: var(--puebler-blue-light); border: 2px dashed #B9C6D8; color: var(--puebler-blue-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; text-align: center; }
.pb-story.is-new i { font-size: 26px; }
.pb-composer { padding: 18px 28px; border-bottom: 1px solid var(--puebler-border); }
.pb-composer-top { display: flex; gap: 14px; align-items: center; }
.pb-composer-top a.pb-fake-input { flex: 1; background: var(--puebler-bg); padding: 13px 20px; border-radius: 999px; color: var(--puebler-text-muted); font-size: .92rem; }
.pb-composer-top a.pb-fake-input:hover { background: var(--puebler-blue-light); }
.pb-composer-types { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.pb-composer-types a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--puebler-text-muted); white-space: nowrap; }
.pb-composer-types a:hover { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); }
.pb-feed { }
.pb-post { padding: 20px 28px 8px; border-bottom: 1px solid var(--puebler-border); position: relative; }
.pb-post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pb-post-head .pb-grow { line-height: 1.3; }
.pb-post-meta { font-size: .78rem; color: var(--puebler-text-muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.pb-post-meta a { color: inherit; font-weight: 600; }
.pb-post-meta a:hover { color: var(--puebler-red); }
.pb-type { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--type-color, var(--puebler-navy)); }
:root[data-theme="dark"] .pb-type { color: var(--puebler-blue-dark); }
.pb-more { width: 36px; height: 36px; border-radius: 50%; color: var(--puebler-text-muted); flex-shrink: 0; }
.pb-more:hover { background: var(--puebler-blue-light); }
.pb-post-title { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.pb-post-title a { color: inherit; }
.pb-post-body { font-size: .95rem; line-height: 1.65; overflow-wrap: anywhere; }
.pb-post-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pb-tag { font-weight: 600; }
.pb-tag-i { color: var(--puebler-red); font-style: italic; }
.pb-tag-a { color: var(--puebler-green); }
.pb-tag-d { color: #9A6B00; }
.pb-mention { font-weight: 600; }
.pb-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: .84rem; color: var(--puebler-text-muted); }
.pb-facts span { display: inline-flex; gap: 7px; align-items: center; }
.pb-facts b { color: var(--puebler-text); font-weight: 600; }
.pb-infobox { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--puebler-border); border-left: 4px solid var(--type-color, var(--puebler-navy)); border-radius: 0 12px 12px 0; background: var(--puebler-surface-2); font-size: .88rem; }
.pb-infobox > i { font-size: 1.3rem; color: var(--type-color, var(--puebler-navy)); margin-top: 2px; }
.pb-infobox h5 { font-size: .92rem; margin-bottom: 2px; }
.pb-infobox p { color: var(--puebler-text-muted); }
.pb-validation { display: inline-flex; gap: 7px; align-items: center; font-size: .78rem; font-weight: 600; margin-top: 10px; }
.pb-validation.is-ok { color: var(--puebler-green); }
.pb-validation.is-wait { color: #9A6B00; }
.pb-repost-note { font-size: .8rem; color: var(--puebler-text-muted); font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.pb-quoted { border: 1px solid var(--puebler-border); border-radius: 16px; padding: 14px 16px; margin-top: 10px; }
/* Carrusel de fotos */
.pb-carousel { position: relative; margin-top: 12px; border-radius: 16px; overflow: hidden; background: #0F1621; }
.pb-carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pb-carousel-track::-webkit-scrollbar { display: none; }
.pb-carousel-item { flex: 0 0 100%; scroll-snap-align: center; position: relative; aspect-ratio: var(--ar, 4 / 3); max-height: 70vh; display: flex; align-items: center; justify-content: center; }
.pb-carousel-item img, .pb-carousel-item video { width: 100%; height: 100%; object-fit: cover; }
.pb-carousel-item.is-video { cursor: pointer; }
.pb-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(15, 22, 33, .62); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; pointer-events: none; }
.pb-carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #1B2635; display: flex; align-items: center; justify-content: center; z-index: 3; }
.pb-carousel-nav[data-dir="-1"] { left: 10px; }
.pb-carousel-nav[data-dir="1"] { right: 10px; }
.pb-carousel-count { position: absolute; top: 12px; right: 12px; background: rgba(15, 22, 33, .7); color: #fff; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; z-index: 3; }
.pb-carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 6px; justify-content: center; z-index: 3; }
.pb-carousel-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.pb-carousel-dots i.on { background: #fff; }
@media (hover: none) { .pb-carousel-nav { display: none; } }
/* Reacciones y acciones */
.pb-post-stats { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--puebler-text-muted); margin-top: 12px; min-height: 22px; flex-wrap: wrap; }
.pb-rx-summary { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pb-rx-summary span { display: inline-flex; gap: 5px; align-items: center; }
.pb-rx-summary i { color: var(--puebler-red); font-size: .78rem; }
.pb-actions { display: flex; justify-content: space-between; border-top: 1px solid var(--puebler-border-soft); margin-top: 10px; padding-top: 6px; position: relative; }
.pb-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-size: .84rem; font-weight: 600; color: var(--puebler-text-muted); flex: 1; }
.pb-action:hover { background: var(--puebler-surface-2); color: var(--puebler-text); }
.pb-action.is-on { color: var(--puebler-red); }
.pb-action.is-saved { color: var(--puebler-green); }
.pb-rx-picker { position: absolute; bottom: calc(100% + 4px); left: 0; display: flex; gap: 2px; background: var(--puebler-surface); border: 1px solid var(--puebler-border); border-radius: 999px; padding: 5px 8px; box-shadow: var(--puebler-shadow-md); z-index: 40; }
.pb-rx-picker button { width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; color: var(--puebler-text-muted); position: relative; }
.pb-rx-picker button:hover, .pb-rx-picker button.on { background: var(--puebler-red-light); color: var(--puebler-red); }
.pb-rx-picker button::after { content: attr(data-label); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--puebler-navy); color: #fff; font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; }
.pb-rx-picker button:hover::after { opacity: 1; }
/* Comentarios (ecos) */
.pb-comments { padding: 4px 0 10px; }
.pb-comment { display: flex; gap: 10px; padding: 10px 0; }
.pb-comment .pb-comment { padding-bottom: 0; }
.pb-comment-bubble { background: var(--puebler-surface-2); border-radius: 4px 16px 16px 16px; padding: 9px 14px; font-size: .9rem; overflow-wrap: anywhere; }
.pb-comment-bubble.is-best { box-shadow: inset 3px 0 0 var(--puebler-green); }
.pb-comment-media { margin-top: 8px; max-width: 320px; border-radius: 12px; overflow: hidden; }
.pb-comment-tools { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .76rem; font-weight: 600; color: var(--puebler-text-muted); margin: 4px 0 0 6px; align-items: center; }
.pb-comment-tools button:hover, .pb-comment-tools a:hover { color: var(--puebler-red); }
.pb-comment-tools button.is-on { color: var(--puebler-red); }
.pb-comment-tools a { color: inherit; }
.pb-comment-form { display: flex; gap: 10px; align-items: flex-end; padding: 8px 0 12px; }
.pb-comment-form .pb-comment-input { flex: 1; display: flex; align-items: flex-end; gap: 4px; background: var(--puebler-bg); border-radius: 22px; padding: 4px 6px 4px 16px; }
.pb-comment-form textarea { flex: 1; border: 0; background: transparent; outline: 0; resize: none; min-height: 36px; max-height: 140px; padding: 8px 0; font-size: .9rem; }
.pb-comment-form .pb-icon-btn { width: 36px; height: 36px; font-size: 1rem; }
.pb-attach-name { font-size: .74rem; color: var(--puebler-text-muted); margin: -6px 0 8px 54px; }
/* Columna lateral del feed */
.pb-side-block { padding: 20px 22px; border-bottom: 1px solid var(--puebler-border); }
.pb-side-block h3 { font-size: .96rem; font-weight: 700; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.pb-side-block h3 a { font-size: .76rem; font-weight: 600; }
.pb-mini { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; color: var(--puebler-text); }
.pb-mini:last-child { margin-bottom: 0; }
.pb-mini img.pb-thumb { width: 48px; height: 48px; }
.pb-mini h4 { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.pb-mini p { font-size: .76rem; color: var(--puebler-text-muted); }
.pb-follow-btn { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--puebler-blue-light); color: var(--puebler-blue-dark); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pb-follow-btn:hover, .pb-follow-btn.is-on { background: var(--puebler-navy); color: #fff; }
.pb-footer-mini { padding: 18px 22px; font-size: .74rem; color: var(--puebler-text-muted); line-height: 1.9; }
.pb-footer-mini a { color: inherit; margin-right: 10px; }
.pb-load-more { padding: 22px; text-align: center; }

/* ---------- Mosaico (búsqueda, explorar, destinos) ---------- */
.pb-mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 3px; grid-auto-flow: dense; }
.pb-tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--puebler-navy) center/cover; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; }
.pb-tile:hover { color: #fff; }
.pb-tile.is-tall { grid-row: span 2; aspect-ratio: 1 / 2.02; }
.pb-tile.is-wide { grid-column: span 2; aspect-ratio: 2.02 / 1; }
.pb-tile > img, .pb-tile > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.pb-tile:hover > img { transform: scale(1.04); }
.pb-tile-shade { position: absolute; inset: 0; background: rgba(15, 22, 33, .38); }
.pb-tile.is-text { background: var(--puebler-surface-2); color: var(--puebler-text); justify-content: space-between; border: 1px solid var(--puebler-border); }
.pb-tile.is-text:hover { color: var(--puebler-text); background: var(--puebler-blue-light); }
.pb-tile-body { position: relative; z-index: 2; }
.pb-tile-body h4 { font-size: .98rem; font-weight: 600; line-height: 1.25; }
.pb-tile-body p { font-size: .78rem; opacity: .88; margin-top: 3px; }
.pb-tile-kind { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; gap: 6px; align-items: center; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(15, 22, 33, .72); color: #fff; padding: 4px 10px; border-radius: 999px; }
.pb-tile.is-text .pb-tile-kind { position: static; align-self: flex-start; background: var(--puebler-navy); }
.pb-tile-quote { font-size: .95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; margin: 10px 0; }
.pb-tile-user { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.pb-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pb-person { display: flex; gap: 12px; align-items: center; padding: 16px 22px; border-right: 1px solid var(--puebler-border-soft); border-bottom: 1px solid var(--puebler-border-soft); color: var(--puebler-text); min-width: 0; }
.pb-person:hover { background: var(--puebler-surface-2); color: var(--puebler-text); }
.pb-person p { font-size: .78rem; color: var(--puebler-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-filterbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 28px; border-bottom: 1px solid var(--puebler-border); }
.pb-filterbar .pb-select, .pb-filterbar .pb-input { width: auto; min-width: 170px; min-height: 40px; padding: 6px 14px; border-radius: 999px; }

/* ---------- Mapas ---------- */
.pb-map { width: 100%; height: 420px; background: var(--puebler-blue-light); z-index: 1; }
.pb-map-tall { height: calc(100dvh - var(--topbar-h) - var(--bottom-nav-h) - 60px); min-height: 380px; }
.pb-map-sm { height: 240px; border-radius: 14px; overflow: hidden; }
.pb-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--puebler-navy); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; }
.pb-pin i { transform: rotate(45deg); color: #fff; font-size: 11px; }
.pb-pin.is-done { background: var(--puebler-green); }
.pb-pin.is-gem { background: var(--puebler-gold); }
.pb-pin.is-red { background: var(--puebler-red); }
.pb-pin.is-grey { background: #9AA3AF; }
.leaflet-container { font-family: var(--font-heading); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 16px; font-size: .86rem; }

/* ---------- Diálogos (SweetAlert2 con el diseño de Puebler) ---------- */
.swal2-container { z-index: 3000 !important; }
.swal2-popup.pb-swal { font-family: var(--font-heading); border-radius: 22px; padding: 28px 26px 24px; background: var(--puebler-surface); color: var(--puebler-text); border-top: 6px solid var(--puebler-navy); width: 30em; max-width: calc(100vw - 24px); }
.pb-swal .swal2-title { font-size: 1.2rem; font-weight: 700; color: var(--puebler-text); padding: 6px 0 0; }
.pb-swal .swal2-html-container { font-size: .93rem; color: var(--puebler-text-muted); line-height: 1.6; margin: 10px 0 0; }
.pb-swal .swal2-actions { gap: 10px; margin-top: 22px; }
.pb-swal .swal2-icon { border: 0 !important; width: 62px; height: 62px; margin: 0 auto 8px; border-radius: 50%; background: var(--puebler-blue-light); }
.pb-swal .swal2-icon .swal2-icon-content { font-size: 26px; color: var(--puebler-navy); }
.pb-swal.is-success { border-top-color: var(--puebler-green); }
.pb-swal.is-error, .pb-swal.is-warning { border-top-color: var(--puebler-red); }
.pb-swal.is-success .swal2-icon { background: #E3F3EA; }
.pb-swal.is-success .swal2-icon .swal2-icon-content { color: var(--puebler-green); }
.pb-swal.is-error .swal2-icon, .pb-swal.is-warning .swal2-icon { background: var(--puebler-red-light); }
.pb-swal.is-error .swal2-icon .swal2-icon-content, .pb-swal.is-warning .swal2-icon .swal2-icon-content { color: var(--puebler-red); }
.pb-swal .swal2-input, .pb-swal .swal2-textarea, .pb-swal .swal2-select { border: 1px solid var(--puebler-border); border-radius: 12px; box-shadow: none; font-size: .92rem; margin: 14px 0 0; width: 100%; background: var(--puebler-surface); color: var(--puebler-text); }
.pb-swal .swal2-input:focus, .pb-swal .swal2-textarea:focus { border-color: var(--puebler-blue); box-shadow: 0 0 0 3px var(--puebler-blue-light); }
.pb-swal .swal2-validation-message { background: var(--puebler-red-light); color: var(--puebler-red); font-size: .84rem; border-radius: 10px; margin-top: 12px; }
.pb-swal .swal2-close { color: var(--puebler-text-muted); }
.pb-swal-wide { width: 44em !important; }
.pb-swal-wide .swal2-html-container { text-align: left; color: var(--puebler-text); }
.swal2-popup.pb-toast { font-family: var(--font-heading); background: var(--puebler-navy); color: #fff; border-radius: 14px; padding: 10px 16px; box-shadow: var(--puebler-shadow-md); }
.pb-toast .swal2-title { color: #fff; font-size: .9rem; font-weight: 500; margin: 0 8px; }
.pb-toast .swal2-icon { border: 0 !important; margin: 0; width: 26px; height: 26px; min-width: 26px; }
.pb-toast .swal2-icon .swal2-icon-content { font-size: 16px; color: #F6C453; }
.pb-share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-top: 6px; }
.pb-share-grid a, .pb-share-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 14px; border: 1px solid var(--puebler-border); font-size: .78rem; font-weight: 600; color: var(--puebler-text); }
.pb-share-grid a:hover, .pb-share-grid button:hover { background: var(--puebler-blue-light); }
.pb-share-grid i { font-size: 1.3rem; color: var(--puebler-navy); }
:root[data-theme="dark"] .pb-share-grid i { color: var(--puebler-blue-dark); }
.pb-copybox { display: flex; gap: 8px; margin-top: 14px; }
.pb-copybox input { flex: 1; min-width: 0; }

/* ---------- Visor de videos (reels, deslizamiento lateral) ---------- */
.pb-reels { position: fixed; inset: 0; z-index: 2500; background: #05090F; display: flex; flex-direction: column; }
.pb-reels-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.pb-reels-track::-webkit-scrollbar { display: none; }
.pb-reel { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; display: flex; align-items: center; justify-content: center; }
.pb-reel video { max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; }
.pb-reel-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px 26px; background: rgba(5, 9, 15, .62); color: #fff; display: flex; gap: 12px; align-items: flex-end; }
.pb-reel-info .pb-uname { color: #fff; }
.pb-reel-info p { font-size: .88rem; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pb-reel-info a.pb-btn { flex-shrink: 0; }
.pb-reels-close, .pb-reels-nav { position: absolute; z-index: 5; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.pb-reels-close { top: 16px; right: 16px; }
.pb-reels-nav { top: 50%; transform: translateY(-50%); }
.pb-reels-nav[data-dir="-1"] { left: 16px; }
.pb-reels-nav[data-dir="1"] { right: 16px; }
.pb-reels-hint { position: absolute; top: 20px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); font-size: .8rem; font-weight: 600; pointer-events: none; }
@media (hover: none) { .pb-reels-nav { display: none; } }
.pb-reel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 3px; }
.pb-reel-thumb { position: relative; aspect-ratio: 9 / 14; background: #0F1621; overflow: hidden; display: block; color: #fff; }
.pb-reel-thumb video { width: 100%; height: 100%; object-fit: cover; }
.pb-reel-thumb .pb-tile-body { position: absolute; left: 12px; right: 12px; bottom: 12px; }

/* ---------- Invitados: portada, acceso, legales ---------- */
.pb-guest { min-height: 100dvh; display: flex; flex-direction: column; background: var(--puebler-surface); }
.pb-guest-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--puebler-border); position: sticky; top: 0; background: var(--puebler-surface); z-index: 100; }
.pb-guest-nav .pb-logo { padding: 0; }
.pb-hero { background: var(--puebler-navy); color: #fff; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 30px; padding: 64px 6vw; }
.pb-hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; letter-spacing: -1px; line-height: 1.08; }
.pb-hero h1 em { font-style: normal; color: #E8687C; }
.pb-hero p { color: #B9C4D3; font-size: 1.08rem; margin: 18px 0 26px; max-width: 560px; }
.pb-hero .pb-btn { min-height: 50px; padding: 0 28px; font-size: 1rem; }
.pb-hero .pb-btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.pb-hero .pb-btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.pb-hero-art { display: flex; justify-content: center; }
.pb-hero-art img { width: min(340px, 70%); border-radius: 22%; }
.pb-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--puebler-border); }
.pb-feature { padding: 34px 6vw 34px 34px; border-right: 1px solid var(--puebler-border); border-bottom: 1px solid var(--puebler-border); }
.pb-features .pb-feature:nth-child(3n+1) { padding-left: 6vw; }
.pb-feature i { font-size: 1.5rem; color: var(--puebler-red); margin-bottom: 14px; }
.pb-feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.pb-feature p { color: var(--puebler-text-muted); font-size: .92rem; }
.pb-auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pb-auth-side { background: var(--puebler-navy); color: #fff; padding: 60px 6vw; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.pb-auth-side img { width: 110px; border-radius: 24px; }
.pb-auth-side h2 { font-size: 1.9rem; font-weight: 700; line-height: 1.15; }
.pb-auth-side p { color: #B9C4D3; max-width: 420px; }
.pb-auth-form { padding: 48px 6vw; display: flex; flex-direction: column; justify-content: center; }
.pb-auth-form form { max-width: 460px; width: 100%; }
.pb-auth-form h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.pb-auth-form .pb-sub { color: var(--puebler-text-muted); margin-bottom: 22px; }
.pb-code-input { letter-spacing: .6em; font-size: 1.5rem; font-weight: 700; text-align: center; }
.pb-divider { display: flex; align-items: center; gap: 12px; color: var(--puebler-text-muted); font-size: .8rem; margin: 18px 0; }
.pb-divider::before, .pb-divider::after { content: ''; flex: 1; height: 1px; background: var(--puebler-border); }
.pb-legal { max-width: 860px; margin: 0 auto; padding: 40px 28px 70px; }
.pb-legal h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 6px; }
.pb-legal h2 { font-size: 1.15rem; font-weight: 700; margin: 30px 0 10px; }
.pb-legal h3 { font-size: 1rem; font-weight: 600; margin: 18px 0 6px; }
.pb-legal p, .pb-legal li { margin-bottom: 10px; line-height: 1.75; }
.pb-legal ul, .pb-legal ol { padding-left: 22px; margin-bottom: 12px; }
.pb-legal table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .9rem; }
.pb-legal th, .pb-legal td { border: 1px solid var(--puebler-border); padding: 9px 12px; text-align: left; vertical-align: top; }
.pb-legal th { background: var(--puebler-surface-2); }
.pb-guest-foot { border-top: 1px solid var(--puebler-border); padding: 22px 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .82rem; color: var(--puebler-text-muted); }
.pb-guest-foot a { color: inherit; }
.pb-install { position: fixed; left: 16px; right: 16px; bottom: calc(var(--bottom-nav-h) + 16px); z-index: 1200; max-width: 460px; margin: 0 auto; background: var(--puebler-navy); color: #fff; border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--puebler-shadow-md); }
.pb-install img { width: 44px; height: 44px; border-radius: 12px; }
.pb-install p { font-size: .84rem; flex: 1; line-height: 1.35; }
.pb-install .pb-btn { background: #fff; color: var(--puebler-navy); border-color: #fff; }
.pb-install button.pb-x { color: #B9C4D3; padding: 6px; }
.pb-offline { background: #7A5B00; color: #fff; text-align: center; font-size: .82rem; font-weight: 600; padding: 6px 12px; }

/* ---------- Parches, chat y paneles ---------- */
.pb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pb-cell { padding: 20px 24px; border-right: 1px solid var(--puebler-border-soft); border-bottom: 1px solid var(--puebler-border-soft); color: var(--puebler-text); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
a.pb-cell:hover { background: var(--puebler-surface-2); color: var(--puebler-text); }
.pb-cell h3 { font-size: 1rem; font-weight: 600; }
.pb-cell-cover { aspect-ratio: 16 / 9; background: var(--puebler-blue-light) center/cover; border-radius: 12px; margin-bottom: 4px; }
.pb-chat { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-h) - var(--bottom-nav-h) - 49px); }
.pb-chat-log { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 10px; background: var(--puebler-surface-2); }
.pb-msg { max-width: min(560px, 82%); align-self: flex-start; }
.pb-msg.is-mine { align-self: flex-end; }
.pb-msg-meta { font-size: .72rem; color: var(--puebler-text-muted); margin: 0 6px 2px; display: flex; gap: 8px; align-items: center; }
.pb-msg.is-mine .pb-msg-meta { justify-content: flex-end; }
.pb-msg-body { background: var(--puebler-surface); border: 1px solid var(--puebler-border); padding: 9px 14px; border-radius: 4px 16px 16px 16px; font-size: .92rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.pb-msg.is-mine .pb-msg-body { background: var(--puebler-navy); color: #fff; border-color: var(--puebler-navy); border-radius: 16px 4px 16px 16px; }
.pb-msg.is-announce .pb-msg-body { background: #FBF1D3; color: #4A3900; border-color: #EBD58A; }
.pb-msg-tools { display: none; gap: 10px; font-size: .72rem; margin: 2px 6px 0; }
.pb-msg:hover .pb-msg-tools, .pb-msg:focus-within .pb-msg-tools { display: flex; }
.pb-msg-tools button { color: var(--puebler-text-muted); font-weight: 600; }
.pb-msg-tools button:hover { color: var(--puebler-red); }
.pb-chat-pinned { padding: 10px 24px; background: #FBF1D3; color: #4A3900; font-size: .84rem; border-bottom: 1px solid #EBD58A; display: flex; gap: 10px; }
.pb-chat-form { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--puebler-border); background: var(--puebler-surface); align-items: flex-end; }
.pb-chat-form textarea { flex: 1; min-height: 44px; max-height: 130px; resize: none; }
.pb-enc { font-size: .72rem; color: var(--puebler-text-muted); text-align: center; padding: 6px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.pb-timeline { list-style: none; margin: 0; padding: 0 0 0 10px; }
.pb-timeline li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--puebler-border); }
.pb-timeline li::before { content: ''; position: absolute; left: -8px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--puebler-red); border: 3px solid var(--puebler-surface); }
.pb-timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.pb-timeline strong { display: block; }
.pb-timeline small { color: var(--puebler-text-muted); }
.pb-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); counter-reset: s; border: 1px solid var(--puebler-border); border-radius: 14px; overflow: hidden; }
.pb-steps > div { padding: 14px 16px; border-right: 1px solid var(--puebler-border); font-size: .82rem; counter-increment: s; }
.pb-steps > div::before { content: counter(s); display: flex; width: 26px; height: 26px; border-radius: 50%; background: var(--puebler-border); color: var(--puebler-text-muted); font-weight: 700; align-items: center; justify-content: center; margin-bottom: 8px; font-size: .8rem; }
.pb-steps > div.is-done::before { background: var(--puebler-green); color: #fff; }
.pb-steps > div.is-now { background: var(--puebler-blue-light); }
.pb-steps > div.is-now::before { background: var(--puebler-navy); color: #fff; }
.pb-admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100dvh - var(--topbar-h)); }
.pb-admin-nav { border-right: 1px solid var(--puebler-border); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--topbar-h); align-self: start; max-height: calc(100dvh - var(--topbar-h)); overflow-y: auto; }
.pb-admin-nav a { padding: 9px 12px; border-radius: 10px; font-weight: 500; font-size: .88rem; color: var(--puebler-text); display: flex; gap: 10px; align-items: center; }
.pb-admin-nav a i { width: 18px; text-align: center; color: var(--puebler-text-muted); }
.pb-admin-nav a:hover, .pb-admin-nav a.active { background: var(--puebler-blue-light); color: var(--puebler-blue-dark); }
.pb-admin-nav h2 { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--puebler-text-muted); padding: 12px 12px 4px; }
.pb-admin-main { min-width: 0; }
.pb-gauge { position: relative; width: 190px; height: 190px; margin: 0 auto; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.pb-gauge svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pb-gauge circle { fill: none; stroke-width: 12; stroke: var(--puebler-border); }
.pb-gauge circle.on { stroke: var(--puebler-green); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.pb-gauge > strong, .pb-gauge > span { position: relative; }
.pb-gauge strong { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.pb-gauge span { font-size: .78rem; color: var(--puebler-text-muted); }
.pb-qr-scan { max-width: 420px; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #0F1621; }
.pb-place-search { position: relative; }
.pb-place-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--puebler-surface); border: 1px solid var(--puebler-border); border-radius: 14px; box-shadow: var(--puebler-shadow-md); z-index: 60; max-height: 300px; overflow-y: auto; }
.pb-place-results button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 14px; text-align: left; font-size: .88rem; border-bottom: 1px solid var(--puebler-border-soft); }
.pb-place-results button:hover, .pb-place-results button:focus { background: var(--puebler-blue-light); }
.pb-place-results small { color: var(--puebler-text-muted); display: block; }
.pb-place-picked { display: inline-flex; gap: 8px; align-items: center; background: var(--puebler-blue-light); color: var(--puebler-blue-dark); border-radius: 999px; padding: 6px 8px 6px 14px; font-weight: 600; font-size: .86rem; margin-top: 8px; }
.pb-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-bottom: 1px solid var(--puebler-border); }
.pb-type-opt { padding: 18px 22px; border-right: 1px solid var(--puebler-border-soft); border-bottom: 1px solid var(--puebler-border-soft); color: var(--puebler-text); display: flex; gap: 14px; align-items: flex-start; }
.pb-type-opt:hover, .pb-type-opt.active { background: var(--puebler-blue-light); color: var(--puebler-text); }
.pb-type-opt.active { box-shadow: inset 0 -3px 0 var(--puebler-red); }
.pb-type-opt i { font-size: 1.2rem; color: var(--type-color); margin-top: 3px; width: 24px; text-align: center; }
.pb-type-opt strong { display: block; font-size: .95rem; }
.pb-type-opt span { font-size: .78rem; color: var(--puebler-text-muted); line-height: 1.35; display: block; }
.pb-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.pb-previews > div { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #0F1621; }
.pb-previews img, .pb-previews video { width: 100%; height: 100%; object-fit: cover; }
.pb-drop { border: 2px dashed var(--puebler-border); border-radius: 14px; padding: 22px; text-align: center; color: var(--puebler-text-muted); cursor: pointer; display: block; }
.pb-drop:hover { border-color: var(--puebler-blue); background: var(--puebler-surface-2); }
.pb-drop i { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.pb-drop input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- Adaptación a pantallas ---------- */
@media (max-width: 1180px) {
  .pb-cols { grid-template-columns: minmax(0, 1fr); }
  .pb-cols > .pb-col-main { border-right: 0; min-height: 0; }
  .pb-cols > .pb-col-side { position: static; max-height: none; border-top: 1px solid var(--puebler-border); }
  .pb-cols.hide-side-md > .pb-col-side { display: none; }
}
@media (max-width: 960px) {
  :root { --topbar-h: 60px; --bottom-nav-h: 62px; }
  .pb-sidebar { transform: translateX(-102%); transition: transform .25s ease; width: min(300px, 86vw); box-shadow: none; }
  body.nav-open .pb-sidebar { transform: none; box-shadow: var(--puebler-shadow-md); }
  body.nav-open .pb-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .pb-shell { margin-left: 0; padding-bottom: var(--bottom-nav-h); }
  .pb-burger { display: inline-flex; align-items: center; justify-content: center; }
  .pb-topbar { padding: 0 10px; gap: 6px; }
  .pb-bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottom-nav-h); background: var(--puebler-surface); border-top: 1px solid var(--puebler-border); z-index: 250; padding-bottom: env(safe-area-inset-bottom); }
  .pb-bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--puebler-text-muted); }
  .pb-bottomnav a i { font-size: 18px; }
  .pb-bottomnav a.active { color: var(--puebler-red); }
  .pb-bottomnav a.pb-bn-sellar i { width: 46px; height: 46px; border-radius: 50%; background: var(--puebler-red); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -18px; box-shadow: 0 0 0 5px var(--puebler-surface); }
  .pb-admin { grid-template-columns: 1fr; }
  .pb-admin-nav { position: static; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--puebler-border); padding: 10px; max-height: none; }
  .pb-admin-nav a { white-space: nowrap; }
  .pb-admin-nav h2 { display: none; }
  .pb-hero { grid-template-columns: 1fr; padding: 44px 22px; }
  .pb-hero-art { order: -1; }
  .pb-hero-art img { width: 150px; }
  .pb-features { grid-template-columns: 1fr; }
  .pb-feature, .pb-features .pb-feature:nth-child(3n+1) { padding: 26px 22px; border-right: 0; }
  .pb-auth { grid-template-columns: 1fr; }
  .pb-auth-side { display: none; }
  .pb-auth-form { padding: 32px 22px; justify-content: flex-start; }
  .pb-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .pb-page-head, .pb-section, .pb-pad, .pb-composer, .pb-stories, .pb-filterbar { padding-left: 16px; padding-right: 16px; }
  .pb-page-head h1 { font-size: 1.3rem; }
  .pb-post { padding: 16px 16px 6px; }
  .pb-list > li, .pb-row { padding: 12px 16px; }
  .pb-action span { display: none; }
  .pb-action { font-size: 1.05rem; }
  .pb-grid2, .pb-grid3 { grid-template-columns: 1fr; }
  .pb-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pb-tile.is-wide { grid-column: span 2; }
  .pb-carousel { border-radius: 12px; margin-left: -4px; margin-right: -4px; }
  .pb-story { width: 104px; height: 152px; }
  .pb-search input::placeholder { font-size: 13px; }
  .pb-guest-nav { padding: 10px 14px; }
  .pb-guest-nav .pb-logo span { display: none; }
  .pb-chat-log { padding: 14px; }
  .pb-kv { grid-template-columns: 1fr; gap: 0; }
  .pb-kv dd { margin-bottom: 8px; }
  .pb-filterbar .pb-select, .pb-filterbar .pb-input { flex: 1 1 140px; min-width: 0; }
  .pb-reel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01s !important; animation-duration: .01s !important; scroll-behavior: auto !important; } }
@media print { .pb-sidebar, .pb-topbar, .pb-bottomnav { display: none; } .pb-shell { margin: 0; } }

/* Nube del rango: fuera del flujo hasta que se muestra (evita desbordes) y alineada al borde en la barra superior */
.pb-cloud { display: none; }
.pb-rank:hover .pb-cloud, .pb-rank:focus .pb-cloud, .pb-rank.is-open .pb-cloud { display: block; }
.pb-topbar .pb-cloud, .pb-person .pb-cloud { left: auto; right: -4px; transform: none; }
.pb-topbar .pb-rank:hover .pb-cloud, .pb-topbar .pb-rank:focus .pb-cloud, .pb-topbar .pb-rank.is-open .pb-cloud { transform: none; }
.pb-topbar .pb-cloud { bottom: auto; top: calc(100% + 8px); }
.pb-topbar .pb-cloud::after { top: auto; bottom: 100%; left: auto; right: 12px; border-top-color: transparent; border-bottom-color: var(--puebler-navy); }
.leaflet-container { overflow: hidden; }
@media (max-width: 640px) {
  [style*="margin:0 -28px"] { margin-left: -16px !important; margin-right: -16px !important; }
  .pb-list > li { flex-wrap: wrap; }
}
.pb-comment-form .pb-comment-input { min-width: 0; }
.pb-comment-form .pb-comment-input textarea { min-width: 0; }
.pb-comment-form > .pb-avatar { flex-shrink: 0; }

/* Reacciones: fotos apiladas + total; barra de acciones solo con iconos y contadores */
.pb-post-stats { margin-top: 10px; min-height: 0; }
.pb-rx-faces { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--puebler-text-muted); padding: 2px 8px 2px 2px; border-radius: 999px; }
.pb-rx-faces:hover { background: var(--puebler-surface-2); color: var(--puebler-text); }
.pb-faces { display: inline-flex; }
.pb-faces img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid var(--puebler-surface); background: var(--puebler-blue-light); margin-left: -7px; }
.pb-faces img:first-child { margin-left: 0; }
.pb-actions { justify-content: space-around; margin-top: 8px; padding-top: 4px; }
.pb-action { font-weight: 400; gap: 7px; flex: 0 1 auto; min-width: 54px; padding: 9px 14px; font-size: .9rem; }
.pb-action i { font-size: 1.08rem; }
.pb-action b { font-weight: 400; font-size: .84rem; }
@media (max-width: 640px) { .pb-action { padding: 9px 10px; } }
.pb-place-cover { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--puebler-navy) center/cover; color: #fff; }
.pb-place-cover:hover { color: #fff; }
.pb-place-cover-txt { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; display: flex; flex-direction: column; }
.pb-place-cover-txt small { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.pb-place-cover-txt strong { font-size: 1.25rem; font-weight: 700; line-height: 1.15; }

/* Selector visual de huellas (retos, galería de rutas) */
.pb-pick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-height:300px;overflow:auto}
.pb-pick{position:relative;display:block;cursor:pointer;border:2px solid transparent;border-radius:8px;overflow:hidden;background:var(--pb-soft,#f2f4f7)}
.pb-pick input{position:absolute;opacity:0}
.pb-pick img{display:block;width:100%;aspect-ratio:1;object-fit:cover}
.pb-pick span{display:block;font-size:11px;padding:4px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pb-pick:has(input:checked){border-color:var(--pb-red,#A8112B)}
.pb-pick:has(input:checked)::after{content:"\2713";position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;background:#A8112B;color:#fff;font-size:13px;display:grid;place-items:center}
.pb-label{font-size:13px;font-weight:600;margin:0}

/* Seguir desde la huella y motivo de la recomendación */
.pb-why { margin: 0 0 8px; font-size: .74rem; color: var(--puebler-text-muted); display: flex; gap: 6px; align-items: center; }
.pb-why i { color: var(--puebler-red, #A8112B); }
.pb-follow-inline { flex-shrink: 0; align-self: center; border: 1px solid var(--puebler-navy, #1B2635); background: var(--puebler-navy, #1B2635); color: #fff; border-radius: 99px; padding: 5px 14px; font: 500 .78rem/1.2 inherit; font-family: inherit; cursor: pointer; }
.pb-follow-inline:hover { opacity: .9; }
.pb-follow-inline.is-on { background: transparent; color: var(--puebler-text); border-color: var(--puebler-border); }
