/* Source Serif 4 (OFL) — heavy display cuts echo the logo wordmark; text cuts carry the verses */
@font-face { font-family: "Source Serif 4"; src: url(/fonts/SourceSerif4.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/SourceSerif4-Italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --bg: #f8efdc;
  --card: #fdf7ea;
  --ink: #0d2349;
  --mut: #7a6a54;
  --line: #e7d7b8;
  --accent: #a76526;
  --gold: linear-gradient(180deg, #c98b45, #9c5a1f);
  --like: #c0392b;
  --chip: rgba(2, 39, 80, .07);
  --shadow: 0 10px 30px rgba(60, 40, 10, .16);
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --fs: 1;
  --top: env(safe-area-inset-top, 0px);
  --bot: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061630; --card: #0f2447; --ink: #f6ead2; --mut: #93a0b8; --line: #1c335c;
    --accent: #d39552; --like: #ef5b50; --chip: rgba(246, 234, 210, .08); --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #061630; --card: #0f2447; --ink: #f6ead2; --mut: #93a0b8; --line: #1c335c;
  --accent: #d39552; --like: #ef5b50; --chip: rgba(246, 234, 210, .08); --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--serif); font-optical-sizing: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* reader: one verse per screen */
#reader {
  position: fixed; inset: 0;
  overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; outline: none;
}
#reader::-webkit-scrollbar { display: none; }
.v {
  height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--top) + 72px) 64px calc(var(--bot) + 72px) 40px;
}
.v p {
  margin: 0; max-width: 32ch; text-align: center; font-weight: 420;
  font-size: calc(clamp(23px, 5.8vw, 31px) * var(--fs) * var(--k, 1)); line-height: 1.45;
  text-wrap: pretty; letter-spacing: .005em;
}
.v .ref { margin-top: 24px; font-size: 15px; font-weight: 650; letter-spacing: .04em; color: var(--accent); font-variant-numeric: oldstyle-nums; }
.v.chapter-start .ref::before { content: ""; display: block; width: 28px; height: 1px; margin: 0 auto 18px; background: var(--accent); }
.v .missing { font-style: italic; color: var(--mut); font-size: calc(19px * var(--fs)); }
.v.end p { font-size: calc(22px * var(--fs)); }
.v.end img { width: 140px; height: 140px; border-radius: 50%; margin-bottom: 24px; }

/* chrome */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--top) + 10px) 14px 10px;
  background: linear-gradient(var(--bg) 55%, transparent);
}
.group { display: flex; gap: 8px; align-items: center; }
.icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.topbar .icon, .pill { background: var(--chip); }
.pill { height: 36px; padding: 0 14px; border-radius: 18px; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.pill svg { width: 16px; height: 16px; }

.actions { position: fixed; right: 10px; bottom: calc(var(--bot) + 96px); z-index: 5; display: flex; flex-direction: column; gap: 14px; }
.act { width: 46px; height: 46px; }
.act svg { width: 26px; height: 26px; }
#btnLike.on svg { fill: var(--like); stroke: var(--like); }
#btnLike.pop { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
#btnNote.on svg { fill: var(--accent); stroke: var(--accent); }
#btnBookmarks.on svg { fill: currentColor; }
@keyframes pop { 50% { transform: scale(1.3); } }

/* left scrubber rail */
.rail { position: fixed; left: 0; top: calc(var(--top) + 76px); bottom: calc(var(--bot) + 40px); width: 34px; z-index: 6; display: flex; flex-direction: column; align-items: center; touch-action: none; cursor: ns-resize; }
.rail-top, .rail-bot { font-size: 10px; color: var(--mut); padding: 4px 0; font-variant-numeric: tabular-nums; }
.rail-track { flex: 1; width: 3px; border-radius: 2px; background: var(--line); position: relative; }
.rail-thumb { position: absolute; left: -1px; width: 5px; min-height: 10px; border-radius: 3px; background: var(--ink); top: 0; transition: top .12s; }
.rail.drag .rail-thumb { transition: none; }
.scrub-bubble { position: fixed; left: 42px; z-index: 7; background: var(--card); color: var(--ink); box-shadow: var(--shadow); padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; transform: translateY(-50%); pointer-events: none; }

.hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bot) + 28px); z-index: 6; display: flex; gap: 10px; align-items: center; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 10px 6px 10px 14px; width: max-content; max-width: calc(100% - 140px); }
.hint b { display: block; font-size: 14px; }
.hint span { font-size: 12px; color: var(--mut); }
.hint > svg { width: 18px; height: 18px; color: var(--mut); flex: none; }
.hint .x svg { width: 16px; height: 16px; }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(8, 10, 20, .45); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; margin: 0 auto; max-width: 640px;
  max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow);
  padding-bottom: var(--bot); animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 14px; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 750; text-align: center; grid-column: 2; }
#sheetBack { justify-self: start; grid-column: 1; grid-row: 1; }
#sheetDone { justify-self: end; grid-column: 3; grid-row: 1; }
.sheet-body { overflow-y: auto; padding: 4px 16px 24px; }

.seg { display: flex; background: var(--chip); border-radius: 12px; padding: 3px; margin: 4px 0 14px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--mut); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
.row small { color: var(--mut); font-size: 13px; }
.row .chev { color: var(--mut); }
.row.check::after { content: "\2713"; color: var(--accent); font-weight: 700; }
.row .sub { display: block; color: var(--mut); font-size: 13px; margin-top: 2px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px; }
.grid button { aspect-ratio: 1.1; border-radius: 12px; background: var(--card); font-size: 18px; font-weight: 600; position: relative; }
.grid button.cur { background: var(--ink); color: var(--bg); }

.card { background: var(--card); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); font-weight: 600; }
.card .big { font-family: var(--serif); font-size: 22px; margin: 6px 0 14px; }
.btn { width: 100%; height: 48px; border-radius: 24px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: var(--chip); color: var(--ink); }
.empty { text-align: center; color: var(--mut); padding: 30px 10px; }
.saved { text-align: left; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
.saved b { font-size: 14px; }
.saved q { display: block; font-family: var(--serif); font-size: 16px; line-height: 1.4; margin-top: 4px; quotes: none; }
.saved em { display: block; font-size: 14px; color: var(--accent); margin-top: 6px; font-style: normal; }

textarea { width: 100%; min-height: 200px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; padding: 14px; font: 17px/1.5 var(--serif); resize: vertical; }
.note-verse { font-family: var(--serif); text-align: center; margin: 0 0 16px; line-height: 1.45; }
.note-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--mut); margin: 0 2px 8px; }

/* paywall */
.pay-logo { display: block; width: 92px; height: 92px; border-radius: 22px; margin: 4px auto 10px; }
.pay h3 { font-family: var(--serif); font-size: 26px; text-align: center; margin: 0 0 4px; font-weight: 600; }
.pay .lede { text-align: center; color: var(--mut); margin: 0 0 18px; }
.plan { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; background: var(--card); }
.plan.on { border-color: var(--accent); }
.plan b { font-size: 17px; }
.plan small { display: block; color: var(--mut); font-size: 13px; margin-top: 2px; }
.plan .price { text-align: right; font-weight: 700; font-size: 17px; }
.tag { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 10px; margin-left: 6px; vertical-align: 2px; }
.fine { font-size: 12px; color: var(--mut); text-align: center; margin: 12px 4px 0; line-height: 1.5; }
.perks { list-style: none; padding: 0; margin: 0 0 18px; }
.perks li { padding: 7px 0 7px 28px; position: relative; }
.perks li::before { content: "\2713"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

.toast { position: fixed; left: 50%; top: calc(var(--top) + 64px); transform: translateX(-50%); z-index: 30; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }

@media (min-width: 900px) {
  .v { padding-left: 80px; padding-right: 100px; }
  .v p { max-width: 30ch; font-size: calc(34px * var(--fs) * var(--k, 1)); }
  .actions { right: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}

/* brand */
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.01em; font-variation-settings: "opsz" 60; }
.wordmark span { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sheet-head h2, .pay h3, .card .big, .end p { font-variation-settings: "opsz" 48; }
.pay h3 { font-weight: 750; }
.label, .tag { font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: 14px; text-transform: none; }
.btn { font-weight: 700; font-size: 17px; }
.v .missing { font-weight: 400; }
.burst { position: fixed; z-index: 8; pointer-events: none; transform: translate(-50%, -50%); animation: burst .7s ease-out forwards; }
.burst svg { width: 96px; height: 96px; fill: var(--like); stroke: var(--like); }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }
.sc { font-variant-caps: small-caps; letter-spacing: .03em; }

/* study menu */
.irow { justify-content: flex-start; }
.irow > svg { color: var(--accent); flex: none; }
.irow > span { flex: 1; }
.locked svg { width: 16px; height: 16px; color: var(--mut); }
.cmp { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cmp-head { display: flex; justify-content: space-between; align-items: baseline; }
.cmp-head small { color: var(--mut); }
.cmp-text { font-size: 19px; line-height: 1.45; margin: 6px 0 0; }
.snap { display: block; width: 100%; max-width: 360px; aspect-ratio: 4 / 5; margin: 0 auto 16px; border-radius: 12px; box-shadow: var(--shadow); background: var(--card); }
.auto-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bot) + 28px); z-index: 6; display: flex; gap: 6px; align-items: center; height: 38px; padding: 0 16px 0 12px; border-radius: 19px; background: var(--ink); color: var(--bg); font-weight: 650; font-size: 15px; box-shadow: var(--shadow); }
.auto-pill svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* logo at the top of each verse: tap to go deeper */
.v { position: relative; padding-top: calc(var(--top) + 196px); padding-bottom: calc(var(--bot) + 120px); }
.deeper { position: absolute; top: calc(var(--top) + 76px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.deeper img { width: 68px; height: 68px; border-radius: 50%; box-shadow: 0 6px 18px rgba(2, 39, 80, .22), 0 0 0 3px var(--card); transition: transform .2s; }
.deeper span { font-size: 15px; font-weight: 650; color: var(--accent); font-variant-caps: all-small-caps; letter-spacing: .1em; }
.deeper:active img { transform: scale(.94); }
@media (hover: hover) { .deeper:hover img { transform: scale(1.05); } }
.v.end { padding-top: calc(var(--top) + 72px); }

/* ---------- tabs ---------- */
:root { --tabh: 64px; }
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bot) + 10px); z-index: 9; display: flex; gap: 2px; padding: 5px; border-radius: 26px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); width: min(420px, calc(100% - 24px)); }
.tabbar button { flex: 1; height: 50px; border-radius: 21px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--mut); font-size: 11px; font-weight: 650; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.on { background: var(--ink); color: var(--bg); }
.view { position: fixed; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--top) + 14px) 16px calc(var(--bot) + 100px); display: none; }
body[data-tab="home"] #home, body[data-tab="plans"] #plans, body[data-tab="discover"] #discover { display: block; }
body:not([data-tab="bible"]) #reader { visibility: hidden; }
body:not([data-tab="bible"]) :is(.topbar, .rail, .actions, .hint, .auto-pill, .scrub-bubble) { display: none !important; }
.actions { bottom: calc(var(--bot) + var(--tabh) + 34px); }
.rail { bottom: calc(var(--bot) + var(--tabh) + 30px); }
.hint, .auto-pill { bottom: calc(var(--bot) + var(--tabh) + 26px); }
.v { padding-bottom: calc(var(--bot) + var(--tabh) + 90px); }
@media (min-width: 760px) { .view { padding-left: max(16px, calc(50% - 340px)); padding-right: max(16px, calc(50% - 340px)); } }

/* avatar */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--gold) center / cover no-repeat; color: #fff; font-weight: 750; font-size: 15px; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--card); }
.avatar.has-photo { background-size: cover; background-position: center; }
.avatar svg { width: 22px; height: 22px; }
.avatar.xl { width: 112px; height: 112px; font-size: 38px; margin: 6px auto 12px; box-shadow: 0 0 0 4px var(--card), var(--shadow); }
.avatar.xl svg { width: 52px; height: 52px; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 16px; }
.profile .name { text-align: center; font: 700 24px var(--serif); color: var(--ink); background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 6px; width: 80%; }
.profile .name:focus { outline: none; border-bottom-color: var(--accent); }

/* view headers */
.vhead { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; }
.vhead h1 { flex: 1; margin: 0; font-size: 28px; font-weight: 750; font-variation-settings: "opsz" 48; letter-spacing: -.01em; }
.vhead .icon { background: var(--chip); }
.streak { display: flex; align-items: center; gap: 3px; height: 40px; padding: 0 12px 0 9px; border-radius: 20px; background: var(--chip); color: var(--accent); }
.streak svg { width: 20px; height: 20px; fill: currentColor; }
.streak b { color: var(--ink); font-size: 16px; }

.body { margin: 6px 0 0; font-size: 17px; line-height: 1.5; display: block; }
.clamp3, .clamp4 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { -webkit-line-clamp: 3; } .clamp4 { -webkit-line-clamp: 4; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 12px; background: var(--chip); font-size: 13px; font-weight: 650; color: var(--mut); }
.chip.ghost { border: 1px solid var(--line); background: none; color: var(--ink); }
.btn.small { width: auto; height: 36px; padding: 0 14px; font-size: 14px; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }

/* home cards */
.votd-head { display: flex; justify-content: space-between; align-items: center; }
.votd-ref { display: block; font-size: 17px; font-weight: 700; margin-top: 6px; color: var(--accent); }
.votd-text { font-size: 23px; line-height: 1.4; margin: 10px 0 12px; font-weight: 420; }
.votd-actions { display: flex; align-items: center; gap: 4px; }
.votd-actions .btn { margin-left: auto; }
.votd-actions .liked svg { fill: var(--like); stroke: var(--like); }
.search-title { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.search-title svg { color: var(--accent); }
.wheels { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; position: relative; }
.wheels::before { content: ""; position: absolute; left: 0; right: 0; top: 36px; height: 36px; border-radius: 10px; background: var(--chip); pointer-events: none; }
.wheel { height: 108px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 36px 0; mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wi { height: 36px; line-height: 36px; text-align: center; scroll-snap-align: center; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.today { width: 100%; display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; text-align: left; }
.today .cover { height: 110px; }
.today-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.today-body b { font-size: 20px; }
.dteaser { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.dteaser > b { font-size: 22px; }
.dteaser .more { color: var(--accent); font-weight: 700; margin-top: 6px; }
.pickplan b { font-size: 20px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.stats b { display: block; font-size: 30px; font-weight: 700; }
.stats small { color: var(--mut); font-size: 13px; }
.stats.three { grid-template-columns: repeat(3, 1fr); text-align: center; background: var(--card); border-radius: 16px; padding: 14px 6px; }
.stats.three b { font-size: 26px; }
.stats.two .card { margin: 0; }
.stats .big { font-size: 40px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin: 16px 0; }
.week small { display: block; color: var(--mut); font-size: 12px; }
.week b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; margin-top: 4px; font-size: 15px; }
.week .on b { background: var(--gold); color: #fff; }
.q { font-size: 26px; text-align: center; margin: 4px 0 14px; font-weight: 650; line-height: 1.25; font-variation-settings: "opsz" 48; }
.step { text-align: center; margin: 0; font-variant-caps: all-small-caps; letter-spacing: .14em; color: var(--mut); font-size: 15px; }

/* plan covers: brand-colored typographic art */
.cover { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; color: rgba(255, 255, 255, .92); }
.cover-word { position: absolute; left: -4%; bottom: -6%; font-size: 64px; font-weight: 800; font-style: italic; opacity: .22; white-space: nowrap; font-variation-settings: "opsz" 60; letter-spacing: -.02em; }
.cover img { width: 46%; height: 46%; border-radius: 50%; box-shadow: 0 8px 20px rgba(0, 0, 0, .35), 0 0 0 3px rgba(255, 255, 255, .5); position: relative; }
.cover.big { aspect-ratio: 16 / 9; margin-bottom: 14px; }
.cover.big img { width: 30%; height: auto; aspect-ratio: 1; }
.cover.big .cover-word { font-size: 110px; }
.art-navy { background: radial-gradient(circle at 70% 20%, #24508f, #022750 70%); }
.art-gold { background: radial-gradient(circle at 70% 20%, #d9a15c, #8a4f1c 75%); }
.art-oxblood { background: radial-gradient(circle at 70% 20%, #9a4232, #4d1a12 75%); }
.art-olive { background: radial-gradient(circle at 70% 20%, #7d8a4a, #36401c 75%); }
.art-slate { background: radial-gradient(circle at 70% 20%, #5c7b8f, #1f3442 75%); }
.ribbon { position: absolute; top: 12px; left: -30px; transform: rotate(-35deg); background: #f8efdc; color: #022750; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 34px; }
.shelf { margin: 26px 0 0; }
.kicker { font-variant-caps: all-small-caps; letter-spacing: .14em; color: var(--accent); font-weight: 700; font-size: 15px; }
.shelf h2 { margin: 2px 0 2px; font-size: 26px; font-weight: 650; font-variation-settings: "opsz" 48; }
.desc { margin: 0 0 12px; color: var(--mut); font-size: 15px; line-height: 1.45; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.pcard { scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; gap: 3px; background: var(--card); border-radius: 16px; padding: 8px 8px 12px; }
.pcard b { font-size: 17px; line-height: 1.2; margin-top: 6px; }
.pcard small { color: var(--mut); font-size: 12px; }
.pcard > span:last-child { font-size: 13px; font-weight: 600; }
.build { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; margin-top: 24px; }
.build .plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 26px; flex: none; }
.build b { display: block; font-size: 18px; }
.build small { color: var(--mut); }
.plan-title { font-size: 28px; text-align: center; margin: 0; font-weight: 750; font-variation-settings: "opsz" 48; }
.plan-meta { text-align: center; color: var(--mut); margin: 4px 0 14px; }
.facts { display: flex; flex-direction: column; gap: 12px; }
.facts small { display: block; color: var(--mut); font-size: 13px; }
.facts b { font-size: 16px; }
.mins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mins button { background: var(--card); border-radius: 16px; padding: 14px 0; display: flex; flex-direction: column; align-items: center; border: 2px solid transparent; }
.mins button.on { border-color: var(--accent); }
.mins b { font-size: 30px; }
.mins small { color: var(--mut); }
.custom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.custom b { display: block; } .custom small { color: var(--mut); }
.custom input { width: 84px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 700 20px var(--serif); text-align: center; }

/* discover feed: one study per screen */
.snapfeed { scroll-snap-type: y mandatory; padding: 0; }
.dcard-wrap { height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; padding: calc(var(--top) + 16px) 16px calc(var(--bot) + var(--tabh) + 26px); }
.dcard { width: 100%; max-width: 560px; max-height: 100%; overflow: hidden; background: var(--card); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dcard .chip { align-self: center; }
.dcard h2 { text-align: center; font-size: 30px; margin: 10px 0 0; font-weight: 650; font-variation-settings: "opsz" 48; }
.dcard .tr { text-align: center; color: var(--mut); font-variant-caps: all-small-caps; letter-spacing: .1em; }
.quote { font-style: italic; font-size: 19px; line-height: 1.45; text-align: center; margin: 10px 0 12px; }
.dcard .label { margin-top: 4px; }
.know { background: var(--chip); border-radius: 14px; padding: 10px 12px; margin: 12px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dactions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.dactions .btn { height: 44px; font-size: 15px; }
.quote-card .quote { margin: 0; }
.tint-navy { background: color-mix(in srgb, #24508f 14%, var(--card)); }
.tint-gold { background: color-mix(in srgb, #c98b45 16%, var(--card)); }
.tint-red { background: color-mix(in srgb, #9a4232 13%, var(--card)); }
@media (max-height: 700px) { .dcard .clamp4 { -webkit-line-clamp: 2; } .dcard .clamp3 { -webkit-line-clamp: 2; } .quote { font-size: 17px; } }
