/* «Логика» — стиль в духе Home.ai: светло-серый фон, белые мягкие карточки, лаймовый акцент, тёмные «таблетки», крупные тонкие цифры. */
:root {
  --bg: #EFEFED;
  --card: #FFFFFF;
  --soft: #F5F5F3;
  --soft-2: #EAEAE7;
  --ink: #1C1C1C;
  --ink-2: #3A3A3A;
  --muted: #9B9B98;
  --line: rgba(28, 28, 28, .07);
  --lime: #C8DC7E;
  --lime-2: #B4CB62;
  --lime-ink: #7F9A2E;
  --lime-soft: #EEF3DA;
  --peach: #EBCB98;
  --peach-soft: #F7EBD7;
  --bad: #D2735F;
  --bad-soft: #F8E3DC;
  --on-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 12px 30px rgba(0, 0, 0, .05);
  --shadow-in: inset 0 2px 6px rgba(0, 0, 0, .06);
  --stripe: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .45) 0 6px, transparent 6px 12px);

  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --out: cubic-bezier(.16, 1, .3, 1);
  --r: 30px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111213; --card: #1B1C1E; --soft: #232427; --soft-2: #2B2C30; --ink: #F1F1EE; --ink-2: #D6D6D2; --muted: #85857F;
    --line: rgba(255, 255, 255, .07); --lime: #C8DC7E; --lime-2: #B4CB62; --lime-ink: #C8DC7E; --lime-soft: rgba(200, 220, 126, .13);
    --peach: #E3BE85; --peach-soft: rgba(235, 203, 152, .13); --bad: #E58C79; --bad-soft: rgba(229, 140, 121, .14); --on-ink: #111213;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-in: inset 0 2px 6px rgba(0, 0, 0, .35);
    --stripe: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .12) 0 6px, transparent 6px 12px);
  }
}
:root[data-theme="dark"] {
  --bg: #111213; --card: #1B1C1E; --soft: #232427; --soft-2: #2B2C30; --ink: #F1F1EE; --ink-2: #D6D6D2; --muted: #85857F;
  --line: rgba(255, 255, 255, .07); --lime-ink: #C8DC7E; --lime-soft: rgba(200, 220, 126, .13);
  --peach-soft: rgba(235, 203, 152, .13); --bad: #E58C79; --bad-soft: rgba(229, 140, 121, .14); --on-ink: #111213;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-in: inset 0 2px 6px rgba(0, 0, 0, .35);
  --stripe: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .12) 0 6px, transparent 6px 12px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; padding-top: var(--safe-t); overflow: hidden; letter-spacing: -.005em;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; text-align: inherit; }
input, textarea { font: inherit; color: var(--ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes dots { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* ---------- Шапка ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 6px; max-width: 760px; width: 100%; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-weight: 600; font-size: 20px; line-height: 1.1; }
.brand-sub { color: var(--muted); font-size: 13px; }
.logo { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--lime); font: 600 28px/1 var(--sans); }
.logo.small { width: 44px; height: 44px; font-size: 20px; }
.stats { display: flex; gap: 6px; }
.stat-pill { background: var(--card); border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }

.tab-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: rise .5s var(--out) both; }
.scroll { flex: 1; overflow-y: auto; padding: 10px 16px calc(110px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; -webkit-overflow-scrolling: touch; }

/* ---------- Нижняя навигация: тёмная таблетка, активная кнопка — белый круг ---------- */
.navbar {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); z-index: 5;
  display: flex; gap: 6px; padding: 7px; border-radius: 999px; background: var(--ink); box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}
.tab { position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .72); transition: background .35s var(--out), color .35s; }
:root[data-theme="dark"] .tab, .tab { --ic: currentColor; }
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { background: var(--card); color: var(--ink); }
.tab.active::after { content: ""; position: absolute; top: 9px; right: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tab { color: rgba(17, 18, 19, .6); } :root:not([data-theme="light"]) .tab.active { background: var(--bg); color: var(--ink); } }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--peach); color: #1C1C1C; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; animation: pop .5s var(--out) both; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 54px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .25s var(--out), opacity .3s, background .3s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.wide { width: 100%; }
.btn.grow { flex: 1; }
.btn:disabled, .pill-go:disabled { opacity: .45; }
.pill-go { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 22px; border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 15px; box-shadow: var(--shadow); transition: transform .25s var(--out); }
.pill-go i { font-style: normal; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: 18px; }
.pill-go:active { transform: scale(.97); }
.round-go { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: 18px; text-align: center; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; flex: none; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.icon-btn.ask { background: var(--lime); color: #1C1C1C; box-shadow: none; }
.icon-btn:active { transform: scale(.92); }
.chip-soft { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

/* ---------- Круговая шкала ---------- */
.dial { display: block; overflow: visible; }
.dial .tk { stroke: var(--soft-2); stroke-width: 1.4; stroke-linecap: round; }
.dial .tk.on { stroke: var(--lime-2); }
.dial .d-track { fill: none; stroke: var(--soft); }
.dial .d-arc { fill: none; stroke: var(--lime); stroke-linecap: round; transition: stroke-dasharray 1s var(--out); }
.dial .d-dot { fill: var(--lime-ink); stroke: var(--card); stroke-width: 2; }
.dial .d-face { fill: var(--card); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .09)); }
.dial .d-num { fill: var(--ink); font-family: var(--sans); font-weight: 300; text-anchor: middle; dominant-baseline: middle; letter-spacing: -.03em; }
.dial .d-of { font-size: .45em; fill: var(--muted); font-weight: 400; }
.dial .d-sub { fill: var(--muted); font-family: var(--sans); font-weight: 500; text-anchor: middle; }

/* ---------- Путь ---------- */
.hero { background: var(--card); border-radius: var(--r); padding: 22px 18px 20px 22px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); animation: rise .6s var(--out) both; }
.hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero h1 { margin: 4px 0 0; font-size: clamp(22px, 6vw, 28px); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.hero p { margin: 0 0 6px; font-size: 14px; }
.hero .pill-go { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.hero .pill-go i { background: var(--lime); color: #1C1C1C; }
.hero-dial { flex: none; width: 150px; }
.hero-dial .dial { width: 150px; height: 150px; }
@media (max-width: 360px) { .hero { flex-direction: column-reverse; align-items: stretch; } .hero-dial { align-self: center; } }

.module { background: var(--card); border-radius: var(--r); padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); animation: rise .5s var(--out) both; }
.m-head { display: flex; gap: 12px; align-items: center; padding: 0 6px; }
.m-head .dial { flex: none; }
.m-t { flex: 1; min-width: 0; }
.m-t h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.m-src { color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 3px; }
.module.soon { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; background: transparent; box-shadow: none; border: 1.5px dashed var(--soft-2); }
.module.soon .m-n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--soft-2); font-weight: 600; color: var(--muted); }
.module.soon h3 { font-size: 15px; color: var(--ink-2); }
.rows { display: flex; flex-direction: column; gap: 6px; }
.lesson-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--soft); font-weight: 500; transition: transform .2s var(--out); }
.lesson-row:active { transform: scale(.985); }
.l-n { flex: none; width: 22px; color: var(--muted); font-size: 14px; }
.l-title { flex: 1; min-width: 0; line-height: 1.3; font-size: 15px; }
.l-meta { flex: none; font-size: 13px; color: var(--muted); font-weight: 600; }
.lesson-row.done .l-n { color: var(--lime-ink); font-weight: 700; }
.lesson-row .stars { color: var(--lime-ink); letter-spacing: 1px; font-weight: 400; }
.lesson-row.next { background: var(--lime-soft); background-image: var(--stripe); background-color: var(--lime); color: #1C1C1C; }
.lesson-row.next .l-n, .lesson-row.next .l-meta { color: #1C1C1C; }
.lesson-row.locked { opacity: .55; background: transparent; }

/* ---------- Урок ---------- */
.overlay { position: fixed; inset: 0; z-index: 10; background: var(--bg); }
.overlay.center { display: grid; place-items: center; padding: 24px; z-index: 30; }
.overlay.lesson, .overlay.study { display: flex; flex-direction: column; padding-top: calc(12px + var(--safe-t)); animation: rise .4s var(--out) both; }
.lesson-top { display: flex; align-items: center; gap: 12px; padding: 0 16px 10px; max-width: 760px; width: 100%; margin: 0 auto; }
.progress { flex: 1; height: 10px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow-in); overflow: hidden; }
.progress > div { height: 100%; width: 0; border-radius: 10px; background: var(--lime); background-image: var(--stripe); transition: width .6s var(--out); }
.lesson-body { flex: 1; overflow-y: auto; padding: 6px 16px 20px; max-width: 760px; width: 100%; margin: 0 auto; -webkit-overflow-scrolling: touch; }
.lesson-body.enter > * { animation: slideIn .5s var(--out) both; }
.kicker { color: var(--muted); font-size: 12.5px; margin: 0 6px 12px; }
.step-label { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 12px; font-weight: 600; margin: 0 0 14px; }
.lesson-body h2 { font-size: clamp(24px, 6.6vw, 32px); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; margin: 0 4px 16px; text-wrap: balance; }
.lesson-body h2.q { font-size: clamp(20px, 5.4vw, 25px); line-height: 1.22; }
.lesson-dock { display: flex; gap: 10px; padding: 10px 16px calc(14px + var(--safe-b)); max-width: 760px; width: 100%; margin: 0 auto; }
.lesson-dock:empty { display: none; }

.md { background: var(--card); border-radius: var(--r); padding: 20px 20px 8px; box-shadow: var(--shadow); font-size: 16.5px; line-height: 1.6; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 20px; }
.md li { margin: 6px 0; }
.md li::marker { color: var(--lime-ink); }
.md b { font-weight: 600; }
.rule { background: var(--lime-soft); border-radius: 20px; padding: 14px 16px; margin: 2px 0 14px; }
.tip { background: var(--peach-soft); border-radius: 20px; padding: 14px 16px; margin: 2px 0 14px; font-size: 15px; }
.tip::before { content: "Важно · "; font-weight: 700; }
.md.example { border: 2px dashed var(--soft-2); box-shadow: none; background: transparent; }
.fig { margin: 4px 0 14px; text-align: center; }
.fig svg { max-width: 100%; height: auto; }
.fig .fa { fill: var(--soft); stroke: var(--soft-2); stroke-width: 1.5; }
.fig .fb { fill: var(--lime); fill-opacity: .75; stroke: var(--lime-2); stroke-width: 1.5; }
.fig .fb2 { fill: var(--peach); fill-opacity: .6; stroke: var(--peach); stroke-width: 1.5; }
.fig .fl { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.fig .fl.dash { stroke-dasharray: 5 5; }
.fig .fsq { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.fig .fn { fill: var(--ink); } .fig .fn2 { fill: var(--lime); }
.fig .fnum { fill: var(--ink); font: 600 16px var(--sans); text-anchor: middle; }
.fig .fnum.k { fill: #1C1C1C; }
.fig .ft { fill: var(--ink); font: 600 14px var(--sans); text-anchor: middle; }
.fig .ft.s { font-size: 11px; font-weight: 500; fill: var(--ink-2); }
.fig .ft.w { paint-order: stroke; stroke: var(--card); stroke-width: 4px; }
.fig .fc { fill: var(--muted); font: 500 11.5px var(--sans); text-anchor: middle; }

.options { display: flex; flex-direction: column; gap: 8px; }
.opt { background: var(--card); border-radius: 22px; padding: 16px 18px; line-height: 1.4; box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .25s, background .25s, transform .2s var(--out); }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt.right { background: var(--lime); background-image: var(--stripe); color: #1C1C1C; }
.opt.wrong { background: var(--bad-soft); border-color: var(--bad); }
.opt:disabled:not(.right):not(.wrong) { opacity: .5; }

.sort { display: flex; flex-direction: column; gap: 8px; }
.sort-item { background: var(--card); border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .25s, background .25s; }
.sort-item.right { border-color: var(--lime-2); }
.sort-item.wrong { border-color: var(--bad); background: var(--bad-soft); }
.s-text { font-weight: 500; margin-bottom: 10px; line-height: 1.4; }
.s-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.s-groups button { padding: 8px 14px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; }
.s-groups button.sel { background: var(--ink); color: var(--on-ink); }
.s-groups button.correct { background: var(--lime); color: #1C1C1C; }

textarea { width: 100%; background: var(--card); border: 2px solid transparent; border-radius: 22px; padding: 16px; outline: none; resize: vertical; line-height: 1.5; box-shadow: var(--shadow); transition: border-color .25s; }
textarea:focus { border-color: var(--lime-2); }
.verdict { margin-top: 12px; border-radius: 24px; padding: 16px 18px; animation: rise .45s var(--out) both; font-size: 15px; }
.verdict > b { display: block; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.verdict p { margin: 6px 0; }
.verdict.ok { background: var(--lime-soft); } .verdict.ok > b { color: var(--lime-ink); }
.verdict.warn { background: var(--peach-soft); }
.verdict.bad { background: var(--bad-soft); } .verdict.bad > b { color: var(--bad); }
.verdict details { margin-top: 8px; } .verdict summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }

.summary { text-align: center; padding-top: 4px; display: flex; flex-direction: column; align-items: center; }
.summary h2 { margin: 10px 0 4px !important; }
.summary p { margin: 4px 0; }
.sum-dial { animation: pop .9s var(--out) both; }
.sum-dial .d-sub { fill: var(--lime-ink); letter-spacing: 2px; }
.terms { text-align: left; display: flex; flex-direction: column; gap: 6px; margin-top: 18px; width: 100%; }
.term { background: var(--card); border-radius: 18px; padding: 12px 16px; font-size: 14.5px; line-height: 1.45; box-shadow: var(--shadow); }

/* ---------- Вопрос преподавателю ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .28); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: 100%; max-width: 640px; max-height: 84vh; background: var(--bg); border-radius: 32px 32px 0 0; padding: 18px 16px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; animation: rise .4s var(--out) both; }
.sheet-top { display: flex; justify-content: space-between; align-items: center; padding-left: 4px; }
.sheet-top b { font-size: 19px; font-weight: 600; }
.ask-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.ask-log > p { margin: 0 4px 8px; }
.q-me { align-self: flex-end; max-width: 88%; background: var(--ink); color: var(--on-ink); border-radius: 22px 22px 6px 22px; padding: 10px 15px; }
.q-ai { align-self: flex-start; max-width: 92%; background: var(--card); border-radius: 22px 22px 22px 6px; padding: 12px 16px 4px; font-size: 15px; box-shadow: var(--shadow); }
.q-ai p { margin: 0 0 8px; } .q-ai ul { margin: 0 0 8px; padding-left: 18px; }
.q-ai.pending { padding-bottom: 12px; animation: dots 1.2s infinite; }
.bar { display: flex; gap: 8px; align-items: center; }
.bar input, .search { flex: 1; min-width: 0; background: var(--card); border: 0; border-radius: 999px; padding: 15px 20px; outline: none; box-shadow: var(--shadow); }

/* ---------- Карточки, тренажёр, прогресс ---------- */
.panel { background: var(--card); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); animation: rise .5s var(--out) both; }
.panel h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.panel h3 { margin: 0; font-size: 18px; font-weight: 600; }
.panel p { margin: 0; }
.deck-stats { display: flex; justify-content: space-around; text-align: center; font-size: 12.5px; padding: 4px 0; }
.deck-stats .big, .trio .big { font-size: 40px; font-weight: 300; line-height: 1.1; letter-spacing: -.03em; }
.trio { flex-direction: row; justify-content: space-around; text-align: center; font-size: 12.5px; }
.trio small, .p-big small, .pm-num small { font-size: .4em; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.lime-card { background: var(--lime); color: #1C1C1C; }
.lime-card p, .lime-card .muted { color: rgba(28, 28, 28, .62); }
.lime-card .lc-kicker { font-size: 13px; font-weight: 600; opacity: .6; }
.lime-card h2 { font-size: 30px; }
.lime-card .deck-stats { background: rgba(255, 255, 255, .45); border-radius: 22px; padding: 12px 4px; }
.lime-card .pill-go { align-self: flex-start; background: #fff; color: #1C1C1C; }
.lime-card .pill-go i { background: #1C1C1C; color: #fff; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-h { margin: 8px 6px 0; font-size: 18px; font-weight: 600; }
.item { background: var(--card); border-radius: 22px; padding: 15px 18px; box-shadow: var(--shadow); animation: rise .4s var(--out) both; }
.item summary { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.item summary::-webkit-details-marker { display: none; }
.item p { margin: 8px 0 0; }
.when { color: var(--muted); font-size: 12px; font-weight: 500; flex: none; }
.when.due { color: #1C1C1C; background: var(--lime); padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.item.weak { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; font-weight: 500; }
.item.weak .pct { font-size: 26px; font-weight: 300; color: var(--bad); }

.p-head { display: flex; justify-content: space-between; align-items: baseline; }
.p-big { font-size: 44px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; height: 170px; align-items: end; }
.b-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.b-col span { font-size: 10.5px; color: var(--muted); }
.b { width: 100%; border-radius: 12px; background: var(--soft-2); transform-origin: bottom; animation: grow .8s var(--out) both; display: grid; place-items: center; font-size: 12px; }
.b.on { background: var(--lime); background-image: var(--stripe); }
.b.today { box-shadow: 0 0 0 2px var(--ink) inset; }
.pm-list { display: flex; flex-direction: column; gap: 4px; }
.pm { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.pm:first-child { border-top: 0; }
.pm-ic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-weight: 600; color: var(--muted); }
.pm-ic.on { background: var(--lime-soft); color: var(--lime-ink); }
.pm-t { flex: 1; min-width: 0; line-height: 1.25; }
.pm-t b { display: block; font-weight: 500; font-size: 15px; }
.pm-t small { color: var(--muted); font-size: 12px; }
.pm-num { font-size: 30px; font-weight: 300; letter-spacing: -.03em; }
.pm.soon { opacity: .5; }

/* ---------- Повторение карточек ---------- */
.flash { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 18px; max-width: 640px; width: 100%; margin: 0 auto; }
.flash-card { width: 100%; min-height: 60%; background: var(--card); border-radius: 36px; box-shadow: var(--shadow); padding: 28px 24px; display: flex; flex-direction: column; justify-content: center; gap: 14px; text-align: center; }
.flash.flip .flash-card { background: var(--card); }
.flash.enter .flash-card { animation: slideIn .5s var(--out) both; }
.f-module { align-self: center; padding: 6px 14px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-ink); font-size: 12px; font-weight: 600; }
.f-term { font-size: clamp(28px, 8vw, 40px); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.f-back { border-top: 1px solid var(--line); padding-top: 16px; animation: rise .5s var(--out) both; }
.f-def { font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.study-actions { padding: 14px 16px calc(14px + var(--safe-b)); max-width: 640px; width: 100%; margin: 0 auto; }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate button { padding: 12px 4px; border-radius: 20px; font-weight: 600; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.rate small { font-weight: 500; font-size: 11px; opacity: .7; }
.rate .r1 { background: var(--bad-soft); color: var(--bad); }
.rate .r2 { background: var(--peach-soft); color: var(--ink); }
.rate .r3 { background: var(--lime); color: #1C1C1C; }
.rate .r4 { background: var(--ink); color: var(--on-ink); }

/* ---------- Вход ---------- */
.card { background: var(--card); border-radius: 36px; padding: 28px 24px; box-shadow: var(--shadow); }
.login-card { width: 100%; max-width: 360px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.login-card h1 { margin: 4px 0 0; font-size: 34px; font-weight: 600; letter-spacing: -.03em; }
.login-card p { margin: 0; }
.login-card input { width: 100%; background: var(--soft); border: 0; border-radius: 999px; padding: 15px 18px; outline: none; text-align: center; }

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