/* VedaScroll: a full-screen, one-card-at-a-time reader for the Rig Veda.
 *
 * Every card carries its own palette (--c0, --c1, --ac) chosen from its
 * deity, Mandala or kind, so the feed changes colour as you move through it
 * while the type, spacing and controls stay put. The page owns the wheel
 * (scroll.js); touch uses native scroll snapping.
 */

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.vs {
  overflow: hidden;
  background: #120a05;
  color: #fff8e7;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.vs-app {
  --col: min(100vw, 560px);
  --top: calc(56px + env(safe-area-inset-top, 0px));
  --amb0: #1a0f08; --amb1: #3a2414;
  --fs: 1;
  position: fixed; inset: 0;
  background:
    radial-gradient(60% 70% at 50% 40%, color-mix(in srgb, var(--amb1) 55%, transparent), transparent 70%),
    var(--amb0);
  transition: background-color .6s ease;
}
.vs-app[data-size="s"] { --fs: .9; }
.vs-app[data-size="l"] { --fs: 1.14; }
.vs-app[data-size="xl"] { --fs: 1.28; }

/* ── top bar ──────────────────────────────────────────────────────────── */
.vs-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--top); padding: env(safe-area-inset-top, 0px) 12px 0;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(10, 5, 2, .78), rgba(10, 5, 2, 0));
  pointer-events: none;
}
.vs-top > * { pointer-events: auto; }
.vs-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: 0 0 auto; }
.vs-om {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #d4af37, #ff9933); color: #2c1810; font-size: 19px; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 248, 231, .85);
}
.vs-name { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .06em; font-size: 15px; }
.vs-status {
  flex: 1 1 auto; min-width: 0; text-align: center;
  font-size: 12px; font-weight: 500; letter-spacing: .02em; color: rgba(255, 248, 231, .82);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vs-status b { color: #f3cf6b; font-weight: 600; }
.vs-tools { display: flex; gap: 6px; flex: 0 0 auto; }
.vs-icon {
  height: 36px; min-width: 36px; padding: 0 8px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  background: rgba(255, 248, 231, .1); border: 1px solid rgba(255, 248, 231, .18);
  font-size: 12px; font-weight: 600;
}
.vs-icon:hover { background: rgba(255, 248, 231, .18); }
.vs-icon:focus-visible, .vs-feed button:focus-visible, .vs-sheet button:focus-visible, .vs-feed a:focus-visible {
  outline: 2px solid #f3cf6b; outline-offset: 2px;
}
.vs-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#soundBtn svg path.on { fill: currentColor; stroke: none; }
#soundBtn[aria-pressed="true"] svg .off, #soundBtn[aria-pressed="false"] svg .on { display: none; }
#soundBtn[aria-pressed="false"] svg path.off { fill: none; }
.vs-glyph { font-family: 'Noto Serif Devanagari', serif; font-size: 17px; line-height: 1; }
.vs-install { background: linear-gradient(135deg, #d4af37, #ff9933); color: #2c1810; border-color: transparent; }
.vs-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 248, 231, .08); }
.vs-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #d4af37, #ff9933); transition: width .4s ease; }

/* ── the feed ─────────────────────────────────────────────────────────── */
.vs-feed {
  position: absolute; top: 0; bottom: 0; left: 50%; width: var(--col); transform: translateX(-50%);
  overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; outline: none; -webkit-overflow-scrolling: touch;
}
.vs-feed::-webkit-scrollbar { display: none; }
@media (min-width: 600px) {
  /* on a wide screen the column starts below the bar, so nothing sits over a card */
  .vs-feed { top: calc(var(--top) + 6px); bottom: 14px; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 248, 231, .07); }
  .vs-top { background: rgba(14, 8, 4, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}

.card {
  --c0: #2c1810; --c1: #5d4e37; --ac: #d4af37; --fg: #fff8e7; --mut: rgba(255, 248, 231, .72); --line: rgba(255, 248, 231, .16);
  --btn: rgba(255, 248, 231, .09); --btn-b: rgba(255, 248, 231, .2);
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
  display: flex; flex-direction: column;
  padding: calc(var(--top) + 10px) 22px calc(14px + env(safe-area-inset-bottom, 0px));
  color: var(--fg);
  background:
    radial-gradient(110% 70% at 85% -5%, color-mix(in srgb, var(--ac) 22%, transparent), transparent 60%),
    radial-gradient(90% 60% at 0% 110%, color-mix(in srgb, var(--c1) 80%, transparent), transparent 70%),
    linear-gradient(170deg, var(--c0) 10%, var(--c1) 150%);
}
@media (min-width: 600px) { .card { padding-top: 22px; } }
@media (max-width: 599px) {
  .on-light .vs-top { background: linear-gradient(180deg, rgba(255, 248, 231, .94), rgba(255, 248, 231, 0)); color: #2c1810; }
  .on-light .vs-status { color: #6b5d52; }
  .on-light .vs-status b { color: #8b4513; }
  .on-light .vs-icon { background: rgba(44, 24, 16, .06); border-color: rgba(44, 24, 16, .18); }
  .on-light .vs-install { background: linear-gradient(135deg, #d4af37, #ff9933); }
}
.card.light {
  --fg: #2c1810; --mut: #6b5d52; --line: rgba(44, 24, 16, .14); --btn: rgba(44, 24, 16, .05); --btn-b: rgba(44, 24, 16, .16);
}
.c-motif { position: absolute; pointer-events: none; opacity: .13; color: var(--ac); }
.c-motif svg { width: 100%; height: 100%; fill: none; stroke: currentColor; }
.c-motif.yantra { width: 150%; aspect-ratio: 1; right: -55%; top: -18%; }
.c-motif.num {
  right: -8px; bottom: 56px; font-family: 'Noto Serif Devanagari', serif; font-size: 13rem; line-height: 1;
  opacity: .07; color: var(--fg);
}
.c-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.c-kicker {
  font-family: 'Cinzel', serif; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ac); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.light .c-kicker { color: #8b4513; }
.c-pos { font-size: 11.5px; color: var(--mut); white-space: nowrap; }
.c-body {
  position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; padding: 8px 2px; scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--fg) 25%, transparent) transparent;
}
.c-in { margin: auto 0; display: flex; flex-direction: column; gap: 14px; }
.c-acts { position: relative; flex: 0 0 auto; display: flex; gap: 8px; padding-top: 10px; flex-wrap: wrap; }
.c-acts::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.btn {
  min-height: 42px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--btn); border: 1px solid var(--btn-b); color: var(--fg);
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: color-mix(in srgb, var(--btn) 100%, var(--fg) 8%); }
.btn:active { transform: scale(.97); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.btn.primary { background: linear-gradient(135deg, #d4af37, #ff9933); color: #2c1810; border-color: transparent; }
.btn.grow { flex: 1 1 auto; }
.btn.icon { width: 42px; padding: 0; }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--ac) 28%, transparent); border-color: var(--ac); }
.btn.saved svg { fill: currentColor; }
.btn.locked { opacity: .8; }
.btn .lock { font-size: 11px; opacity: .8; }

/* ── verse ────────────────────────────────────────────────────────────── */
.dev {
  margin: 0; font-family: 'Noto Serif Devanagari', serif; font-weight: 500; text-align: center;
  font-size: calc(clamp(1.18rem, 4.4vw, 1.5rem) * var(--fs)); line-height: 1.95; text-wrap: balance;
}
.iast {
  margin: 0; font-family: 'Cormorant Garamond', serif; font-style: italic; text-align: center; color: var(--mut);
  font-size: calc(1.12rem * var(--fs)); line-height: 1.5; text-wrap: balance;
}
.en {
  margin: 0; font-family: 'Cormorant Garamond', serif; font-weight: 500; text-align: center;
  font-size: calc(clamp(1.24rem, 4.5vw, 1.45rem) * var(--fs)); line-height: 1.45; text-wrap: pretty;
}
.rule { width: 46px; height: 1px; margin: 0 auto; background: var(--ac); opacity: .65; }
.card.dense .dev { font-size: calc(1.08rem * var(--fs)); line-height: 1.8; }
.card.dense .iast { font-size: calc(1rem * var(--fs)); }
.card.dense .en { font-size: calc(1.14rem * var(--fs)); }
.vs-app.no-dev .dev, .vs-app.no-iast .iast, .vs-app.no-en .en { display: none; }
.vs-app.no-dev .rule.r1, .vs-app.no-en .rule.r1 { display: none; }
.essence {
  border-radius: 14px; padding: 14px 16px; text-align: left;
  background: color-mix(in srgb, var(--c0) 55%, rgba(0, 0, 0, .35)); border: 1px solid var(--line);
  animation: rise .35s ease both;
}
.essence h4 { margin: 0 0 6px; font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ac); }
.essence p { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: calc(1.14rem * var(--fs)); line-height: 1.45; }
.essence .src { margin-top: 8px; font-size: 11px; color: var(--mut); font-family: 'Inter', sans-serif; }
.dots { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg); opacity: .22; }
.dots i.on { opacity: 1; background: var(--ac); transform: scale(1.25); }
.dots i.done { opacity: .55; }
.audio { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mut); }
.audio .meter { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.audio .meter i { width: 3px; background: var(--ac); border-radius: 2px; height: 30%; }
.card.playing .audio .meter i { animation: eq 1s ease-in-out infinite; }
.audio .meter i:nth-child(2) { animation-delay: -.2s !important; }
.audio .meter i:nth-child(3) { animation-delay: -.45s !important; }
.audio .meter i:nth-child(4) { animation-delay: -.7s !important; }
.audio .meter i:nth-child(5) { animation-delay: -.3s !important; }
.audio .track { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.audio .track b { display: block; height: 100%; width: 0; background: var(--ac); }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── hymn opener ──────────────────────────────────────────────────────── */
.hy-ref { font-family: 'Cinzel', serif; font-weight: 700; font-size: calc(3.4rem * var(--fs)); line-height: 1; letter-spacing: .02em; margin: 0; }
.hy-deity { font-family: 'Cormorant Garamond', serif; font-size: calc(2rem * var(--fs)); font-weight: 600; margin: 0; line-height: 1.1; }
.hy-meta { color: var(--mut); font-size: 13px; line-height: 1.6; margin: 0; }
.hy-note {
  margin: 0; font-family: 'Cormorant Garamond', serif; font-size: calc(1.22rem * var(--fs)); line-height: 1.45;
  border-left: 2px solid var(--ac); padding: 2px 0 2px 14px;
}
.hy-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--btn); border: 1px solid var(--btn-b); color: var(--fg); text-decoration: none;
}
.chip b { color: var(--ac); font-weight: 700; }
.light .chip b { color: #8b4513; }
.swipe {
  position: absolute; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 248, 231, .2); font-size: 12px; font-weight: 600;
  animation: bob 2.2s ease-in-out infinite; pointer-events: none;
}
.swipe svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }

/* ── blog, news, mandala, deity ───────────────────────────────────────── */
.title { margin: 0; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: calc(1.85rem * var(--fs)); line-height: 1.15; text-wrap: balance; }
.quote {
  margin: 0; position: relative; font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: calc(1.3rem * var(--fs)); line-height: 1.45; padding-left: 18px;
}
.quote::before { content: '“'; position: absolute; left: -6px; top: -18px; font-size: 3.4rem; color: var(--ac); font-style: normal; opacity: .8; }
.light .quote::before { color: #b8860b; }
.lede { margin: 0; color: var(--mut); font-size: calc(.98rem * var(--fs)); line-height: 1.55; }
.big-num { font-family: 'Cinzel', serif; font-weight: 700; font-size: calc(4.4rem * var(--fs)); line-height: .9; margin: 0; color: var(--ac); }
.bars { width: 100%; height: auto; max-height: 180px; display: block; }
.bars text { font-family: 'Inter', sans-serif; font-size: 10px; fill: var(--mut); }
.bars .v { font-weight: 600; fill: var(--fg); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-family: 'Cinzel', serif; font-size: 1.4rem; color: var(--ac); }
.stat span { font-size: 11px; color: var(--mut); }

/* ── quiz and flash card ──────────────────────────────────────────────── */
.prompt { margin: 0; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: calc(1.6rem * var(--fs)); line-height: 1.25; text-wrap: balance; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  min-height: 48px; padding: 10px 14px; border-radius: 14px; background: var(--btn); border: 1px solid var(--btn-b);
  font-size: calc(.98rem * var(--fs)); line-height: 1.35;
}
.choice:hover:not([disabled]) { border-color: var(--ac); }
.choice .k {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; border: 1px solid var(--btn-b);
}
.choice[disabled] { cursor: default; opacity: .62; }
.choice.right { opacity: 1; border-color: #7bc58a; background: rgba(123, 197, 138, .18); }
.choice.right .k { background: #7bc58a; color: #0f2a14; border-color: transparent; }
.choice.wrong { opacity: 1; border-color: #e0806e; background: rgba(224, 128, 110, .16); }
.verdict { margin: 0; font-size: 14px; line-height: 1.5; animation: rise .3s ease both; }
.verdict b { color: var(--ac); }
.flip { perspective: 1200px; cursor: pointer; min-height: 230px; display: grid; }
.flip .face {
  grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center;
  padding: 26px 20px; border-radius: 18px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--c0) 45%, rgba(0, 0, 0, .3));
  backface-visibility: hidden; transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}
.flip .back { transform: rotateY(180deg); }
.flip.flipped .front { transform: rotateY(-180deg); }
.flip.flipped .back { transform: rotateY(0); }
.flip .face p { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: calc(1.5rem * var(--fs)); line-height: 1.3; }
.flip .face small { font-size: 11.5px; color: var(--mut); }
.flip .back p { font-size: calc(1.25rem * var(--fs)); }

/* ── graph (Pro Max) ──────────────────────────────────────────────────── */
.graph { width: 100%; max-height: 300px; }
.graph line { stroke: var(--ac); stroke-opacity: .5; }
.graph circle.hub { fill: var(--ac); }
.graph circle.node { fill: color-mix(in srgb, var(--c0) 40%, #000); stroke: var(--ac); stroke-width: 1.5; }
.graph text { font-family: 'Inter', sans-serif; font-size: 11px; fill: var(--fg); text-anchor: middle; }
.graph text.hub-t { fill: #2c1810; font-weight: 700; font-size: 12px; }
.graph text.w { font-size: 9.5px; fill: var(--mut); }
.graph a:hover circle.node { fill: var(--ac); }

/* ── plans, limits, install ───────────────────────────────────────────── */
.tiers { display: grid; gap: 10px; }
.tier { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: rgba(0, 0, 0, .18); }
.tier.hot { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent); }
.tier h3 { margin: 0 0 4px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: 'Cinzel', serif; font-size: 15px; letter-spacing: .04em; }
.tier h3 small { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--mut); font-weight: 500; letter-spacing: 0; }
.tier ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--mut); }
.tier .now { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ac); }
.ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.clock { font-family: 'Cinzel', serif; font-size: 2.6rem; font-weight: 700; color: var(--ac); margin: 0; letter-spacing: .04em; }
.steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; color: var(--mut); }
.phone-ill { width: 92px; height: 150px; margin: 0 auto; border-radius: 18px; border: 2px solid var(--ac); display: grid; place-items: center; position: relative; }
.phone-ill .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(135deg, #d4af37, #ff9933); color: #2c1810; font-weight: 700; }

/* ── sheets, toast, loading ───────────────────────────────────────────── */
.vs-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .5); }
.vs-sheet {
  position: fixed; z-index: 50; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100vw, 560px); max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #1f140c; color: #fff8e7; border-radius: 20px 20px 0 0; border: 1px solid rgba(255, 248, 231, .12);
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  animation: sheetin .25s ease both;
}
@media (min-width: 600px) { .vs-sheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 20px; max-height: 84dvh; } }
@keyframes sheetin { from { opacity: 0; } to { opacity: 1; } }
.vs-sheet h2 { margin: 0 0 4px; font-family: 'Cinzel', serif; font-size: 18px; letter-spacing: .04em; }
.vs-sheet h3 { margin: 18px 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #f3cf6b; font-weight: 600; }
.vs-sheet p { margin: 6px 0; font-size: 14px; line-height: 1.55; color: rgba(255, 248, 231, .8); }
.sh-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sh-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 248, 231, .2); background: transparent; cursor: pointer; font-size: 18px; line-height: 1; }
.sh-list { display: grid; gap: 6px; margin-top: 12px; }
.sh-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  text-align: left; text-decoration: none; background: rgba(255, 248, 231, .05); border: 1px solid rgba(255, 248, 231, .1); font-size: 14.5px;
}
.sh-item:hover { background: rgba(255, 248, 231, .1); }
.sh-item .ico { width: 24px; text-align: center; font-size: 16px; flex: 0 0 auto; }
.sh-item .tx { flex: 1; min-width: 0; }
.sh-item small { display: block; color: rgba(255, 248, 231, .6); font-size: 12px; margin-top: 2px; }
.sh-item .tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #2c1810; background: #f3cf6b; border-radius: 999px; padding: 3px 7px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  min-height: 38px; padding: 0 13px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: rgba(255, 248, 231, .06); border: 1px solid rgba(255, 248, 231, .18);
}
.seg button[aria-pressed="true"] { background: #f3cf6b; color: #2c1810; border-color: transparent; }
.seg .dv { font-family: 'Noto Serif Devanagari', serif; font-weight: 500; }
.slider { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: 10px; font-size: 13px; margin: 6px 0; }
.slider input { width: 100%; accent-color: #f3cf6b; }
.slider output { text-align: right; color: rgba(255, 248, 231, .65); font-size: 12px; }
.vs-sheet select { width: 100%; min-height: 40px; border-radius: 10px; padding: 0 10px; background: #2b1d12; color: #fff8e7; border: 1px solid rgba(255, 248, 231, .2); font: inherit; font-size: 14px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.toggle input { width: 20px; height: 20px; accent-color: #f3cf6b; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stats div { border-radius: 14px; padding: 12px 8px; text-align: center; background: rgba(255, 248, 231, .05); border: 1px solid rgba(255, 248, 231, .1); }
.stats b { display: block; font-family: 'Cinzel', serif; font-size: 1.5rem; color: #f3cf6b; }
.stats span { font-size: 11.5px; color: rgba(255, 248, 231, .65); }
.share-prev { border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, .3); aspect-ratio: 4 / 5; max-height: 42dvh; margin: 10px auto; display: grid; place-items: center; }
.share-prev img { width: 100%; height: 100%; object-fit: contain; display: block; }
.share-prev .ph { font-size: 13px; color: rgba(255, 248, 231, .6); }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.share-grid a, .share-grid button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 12px; cursor: pointer;
  text-decoration: none; font-size: 13px; font-weight: 600; background: rgba(255, 248, 231, .06); border: 1px solid rgba(255, 248, 231, .14);
}
.share-grid i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.kbd { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; color: rgba(255, 248, 231, .8); }
.kbd kbd { font-family: 'Inter', sans-serif; font-size: 11.5px; padding: 2px 7px; border-radius: 6px; border: 1px solid rgba(255, 248, 231, .3); background: rgba(255, 248, 231, .06); white-space: nowrap; }

.vs-toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  max-width: min(92vw, 440px); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; text-align: center;
  background: rgba(20, 12, 6, .92); border: 1px solid rgba(243, 207, 107, .45); box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  animation: rise .25s ease both;
}
.vs-loading { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; text-align: center; gap: 10px; pointer-events: none; transition: opacity .4s ease; }
.vs-loading.gone { opacity: 0; }
.vs-loading p { margin: 0; font-size: 13px; color: rgba(255, 248, 231, .7); }
.vs-om-big { font-size: 64px; color: #d4af37; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .45; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
.vs-noscript { position: fixed; inset: 0; display: grid; place-content: center; padding: 24px; text-align: center; }
.heart {
  position: absolute; z-index: 5; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none;
  color: #ff9933; animation: heart .8s ease-out forwards;
}
.heart svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .4)); }
@keyframes heart { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.1); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.2) translateY(-30px); } }

/* ── desktop side panels ──────────────────────────────────────────────── */
.vs-side { display: none; }
@media (min-width: 1180px) {
  .vs-side {
    display: block; position: absolute; top: calc(var(--top) + 24px); width: 250px; max-height: calc(100dvh - var(--top) - 48px); overflow: auto;
    font-size: 13px; line-height: 1.55; color: rgba(255, 248, 231, .78);
  }
  .vs-side-l { right: calc(50% + var(--col) / 2 + 36px); }
  .vs-side-r { left: calc(50% + var(--col) / 2 + 36px); }
  .vs-side h4 { margin: 0 0 6px; font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #f3cf6b; }
  .vs-side section { margin-bottom: 22px; }
  .vs-side p { margin: 0 0 8px; }
  .vs-side a.btn { --btn: rgba(255, 248, 231, .08); --btn-b: rgba(255, 248, 231, .2); --fg: #fff8e7; min-height: 36px; font-size: 12.5px; }
  .vs-side .big { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; line-height: 1.2; color: #fff8e7; margin: 0 0 4px; }
}

/* ── phones ───────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
  .card { padding-left: 16px; padding-right: 16px; }
  .vs-name { display: none; }
  .vs-status { text-align: left; }
  .btn { padding: 0 11px; font-size: 13px; }
  .btn .lbl-opt { display: none; }
  .hy-ref { font-size: calc(2.8rem * var(--fs)); }
  .slider { grid-template-columns: 92px 1fr 52px; }
}
@media (max-width: 359px) {
  .card [data-act="meaning"] span { display: none; }
  .card [data-act="meaning"] { width: 42px; padding: 0; }
}
@media (max-height: 640px) {
  .dev { line-height: 1.7; }
  .c-in { gap: 10px; }
}

/* ── embedded demo (home page) ────────────────────────────────────────── */
.vs-embed .vs-feed { top: 0; bottom: 0; border-radius: 0; box-shadow: none; width: 100vw; }
.vs-embed .vs-app:not(.engaged) .vs-feed { overflow-y: hidden; }
.vs-embed .card { padding-top: calc(var(--top) + 8px); }
.vs-embed .vs-top { background: linear-gradient(180deg, rgba(10, 5, 2, .78), rgba(10, 5, 2, 0)); backdrop-filter: none; -webkit-backdrop-filter: none; }
.vs-embed .vs-tools #menuBtn, .vs-embed .vs-install { display: none; }
.vs-embed .vs-side { display: none; }
.vs-embed .card { padding-left: 16px; padding-right: 16px; }
.vs-embed .vs-name { display: none; }
/* the preview is narrow: icon-only meaning, no save or share (they belong to the full app) */
.vs-embed [data-act="save"], .vs-embed [data-act="share"] { display: none; }
.vs-embed [data-act="meaning"] span { display: none; }
.vs-embed .btn { min-height: 38px; padding: 0 12px; font-size: 13px; }
.vs-embed .btn.icon, .vs-embed [data-act="meaning"] { width: 38px; padding: 0; }
.vs-embed .vs-status { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
