/* ENGLEZA — stiluri. Fiecare categorie are nuanța ei (--h); toată aplicația își schimbă culoarea odată cu povestea. */
:root {
  --h: 265;
  --ts: 1;
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --r1: 10px; --r2: 18px; --r3: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root, :root[data-theme="dark"] {
  --bg: hsl(var(--h) 32% 8%);
  --bg2: hsl(var(--h) 28% 12%);
  --bg3: hsl(var(--h) 24% 17%);
  --ink: hsl(var(--h) 30% 95%);
  --ink2: hsl(var(--h) 14% 74%);
  --muted: hsl(var(--h) 10% 58%);
  --line: hsl(var(--h) 20% 22%);
  --accent: hsl(var(--h) 90% 76%);
  --accent-ink: hsl(var(--h) 45% 10%);
  --glow: hsl(var(--h) 70% 45% / .42);
  --glow2: hsl(calc(var(--h) + 40) 70% 40% / .22);
  --gold: hsl(44 92% 66%);
  --ok: hsl(150 55% 58%);
  --bad: hsl(8 80% 68%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: hsl(var(--h) 38% 96%);
  --bg2: hsl(var(--h) 36% 91%);
  --bg3: hsl(var(--h) 30% 85%);
  --ink: hsl(var(--h) 40% 11%);
  --ink2: hsl(var(--h) 18% 30%);
  --muted: hsl(var(--h) 10% 42%);
  --line: hsl(var(--h) 22% 82%);
  --accent: hsl(var(--h) 72% 38%);
  --accent-ink: hsl(var(--h) 40% 98%);
  --glow: hsl(var(--h) 80% 70% / .45);
  --glow2: hsl(calc(var(--h) + 40) 80% 70% / .3);
  --gold: hsl(38 90% 40%);
  --ok: hsl(150 60% 30%);
  --bad: hsl(5 70% 45%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  transition: background-color .5s var(--ease);
  min-height: 100vh; min-height: 100dvh;
}
body.reading { overflow: hidden; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code { font-size: .92em; background: var(--bg3); padding: 1px 6px; border-radius: 6px; }

/* ---------- pornire și autentificare ---------- */
.boot { display: grid; place-items: center; min-height: 100dvh; }
.boot-mark { font-family: var(--serif); font-size: 64px; font-style: italic; color: var(--accent); opacity: .7; }
.login { max-width: 380px; margin: 0 auto; padding: calc(12vh + var(--safe-t)) 24px 40px; }
.login-mark { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 46px; background: radial-gradient(circle at 30% 20%, var(--accent), hsl(calc(var(--h) + 40) 70% 45%)); color: var(--accent-ink); }
.login-title { font-family: var(--serif); font-weight: 500; font-size: 52px; line-height: 1; margin: 22px 0 8px; letter-spacing: -.01em; }
.login-sub { color: var(--ink2); margin: 0 0 32px; font-size: 18px; }
.login-form label, .field { display: block; font-size: 14px; color: var(--ink2); margin-bottom: 14px; }
.login-form input, .field input, .field textarea, select, input[type="number"] {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--bg2); font-size: 17px;
}
input[type="number"] { width: 110px; margin: 0; }
.form-err { color: var(--bad); min-height: 1.5em; margin: 4px 0 10px; font-size: 15px; }

/* ---------- butoane ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); cursor: pointer; transition: transform .15s var(--ease), background .2s; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.big { padding: 15px 22px; font-size: 17px; width: 100%; }
.btn.block { display: flex; width: 100%; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.ibtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; flex: none; text-decoration: none; font-size: 17px; font-weight: 600; }
.ibtn:active { background: var(--bg3); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-style: normal; background: hsl(var(--h) 40% 50% / .16); color: var(--ink2); }
.pill.gold { color: var(--gold); background: hsl(44 90% 50% / .14); }

/* ---------- cadrul aplicației ---------- */
.shell { min-height: 100dvh; }
.page { max-width: 640px; margin: 0 auto; padding: calc(22px + var(--safe-t)) 18px calc(110px + var(--safe-b)); }
.tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 2px; padding: 6px 8px calc(6px + var(--safe-b)); background: hsl(var(--h) 30% 8% / .82); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--line); }
:root[data-theme="light"] .tabs { background: hsl(var(--h) 40% 97% / .86); }
.tab { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 12px; }
.tab.on { color: var(--accent); }
.h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.05; margin: 6px 0 10px; letter-spacing: -.01em; }
.lead { color: var(--ink2); margin: 0 0 20px; }
.sec { font-size: 15px; font-weight: 700; color: var(--ink2); margin: 32px 0 12px; }
.sub { font-size: 15px; margin: 22px 0 8px; }
.note { color: var(--ink2); background: var(--bg2); border-radius: var(--r1); padding: 10px 14px; font-size: 14px; }
.note.warn { color: var(--bad); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 40px rgba(0,0,0,.35); animation: tin .25s var(--ease); }
.toast.out { opacity: 0; transition: opacity .4s; }
@keyframes tin { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Azi ---------- */
.home { position: relative; }
.home::before { content: ''; position: fixed; inset: -20vh -30vw auto auto; width: 120vw; height: 70vh; background: radial-gradient(closest-side, var(--glow), transparent 75%); pointer-events: none; z-index: -1; transition: background .6s; }
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hello { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin: 0; }
.today-line { margin: 6px 0 0; color: var(--ink2); }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: var(--bg3); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; }
.ring small { font-size: 12px; color: var(--muted); font-weight: 600; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--bg2); color: var(--ink2); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip .ic { width: 17px; height: 17px; color: var(--gold); }
.chip.strong { background: var(--gold); color: hsl(40 60% 10%); }
.continue { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r2); background: var(--bg2); text-decoration: none; color: var(--ink); }
.continue-k { font-size: 13px; font-weight: 700; color: var(--accent); }
.continue-t { font-family: var(--serif); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { grid-column: 1 / -1; height: 3px; background: var(--bg3); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

/* cardurile de poveste — un câmp de culoare al categoriei */
.scard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r2); text-decoration: none; color: var(--ink); overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, hsl(var(--h) 45% 20%), hsl(var(--h) 40% 11%)); border: 1px solid hsl(var(--h) 40% 30% / .6); }
:root[data-theme="light"] .scard { background: linear-gradient(160deg, hsl(var(--h) 60% 88%), hsl(var(--h) 45% 94%)); border-color: hsl(var(--h) 40% 78%); }
.scard::after { content: ''; position: absolute; z-index: -1; right: -30%; top: -40%; width: 90%; height: 120%; background: radial-gradient(closest-side, hsl(var(--h) 85% 60% / .35), transparent); }
.scard-cat { font-size: 13px; font-weight: 700; color: hsl(var(--h) 80% 80%); }
:root[data-theme="light"] .scard-cat { color: hsl(var(--h) 60% 32%); }
.scard-title { font-family: var(--serif); font-size: 22px; line-height: 1.15; font-weight: 500; }
.scard-ro { color: var(--ink2); font-size: 14.5px; }
.scard-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scard.big { padding: 24px 22px 22px; min-height: 340px; justify-content: flex-end; border-radius: var(--r3); }
.scard.big .scard-title { font-size: clamp(30px, 8.6vw, 42px); line-height: 1.05; letter-spacing: -.01em; }
.scard-teaser { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--ink2); margin: 10px 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scard.big .scard-cat { margin-bottom: auto; }
.hero { margin-bottom: 8px; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 0 18px 8px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .scard { flex: 0 0 78%; scroll-snap-align: start; min-height: 170px; }
.empty { padding: 28px 20px; border-radius: var(--r3); background: var(--bg2); }
.empty h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0 0 8px; }

/* ---------- bibliotecă ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 18px; padding: 0 18px 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 600; color: var(--ink2); cursor: pointer; }
.fchip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.list { display: grid; gap: 12px; }

/* ---------- cititorul ---------- */
.reader { position: fixed; inset: 0; z-index: 50; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; animation: rin .35s var(--ease); }
.reader::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 55% at 85% 0%, var(--glow), transparent 70%), radial-gradient(70% 50% at 0% 100%, var(--glow2), transparent 70%); }
@keyframes rin { from { opacity: 0; transform: scale(.985); } }
.r-top { position: relative; z-index: 3; padding: calc(8px + var(--safe-t)) 10px 0; }
.r-progress { height: 3px; margin: 0 8px 4px; border-radius: 3px; background: hsl(var(--h) 30% 50% / .22); overflow: hidden; }
.r-progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .35s var(--ease); }
.r-bar { display: flex; align-items: center; gap: 2px; }
.r-cat { font-size: 14px; font-weight: 700; color: var(--accent); margin-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-count { margin-left: auto; margin-right: 4px; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.r-rate { width: auto; padding: 0 10px; border-radius: 999px; font-size: 14px; color: var(--ink2); }
.r-speak.on { color: var(--accent); background: hsl(var(--h) 60% 50% / .18); }
.r-track { position: relative; z-index: 2; flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; }
.r-track::-webkit-scrollbar { display: none; }
.card { flex: 0 0 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; padding: 0 26px calc(40px + var(--safe-b)); overflow-y: auto; }
.card-in { width: 100%; max-width: 660px; margin: auto 0; padding: 20px 0; }
.card.sent { cursor: pointer; user-select: none; -webkit-user-select: none; }
.en { font-family: var(--serif); font-weight: 400; font-size: calc(clamp(27px, 7.3vw, 46px) * var(--ts)); line-height: 1.3; letter-spacing: -.005em; margin: 0; text-wrap: pretty; font-optical-sizing: auto; }
.card.sent.active .en { animation: sin .5s var(--ease); }
@keyframes sin { from { opacity: .2; transform: translateY(6px); } }
.w { cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-decoration-thickness: 2px; text-underline-offset: .2em; text-decoration-color: hsl(var(--h) 80% 70% / .85); border-radius: 4px; transition: background .2s; }
:root[data-theme="light"] .w { text-decoration-color: hsl(var(--h) 70% 40% / .8); }
.w:active, .w:hover { background: hsl(var(--h) 70% 60% / .16); }
.w.rev { text-decoration-color: var(--gold); text-decoration-style: solid; text-decoration-thickness: 2px; }
.w.saved { text-decoration-style: solid; }
.ro { font-size: calc(19px * var(--ts)); line-height: 1.45; color: var(--ink2); margin: 0; max-height: 0; opacity: 0; transform: translateY(-4px); overflow: hidden; transition: max-height .35s var(--ease), opacity .3s, transform .3s var(--ease), margin .3s; }
.ro::before { content: ''; display: block; width: 36px; height: 2px; background: var(--accent); margin-bottom: 12px; border-radius: 2px; }
.show-ro .ro { max-height: 400px; opacity: 1; transform: none; margin-top: 26px; }
.tap-hint { margin-top: 28px; font-size: 14px; color: var(--muted); }
.cover-kicker { font-weight: 700; color: var(--accent); margin: 0 0 16px; }
.cover-title { font-family: var(--serif); font-weight: 500; font-size: calc(clamp(38px, 11vw, 64px) * var(--ts)); line-height: 1.02; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.cover-ro { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--ink2); margin: 16px 0 22px; }
.cover-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.swipe-hint { display: flex; align-items: center; gap: 4px; margin-top: 46px; color: var(--muted); font-weight: 600; font-size: 15px; }
.swipe-hint .ic { animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.end-in { padding-top: 30px; }
.end-h { font-family: var(--serif); font-weight: 500; font-size: 34px; margin: 0 0 18px; }
.quiz { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.q-en { font-family: var(--serif); font-size: 21px; line-height: 1.3; margin: 0 0 4px; }
.q-ro-btn { border: 0; background: none; padding: 2px 0; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.q-ro { margin: 2px 0 0; color: var(--ink2); font-size: 15px; }
.opts { display: grid; gap: 8px; margin-top: 10px; }
.opt { text-align: left; padding: 12px 14px; border-radius: var(--r1); border: 1px solid var(--line); background: hsl(var(--h) 30% 50% / .08); font-size: 16px; cursor: pointer; }
.opt.right { border-color: var(--ok); background: hsl(150 55% 45% / .18); }
.opt.wrong { border-color: var(--bad); background: hsl(8 80% 55% / .15); text-decoration: line-through; }
.answered .opt:not(.right):not(.wrong) { opacity: .55; }
.source { font-size: 14px; color: var(--muted); margin: 26px 0 0; }
.end-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.btn.like.on { background: hsl(350 80% 60% / .18); border-color: hsl(350 80% 65%); color: hsl(350 85% 75%); }
:root[data-theme="light"] .btn.like.on { color: hsl(350 70% 40%); }
.btn.like.on .ic { fill: currentColor; }
.next-card { position: relative; display: grid; gap: 4px; padding: 20px 56px 20px 20px; border-radius: var(--r2); text-decoration: none; color: var(--ink); background: linear-gradient(150deg, hsl(var(--h) 50% 24%), hsl(var(--h) 45% 13%)); border: 1px solid hsl(var(--h) 50% 40% / .6); }
:root[data-theme="light"] .next-card { background: linear-gradient(150deg, hsl(var(--h) 60% 86%), hsl(var(--h) 50% 93%)); border-color: hsl(var(--h) 45% 75%); }
.next-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.next-cat { font-size: 14px; font-weight: 700; color: hsl(var(--h) 80% 78%); }
:root[data-theme="light"] .next-cat { color: hsl(var(--h) 60% 32%); }
.next-t { font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.next-go { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--h) 85% 72%); color: hsl(var(--h) 50% 12%); }
.nav-arrow { display: none; position: absolute; z-index: 4; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); cursor: pointer; place-items: center; }
.nav-arrow[disabled] { opacity: .25; cursor: default; }
.nav-arrow.prev { left: 18px; } .nav-arrow.next { right: 18px; }
@media (hover: hover) and (pointer: fine) and (min-width: 820px) { .nav-arrow { display: grid; } .card { padding-left: 90px; padding-right: 90px; } }

/* fereastra cuvântului (de jos în sus, la îndemâna degetului) */
.sheet-wrap { position: absolute; inset: 0; z-index: 10; }
.sheet-back { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .22s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 82vh; overflow-y: auto; padding: 10px 22px calc(22px + var(--safe-b)); border-radius: 24px 24px 0 0; background: var(--bg2); border: 1px solid var(--line); border-bottom: 0; transform: translateY(100%); transition: transform .26s var(--ease); box-shadow: 0 -20px 60px rgba(0,0,0,.35); }
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-back { opacity: 1; }
.grab { width: 40px; height: 5px; border-radius: 4px; background: var(--bg3); margin: 0 auto 14px; }
.sh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sh-word { font-family: var(--serif); font-size: 34px; line-height: 1.1; margin: 0; }
.sh-base { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.sh-pron { margin: 6px 0 0; color: var(--ink2); font-size: 15px; }
.sh-pron b { color: var(--accent); letter-spacing: .02em; }
.sh-ro { font-size: 22px; font-weight: 700; margin: 14px 0 6px; }
.sh-explain { margin: 0 0 10px; color: var(--ink2); }
.sh-ex { font-family: var(--serif); font-style: italic; font-size: 18px; margin: 0 0 10px; }
.sh-rev { font-size: 14px; color: var(--gold); margin: 0 0 10px; }
.sh-actions { display: flex; gap: 8px; margin-top: 14px; }
.sh-actions .btn { flex: 1; }
.sh-links { display: flex; gap: 18px; margin: 16px 0 0; font-size: 14px; font-weight: 600; }
.sh-title { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0 0 6px; }
.field textarea { resize: vertical; min-height: 80px; }

/* ---------- cuvinte ---------- */
.wlist { list-style: none; padding: 0; margin: 22px 0 0; }
.witem { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wmain b { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.wmain span { color: var(--ink2); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wstate { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.wstate.due { color: var(--gold); font-weight: 700; }
.wdel { color: var(--muted); }

.review { position: fixed; inset: 0; display: flex; flex-direction: column; padding: calc(8px + var(--safe-t)) 18px calc(18px + var(--safe-b)); background: radial-gradient(80% 50% at 50% 0%, var(--glow), transparent 70%), var(--bg); }
.rv-top { display: flex; align-items: center; justify-content: space-between; }
.rv-count { font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.rv-stage { flex: 1; display: grid; place-items: center; padding: 10px 0; }
.rv-card { position: relative; width: 100%; max-width: 460px; min-height: 52vh; padding: 30px 24px; border-radius: var(--r3); background: linear-gradient(165deg, var(--bg3), var(--bg2)); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; text-align: center; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; transition: transform .25s var(--ease), opacity .25s; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.rv-word { font-family: var(--serif); font-size: clamp(38px, 11vw, 56px); line-height: 1.05; margin: 0; }
.rv-ctx { font-family: var(--serif); font-style: italic; color: var(--ink2); font-size: 18px; margin: 18px 0 0; }
.rv-ctx mark { background: none; color: var(--accent); font-style: normal; }
.rv-back { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .35s var(--ease), opacity .3s; }
.rv-card.flip .rv-back { max-height: 500px; opacity: 1; }
.rv-ro { font-size: 24px; font-weight: 700; margin: 22px 0 4px; }
.rv-pron { color: var(--accent); margin: 0 0 10px; }
.rv-explain { color: var(--ink2); margin: 0 0 8px; font-size: 15px; }
.rv-ex { font-family: var(--serif); font-style: italic; margin: 0; }
.rv-stamp { position: absolute; top: 22px; padding: 4px 12px; border-radius: 8px; font-weight: 800; border: 2px solid; opacity: 0; transition: opacity .15s; }
.rv-stamp.yes { left: 22px; color: var(--ok); transform: rotate(-8deg); }
.rv-stamp.no { right: 22px; color: var(--bad); transform: rotate(8deg); }
.rv-card.lean-yes .rv-stamp.yes, .rv-card.lean-no .rv-stamp.no { opacity: 1; }
.rv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 460px; width: 100%; margin: 0 auto; }
.rv-actions .btn { padding: 16px; font-size: 17px; }
.rv-help { text-align: center; color: var(--muted); font-size: 13px; margin: 12px auto 0; max-width: 400px; }
.rv-done { text-align: center; }
.rv-done h2 { font-family: var(--serif); font-weight: 500; font-size: 36px; margin: 0 0 8px; }

/* ---------- progres ---------- */
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 16px; border-radius: var(--r2); background: var(--bg2); display: flex; flex-direction: column; }
.stat b { font-family: var(--serif); font-size: 38px; font-weight: 500; line-height: 1; }
.stat b small { font-size: 18px; color: var(--muted); }
.stat span { color: var(--ink2); font-size: 14px; margin-top: 6px; }
.days { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 70px; align-items: end; }
.days i { display: block; height: calc(6% + 94% * var(--v)); border-radius: 3px; background: var(--bg3); }
.days i.some { background: hsl(var(--h) 60% 55% / .55); }
.days i.goal { background: var(--accent); }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.levels span { text-align: center; padding: 10px 0; border-radius: var(--r1); background: var(--bg2); color: var(--muted); font-weight: 700; }
.levels span.on { background: var(--accent); color: var(--accent-ink); }
.catbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.catbars li { display: grid; grid-template-columns: 1fr 34px; grid-template-rows: auto 6px; gap: 4px 10px; align-items: center; }
.catbars span { font-size: 15px; }
.catbars small { color: var(--muted); }
.catbars i { grid-row: 2; height: 6px; border-radius: 4px; background: linear-gradient(90deg, hsl(var(--h) 75% 62%) calc(100% * var(--v)), var(--bg3) 0); }
.catbars b { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- setări ---------- */
.group { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.group:last-child { border-bottom: 0; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tg { position: relative; }
.tg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tg span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14.5px; transition: all .2s; }
.tg input:checked + span { background: hsl(var(--h) 60% 50% / .22); border-color: hsl(var(--h) 70% 60%); color: var(--ink); }
.tg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.row.col select { margin: 0; }
.row input[type="range"] { flex: 1; max-width: 55%; accent-color: var(--accent); }
.ts-preview { font-family: var(--serif); font-size: calc(24px * var(--ts)); margin: 4px 0 12px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .ibtn { background: var(--bg2); font-size: 22px; }
.stepper b { min-width: 28px; text-align: center; font-size: 19px; }
.seg { display: flex; background: var(--bg2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.sw { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 30px; background: var(--bg3); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sw:checked { background: var(--accent); }
.sw:checked::after { transform: translateX(20px); }
.ai-state { color: var(--ink2); }
.meter { height: 8px; border-radius: 8px; background: var(--bg3); overflow: hidden; margin: 14px 0 6px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--gold) 70%, var(--bad)); background-size: 300px 100%; }
.ai-check { margin-top: 8px; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
.hist { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hist th, .hist td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hist th { color: var(--muted); font-weight: 600; }
.flist { list-style: none; padding: 0; margin: 0; }
.flist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.flist small { display: block; color: var(--muted); }
.pw { margin-bottom: 12px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

@media (min-width: 700px) {
  .page { padding-top: calc(40px + var(--safe-t)); }
  .list { grid-template-columns: 1fr 1fr; }
  .hscroll .scard { flex-basis: 46%; }
  .statgrid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
