/* ==========================================================================
   Anchor — components
   ========================================================================== */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html {
  /* iOS home-screen app fix (carried over from Anchor 8.x): make the document a little
     taller than the screen and pin the body. Without this, iOS stops drawing above the
     home indicator and leaves a dead band at the bottom. */
  min-height: 100%;
  min-height: calc(100dvh + env(safe-area-inset-bottom));
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--bg);
}
body {
  position: fixed; width: 100%;
  min-height: 100vh; min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: var(--grain);
  opacity: .35;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .06; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] body::before { mix-blend-mode: screen; opacity: .06; } }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- App frame ---------- */
.app {
  position: relative;
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  z-index: 1;
}
@media (min-width: 600px) {
  .app { box-shadow: 0 0 0 1px var(--line), var(--shadow-3); }
}

.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 28px);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s var(--dur);
}
.screen::-webkit-scrollbar { display: none; }
.screen.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s;
}
.screen[data-screen="ask"] { padding-bottom: 0; overflow: hidden; display: flex; flex-direction: column; }

.page { padding: 18px 18px 0; position: relative; }
.stagger > * { opacity: 0; transform: translateY(10px); animation: rise .5s var(--ease) forwards; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .17s; }
.stagger > *:nth-child(5) { animation-delay: .22s; }
.stagger > *:nth-child(6) { animation-delay: .27s; }
.stagger > *:nth-child(7) { animation-delay: .32s; }
.stagger > *:nth-child(n+8) { animation-delay: .36s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: calc(var(--safe-top) + 18px) 22px 30px;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--lit) 55%, transparent) 0%, transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(201,164,73,.18) 0%, transparent 60%),
    linear-gradient(165deg, var(--navy-2) 0%, var(--navy) 70%);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  overflow: hidden;
  box-shadow: 0 14px 34px -14px rgba(20,32,63,.55);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--grain); opacity: .22; mix-blend-mode: overlay; pointer-events: none;
}
.hero::after { /* faint rose-window circle */
  content: ''; position: absolute; width: 300px; height: 300px; right: -110px; top: -120px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 0 0 26px rgba(255,255,255,.025), 0 0 0 54px rgba(255,255,255,.02);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-compact { padding-bottom: 22px; }

/* Missal ribbon in the day's liturgical color */
.ribbon {
  position: absolute !important; top: 0; right: 30px; z-index: 2 !important;
  width: 16px; height: calc(var(--safe-top) + 64px);
  background: linear-gradient(90deg, color-mix(in srgb, var(--lit) 80%, #000) 0%, var(--lit) 45%, color-mix(in srgb, var(--lit) 80%, #000) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
  animation: ribbon-drop .9s var(--spring) both;
  transform-origin: top;
}
@keyframes ribbon-drop { from { transform: scaleY(0); } }

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-right: 30px; }
.eyebrow {
  font-family: var(--font-caps);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-2);
}
.hero .eyebrow { color: rgba(233,203,135,.92); }
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.6rem; line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.hero-title em { font-style: italic; color: var(--gold-2); }
.hero-sub { margin: 0; font-size: .92rem; color: rgba(255,255,255,.66); }
.hero-day {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lit); box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.hero-actions { display: flex; gap: 8px; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  color: #fff; font-size: .82rem; font-weight: 700;
  transition: transform .15s var(--ease), background .2s;
}
.hero-btn:active { transform: scale(.94); }
.hero-btn svg { width: 18px; height: 18px; }
.hero-btn.flame { color: #ffd38a; }

/* ---------- Section labels ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 12px; }
.section-title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.section-link { background: none; border: 0; color: var(--gold); font-weight: 700; font-size: .8rem; padding: 4px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
  margin-bottom: 14px;
  position: relative;
}
.card-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-caps);
  font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.card-label::before { content: '✦'; font-size: .7rem; }
.card-label .spacer { flex: 1; }
.card-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.serif { font-family: var(--font-display); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .82rem; }

/* Now card */
.now-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--lit-soft) 0%, transparent 60%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--lit) 30%, var(--line));
  cursor: pointer;
  margin-top: -2px;
  transition: transform .18s var(--ease);
}
.now-card:active { transform: scale(.985); }
.now-icon {
  flex: none; width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  box-shadow: 0 8px 20px -6px rgba(184,145,58,.6), inset 0 1px 0 rgba(255,255,255,.4);
}
.now-icon svg { width: 28px; height: 28px; }
.now-body { flex: 1; min-width: 0; }
.now-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lit); }
:root[data-lit="white"] .now-kicker { color: var(--gold); }
.now-title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.1; margin: 2px 0 2px; }
.now-sub { font-size: .84rem; color: var(--ink-2); }
.now-go {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: #fff;
}
:root[data-theme="dark"] .now-go { background: var(--gold); color: var(--navy); }
.now-go svg { width: 18px; height: 18px; }

/* Rule ring */
.rule-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ring { width: 104px; height: 104px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-3); }
.ring .fill { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1; }
.ring-of { font-size: .68rem; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.rule-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rule-item {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px 4px; border-radius: 10px; text-align: left;
  font-size: .9rem; color: var(--ink);
}
.rule-item:active { background: var(--surface-2); }
.rule-check {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.6px solid var(--line-2);
  display: grid; place-items: center; color: transparent;
  transition: all .3s var(--spring);
}
.rule-check svg { width: 13px; height: 13px; }
.rule-item.done .rule-check { background: var(--gold); border-color: var(--gold); color: #fff; transform: scale(1.06); }
.rule-item.done .rule-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.rule-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Verse card */
.verse-card {
  background: linear-gradient(160deg, var(--surface) 0%, color-mix(in srgb, var(--gold-3) 40%, var(--surface)) 100%);
  border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
  overflow: hidden;
}
.verse-card::before {
  content: '\201C'; position: absolute; top: -18px; left: 10px;
  font-family: var(--font-display); font-size: 9rem; line-height: 1;
  color: var(--gold); opacity: .1; pointer-events: none;
}
.verse-text {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 1.38rem; line-height: 1.45; margin: 0 0 10px; position: relative;
}
.verse-cite { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); text-align: right; }

.reflect-text { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.6; margin: 0; font-weight: 500; }

/* Saint card */
.saint-card { display: flex; gap: 16px; align-items: stretch; padding: 0; overflow: hidden; cursor: pointer; }
.saint-art {
  flex: none; width: 108px; min-height: 130px;
  background: linear-gradient(160deg, var(--navy-2), var(--navy));
  position: relative; display: grid; place-items: center;
}
.saint-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.saint-art img.loaded { opacity: 1; }
.saint-art .glyph { font-size: 2.6rem; color: var(--gold-2); text-shadow: 0 0 24px rgba(217,184,102,.6); }
.saint-art::after { content: ''; position: absolute; inset: 0; box-shadow: inset -20px 0 30px -20px rgba(0,0,0,.3); }
.saint-body { padding: 16px 16px 16px 0; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.saint-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.12; margin: 0 0 4px; }
.saint-quote { font-family: var(--font-display); font-style: italic; font-size: 1.02rem; color: var(--ink-2); margin: 6px 0 0; line-height: 1.4; }

/* Readings */
.reading { border-top: 1px solid var(--line); }
.reading:first-of-type { border-top: 0; }
.reading-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: none; border: 0; padding: 12px 0; text-align: left;
}
.reading-head .t { font-weight: 700; font-size: .92rem; }
.reading-head .c { font-size: .78rem; color: var(--gold); font-weight: 600; }
.reading-head .chev { margin-left: auto; width: 18px; height: 18px; color: var(--ink-3); transition: transform .25s var(--ease); }
.reading.open .chev { transform: rotate(90deg); }
.reading-body { display: none; padding-bottom: 14px; }
.reading.open .reading-body { display: block; animation: rise .35s var(--ease) both; }
.reading-text { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.7; margin: 0 0 12px; }

/* Week strip */
.week { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px 14px; padding: 2px 18px 6px; scroll-padding-inline: 18px; scrollbar-width: none; scroll-snap-type: x proximity; }
.week::after, .chips.scroll::after { content: ''; flex: 0 0 8px; }
.week::-webkit-scrollbar { display: none; }
.day-chip {
  flex: none; width: 132px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px; position: relative; overflow: hidden; box-shadow: var(--shadow-1);
}
.day-chip::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--line-2)); }
.day-chip .d { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.day-chip .n { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; line-height: 1.2; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.day-chip .r { font-size: .7rem; color: var(--ink-2); margin-top: 4px; }
.day-chip.today { border-color: var(--gold); }

/* Churches */
.church { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); }
.church:first-child { border-top: 0; }
.church .nm { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; }
.church .ad { font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.church .mi { font-size: .78rem; color: var(--ink-2); font-weight: 600; }
.church-links { display: flex; gap: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 0;
  font-size: .88rem; font-weight: 700; letter-spacing: .01em;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(140deg, var(--gold-2), var(--gold)); color: #fff; box-shadow: 0 6px 16px -6px rgba(184,145,58,.7); }
.btn-dark { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .btn-dark { background: var(--surface-3); }
.btn-soft { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: #b03a43; color: #fff; box-shadow: 0 6px 16px -8px rgba(176,58,67,.8); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-sm { padding: 7px 13px; font-size: .78rem; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 22px; font-size: 1rem; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
  transition: transform .15s var(--ease);
  flex: none;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.on { color: var(--gold); }

/* Chips & segmented */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 4px; scroll-padding-inline: 18px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .82rem; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-1);
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
:root[data-theme="dark"] .chip.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.seg {
  display: flex; padding: 4px; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.seg button {
  flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: var(--ink-2);
  transition: background .2s, color .2s, box-shadow .2s;
}
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg-hero { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); margin-top: 18px; }
.seg-hero button { color: rgba(255,255,255,.7); }
.seg-hero button.active { background: #fff; color: var(--navy); }

/* Switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .25s; }
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .3s var(--spring);
}
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--gold); outline-offset: 2px; }

/* Inputs */
.field {
  width: 100%; padding: 13px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-3); }
textarea.field { resize: none; line-height: 1.5; min-height: 90px; }
.field-hero { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.field-hero::placeholder { color: rgba(255,255,255,.55); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search .field { padding-left: 42px; }
input[type="time"].field, input[type="date"].field { padding: 8px 12px; width: auto; font-size: .9rem; }

/* Rows (lists / settings) */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); margin-bottom: 14px; }
.row {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: none; border: 0; border-top: 1px solid var(--line);
  text-align: left; color: var(--ink);
}
.row:first-child { border-top: 0; }
a.row { text-decoration: none; }
button.row:active, a.row:active, .row.tap:active { background: var(--surface-2); }
.row-icon {
  flex: none; width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; font-size: 1.25rem;
  background: var(--surface-2);
}
.row-icon svg { width: 20px; height: 20px; color: var(--gold); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: .95rem; }
.row-sub { font-size: .8rem; color: var(--ink-3); margin-top: 1px; }
.row-end { flex: none; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.row-end svg { width: 18px; height: 18px; }
.list-label { font-family: var(--font-caps); font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin: 22px 6px 8px; }

/* ---------- Pray ---------- */
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.guide {
  position: relative; text-align: left; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); padding: 16px; min-height: 148px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-1);
  transition: transform .18s var(--ease);
}
.guide:active { transform: scale(.97); }
.guide .gi {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--gold);
}
.guide .gi svg { width: 24px; height: 24px; }
.guide.feature .gi { background: rgba(255,255,255,.14); color: var(--gold-2); }
.guide .gt { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; line-height: 1.1; margin-top: 10px; }
.guide .gs { font-size: .78rem; color: var(--ink-3); margin-top: 3px; }
.guide .badge { position: absolute; top: 12px; right: 12px; }
.guide.feature {
  grid-column: span 2; min-height: 170px; color: #fff; border: 0;
  background:
    radial-gradient(100% 120% at 100% 0%, color-mix(in srgb, var(--lit) 60%, transparent), transparent 60%),
    linear-gradient(150deg, var(--navy-2), var(--navy));
}
.guide.feature .gs { color: rgba(255,255,255,.65); }
.guide.feature .gt { font-size: 1.7rem; }
.guide.feature::after {
  content: ''; position: absolute; right: -30px; bottom: -40px; width: 170px; height: 170px;
  background: radial-gradient(circle, transparent 54%, rgba(217,184,102,.5) 55%, rgba(217,184,102,.5) 57%, transparent 58%);
  -webkit-mask: repeating-conic-gradient(#000 0 4deg, transparent 4deg 9deg);
          mask: repeating-conic-gradient(#000 0 4deg, transparent 4deg 9deg);
  opacity: .8;
}
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  background: var(--gold-3); color: var(--gold);
}
.guide.feature .badge { background: rgba(255,255,255,.15); color: #fff; }
.badge.done { background: var(--gold); color: #fff; }

.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius: inherit; transition: width .6s var(--ease); }
.dots { display: flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-2); }
.dots i.on { background: var(--gold); border-color: var(--gold); }
.dots i.today { box-shadow: 0 0 0 3px var(--gold-3); }

/* Prayer reader */
.prayer {
  text-align: center; padding: 6px 4px 18px;
}
.prayer-orn { color: var(--gold); letter-spacing: .5em; font-size: .8rem; margin: 6px 0 18px; }
.prayer p {
  font-family: var(--font-display); font-size: calc(1.24rem * var(--reader, 1)); line-height: 1.7;
  margin: 0 0 1.1em; font-weight: 500;
}
.prayer .vr { color: var(--gold); font-weight: 700; }
.card.prayer { padding: 20px 18px 6px; }
.prayer-tools { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }

/* Saints */
.row-icon.mono {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1;
  color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
}
.link { display: inline-block; padding: 10px 0; font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .7rem; color: var(--ink-2); margin: 2px 4px 0 0; }
.saint-hero-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--r-md); margin-bottom: 14px; background: var(--surface-2); }

/* ---------- Bottom tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 12px); translate: -50% 0;
  width: min(calc(100% - 24px), 520px);
  height: 68px;
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-2);
  z-index: 40;
}
.tab {
  flex: 1; height: 100%; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: .66rem; font-weight: 700; letter-spacing: .02em;
  position: relative; transition: color .2s;
}
.tab svg { width: 23px; height: 23px; transition: transform .3s var(--spring); }
.tab.active { color: var(--ink); }
.tab.active svg { transform: translateY(-1px) scale(1.06); color: var(--gold); }
.tab.active::after { content: ''; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.tab-ask { flex: none; width: 76px; }
.tab-ask .orb {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #f4d98f 0%, var(--gold) 55%, #94702a 100%);
  color: #fff;
  box-shadow: 0 10px 24px -6px rgba(184,145,58,.75), inset 0 1px 0 rgba(255,255,255,.5);
  transform: translateY(-14px);
  transition: transform .3s var(--spring);
}
.tab-ask .orb svg { width: 26px; height: 26px; color: #fff !important; }
.tab-ask > span:last-child { margin-top: -12px; color: var(--gold); }
.tab-ask.active .orb { transform: translateY(-16px) scale(1.05); }
.tab-ask.active::after { display: none; }
.tab-ask:active .orb { transform: translateY(-12px) scale(.94); }
.tab .pip { position: absolute; top: 12px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--lit); border: 2px solid var(--surface); }

/* ---------- Sheet ---------- */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.sheet-wrap.open { pointer-events: auto; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(8,12,26,.5); opacity: 0; transition: opacity .3s var(--ease); }
.sheet-wrap.open .sheet-scrim { opacity: 1; }
.sheet {
  position: relative; width: 100%; max-width: 560px;
  max-height: calc(100dvh - var(--safe-top) - 28px);
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-3);
  transform: translateY(105%);
  transition: transform .42s var(--ease);
  display: flex; flex-direction: column;
  padding-bottom: var(--safe-bottom);
}
.sheet-wrap.open .sheet { transform: none; }
.sheet.full { height: 100dvh; max-height: none; border-radius: 0; padding-top: var(--safe-top); }
.sheet-grab { padding: 10px 0 2px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grab::before { content: ''; width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); }
.sheet.full .sheet-grab { display: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 8px 18px 10px; }
.sheet.full .sheet-head { padding-top: 14px; }
.sheet-title { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin: 0; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 20px 26px; scrollbar-width: none; overscroll-behavior: contain; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; background: var(--bg); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 14px);
  translate: -50% -140%;
  max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff;
  padding: 11px 18px; border-radius: 999px;
  font-size: .86rem; font-weight: 600;
  box-shadow: var(--shadow-3);
  z-index: 90; transition: translate .45s var(--spring), visibility 0s .45s;
  pointer-events: none; visibility: hidden;
}
.toast.show { translate: -50% 0; pointer-events: auto; visibility: visible; transition: translate .45s var(--spring); }
.toast button { background: none; border: 0; color: var(--gold-2); font-weight: 800; padding: 0 0 0 6px; }
:root[data-theme="dark"] .toast { background: #f1ece0; color: #14203f; }
:root[data-theme="dark"] .toast button { color: #8a6825; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .toast { background: #f1ece0; color: #14203f; }
  :root[data-theme="auto"] .toast button { color: #8a6825; }
}

/* Milestone seal overlay */
.seal-pop { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(29,44,86,.92), rgba(8,12,26,.96)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .3s both; }
.seal-pop .inner { text-align: center; color: #fff; padding: 24px; animation: rise .5s var(--spring) both; }
.seal-pop .seal { width: 140px; height: 140px; margin: 0 auto 18px; animation: seal-in .9s var(--spring) both; }
.seal-pop h3 { font-family: var(--font-display); font-size: 2rem; margin: 0 0 6px; font-weight: 600; }
.seal-pop p { color: rgba(255,255,255,.75); margin: 0 0 22px; }
@keyframes seal-in { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.seal { display: block; }
.seal .rim { fill: url(#sealGold); }
.seal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.seal-cell { text-align: center; background: none; border: 0; padding: 0; color: var(--ink); }
.seal-cell .seal { width: 64px; height: 64px; margin: 0 auto 6px; }
.seal-cell.locked .seal { filter: grayscale(1); opacity: .28; }
.seal-cell .sn { font-size: .68rem; font-weight: 700; line-height: 1.2; color: var(--ink-2); }

/* ---------- Me ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md); padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1; }
.stat span { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }

.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-auto-columns: 1fr; gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); }
.heat i[data-l="1"] { background: color-mix(in srgb, var(--gold) 30%, var(--surface-3)); }
.heat i[data-l="2"] { background: color-mix(in srgb, var(--gold) 55%, var(--surface-3)); }
.heat i[data-l="3"] { background: color-mix(in srgb, var(--gold) 80%, var(--surface-3)); }
.heat i[data-l="4"] { background: var(--gold); }
.heat i.today { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.heat i.future { visibility: hidden; }
.heat-legend { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-3); margin-top: 8px; }

/* ---------- Ask ---------- */
.ask-head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.ask-title { flex: 1; min-width: 0; }
.ask-title b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; display: block; line-height: 1.1; }
.ask-title span { font-size: .74rem; color: var(--ink-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #f4d98f 0%, var(--gold) 55%, #94702a 100%); color: #fff; flex: none; }
.ask-avatar svg { width: 20px; height: 20px; }
.chat { flex: 1; overflow-y: auto; padding: 18px 16px 12px; scrollbar-width: none; display: flex; flex-direction: column; gap: 14px; }
.chat::-webkit-scrollbar { display: none; }
.chat-empty { margin: auto 0; text-align: center; padding: 10px 4px; }
.chat-empty .mark { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-3); color: var(--gold); }
.chat-empty .mark svg { width: 34px; height: 34px; }
.chat-empty h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin: 0 0 6px; }
.chat-empty p { color: var(--ink-2); margin: 0 auto 20px; max-width: 320px; font-size: .92rem; }
.starters { display: grid; gap: 8px; text-align: left; }
.starter {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: .9rem; font-weight: 600; text-align: left;
}
.starter .e {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--gold);
}
.starter .e svg { width: 18px; height: 18px; }
.msg-user {
  align-self: flex-end; max-width: 84%;
  background: var(--navy); color: #fff;
  padding: 11px 15px; border-radius: 20px 20px 6px 20px;
  font-size: .95rem; white-space: pre-wrap; word-wrap: break-word;
  animation: rise .3s var(--ease) both; opacity: 0; transform: translateY(6px);
}
:root[data-theme="dark"] .msg-user { background: var(--surface-3); }
.msg-ai {
  align-self: stretch;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px 22px 22px 22px;
  padding: 14px 16px 10px;
  box-shadow: var(--shadow-1);
  animation: rise .3s var(--ease) both; opacity: 0; transform: translateY(6px);
}
.msg-ai .md { font-size: .96rem; line-height: 1.62; word-wrap: break-word; }
.msg-ai .md p { margin: 0 0 .7em; }
.msg-ai .md ul, .msg-ai .md ol { margin: 0 0 .7em; padding-left: 1.3em; }
.msg-ai .md li { margin: .2em 0; }
.msg-ai .md blockquote { margin: 0 0 .7em; padding: 4px 0 4px 12px; border-left: 3px solid var(--gold); font-family: var(--font-display); font-size: 1.1rem; font-style: italic; color: var(--ink-2); }
.msg-ai .md strong { color: var(--ink); }
.msg-ai .md > :last-child { margin-bottom: 0; }
.msg-ai .cursor { display: inline-block; width: 7px; height: 1em; vertical-align: -2px; background: var(--gold); border-radius: 2px; animation: blink 1s steps(2) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.msg-tools { display: flex; gap: 4px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.msg-tools button { background: none; border: 0; color: var(--ink-3); font-size: .74rem; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.msg-tools button:active { background: var(--surface-2); }
.msg-tools svg { width: 14px; height: 14px; }
.msg-note { align-self: center; font-size: .76rem; color: var(--ink-3); text-align: center; }
.typing { display: inline-flex; gap: 5px; padding: 4px 0 6px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: bob 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
.composer {
  flex: none; padding: 10px 12px calc(var(--nav-h) + var(--safe-bottom) + 18px);
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.ctx-pill {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  margin: 0 4px 8px; padding: 6px 8px 6px 12px; border-radius: 999px;
  background: var(--gold-3); color: var(--ink); font-size: .78rem; font-weight: 600;
}
.ctx-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-pill button { border: 0; background: none; color: var(--ink-2); padding: 0 4px; display: grid; place-items: center; }
.ctx-pill svg { width: 14px; height: 14px; }
.composer-row {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  padding: 6px 6px 6px 16px; box-shadow: var(--shadow-2);
}
.composer-row:focus-within { border-color: var(--gold); }
.composer textarea {
  flex: 1; border: 0; outline: none; background: none; resize: none;
  padding: 9px 0; max-height: 140px; font-size: 1rem; line-height: 1.4;
}
.send {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: linear-gradient(140deg, var(--gold-2), var(--gold)); color: #fff;
  display: grid; place-items: center; transition: transform .15s var(--ease), opacity .2s;
}
.send:active { transform: scale(.9); }
.send:disabled { opacity: .4; }
.send svg { width: 19px; height: 19px; }
.disclaimer { text-align: center; font-size: .68rem; color: var(--ink-3); margin-top: 8px; }

/* ---------- Journal ---------- */
.intention { padding: 16px; }
.intention .it { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; line-height: 1.3; margin: 0; }
.intention .meta { font-size: .76rem; color: var(--ink-3); margin-top: 6px; }
.intention.answered { background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--gold-3) 50%, var(--surface))); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
.intention .ans { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .88rem; }
.intention .ans svg { width: 15px; height: 15px; vertical-align: -2px; color: var(--gold); }
.composed { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border-left: 3px solid var(--gold); font-family: var(--font-display); font-size: 1.1rem; line-height: 1.6; white-space: pre-wrap; }
.grat-input { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.grat-input .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--gold-3); color: var(--gold); }
.empty { text-align: center; padding: 34px 20px; color: var(--ink-3); }
.empty .big {
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--gold);
}
.empty .big svg { width: 28px; height: 28px; }
.done-mark {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  box-shadow: 0 12px 28px -8px rgba(184,145,58,.65), inset 0 1px 0 rgba(255,255,255,.4);
}
.done-mark svg { width: 36px; height: 36px; }
.empty p { margin: 0 auto; max-width: 300px; font-size: .9rem; }

/* ---------- Players (rosary / chaplet / examen / lectio / timer) ---------- */
.player { display: flex; flex-direction: column; height: 100%; min-height: 460px; }
.player-top { text-align: center; padding: 0 6px 6px; }
.player-mystery { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.15; }
.player-fruit { font-size: .76rem; color: var(--gold); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.beads { display: block; flex: 0 1 auto; width: 100%; max-width: 300px; min-height: 150px; max-height: 36dvh; margin: 4px auto 2px; }
.beads .b { fill: var(--surface); stroke: color-mix(in srgb, var(--ink-3) 70%, var(--ink)); stroke-width: 1.6; transition: fill .3s, stroke .3s, r .3s; }
.beads .b.done { fill: var(--gold); stroke: color-mix(in srgb, var(--gold) 70%, #000); }
.beads .b.cur { fill: var(--gold-2); stroke: var(--gold); filter: url(#beadGlow); }
.beads .chain { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.beads .cross { fill: var(--gold-3); stroke: var(--gold); stroke-width: 1.5; }
.beads .cross.cur, .beads .cross.done { fill: var(--gold); }
.beads .medal { fill: var(--surface); stroke: var(--gold); stroke-width: 1.5; }
.beads .medal.cur, .beads .medal.done { fill: var(--gold-2); }
.player-card {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 18px; text-align: center; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; justify-content: safe center;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
}
.player-card .k { font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.player-card .pt { font-family: var(--font-display); font-size: calc(1.14rem * var(--reader, 1)); line-height: 1.5; font-weight: 500; white-space: pre-line; }
.player-card .hint { font-size: .72rem; color: var(--ink-3); margin-top: 14px; }
.player-card.more { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.player-card.flip { animation: flip .35s var(--ease); }
@keyframes flip { from { opacity: .2; transform: translateX(var(--dir, 16px)); } }
.count { display: inline-flex; gap: 4px; justify-content: center; margin-top: 12px; }
.count i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.count i.on { background: var(--gold); }
.player-bar { flex: none; display: flex; gap: 10px; align-items: center; padding-top: 12px; }
.player-bar .btn-primary { flex: 1; }
.set-picker { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.set-picker .chip { padding: 6px 12px; font-size: .74rem; }

.steps { display: flex; gap: 6px; justify-content: center; margin: 2px 0 16px; }
.steps i { height: 4px; flex: 1; max-width: 46px; border-radius: 999px; background: var(--surface-3); transition: background .3s; }
.steps i.on { background: var(--gold); }

.timer-ring { width: 240px; height: 240px; margin: 10px auto 18px; position: relative; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring .track { stroke: var(--surface-3); }
.timer-ring .fill { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.timer-ring .time { font-family: var(--font-display); font-size: 3.6rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-ring .cap { font-size: .74rem; color: var(--ink-3); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 6px; }
.breath { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); margin: 0 auto; animation: breathe 8s ease-in-out infinite; opacity: .7; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(3.2); opacity: .15; } }

.examen-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); margin-bottom: 8px; text-align: left; width: 100%;
  transition: background .2s, border-color .2s;
}
.examen-item .ck { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--line-2); display: grid; place-items: center; color: transparent; margin-top: 1px; }
.examen-item .ck svg { width: 12px; height: 12px; }
.examen-item.on { background: var(--surface-2); border-color: var(--gold); }
.examen-item.on .ck { background: var(--gold); border-color: var(--gold); color: #fff; }
.examen-item .tx { font-size: .92rem; line-height: 1.45; }
.examen-cat { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 18px 2px 8px; }
ol.steps-list { padding-left: 1.2em; margin: 0; }
ol.steps-list li { margin: 0 0 10px; line-height: 1.5; font-size: .92rem; }

/* ---------- Onboarding ---------- */
.onb {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  color: #fff;
  background:
    radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--lit) 50%, transparent), transparent 60%),
    radial-gradient(100% 60% at 0% 100%, rgba(201,164,73,.25), transparent 60%),
    linear-gradient(170deg, var(--navy-2), #0b1430);
  padding: calc(var(--safe-top) + 20px) 24px 0;
  animation: fade .4s both;
  overflow-y: auto;
}
.onb::before { content: ''; position: absolute; inset: 0; background-image: var(--grain); opacity: .2; mix-blend-mode: overlay; pointer-events: none; }
.onb > * { position: relative; }
.onb-skip { align-self: flex-end; background: none; border: 0; color: rgba(255,255,255,.6); font-weight: 700; font-size: .85rem; padding: 6px; }
.onb-step { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; max-width: 440px; width: 100%; margin: 0 auto; animation: rise .5s var(--ease) both; opacity: 0; transform: translateY(10px); }
.onb-mark { width: 84px; height: 84px; margin-bottom: 26px; border-radius: 20px; box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.onb h1 { font-family: var(--font-display); font-weight: 500; font-size: 2.9rem; line-height: 1.02; margin: 0 0 12px; letter-spacing: -.02em; }
.onb h1 em { color: var(--gold-2); }
.onb p.lead { color: rgba(255,255,255,.7); font-size: 1rem; margin: 0 0 26px; }
.onb .pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.onb .pick button {
  text-align: left; padding: 10px 12px; border-radius: var(--r-md);
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.14);
  color: #fff; transition: all .2s;
}
.onb .pick button .e { display: block; margin-bottom: 4px; color: var(--gold-2); }
.onb .pick button .e svg { width: 22px; height: 22px; }
.onb .pick button b { display: block; font-size: .9rem; }
.onb .pick button span { font-size: .72rem; color: rgba(255,255,255,.55); }
.onb .pick button.on { background: rgba(217,184,102,.18); border-color: var(--gold-2); }
.onb-foot {
  position: sticky; bottom: calc(-1 * var(--safe-bottom) - 22px); z-index: 2;
  display: flex; align-items: center; gap: 14px;
  margin: 20px -24px 0; padding: 14px max(24px, calc(50% - 220px)) calc(var(--safe-bottom) + 22px);
  background: linear-gradient(to top, #0b1430 70%, transparent);
}
.onb-dots { display: flex; gap: 6px; flex: 1; }
.onb-dots i { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.25); transition: width .3s var(--ease), background .3s; }
.onb-dots i.on { width: 26px; background: var(--gold-2); }
.onb .themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.onb .themes button {
  text-align: left; padding: 10px; border-radius: var(--r-md);
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.14);
  color: #fff; transition: all .2s;
}
.onb .themes button.on { background: rgba(217,184,102,.18); border-color: var(--gold-2); }
.onb .themes b { display: block; font-size: .9rem; margin-top: 10px; }
.onb .themes button > span:last-child { display: block; font-size: .7rem; line-height: 1.3; color: rgba(255,255,255,.55); }
/* Miniature app previews: header band, card, card. */
.tp { display: flex; flex-direction: column; gap: 5px; padding: 0 0 8px; height: 104px; border-radius: 12px; overflow: hidden; background: #f4ede0; }
.tp i { display: block; margin: 0 8px; height: 16px; border-radius: 5px; background: #fffaf0; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tp i:first-child { margin: 0; height: 38px; border-radius: 0 0 10px 10px; background: linear-gradient(160deg, #24345f, #14203f); box-shadow: none; }
.tp i:nth-child(2) { border-left: 4px solid #c9a449; }
.tp-dark { background: #0b1020; }
.tp-dark i { background: #172038; box-shadow: none; }
.tp-dark i:first-child { background: linear-gradient(160deg, #1b2747, #0e1530); }
.tp-auto { background: linear-gradient(90deg, #f4ede0 50%, #0b1020 50%); }
.tp-auto i { background: linear-gradient(90deg, #fffaf0 50%, #172038 50%) border-box; box-shadow: none; }
.onb-maker {
  width: 84px; height: 84px; margin-bottom: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; letter-spacing: .02em; color: #fff;
  background: radial-gradient(circle at 30% 25%, #f4d98f 0%, var(--gold) 55%, #94702a 100%);
  box-shadow: 0 14px 34px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.5);
}
.onb-link {
  display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: #fff; text-decoration: none;
}
.onb-link:active { background: rgba(255,255,255,.12); }
.onb-link .i { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(217,184,102,.16); color: var(--gold-2); }
.onb-link .i svg { width: 19px; height: 19px; }
.onb-link .t { flex: 1; min-width: 0; }
.onb-link b { display: block; font-size: .95rem; }
.onb-link .t span { font-size: .78rem; color: rgba(255,255,255,.55); }
.onb-link > svg { width: 17px; height: 17px; color: rgba(255,255,255,.45); flex: none; }
.onb .remind { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); margin-bottom: 10px; }
.onb .remind .t { flex: 1; }
.onb .remind b { display: block; font-size: .95rem; }
.onb .remind span { font-size: .75rem; color: rgba(255,255,255,.55); }
.onb input[type="time"] { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 10px; padding: 6px 8px; color-scheme: dark; }

/* ---------- Skeleton ---------- */
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; color: transparent !important; }
.skel-line { height: 14px; margin: 8px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Desktop nicety ---------- */
@media (min-width: 600px) {
  body { background: radial-gradient(80% 60% at 50% 0%, var(--surface-2), var(--bg)); }
}
