/* La Verdad Histórica · App (móvil y tablet) */
:root {
  color-scheme: light;
  --bg: #ffffff; --panel: #f5faf6; --panel2: #ffffff; --line: #d2e2d6; --line-soft: #e5eee7;
  --text: #174b32; --muted: #5c7463; --gold: #c5a13a; --gold-soft: #a17b22; --gold-deep: #85651b;
  --red: #b92f37; --ok: #6bbf94; --warn: #e0a93f; --bad: #e07a82;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --tabh: 60px; --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { overflow: hidden; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; touch-action: manipulation; }
a { color: var(--gold-soft); }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0 0 .7em; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.ic { flex: none; display: block; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.clamp1, .clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }
.eyebrow { display: block; color: var(--gold); font: 700 10.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Aviso de escritorio ---------- */
.desktop-gate { display: none; position: fixed; inset: 0; z-index: 100; background: var(--bg); flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; }
.desktop-gate img { border-radius: 50%; }
.desktop-gate h1 { font-size: 28px; } .desktop-gate p { max-width: 420px; color: var(--muted); }
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) { .desktop-gate { display: flex; } .app { display: none !important; } }

/* ---------- Estructura ---------- */
.app { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "top" "stage" "tabs"; background: var(--bg); padding-left: var(--sal); padding-right: var(--sar); }
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(8px + var(--sat)) 14px 8px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(#ffffff, var(--bg)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { border-radius: 50%; }
.brand span { display: flex; flex-direction: column; min-width: 0; }
.brand b { font: 700 12px/1.1 var(--serif); letter-spacing: .14em; color: var(--gold-soft); white-space: nowrap; }
.brand small { font-size: 12px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.stage { grid-area: stage; position: relative; overflow: hidden; }
.section { position: absolute; inset: 0; overflow: hidden; }
.offline-bar { position: fixed; top: var(--sat); left: 0; right: 0; z-index: 60; background: var(--warn); color: #1a1405; text-align: center; font-size: 12.5px; font-weight: 600; padding: 3px 10px; }

.tabbar { grid-area: tabs; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: #f4faf5; padding-bottom: var(--sab); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tabh); color: var(--muted); position: relative; }
.tab em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.tab.active { color: var(--gold-soft); }
.tab.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--gold); border-radius: 0 0 3px 3px; }

/* ---------- Botones y controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 650; font-size: 15px; text-decoration: none; text-align: center; }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-gold { background: linear-gradient(135deg,#286a45,#174b32); color: #ffffff; border-color: #c5a13a; }
.btn-ghost { background: transparent; border-color: #d8b45d66; color: var(--gold-soft); }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn.danger, .danger { color: var(--bad); border-color: #e07a8255; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--gold-soft); border: 1px solid transparent; }
.icon-btn:active { background: var(--panel2); }
.icon-btn.sm { width: 38px; height: 38px; }
.avatar-btn, .avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #1b1407; font: 700 16px var(--serif); flex: none; }
.avatar.big { width: 56px; height: 56px; font-size: 24px; }
.badge-dot { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/18px var(--sans); text-align: center; }
.link-btn { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; min-height: 40px; }

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }

:where(input:not([type=checkbox]):not([type=radio]), textarea, select) { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 46px; font-size: 16px; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #7b766c; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
.search { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 12px; color: var(--muted); }
.search input { border: 0; background: transparent; padding: 12px 0; min-height: 46px; }
.form-error { color: var(--bad); font-size: 14px; min-height: 1.3em; margin: 0 0 8px; }
.toolrow { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolrow select { flex: 1; min-width: 0; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.switch input { width: 20px; height: 20px; accent-color: var(--gold); }
.choice { display: grid; gap: 8px; margin-bottom: 14px; }
.choice label { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.choice input { accent-color: var(--gold); width: 20px; height: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin-left: -14px; margin-right: -14px; padding: 2px 14px 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); white-space: nowrap; }
.chip i { font-style: normal; opacity: .7; font-weight: 500; }
.chip-btn { min-height: 38px; padding: 0 14px; color: var(--text); }
.chip-btn.on { background: #d8b45d30; border-color: var(--gold); color: var(--gold-soft); }
.chip-gold { border-color: #d8b45d77; color: var(--gold-soft); background: #d8b45d1f; }
.chip-ok { border-color: #6bbf9466; color: var(--ok); background: #6bbf9412; }
.chip.v-desmentido { color: var(--ok); border-color: #6bbf9466; background: #6bbf9412; }
.chip.v-confirmado { color: var(--bad); border-color: #e07a8266; background: #e07a8212; }
.chip.v-parcialmente_cierto { color: var(--warn); border-color: #e0a93f66; background: #e0a93f12; }

.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 14px; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg button { min-height: 40px; border-radius: 10px; color: var(--muted); font-weight: 650; font-size: 14px; text-align: center; }
.seg button.active { background: var(--panel2); color: var(--gold-soft); box-shadow: inset 0 0 0 1px #d8b45d66; }

/* ---------- Paneles lista / detalle ---------- */
.split { height: 100%; position: relative; }
.pane { background: var(--bg); }
.pane-list { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px calc(18px + 4px); -webkit-overflow-scrolling: touch; }
.pane-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.pane-head h1, .page-head h1 { font-size: 30px; margin-top: 4px; }
.pane-detail { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform .26s cubic-bezier(.2, .7, .2, 1), visibility 0s .26s; }
.show-detail .pane-detail { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.2, .7, .2, 1); }
.detail-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); min-height: 58px; background: var(--bg); }
.detail-title { flex: 1; min-width: 0; } .detail-title h2 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-title p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 28px; -webkit-overflow-scrolling: touch; }
.only-tablet { display: none; }
.list, .stack { display: grid; gap: 10px; align-content: start; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); min-height: 60px; color: inherit; text-decoration: none; text-align: left; }
.row:active, .row.active { background: var(--panel2); border-color: #d8b45d77; }
.row-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; text-align: left; }
.row-main b { font-weight: 650; font-size: 15px; } .row-main small { color: var(--muted); font-size: 13px; }
.row-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #c9a45b18; color: var(--gold); flex: none; }
.row.mine { cursor: default; }
.row .chip { align-self: flex-start; }
.notif.unread { border-color: var(--gold); }
.count-line { margin: -4px 0 8px; }
.claim-row b { font: 600 16px/1.3 var(--serif); }
.article-row b { font: 600 17px/1.25 var(--serif); }

/* ---------- Estados ---------- */
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 36px 20px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 19px; } .empty p { max-width: 320px; margin: 0; }
.empty-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #d8b45d1f; color: var(--gold); margin-bottom: 4px; }
.empty.ok .empty-ic { background: #6bbf9418; color: var(--ok); }
.skel { border-radius: var(--radius); background: linear-gradient(100deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
.skel-row { height: 64px; } .skel-msg { height: 84px; margin-bottom: 10px; } .skel-book { aspect-ratio: 3 / 5; } .skel-pay { height: 190px; }
@keyframes shimmer { to { background-position: -150% 0; } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #d8b45d44; border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: flex; align-items: center; gap: 14px; }
.working p { margin: 0; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.notice { display: flex; gap: 12px; align-items: flex-start; } .notice p { margin: 4px 0 0; color: var(--muted); }
.notice.err { border-color: #e07a8266; } .notice.err .ic { color: var(--bad); }
.hint { display: flex; gap: 14px; align-items: flex-start; padding: 8px 4px; color: var(--gold); }
.hint b { color: var(--text); display: block; } .hint p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Comunidad ---------- */
.messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.messages > .empty, .messages > .skel { margin: auto 0; }
.msg { display: flex; gap: 10px; }
.msg .avatar { width: 36px; height: 36px; font-size: 15px; background: var(--panel2); color: var(--gold-soft); border: 1px solid #d8b45d55; }
.msg-body { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 4px 16px 16px 16px; padding: 10px 12px 4px; }
.msg.mine .msg-body { border-color: #d8b45d66; background: #102b49; }
.msg.flash .msg-body { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 3px transparent; } }
.msg-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 3px; }
.msg-meta b { font-size: 14.5px; } .msg-meta time { color: var(--muted); font-size: 12px; margin-left: auto; }
.msg-meta .chip { padding: 1px 8px; font-size: 11px; }
.quote { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--gold-deep); padding: 2px 0 2px 8px; margin: 4px 0 6px; }
.quote b { color: var(--gold-soft); font-weight: 600; }
.msg-text { overflow-wrap: anywhere; font-size: 15.5px; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px -8px 0; }
.msg-actions { flex-wrap: nowrap; }
.msg-actions button { display: inline-flex; align-items: center; gap: 4px; min-width: 38px; min-height: 40px; padding: 0 8px; border-radius: 10px; color: var(--muted); font-size: 13px; justify-content: center; }
.msg-actions button.on { color: var(--gold); }
.msg-actions button:active { background: var(--panel2); }
.msg-actions [data-act=report] { margin-left: auto; }
@media (max-width: 430px) { .msg-actions [data-act=reply] span:not(.ic) { display: none; } }
.composer { border-top: 1px solid var(--line-soft); background: var(--bg); padding: 8px 10px calc(8px + var(--sab) * 0); }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-row textarea { min-height: 46px; max-height: 140px; resize: none; border-radius: 22px; padding: 11px 16px; }
.send-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #1b1407; display: grid; place-items: center; flex: none; }
.send-btn:disabled { opacity: .5; }
.replying { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 2px 6px 8px; }
.replying span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px; color: var(--muted); font-size: 14px; }

/* ---------- Verificador ---------- */
.page { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 32px; max-width: 780px; margin: 0 auto; -webkit-overflow-scrolling: touch; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.usage { display: flex; align-items: center; gap: 8px; padding: 9px 13px; margin-bottom: 12px; border-radius: 12px; border: 1px solid #d8b45d55; background: #c9a45b10; color: var(--gold-soft); font-size: 13.5px; }
.usage.low { border-color: #e07a8266; color: var(--bad); background: #e07a8210; }
.ask-label { display: block; font: 600 17px var(--serif); margin-bottom: 10px; }
.ask-foot { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 12px; gap: 12px; }
.ask .chips { margin: 0; }
.ask .chip-btn { white-space: normal; text-align: left; border-radius: 12px; padding: 8px 12px; min-height: 0; font-size: 13px; color: var(--muted); }
.verdict { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 16px; background: var(--panel); padding: 16px; margin-bottom: 14px; }
.verdict-desmentido { border-left-color: var(--ok); } .verdict-confirmado { border-left-color: var(--bad); } .verdict-parcialmente_cierto { border-left-color: var(--warn); }
.verdict-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.verdict-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 13.5px; background: #c9a45b1c; color: var(--gold-soft); }
.verdict-desmentido .verdict-badge { background: #6bbf9420; color: var(--ok); } .verdict-confirmado .verdict-badge { background: #e07a8222; color: var(--bad); } .verdict-parcialmente_cierto .verdict-badge { background: #e0a93f20; color: var(--warn); }
.verdict blockquote, .claim-title { margin: 0 0 12px; font: italic 500 19px/1.35 var(--serif); color: var(--gold-soft); }
.prose { font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { margin: 1.3em 0 .5em; font-size: 20px; color: var(--gold-soft); } .prose h4 { font-size: 17px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; } .prose li { margin-bottom: .35em; }
.prose a { text-underline-offset: 3px; }
.card.prose h4 { margin: 0 0 8px; color: var(--gold-soft); font-size: 18px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.sec-title { font-size: 20px; margin: 22px 0 10px; }
.source { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 13px 14px; }
.source-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.source h4 { font-size: 16.5px; margin-bottom: 2px; } .source p { margin: 4px 0 0; font-size: 14.5px; }
.source-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.source-bibliographic { border-left: 3px solid var(--gold, #c5a15b); padding: 16px; }
.source-bibliographic h4 { font-family: var(--serif); font-size: 17px; line-height: 1.35; }
.source-link { border-style: dashed; }
.article-references { margin-top: 24px; }
.article-references .stack { display: grid; gap: 10px; }
.fold { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 10px; }
.fold summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; font-weight: 650; cursor: pointer; }
.fold summary::-webkit-details-marker { display: none; }
.fold[open] summary { border-bottom: 1px solid var(--line-soft); }
.fold .stack { padding: 10px; }
.disclaimer { margin-top: 18px; }
.profile h2 { font-size: 26px; margin: 6px 0 4px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--gold-deep); margin-left: 6px; }
.timeline li { display: flex; gap: 12px; padding: 0 0 16px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.tl-year { flex: none; min-width: 52px; font: 700 14px var(--serif); color: var(--gold-soft); }
.timeline p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Biblioteca / artículos ---------- */
.article h2 { font-size: 28px; margin: 6px 0 6px; line-height: 1.15; }
.lead { font: italic 400 18px/1.55 var(--serif); color: var(--gold-soft); margin: 14px 0; }

/* ---------- Tienda ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.book { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 8px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.book.active { border-color: var(--gold); }
.book b { font: 600 14.5px/1.25 var(--serif); margin-top: 6px; } .book small { color: var(--muted); font-size: 12.5px; }
.cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--panel2); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--gold-deep); }
.cover.big { width: 130px; flex: none; box-shadow: 0 10px 30px #0008; } .cover.sm { width: 48px; flex: none; border-radius: 5px; }
.ribbon { position: absolute; top: 6px; left: 6px; background: var(--red); color: #fff; font: 700 11px var(--sans); padding: 2px 7px; border-radius: 6px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.price strong { color: var(--gold-soft); font-size: 16px; } .price s { color: var(--muted); font-size: 12.5px; } .price em { font-style: normal; font-size: 12px; color: var(--bad); }
.price.big strong { font-size: 24px; }
.book-detail .bd-top { display: flex; gap: 16px; align-items: flex-start; }
.bd-info { flex: 1; min-width: 0; } .bd-info h2 { font-size: 23px; margin: 4px 0 6px; } .bd-info p { margin: 0 0 4px; }
.stock { font-size: 13.5px; color: var(--warn); font-weight: 600; margin-top: 6px !important; } .stock.ok { color: var(--ok); }
.buy-bar { position: sticky; bottom: -1px; z-index: 2; margin: 16px -16px 0; padding: 12px 16px; background: linear-gradient(transparent, var(--bg) 30%); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.facts div { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; }
.facts dt { color: var(--muted); font-size: 12px; } .facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.book-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--panel2); border-radius: 12px; }
.book-line > span.muted { text-align: right; }
.pay-el { min-height: 120px; margin-bottom: 12px; }

/* ---------- Hojas modales ---------- */
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92dvh; background: var(--panel); color: var(--text); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line); overflow: hidden; }
dialog.sheet::backdrop { background: #000a; backdrop-filter: blur(2px); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheetup .26s cubic-bezier(.2, .7, .2, 1); }
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } }
.sheet-body { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px calc(22px + var(--sab)); width: 100%; }
.sheet-body::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: -12px auto 14px; }
.sheet-close { position: absolute; top: 12px; right: 10px; z-index: 1; }
.sheet h2 { font-size: 24px; margin: 0 40px 14px 0; }
.sheet-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font: 700 12px var(--serif); letter-spacing: .14em; color: var(--gold-soft); }
.sheet-brand img { border-radius: 50%; }
.auth-links { display: flex; justify-content: space-between; margin-top: 8px; }
.account-card { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; } .account-card p { margin: 0 0 4px; }

.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabh) + var(--sab) + 14px); z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { max-width: 460px; padding: 11px 16px; border-radius: 12px; background: #2a2a2f; border: 1px solid var(--line); font-size: 14.5px; box-shadow: 0 10px 30px #000a; animation: sheetup .2s ease-out; }
.toast.ok { border-color: #6bbf9488; } .toast.err { border-color: #e07a8288; }
.toast.out { opacity: 0; transition: opacity .4s; }
dialog ~ .toasts { z-index: 90; }


/* ---------- Mi cuenta y afiliados ---------- */
dialog.sheet.wide { max-width: 760px; max-height: 96dvh; margin: auto; border-radius: 22px; border: 1px solid var(--line); }
.account-loading { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.account-section { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.account-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.account-section-head h3 { font: 600 19px var(--serif); color: var(--gold-soft); }
.account-section-head small { color: var(--muted); font-size: 11px; }
.account-subtitle { font: 600 15px var(--serif); margin: 16px 0 8px; }
.account-footer { margin: 12px 0 18px; }
.affiliate-terms { border: 1px solid var(--line); background: var(--panel2); border-radius: 12px; padding: 12px; margin: 12px 0; }
.affiliate-terms p { margin: 5px 0; }
.policy-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; font-size: 13px; }
.policy-check input { width: 20px; height: 20px; flex: none; accent-color: var(--gold); }
.affiliate-status, .affiliate-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.affiliate-actions .btn { flex: 1; }
.affiliate-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.affiliate-stat, .affiliate-money > div { padding: 12px; background: var(--panel2); border: 1px solid var(--line-soft); border-radius: 12px; min-width: 0; }
.affiliate-stat small, .affiliate-money small { display: block; color: var(--muted); font-size: 11px; }
.affiliate-stat b, .affiliate-money b { display: block; font-size: 19px; margin-top: 3px; }
.affiliate-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.affiliate-money b { font-size: 15px; }
.affiliate-commission { min-height: 54px; }
@media (min-width: 820px) { .affiliate-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Tablet ---------- */
@media (min-width: 820px) {
  .app { grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "tabs top" "tabs stage"; padding-left: 0; }
  .tabbar { grid-template-columns: 1fr; grid-auto-rows: 78px; align-content: start; border-top: 0; border-right: 1px solid var(--line); padding: calc(14px + var(--sat)) 0 var(--sab) var(--sal); gap: 4px; }
  .tab::before { display: none; }
  .tab.active::after { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; background: var(--gold); border-radius: 0 3px 3px 0; }
  .tab.active { background: #c9a45b12; }
  .topbar { padding-left: 22px; padding-right: 22px; }
  .toasts { bottom: 24px; }
  .only-phone { display: none !important; }
  .only-tablet { display: grid; }
  .split { display: grid; grid-template-columns: minmax(330px, 38%) minmax(0, 1fr); }
  .pane-list { border-right: 1px solid var(--line-soft); padding: 18px 16px 24px; }
  .pane-detail { position: static; transform: none; visibility: visible; transition: none; min-width: 0; height: 100%; background: #0b0b0d; }
  #sec-libros .split { grid-template-columns: minmax(380px, 46%) minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .detail-scroll { padding: 24px 28px 36px; }
  .detail-scroll > * { max-width: 760px; margin-left: auto; margin-right: auto; }
  .buy-bar { margin: 16px -28px 0; padding: 12px 28px; }
  .messages { padding: 18px 24px; } .composer { padding: 10px 20px 14px; }
  .page { padding: 22px 28px 40px; }
  dialog.sheet { margin: auto; border-radius: 22px; border: 1px solid var(--line); max-height: 88dvh; }
  dialog.sheet[open] { animation: none; }
  .sheet-body::before { display: none; }
}
@media (min-width: 820px) and (orientation: portrait) { .split { grid-template-columns: minmax(300px, 42%) minmax(0, 1fr); } #sec-libros .split { grid-template-columns: minmax(300px, 46%) minmax(0, 1fr); } .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
@media (max-width: 360px) { .brand b { font-size: 10.5px; } .cover.big { width: 100px; } .pane-head h1, .page-head h1 { font-size: 26px; } }
@media (orientation: landscape) and (max-height: 480px) and (max-width: 819px) { :root { --tabh: 48px; } .tab { flex-direction: row; gap: 8px; } .topbar { padding-top: calc(4px + var(--sat)); padding-bottom: 4px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Inicio ---------- */
.page.home { max-width: 1040px; }
.hero { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid #c9a45b3a; background: #081a32; isolation: isolate; touch-action: pan-y; box-shadow: 0 24px 60px #0007; }
.hero-track { position: relative; height: clamp(360px, 62vh, 460px); }
.hero-slide { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 22px 20px 62px; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.hero-slide.active { opacity: 1; visibility: visible; transition: opacity .9s ease; }
.hero-bg { position: absolute; inset: -6%; z-index: -2; background: #163858 url('/assets/img/hero-bg.webp') var(--pos, center) / cover no-repeat; filter: saturate(.85) brightness(.9); transform: scale(1.02); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, #d8b45d55, transparent 55%); mix-blend-mode: screen; }
.hero-slide.active .hero-bg { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.02) translate3d(calc(var(--dir, 1) * -2%), 0, 0); } to { transform: scale(1.16) translate3d(calc(var(--dir, 1) * 2%), -1.5%, 0); } }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #0e0e1040 0%, #0e0e10aa 45%, #102b49f2 100%); }
.hero-seal { position: absolute; top: 14px; right: 18px; font: 500 64px/1 var(--serif); color: #e4c78433; letter-spacing: .04em; -webkit-text-stroke: 1px #e4c78466; color: transparent; }
.hero-copy { max-width: 620px; }
.hero-copy h2 { font-size: clamp(25px, 6.4vw, 38px); margin: 8px 0 10px; color: #fffaf0; text-wrap: balance; }
.hero-copy p { color: #ddd6c8; font-size: 15px; margin: 0 0 14px; }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-slide .eyebrow, .hero-slide h2, .hero-slide p, .hero-slide .hero-cta { opacity: 0; transform: translateY(16px); }
.hero-slide.active .eyebrow { animation: rise .7s .15s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-slide.active h2 { animation: rise .8s .3s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-slide.active p { animation: rise .8s .45s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-slide.active .hero-cta { animation: rise .8s .6s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-bar { position: absolute; left: 20px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-dots { display: flex; gap: 6px; flex: 1; max-width: 260px; }
.hero-dot { flex: 1; height: 28px; display: flex; align-items: center; }
.hero-dot i { display: block; width: 100%; height: 4px; border-radius: 2px; background: #ffffff33; position: relative; overflow: hidden; }
.hero-dot i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.hero-dot.done i::after { transform: scaleX(1); }
.hero-dot.run i::after { animation: fill 6.5s linear forwards; }
.hero.paused .hero-dot.run i::after, .hero.paused .hero-slide.active .hero-bg { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.hero-dot[aria-selected=true]:not(.run) i::after { transform: scaleX(1); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 6px; }
.quick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 12px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); color: var(--gold); }
.quick b { color: var(--text); font-size: 15px; margin-top: 6px; } .quick small { color: var(--muted); font-size: 12px; }
.quick button:active { background: var(--panel2); }
.home-sec { margin-top: 26px; }
.home-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.home-sec-head h2 { font-size: 22px; margin-top: 3px; }
.rail { display: flex; gap: 10px; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 8px; scroll-snap-type: x proximity; scroll-padding-left: 14px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 154px; min-height: 132px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: left; background: linear-gradient(160deg, #102b49, var(--panel)); border: 1px solid var(--line); border-radius: 16px; scroll-snap-align: start; position: relative; overflow: hidden; }
.cat::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 90px; height: 90px; border-radius: 50%; border: 1px solid #d8b45d44; }
.cat:active { border-color: var(--gold); }
.cat-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #c9a45b1c; color: var(--gold); margin-bottom: 8px; }
.cat b { font: 600 15.5px/1.2 var(--serif); } .cat small { color: var(--muted); font-size: 12.5px; margin-top: auto; }
.vdots { display: flex; gap: 4px; margin-top: 2px; } .vd { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.vd.v-desmentido { background: var(--ok); } .vd.v-confirmado { background: var(--bad); } .vd.v-parcialmente_cierto { background: var(--warn); }
.latest .row .ic { color: var(--gold); }
@media (min-width: 820px) {
  .hero-track { height: 420px; } .hero-slide { padding: 30px 40px 66px; } .hero-bar { left: 40px; }
  .hero-seal { font-size: 96px; right: 32px; } .hero-copy p { font-size: 16.5px; }
  .rail { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; } .cat { width: calc(25% - 8px); min-width: 150px; }
  .quick button { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; } .quick b { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-slide .eyebrow, .hero-slide h2, .hero-slide p, .hero-slide .hero-cta { opacity: 1; transform: none; animation: none !important; } .hero-slide.active .hero-bg { animation: none; } }

/* Comparativa narrativa de potencias: adaptación móvil del bloque de la web de escritorio. */
.powers-box { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 1rem; background: var(--surface, rgba(255,255,255,.035)); }
.powers-heading { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.powers-heading-icon { display: grid; place-items: center; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; border-radius: .8rem; color: #d8b66a; background: rgba(216,182,106,.12); }
.powers-heading h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.powers-heading p { margin: 0; color: var(--muted, #a8a8ad); font-size: .82rem; line-height: 1.45; }
.powers-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.power-item { min-width: 0; padding: .9rem; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: .85rem; background: rgba(255,255,255,.025); }
.power-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; }
.power-flag { font-size: 1.45rem; line-height: 1; }
.power-head h4 { margin: 0; font-size: .98rem; }
.power-item > p { margin: 0; font-size: .88rem; line-height: 1.6; color: var(--text, #ededed); white-space: pre-line; }
.power-sources { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--line, rgba(255,255,255,.1)); color: var(--muted, #a8a8ad); font-size: .76rem; }
.power-sources b { display: flex; align-items: center; gap: .35rem; color: #d8b66a; font-weight: 600; }
.power-sources ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.power-sources li { margin: .2rem 0; line-height: 1.45; }
.powers-disclaimer, .powers-message, .powers-loading-label { margin: .8rem 0 0; color: var(--muted, #a8a8ad); font-size: .74rem; line-height: 1.5; }
.powers-loading { display: grid; grid-template-columns: 1fr; gap: .65rem; }
.power-skeleton { height: 116px; border-radius: .8rem; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: power-shimmer 1.3s infinite; }
@keyframes power-shimmer { to { background-position: -200% 0; } }
.powers-error { padding: .85rem; border-radius: .75rem; background: rgba(180,70,70,.09); color: var(--text, #ededed); }
.powers-error p { margin: 0 0 .7rem; font-size: .85rem; }
@media (min-width: 680px) { .powers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tienda propia: productos y servicios digitales */
.seg.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 390px) { .seg.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.store-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.store-product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.store-product-image { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--panel2); }
.store-product-placeholder { display: grid; place-items: center; color: var(--gold-soft); }
.store-product-content { padding: 15px; }
.store-product-content h3 { margin: 5px 0 8px; font-size: 18px; }
.store-product-content p { color: var(--muted); font-size: 13px; line-height: 1.55; min-height: 40px; }
.store-product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.store-product-bottom > strong { font-size: 19px; }
.store-product-bottom small { font-size: 12px; color: var(--muted); }
.store-product-sheet-image { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
.credit-use, .renew-choice { display: block; padding: 12px; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
.credit-use label, .renew-choice { font-size: 14px; }
.credit-use small { display: block; color: var(--muted); margin: 4px 0 0 22px; }
.credit-use p { margin: 8px 0 0 22px; }
.store-purchase-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.store-purchase-row .row-main { display: grid; gap: 4px; }
.store-purchase-row small { color: var(--muted); font-size: 12px; }

/* Biblioteca Histórica unificada */
.library-intro { margin: -4px 0 12px; max-width: 58ch; font-size: 13px; line-height: 1.5; }
.library-note { margin: 8px 2px 12px; }
#lbFilters .chips { margin-bottom: 8px; }


/* LVH mobile app · identidad oficial blanco, verde y dorado */
html, body, .app, .stage, .section { background: #fff !important; color: #174b32 !important; }
.topbar { background: #fff !important; border-color: #d5e5d8 !important; }
.brand b, .tab.active, .icon-btn, .link-btn { color: #a17b22 !important; }
.tabbar { background: #f4faf5 !important; border-color: #d5e5d8 !important; }
.tab.active::before { background: #c5a13a !important; }
.row, .card, .pane, .pane-list, .detail-head, .detail-scroll, .list-item, .message, .sheet, .modal { background-color: #fff !important; border-color: #d5e5d8 !important; color: #174b32 !important; }
.btn-gold { background: linear-gradient(135deg,#286a45,#174b32) !important; color: #fff !important; border-color: #c5a13a !important; }
:where(input:not([type=checkbox]):not([type=radio]), textarea, select), .search, .choice label, .seg { background: #f7fbf8 !important; border-color: #d5e5d8 !important; color: #174b32 !important; }
:focus-visible { outline-color: #c5a13a !important; }


/* Verifier: small sailing-ship loading animation */
.lvh-boat-loader{max-width:520px;margin:1rem auto 1.5rem;padding:1.2rem 1rem;text-align:center;border:1px solid #dce8dd;border-radius:16px;background:linear-gradient(180deg,#fff 0%,#f1f8f2 100%);color:#245b3d;overflow:hidden}
.lvh-boat-scene{height:112px;position:relative;background:linear-gradient(180deg,#f8fcf8 0 55%,#dcefe4 56% 100%);border-radius:12px;overflow:hidden}
.lvh-boat-scene svg{width:100%;height:100%;overflow:visible}
.boat-moving{transform-origin:150px 68px;animation:boat-sail 4.2s ease-in-out infinite}
.boat-hull{fill:#236342;stroke:#17482f;stroke-width:2}
.boat-sail{fill:#c7a449;stroke:#9a7b2d;stroke-width:1.5}
.boat-sail-light{fill:#fffdf4}
.boat-mast{stroke:#775c28;stroke-width:3;stroke-linecap:round}
.boat-deck{fill:#d8b95d}
.boat-wave{fill:none;stroke:#77ad91;stroke-width:3;stroke-linecap:round;stroke-dasharray:12 8;animation:water-drift 3.2s linear infinite}
.wave-front{stroke:#4d9670;stroke-width:3.5}.wave-second{opacity:.65;animation-duration:4.6s}
.lvh-boat-loader p{margin:.7rem 0 0;font-weight:600;color:#315d42}
@keyframes boat-sail{0%,100%{transform:translateX(-24px) translateY(1px) rotate(-1deg)}50%{transform:translateX(24px) translateY(-4px) rotate(1.5deg)}}
@keyframes water-drift{from{stroke-dashoffset:0}to{stroke-dashoffset:-80}}
@media(prefers-reduced-motion:reduce){.boat-moving,.boat-wave{animation:none}}
