/* Bible Spin web: mismos colores, letras y formas que la app de Android (ui/theme/Theme.kt). */
@font-face { font-family: Cormorant; font-weight: 500; font-display: swap; src: url(fonts/cormorant_500.ttf) format('truetype'); }
@font-face { font-family: Cormorant; font-weight: 600; font-display: swap; src: url(fonts/cormorant_600.ttf) format('truetype'); }
@font-face { font-family: Cormorant; font-weight: 700; font-display: swap; src: url(fonts/cormorant_700.ttf) format('truetype'); }
@font-face { font-family: Cormorant; font-weight: 500; font-style: italic; font-display: swap; src: url(fonts/cormorant_500_italic.ttf) format('truetype'); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter_400.ttf) format('truetype'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/inter_500.ttf) format('truetype'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter_600.ttf) format('truetype'); }

:root {
  --bgTop: #121C3A; --bgBottom: #0B1226; --glowGold: rgba(212,175,90,.20); --glowBlue: rgba(70,90,170,.28);
  /* recuadros: marfil con un toque dorado (champán), más claro arriba y con filo dorado finito */
  --card: #F6EAD0; --cardHi: #FDF7EB; --card2: #EEDFC0; --simpleTop: #FBF1DC; --simpleBottom: #F1E2C0; --cardBorder: rgba(184,146,58,.42);
  --cardEdge: rgba(212,175,90,.38); --cardGlow: rgba(230,198,118,.20);
  --ink: #1F1A12; --soft: #5B503C; --gold: #D4AF5A; --gold2: #B8923A; --goldStart: #E6C676; --goldEnd: #C9A04A;
  --onGold: #1B1403; --onBg: #FFFDF8; --onBgSoft: #AEB6D1; --ghost: rgba(255,255,255,.08); --line: rgba(212,175,90,.28);
  --tabBg: rgba(11,18,38,.94); --tabInactive: #8F98B8; --danger: #A4473A; --field: #FFFDF8;
  --serif: Cormorant, Georgia, 'Times New Roman', serif; --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tabH: 68px;
  --fs: 1; /* tamaño de letra de lectura (A− / A+) */
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bgTop: #0C1430; --bgBottom: #060A16; --glowGold: rgba(212,175,90,.12); --glowBlue: rgba(70,90,170,.20);
    /* modo oscuro: el fondo sigue marino con movimiento; los recuadros, champán un poco menos brillante
       para que no deslumbren de noche */
    --card: #EFE0C1; --cardHi: #F8EFDC; --card2: #E6D3AE; --simpleTop: #F4E7CD; --simpleBottom: #E9D7B1;
    --cardBorder: rgba(184,146,58,.42); --cardEdge: rgba(212,175,90,.45); --cardGlow: rgba(230,198,118,.22);
    --ink: #1F1A12; --soft: #5B503C; --gold: #D9B865; --gold2: #A9842F; --goldStart: #E0C06E; --goldEnd: #BF9844;
    --onBg: #F3EEE2; --onBgSoft: #9AA3C0; --ghost: rgba(255,255,255,.07); --line: rgba(212,175,90,.24);
    --tabBg: rgba(6,10,22,.95); --field: #FFFBF2;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--sans); color: var(--onBg); background: var(--bgBottom);
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
textarea { font: inherit; }

/* Fondo como BsBackground: degradado marino, resplandor dorado arriba y azul abajo a la derecha */
#app {
  position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, var(--glowGold), transparent 65%),
    radial-gradient(ellipse 70% 40% at 95% 100%, var(--glowBlue), transparent 60%),
    linear-gradient(180deg, var(--bgTop), var(--bgBottom));
}
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.screen {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s;
  padding: calc(env(safe-area-inset-top) + 22px) 20px calc(var(--tabH) + env(safe-area-inset-bottom) + 24px);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.on { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.col { max-width: 520px; margin: 0 auto; }
.wide { max-width: 560px; margin: 0 auto; }

/* ---------- textos ---------- */
.eyebrow { font: 500 11px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); text-align: center; }
.title { font: 600 31px/36px var(--serif); color: var(--onBg); text-align: center; margin-top: 6px; }
.subtitle { font: 400 14px/23px var(--sans); color: var(--onBgSoft); text-align: center; margin-top: 6px; min-height: 23px; }
.head { margin-bottom: 18px; }
.label { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold2); }

/* ---------- botones ---------- */
.gold {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 54px; padding: 14px 18px; border-radius: 16px;
  font: 600 15px var(--sans); letter-spacing: .02em; color: var(--onGold);
  background: linear-gradient(135deg, var(--goldStart), var(--goldEnd));
  transition: transform .15s ease, filter .15s ease;
}
.gold:active { transform: scale(.98); filter: brightness(.96); }
a.gold { text-decoration: none; }
.gold[disabled] { opacity: .5; cursor: default; }
.gold.shining::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 5.1s linear 1.6s infinite;
}
@keyframes shine { 0% { transform: translateX(-120%); } 25%, 100% { transform: translateX(120%); } }
.ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 14px; border-radius: 16px;
  font: 600 15px var(--sans); letter-spacing: .02em; color: var(--onBg); background: var(--ghost); border: 1px solid var(--line);
  transition: transform .15s ease, background .15s ease;
}
.ghost:active { transform: scale(.98); background: rgba(255,255,255,.12); }
.ghost.oncard { color: var(--ink); background: var(--card2); border-color: var(--cardBorder); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.textbtn { font: 600 14px var(--sans); letter-spacing: .02em; color: var(--gold2); padding: 10px 12px; border-radius: 10px; }
.textbtn:active { background: rgba(184,146,58,.12); }
.textbtn.danger { color: var(--danger); }
.ico { width: 19px; height: 19px; flex: none; }

/* ---------- bienvenida ---------- */
#welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: calc(env(safe-area-inset-top) + 64px); padding-bottom: calc(env(safe-area-inset-bottom) + 40px); }
.langs { position: absolute; top: calc(env(safe-area-inset-top) + 14px); right: 16px; display: flex; padding: 3px; border-radius: 30px; background: var(--ghost); border: 1px solid var(--line); z-index: 2; }
.langs { align-items: center; }
.langs .globe { display: grid; place-items: center; padding: 0 6px 0 9px; color: var(--gold); }
.langs .globe .ico { width: 18px; height: 18px; }
.langs button { font: 600 11px var(--sans); letter-spacing: .16em; padding: 9px 16px; border-radius: 30px; color: var(--onBgSoft); }
.langs button[aria-pressed=true] { background: var(--gold); color: var(--onGold); }
.welcome-in { max-width: 380px; width: 100%; display: flex; flex-direction: column; align-items: center; animation: rise .9s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.emblem { position: relative; width: 164px; aspect-ratio: 720/500; animation: float 3.6s ease-in-out infinite; }
.emblem img { width: 100%; height: 100%; display: block; }
.star { position: absolute; left: 50%; top: 12.5%; width: 28px; height: 28px; transform: translate(-50%, -50%); filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); animation: twinkle 1.5s ease-in-out infinite alternate; pointer-events: none; }
@keyframes float { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }
@keyframes twinkle { from { opacity: .3; transform: translate(-50%, -50%) scale(.85); } to { opacity: .85; transform: translate(-50%, -50%) scale(1.1); } }
.display { font: 600 54px/56px var(--serif); margin-top: 10px; }
.display span, .brand span { color: var(--gold); }
.tagline { font: 500 11px var(--sans); letter-spacing: .3em; color: var(--gold); margin-top: 12px; text-transform: uppercase; }
.lead { font: 500 22px/33px var(--serif); margin-top: 38px; }
.sub { font: 400 14px/23px var(--sans); color: var(--onBgSoft); margin: 14px 0 40px; }
#welcome .gold { width: 80%; }
.privacy-link { margin-top: 18px; font: 400 14px var(--sans); color: var(--onBgSoft); padding: 10px 14px; }
.install-link { margin-top: 2px; font: 600 13px var(--sans); color: var(--gold); padding: 8px 14px; display: none; }
.install-link.on { display: inline-flex; }

/* ---------- apertura ---------- */
#opening { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
#opening .breath { position: absolute; left: 50%; top: 44%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,90,.5), transparent 70%); animation: breath 1.1s ease-in-out infinite alternate; }
@keyframes breath { from { transform: scale(.85); } to { transform: scale(1.12); } }
#opening .book { position: relative; width: 176px; aspect-ratio: 720/500; margin-top: -40px; }
#opening .book img { width: 100%; height: 100%; }
#opening .word { position: relative; margin-top: 22px; font: 600 22px var(--serif); letter-spacing: .14em; text-align: center; padding: 0 16px; }
#bloom { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 44%, #FFF3D6, #FFF3D6 55%, rgba(255,243,214,.85)); z-index: 30; }

/* ---------- tarjetas ---------- */
.card { position: relative; overflow: hidden; border-radius: 22px; background: radial-gradient(140% 70% at 0% 0%, var(--cardGlow), transparent 55%), linear-gradient(180deg, var(--cardHi), var(--card)); border: 1px solid var(--cardEdge); color: var(--ink); padding: 28px 24px; box-shadow: 0 16px 36px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06); transform-origin: 0 50%; }
.card .q { position: absolute; left: 6px; top: -36px; font: 500 120px/120px var(--serif); color: rgba(184,146,58,.18); pointer-events: none; }
.badge { display: inline-block; font: 600 10.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold2); background: rgba(184,146,58,.13); padding: 5px 12px; border-radius: 20px; }
.ref { font: 700 calc(28px * var(--fs))/1.15 var(--serif); margin-top: 14px; }
.verse { font: 500 calc(23px * var(--fs))/1.56 var(--serif); margin-top: 10px; }
.verse span { transition: none; }
.readch { display: flex; align-items: center; gap: 6px; margin: 6px -6px -12px auto; }
.sweep { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(212,175,90,.32) 50%, transparent 65%); transform: translateX(-130%); }
.card.sweeping .sweep { animation: sweep 1.4s linear .45s 1 both; }
@keyframes sweep { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
.deck { perspective: 1100px; position: relative; }
.simple { margin-top: 16px; border-radius: 20px; padding: 24px; color: var(--ink); background: linear-gradient(160deg, var(--simpleTop), var(--simpleBottom)); border: 1px solid var(--cardBorder); box-shadow: 0 14px 30px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05); }
.simple.hidden { opacity: 0; transform: translateY(22px); }
.simple { transition: opacity .8s ease, transform .8s ease; }
.simple .label { display: flex; align-items: center; gap: 8px; }
.simple p { font: 400 calc(16px * var(--fs))/1.68 var(--sans); margin-top: 10px; }
.simple .apply { color: var(--soft); font-size: calc(15px * var(--fs)); margin-top: 8px; }
.dash { border-top: 1px dashed rgba(184,146,58,.5); margin: 18px 0; }
.actions { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.skeleton { border-radius: 22px; background: var(--card); padding: 24px; }
.skeleton i { display: block; height: 14px; border-radius: 8px; margin: 14px 0; background: var(--card2); animation: pulse .7s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .35; } to { opacity: .8; } }

/* ---------- Biblia ---------- */
.bible-head { text-align: center; margin-bottom: 12px; }
.chapter-btn { display: inline-flex; align-items: baseline; gap: 4px; margin-top: 6px; padding: 2px 12px; border-radius: 14px; font: 600 31px/36px var(--serif); color: var(--onBg); }
.chapter-btn small { font: 500 22px var(--serif); color: var(--gold); }
.page { background: linear-gradient(180deg, var(--cardHi), var(--card) 320px); border: 1px solid var(--cardEdge); color: var(--ink); border-radius: 22px; padding: 18px 12px 18px; box-shadow: 0 16px 36px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.page .hint { font: 400 12.5px var(--sans); color: var(--gold2); padding: 2px 10px 6px; }
.v { display: flex; gap: 6px; width: 100%; text-align: left; padding: 5px 10px; border-radius: 12px; font: 500 calc(19px * var(--fs))/1.53 var(--serif); color: var(--ink); transition: background .6s ease; }
.v:active { background: rgba(184,146,58,.12); }
.v sup { font: 700 12px var(--sans); color: var(--gold2); margin-right: 4px; vertical-align: .45em; }
.v .t { flex: 1; }
.v .mark { width: 14px; height: 14px; color: var(--gold2); margin-top: 7px; flex: none; }
.v.lit { background: rgba(212,175,90,.55); }
.v.lit.settled { background: rgba(212,175,90,.18); transition: background 1.4s ease; }
.turn { margin-top: 18px; }
.chapter-in-next { animation: inNext .42s ease both; }
.chapter-in-prev { animation: inPrev .42s ease both; }
@keyframes inNext { from { opacity: 0; transform: translateX(33%); } to { opacity: 1; transform: none; } }
@keyframes inPrev { from { opacity: 0; transform: translateX(-33%); } to { opacity: 1; transform: none; } }
.books { display: flex; flex-wrap: wrap; gap: 8px; }
.books button { font: 400 14px var(--sans); color: var(--ink); background: var(--card2); padding: 9px 14px; border-radius: 20px; }
.books button.on { background: var(--gold); color: var(--onGold); }
.chapters { display: flex; flex-wrap: wrap; gap: 10px; }
.chapters button { width: 48px; height: 48px; border-radius: 50%; background: var(--card2); border: 1px solid var(--cardBorder); font: 600 15px var(--sans); color: var(--ink); }
.sheet .back { font: 600 31px var(--serif); color: var(--gold2); padding: 0 10px 0 0; }

/* ---------- notas y oración ---------- */
.list { display: flex; flex-direction: column; gap: 14px; }
.item { background: linear-gradient(180deg, var(--cardHi), var(--card)); border: 1px solid var(--cardEdge); color: var(--ink); border-radius: 18px; padding: 20px 20px 8px; box-shadow: 0 12px 28px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.item .when { font: 600 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold2); }
.item .iref { font: 700 23px var(--serif); margin-top: 4px; }
.item .itext { font: 500 calc(18px * var(--fs))/1.5 var(--serif); color: var(--soft); margin-top: 6px; }
.item .box { margin-top: 12px; border-radius: 12px; background: var(--card2); padding: 12px 14px; font: 400 calc(14px * var(--fs))/1.64 var(--sans); }
.item .box .apply { color: var(--soft); margin-top: 8px; }
.item .mine { font: italic 400 calc(15px * var(--fs))/1.6 var(--sans); margin-top: 12px; }
.item .btns { display: flex; flex-wrap: wrap; margin: 4px -12px 0; }
.empty { text-align: center; padding: 60px 20px; }
.empty .lead { margin-top: 0; }
.empty p { font: 400 14px/23px var(--sans); color: var(--onBgSoft); margin-top: 8px; }
.filters { display: flex; gap: 8px; }
.filters button { flex: 1; padding: 10px 4px; border-radius: 30px; font: 600 12px/1.25 var(--sans); letter-spacing: .02em; color: var(--onBgSoft); background: var(--ghost); border: 1px solid var(--line); }
.filters button[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: var(--onGold); }
.status { font: 600 10px var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; color: var(--gold2); background: rgba(184,146,58,.13); white-space: nowrap; }
.status.done { background: var(--gold); color: var(--onGold); }
.prow { display: flex; align-items: center; gap: 10px; }
.prow .when { flex: 1; }
.ptext { font: 500 calc(21px * var(--fs))/1.43 var(--serif); margin-top: 8px; }
.answered { font: 400 13px var(--sans); color: var(--gold2); margin-top: 6px; }
.pnote { margin-top: 10px; border-radius: 12px; background: var(--card2); padding: 10px 14px; }
.pnote b { display: block; font: 600 11px var(--sans); letter-spacing: .02em; color: var(--gold2); }
.pnote span { font: 400 calc(14px * var(--fs))/1.64 var(--sans); }

/* ---------- donar ---------- */
.give { text-align: center; }
.give .heart { width: 76px; height: 76px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(212,175,90,.35), transparent 70%); }
.give .card { text-align: left; margin-top: 18px; }
.give .card p { font: 400 16px/27px var(--sans); }
.give blockquote { font: italic 500 20px/30px var(--serif); color: var(--soft); margin-top: 18px; padding-left: 14px; border-left: 3px solid var(--gold); }
.give blockquote cite { display: block; font: 600 11px var(--sans); letter-spacing: .16em; font-style: normal; text-transform: uppercase; color: var(--gold2); margin-top: 6px; }
.give .note { font: 400 12.5px/20px var(--sans); color: var(--onBgSoft); margin-top: 12px; }
.give .thanks { font: 500 19px/28px var(--serif); color: var(--onBg); margin-top: 26px; }

/* ---------- letra, escuchar y buscar ---------- */
.tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; min-width: 46px; padding: 8px 14px; border-radius: 30px; font: 600 14px var(--sans); color: var(--onBg); background: var(--ghost); border: 1px solid var(--line); }
.pill .ico { width: 17px; height: 17px; }
.pill[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: var(--onGold); }
.pill:disabled { opacity: .35; cursor: default; }
.v.reading { background: rgba(212,175,90,.32); }
.sizes { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-top: 18px; }
.sizes button { flex: 1; height: 64px; border-radius: 16px; background: var(--card2); border: 1px solid var(--cardBorder); font-family: var(--serif); font-weight: 600; color: var(--ink); }
.sizes button[aria-checked=true] { background: var(--gold); border-color: var(--gold); color: var(--onGold); }
.voices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; max-height: 42vh; overflow-y: auto; }
.vrow { display: flex; gap: 8px; align-items: stretch; }
.vrow [role=radio] { flex: 1; text-align: left; padding: 10px 14px; border-radius: 14px; background: var(--card2); border: 1px solid var(--cardBorder); font: 600 14px var(--sans); color: var(--ink); }
.vrow [role=radio] small { display: block; font: 400 12px var(--sans); color: var(--soft); margin-top: 2px; }
.vrow [role=radio][aria-checked=true] { background: var(--gold); border-color: var(--gold); color: var(--onGold); }
.vrow [role=radio][aria-checked=true] small { color: var(--onGold); opacity: .75; }
.vrow .pill { color: var(--ink); background: var(--card2); border-color: var(--cardBorder); }
.vnone { font: 400 14px/22px var(--sans); color: var(--soft); margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--card2); }
.fs-preview { font: 500 calc(21px * var(--fs))/1.5 var(--serif); color: var(--soft); margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--card2); }
.search { display: flex; gap: 8px; margin: 14px 0; }
.search input { flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--ghost); color: var(--onBg); font: 400 16px var(--sans); }
.search input::placeholder { color: var(--onBgSoft); }
.search input:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.search .pill { min-height: 46px; border-radius: 16px; }
.rinfo { font: 400 14px/22px var(--sans); color: var(--onBgSoft); margin: 2px 4px 12px; }
.results { display: flex; flex-direction: column; gap: 10px; }
.sres { display: block; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; background: linear-gradient(180deg, var(--cardHi), var(--card)); border: 1px solid var(--cardEdge); color: var(--ink); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.sres b { display: block; font: 700 calc(17px * var(--fs)) var(--serif); color: var(--gold2); }
.sres span { display: block; font: 500 calc(18px * var(--fs))/1.5 var(--serif); margin-top: 2px; }
mark { background: rgba(212,175,90,.42); color: inherit; border-radius: 4px; padding: 0 2px; }
.backbtn { margin-bottom: 12px; width: 100%; }

/* ---------- barra de pestañas ---------- */
.tabs {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center;
  background: var(--tabBg); border-top: 1px solid var(--line);
  padding: 8px 4px calc(env(safe-area-inset-bottom) + 8px);
  transform: translateY(110%); transition: transform .35s ease;
}
.tabs.on { transform: none; }
.tabs .in { display: flex; width: 100%; max-width: 560px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 11px var(--sans); letter-spacing: .02em; color: var(--tabInactive); padding: 2px 0; }
.tab i { width: 56px; height: 30px; border-radius: 16px; display: grid; place-items: center; transition: background .2s ease; }
.tab svg { width: 21px; height: 21px; }
.tab[aria-current=page] { color: var(--gold); }
.tab[aria-current=page] i { background: rgba(212,175,90,.14); }

/* ---------- hojas, diálogos, aviso ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s ease; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; overflow-y: auto;
  max-width: 600px; margin: 0 auto; background: var(--card); color: var(--ink);
  border-radius: 28px 28px 0 0; padding: 12px 24px calc(env(safe-area-inset-bottom) + 24px);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.sheet.on { transform: none; }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--soft); opacity: .4; margin: 0 auto 16px; }
.sheet h2 { font: 600 26px/32px var(--serif); }
.sheet .desc { font: 400 14px/23px var(--sans); color: var(--soft); margin-top: 6px; }
.sheet textarea { width: 100%; min-height: 120px; margin-top: 16px; padding: 14px; border-radius: 14px; border: 1px solid var(--cardBorder); background: var(--field); color: var(--ink); font: 400 16px/25px var(--sans); resize: vertical; }
.sheet textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.sheet .row { margin-top: 16px; }
.sheet .vtext { font: 500 calc(19px * var(--fs))/1.47 var(--serif); color: var(--soft); margin-top: 8px; }
.sheet .stack { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.sheet .preview { width: 100%; border-radius: 14px; margin-top: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); background: var(--card2); aspect-ratio: 1080/1350; object-fit: contain; }
.sheet .sec { margin: 18px 0 8px; }
.dialog { position: fixed; z-index: 41; left: 50%; top: 50%; width: min(400px, calc(100vw - 48px)); transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: all .2s ease; background: var(--card); color: var(--ink); border-radius: 26px; padding: 24px; max-height: 80vh; overflow-y: auto; }
.dialog.on { opacity: 1; transform: translate(-50%, -50%); }
.dialog h2 { font: 600 28px/32px var(--serif); }
.dialog p { font: 400 14px/23px var(--sans); color: var(--soft); margin-top: 12px; white-space: pre-line; }
.dialog .btns { display: flex; justify-content: flex-end; gap: 4px; margin-top: 16px; }
#toast {
  position: fixed; left: 50%; z-index: 50; bottom: calc(var(--tabH) + env(safe-area-inset-bottom) + 24px);
  transform: translate(-50%, 20px); opacity: 0; transition: all .25s ease; pointer-events: none;
  background: var(--gold); color: var(--onGold); font: 600 14px var(--sans); padding: 12px 20px; border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: calc(100vw - 48px); text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 900px) {
  .screen { padding-left: 32px; padding-right: 32px; }
}
