/* Zubrik AI — оформление сайта, версия 3.
   Палитра прежняя: чернила, тёплая бумага, лайм и лесной зелёный.
   Стекло (Liquid Glass) — у шапки, меню, карточек на главной и панелей приложения.
   Все цвета — переменные ниже; в правилах только var(--…). */

/* Шрифты Inter и JetBrains Mono — с нашего сервера (11.7.1), файлы те же, что отдаёт Google Fonts (static/fonts,
   лицензия SIL OFL). Раньше перед первой отрисовкой браузер шёл за CSS на fonts.googleapis.com, а потом за файлами
   на fonts.gstatic.com — два новых соединения (DNS, TCP, TLS), на медленном мобильном интернете это до секунды.
   Наборы символов (unicode-range) прежние: браузер скачивает только те, что есть на странице. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/inter-cyrillic-ext.woff2?v=v20") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/inter-cyrillic.woff2?v=v20") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/inter-greek-ext.woff2?v=v20") format("woff2"); unicode-range: U+1F00-1FFF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/inter-greek.woff2?v=v20") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/inter-vietnamese.woff2?v=v20") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/inter-latin-ext.woff2?v=v20") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/static/fonts/inter-latin.woff2?v=v20") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/jetbrains-mono-cyrillic-ext.woff2?v=v24") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/jetbrains-mono-cyrillic.woff2?v=v24") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/jetbrains-mono-greek.woff2?v=v24") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/jetbrains-mono-vietnamese.woff2?v=v24") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/jetbrains-mono-latin-ext.woff2?v=v24") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/jetbrains-mono-latin.woff2?v=v24") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #FFFFFF;
  --bg-2: #F5F6F2;
  --surface: #FFFFFF;
  --ink: #121212;
  --ink-2: #4A514C;
  --ink-3: #7B837D;
  --line: rgba(18, 18, 18, 0.08);
  --line-2: rgba(18, 18, 18, 0.15);
  --lime: #D4F54C;
  --lime-2: #C3EA2A;
  --lime-soft: #F3FBD2;
  --lime-ink: #121212;
  --accent-text: #1D4A35;
  --forest: #1D4A35;
  --forest-2: #24573F;
  --forest-3: #133325;
  --on-forest: #F1F5EC;
  --on-forest-2: #B9CCBE;
  --red: #CF3626;
  --red-soft: #FCEDEA;
  --blue: #2B4FC4;
  --blue-soft: #EBF0FC;
  --ok: #1B7542;
  --ok-soft: #E6F4EA;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-rim-1: rgba(255, 255, 255, 1);
  --glass-rim-2: rgba(18, 18, 18, 0.05);
  --glass-rim-3: rgba(18, 18, 18, 0.07);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --glass-lo: rgba(18, 18, 18, 0.03);
  --sheen: rgba(255, 255, 255, 0.7);
  --lg-tint: rgba(255, 255, 255, 0.58);
  --lg-tint-strong: rgba(255, 255, 255, 0.76);
  --lg-edge: rgba(255, 255, 255, 0.95);
  --lg-edge-2: rgba(255, 255, 255, 0.4);
  --lg-glow: rgba(255, 255, 255, 0.5);
  --lg-line: rgba(18, 18, 18, 0.08);
  --lg-fill: rgba(30, 50, 36, 0.045);
  --lg-fill-hover: rgba(255, 255, 255, 0.95);
  --lg-chip: rgba(18, 18, 18, 0.05);
  --lg-thumb: #FFFFFF;
  --lg-drop: 0 24px 60px -26px rgba(18, 30, 22, 0.32), 0 8px 20px -12px rgba(18, 30, 22, 0.14);
  --shadow-sm: 0 1px 2px rgba(18, 18, 18, 0.05);
  --shadow: 0 1px 2px rgba(18, 18, 18, 0.04), 0 8px 24px -12px rgba(18, 18, 18, 0.14);
  --shadow-lg: 0 2px 4px rgba(18, 18, 18, 0.04), 0 24px 48px -20px rgba(18, 18, 18, 0.22);
  --amb-1: rgba(212, 245, 76, 0.22);
  --amb-2: rgba(29, 74, 53, 0.07);
  --amb-3: rgba(43, 79, 196, 0.04);
  --font-display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1510;
    --bg-2: #0F1D16;
    --surface: #12221A;
    --ink: #ECF0E7;
    --ink-2: #B4BFB5;
    --ink-3: #85918A;
    --line: rgba(236, 240, 231, 0.09);
    --line-2: rgba(236, 240, 231, 0.17);
    --accent-text: #D4F54C;
    --lime-soft: rgba(212, 245, 76, 0.12);
    --forest: #13301F;
    --forest-2: #1A3F2A;
    --forest-3: #0A1C12;
    --red: #FF7B6B;
    --red-soft: rgba(255, 123, 107, 0.12);
    --blue: #93ABFF;
    --blue-soft: rgba(147, 171, 255, 0.12);
    --ok: #63D597;
    --ok-soft: rgba(99, 213, 151, 0.12);
    --glass: rgba(24, 42, 33, 0.55);
    --glass-strong: rgba(20, 36, 28, 0.82);
    --glass-rim-1: rgba(255, 255, 255, 0.22);
    --glass-rim-2: rgba(255, 255, 255, 0.06);
    --glass-rim-3: rgba(255, 255, 255, 0.12);
    --glass-hi: rgba(255, 255, 255, 0.10);
    --glass-lo: rgba(0, 0, 0, 0.25);
    --sheen: rgba(255, 255, 255, 0.07);
    --lg-tint: rgba(28, 44, 36, 0.5);
    --lg-tint-strong: rgba(20, 34, 27, 0.74);
    --lg-edge: rgba(255, 255, 255, 0.3);
    --lg-edge-2: rgba(255, 255, 255, 0.08);
    --lg-glow: rgba(255, 255, 255, 0.06);
    --lg-line: rgba(0, 0, 0, 0.45);
    --lg-fill: rgba(255, 255, 255, 0.055);
    --lg-fill-hover: rgba(255, 255, 255, 0.11);
    --lg-chip: rgba(255, 255, 255, 0.08);
    --lg-thumb: rgba(255, 255, 255, 0.16);
    --lg-drop: 0 30px 70px -26px rgba(0, 0, 0, 0.8), 0 10px 24px -12px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px -16px rgba(0, 0, 0, 0.75);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -24px rgba(0, 0, 0, 0.85);
    --amb-1: rgba(212, 245, 76, 0.10);
    --amb-2: rgba(40, 120, 80, 0.22);
    --amb-3: rgba(147, 171, 255, 0.05);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0B1510;
  --bg-2: #0F1D16;
  --surface: #12221A;
  --ink: #ECF0E7;
  --ink-2: #B4BFB5;
  --ink-3: #85918A;
  --line: rgba(236, 240, 231, 0.09);
  --line-2: rgba(236, 240, 231, 0.17);
  --accent-text: #D4F54C;
  --lime-soft: rgba(212, 245, 76, 0.12);
  --forest: #13301F;
  --forest-2: #1A3F2A;
  --forest-3: #0A1C12;
  --red: #FF7B6B;
  --red-soft: rgba(255, 123, 107, 0.12);
  --blue: #93ABFF;
  --blue-soft: rgba(147, 171, 255, 0.12);
  --ok: #63D597;
  --ok-soft: rgba(99, 213, 151, 0.12);
  --glass: rgba(24, 42, 33, 0.55);
  --glass-strong: rgba(20, 36, 28, 0.82);
  --glass-rim-1: rgba(255, 255, 255, 0.22);
  --glass-rim-2: rgba(255, 255, 255, 0.06);
  --glass-rim-3: rgba(255, 255, 255, 0.12);
  --glass-hi: rgba(255, 255, 255, 0.10);
  --glass-lo: rgba(0, 0, 0, 0.25);
  --sheen: rgba(255, 255, 255, 0.07);
  --lg-tint: rgba(28, 44, 36, 0.5);
  --lg-tint-strong: rgba(20, 34, 27, 0.74);
  --lg-edge: rgba(255, 255, 255, 0.3);
  --lg-edge-2: rgba(255, 255, 255, 0.08);
  --lg-glow: rgba(255, 255, 255, 0.06);
  --lg-line: rgba(0, 0, 0, 0.45);
  --lg-fill: rgba(255, 255, 255, 0.055);
  --lg-fill-hover: rgba(255, 255, 255, 0.11);
  --lg-chip: rgba(255, 255, 255, 0.08);
  --lg-thumb: rgba(255, 255, 255, 0.16);
  --lg-drop: 0 30px 70px -26px rgba(0, 0, 0, 0.8), 0 10px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px -16px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -24px rgba(0, 0, 0, 0.85);
  --amb-1: rgba(212, 245, 76, 0.10);
  --amb-2: rgba(40, 120, 80, 0.22);
  --amb-3: rgba(147, 171, 255, 0.05);
  color-scheme: dark;
}

/* Плавный переход между страницами (Chrome, Edge, Safari 18+) */
@view-transition { navigation: auto; }
/* старая и новая страница перекрываются (кросс-фейд), а не идут по очереди — без «мигания» */
::view-transition-group(root) { animation-duration: 0.34s; }
::view-transition-old(root) { animation: vt-out 0.2s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both; }
@keyframes vt-out { to { opacity: 0; transform: scale(0.995); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- основа ---------- */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--lime); color: var(--lime-ink); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.wrap-narrow { max-width: 780px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Мягкий свет на фоне: под стеклом должно что-то быть */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.ambient i:nth-child(1) { width: 70vmax; height: 70vmax; right: -24vmax; top: -30vmax; background: radial-gradient(closest-side, var(--amb-1), transparent); animation: drift-a 26s ease-in-out infinite alternate; }
.ambient i:nth-child(2) { width: 80vmax; height: 80vmax; left: -34vmax; top: 18vh; background: radial-gradient(closest-side, var(--amb-2), transparent); animation: drift-b 32s ease-in-out infinite alternate; }
.ambient i:nth-child(3) { width: 60vmax; height: 60vmax; right: -10vmax; bottom: -36vmax; background: radial-gradient(closest-side, var(--amb-3), transparent); animation: drift-a 38s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate3d(-8vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(9vmax, -5vmax, 0) scale(0.94); } }

/* ---------- типографика ---------- */

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
.display { font-weight: 850; font-size: clamp(48px, 7.6vw, 104px); line-height: 0.94; letter-spacing: -0.045em; }
.h1 { font-weight: 850; font-size: clamp(36px, 5vw, 58px); line-height: 1; letter-spacing: -0.04em; }
.h2 { font-weight: 850; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.02; letter-spacing: -0.038em; }
.h3 { font-weight: 750; font-size: 21px; line-height: 1.22; letter-spacing: -0.018em; }
.h4 { font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1.4 var(--font-body); color: var(--accent-text); }
.lead { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 36em; margin: 0; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14.5px; line-height: 1.45; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.pre { white-space: pre-wrap; line-height: 1.65; overflow-wrap: anywhere; }
.lime-text { color: var(--lime); }

/* ---------- стекло ---------- */

.glass {
  position: relative;
  background:
    radial-gradient(520px circle at var(--mx, 18%) var(--my, -30%), var(--sheen), transparent 55%),
    var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  backdrop-filter: blur(22px) saturate(175%);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 var(--glass-lo), var(--shadow);
}
/* Светящийся край стекла: ярче сверху слева, тусклее снизу справа */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(145deg, var(--glass-rim-1), var(--glass-rim-2) 38%, transparent 58%, var(--glass-rim-3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.glass-strong { background: radial-gradient(520px circle at var(--mx, 18%) var(--my, -30%), var(--sheen), transparent 55%), var(--glass-strong); }

/* Liquid Glass как в iOS: почти прозрачное стекло, сильное размытие, блик по краю сверху и снизу.
   Для того, что плавает над страницей: шапка, меню, нижняя панель, переключатели, всплывашки. */
.lg {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(380px circle at var(--mx, 24%) var(--my, -20%), var(--sheen), transparent 60%),
    linear-gradient(180deg, var(--lg-glow), transparent 42%),
    var(--lg-tint);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  box-shadow:
    inset 0 1px 0.5px var(--lg-edge),
    inset 0 -1px 0.5px var(--lg-edge-2),
    inset 0 0 18px var(--lg-edge-2),
    0 0 0 0.5px var(--lg-line),
    var(--lg-drop);
}
.lg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg, var(--lg-edge) 0%, transparent 24%, transparent 68%, var(--lg-edge-2) 86%, var(--lg-edge) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pad { padding: clamp(18px, 3vw, 30px); }
.pad-lg { padding: clamp(22px, 4vw, 40px); }

/* ---------- кнопки ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  font: 650 16px/1.1 var(--font-body);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn .ico { width: 18px; height: 18px; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover .ico-arrow { transform: translateX(3px); }

.btn-lime {
  background: var(--lime);
  color: var(--lime-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.14), 0 10px 26px -12px rgba(120, 150, 10, 0.9);
}
.btn-lime::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.7) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn-lime:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.12), 0 18px 36px -14px rgba(120, 150, 10, 0.95); }
.btn-lime:hover::before { transform: translateX(120%); }

.btn-ink { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn-ink:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-glass {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--ink);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0.5px var(--lg-edge), inset 0 0 0 0.5px var(--lg-edge-2), 0 0 0 0.5px var(--line-2), 0 4px 12px -8px rgba(0, 0, 0, 0.2);
}
.btn-glass:hover { background: color-mix(in srgb, var(--surface) 80%, transparent); transform: translateY(-1px); }

.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { pointer-events: none; opacity: 0.75; }
.btn.is-busy::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.link .ico { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.link:hover .ico { transform: translateX(3px); }
.link:hover { color: var(--accent-text); }

/* ---------- шапка ---------- */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  padding: 10px var(--gutter-r) 0 var(--gutter-l);
  view-transition-name: topbar;
  pointer-events: none;
}
.topbar-inner {
  pointer-events: auto;
  max-width: 1180px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
  --lg-tint: var(--lg-tint-strong);
  --lg-drop: 0 4px 14px -10px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease);
}
.topbar.is-scrolled .topbar-inner { --lg-drop: var(--shadow-lg); }

.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; flex: none; }
.brand .logo-svg { height: 27px; width: auto; display: block; }

.topnav { display: flex; gap: 2px; margin-left: auto; }
.topnav a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.topnav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.topnav a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 80%, var(--bg)), var(--ink) 70%);
  color: var(--bg);
  font: 650 15px/1 var(--font-body);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 6px 16px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--spring), box-shadow 0.25s ease;
}
.menu-btn:hover { transform: translateY(-1px); }
.menu-btn:active { transform: scale(0.96); }
.burger { position: relative; width: 18px; height: 12px; display: inline-block; }
.burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
.burger i:nth-child(1) { top: 1px; }
.burger i:nth-child(2) { top: 9px; right: 5px; }
.menu-btn:hover .burger i:nth-child(2) { right: 0; }

.topbar-cta { margin-left: 4px; }
.topnav + .topbar-cta { margin-left: 6px; }

@media (max-width: 920px) {
  .topnav { display: none; }
  .topbar-cta { margin-left: auto; }
}
/* на узком ноутбуке ссылки не помещаются в одну строку: всё есть в меню */
@media (max-width: 1240px) { .topnav a { padding: 9px 10px; } }
@media (max-width: 1100px) { .topnav { display: none; } .topbar-inner .topnav + * { margin-left: auto; } }
@media (max-width: 520px) {
  .topbar-inner { min-height: 54px; padding: 6px 6px 6px 16px; }
  .brand .logo-svg { height: 23px; }
  .topbar-cta { display: none; }
  .menu-btn { margin-left: auto; height: 42px; }
}

/* ---------- меню: стеклянная панель из кнопки «Меню», на телефоне — шторка снизу ---------- */

.menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gutter-r) 16px var(--gutter-l);
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden auto;
  overscroll-behavior: contain;
}
.menu[open] { display: block; }
.menu::backdrop {
  background: rgba(236, 242, 232, 0.34);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
  backdrop-filter: blur(6px) saturate(130%);
  opacity: 0;
}
:root[data-theme="dark"] .menu::backdrop { background: rgba(2, 8, 5, 0.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu::backdrop { background: rgba(2, 8, 5, 0.5); } }
.menu[open]::backdrop { opacity: 1; animation: backdrop-in 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both; }
.menu.is-closing::backdrop { animation: backdrop-out 0.3s ease forwards; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }

.sheet {
  width: min(500px, 100%);
  margin-left: auto;
  margin-right: max(0px, calc((100% - 1180px) / 2));
  padding: 12px;
  display: grid;
  gap: 12px;
  border-radius: 32px;
  outline: none;
  --lg-tint: var(--lg-tint-strong);
  transform-origin: calc(100% - 44px) 28px;
  animation: sheet-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.menu.is-closing .sheet { animation: sheet-out 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards; }
/* плавно: без «пружины» и резкого сжатия — лёгкий зум из угла кнопки «Меню» */
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px) scale(0.94); } 45% { opacity: 1; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(-4px) scale(0.96); } }
.sheet-grab { display: none; }

.sheet-head { display: flex; align-items: center; gap: 12px; padding: 2px 2px 2px 6px; }
.sheet-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.sheet-zubrik { width: 46px; flex: none; }
.sheet-mascot { display: block; }
.sheet-mascot[hidden] { display: none; }
.sheet-mascot.is-pop { animation: menu-mascot 0.5s var(--spring); }
@keyframes menu-mascot { from { opacity: 0; transform: translateY(10px) scale(0.6) rotate(-10deg); } }
.sheet-zubrik .zubrik { width: 46px; display: block; }
.sheet-brand b { display: block; font: 800 17px/1.15 var(--font-display); letter-spacing: -0.02em; }
.sheet-brand small { display: block; font-size: 13px; color: var(--ink-2); }

.lg-round {
  margin-left: auto;
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--lg-fill);
  box-shadow: inset 0 1px 0.5px var(--lg-edge), inset 0 0 0 0.5px var(--lg-edge-2), 0 0 0 0.5px var(--lg-line);
  cursor: pointer;
  transition: transform 0.45s var(--spring), background-color 0.2s ease;
}
.lg-round:hover { background: var(--lg-fill-hover); transform: rotate(90deg); }
.lg-round:active { transform: scale(0.9); }
.lg-round .ico { width: 18px; height: 18px; }

.sheet-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  border-radius: 22px;
  background: var(--lg-fill);
  box-shadow: inset 0 1px 0.5px var(--lg-edge-2), inset 0 0 0 0.5px var(--lg-edge-2);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s ease;
  animation: tile-in 0.45s var(--ease) 0.04s backwards;
}
.sheet-user:hover, .sheet-user[aria-current="page"] { background: var(--lg-fill-hover); }
.sheet-user-text { min-width: 0; flex: 1; }
.sheet-user b { display: block; font: 650 15.5px/1.2 var(--font-body); }
.sheet-user small { display: block; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-pill { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--lime-soft); color: var(--accent-text); font: 650 12.5px/1 var(--font-body); white-space: nowrap; }

.sheet-section { display: grid; gap: 8px; }
.sheet-label { margin: 2px 8px 0; font: 650 12.5px/1.2 var(--font-body); letter-spacing: 0.01em; color: var(--ink-3); }
.mtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mtile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  border-radius: 20px;
  background: var(--lg-fill);
  box-shadow: inset 0 1px 0.5px var(--lg-edge-2), inset 0 0 0 0.5px var(--lg-edge-2);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.4s var(--spring), box-shadow 0.25s ease;
  animation: tile-in 0.5s var(--ease) backwards;
  animation-delay: calc(0.05s + var(--i, 0) * 0.025s);
}
@keyframes tile-in { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
.mtile:hover { background: var(--lg-fill-hover); transform: translateY(-1px); box-shadow: inset 0 1px 0.5px var(--lg-edge), inset 0 0 0 0.5px var(--lg-edge-2), 0 8px 18px -12px rgba(0, 0, 0, 0.3); }
.mtile:active { transform: scale(0.97); transition-duration: 0.1s; }
.mtile-ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--lg-chip);
  color: var(--ink);
  transition: transform 0.5s var(--spring), background-color 0.2s ease;
}
.mtile-ico .ico { width: 21px; height: 21px; }
.mtile:hover .mtile-ico { transform: scale(1.08) rotate(-6deg); }
.mtile-text { min-width: 0; }
.mtile b { display: block; font: 650 15px/1.2 var(--font-body); letter-spacing: -0.01em; }
.mtile small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtile[aria-current="page"] { background: var(--lg-fill-hover); box-shadow: inset 0 1px 0.5px var(--lg-edge), 0 0 0 0.5px var(--lg-line), 0 8px 18px -12px rgba(0, 0, 0, 0.3); }
.mtile[aria-current="page"] .mtile-ico { background: var(--lime); color: var(--lime-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 14px -6px rgba(130, 160, 10, 0.8); }
.mtile[aria-current="page"] b { color: var(--accent-text); }

.sheet-quick { display: flex; gap: 6px; flex-wrap: wrap; animation: tile-in 0.45s var(--ease) 0.03s backwards; }
.sheet-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px; background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-edge-2); color: var(--ink); text-decoration: none; font: 600 14px/1 var(--font-body); transition: background-color 0.2s ease, transform 0.35s var(--spring); }
.sheet-chip .ico { width: 16px; height: 16px; color: var(--ink-2); }
.sheet-chip:hover { background: var(--lg-fill-hover); }
.sheet-chip:active { transform: scale(0.95); }
.sheet-chip[aria-current="page"] { background: var(--ink); color: var(--bg); }
.sheet-chip[aria-current="page"] .ico { color: inherit; }

/* Предметы: переключатель с жидким бегунком, под ним — разделы выбранного предмета */
.subj-tabs { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 24px; background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-edge-2); animation: tile-in 0.45s var(--ease) 0.06s backwards; }
.subj-tab { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px 7px 7px; border: 0; border-radius: 20px; background: transparent; color: var(--ink-2); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: color 0.25s ease, transform 0.35s var(--spring); }
.subj-tab:active { transform: scale(0.97); }
.subj-tab[aria-selected="true"] { color: var(--ink); }
.subj-tabs:not(.has-thumb) .subj-tab[aria-selected="true"] { background: var(--lg-thumb); }
.subj-tabs .lg-thumb { border-radius: 20px; }
.subj-name { min-width: 0; }
.subj-name b { display: block; font: 700 14px/1.2 var(--font-body); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subj-name small { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subj-badge { flex: none; width: 32px; height: 32px; display: block; overflow: hidden; border-radius: 11px; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15), 0 4px 10px -6px rgba(0, 0, 0, 0.5); transition: transform 0.45s var(--spring); }
.subj-badge svg { display: block; width: 100%; height: 100%; }
.subj-tab[aria-selected="true"] .subj-badge { transform: rotate(-6deg) scale(1.06); }
.subj-soon { color: var(--ink-3); }
.subj-soon:hover { color: var(--ink); }
.subj-glyphs { flex: none; display: grid; gap: 2px; }
.subj-glyphs i { display: block; padding: 1px 5px; border-radius: 6px; background: var(--lg-chip); font: 700 10.5px/1.3 var(--font-body); font-style: normal; color: var(--ink-2); text-align: center; }
.subj-panel { margin-top: 2px; }
.js .subj-panel[data-off] { display: none; }
.subj-panel.is-in .mtile { animation: tile-in 0.4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 0.03s); }
.mtiles > .mtile:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 440px) {
  .subj-tab { flex-direction: column; gap: 4px; padding: 8px 4px 6px; text-align: center; }
  .subj-name b { font-size: 12.5px; }
}

.sheet-cta { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; animation: tile-in 0.5s var(--ease) 0.3s backwards; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 2px; animation: tile-in 0.5s var(--ease) 0.34s backwards; }
.sheet-foot form { margin: 0; }
.sheet-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 600 14px/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.sheet-logout:hover { background: var(--lg-fill); color: var(--red); }
.sheet-logout .ico, .sheet-note .ico { width: 17px; height: 17px; }
.sheet-note { display: inline-flex; align-items: center; gap: 6px; padding-right: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sheet-note .ico { color: var(--ok); }

/* Телефон: шторка снизу, её можно смахнуть вниз */
@media (max-width: 640px) {
  .menu { padding: 0; overflow: hidden; }
  .menu[open] { display: flex; flex-direction: column; justify-content: flex-end; }
  .sheet {
    width: 100%;
    max-height: calc(100dvh - 24px);
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 14px calc(env(safe-area-inset-bottom, 0px) + 16px);
    border-radius: 30px 30px 0 0;
    transform-origin: 50% 100%;
    animation: sheet-up 0.55s cubic-bezier(0.32, 0.72, 0, 1) backwards;
    touch-action: pan-y;
  }
  .menu.is-closing .sheet { animation: sheet-down 0.32s cubic-bezier(0.32, 0, 0.67, 0) forwards; }
  .sheet.is-dragging { transition: none; }
  .sheet-grab { display: block; width: 40px; height: 5px; margin: 0 auto -2px; border-radius: 3px; background: var(--line-2); }
  .sheet-head { cursor: grab; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(105%); } }
@media (max-width: 440px) {
  .mtile { gap: 10px; padding: 8px 10px 8px 8px; min-height: 56px; border-radius: 18px; }
  .mtile-ico { width: 36px; height: 36px; border-radius: 12px; }
  .mtile-ico .ico { width: 19px; height: 19px; }
  .mtile b { font-size: 14.5px; }
  .mtile small { display: none; }
  .sheet-cta { grid-template-columns: minmax(0, 1fr) auto; }
  .sheet-cta .btn-glass { padding-inline: 24px; }
}

/* ---------- нижняя панель на телефоне (для учеников) ---------- */

.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar {
    position: fixed;
    z-index: 45;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    width: min(440px, calc(100% - 24px));
    display: flex;
    gap: 2px;
    padding: 6px;
    border-radius: 999px;
    transform: translateX(-50%);
    --lg-tint: var(--lg-tint-strong);
    view-transition-name: tabbar;
    animation: tabbar-in 0.6s cubic-bezier(0.22, 1.25, 0.36, 1) 0.1s backwards;
  }
  @keyframes tabbar-in { from { opacity: 0; transform: translate(-50%, 30px) scale(0.9); } }
  body:has(.tabbar) .site-footer { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
  body:has(.tabbar) .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 90px); }
}
.tab {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 7px 2px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 600 11px/1.1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.35s var(--spring);
}
.tab .ico { width: 22px; height: 22px; transition: transform 0.45s var(--spring); }
.tab:active .ico { transform: scale(0.85); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .ico { color: var(--accent-text); }
.tabbar:not(.has-thumb) .tab[aria-current="page"] { background: var(--lg-thumb); }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- сегменты (переключатели) ---------- */

.segmented { position: relative; display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background-color 0.25s ease, color 0.2s ease, box-shadow 0.25s ease; white-space: nowrap; }
.segmented span:hover { color: var(--ink); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 4px 12px -6px rgba(0, 0, 0, 0.25); }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.segmented-sm span { padding: 6px 12px; font-size: 13.5px; }
.segmented-ico { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented-ico span { display: flex; align-items: center; justify-content: center; gap: 6px; }
.segmented-ico .ico { width: 15px; height: 15px; }
/* Жидкий «бегунок»: перетекает к выбранному пункту и чуть сплющивается в пути */
.segmented.has-thumb input:checked + span { background: transparent; box-shadow: none; color: var(--ink); }
.segmented label { z-index: 1; }
.lg-thumb {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: var(--w, 0);
  height: var(--h, 0);
  border-radius: 999px;
  background: var(--lg-thumb);
  box-shadow: inset 0 1px 0.5px var(--lg-edge), inset 0 0 0 0.5px var(--lg-edge-2), 0 0 0 0.5px var(--lg-line), 0 3px 10px -3px rgba(0, 0, 0, 0.22);
  transform: translate(var(--x, 0), var(--y, 0));
  transition: transform 0.55s var(--spring), width 0.55s var(--spring), height 0.55s var(--spring), opacity 0.2s ease;
  pointer-events: none;
}
.lg-thumb.no-anim { transition: none; }
.lg-thumb.is-moving { animation: thumb-squish 0.55s var(--ease); }
@keyframes thumb-squish { 35% { scale: 1.14 0.8; } 70% { scale: 0.97 1.04; } }


/* ---------- подвал ---------- */

.site-footer { margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)); gap: 32px; padding-block: 44px 28px; }
.foot-grid .logo-svg { height: 26px; width: auto; display: block; color: var(--ink); }
.foot-grid h4 { font: 650 14px/1.4 var(--font-body); color: var(--ink-3); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid ul a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.foot-grid ul a:hover { color: var(--ink); }
.foot-slogan { margin: 14px 0 0; font: 700 18px/1.3 var(--font-display); letter-spacing: -0.01em; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 18px 34px; border-top: 1px solid var(--line); }
.foot-bottom p { margin: 0; max-width: 64ch; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Зубрик ---------- */

.zubrik { display: block; width: 100%; height: auto; overflow: visible; }
.zubrik g, .zubrik path, .zubrik ellipse, .zubrik circle, .zubrik text { transform-box: view-box; }
.zubrik .zb-all { transform-origin: 120px 270px; animation: zb-breathe 4.8s ease-in-out infinite; }
.zubrik .zb-head { transform-origin: 120px 192px; transition: transform 0.5s var(--spring); }
.zubrik .zb-eye { transform-box: fill-box; transform-origin: center; animation: zb-blink 5.4s infinite; }
.zubrik .zb-eye + .zb-eye { animation-delay: 0.03s; }
.zubrik .zb-look { transition: transform 0.25s var(--ease); }
.zubrik .zb-brow { transform-box: fill-box; transform-origin: center; transition: transform 0.4s var(--spring); }
.zubrik .zb-ear-l { transform-origin: 72px 112px; animation: zb-ear-l 7s ease-in-out infinite; transition: transform 0.4s var(--spring); }
.zubrik .zb-ear-r { transform-origin: 168px 112px; animation: zb-ear-r 8.5s ease-in-out 1.5s infinite; transition: transform 0.4s var(--spring); }
.zubrik .zb-pencil { transform-origin: 172px 112px; transition: transform 0.5s var(--spring); }
.zubrik .zb-scarf-tail { transform-origin: 86px 202px; animation: zb-tail 3.6s ease-in-out infinite; }
.zubrik .zb-arm { transform: rotate(30deg) scale(0.2); opacity: 0; transition: transform 0.5s var(--spring), opacity 0.3s ease; }
.zubrik .zb-arm-r { transform-origin: 178px 232px; }
.zubrik .zb-arm-l { transform-origin: 62px 232px; transform: rotate(-30deg) scale(0.2); }
.zubrik .zb-mane { transform-box: fill-box; transform-origin: 50% 10%; animation: zb-mane 4.8s ease-in-out infinite; }
.zubrik .zb-puff { transform-box: fill-box; opacity: 0; }
.zubrik .zb-puff-l { transform-origin: 100% 0; animation: zb-puff-l 7s ease-out 2s infinite; }
.zubrik .zb-puff-r { transform-origin: 0 0; animation: zb-puff-r 7s ease-out 2s infinite; }
.zubrik .zb-m, .zubrik .zb-lid, .zubrik .zb-happy, .zubrik .zb-fx > * { opacity: 0; transition: opacity 0.2s ease; }
.zubrik .zb-m-smile { opacity: 1; }
.zubrik .zb-eyes { transition: opacity 0.2s ease; }
.zubrik .zb-blush { transition: opacity 0.3s ease; }
.zubrik:hover .zb-head { transform: rotate(-4deg); }
.zubrik:hover .zb-pencil { transform: rotate(-7deg); }

/* радость: глаза-дуги, открытый рот, подпрыгивает */
.zubrik[data-mood="happy"] .zb-eyes, .zubrik[data-mood="proud"] .zb-eyes { opacity: 0; }
.zubrik[data-mood="happy"] .zb-happy, .zubrik[data-mood="proud"] .zb-happy { opacity: 1; }
.zubrik[data-mood="happy"] .zb-m-smile, .zubrik[data-mood="proud"] .zb-m-smile,
.zubrik[data-mood="wave"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="happy"] .zb-m-open, .zubrik[data-mood="proud"] .zb-m-open, .zubrik[data-mood="wave"] .zb-m-open { opacity: 1; }
.zubrik[data-mood="happy"] .zb-blush, .zubrik[data-mood="proud"] .zb-blush { opacity: 0.85; }
.zubrik[data-mood="happy"] .zb-all { animation: zb-hop 0.7s var(--spring) 1, zb-breathe 4.8s ease-in-out 0.7s infinite; }
.zubrik[data-mood="happy"] .zb-brow, .zubrik[data-mood="proud"] .zb-brow { transform: translateY(-3px); }
/* гордость: звёздочки и наклон головы */
.zubrik[data-mood="proud"] .zb-stars { opacity: 1; }
.zubrik[data-mood="proud"] .zb-stars path { transform-box: fill-box; transform-origin: center; animation: zb-twinkle 1.6s ease-in-out infinite; }
.zubrik[data-mood="proud"] .zb-stars path:nth-child(2) { animation-delay: 0.4s; }
.zubrik[data-mood="proud"] .zb-stars path:nth-child(3) { animation-delay: 0.8s; }
.zubrik[data-mood="proud"] .zb-head { transform: rotate(5deg); }
.zubrik[data-mood="proud"] .zb-arm-r { opacity: 1; transform: rotate(0deg); }
/* удивление */
.zubrik[data-mood="surprised"] .zb-eye { animation: none; transform: scale(1.14); }
.zubrik[data-mood="surprised"] .zb-brow { transform: translateY(-7px); }
.zubrik[data-mood="surprised"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="surprised"] .zb-m-o { opacity: 1; }
.zubrik[data-mood="surprised"] .zb-ear-l { animation: none; transform: rotate(-14deg); }
.zubrik[data-mood="surprised"] .zb-ear-r { animation: none; transform: rotate(14deg); }
.zubrik[data-mood="surprised"] .zb-all { animation: zb-jolt 0.45s var(--spring) 1, zb-breathe 4.8s ease-in-out 0.45s infinite; }
/* задумчивость */
.zubrik[data-mood="thinking"] .zb-brow-l { transform: translateY(-5px) rotate(-8deg); }
.zubrik[data-mood="thinking"] .zb-brow-r { transform: translateY(-1px) rotate(9deg); }
.zubrik[data-mood="thinking"] .zb-look { transform: translate(3px, -3.5px) !important; }
.zubrik[data-mood="thinking"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="thinking"] .zb-m-flat { opacity: 1; }
.zubrik[data-mood="thinking"] .zb-head { transform: rotate(-6deg); }
.zubrik[data-mood="thinking"] .zb-drop { opacity: 1; animation: zb-drop 2.4s ease-in infinite; }
/* сочувствие: брови домиком, уши опущены */
.zubrik[data-mood="sad"] .zb-brow-l { transform: translateY(-2px) rotate(12deg); }
.zubrik[data-mood="sad"] .zb-brow-r { transform: translateY(-2px) rotate(-12deg); }
.zubrik[data-mood="sad"] .zb-look { transform: translate(0, 3px) !important; }
.zubrik[data-mood="sad"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="sad"] .zb-m-sad { opacity: 1; }
.zubrik[data-mood="sad"] .zb-ear-l { animation: none; transform: rotate(22deg); }
.zubrik[data-mood="sad"] .zb-ear-r { animation: none; transform: rotate(-22deg); }
.zubrik[data-mood="sad"] .zb-blush { opacity: 0.25; }
/* сон: полуприкрытые веки и «z z z» */
.zubrik[data-mood="sleepy"] .zb-lid { opacity: 1; }
.zubrik[data-mood="sleepy"] .zb-eye { animation: none; }
.zubrik[data-mood="sleepy"] .zb-look { transform: translate(0, 2px) !important; }
.zubrik[data-mood="sleepy"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="sleepy"] .zb-m-o { opacity: 1; transform-box: fill-box; transform-origin: center; animation: zb-snore 3s ease-in-out infinite; }
.zubrik[data-mood="sleepy"] .zb-zzz { opacity: 1; }
.zubrik[data-mood="sleepy"] .zb-zzz text { animation: zb-z 3s ease-in-out infinite; }
.zubrik[data-mood="sleepy"] .zb-zzz text:nth-child(2) { animation-delay: 0.5s; }
.zubrik[data-mood="sleepy"] .zb-zzz text:nth-child(3) { animation-delay: 1s; }
.zubrik[data-mood="sleepy"] .zb-head { animation: zb-nod 3s ease-in-out infinite; }
/* привет: машет копытом */
.zubrik[data-mood="wave"] .zb-arm-r { opacity: 1; animation: zb-wave 2.2s ease-in-out 1 forwards; }
.zubrik[data-mood="wave"] .zb-brow { transform: translateY(-3px); }

/* 6-7: обе руки вверх и по очереди вверх-вниз, как в меме */
.zubrik[data-mood="dance"] .zb-arm { opacity: 1; }
.zubrik[data-mood="dance"] .zb-arm-r { animation: zb-67-r 0.9s ease-in-out infinite; }
.zubrik[data-mood="dance"] .zb-arm-l { animation: zb-67-l 0.9s ease-in-out infinite; }
.zubrik[data-mood="dance"] .zb-all { animation: zb-sway 0.9s ease-in-out infinite; }
.zubrik[data-mood="dance"] .zb-eyes { opacity: 0; }
.zubrik[data-mood="dance"] .zb-happy { opacity: 1; }
.zubrik[data-mood="dance"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="dance"] .zb-m-open { opacity: 1; }
.zubrik[data-mood="dance"] .zb-notes { opacity: 1; }
.zubrik[data-mood="dance"] .zb-notes text { transform-box: fill-box; transform-origin: center; animation: zb-67-n 0.9s ease-in-out infinite; }
.zubrik[data-mood="dance"] .zb-notes text + text { animation-delay: -0.45s; }
/* кружится от щекотки */
.zubrik.is-spin .zb-all { animation: zb-spin 0.9s var(--ease) 1 !important; transform-origin: 120px 150px; }

@keyframes zb-67-r { 0%, 100% { transform: rotate(-4deg) translateY(-14px); } 50% { transform: rotate(10deg) translateY(10px); } }
@keyframes zb-67-l { 0%, 100% { transform: rotate(-10deg) translateY(10px); } 50% { transform: rotate(4deg) translateY(-14px); } }
@keyframes zb-67-n { 0%, 100% { transform: translateY(-6px) scale(1.1); } 50% { transform: translateY(6px) scale(0.9); } }
@keyframes zb-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes zb-spin { to { transform: rotate(360deg); } }
@keyframes zb-mane { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(1.4deg) translateY(-0.6px); } }
@keyframes zb-puff-l { 0%, 84% { opacity: 0; transform: translate(0, 0) scale(0.3); } 88% { opacity: 0.9; } 100% { opacity: 0; transform: translate(-14px, 8px) scale(1.4); } }
@keyframes zb-puff-r { 0%, 84% { opacity: 0; transform: translate(0, 0) scale(0.3); } 88% { opacity: 0.9; } 100% { opacity: 0; transform: translate(14px, 8px) scale(1.4); } }
@keyframes zb-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2.5px) scale(1.01); } }
@keyframes zb-blink { 0%, 92%, 100% { transform: scaleY(1); } 94% { transform: scaleY(0.08); } 96% { transform: scaleY(1); } }
@keyframes zb-ear-l { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(-16deg); } 92% { transform: rotate(5deg); } 95% { transform: rotate(-6deg); } }
@keyframes zb-ear-r { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(16deg); } 94% { transform: rotate(-5deg); } }
@keyframes zb-tail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(5deg); } }
@keyframes zb-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-16px) rotate(-2deg); } 70% { transform: translateY(2px); } 100% { transform: translateY(0); } }
@keyframes zb-jolt { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-6px) scale(1.04); } 100% { transform: translateY(0) scale(1); } }
@keyframes zb-twinkle { 0%, 100% { transform: scale(0.6) rotate(0); opacity: 0.6; } 50% { transform: scale(1.15) rotate(20deg); opacity: 1; } }
@keyframes zb-drop { 0% { transform: translateY(-4px); opacity: 0; } 20% { opacity: 1; } 80% { transform: translateY(10px); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes zb-snore { 0%, 100% { transform: scale(0.7); } 50% { transform: scale(1.1); } }
@keyframes zb-z { 0% { transform: translate(0, 6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(6px, -14px); opacity: 0; } }
@keyframes zb-nod { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(4deg) translateY(3px); } }
@keyframes zb-wave {
  0% { transform: rotate(30deg) scale(0.2); opacity: 0; }
  6% { opacity: 1; }
  14% { transform: rotate(-6deg) scale(1); opacity: 1; }
  28% { transform: rotate(14deg); }
  42% { transform: rotate(-10deg); }
  56% { transform: rotate(14deg); }
  70% { transform: rotate(-4deg); }
  86% { transform: rotate(0deg) scale(1); opacity: 1; }
  96% { opacity: 1; }
  100% { transform: rotate(30deg) scale(0.2); opacity: 0; }
}
@media (pointer: coarse) {
  .zubrik[data-mood="neutral"] .zb-look { animation: zb-look 8s ease-in-out infinite; }
}
@keyframes zb-look { 0%, 20%, 100% { transform: translate(0, 0); } 30%, 45% { transform: translate(-3px, 1px); } 55%, 70% { transform: translate(3px, -1px); } }

/* ---------- Зубрик v4: новые настроения ---------- */
.zubrik .zb-x { opacity: 0; transition: opacity 0.25s ease; }
.zubrik .zb-front > *, .zubrik .zb-hearts { pointer-events: none; }

/* ура: обе руки вверх, прыгает, звёзды */
.zubrik[data-mood="cheer"] .zb-arm { opacity: 1; }
.zubrik[data-mood="cheer"] .zb-arm-r { animation: zb-pump-r 0.32s ease-in-out infinite alternate; }
.zubrik[data-mood="cheer"] .zb-arm-l { animation: zb-pump-l 0.32s ease-in-out infinite alternate; }
.zubrik[data-mood="cheer"] .zb-all { animation: zb-hop 0.64s var(--spring) 3, zb-breathe 4.8s ease-in-out 1.9s infinite; }
.zubrik[data-mood="cheer"] .zb-eyes, .zubrik[data-mood="love"] .zb-eyes, .zubrik[data-mood="tea"] .zb-eyes { opacity: 0; }
.zubrik[data-mood="cheer"] .zb-happy, .zubrik[data-mood="tea"] .zb-happy { opacity: 1; }
.zubrik[data-mood="cheer"] .zb-m-smile, .zubrik[data-mood="love"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="cheer"] .zb-m-open, .zubrik[data-mood="love"] .zb-m-open { opacity: 1; }
.zubrik[data-mood="cheer"] .zb-blush, .zubrik[data-mood="love"] .zb-blush, .zubrik[data-mood="tea"] .zb-blush { opacity: 0.9; }
.zubrik[data-mood="cheer"] .zb-brow { transform: translateY(-5px); }
.zubrik[data-mood="cheer"] .zb-stars { opacity: 1; }
.zubrik[data-mood="cheer"] .zb-stars path { transform-box: fill-box; transform-origin: center; animation: zb-twinkle 0.8s ease-in-out infinite; }
.zubrik[data-mood="cheer"] .zb-stars path:nth-child(2) { animation-delay: 0.25s; }
.zubrik[data-mood="cheer"] .zb-stars path:nth-child(3) { animation-delay: 0.5s; }
@keyframes zb-pump-r { from { transform: rotate(-8deg) translateY(-8px); } to { transform: rotate(6deg) translateY(4px); } }
@keyframes zb-pump-l { from { transform: rotate(8deg) translateY(-8px); } to { transform: rotate(-6deg) translateY(4px); } }

/* ой: копыто к лицу, капля пота */
.zubrik[data-mood="oops"] .zb-facepalm { opacity: 1; transform-origin: 168px 244px; animation: zb-palm 0.5s var(--spring) both; }
.zubrik[data-mood="oops"] .zb-m-smile, .zubrik[data-mood="read"] .zb-m-smile, .zubrik[data-mood="write"] .zb-m-smile,
.zubrik[data-mood="no"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="oops"] .zb-m-sad, .zubrik[data-mood="read"] .zb-m-flat, .zubrik[data-mood="write"] .zb-m-flat,
.zubrik[data-mood="no"] .zb-m-flat { opacity: 1; }
.zubrik[data-mood="oops"] .zb-brow-l { transform: translateY(-3px) rotate(14deg); }
.zubrik[data-mood="oops"] .zb-ear-l { animation: none; transform: rotate(20deg); }
.zubrik[data-mood="oops"] .zb-ear-r { animation: none; transform: rotate(-20deg); }
.zubrik[data-mood="oops"] .zb-drop { opacity: 1; animation: zb-drop 1.8s ease-in infinite; }
.zubrik[data-mood="oops"] .zb-head { animation: zb-sigh 2.6s ease-in-out infinite; }
@keyframes zb-palm { from { transform: translateY(46px) rotate(10deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes zb-sigh { 0%, 100% { transform: rotate(0) translateY(0); } 40% { transform: rotate(-3deg) translateY(3px); } 60% { transform: rotate(2deg) translateY(3px); } }

/* читает: книга в копытах, глаза бегают по строчкам, страница переворачивается */
.zubrik[data-mood="read"] .zb-book, .zubrik[data-mood="write"] .zb-book { opacity: 1; }
.zubrik[data-mood="read"] .zb-look { animation: zb-scan 2.6s ease-in-out infinite; }
.zubrik[data-mood="read"] .zb-head, .zubrik[data-mood="write"] .zb-head { transform: translateY(3px) rotate(-2deg); }
.zubrik[data-mood="read"] .zb-page { transform-origin: 120px 230px; animation: zb-flip 5.2s ease-in-out infinite; }
.zubrik[data-mood="read"] .zb-brow, .zubrik[data-mood="write"] .zb-brow { transform: translateY(2px); }
@keyframes zb-scan { 0%, 100% { transform: translate(-3px, 4px); } 40% { transform: translate(3px, 4px); } 48% { transform: translate(3px, 4.5px); } 56% { transform: translate(-3px, 5px); } }
@keyframes zb-flip { 0%, 72% { transform: scaleX(1); opacity: 1; } 86% { transform: scaleX(0.02); opacity: 1; } 99% { transform: scaleX(-1); opacity: 1; } 100% { transform: scaleX(-1); opacity: 0; } }

/* пишет: карандаш бегает по странице, язык от усердия */
.zubrik[data-mood="write"] .zb-pen, .zubrik[data-mood="write"] .zb-tongue { opacity: 1; }
.zubrik[data-mood="write"] .zb-pencil { opacity: 0; }
.zubrik[data-mood="write"] .zb-pen { animation: zb-scribble 0.9s ease-in-out infinite; }
.zubrik[data-mood="write"] .zb-look { animation: none; transform: translate(2px, 4.5px) !important; }
.zubrik[data-mood="write"] .zb-tongue { transform-box: fill-box; transform-origin: 0 0; animation: zb-tongue 0.9s ease-in-out infinite; }
@keyframes zb-scribble { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(4px, -2px); } 30% { transform: translate(8px, 1px); } 45% { transform: translate(12px, -1px); } 60% { transform: translate(4px, 7px); } 75% { transform: translate(8px, 5px); } 90% { transform: translate(12px, 7px); } }
@keyframes zb-tongue { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }

/* любовь: глаза-сердечки, сердечки вокруг */
.zubrik[data-mood="love"] .zb-hearteyes { opacity: 1; }
.zubrik[data-mood="love"] .zb-heart { transform-box: fill-box; transform-origin: center; animation: zb-beat 0.7s ease-in-out infinite; }
.zubrik[data-mood="love"] .zb-hearts { opacity: 1; }
.zubrik[data-mood="love"] .zb-hearts path { transform-box: fill-box; transform-origin: center; animation: zb-float 1.8s ease-out infinite; }
.zubrik[data-mood="love"] .zb-hearts path:nth-child(2) { animation-delay: 0.6s; }
.zubrik[data-mood="love"] .zb-hearts path:nth-child(3) { animation-delay: 1.2s; }
.zubrik[data-mood="love"] .zb-head { animation: zb-swoon 1.6s ease-in-out infinite; }
@keyframes zb-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.25); } 60% { transform: scale(0.95); } }
@keyframes zb-float { 0% { transform: translateY(8px) scale(0.4); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-26px) scale(1.1); opacity: 0; } }
@keyframes zb-swoon { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* крутой: очки съезжают на нос, блик по стёклам, качает головой в такт */
.zubrik[data-mood="cool"] .zb-shades { opacity: 1; animation: zb-shades 0.7s var(--spring) both; }
.zubrik[data-mood="cool"] .zb-glint { animation: zb-glint 2.8s ease-in-out 0.7s infinite; }
.zubrik[data-mood="cool"] .zb-brow { transform: translateY(-5px); }
.zubrik[data-mood="cool"] .zb-head { animation: zb-groove 1.1s ease-in-out 0.7s infinite; }
.zubrik[data-mood="cool"] .zb-arm-r { opacity: 1; transform: rotate(0deg); }
@keyframes zb-shades { from { transform: translateY(-60px) rotate(-12deg); opacity: 0; } 50% { opacity: 1; } }
@keyframes zb-glint { 0%, 70%, 100% { opacity: 0.85; transform: translateX(0); } 80% { opacity: 0; transform: translateX(10px); } 90% { opacity: 0; transform: translateX(-6px); } }
@keyframes zb-groove { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(3deg) translateY(2px); } }

/* нет-нет: мотает головой */
.zubrik[data-mood="no"] .zb-head { animation: zb-shake 0.8s ease-in-out 2; }
.zubrik[data-mood="no"] .zb-brow-l { transform: translateY(1px) rotate(12deg); }
.zubrik[data-mood="no"] .zb-brow-r { transform: translateY(1px) rotate(-12deg); }
.zubrik[data-mood="no"] .zb-puff { animation: zb-snort-l 0.9s ease-out 1; }
.zubrik[data-mood="no"] .zb-puff-r { animation-name: zb-snort-r; }
@keyframes zb-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 45% { transform: rotate(8deg); } 70% { transform: rotate(-5deg); } 88% { transform: rotate(3deg); } }

/* чай: кружка, пар, довольные глаза */
.zubrik[data-mood="tea"] .zb-cup { opacity: 1; }
.zubrik[data-mood="tea"] .zb-steam path { transform-box: fill-box; transform-origin: center bottom; animation: zb-steam 2.4s ease-in-out infinite; }
.zubrik[data-mood="tea"] .zb-steam path:nth-child(2) { animation-delay: 0.8s; }
.zubrik[data-mood="tea"] .zb-steam path:nth-child(3) { animation-delay: 1.6s; }
.zubrik[data-mood="tea"] .zb-head { transform: rotate(-4deg); }
@keyframes zb-steam { 0% { transform: translateY(6px) scaleY(0.6); opacity: 0; } 30% { opacity: 0.9; } 100% { transform: translateY(-12px) scaleY(1.1); opacity: 0; } }

/* ---------- Зубрик v4: привычки (классы на пару секунд, ставит site.js) ---------- */
.zubrik.is-chew .zb-grass { opacity: 1; transform-origin: 127px 182px; animation: zb-chew 0.5s ease-in-out infinite alternate; }
.zubrik.is-chew .zb-m-smile { opacity: 0; }
.zubrik.is-chew .zb-m-flat { opacity: 1; transform-box: fill-box; transform-origin: center; animation: zb-jaw 0.25s ease-in-out infinite alternate; }
@keyframes zb-chew { from { transform: rotate(-6deg); } to { transform: rotate(10deg) translateY(1px); } }
@keyframes zb-jaw { to { transform: translateY(1.5px) scaleX(0.85); } }

.zubrik.is-yawn .zb-lid { opacity: 1; }
.zubrik.is-yawn .zb-eye { animation: none; }
.zubrik.is-yawn .zb-m-smile { opacity: 0; }
.zubrik.is-yawn .zb-m-o { opacity: 1; transform-box: fill-box; transform-origin: center top; animation: zb-yawn 2.2s ease-in-out both; }
.zubrik.is-yawn .zb-arm { opacity: 1; animation: zb-stretch 2.2s ease-in-out both; }
.zubrik.is-yawn .zb-head { animation: zb-yawn-head 2.2s ease-in-out both; }
@keyframes zb-yawn { 0% { transform: scale(0.6); } 30%, 65% { transform: scale(1.7, 2.1); } 100% { transform: scale(0.6); } }
@keyframes zb-stretch { 0%, 100% { opacity: 0; transform: rotate(0) scale(0.3); } 20%, 75% { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes zb-yawn-head { 0%, 100% { transform: rotate(0); } 35%, 60% { transform: rotate(-5deg) translateY(-3px); } }

.zubrik.is-snort .zb-puff-l { animation: zb-snort-l 1s ease-out 1; }
.zubrik.is-snort .zb-puff-r { animation: zb-snort-r 1s ease-out 1; }
.zubrik.is-snort .zb-head { animation: zb-jolt 0.4s var(--spring) 1; }
@keyframes zb-snort-l { 0% { opacity: 0; transform: scale(0.3); } 15% { opacity: 0.95; } 100% { opacity: 0; transform: translate(-16px, 9px) scale(1.5); } }
@keyframes zb-snort-r { 0% { opacity: 0; transform: scale(0.3); } 15% { opacity: 0.95; } 100% { opacity: 0; transform: translate(16px, 9px) scale(1.5); } }

.zubrik.is-ears .zb-ear-l { animation: zb-ear-l 0.9s ease-in-out 1; animation-delay: -0.8s; }
.zubrik.is-ears .zb-ear-r { animation: zb-ear-r 0.9s ease-in-out 1; animation-delay: -0.8s; }
.zubrik.is-look .zb-look { animation: zb-look 3s ease-in-out 1; }
.zubrik.is-nod .zb-head { animation: zb-nod-quick 0.35s ease-out 1; }
@keyframes zb-nod-quick { 50% { transform: rotate(2deg) translateY(2.5px); } }
.zubrik.is-wind .zb-mane { animation: zb-flutter 0.16s linear infinite alternate; }
.zubrik.is-wind .zb-scarf-tail { animation: zb-flutter-tail 0.2s linear infinite alternate; }
.zubrik.is-wind .zb-ear-l { animation: none; transform: rotate(-18deg); }
.zubrik.is-wind .zb-ear-r { animation: none; transform: rotate(18deg); }
@keyframes zb-flutter { from { transform: rotate(-1.5deg) translateY(-1px); } to { transform: rotate(2deg) translateY(1px); } }
@keyframes zb-flutter-tail { from { transform: rotate(-6deg); } to { transform: rotate(14deg); } }

/* выглядывает из-за края подвала, держится копытами */
.zubrik.is-peek .zb-grip { opacity: 1; }
.zubrik.is-peek .zb-shadow, .zubrik.is-peek .zb-arm, .zubrik.is-peek .zb-pencil { display: none; }
.zubrik.is-peek .zb-all { animation: none; }
.foot-peek { position: absolute; top: 1px; right: max(20px, 7vw); width: 110px; height: 62px; overflow: hidden; transform: translateY(-100%); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.foot-peek .zubrik { width: 110px; transform: translateY(68px); transition: transform 0.7s var(--spring); }
.foot-peek.is-up .zubrik { transform: translateY(-7px); }
.foot-peek.is-up:active .zubrik { transform: translateY(4px); transition-duration: 0.15s; }
.site-footer { position: relative; }

/* Главный Зубрик (zubrik-home): вязаный шарф, гладится мышкой (pet), обнимает на три клика (hug), напевает (hum) */
.zubrik-home .zb-scarf-tail { transform-origin: 88px 208px; }
.zubrik-home:not(.is-peek):hover[data-mood="neutral"] .zb-head { transform: rotate(-3deg) translateY(1px); }
.zubrik-home:not(.is-peek):hover[data-mood="neutral"] .zb-blush { opacity: 0.85; }
.zubrik-home:not(.is-peek):hover[data-mood="neutral"] .zb-scarf-tail { animation-duration: 1.8s; }
.zubrik-home .zb-head { transition: transform 0.45s var(--spring); }
/* обнимашки */
.zubrik-home[data-mood="hug"] .zb-hug { opacity: 1; }
.zubrik-home[data-mood="hug"] .zb-hug > path { animation: zb-hug-in 0.5s var(--spring) both; transform-origin: 120px 240px; }
.zubrik-home[data-mood="hug"] .zb-hug-heart { transform-box: fill-box; transform-origin: 50% 90%; animation: zb-hug-heart 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both; }
.zubrik-home[data-mood="hug"] .zb-eyes, .zubrik-home[data-mood="pet"] .zb-eyes, .zubrik-home[data-mood="hum"] .zb-eyes { opacity: 0; }
.zubrik-home[data-mood="hug"] .zb-happy, .zubrik-home[data-mood="pet"] .zb-happy, .zubrik-home[data-mood="hum"] .zb-happy { opacity: 1; }
.zubrik-home[data-mood="hug"] .zb-m-smile, .zubrik-home[data-mood="pet"] .zb-m-smile { opacity: 1; }
.zubrik-home[data-mood="hug"] .zb-blush, .zubrik-home[data-mood="pet"] .zb-blush, .zubrik-home[data-mood="hum"] .zb-blush { opacity: 0.95; }
.zubrik-home[data-mood="hug"] .zb-head { animation: zb-hug-head 1.4s ease-in-out infinite; }
.zubrik-home[data-mood="hug"] .zb-all { animation: zb-squeeze 1.4s ease-in-out infinite; transform-origin: 120px 270px; }
.zubrik-home[data-mood="hug"] .zb-hearts, .zubrik-home[data-mood="pet"] .zb-hearts { opacity: 1; }
.zubrik-home[data-mood="hug"] .zb-hearts path, .zubrik-home[data-mood="pet"] .zb-hearts path { transform-box: fill-box; transform-origin: center; animation: zb-float 1.8s ease-out infinite; }
.zubrik-home[data-mood="hug"] .zb-hearts path:nth-child(2), .zubrik-home[data-mood="pet"] .zb-hearts path:nth-child(2) { animation-delay: 0.6s; }
.zubrik-home[data-mood="hug"] .zb-hearts path:nth-child(3), .zubrik-home[data-mood="pet"] .zb-hearts path:nth-child(3) { animation-delay: 1.2s; }
/* гладят по голове: жмурится и тянется к руке */
.zubrik-home[data-mood="pet"] .zb-head { transform: rotate(4deg) translate(2px, -2px); }
.zubrik-home[data-mood="pet"] .zb-ear-l { animation: none; transform: rotate(-14deg); }
.zubrik-home[data-mood="pet"] .zb-ear-r { animation: none; transform: rotate(14deg); }
/* напевает: покачивается, ноты */
.zubrik-home[data-mood="hum"] .zb-all { animation: zb-sway 1.6s ease-in-out infinite; transform-origin: 120px 270px; }
.zubrik-home[data-mood="hum"] .zb-m-smile { opacity: 0; }
.zubrik-home[data-mood="hum"] .zb-m-o { opacity: 1; }
.zubrik-home[data-mood="hum"] .zb-tune { opacity: 1; }
.zubrik-home[data-mood="hum"] .zb-tune .zb-n { animation: zb-note 2s ease-out infinite; }
.zubrik-home[data-mood="hum"] .zb-tune > g:nth-child(2) .zb-n { animation-delay: 0.6s; }
.zubrik-home[data-mood="hum"] .zb-tune > g:nth-child(3) .zb-n { animation-delay: 1.2s; }
@keyframes zb-note { 0% { opacity: 0; transform: translateY(8px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -22px); } }
html[data-theme="dark"] .zubrik-home .zb-tune { fill: #D4F54C; }
html[data-theme="dark"] .zubrik-home .zb-tune path { stroke: #D4F54C; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .zubrik-home .zb-tune { fill: #D4F54C; } html:not([data-theme="light"]) .zubrik-home .zb-tune path { stroke: #D4F54C; } }
.zubrik-home[data-mood="hum"] .zb-scarf-tail { animation: zb-tail 1.6s ease-in-out infinite; }
@keyframes zb-hug-in { from { transform: scale(0.85) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes zb-hug-heart { 0% { transform: scale(0); opacity: 0; } 18% { transform: scale(1.25); opacity: 1; } 30% { transform: scale(1); } 45% { transform: scale(1.12); } 60% { transform: scale(1) translateY(0); opacity: 1; } 100% { transform: scale(0.8) translateY(-70px); opacity: 0; } }
@keyframes zb-hug-head { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(3deg) translateY(1px); } }
@keyframes zb-squeeze { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03, 0.98); } }
@media (prefers-reduced-motion: reduce) { .zubrik-home[data-mood] * { animation: none !important; } }

/* Зубрик-математик: голубая рубашка, лаймовый жилет с ромбами из знаков, бабочка, круглые очки */
.zubrik-math .zb-torso { fill: #DCE9F7; stroke: #A9BED8; stroke-width: 1.5; }
.zubrik-math .zb-arm > path:first-child, .zubrik-math .zb-facepalm > path:first-child,
.zubrik-math .zb-book > path:first-child, .zubrik-math .zb-cup > path:first-child { fill: #DCE9F7; stroke: #A9BED8; stroke-width: 1.5; }
.zubrik-math .zb-arm > path:nth-child(2), .zubrik-math .zb-facepalm > path:nth-child(2) { stroke: #B9CDE6; }
.zubrik-math .zb-cuff { fill: #F4F8FC; stroke: #A9BED8; stroke-width: 1; }
.zubrik-math .zb-signs { transform-box: fill-box; transform-origin: center; }
.zubrik-math:hover .zb-specs { transform: translateY(-2px); }
.zubrik-math .zb-specs { transition: transform 0.35s var(--spring), opacity 0.2s ease; }
.zubrik-math[data-mood="cool"] .zb-specs { opacity: 0; }
.zubrik-math[data-mood="eureka"] .zb-specs { transform: translateY(-4px); }

/* Сэр Зубрик (раздел английского): костюм-тройка в полоску, цилиндр, монокль, флажок */
.zubrik-uk .zb-torso { fill: #262F47; }
.zubrik-uk .zb-arm > path:first-child, .zubrik-uk .zb-facepalm > path:first-child,
.zubrik-uk .zb-book > path:first-child, .zubrik-uk .zb-cup > path:first-child { fill: #262F47; }
.zubrik-uk .zb-arm > path:nth-child(2), .zubrik-uk .zb-facepalm > path:nth-child(2) { stroke: #3D4866; }
.zubrik-uk .zb-pencil, .zubrik-uk .zb-hat { display: none; }
.zubrik-uk .zb-cup-body { fill: #F6F3EC; }
.zubrik-uk .zb-cup-handle { stroke: #DCD6C8; }
.zubrik-uk .zb-cup-mark { stroke: #1F3B8C; }
.zubrik-uk .zb-flagcloth { transform-origin: 200px 94px; animation: zb-flutter-flag 1.6s ease-in-out infinite; }
.zubrik-uk .zb-flag { transform-origin: 198px 214px; transition: opacity 0.25s ease; }
.zubrik-uk[data-mood="wave"] .zb-arm-r { opacity: 0; animation: none; }
.zubrik-uk[data-mood="wave"] .zb-flag { animation: zb-flag-wave 2.2s ease-in-out 1; }
.zubrik-uk[data-mood="cheer"] .zb-flag, .zubrik-uk[data-mood="dance"] .zb-flag, .zubrik-uk[data-mood="cool"] .zb-flag,
.zubrik-uk[data-mood="tea"] .zb-flag, .zubrik-uk[data-mood="read"] .zb-flag, .zubrik-uk[data-mood="write"] .zb-flag,
.zubrik-uk[data-mood="oops"] .zb-flag, .zubrik-uk.is-yawn .zb-flag { opacity: 0; }
.zubrik-uk[data-mood="happy"] .zb-flag, .zubrik-uk[data-mood="proud"] .zb-flag { animation: zb-flag-wave 1.4s ease-in-out infinite; }
/* Цилиндр: при наведении джентльмен приподнимает его левой рукой (рука — .zb-tip-arm, видна в спокойных настроениях) */
.zubrik-uk .zb-tophat { transform-origin: 120px 68px; transition: transform 0.55s var(--spring) 0.06s; }
.zubrik-uk:hover .zb-tophat { transform: translate(-2px, -14px) rotate(-10deg); }
.zubrik-uk[data-mood="cool"] .zb-tophat { transform: translateY(-10px) rotate(-8deg); }
.zubrik-uk .zb-tip-arm { opacity: 0; transform-origin: 58px 256px; transform: rotate(-28deg) translateY(30px); transition: opacity 0.2s ease, transform 0.5s var(--spring); pointer-events: none; }
.zubrik-uk:is([data-mood="neutral"], [data-mood="happy"], [data-mood="proud"], [data-mood="love"], [data-mood="surprised"], [data-mood="thinking"], [data-mood="rain"]):not(.is-peek):hover .zb-tip-arm { opacity: 1; transform: none; }
.zubrik-uk:not(.is-peek)[data-mood="neutral"]:hover .zb-head { transform: rotate(-2.5deg) translateY(1px); }
@media (hover: none) { .zubrik-uk .zb-tip-arm { display: none; } }
.zubrik-uk[data-mood="cool"] .zb-monocle { opacity: 0; }
.zubrik-uk.is-peek .zb-flag { display: none; }
@keyframes zb-flutter-flag { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-5deg) scaleX(0.94); } }
@keyframes zb-flag-wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 50% { transform: rotate(6deg); } 75% { transform: rotate(-10deg); } }

/* Зубр Сергеевич (раздел русского): сюртук, бант, плед, кудри, бакенбарды, перо, скрещённые руки */
.zubrik-ru .zb-torso { fill: #2A1E18; }
.zubrik-ru .zb-arm > path:first-child { fill: #4A372C; }
.zubrik-ru .zb-scarf-all, .zubrik-ru .zb-scarf-line, .zubrik-ru .zb-scarf-tail, .zubrik-ru .zb-scarf-knot,
.zubrik-ru .zb-beard, .zubrik-ru .zb-beard-lines, .zubrik-ru .zb-mane, .zubrik-ru .zb-pencil, .zubrik-ru .zb-hat { display: none; }
.zubrik-ru .zb-quill { transform-origin: 172px 112px; transition: transform 0.5s var(--spring); }
.zubrik-ru:hover .zb-quill { transform: rotate(-8deg); }
.zubrik-ru .zb-curls { transform-box: fill-box; transform-origin: 50% 90%; animation: zb-mane 4.8s ease-in-out infinite; }
.zubrik-ru .zb-cross { transition: opacity 0.25s ease; }
.zubrik-ru[data-mood="cheer"] .zb-cross, .zubrik-ru[data-mood="wave"] .zb-cross, .zubrik-ru[data-mood="dance"] .zb-cross,
.zubrik-ru[data-mood="cool"] .zb-cross, .zubrik-ru[data-mood="tea"] .zb-cross, .zubrik-ru[data-mood="read"] .zb-cross,
.zubrik-ru[data-mood="write"] .zb-cross, .zubrik-ru[data-mood="oops"] .zb-cross, .zubrik-ru.is-yawn .zb-cross { opacity: 0; }
.zubrik-ru[data-mood="proud"] .zb-arm-r { opacity: 0; }
.zubrik-ru.is-peek .zb-cross, .zubrik-ru.is-peek .zb-plaid { display: none; }
.zubrik-ru.is-wind .zb-curls { animation: zb-flutter 0.16s linear infinite alternate; }
/* Зубр Сергеевич сочиняет стихи (раздел «Предметы»): лист, перо и искорки рисует SMIL в _zubrik.html,
   а взгляд, наклон головы и бровь идут тем же 8-секундным циклом */
.zubrik-ru .zb-poem { transition: opacity 0.25s ease; }
.zubrik-ru:not([data-mood="poem"]) .zb-poem { opacity: 0; }
.zubrik-ru[data-mood="poem"] .zb-cross, .zubrik-ru[data-mood="poem"] .zb-quill { opacity: 0; }
.zubrik-ru[data-mood="poem"] .zb-look { animation: zb-poem-look 8s linear infinite; }
.zubrik-ru[data-mood="poem"] .zb-head { animation: zb-poem-head 8s ease-in-out infinite; }
.zubrik-ru[data-mood="poem"] .zb-brow-r { animation: zb-poem-brow 8s ease-in-out infinite; }
@keyframes zb-poem-look {
  0% { transform: translate(-3px, 4px); } 4% { transform: translate(-3px, 4px); } 16% { transform: translate(1px, 4px); }
  18% { transform: translate(-3px, 4.5px); } 30% { transform: translate(1px, 4.5px); } 32% { transform: translate(-3px, 5px); }
  44% { transform: translate(1px, 5px); } 46% { transform: translate(-3px, 5.5px); } 54% { transform: translate(0, 5.5px); }
  58%, 80% { transform: translate(3px, -4px); } 88%, 100% { transform: translate(-3px, 4px); }
}
@keyframes zb-poem-head { 0%, 54% { transform: translateY(2px) rotate(-3deg); } 58%, 80% { transform: translateY(-1px) rotate(4deg); } 88%, 100% { transform: translateY(2px) rotate(-3deg); } }
@keyframes zb-poem-brow { 0%, 54% { transform: none; } 58%, 80% { transform: translateY(-4px) rotate(6deg); } 88%, 100% { transform: none; } }

/* праздничные шапки: data-season у <html> */
html[data-season="newyear"] .zubrik .zb-hat-ny,
html[data-season="halloween"] .zubrik .zb-hat-hw { opacity: 1; }
html[data-season="newyear"] .zubrik .zb-hat-ny { transform-origin: 120px 66px; animation: zb-hat 4.8s ease-in-out infinite; }
html[data-season] .zubrik .zb-pencil { opacity: 0; }
@keyframes zb-hat { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg); } }

.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--lime) 55%, var(--surface)); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.avatar .zubrik { width: 124%; margin-top: 18%; }
.avatar-sm { width: 30px; height: 30px; }

/* Подсказка Зубрика в приложении */
.hint { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; border-radius: 999px; }
.hint p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.hint p b { color: var(--ink); }
@media (max-width: 560px) { .hint { border-radius: var(--r); } }

/* ---------- появление при прокрутке ---------- */

/* Появление двигает translate/scale, а не transform: transform остаётся свободным для наведения и нажатия у карточек
   (раньше .is-in { transform: none } перебивал :hover и :active — карточки не приподнимались и не пружинили). */
.js [data-reveal] {
  opacity: 0; translate: 0 26px;
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease), scale 0.8s var(--ease), transform 0.45s var(--ease), box-shadow 0.35s var(--ease), background-color 0.2s ease;
  transition-delay: calc(var(--d, 0) * 0.08s), calc(var(--d, 0) * 0.08s), calc(var(--d, 0) * 0.08s), 0s, 0s, 0s;
}
.js [data-reveal].is-in { opacity: 1; translate: none; }
.js [data-reveal="scale"] { translate: 0 18px; scale: 0.97; }
.js [data-reveal="scale"].is-in { translate: none; scale: none; }

.enter > * { animation: enter 0.9s var(--ease) both; }
.enter > :nth-child(2) { animation-delay: 0.08s; }
.enter > :nth-child(3) { animation-delay: 0.16s; }
.enter > :nth-child(4) { animation-delay: 0.24s; }
.enter > :nth-child(5) { animation-delay: 0.32s; }
.enter > :nth-child(6) { animation-delay: 0.40s; }
@keyframes enter { from { opacity: 0; transform: translateY(22px); } }  /* 11.5.1: без filter: blur — в iOS Safari Зубрик оставался размытым */

/* ---------- приложение: общие блоки ---------- */

.page { padding-block: clamp(20px, 3vw, 36px) 0; }
.page-head { display: grid; gap: 10px; margin-bottom: 22px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font: 600 13px/1.4 var(--font-body); color: var(--ink-2); white-space: nowrap; }
.tag-lime { background: var(--lime); color: var(--lime-ink); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-bad { background: var(--red-soft); color: var(--red); }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lime); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

.meter { display: flex; align-items: center; gap: 12px; }
.bar { position: relative; flex: 1; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.bar > span { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: var(--ink); transform-origin: left; transition: transform 1.1s var(--ease) 0.15s; }
.bar-lime > span { background: linear-gradient(90deg, var(--lime-2), var(--lime)); }
@keyframes grow { from { transform: scaleX(0); } }
.js [data-reveal]:not(.is-in) .bar > span { transform: scaleX(0); }

details.fold summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
details.fold[open] summary { margin-bottom: 12px; }

/* Чат: пузыри Зубрика и ученика */
.chat { display: grid; gap: 10px; align-content: start; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 92%; animation: msg-in 0.45s var(--ease) both; }
.msg-you { justify-self: end; flex-direction: row-reverse; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.bubble { padding: 11px 15px; border-radius: 20px; line-height: 1.5; font-size: 16px; overflow-wrap: anywhere; }
.bubble-you { justify-self: end; max-width: 46ch; background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; animation: msg-in 0.45s var(--ease) both; }
.bubble-zubr { justify-self: start; max-width: 52ch; background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); animation: msg-in 0.45s var(--ease) both; }
.bubble .who { display: block; font: 650 12.5px/1.4 var(--font-body); color: var(--ink-3); margin-bottom: 2px; }
.bubble-you .who { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: typing 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- бланк ответа ---------- */

.task-text { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.55; margin: 14px 0 20px; font-weight: 500; letter-spacing: -0.005em; }
.answers { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.answers legend { margin-bottom: 10px; padding: 0; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }

.answer {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 9px 14px 9px 9px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.25s var(--ease);
}
label.answer:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-sm); transform: translateX(2px); }
.answer input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.answer .cell {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  font: 600 15px/1 var(--font-mono);
  color: var(--ink-2);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.answer .opt { font-size: 18px; font-weight: 500; }
/* Крестик, как на бланке ЦТ: рисуется двумя штрихами */
.answer .cell::before, .answer .cell::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 2.6px;
  margin-top: -1.3px;
  border-radius: 2px;
  background: var(--blue);
  transform: rotate(45deg) scaleX(0);
  transition: transform 0.22s var(--ease);
}
.answer .cell::after { transform: rotate(-45deg) scaleX(0); transition-delay: 0s; }
.answer input:checked + .cell { color: transparent; border-color: var(--blue); background: var(--blue-soft); }
.answer input:checked + .cell::before { transform: rotate(45deg) scaleX(1); }
.answer input:checked + .cell::after { transform: rotate(-45deg) scaleX(1); transition-delay: 0.14s; }
.answer:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--blue); background: var(--surface); }
.answer input:focus-visible + .cell { outline: 2px solid var(--blue); outline-offset: 2px; }

.answer.is-right, .answer.is-right:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ok); background: var(--ok-soft); }
.answer.is-right .cell, .answer.is-right input:checked + .cell { border-color: var(--ok); background: var(--ok); color: #fff; }
.answer.is-right .cell::before, .answer.is-right .cell::after { display: none; }
.answer.is-wrong, .answer.is-wrong:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--red); background: var(--red-soft); animation: shake 0.4s ease 1; }
.answer.is-wrong .cell, .answer.is-wrong input:checked + .cell { border-color: var(--red); background: transparent; }
.answer.is-wrong .cell::before, .answer.is-wrong .cell::after { background: var(--red); }
.answer.is-wrong .opt { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
@keyframes shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* Поле части B: каждая цифра в своей клетке */
.cells-input {
  width: 100%;
  max-width: 19.2em;
  padding: 14px 0 14px 0.3em;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(1.2em - 1px), var(--line) calc(1.2em - 1px) 1.2em);
  color: var(--blue);
  font: 600 22px/1 var(--font-mono);
  letter-spacing: 0.6em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cells-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.cells-input::placeholder { color: var(--ink-3); letter-spacing: 0.02em; font-weight: 400; font-size: 16px; }

.field {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
textarea.field { min-height: 170px; resize: vertical; line-height: 1.55; }

.ask-bar { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow 0.2s ease; }
.ask-bar:focus-within { box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent); }
.ask-bar input { flex: 1 1 auto; width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 0 12px; }
.ask-bar input:focus { outline: none; }

/* Загрузка фото */
.drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 20px;
  border-radius: var(--r);
  border: 2px dashed var(--line-2);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.25s var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--accent-text); background: var(--surface); }
.drop.is-over { transform: scale(1.01); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ico { width: 34px; height: 34px; color: var(--accent-text); }
.drop b { font-size: 17px; }
.drop img { max-height: 260px; border-radius: 12px; box-shadow: var(--shadow); }

/* ---------- вердикт и разбор ошибки ---------- */

.verdict { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.verdict-word { font: 850 32px/1 var(--font-display); letter-spacing: -0.03em; }
.verdict.ok .verdict-word { color: var(--ok); }
.verdict.bad .verdict-word { color: var(--red); }
.verdict-icon { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; animation: pop 0.55s var(--spring) both; }
.verdict.ok .verdict-icon { background: var(--ok); color: #fff; box-shadow: 0 0 0 6px var(--ok-soft); }
.verdict.bad .verdict-icon { background: var(--red); color: #fff; box-shadow: 0 0 0 6px var(--red-soft); }
.verdict-icon svg { width: 24px; height: 24px; }
.verdict-icon path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.45s var(--ease) 0.25s forwards; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.callout { display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--r); background: var(--red-soft); animation: enter 0.6s var(--ease) 0.15s both; }
.callout-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--red); }
.callout-title .ico { width: 18px; height: 18px; }
.callout p { margin: 0; color: var(--ink); }
.callout.is-ok { background: var(--ok-soft); }
.callout.is-ok .callout-title { color: var(--ok); }
.callout.is-info { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.callout.is-info .callout-title { color: var(--ink); }

.checked { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font: 600 13.5px/1.4 var(--font-body); }
.checked svg { flex: none; width: 15px; height: 15px; }

/* ---------- маршрут: прогноз и линейка ---------- */

.score-big { font: 850 clamp(72px, 12vw, 124px)/0.88 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.score-range { font: 500 15px/1.4 var(--font-body); color: var(--ink-2); }

.topic-list { display: grid; }
.topic { display: grid; grid-template-columns: minmax(0, 1fr) 140px 92px; gap: 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic .name { font-weight: 600; min-width: 0; }
.topic .name small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13.5px; }
.topic .acc { display: flex; align-items: center; gap: 10px; font: 500 13.5px var(--font-body); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.topic .acc .bar { height: 6px; }
.topic .gain { justify-self: end; }
@media (max-width: 560px) { .topic { grid-template-columns: minmax(0, 1fr) 84px; } .topic .acc { display: none; } }

.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, currentColor 6%, transparent); }
.plan-list .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); font: 700 14px/1 var(--font-body); }
.plan-list .gain { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Номера заданий ЦЭ на маршруте: «Задание B14 — 2 из 5 верно» и «Тренировать B14» */
.no-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.no-part h3 { margin: 0 0 8px; font: 700 15px/1.3 var(--font-body); color: var(--ink-2); }
.no-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.no-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head btn" "title btn"; gap: 2px 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, currentColor 5%, transparent); }
.no-row .no-head { grid-area: head; font-variant-numeric: tabular-nums; }
.no-row .no-head b { font-weight: 700; }
.no-row .no-title { grid-area: title; font-size: 13.5px; color: var(--ink-3); min-width: 0; }
.no-row .btn { grid-area: btn; white-space: nowrap; }
.no-row.is-weak .no-score { color: var(--red); font-weight: 600; }
.no-row.is-empty { opacity: .72; }
.tag-no { background: color-mix(in srgb, var(--lime) 55%, transparent); color: var(--ink); }
@media (max-width: 920px) { .no-parts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .no-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "title" "btn"; } .no-row .btn { justify-self: start; margin-top: 6px; } }

.ruler { position: relative; padding-top: 38px; }
.ruler-track {
  position: relative;
  height: 44px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, currentColor 45%, transparent) 0 1px, transparent 1px 100%) 0 0 / 10% 14px repeat-x,
    repeating-linear-gradient(90deg, color-mix(in srgb, currentColor 25%, transparent) 0 1px, transparent 1px 100%) 0 0 / 2% 8px repeat-x,
    color-mix(in srgb, currentColor 7%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent);
}
.ruler-labels { position: relative; height: 24px; font: 500 12.5px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.ruler-labels span { position: absolute; top: 9px; transform: translateX(-50%); opacity: 0.65; }
.ruler-mark { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed color-mix(in srgb, currentColor 55%, transparent); }
.ruler-you { position: absolute; top: -34px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 26px; font: 700 13.5px/1 var(--font-body); white-space: nowrap; transition: left 0.6s var(--spring); z-index: 1; }
.ruler-you > span:first-child { padding: 5px 10px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.35); font-variant-numeric: tabular-nums; }
.ruler-you .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 3px solid var(--lime-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 35%, transparent); }

.spec-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.spec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, currentColor 6%, transparent); transition: background-color 0.3s ease; }
.spec .spec-name { min-width: 0; font-weight: 600; }
.spec .spec-name small { display: block; font: 500 13px/1.4 var(--font-body); opacity: 0.7; }
.spec .tag { transition: background-color 0.3s ease, color 0.3s ease; }
.spec.is-pass { background: color-mix(in srgb, var(--lime) 14%, transparent); }

.slider { display: grid; gap: 8px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slider-top output { font: 750 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.slider input[type="range"] { width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.slider input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--slider, var(--lime)) var(--p, 50%), color-mix(in srgb, currentColor 18%, transparent) var(--p, 50%)); }
.slider input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 18%, transparent); }
.slider input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--slider, var(--lime)); }
.slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.35); transition: transform 0.2s var(--spring); }
.slider input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.35); }
.slider input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }

/* ---------- лесная сцена (тёмно-зелёные блоки) ---------- */

.stage {
  --ink: var(--on-forest);
  --ink-2: var(--on-forest-2);
  --ink-3: color-mix(in srgb, var(--on-forest-2) 75%, transparent);
  --line: rgba(241, 245, 236, 0.12);
  --line-2: rgba(241, 245, 236, 0.22);
  --surface: rgba(255, 255, 255, 0.07);
  --accent-text: var(--lime);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --glass-rim-1: rgba(255, 255, 255, 0.40);
  --glass-rim-2: rgba(255, 255, 255, 0.08);
  --glass-rim-3: rgba(255, 255, 255, 0.18);
  --glass-hi: rgba(255, 255, 255, 0.16);
  --glass-lo: rgba(0, 0, 0, 0.2);
  --sheen: rgba(255, 255, 255, 0.10);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 20px 40px -20px rgba(0, 0, 0, 0.6);
  --blue: #A9BEFF;
  --blue-soft: rgba(169, 190, 255, 0.14);
  --ok: #7BE2A6;
  --ok-soft: rgba(123, 226, 166, 0.14);
  --red: #FF8E80;
  --red-soft: rgba(255, 142, 128, 0.14);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--forest);
  color: var(--on-forest);
}
.stage::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 78% 18%, rgba(212, 245, 76, 0.28), transparent 70%),
    radial-gradient(45% 55% at 12% 90%, rgba(80, 160, 110, 0.35), transparent 70%),
    radial-gradient(30% 40% at 40% 40%, rgba(255, 255, 255, 0.05), transparent 70%);
  animation: stage-light 22s ease-in-out infinite alternate;
}
@keyframes stage-light { 50% { transform: translate3d(-4%, 3%, 0) rotate(4deg); } 100% { transform: translate3d(3%, -2%, 0) rotate(-3deg); } }
.stage .bubble-zubr, .stage .typing { background: rgba(255, 255, 255, 0.10); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.stage .bubble-you { background: var(--lime); color: var(--lime-ink); }
.stage .bubble-you .who { color: rgba(18, 18, 18, 0.55); }
.stage .answer { background: rgba(255, 255, 255, 0.06); }
.stage label.answer:hover { background: rgba(255, 255, 255, 0.12); }
.stage .answer .cell { background: transparent; }
.stage .answer.is-right .cell, .stage .answer.is-right input:checked + .cell { background: var(--ok); border-color: var(--ok); color: var(--forest); }
.stage .btn-glass { background: rgba(255, 255, 255, 0.10); }
.stage .btn-glass:hover { background: rgba(255, 255, 255, 0.18); }
.stage .tag { background: rgba(255, 255, 255, 0.10); }
.stage .tag-lime { background: var(--lime); color: var(--lime-ink); }
.stage-wrap { padding-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px)); max-width: 1440px; margin-inline: auto; }

/* ---------- главная ---------- */

.hero-wrap { margin-top: -64px; }
.hero { padding-top: 64px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 48px); }
@media (max-width: 960px) { .hero-inner { grid-template-columns: minmax(0, 1fr); } }
.hero .display { margin: 22px 0 22px; }
.hero .display .lime-text { display: inline-block; }
.hero .lead { color: var(--on-forest-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 14.5px; color: var(--on-forest-2); }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note .ico { width: 16px; height: 16px; color: var(--lime); }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 14.5px; font-weight: 600; }

.assistant { position: relative; padding-top: 58px; }
.assistant .zubrik-hero { position: absolute; top: -18px; left: 22px; width: 150px; z-index: 2; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35)); }
.assistant-card { padding: 22px; display: grid; gap: 14px; }
.assistant-head { display: flex; align-items: center; gap: 12px; padding-left: 150px; min-height: 52px; }
.assistant-head b { display: block; font-size: 16px; }
.assistant-head small { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); }
.assistant-head small .live-dot { width: 7px; height: 7px; }
.assistant-head .tag { margin-left: auto; }
.assistant .chat { min-height: 0; }
.formula { padding: 14px 16px; border-radius: 16px; background: rgba(0, 0, 0, 0.18); font: 600 clamp(17px, 2vw, 20px)/1.4 var(--font-body); letter-spacing: -0.005em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.demo-options { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-options .answer { flex: 1 1 auto; min-width: 112px; }
.demo-options .answer { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 7px 12px 7px 7px; }
.demo-options .answer .cell { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
.demo-options .answer .cell::before, .demo-options .answer .cell::after { left: 6px; right: 6px; }
.demo-options .answer .opt { font-size: 16px; font-weight: 600; white-space: nowrap; }
.demo-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .assistant { padding-top: 70px; }
  .assistant .zubrik-hero { width: 112px; left: 10px; top: -8px; }
  .assistant-head { padding-left: 112px; }
  .assistant-head .tag { display: none; }
  .assistant-card { padding: 16px; }
}

.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-bottom: clamp(20px, 3vw, 32px); }
@media (max-width: 900px) { .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.action { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); text-decoration: none; color: var(--ink); transition: transform 0.35s var(--ease); }
.action:hover { transform: translateY(-3px); }
.action .ico-box { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.10); color: var(--lime); transition: background-color 0.25s ease, color 0.25s ease, transform 0.35s var(--spring); }
.action:hover .ico-box { background: var(--lime); color: var(--lime-ink); transform: rotate(-6deg) scale(1.06); }
.action .ico-box .ico { width: 22px; height: 22px; }
.action b { display: block; font-size: 16px; }
.action small { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.action > .ico { width: 18px; height: 18px; color: var(--ink-3); transition: transform 0.3s var(--ease), color 0.2s ease; }
.action:hover > .ico { transform: translateX(3px); color: var(--ink); }
@media (max-width: 520px) { .action { grid-template-columns: minmax(0, 1fr); gap: 10px; } .action > .ico { display: none; } }

/* Даты экзаменов */
.countdown { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 40px; align-items: center; padding-block: clamp(36px, 5vw, 56px); }
.countdown-big { display: flex; align-items: baseline; gap: 14px; }
.countdown-big b { font: 850 clamp(64px, 9vw, 112px)/0.85 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.countdown-big span { font: 700 clamp(18px, 2vw, 22px)/1.2 var(--font-display); color: var(--ink-2); max-width: 8em; }
.countdown-list { display: grid; gap: 10px; }
.countdown-list div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 18px; border-radius: 16px; }
.countdown-list b { font-weight: 650; }
.countdown-list span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .countdown { grid-template-columns: minmax(0, 1fr); } }

.section { padding-block: clamp(56px, 8vw, 110px); }
.section-tight { padding-top: 0; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 780px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* Что умеет Зубрик: сетка карточек */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.tile { padding: clamp(20px, 2.6vw, 28px); display: grid; gap: 14px; align-content: start; overflow: hidden; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.tile:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg); }
.tile p { margin: 0; color: var(--ink-2); }
.tile-4 { grid-column: span 4; grid-row: span 2; }
.tile-2 { grid-column: span 2; }
.tile-3 { grid-column: span 3; }
.tile-6 { grid-column: span 6; }
@media (max-width: 960px) { .tile-4, .tile-6 { grid-column: span 6; grid-row: auto; } .tile-2, .tile-3 { grid-column: span 3; } }
@media (max-width: 640px) { .tile-2, .tile-3 { grid-column: span 6; } }
.tile-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--forest); color: var(--lime); }
.tile-ico .ico { width: 22px; height: 22px; }

.graded { display: grid; gap: 4px; margin-top: 4px; }
.graded-opt { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.graded-opt:last-child { border-bottom: 0; }
.graded-opt .cell { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1.5px solid var(--line-2); font: 600 14px/1 var(--font-mono); }
.graded-opt.right .cell { border-color: var(--ok); background: var(--ok); color: #fff; }
.graded-opt .val { font-weight: 700; font-size: 18px; }
.graded-opt .why { display: block; color: var(--red); font-size: 15px; line-height: 1.45; margin-top: 2px; }
.graded-opt.right .why { color: var(--ok); }
.js [data-reveal] .graded-opt { opacity: 0; transform: translateX(-10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.js [data-reveal].is-in .graded-opt { opacity: 1; transform: none; }
.js [data-reveal].is-in .graded-opt:nth-child(2) { transition-delay: 0.12s; }
.js [data-reveal].is-in .graded-opt:nth-child(3) { transition-delay: 0.24s; }
.js [data-reveal].is-in .graded-opt:nth-child(4) { transition-delay: 0.36s; }
.js [data-reveal].is-in .graded-opt:nth-child(5) { transition-delay: 0.48s; }

.mini-score { display: flex; align-items: baseline; gap: 10px; }
.mini-score b { font: 850 64px/0.9 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.mini-score span { color: var(--ink-2); font-size: 15px; }
.range { position: relative; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.range i { position: absolute; top: 0; bottom: 0; left: var(--from); right: calc(100% - var(--to)); border-radius: inherit; background: linear-gradient(90deg, var(--lime-2), var(--lime)); transform-origin: center; transition: transform 1.2s var(--ease) 0.3s; }
.js [data-reveal]:not(.is-in) .range i { transform: scaleX(0); }
.range b { position: absolute; top: 50%; left: var(--at); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); }
.range-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.repeat { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.repeat li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.repeat li:last-child { padding-bottom: 0; }
.repeat li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: -2px; width: 2px; background: var(--line-2); }
.repeat li:last-child::before { display: none; }
.repeat i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); margin-top: 1px; transition: background-color 0.4s ease, border-color 0.4s ease; }
.repeat b { display: block; font-size: 15.5px; }
.repeat span { font-size: 14px; color: var(--ink-2); }
.js [data-reveal].is-in .repeat li:nth-child(1) i { background: var(--red); border-color: var(--red); transition-delay: 0.2s; }
.js [data-reveal].is-in .repeat li:nth-child(2) i { background: var(--lime); border-color: var(--lime-2); transition-delay: 0.6s; }
.js [data-reveal].is-in .repeat li:nth-child(3) i { background: var(--ok); border-color: var(--ok); transition-delay: 1s; }
html:not(.js) .repeat li:nth-child(1) i { background: var(--red); }
html:not(.js) .repeat li:nth-child(2) i { background: var(--lime); }
html:not(.js) .repeat li:nth-child(3) i { background: var(--ok); }

.scan { position: relative; padding: 16px 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.scan p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.scan p + p { margin-top: 6px; color: var(--ink-2); }
.scan::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 36px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--lime) 55%, transparent) 85%, var(--lime)); opacity: 0.7; animation: scan 3.2s var(--ease) infinite; }
.scan-corners { position: absolute; inset: 8px; pointer-events: none; background:
  linear-gradient(var(--accent-text), var(--accent-text)) 0 0 / 14px 2px no-repeat, linear-gradient(var(--accent-text), var(--accent-text)) 0 0 / 2px 14px no-repeat,
  linear-gradient(var(--accent-text), var(--accent-text)) 100% 0 / 14px 2px no-repeat, linear-gradient(var(--accent-text), var(--accent-text)) 100% 0 / 2px 14px no-repeat,
  linear-gradient(var(--accent-text), var(--accent-text)) 0 100% / 14px 2px no-repeat, linear-gradient(var(--accent-text), var(--accent-text)) 0 100% / 2px 14px no-repeat,
  linear-gradient(var(--accent-text), var(--accent-text)) 100% 100% / 14px 2px no-repeat, linear-gradient(var(--accent-text), var(--accent-text)) 100% 100% / 2px 14px no-repeat; }
@keyframes scan { 0% { transform: translateY(-40px); } 70%, 100% { transform: translateY(140px); } }

.wave { display: flex; gap: 5px; align-items: center; height: 56px; }
.wave i { flex: 1; max-width: 7px; border-radius: 4px; background: var(--accent-text); animation: wave 1.3s ease-in-out infinite; animation-delay: calc(var(--k, 0) * -0.11s); }
@keyframes wave { 0%, 100% { height: 12%; } 50% { height: var(--h, 80%); } }

.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .checks { grid-template-columns: minmax(0, 1fr); } }
.checks li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.checks .tick { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.checks .tick svg { width: 16px; height: 16px; }
.checks b { display: block; }
.checks p { margin: 3px 0 0; color: var(--ink-2); font-size: 15.5px; }

/* Маршрут на главной */
.route-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .route-grid { grid-template-columns: minmax(0, 1fr); } }
.route-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.route-total b { font: 850 48px/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* Цены */
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 920px; margin-inline: auto; align-items: stretch; }
@media (max-width: 760px) { .prices { grid-template-columns: minmax(0, 1fr); } }
.price { padding: clamp(24px, 3vw, 34px); display: flex; flex-direction: column; gap: 16px; transition: transform 0.45s var(--ease); }
.price:hover { transform: translateY(-4px); }
.price .amount { display: flex; align-items: baseline; gap: 10px; font: 850 64px/1 var(--font-display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.price .amount small { font: 500 16px/1.3 var(--font-body); letter-spacing: 0; color: var(--ink-2); }
.price .per { margin: -6px 0 0; color: var(--ink-2); font-size: 15px; }
.price ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; align-content: start; flex: 1; }
.price li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--ink-2); font-size: 16px; }
.price li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--accent-text); }
.price.stage { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.price-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trial { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 26px; max-width: 920px; margin: 18px auto 0; padding: 16px 22px; border-radius: var(--r); }
.trial span { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
.trial svg { width: 17px; height: 17px; color: var(--ok); flex: none; }
.trial-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 920px; margin: 0 auto 18px; }
.trial-steps div { position: relative; padding: 0 12px 0 0; }
.trial-steps div::before { content: ""; position: absolute; left: 12px; right: 0; top: 11px; height: 2px; background: var(--line-2); }
.trial-steps div:last-child::before { display: none; }
.trial-steps i { position: relative; display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px color-mix(in srgb, var(--lime) 30%, transparent); margin-bottom: 12px; }
.trial-steps div:nth-child(2) i { background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-2); }
.trial-steps div:nth-child(3) i { background: var(--ink); box-shadow: none; }
.trial-steps b { display: block; font-size: 15.5px; }
.trial-steps span { font-size: 14px; color: var(--ink-2); }

/* Родителям */
.parents { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 28px; align-items: center; }
@media (max-width: 760px) { .parents { grid-template-columns: minmax(0, 1fr); } }
.report { padding: 18px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; font-size: 15.5px; }
.report-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.report-row:last-child { border-bottom: 0; padding-bottom: 0; }
.report b { font-variant-numeric: tabular-nums; }

/* Вопросы */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r); overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 22px; font-weight: 650; font-size: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--ink) 7%, transparent); transition: transform 0.35s var(--ease), background-color 0.2s ease; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; left: 8px; right: 8px; top: 13px; height: 2px; border-radius: 2px; background: var(--ink); }
.faq summary .plus::after { transform: rotate(90deg); transition: transform 0.35s var(--ease); }
.faq details[open] summary .plus { transform: rotate(180deg); background: var(--lime); }
.faq details[open] summary .plus::after { transform: rotate(0deg); }
.faq .answer-text { padding: 0 22px 20px; color: var(--ink-2); max-width: 70ch; }
.faq .answer-text p { margin: 0; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
:root { interpolate-size: allow-keywords; }

/* Финал */
.final { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(28px, 5vw, 64px); }
.final .zubrik { width: clamp(130px, 18vw, 210px); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35)); }
.final .h2 { margin-bottom: 14px; }
.final .lead { color: var(--on-forest-2); }
.final .hero-cta { margin-top: 26px; }
@media (max-width: 700px) { .final { grid-template-columns: minmax(0, 1fr); text-align: left; } }

/* ---------- голос ---------- */

.voice-stage { display: grid; justify-items: center; gap: 18px; padding-block: 18px 8px; text-align: center; }
.mic {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 35% 30%, #EFFF9E, var(--lime) 45%, var(--lime-2));
  color: var(--lime-ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -6px 14px rgba(0, 0, 0, 0.08), 0 18px 40px -14px rgba(120, 150, 10, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.3s var(--spring), box-shadow 0.3s ease;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.mic::before, .mic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; }
.mic:hover { transform: scale(1.04); }
.mic:active, .mic.is-holding { transform: scale(0.94); }
.mic[disabled] { opacity: 0.5; cursor: not-allowed; }
.mic svg { width: 46px; height: 46px; }
.voice-stage:has(.levels.is-live) .mic::before { animation: ring 2s var(--ease) infinite; }
.voice-stage:has(.levels.is-live) .mic::after { animation: ring 2s var(--ease) 1s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.7); opacity: 0; } }
.levels { display: flex; gap: 5px; align-items: center; height: 34px; }
.levels i { width: 6px; height: 6px; border-radius: 3px; background: var(--ink-3); transition: height 0.08s linear, background-color 0.3s ease; }
.levels.is-live i { background: var(--accent-text); }

/* ---------- уважение к настройке «меньше движения» ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; translate: none; scale: none; }
  .ambient i, .stage::before { animation: none !important; }
}


/* ======================================================================
   Версия 3.2: белая светлая тема, аккаунты, главная ученика, стартовый тест
   ====================================================================== */

.section-alt { background: var(--bg-2); }
.center { text-align: center; }

/* Шапка: профиль ученика */
.me { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; margin-left: 6px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; transition: background-color 0.2s ease; }
.me:hover, .me[aria-current="page"] { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.me-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); font: 800 15px/1 var(--font-body); flex: none; }
.me-dot-lg { width: 48px; height: 48px; font-size: 19px; }
.topbar-login { margin-left: auto; }
.topnav ~ .topbar-login { margin-left: 6px; }
@media (max-width: 1100px) { .topbar-login, .topnav ~ .topbar-login { margin-left: auto; } }
@media (max-width: 920px) { .me { margin-left: auto; } }
@media (max-width: 640px) { .me-name { display: none; } .me { padding: 2px; } .topbar-login { display: none; } }

/* ---------- главная для гостя ---------- */

.hero-light { position: relative; isolation: isolate; padding-block: clamp(36px, 6vw, 80px) clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-light::before { content: ""; position: absolute; z-index: -1; width: min(900px, 120vw); aspect-ratio: 1; right: -18%; top: -30%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 34%, transparent), transparent); pointer-events: none; -webkit-mask-image: linear-gradient(#000 55%, transparent 80%); mask-image: linear-gradient(#000 55%, transparent 80%); }
.hero2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 900px) { .hero2 { grid-template-columns: minmax(0, 1fr); } }
.hero2 h1 { font-weight: 850; font-size: clamp(36px, 4.8vw, 62px); line-height: 1; letter-spacing: -0.042em; margin: 20px 0 20px; }
.hero2 h1 em { font-style: normal; color: var(--accent-text); }
.hero2 .lead { max-width: 32em; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; font-size: 14.5px; color: var(--ink-2); }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .ico { width: 16px; height: 16px; color: var(--ok); }
.mascot { position: relative; display: grid; justify-items: center; }
.mascot .zubrik { width: min(360px, 78vw); filter: drop-shadow(0 24px 30px rgba(29, 74, 53, 0.25)); }
.speech { position: relative; z-index: 2; margin-bottom: -6px; padding: 14px 20px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); font: 750 clamp(17px, 2vw, 20px)/1.3 var(--font-display); letter-spacing: -0.01em; animation: speech-in 0.7s var(--spring) 0.5s both; }
.speech::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 18px; height: 18px; margin-left: -9px; background: var(--surface); transform: rotate(45deg); box-shadow: 3px 3px 0 -2px var(--line); border-radius: 0 0 4px 0; }
@keyframes speech-in { from { opacity: 0; transform: translateY(10px) scale(0.9); } }

/* Как это работает */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: how; }
@media (max-width: 860px) { .how { grid-template-columns: minmax(0, 1fr); } }
.how-step { display: grid; gap: 14px; align-content: start; padding: 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.how-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--lime); font: 800 15px/1 var(--font-body); }
.how-step p { margin: 0; color: var(--ink-2); }
.how-visual { height: 132px; border-radius: 16px; background: var(--bg-2); display: grid; align-content: center; gap: 10px; padding: 16px 18px; overflow: hidden; }
.mini-progress { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.mini-q { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.mini-q i { height: 26px; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mini-q i.ok { background: var(--ok); box-shadow: none; }
.mini-q i.bad { background: var(--red); box-shadow: none; opacity: 0.85; }
.mini-q i.now { background: var(--lime); box-shadow: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.9); } }
.mini-note { padding: 10px 12px; border-radius: 12px; background: var(--red-soft); font-size: 13.5px; line-height: 1.4; }
.mini-note b { display: block; color: var(--red); font-size: 13px; margin-bottom: 2px; }
.mini-chart { width: 100%; height: 100px; }

/* Возможности */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding: 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.feature:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.feature .tile-ico { width: 52px; height: 52px; border-radius: 16px; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink-2); }

.demo-wrap { max-width: 760px; margin-inline: auto; }
.demo-wrap .assistant { padding-top: 0; }
.demo-card { padding: 22px; display: grid; gap: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); }
.demo-head { display: flex; align-items: center; gap: 12px; }
.demo-head .avatar { width: 48px; height: 48px; }
.demo-head b { display: block; }
.demo-head small { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13.5px; }
.demo-card .formula { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.demo-head { flex-wrap: wrap; row-gap: 8px; }
.demo-head > span:nth-child(2) { min-width: 0; }
.demo-card > * { min-width: 0; }
.demo-nav { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.demo-nav .btn .ico { width: 16px; height: 16px; }
[data-demo-next].is-ready { background: var(--lime); color: #121212; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--lime-2) 90%, transparent); animation: demo-nudge 0.5s var(--spring); }
@keyframes demo-nudge { 40% { transform: scale(1.07); } }
.demo-card.is-swap [data-demo-formula], .demo-card.is-swap [data-demo-options], .demo-card.is-swap [data-demo-intro] { animation: demo-swap 0.45s var(--ease) both; }
.demo-card.is-swap [data-demo-options] { animation-delay: 0.06s; }
@keyframes demo-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.demo-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin: 18px 0 0; font-weight: 600; }
.demo-more a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; padding: 6px 4px; border-bottom: 2px solid var(--lime-2); }
@media (max-width: 520px) { .demo-more > .faint { display: none; } }
.demo-more a .ico { width: 16px; height: 16px; transition: transform 0.3s var(--spring); }
.demo-more a:hover .ico { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .demo-card.is-swap [data-demo-formula], .demo-card.is-swap [data-demo-options], .demo-card.is-swap [data-demo-intro] { animation: none; } }

/* ---------- формы входа и регистрации ---------- */

.auth { min-height: calc(100vh - 220px); display: grid; place-items: start center; padding-block: clamp(20px, 4vw, 48px); }
.auth-card { width: min(460px, 100%); padding: clamp(22px, 4vw, 36px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); display: grid; gap: 18px; }
.auth-top { display: grid; justify-items: center; gap: 6px; text-align: center; }
.auth-top .zubrik { width: 112px; }
.auth-top h1 { font-size: 28px; font-weight: 850; letter-spacing: -0.03em; }
.auth-top p { margin: 0; color: var(--ink-2); }
.auth-foot { text-align: center; font-size: 15px; color: var(--ink-2); }
.auth-foot a { color: var(--ink); font-weight: 650; }
.fields { display: grid; gap: 14px; }
.fg { display: grid; gap: 6px; }
.fg label, .fg .label { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.fg .hint { font-size: 13.5px; color: var(--ink-3); }
.fg .err { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; color: var(--red); font-weight: 550; animation: enter 0.35s var(--ease) both; }
.fg .err .ico { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.fg.has-error .field { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.fg-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fg-row a { font-size: 13.5px; color: var(--ink-2); }
.pw { position: relative; }
.pw .field { padding-right: 52px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.pw button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pw button .ico { width: 20px; height: 20px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength i { height: 4px; border-radius: 4px; background: var(--line-2); transition: background-color 0.3s ease; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-level="2"] i:nth-child(-n+2) { background: #E39A2D; }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--lime-2); }
.strength[data-level="4"] i { background: var(--ok); }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--forest); }
.check a { color: var(--ink); }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--red-soft); color: var(--ink); font-size: 15px; }
.form-error .ico { width: 18px; height: 18px; color: var(--red); flex: none; margin-top: 2px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--ok-soft); color: var(--ink); font-size: 15px; animation: enter 0.5s var(--ease) both; }
.notice .ico { width: 18px; height: 18px; color: var(--ok); flex: none; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--ink-3); }
.secure-note .ico { width: 15px; height: 15px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }

/* Профиль */
.settings { display: grid; gap: 16px; }
.settings-card { padding: clamp(20px, 3vw, 28px); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); display: grid; gap: 16px; }
.settings-card h2 { font-size: 19px; font-weight: 750; letter-spacing: -0.015em; }
.settings-card > p { margin: -8px 0 0; color: var(--ink-2); font-size: 15px; }
.settings-card.danger { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .two { grid-template-columns: minmax(0, 1fr); } }
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head b { display: block; font: 800 24px/1.15 var(--font-display); letter-spacing: -0.02em; }
.profile-head span { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }

/* ---------- главная ученика ---------- */

.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dash > * { min-width: 0; }
.dash-hero { grid-column: span 12; display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-xl); }
.dash-hero .zubrik { width: 170px; margin-block: -10px -18px; }
.dash-hero h1 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 850; letter-spacing: -0.035em; line-height: 1.05; }
.dash-say { position: relative; margin-top: 12px; padding: 14px 18px; border-radius: 18px; border-top-left-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; line-height: 1.5; max-width: 58ch; animation: msg-in 0.6s var(--ease) 0.3s both; }
.dash-cta { display: grid; gap: 10px; justify-items: stretch; }
@media (max-width: 860px) { .dash-hero { grid-template-columns: 110px minmax(0, 1fr); } .dash-hero .zubrik { width: 110px; } .dash-cta { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
@media (max-width: 520px) { .dash-hero { grid-template-columns: minmax(0, 1fr); text-align: left; } .dash-hero .zubrik { width: 120px; margin: -6px 0 -10px; } }
.card-pad { padding: clamp(18px, 2.6vw, 26px); border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); display: grid; gap: 14px; align-content: start; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-head h2 { font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
@media (max-width: 960px) { .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; } }
@media (min-width: 561px) and (max-width: 960px) { .span-4 { grid-column: span 6; } }

.today { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.ring { position: relative; width: 112px; height: 112px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: color-mix(in srgb, var(--ink) 8%, transparent); }
.ring .fill { stroke: var(--lime-2); stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: calc(289 - 289 * var(--p, 0) / 100); transition: stroke-dashoffset 1.2s var(--ease) 0.2s; }
.js [data-reveal]:not(.is-in) .ring .fill { stroke-dashoffset: 289; }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring-label b { display: block; font: 850 30px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-label span { font-size: 12.5px; color: var(--ink-3); }
.focus { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--lime-soft); }
.focus b { display: block; }
.focus > span:first-child > span { display: block; font-size: 14px; color: var(--ink-2); }

.big-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.big-score b { font: 850 64px/0.9 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.delta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font: 700 14px/1.4 var(--font-body); }
.delta.up { background: var(--ok-soft); color: var(--ok); }
.delta.down { background: var(--red-soft); color: var(--red); }
.delta.flat { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink-2); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .band { fill: color-mix(in srgb, var(--lime) 30%, transparent); }
.chart .line { fill: none; stroke: var(--forest); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1200; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--ease) 0.2s; }
.js [data-reveal]:not(.is-in) .chart .line { stroke-dashoffset: 1200; }
.chart .dot { fill: var(--surface); stroke: var(--forest); stroke-width: 2; }
.chart .last { fill: var(--lime); stroke: var(--forest); stroke-width: 2.5; }
.chart .goal { stroke: var(--ink-3); stroke-dasharray: 4 4; stroke-width: 1.2; }
.chart text { fill: var(--ink-3); font: 500 11px var(--font-body); }
:root[data-theme="dark"] .chart .line, :root[data-theme="dark"] .chart .dot, :root[data-theme="dark"] .chart .last { stroke: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chart .line, :root:not([data-theme="light"]) .chart .dot, :root:not([data-theme="light"]) .chart .last { stroke: var(--lime); } }

.streak-num { display: flex; align-items: baseline; gap: 10px; }
.streak-num b { font: 850 56px/0.9 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.streak-num span { color: var(--ink-2); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.week div { display: grid; gap: 6px; justify-items: center; font-size: 12.5px; color: var(--ink-3); }
.week i { width: 100%; max-width: 38px; aspect-ratio: 1; border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); display: grid; place-items: center; color: var(--lime-ink); transition: transform 0.3s var(--spring), background-color 0.3s ease; }
.week i.done { background: var(--lime); }
.week i .ico { width: 16px; height: 16px; }
.week .today-mark { color: var(--ink); font-weight: 700; }
.week i.is-today { box-shadow: inset 0 0 0 2px var(--ink); }

.weak-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.weak-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); text-decoration: none; color: var(--ink); transition: background-color 0.2s ease, transform 0.3s var(--ease); }
.weak-list a:hover { background: var(--lime-soft); transform: translateX(3px); }
.weak-list .ico { width: 16px; height: 16px; color: var(--ink-3); }
.recent { list-style: none; margin: 0; padding: 0; display: grid; }
.recent li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.recent li:last-child { border-bottom: 0; }
.recent .mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.recent .mark .ico { width: 14px; height: 14px; }
.recent .mark.ok { background: var(--ok-soft); color: var(--ok); }
.recent .mark.bad { background: var(--red-soft); color: var(--red); }
.empty { display: grid; justify-items: start; gap: 10px; color: var(--ink-2); }
.empty p { margin: 0; }

/* ---------- стартовый тест ---------- */

.test-shell { max-width: 780px; margin-inline: auto; display: grid; gap: 18px; }
.test-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.test-top .avatar { width: 46px; height: 46px; }
.test-top > .tag { white-space: normal; text-align: right; max-width: 46vw; } /* длинные названия тем истории — в две строки, а не за край экрана */
.test-top-2 { grid-template-columns: minmax(0, 1fr) auto; } /* без Зубрика слева (разминка) */
.dots { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 5px; }
.dots i { height: 8px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 9%, transparent); transition: background-color 0.4s ease; }
.dots i.done { background: var(--forest); }
.dots i.now { background: var(--lime-2); }
:root[data-theme="dark"] .dots i.done { background: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dots i.done { background: var(--lime); } }
.skip-btn { background: transparent; border: 0; color: var(--ink-2); font: 600 15px/1 var(--font-body); padding: 12px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.skip-btn:hover { color: var(--ink); text-decoration-color: var(--ink); }
.start-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); }
.start-card .zubrik { width: 200px; }
@media (max-width: 680px) { .start-card { grid-template-columns: minmax(0, 1fr); } .start-card .zubrik { width: 140px; } }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row label { position: relative; }
.choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.choice-row span { display: block; padding: 10px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 600; font-size: 15px; cursor: pointer; transition: background-color 0.2s ease, box-shadow 0.2s ease; }
.choice-row span:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.choice-row input:checked + span { background: var(--forest); color: var(--on-forest); box-shadow: none; }
.choice-row input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.goal-out { font: 800 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }

.result-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-xl); }
.result-hero .zubrik { width: 220px; }
@media (max-width: 680px) { .result-hero { grid-template-columns: minmax(0, 1fr); } .result-hero .zubrik { width: 150px; } }
.result-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 8px 0 6px; }
.result-score b { font: 850 clamp(72px, 10vw, 112px)/0.85 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.result-score span { font-size: 18px; color: var(--ink-2); }
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.review { list-style: none; margin: 0; padding: 0; display: grid; }
.review li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.review li:last-child { border-bottom: 0; }
.review .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.review .mark .ico { width: 15px; height: 15px; }
.review .mark.ok { background: var(--ok-soft); color: var(--ok); }
.review .mark.bad { background: var(--red-soft); color: var(--red); }
.review .q { margin: 2px 0 4px; }
.review .meta { font-size: 14px; color: var(--ink-2); }

/* Документ: политика данных */
.doc { max-width: 720px; margin-inline: auto; display: grid; gap: 14px; }
.doc h2 { font-size: 21px; font-weight: 750; margin-top: 14px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* ======================================================================
   Версия 3.3: варианты ЦТ и ЦЭ, темы по годам, пасхалки, шлифовка
   ====================================================================== */

.tiny { font-size: 12.5px; }
.ico.flip { transform: rotate(180deg); }
.link:hover .ico.flip { transform: rotate(180deg) translateX(3px); }

/* Поля ответов: номера без текста, несколько номеров, соответствие */
.answers-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.answers-inline legend { width: 100%; }
.answers-inline .answer { grid-template-columns: 38px; padding: 6px; }
.answer-multi input:checked + .cell { border-radius: 10px; }
.match-options { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--bg-2); list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 16px; }
.match-options li { font-size: 16px; }
.match { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.match legend { margin-bottom: 4px; padding: 0; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.match-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; }
.match-row > b { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--forest); color: var(--lime); font: 800 17px/1 var(--font-body); }
.match-cells { display: flex; flex-wrap: wrap; gap: 6px; }
.match-cells label { position: relative; }
.match-cells input { position: absolute; opacity: 0; pointer-events: none; }
.match-cells span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-2); background: var(--surface); font: 600 15px/1 var(--font-mono); cursor: pointer; transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.25s var(--spring); }
.match-cells span:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.match-cells input:checked + span { background: var(--blue); color: #fff; box-shadow: none; transform: scale(1.06); }
.match-cells input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.task-note { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: var(--blue-soft); font-size: 14.5px; color: var(--ink); }
.task-note a { font-weight: 650; color: var(--ink); white-space: nowrap; }
.task-note.is-warn { background: color-mix(in srgb, #E39A2D 16%, transparent); }

/* Каталог вариантов */
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.paper-card { position: relative; display: grid; gap: 12px; align-content: start; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.paper-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.paper-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.paper-badge { padding: 6px 12px; border-radius: 10px; background: var(--forest); color: var(--lime); font: 800 14px/1 var(--font-body); letter-spacing: 0.04em; }
.topics-link { grid-template-columns: 52px minmax(0, 1fr) auto; display: grid; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); transition: transform 0.3s var(--ease); }
.topics-link:hover { transform: translateY(-2px); }
.topics-link .tile-ico { width: 52px; height: 52px; border-radius: 16px; }
.topics-link b { display: block; font-size: 17px; }
.topics-link > .ico { width: 20px; height: 20px; color: var(--ink-3); }

/* Режим экзамена */
.exam { max-width: 860px; display: grid; gap: 16px; }
.exam-head { display: grid; gap: 10px; }
.exam-bar { --lg-tint: var(--lg-tint-strong); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 82px); z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 20px; }
.exam-timer { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.exam-timer .ico { width: 16px; height: 16px; color: var(--ink-3); }
.exam-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.exam-nav::-webkit-scrollbar { display: none; }
.exam-nav a { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font: 650 13px/1 var(--font-body); text-decoration: none; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s var(--spring); }
.exam-nav a:hover { transform: translateY(-1px); color: var(--ink); }
.exam-nav a.is-done { background: var(--forest); color: var(--lime); box-shadow: none; }
.exam-nav a.is-here { box-shadow: inset 0 0 0 2px var(--ink); }
.exam-count { white-space: nowrap; color: var(--ink-2); }
@media (min-width: 900px) { .exam-nav { flex-wrap: wrap; overflow: visible; } }
.exam-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); font: 800 17px/1 var(--font-body); font-variant-numeric: tabular-nums; transition: background-color 0.3s ease, color 0.3s ease; }
.exam-task { scroll-margin-top: 160px; transition: box-shadow 0.3s ease; }
.exam-task.is-done .exam-num { background: var(--forest); color: var(--lime); }
.exam-task:target { box-shadow: inset 0 0 0 2px var(--lime-2), var(--shadow); }
.tag-link { text-decoration: none; padding: 4px 8px; }
.tag-link .ico { width: 15px; height: 15px; }
@media (max-width: 640px) { .exam-bar { grid-template-columns: auto auto; top: calc(env(safe-area-inset-top, 0px) + 72px); } .exam-nav { grid-column: 1 / -1; grid-row: 2; } }

/* Результат варианта */
.topic-score { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.topic-score li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 180px) 48px; gap: 12px; align-items: center; font-size: 15.5px; }
.topic-score li .bar { height: 8px; }
.topic-score b { text-align: right; }

/* Похожие задания */
.similar { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.similar a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); color: var(--ink); text-decoration: none; transition: background-color 0.2s ease, transform 0.3s var(--ease); }
.similar a:hover { background: var(--lime-soft); transform: translateX(3px); }
.similar-text { font-size: 15px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.similar .ico { width: 16px; height: 16px; color: var(--ink-3); }
@media (max-width: 560px) { .similar a { grid-template-columns: minmax(0, 1fr) auto; } .similar .tag { grid-column: 1 / -1; justify-self: start; } .similar-text { white-space: normal; } }

/* Темы по годам */
.type-table { display: grid; }
.type-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 140px auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.type-row:last-child { border-bottom: 0; }
.type-name { display: grid; gap: 2px; min-width: 0; }
.type-years { display: flex; flex-wrap: wrap; gap: 4px; }
.year-chip { padding: 3px 8px; border-radius: 8px; background: var(--lime-soft); font: 650 12.5px/1.4 var(--font-body); font-variant-numeric: tabular-nums; }
.type-acc { display: flex; align-items: center; gap: 8px; }
.type-acc .bar { height: 6px; }
@media (max-width: 760px) { .type-row { grid-template-columns: minmax(0, 1fr) auto; } .type-years { grid-column: 1 / -1; grid-row: 2; } .type-acc { grid-column: 1; grid-row: 3; } .type-row .btn { grid-column: 2; grid-row: 1 / span 3; } }
.topic-chips .tag { white-space: normal; }

/* ---------- пасхалка 6-7 ---------- */
.six7 { display: inline-flex; gap: 0.02em; padding: 0 0.12em; border-radius: 6px; background: color-mix(in srgb, var(--lime) 45%, transparent); font-weight: 750; cursor: pointer; }
.six7 b { display: inline-block; font-weight: inherit; }
.six7.is-on b:first-child { animation: six 0.6s ease-in-out 4; }
.six7.is-on b:last-child { animation: seven 0.6s ease-in-out 4; }
@keyframes six { 50% { transform: translateY(-0.28em); } }
@keyframes seven { 50% { transform: translateY(0.28em); } }
[data-67].is-on:not(.six7) { animation: bounce67 0.6s ease-in-out 3; display: inline-block; }
@keyframes bounce67 { 25% { transform: translateY(-6px) rotate(-3deg); } 75% { transform: translateY(4px) rotate(3deg); } }

.toast { position: fixed; z-index: 90; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 24px; background: linear-gradient(180deg, var(--lg-glow), transparent 50%), var(--lg-tint-strong); -webkit-backdrop-filter: blur(28px) saturate(190%); backdrop-filter: blur(28px) saturate(190%); color: var(--ink); box-shadow: inset 0 1px 0.5px var(--lg-edge), inset 0 0 0 0.5px var(--lg-edge-2), 0 0 0 0.5px var(--lg-line), var(--lg-drop); font: 750 17px/1.2 var(--font-display); cursor: pointer; animation: toast-in 0.6s var(--spring) both; max-width: calc(100vw - 32px); }
.toast.is-out { animation: toast-out 0.35s ease forwards; }
.toast .zubrik { width: 64px; flex: none; }
.toast small { display: block; font: 500 13.5px/1.3 var(--font-body); color: var(--ink-2); }
@keyframes toast-in { from { opacity: 0; transform: translateY(30px) scale(0.9); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(20px) scale(0.95); } }

.zb-bubble { position: fixed; z-index: 91; padding: 8px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); font: 700 15px/1.2 var(--font-body); pointer-events: none; transform: translate(-50%, -100%); animation: speech-in 0.4s var(--spring) both; white-space: nowrap; }
.zb-bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 0 0 3px 0; background: inherit; transform: rotate(45deg); }
.zb-bubble { max-width: min(300px, calc(100vw - 24px)); white-space: normal; text-align: center; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45); }
.zb-bubble.is-out { opacity: 0; transform: translate(-50%, -110%); transition: opacity 0.25s ease, transform 0.25s ease; }

.confetti { position: fixed; inset: 0; z-index: 95; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: confetti 2.6s cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }
@keyframes confetti { to { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--rot, 540deg)); opacity: 0.9; } }

/* ---------- шлифовка ---------- */
html { scroll-behavior: smooth; }
a, button, label, summary { -webkit-tap-highlight-color: transparent; }
.btn:focus-visible, .menu-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.topbar-cta-short { display: none; }
@media (max-width: 520px) {
  .topbar-cta { display: inline-flex; padding: 8px 14px; }
  .topbar-cta-full { display: none; }
  .topbar-cta-short { display: inline; }
  .menu-btn { margin-left: 0; }
  .menu-btn > span:last-child { display: none; }
  .menu-btn { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 900px) { .mascot .zubrik { width: min(280px, 70vw); } }
.card-pad, .paper-card, .feature, .how-step { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
img { height: auto; }

/* Формулы и чертежи из загрузчика РЕШУ ЦТ */
.task-text img.formula, .q img.formula { height: 1.45em; width: auto; vertical-align: middle; }
.task-text img.figure, .q img.figure { display: block; max-width: min(100%, 420px); margin: 12px 0; padding: 8px; border-radius: 12px; background: #fff; }
:root[data-theme="dark"] img.formula { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.formula { filter: invert(1) hue-rotate(180deg); } }

/* Меню открыто — страница под ним не прокручивается */
/* 11.7.1: страницу под меню держит класс html.menu-open (site.js), см. блок 11.7.1 в конце */

/* На телефонах без мыши карточки не «подпрыгивают» после касания */
@media (hover: none) {
  .feature:hover, .paper-card:hover, .tile:hover, .mtile:hover, .price:hover, .action:hover, .how-step:hover, .topics-link:hover,
  .btn-lime:hover, .btn-ink:hover, .btn-glass:hover, label.answer:hover { transform: none; }
}


/* ---------- английский с Сэром Зубриком ---------- */
:root { --uk-blue: #1F3B8C; --uk-blue-solid: #1F3B8C; --uk-red: #C8102E; --uk-red-solid: #C8102E; }
:root[data-theme="dark"] { --uk-blue: #A9BCF5; --uk-blue-solid: #2E4FB3; --uk-red: #FF7A8A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --uk-blue: #A9BCF5; --uk-blue-solid: #2E4FB3; --uk-red: #FF7A8A; } }

.sheet-new { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); font: 700 10.5px/1.3 var(--font-body); letter-spacing: 0.02em; vertical-align: 1px; }
.section-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }

.en-hero, .en-band { display: grid; align-items: center; border-radius: var(--r-xl); overflow: hidden; }
.en-hero { grid-template-columns: 230px minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); padding: clamp(20px, 3vw, 36px); }
.en-hero::before, .en-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(440px circle at 6% 112%, rgba(31, 59, 140, 0.2), transparent 62%),
    radial-gradient(380px circle at 102% -12%, rgba(200, 16, 46, 0.13), transparent 60%),
    radial-gradient(300px circle at 60% 120%, rgba(212, 245, 76, 0.2), transparent 60%);
}
.en-hero-zubrik .zubrik, .en-band-zubrik .zubrik { width: 100%; filter: drop-shadow(0 18px 24px rgba(20, 30, 60, 0.25)); }
.en-hero-text, .en-band-text { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.en-hero-text .h1 { font-size: clamp(34px, 4.6vw, 54px); }
.en-hero-text .h1 em { font-style: normal; color: var(--uk-blue); }
.en-hero-zubrik { display: grid; justify-items: center; }
.en-speech { display: grid; gap: 2px; text-align: center; margin-bottom: 4px; padding: 10px 16px; font-size: 16px; }
.en-speech small { font: 500 12.5px/1.3 var(--font-body); color: var(--ink-2); }
.en-hero-sm { grid-template-columns: 170px minmax(0, 1fr); }
@media (max-width: 720px) {
  .en-hero, .en-hero-sm { grid-template-columns: minmax(0, 1fr); }
  .en-hero-zubrik { width: 170px; margin: -6px auto -12px; }
}

.en-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .en-grid { grid-template-columns: minmax(0, 1fr); } }
.en-phrase, .en-stats { display: grid; gap: 14px; align-content: start; }
.en-big { margin: 0; font: 800 clamp(26px, 3.4vw, 38px)/1.1 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; }
.en-ru { margin: -4px 0 0; font-size: 18px; font-weight: 600; color: var(--uk-blue); }
.en-example { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); box-shadow: inset 3px 0 0 var(--uk-red); }
.en-example p { margin: 0; }
.en-tip { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.en-tip .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--accent-text); }

.say-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--uk-blue-solid);
  color: #FFFFFF;
  font: 650 14.5px/1 var(--font-body);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 14px -8px rgba(31, 59, 140, 0.85);
  transition: transform 0.35s var(--spring), background-color 0.2s ease;
}
.say-btn:hover { transform: translateY(-1px); }
.say-btn:active { transform: scale(0.95); }
.say-btn .ico { width: 18px; height: 18px; }
.say-btn.is-speaking .ico, .say-inline.is-speaking .ico { animation: say-pulse 0.7s ease-in-out infinite; }
@keyframes say-pulse { 50% { transform: scale(1.22); } }
.say-soft { background: color-mix(in srgb, var(--uk-blue-solid) 12%, transparent); color: var(--uk-blue); box-shadow: none; }
.say-icon { width: 40px; padding: 0; justify-content: center; flex: none; }
.say-inline { border: 0; background: none; padding: 0 6px 0 0; color: var(--uk-blue); cursor: pointer; vertical-align: -3px; }
.say-inline .ico { width: 16px; height: 16px; }
.no-tts .say-btn, .no-tts .say-inline { display: none; }

.en-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.en-numbers div { display: grid; gap: 4px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.en-numbers b { font: 850 28px/1 var(--font-display); letter-spacing: -0.03em; }
.en-numbers span { font-size: 13px; color: var(--ink-2); }

.en-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.en-topic { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.en-topic:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.en-topic-en { font: 700 12px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--uk-red); }
.en-topic b { font: 750 18px/1.2 var(--font-display); letter-spacing: -0.01em; }
.en-topic .tag { justify-self: start; }
.en-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.en-cat { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 10px 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; transition: background-color 0.2s ease; }
.en-cat .ico { width: 16px; height: 16px; color: var(--ink-3); transition: transform 0.3s var(--ease); }
.en-cat:hover { background: var(--lime-soft); }
.en-cat:hover .ico { transform: translateX(3px); }

.en-page .stack { grid-template-columns: minmax(0, 1fr); }
.en-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; min-width: 0; }
.en-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; max-width: 100%; min-width: 0; }
.en-chips::-webkit-scrollbar { display: none; }
.en-chip { flex: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--ink-2); background: color-mix(in srgb, var(--ink) 5%, transparent); transition: background-color 0.2s ease, color 0.2s ease; }
.en-chip:hover { color: var(--ink); }
.en-chip[aria-current="page"] { background: var(--ink); color: var(--bg); }
.en-toolbar-side { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.en-known { color: var(--ink-2); }
.en-known b { color: var(--ink); font-weight: 800; }

.phrase-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.phrase { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); transition: box-shadow 0.3s ease; }
.phrase.is-known { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 55%, transparent), var(--shadow-sm); }
.phrase.is-again { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--uk-red) 45%, transparent), var(--shadow-sm); }
.phrase-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.phrase-en { margin: 0; font: 750 21px/1.25 var(--font-display); letter-spacing: -0.015em; }
.phrase-ru { margin: 0; font-weight: 600; color: var(--uk-blue); }
.phrase-ex { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 15px; }
.phrase-ex p { margin: 0; }
.phrase-actions { display: flex; gap: 8px; margin: 2px 0 0; }
.mark-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink-2); font: 600 14px/1 var(--font-body); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, transform 0.35s var(--spring); }
.mark-btn .ico { width: 16px; height: 16px; }
.mark-btn:hover { color: var(--ink); }
.mark-btn:active { transform: scale(0.93); }
.mark-known.is-on { background: var(--ok); color: #FFFFFF; }
.mark-again.is-on { background: var(--uk-red-solid); color: #FFFFFF; }
.mark-btn.is-pop { animation: pop 0.45s var(--spring); }
.phrase-list.is-quiz [data-hide] { filter: blur(6px); opacity: 0.75; user-select: none; transition: filter 0.3s ease, opacity 0.3s ease; }
.phrase-list.is-quiz .phrase { cursor: pointer; }
.phrase-list.is-quiz .phrase.is-shown [data-hide] { filter: none; opacity: 1; }
.phrase-list:not(.is-quiz) .when-quiz, .phrase-list.is-quiz .phrase:not(.is-shown) .when-show, .phrase-list.is-quiz .phrase.is-shown .when-quiz { display: none; }
.phrase-word { font-size: 26px; }

.en-question { margin: 0; font: 600 clamp(20px, 2.4vw, 24px)/1.5 var(--font-body); letter-spacing: -0.005em; }
.en-passage { margin: 0 0 10px; padding: 12px 14px; border-left: 3px solid var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--ink); font: 400 16px/1.6 var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; }
.blank { display: inline-block; min-width: 76px; height: 1.05em; margin: 0 4px; border-bottom: 3px solid var(--uk-blue); vertical-align: -0.12em; }
mark.blank.is-filled { min-width: 0; height: auto; margin: 0 2px; padding: 0 6px; border-radius: 8px; background: var(--lime-soft); color: var(--ink); border-bottom: 3px solid var(--ok); font-weight: 750; }
.en-label { font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.en-input { max-width: 440px; font: 600 20px/1.2 var(--font-body); }

.en-test-q { display: grid; gap: 12px; margin: 0; border: 0; min-width: 0; }
.en-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); font: 800 15px/1 var(--font-body); }
.en-review summary { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; list-style: none; }
.en-review summary::-webkit-details-marker { display: none; }
.en-mark { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #FFFFFF; }
.en-review.is-ok .en-mark { background: var(--ok); }
.en-review.is-bad .en-mark { background: var(--red); }
.en-mark .ico { width: 16px; height: 16px; }
.en-review-q { font-weight: 600; line-height: 1.5; }

.en-band { grid-template-columns: 280px minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding: clamp(22px, 4vw, 44px); }
.en-band-phrase { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-edge-2), inset 0 1px 0.5px var(--lg-edge); max-width: 100%; }
.en-band-phrase > span { min-width: 0; }
.en-band-phrase span span { display: block; font-size: 14px; }
@media (max-width: 760px) {
  .en-band { grid-template-columns: minmax(0, 1fr); }
  .en-band-zubrik { width: 190px; margin: -10px auto -14px; }
}

.en-strip { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.en-strip-zubrik { width: 60px; flex: none; }
.en-strip-zubrik .zubrik { width: 60px; }
.en-strip-text { display: grid; gap: 2px; flex: 1; min-width: 200px; }
.en-strip-text b { font: 750 19px/1.2 var(--font-display); letter-spacing: -0.01em; }


/* ---------- предметы ---------- */
.subj-page .page-head .h1 em { font-style: normal; color: var(--accent-text); }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* на широком экране три карточки в ряд: Зубрик сверху, кнопка прижата к низу */
@media (min-width: 1080px) {
  .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live-grid .live-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: stretch; gap: 6px; }
  .live-grid .live-zubrik { width: 132px; margin: -6px 0 -4px -6px; }
  .live-grid .live-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .live-grid .live-body > .btn { margin-top: auto; }
  .live-grid .live-links { margin-bottom: 6px; }
}
.live-card { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; align-items: center; padding: clamp(18px, 2.6vw, 26px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); overflow: hidden; isolation: isolate; }
.live-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.9; }
.live-math::before { background: radial-gradient(320px circle at 0% 110%, color-mix(in srgb, var(--lime) 35%, transparent), transparent 65%); }
.live-english::before { background: radial-gradient(320px circle at 0% 110%, rgba(31, 59, 140, 0.18), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(200, 16, 46, 0.1), transparent 60%); }
.live-zubrik .zubrik { width: 100%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.18)); }
.live-body { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.live-body p { margin: 0; }
.live-title { font: 850 clamp(26px, 3vw, 34px)/1.05 var(--font-display); letter-spacing: -0.03em; }
.live-links { display: flex; flex-wrap: wrap; gap: 6px; }
.live-links a { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; transition: background-color 0.2s ease; }
.live-links a:hover { background: var(--lime-soft); }
.btn-uk { background: var(--uk-blue-solid); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px -12px rgba(31, 59, 140, 0.9); }
.btn-uk:hover { transform: translateY(-2px); }
@media (max-width: 520px) {
  .live-card { grid-template-columns: minmax(0, 1fr); }
  .live-zubrik { width: 130px; margin: -6px auto -10px; }
}
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.soon-card { display: grid; gap: 8px; align-content: start; justify-items: start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); scroll-margin-top: 100px; transition: box-shadow 0.3s ease, transform 0.35s var(--ease); }
.soon-card:target { box-shadow: inset 0 0 0 2px var(--lime-2), var(--shadow); }
.soon-card.is-voted { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 55%, transparent), var(--shadow-sm); }
.soon-glyph { display: grid; place-items: center; min-width: 54px; height: 44px; padding: 0 10px; border-radius: 14px; background: var(--forest); color: var(--lime); font: 800 17px/1 var(--font-display); letter-spacing: -0.01em; }
.soon-title { font: 750 17px/1.25 var(--font-display); letter-spacing: -0.01em; }
.soon-ava { display: block; width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 4px 10px -6px rgba(40, 30, 10, 0.5); }  /* v11.8: Зубрик Дарвин на карточке биологии */
.soon-teaser { color: var(--ink-2); margin-top: -4px; }
.soon-card form { margin: 4px 0 0; }
.vote-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); font: 600 14px/1 var(--font-body); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, transform 0.35s var(--spring); }
.vote-btn .ico { width: 16px; height: 16px; }
.vote-btn:hover { background: var(--lime-soft); }
.vote-btn:active { transform: scale(0.94); }
.vote-btn[aria-pressed="true"] { background: var(--ok); color: #FFFFFF; }
.vote-btn.is-pop { animation: pop 0.45s var(--spring); }

.live-title { display: flex; align-items: center; gap: 12px; }
.live-badge { width: 40px; height: 40px; border-radius: 12px; }


/* ---------- русский язык: коричневый, как сюртук и плед Зубра Сергеевича ---------- */
.course-ru { --uk-blue: #7A4A2B; --uk-blue-solid: #6E4227; --uk-red: #9A5B2A; --uk-red-solid: #8A5634; }
:root[data-theme="dark"] .course-ru { --uk-blue: #E2B48A; --uk-red: #F0C08F; --uk-blue-solid: #8A5634; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .course-ru { --uk-blue: #E2B48A; --uk-red: #F0C08F; --uk-blue-solid: #8A5634; } }
.course-ru .en-hero::before { background: radial-gradient(440px circle at 6% 112%, rgba(122, 74, 43, 0.24), transparent 62%), radial-gradient(380px circle at 102% -12%, rgba(154, 91, 42, 0.14), transparent 60%), radial-gradient(300px circle at 60% 120%, rgba(212, 245, 76, 0.2), transparent 60%); }
.btn-ru { background: #6E4227; color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px -12px rgba(110, 66, 39, 0.95); }
.btn-ru:hover { transform: translateY(-2px); }
.live-russian::before { background: radial-gradient(340px circle at 0% 110%, rgba(122, 74, 43, 0.34), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(154, 91, 42, 0.12), transparent 60%); }
:root[data-theme="dark"] .btn-ru { background: #8A5634; }
:root[data-theme="dark"] .live-russian::before { background: radial-gradient(320px circle at 0% 110%, rgba(196, 128, 72, 0.3), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(196, 128, 72, 0.1), transparent 60%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-ru { background: #8A5634; }
  :root:not([data-theme="light"]) .live-russian::before { background: radial-gradient(320px circle at 0% 110%, rgba(196, 128, 72, 0.3), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(196, 128, 72, 0.1), transparent 60%); }
}

/* ---------- стартовый тест: выбор предметов, шаги, переход, общий анализ ---------- */
.pick-subjects { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pick { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); cursor: pointer; transition: box-shadow 0.2s ease, transform 0.35s var(--spring), background-color 0.2s ease; }
.pick:active { transform: scale(0.97); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-badge { flex: none; width: 40px; height: 40px; border-radius: 12px; overflow: hidden; }
.pick-badge svg { display: block; width: 100%; height: 100%; }
.pick-text { min-width: 0; flex: 1; }
.pick-text b { display: block; font: 700 15px/1.2 var(--font-body); }
.pick-text small { display: block; font-size: 12.5px; color: var(--ink-3); }
.pick-check { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); color: transparent; transition: background-color 0.2s ease, color 0.2s ease, transform 0.35s var(--spring); }
.pick-check .ico { width: 15px; height: 15px; }
.pick:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ok); background: color-mix(in srgb, var(--ok-soft) 70%, var(--surface)); }
.pick:has(input:checked) .pick-check { background: var(--ok); color: #FFFFFF; box-shadow: none; transform: scale(1.08); }
.pick:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

.jsteps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.jstep { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink-3); font: 600 14px/1 var(--font-body); }
.jstep-dot { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12.5px; }
.jstep-dot .ico { width: 14px; height: 14px; }
.jstep.is-done { color: var(--ink-2); }
.jstep.is-done .jstep-dot { background: var(--ok); color: #FFFFFF; box-shadow: none; }
.jstep.is-now { background: var(--ink); color: var(--bg); }
.jstep.is-now .jstep-dot { background: var(--lime); color: var(--lime-ink); box-shadow: none; }

.next-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); align-items: center; padding: clamp(20px, 3vw, 32px); border-radius: var(--r-xl); --lg-tint: var(--lg-tint-strong); }
.next-card form { margin: 0; }
.next-squad { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.next-squad .zubrik { width: 100%; }
.next-done { width: 74px; margin-right: -14px; position: relative; opacity: 0.9; }
.next-done i { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #FFFFFF; box-shadow: 0 0 0 3px var(--surface); }
.next-done i .ico { width: 13px; height: 13px; }
.next-now { width: 160px; position: relative; z-index: 1; }
.next-done-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--ok-soft); font-size: 14.5px; line-height: 1.4; }
.next-done-line .ico { width: 16px; height: 16px; color: var(--ok); }
@media (max-width: 640px) { .next-card { grid-template-columns: minmax(0, 1fr); } .next-squad { max-width: 260px; margin: -6px auto 0; } }

.summary-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(16px, 3vw, 36px); align-items: center; padding: clamp(20px, 4vw, 40px); }
.summary-squad { display: flex; align-items: flex-end; justify-content: center; }
.summary-squad > span { flex: 1; max-width: 170px; margin: 0 -10px; }
.summary-squad > span:nth-child(2) { transform: translateY(-8px); z-index: 1; }
.summary-squad .zubrik { width: 100%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.35)); }
@media (max-width: 760px) { .summary-hero { grid-template-columns: minmax(0, 1fr); } }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.summary-card { display: grid; gap: 12px; align-content: start; }
.summary-head { display: flex; align-items: center; gap: 12px; }
.summary-head .subj-badge { width: 42px; height: 42px; border-radius: 13px; }
.summary-score { display: flex; align-items: center; gap: 14px; }
.summary-score b { font: 850 52px/0.9 var(--font-display); letter-spacing: -0.04em; }
.summary-score b small { font-size: 24px; color: var(--ink-3); }
.summary-score span { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.summary-plan { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.summary-plan a { color: var(--accent-text); font-weight: 600; }


/* ---------- «Почему Зубрик»: сравнение с репетитором и ИИ-чатом ---------- */
.vs { display: grid; max-width: 1040px; margin: 0 auto; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); overflow: hidden; }
.vs-row { display: grid; grid-template-columns: minmax(150px, 1fr) 1.35fr 1fr 1fr; border-top: 1px solid var(--line); }
.vs-row > * { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; }
.vs-head { border-top: 0; font: 750 16px/1.2 var(--font-display); letter-spacing: -0.01em; }
.vs-head > * { align-items: center; padding: 14px 16px; }
.vs-head .ico { width: 18px; height: 18px; color: var(--ink-2); }
.vs-zubr { background: color-mix(in srgb, var(--lime) 15%, transparent); }
.vs-head .vs-zubr { background: color-mix(in srgb, var(--lime) 32%, transparent); }
.vs-row:last-child .vs-zubr { padding-bottom: 18px; }
.vs-avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); overflow: hidden; }
.vs-avatar .zubrik { width: 42px; margin-top: 6px; }
.vs-what { align-items: center !important; font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.vs-cell { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.vs-cell.vs-zubr { color: var(--ink); font-weight: 600; }
.vs-mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 0; border-radius: 50%; font-style: normal; }
.vs-mark .ico { width: 13px; height: 13px; stroke-width: 3; }
.vs-yes .vs-mark { background: var(--ok); color: #FFFFFF; }
.vs-part .vs-mark { background: color-mix(in srgb, #E8A23A 24%, transparent); color: #A86400; }
.vs-no .vs-mark { background: var(--red-soft); color: var(--red); }
.vs-who { display: none; }
.vs-note { margin: 12px 0 0; text-align: center; }
.vs-note a { color: inherit; }
.why-faq { display: grid; gap: 16px; margin: clamp(44px, 6vw, 68px) auto 0; }
:root[data-theme="dark"] .vs-part .vs-mark { color: #F2B866; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vs-part .vs-mark { color: #F2B866; } }
@media (max-width: 760px) {
  .vs { gap: 12px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .vs-head { display: none; }
  .vs-row { grid-template-columns: minmax(0, 1fr); border: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); overflow: hidden; }
  .vs-row > * { padding: 10px 16px; }
  .vs-what { padding-top: 16px !important; font-size: 17px; }
  .vs-row:last-child .vs-zubr { padding-bottom: 10px; }
  .vs-cell:last-child { padding-bottom: 16px; }
  .vs-who { display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
}
:root[data-theme="dark"] .vs-zubr { background: color-mix(in srgb, var(--lime) 9%, transparent); }
:root[data-theme="dark"] .vs-head .vs-zubr { background: color-mix(in srgb, var(--lime) 18%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vs-zubr { background: color-mix(in srgb, var(--lime) 9%, transparent); }
  :root:not([data-theme="light"]) .vs-head .vs-zubr { background: color-mix(in srgb, var(--lime) 18%, transparent); }
}


/* ---------- стартовый тест: свой ползунок цели для каждого предмета ---------- */
.goals { display: grid; gap: 18px; }
.goal-row[hidden] { display: none; }
.goal-row.is-new { animation: goal-in 0.4s var(--spring); }
@keyframes goal-in { from { opacity: 0; transform: translateY(-8px); } }
.goal-russian { --slider: #A0662F; }
.goal-english { --slider: #3B5BC4; }
.summary-goal { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--ink-2); }
.summary-goal .ico { width: 16px; height: 16px; flex: none; color: var(--accent-text); }

/* ---------- главная: три предмета — три Зубрика ---------- */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trio-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 22px 22px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); color: var(--ink); text-decoration: none; overflow: hidden; isolation: isolate; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.trio-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); }
.trio-card::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.trio-math::before { background: radial-gradient(300px circle at 0% 110%, color-mix(in srgb, var(--lime) 35%, transparent), transparent 65%); }
.trio-russian::before { background: radial-gradient(300px circle at 0% 110%, rgba(122, 74, 43, 0.3), transparent 65%); }
.trio-english::before { background: radial-gradient(300px circle at 0% 110%, rgba(31, 59, 140, 0.2), transparent 65%), radial-gradient(240px circle at 110% -10%, rgba(200, 16, 46, 0.1), transparent 60%); }
.trio-zubrik { width: 140px; margin: -4px 0 -2px -8px; }
.trio-zubrik .zubrik { width: 100%; display: block; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.16)); }
.trio-head { display: flex; align-items: center; gap: 10px; font: 850 24px/1.1 var(--font-display); letter-spacing: -0.025em; }
.trio-badge { width: 34px; height: 34px; border-radius: 10px; }
.trio-who { color: var(--ink-2); font-weight: 650; font-size: 14px; }
.trio-text { color: var(--ink-2); font-size: 15px; line-height: 1.45; margin-bottom: 8px; }
.trio-card .btn { margin-top: auto; pointer-events: none; }
@media (max-width: 900px) and (min-width: 641px) { .trio { grid-template-columns: minmax(0, 1fr); } .trio-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 18px; } .trio-zubrik { grid-row: span 5; width: 120px; } }


/* ======================================================================
   Телефон (до 640px): плотнее, ленты со свайпом вместо длинных столбиков
   ====================================================================== */
@media (max-width: 640px) {
  .section { padding-block: 44px; }
  .section-head { gap: 10px; margin-bottom: 22px; }
  .h1 { font-size: 34px; }
  .h2 { font-size: 30px; line-height: 1.05; }
  .lead { font-size: 16.5px; }
  .card-pad { padding: 18px; }

  /* ленты: карточки листаются пальцем, следующая выглядывает справа */
  .m-scroll { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter-l); margin-inline: calc(-1 * var(--gutter-l)) calc(-1 * var(--gutter-r)); padding: 4px var(--gutter-r) 16px var(--gutter-l); scrollbar-width: none; }
  .m-scroll::-webkit-scrollbar { display: none; }
  .m-scroll > * { scroll-snap-align: start; }
  .js .m-scroll [data-reveal] { opacity: 1; translate: none; }

  /* первый экран: Зубрик маленький сверху, кнопки во всю ширину */
  .hero2 { gap: 0; }
  .hero2 .mascot { order: -1; justify-items: start; margin: -6px 0 -4px; }
  .mascot .zubrik { width: 118px; }
  .mascot .speech { position: absolute; left: 112px; top: 26px; margin: 0; padding: 10px 14px; border-radius: 16px 16px 16px 4px; font-size: 15px; }
  .mascot .speech::after { display: none; }
  .hero2 h1 { font-size: 38px; margin: 12px 0 14px; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }

  /* как это работает и что умеет Зубрик — ленты */
  .how-step { padding: 18px; gap: 12px; }
  .how-visual { height: 112px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; align-content: start; }
  .feature .tile-ico { width: 44px; height: 44px; border-radius: 14px; }
  .feature h3 { font-size: 19px; }
  .feature p { font-size: 15px; }

  /* три Зубрика */
  .trio { grid-auto-columns: 78%; }
  .trio-card { padding: 16px 18px 18px; }
  .trio-zubrik { width: 118px; }
  .trio-head { font-size: 21px; }

  /* цены: шаги пробного периода компактнее */
  .trial-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .trial-steps div { padding: 0 8px 0 0; display: block; }
  .trial-steps div::before { display: block; left: 12px; right: 0; top: 8px; width: auto; height: 2px; bottom: auto; }
  .trial-steps div:last-child::before { display: none; }
  .faq summary { padding: 16px 18px; font-size: 16.5px; }
  .faq .answer-text { padding: 0 18px 16px; font-size: 15.5px; }
  .trial-steps b { font-size: 13.5px; }
  .trial-steps span { font-size: 12.5px; line-height: 1.35; display: block; }
  .trial-steps i { width: 18px; height: 18px; margin-bottom: 10px; }
  .trial-steps div::before { top: 8px; }

  /* сравнение: Зубрик крупно, репетитор и ИИ-чат в две колонки */
  .vs-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vs-what, .vs-cell.vs-zubr { grid-column: 1 / -1; }
  .vs-row > * { padding: 9px 14px; }
  .vs-cell:not(.vs-zubr) { font-size: 13.5px; line-height: 1.35; padding-bottom: 14px; }
  .vs-cell:not(.vs-zubr) .vs-mark { width: 18px; height: 18px; }
  .vs-cell:not(.vs-zubr) .vs-mark .ico { width: 11px; height: 11px; }
  .vs-cell:last-child { padding-bottom: 14px; }
  .vs-cell.vs-zubr { padding-block: 11px; }

  /* подвал: в две колонки и мельче */
  .site-footer { margin-top: 40px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 16px; padding-block: 28px 16px; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .foot-grid h4 { margin-bottom: 8px; }
  .foot-grid ul { gap: 6px; }
  .foot-grid ul a { font-size: 14.5px; }
  .foot-slogan { font-size: 16px; margin-top: 10px; }
  .foot-bottom { padding-block: 14px 26px; font-size: 12.5px; }

  /* стартовый тест: без лишней рамки, Зубрик в углу */
  .start-card { position: relative; grid-template-columns: minmax(0, 1fr); padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .start-card > .zubrik { position: absolute; top: -10px; right: -6px; width: 96px; }
  .start-card .h1 { padding-right: 92px; }
  .start-card .lead { font-size: 16px !important; }

  /* предметы: Зубрик слева, текст справа, «скоро» в две колонки */
  .live-grid .live-card, .live-card { grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: none; gap: 12px; padding: 16px; align-items: start; }
  .live-grid .live-zubrik, .live-zubrik { width: 96px; margin: 0 0 0 -8px; }
  .live-title { font-size: 23px; gap: 8px; }
  .live-badge { width: 30px; height: 30px; border-radius: 9px; }
  .live-body { gap: 8px; }
  .live-body > .btn { margin-top: 4px; }
  .soon-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .soon-card { padding: 14px; gap: 6px; }
  .soon-glyph { min-width: 44px; height: 36px; border-radius: 12px; font-size: 15px; }
  .soon-ava { width: 46px; height: 46px; border-radius: 13px; }
  .soon-title { font-size: 15px; }
  .soon-card form, .soon-card .vote-btn { width: 100%; }
  .vote-btn { justify-content: center; height: 34px; padding: 0 8px; font-size: 12.5px; white-space: nowrap; }
  .vote-btn .ico { display: none; }
  .live-body > .btn { padding-inline: 16px; font-size: 14.5px; white-space: nowrap; }

  /* раздел языка: Зубрик рядом с репликой, темы в две колонки */
  .en-hero, .en-hero-sm { padding: 18px; gap: 12px; }
  .en-hero-zubrik { width: auto; margin: 0; grid-template-columns: minmax(0, 1fr) 124px; align-items: end; gap: 6px; }
  .en-hero-zubrik .speech { margin: 0 0 18px; border-radius: 18px 18px 4px 18px; }
  .en-hero-zubrik .speech::after { display: none; }
  .en-hero-text .h1 { font-size: 32px; }
  .en-topics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .en-topic { padding: 14px; gap: 6px; }
  .en-topic b { font-size: 15.5px; }
  .en-topic .muted, .en-topic small, .en-topic p { font-size: 13px; }
  .en-topic-en { font-size: 10.5px; }
}


/* ---------- история: синий мундир, красный воротник и золото эполет Зубрика Бонапарта ---------- */
.course-nap { --uk-blue: #24346E; --uk-blue-solid: #1E2B5E; --uk-red: #A3262E; --uk-red-solid: #A3262E; --nap-gold: #B8892A; }
:root[data-theme="dark"] .course-nap { --uk-blue: #B4C2F2; --uk-red: #F08C8C; --uk-blue-solid: #34488F; --nap-gold: #E3BE62; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .course-nap { --uk-blue: #B4C2F2; --uk-red: #F08C8C; --uk-blue-solid: #34488F; --nap-gold: #E3BE62; } }
.course-nap .en-hero::before { background: radial-gradient(440px circle at 6% 112%, rgba(30, 43, 94, 0.24), transparent 62%), radial-gradient(380px circle at 102% -12%, rgba(163, 38, 46, 0.14), transparent 60%), radial-gradient(300px circle at 60% 120%, rgba(184, 137, 42, 0.2), transparent 60%); }
.btn-nap { background: #1E2B5E; color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(184, 137, 42, 0.55), 0 10px 24px -12px rgba(30, 43, 94, 0.95); }
.btn-nap:hover { transform: translateY(-2px); }
:root[data-theme="dark"] .btn-nap { background: #34488F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-nap { background: #34488F; } }
.live-history::before { background: radial-gradient(340px circle at 0% 110%, rgba(30, 43, 94, 0.26), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(184, 137, 42, 0.16), transparent 60%); }
.trio-history::before { background: radial-gradient(300px circle at 0% 110%, rgba(30, 43, 94, 0.24), transparent 65%), radial-gradient(240px circle at 110% -10%, rgba(184, 137, 42, 0.14), transparent 60%); }
.course-nap .en-topic-en { color: var(--nap-gold); }
.course-nap .exam-nav a { width: 40px; }
.course-nap .exam-nav a.is-done, .course-nap .exam-task.is-done .exam-num { background: #1E2B5E; color: #F3D27A; }
.hx-date-big { font-variant-numeric: tabular-nums; }

/* задания части B: источник, список, два столбца, поле «цифрами» */
.hq-source { margin: 0; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--nap-gold, #B8892A) 10%, transparent); box-shadow: inset 3px 0 0 var(--nap-gold, #B8892A); font: italic 500 16px/1.55 var(--font-body); }
.hq-source cite { display: block; margin-top: 6px; font: 600 13px/1.3 var(--font-body); font-style: normal; color: var(--ink-3); }
.hq-items, .hq-col { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hq-items li, .hq-col li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 16px; line-height: 1.4; }
.hq-n { flex: none; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 7px; display: grid; place-items: center; background: var(--uk-blue-solid, #1E2B5E); color: #FFFFFF; font: 750 13px/1 var(--font-body); }
.hq-match { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hq-match .hq-col:first-child .hq-n { background: var(--uk-red-solid, #A3262E); }
@media (max-width: 560px) { .hq-match { grid-template-columns: minmax(0, 1fr); } }
.hq-hint { margin: 0; }
.hq-code { font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.hx-qnum { display: inline-block; min-width: 34px; margin-right: 4px; color: var(--uk-blue); font-variant-numeric: tabular-nums; }
.hx-exam-num { width: auto; min-width: 46px; padding: 0 8px; }
.hx-part { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.hx-part small { font-size: 15px; font-weight: 500; }

/* цвета разделов программы */
.hx-seg-1 { --seg: #8C6A43; } .hx-seg-2 { --seg: #6E8B3D; } .hx-seg-3 { --seg: #2F7F6E; } .hx-seg-4 { --seg: #2F5D8C; }
.hx-seg-5 { --seg: #24346E; } .hx-seg-6 { --seg: #A3262E; } .hx-seg-7 { --seg: #7A4FA0; } .hx-seg-8 { --seg: #2E7D4F; } .hx-seg-9 { --seg: #B8892A; }

/* «Как устроен ЦТ»: числа и полоса разделов */
.hx-spec { gap: 16px; }
.hx-spec-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hx-spec-nums div { display: grid; gap: 4px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.hx-spec-nums b { font: 850 30px/1 var(--font-display); letter-spacing: -0.03em; }
.hx-spec-nums span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 640px) { .hx-spec-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hx-spec-bar { display: flex; gap: 3px; height: 34px; }
.hx-seg { flex: var(--n) 1 0; display: grid; place-items: center; border-radius: 8px; background: var(--seg); color: #FFFFFF; font: 750 13px/1 var(--font-body); min-width: 0; }
.hx-spec-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 6px 16px; }
.hx-spec-legend li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; }
.hx-spec-legend i { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--seg); }
.hx-spec-legend a { color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-spec-legend a:hover { text-decoration: underline; }
.hx-spec-legend b { margin-left: auto; color: var(--ink-2); }

/* разделы на обзоре */
.hx-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.hx-sec { position: relative; display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); scroll-margin-top: 100px; overflow: hidden; }
.hx-sec::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--seg, var(--uk-blue-solid)); }
.hx-sec:has(.hx-seg-1) { --seg: #8C6A43; } .hx-sec:has(.hx-seg-2) { --seg: #6E8B3D; } .hx-sec:has(.hx-seg-3) { --seg: #2F7F6E; }
.hx-sec:has(.hx-seg-4) { --seg: #2F5D8C; } .hx-sec:has(.hx-seg-5) { --seg: #24346E; } .hx-sec:has(.hx-seg-6) { --seg: #A3262E; }
.hx-sec:has(.hx-seg-7) { --seg: #7A4FA0; } .hx-sec:has(.hx-seg-8) { --seg: #2E7D4F; } .hx-sec:has(.hx-seg-9) { --seg: #B8892A; }
.hx-sec-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hx-sec-badge { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--seg); color: #FFFFFF; font: 850 17px/1 var(--font-display); }
.hx-sec-years { font: 700 12.5px/1 var(--font-mono); letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-2); }
.hx-sec-top .tag { margin-left: auto; }
.hx-sec-title { margin: 0; font: 780 19px/1.25 var(--font-display); letter-spacing: -0.012em; }
.hx-sec-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-sec-topics a { padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: background-color 0.2s ease; }
.hx-sec-topics a:hover { background: color-mix(in srgb, var(--seg) 18%, transparent); }
.hx-sec-results { display: grid; gap: 8px; }
.hx-sec-result { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(120px, 1fr); gap: 10px; align-items: center; color: var(--ink); text-decoration: none; }
.hx-sec-result .hx-sec-num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 7%, transparent); font: 750 14px/1 var(--font-body); }
.hx-sec-name { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-bad > span { background: linear-gradient(90deg, #E8806F, var(--red)); }
@media (max-width: 520px) { .hx-sec-result { grid-template-columns: 30px minmax(0, 1fr); } .hx-sec-result .meter { grid-column: 2; } }

/* список конспектов */
.hx-jump { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); z-index: 20; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hx-theory-sec, .hx-tl-group { display: grid; gap: 14px; scroll-margin-top: 150px; }
.hx-theory-head { display: flex; gap: 14px; align-items: center; }
.hx-theory-head .h3 { margin: 0; }

/* конспект темы */
.hx-crumbs { display: flex; gap: 8px; flex-wrap: wrap; color: var(--ink-3); }
.hx-crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.hx-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.hx-topic-head { grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 20px; position: relative; overflow: hidden; isolation: isolate; }
.hx-topic-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(360px circle at 100% 120%, rgba(30, 43, 94, 0.16), transparent 62%), radial-gradient(300px circle at 0% -20%, rgba(184, 137, 42, 0.12), transparent 60%); }
.hx-topic-title { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.hx-topic-title .h1 { font-size: clamp(30px, 4vw, 46px); text-wrap: balance; }
.hx-topic-title .lead { margin: 0; }
.hx-topic-zubrik .zubrik { width: 100%; filter: drop-shadow(0 14px 18px rgba(20, 30, 60, 0.22)); }
@media (max-width: 640px) { .hx-topic-head { grid-template-columns: minmax(0, 1fr); } .hx-topic-zubrik { display: none; } }
.hx-topic-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 920px) { .hx-topic-grid { grid-template-columns: minmax(0, 1fr); } }
.hx-topic-side { position: sticky; top: 96px; }
@media (max-width: 920px) { .hx-topic-side { position: static; } }
.hx-block .h3 { margin: 0; }
.hx-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hx-points li { position: relative; padding-left: 20px; font-size: 16.5px; line-height: 1.55; }
.hx-points li::before { content: ""; position: absolute; left: 3px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--nap-gold, #B8892A); }
.hx-points b { font-weight: 750; color: var(--ink); }
.hx-traps { background: color-mix(in srgb, var(--uk-red) 7%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--uk-red) 22%, transparent); }
.hx-traps-head { display: flex; gap: 12px; align-items: center; }
.hx-traps-head .h3 { margin: 0; color: var(--uk-red); }
.hx-traps .hx-points li::before { background: var(--uk-red); }
.hx-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hx-date { display: grid; grid-template-columns: minmax(84px, 38%) minmax(0, 1fr); gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14.5px; line-height: 1.4; box-shadow: inset 3px 0 0 var(--uk-blue-solid); }
.hx-date.is-world { box-shadow: inset 3px 0 0 var(--nap-gold, #B8892A); }
.hx-date:nth-child(odd) { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.hx-date b { font-variant-numeric: tabular-nums; }
.hx-legend { display: flex; gap: 8px; align-items: center; margin: 0; }
.hx-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--uk-blue-solid); }
.hx-legend i.is-world { background: var(--nap-gold, #B8892A); margin-left: 8px; }
.hx-dl { margin: 0; display: grid; gap: 4px; }
.hx-dl dt { font-weight: 750; font-size: 15px; }
.hx-dl dd { margin: 0 0 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.hx-pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.hx-pager-link { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; transition: transform 0.3s var(--ease); }
.hx-pager-link:hover { transform: translateY(-2px); }
.hx-pager-link small { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 600; }
.hx-pager-link small .ico { width: 14px; height: 14px; }
.hx-pager-link.is-next { text-align: right; justify-items: end; grid-column: 2; }
@media (max-width: 560px) { .hx-pager { grid-template-columns: minmax(0, 1fr); } .hx-pager-link.is-next { grid-column: 1; } }

/* лента времени: мир слева, Беларусь справа */
.hx-tl { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; row-gap: 10px; }
.hx-tl::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(var(--line-2), var(--line-2)); }
.hx-tl-item { position: relative; min-width: 0; }
.hx-tl-item.is-world { grid-column: 1; }
.hx-tl-item.is-by { grid-column: 2; }
.hx-tl-item::after { content: ""; position: absolute; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--uk-blue-solid); box-shadow: 0 0 0 3px var(--bg); }
.hx-tl-item.is-world::after { right: -24px; background: var(--nap-gold, #B8892A); }
.hx-tl-item.is-by::after { left: -24px; }
.hx-tl-card { display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.hx-tl-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.hx-tl-item.is-world .hx-tl-card { text-align: right; }
.hx-tl-when { font: 800 16px/1.25 var(--font-display); color: var(--uk-blue); font-variant-numeric: tabular-nums; }
.hx-tl-item.is-world .hx-tl-when { color: var(--nap-gold, #B8892A); }
.hx-tl-what { font-size: 15px; line-height: 1.4; }
.hx-tl-tag { display: none; }
.hx-tl.is-one { grid-template-columns: minmax(0, 1fr); padding-left: 24px; }
.hx-tl.is-one::before { left: 4px; }
.hx-tl.is-one .hx-tl-item { grid-column: 1; }
.hx-tl.is-one .hx-tl-item::after { left: -24px; right: auto; }
.hx-tl.is-one .hx-tl-item.is-world .hx-tl-card { text-align: left; }
@media (max-width: 720px) {
  .hx-tl, .hx-tl.is-one { grid-template-columns: minmax(0, 1fr); padding-left: 24px; }
  .hx-tl::before { left: 4px; }
  .hx-tl-item.is-world, .hx-tl-item.is-by { grid-column: 1; }
  .hx-tl-item.is-world::after, .hx-tl-item.is-by::after { left: -24px; right: auto; }
  .hx-tl-item.is-world .hx-tl-card { text-align: left; }
  .hx-tl-tag { display: block; font-size: 12px; font-weight: 650; color: var(--ink-3); }
}

/* Зубрик Бонапарт (история): синий мундир, белый камзол, лента, ордена, эполеты, чуб; копыто за бортом мундира */
.zubrik-nap .zb-torso { fill: #1E2B5E; }
.zubrik-nap .zb-arm > path:first-child, .zubrik-nap .zb-facepalm > path:first-child { fill: #1E2B5E; }
.zubrik-nap .zb-arm > path:nth-child(2), .zubrik-nap .zb-facepalm > path:nth-child(2) { stroke: #2E3E7A; }
.zubrik-nap .zb-scarf-all, .zubrik-nap .zb-scarf-line, .zubrik-nap .zb-scarf-tail, .zubrik-nap .zb-scarf-knot,
.zubrik-nap .zb-beard, .zubrik-nap .zb-beard-lines, .zubrik-nap .zb-mane, .zubrik-nap .zb-pencil, .zubrik-nap .zb-hat { display: none; }
.zubrik-nap .zb-nap-pose > g { transition: opacity 0.25s ease; }
.zubrik-nap .zb-nap-hair { transform-box: fill-box; transform-origin: 50% 90%; animation: zb-mane 4.8s ease-in-out infinite; }
.zubrik-nap.is-wind .zb-nap-hair { animation: zb-flutter 0.16s linear infinite alternate; }
/* двууголка надета всегда; при наведении Бонапарт приподнимает её */
.zubrik-nap .zb-nap-hat { transform-origin: 120px 64px; transition: transform 0.55s var(--spring); }
.zubrik-nap:hover .zb-nap-hat { transform: translateY(-9px) rotate(-7deg); }  /* приподнимает шляпу */
/* рука за бортом камзола, как на картине Давида; когда машет, радуется или читает — обеими копытами */
.zubrik-nap[data-mood="cheer"] .zb-nap-pose > g, .zubrik-nap[data-mood="dance"] .zb-nap-pose > g, .zubrik-nap[data-mood="read"] .zb-nap-pose > g,
.zubrik-nap[data-mood="write"] .zb-nap-pose > g, .zubrik-nap[data-mood="tea"] .zb-nap-pose > g, .zubrik-nap.is-yawn .zb-nap-pose > g,
.zubrik-nap[data-mood="point"] .zb-nap-pose > g { opacity: 0; }
.zubrik-nap[data-mood="proud"] .zb-arm-r { opacity: 0; }
.zubrik-nap.is-peek .zb-nap-pose, .zubrik-nap.is-peek .zb-nap-coat .zb-nap-epaulet { display: none; }
.zubrik-nap .zb-cup-body { fill: #F6F3EC; }
.zubrik-nap .zb-cup-handle { stroke: #DCD6C8; }
.zubrik-nap .zb-cup-mark { stroke: #1E2B5E; }

/* nap-ride:start — Зубрик Бонапарт и Маренго, покой (сгенерировано scripts/gen_ride.py; заезд — static/ride.css) */
.zubrik-ride { display: block; width: 100%; height: auto; overflow: hidden; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.zubrik-ride:focus { outline: none; }
.zubrik-ride:focus-visible { outline: 3px solid var(--nap-gold, #B8892A); outline-offset: 4px; border-radius: 18px; }
.zubrik-ride .zubrik { filter: none; }
.zubrik-ride .nr-move { transform: translate(-23.8px, 115.2px) scale(0.46); }
.zubrik-ride .nr-all { transform-origin: 140px 283px; }
.zubrik-ride .nr-show, .zubrik-ride .nr-cape-wrap, .zubrik-ride .nr-dust, .zubrik-ride .nr-neigh, .zubrik-ride .nr-speed, .zubrik-ride .nr-poof { opacity: 0; }
.zubrik-ride .nr-rider .zb-shadow { display: none; }
.zubrik-ride .nr-lid { opacity: 0; }
/* покой: конь ждёт поодаль — дышит, помахивает хвостом, моргает, шевелит ухом, иногда кивает */
.zubrik-ride .nr-body { transform-origin: 186px 226px; animation: nr-breathe 3.6s ease-in-out infinite; }
.zubrik-ride .nr-head { animation: nr-idle-head 7.5s ease-in-out infinite; }
.zubrik-ride .nr-tail { animation: nr-idle-tail 3.4s ease-in-out infinite; }
.zubrik-ride .nr-mane { animation: nr-mane 2.6s ease-in-out infinite alternate; }
.zubrik-ride .nr-ear { animation: nr-ear 5.2s ease-in-out infinite; }
.zubrik-ride .nr-lid { animation: nr-blink 4.8s linear infinite; }
@keyframes nr-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.008, 1.018); } }
@keyframes nr-idle-head { 0%, 58%, 100% { transform: rotate(0deg); } 66% { transform: rotate(8deg); } 72% { transform: rotate(5deg); } 78% { transform: rotate(8deg); } 88% { transform: rotate(-1.5deg); } }
@keyframes nr-idle-tail { 0%, 100% { transform: rotate(-3deg); } 45% { transform: rotate(7deg); } 60% { transform: rotate(5deg); } }
@keyframes nr-mane { from { transform: rotate(-1.5deg); } to { transform: rotate(2.5deg); } }
@keyframes nr-ear { 0%, 70%, 100% { transform: rotate(0deg); } 74% { transform: rotate(-16deg); } 80% { transform: rotate(4deg); } 86% { transform: rotate(0deg); } }
@keyframes nr-blink { 0%, 93%, 100% { opacity: 0; } 95%, 97% { opacity: 1; } }
/* второй клик подряд — конь настораживается: поднимает голову и уши (подсказка: ещё раз — и поскачем) */
.zubrik-ride.is-alert .nr-head { animation: nr-alert 0.9s cubic-bezier(.3, .7, .3, 1); }
.zubrik-ride.is-alert .nr-ear { animation: nr-alert-ear 0.9s ease-in-out; }
@keyframes nr-alert { 0%, 100% { transform: rotate(0deg); } 35%, 62% { transform: rotate(-9deg); } }
@keyframes nr-alert-ear { 0%, 100% { transform: rotate(0deg); } 30%, 70% { transform: rotate(-12deg); } }
/* всадник указывает вперёд — рука своя, как у всех Зубриков */
.zubrik-nap[data-mood="point"] .zb-arm-r { opacity: 1; transform: rotate(8deg); transition: none; }
@media (prefers-reduced-motion: reduce) { .zubrik-ride .nr-head, .zubrik-ride .nr-tail, .zubrik-ride .nr-mane, .zubrik-ride .nr-body, .zubrik-ride .nr-ear, .zubrik-ride .nr-lid { animation: none; } }
/* nap-ride:end */

/* четыре предмета: вкладки меню, «Предметы», главная */
.subj-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* четыре вкладки: значок над названием, иначе «Математика» и «Английский» не помещаются */
.subj-tab { flex-direction: column; gap: 4px; padding: 8px 4px 6px; text-align: center; }
.subj-name b { font-size: 13px; }
@media (max-width: 440px) { .subj-name b { font-size: 11.5px; letter-spacing: -0.02em; } }
@media (min-width: 1080px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .live-grid .live-card { grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: none; align-items: center; } .live-grid .live-zubrik { margin: 0; } }
@media (min-width: 1101px) { .trio { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) and (min-width: 901px) { .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hx-topic-zubrik { display: grid; justify-items: center; gap: 6px; }
.hx-topic-speech { font-size: 13px; line-height: 1.35; font-weight: 600; text-align: center; padding: 10px 12px; max-width: 220px; }
.hx-topic-head:has(.hx-topic-speech) { grid-template-columns: minmax(0, 1fr) 220px; }
@media (max-width: 640px) {
  .hx-topic-head, .hx-topic-head:has(.hx-topic-speech) { grid-template-columns: minmax(0, 1fr); }
  .hx-topic-zubrik { display: none; }
  .hx-topic-zubrik:has(.hx-topic-speech) { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: end; justify-items: stretch; gap: 8px; }
  .hx-topic-zubrik .hx-topic-speech { max-width: none; margin: 0 0 18px; text-align: left; border-radius: 18px 18px 4px 18px; }
  .hx-topic-zubrik .hx-topic-speech::after { display: none; }
}

/* Сцена «Бонапарт и конь» (zubrik_mood="ride") шире обычного Зубрика: 344 против 240 единиц.
   Колонка под неё в 1,43 раза шире, чтобы сам Бонапарт был того же размера, что и другие Зубрики. */
.en-hero-zubrik .zubrik-ride { filter: drop-shadow(0 18px 24px rgba(20, 30, 60, 0.25)); }
.live-zubrik .zubrik-ride { filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.18)); }
.trio-zubrik .zubrik-ride { filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.16)); }
.course-nap .en-hero { grid-template-columns: 330px minmax(0, 1fr); }
.live-history { grid-template-columns: 160px minmax(0, 1fr); }
.live-history .live-zubrik { width: 160px; }
.trio-history .trio-zubrik { width: 200px; margin-bottom: -7px; }
@media (min-width: 641px) { .course-nap .en-hero-zubrik .speech { justify-self: end; margin-right: 4%; } }
@media (min-width: 1080px) { .live-grid .live-history { grid-template-columns: 189px minmax(0, 1fr); } .live-grid .live-history .live-zubrik { width: 189px; margin: 0; } }
@media (max-width: 900px) and (min-width: 641px) { .trio-history.trio-card { grid-template-columns: 172px minmax(0, 1fr); } .trio-history .trio-zubrik { width: 172px; } }
@media (max-width: 860px) { .course-nap .en-hero { grid-template-columns: minmax(0, 1fr); } .course-nap .en-hero-zubrik { width: 244px; margin: -6px auto -12px; } }
@media (max-width: 760px) { .live-history { grid-template-columns: minmax(0, 1fr); } .live-history .live-zubrik { width: 186px; } }
@media (max-width: 640px) {
  .course-nap .en-hero-zubrik { width: auto; grid-template-columns: minmax(0, 1fr) 150px; }
  .course-nap .en-hero-zubrik .speech { margin-bottom: 26px; }
  .live-grid .live-history, .live-history { grid-template-columns: 126px minmax(0, 1fr); }
  .live-grid .live-history .live-zubrik, .live-history .live-zubrik { width: 138px; margin: 0 0 0 -10px; }
  .trio-history .trio-zubrik { width: 169px; }
}

/* ---------- калькулятор поступления (/calculator) ---------- */
.calc { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.calc-scores { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); }
.calc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.calc-total b { font: 800 clamp(44px, 5vw, 60px)/1 var(--font-display); letter-spacing: -0.03em; transition: color 0.3s ease; }
.calc .slider-top label { display: grid; gap: 2px; font-weight: 650; }
.calc .slider-top label small { font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
.calc-num { width: 74px; height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: 750 18px/1 var(--font-display); text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.calc-num::-webkit-inner-spin-button, .calc-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.calc-num:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.calc-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; }
.calc-pick .fg { display: grid; gap: 6px; min-width: 0; }
.calc-pick select { width: 100%; }
.calc-result { display: grid; gap: 12px; animation: tile-in 0.35s var(--ease) both; }
.calc-spec { display: grid; gap: 2px; }
.calc-spec b { font: 750 20px/1.25 var(--font-display); }
.calc-verdicts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calc-verdict { --c: var(--ink-3); --soft: color-mix(in srgb, var(--ink) 5%, transparent); display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: var(--soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); }
.calc-verdict.is-sure { --c: var(--ok); --soft: var(--ok-soft); }
.calc-verdict.is-likely { --c: #3D7A1E; --soft: var(--lime-soft); }
.calc-verdict.is-border { --c: #A86A00; --soft: #FFF5DE; }
.calc-verdict.is-short { --c: var(--red); --soft: var(--red-soft); }
.calc-verdict small { font: 650 12px/1 var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.calc-verdict b { font: 750 18px/1.2 var(--font-display); color: var(--c); }
.calc-verdict p { margin: 0; font-size: 14px; color: var(--ink-2); }
.calc-years { display: grid; gap: 5px; margin: 2px 0 0; padding: 0; list-style: none; }
.calc-years li { display: grid; grid-template-columns: 38px minmax(0, 1fr) 34px; align-items: center; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.calc-years i { position: relative; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.calc-years i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--c); opacity: 0.75; }
.calc-years i::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: var(--you); width: 2px; border-radius: 2px; background: var(--ink); }
.calc-years b { font-size: 13px; color: var(--ink); text-align: right; }
.calc-filters { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 8px; }
.calc-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 560px; overflow: auto; }
.calc-list button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: background-color 0.2s ease, transform 0.25s var(--spring); }
.calc-list button:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.calc-list button:active { transform: scale(0.99); }
.calc-list .nm { font-weight: 650; font-size: 15px; line-height: 1.3; }
.calc-list .sub { grid-column: 1; font-size: 12.5px; color: var(--ink-3); }
.calc-list .tag { grid-row: 1 / span 2; grid-column: 2; }
.calc-list .is-near .tag { background: #FFF5DE; color: #A86A00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .calc-verdict.is-border, :root:not([data-theme="light"]) .calc-list .is-near .tag { --soft: rgba(255, 196, 70, 0.12); background-color: rgba(255, 196, 70, 0.12); } :root:not([data-theme="light"]) .calc-verdict.is-likely { --soft: rgba(212, 245, 76, 0.1); --c: #CBEA6A; } :root:not([data-theme="light"]) .calc-verdict.is-border { --c: #F2C14E; } }
:root[data-theme="dark"] .calc-verdict.is-border, :root[data-theme="dark"] .calc-list .is-near .tag { --soft: rgba(255, 196, 70, 0.12); background-color: rgba(255, 196, 70, 0.12); }
:root[data-theme="dark"] .calc-verdict.is-likely { --soft: rgba(212, 245, 76, 0.1); --c: #CBEA6A; }
:root[data-theme="dark"] .calc-verdict.is-border { --c: #F2C14E; }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } .calc-scores { position: static; } }
@media (max-width: 560px) { .calc-pick, .calc-verdicts, .calc-filters { grid-template-columns: minmax(0, 1fr); } }

/* выбор предмета на страницах «Фото» и «Голос» */
.subj-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.subj-pick a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-edge-2); color: var(--ink-2); font-weight: 650; font-size: 14.5px; text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease, transform 0.3s var(--spring); }
.subj-pick a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.subj-pick a:active { transform: scale(0.97); }
.subj-pick a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 6px 16px -8px rgba(0, 0, 0, 0.3); }
.subj-pick .subj-badge { width: 30px; height: 30px; border-radius: 10px; }
@media (max-width: 520px) { .subj-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- амбассадоры (/ambassadors) ---------- */
.amb-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: clamp(22px, 3vw, 38px); border-radius: var(--r-xl); background: radial-gradient(420px circle at 100% 0%, rgba(212, 245, 76, 0.32), transparent 62%), radial-gradient(380px circle at 0% 100%, rgba(29, 74, 53, 0.12), transparent 60%), var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.amb-hero-text { display: grid; gap: 14px; justify-items: start; }
.amb-hero-text .h1 em { font-style: normal; color: var(--accent-text); }
.amb-hero-team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.amb-hero-z { margin: 0 -10px; transform: translateY(calc(var(--i) % 2 * 14px)); animation: tile-in 0.6s var(--ease) both; animation-delay: calc(var(--i) * 0.08s); }
.amb-hero-z .zubrik { filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.16)); }
.amb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.amb-card { display: grid; justify-items: center; gap: 6px; padding: 20px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); text-align: center; }
.amb-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--lime), 0 10px 24px -12px rgba(0, 0, 0, 0.4); margin-bottom: 6px; }
.amb-name { font: 750 18px/1.2 var(--font-display); }
.amb-school { font-size: 13.5px; color: var(--ink-2); }
.amb-quote { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); font-style: italic; }
.amb-empty { display: flex; align-items: center; gap: 14px; }
.amb-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.amb-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.amb-list li { display: grid; gap: 2px; }
.amb-list li b { font-weight: 700; }
.amb-list li span { color: var(--ink-2); font-size: 14.5px; }
.amb-perks li { grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 8px; }
.amb-perks .ico { width: 20px; height: 20px; color: var(--ok); margin-top: 1px; }
.amb-perks li span { color: var(--ink); font-size: 15px; }
.amb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.amb-form .fg { display: grid; gap: 6px; min-width: 0; }
.amb-wide { grid-column: 1 / -1; }
.amb-consent { display: flex; gap: 10px; align-items: flex-start; }
.amb-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--forest); flex: none; }
.amb-consent.has-error span { color: var(--red); }
@media (max-width: 860px) { .amb-hero, .amb-two { grid-template-columns: minmax(0, 1fr); } .amb-hero-team { max-width: 420px; } }
@media (max-width: 560px) { .amb-form { grid-template-columns: minmax(0, 1fr); } .amb-empty { align-items: flex-start; } }
.amb-form .form-error { display: block; padding: 0; background: none; color: var(--red); font-size: 13px; }
.amb-two > section { align-content: start; }

/* ---------- «Мой ЦТ»: карточка для сторис (/wrapped) ---------- */
.wr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 20px; align-items: start; }
.wr-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.wr-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.wr-tabs label > span { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px 0 7px; border-radius: 14px; background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-edge-2); font-weight: 650; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.wr-tabs .subj-badge { width: 32px; height: 32px; border-radius: 10px; }
.wr-tabs input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 0 6px 16px -8px rgba(0, 0, 0, 0.3); }
.wr-tabs input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.wr-sum { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--forest); color: var(--lime); font: 800 18px/1 var(--font-display); }
.wr-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; align-items: center; }
.wr-row .calc-num { width: 100%; height: 48px; }
.wr-meta { display: grid; grid-template-columns: 110px 110px minmax(0, 1fr); gap: 10px; }
.wr-meta .fg { display: grid; gap: 6px; min-width: 0; }
.wr-preview { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); justify-items: center; }
.wr-card { width: 100%; max-width: 360px; height: auto; aspect-ratio: 9 / 16; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line); background: var(--bg-2); transition: opacity 0.2s ease; }
.wr-card.is-loading { opacity: 0.6; }
@media (max-width: 900px) { .wr { grid-template-columns: minmax(0, 1fr); } .wr-preview { position: static; } }
@media (max-width: 520px) { .wr-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wr-name { grid-column: 1 / -1; } .wr-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- «Похвастайся друзьям»: Зубрик предлагает карточку результата ---------- */
.share-card { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; align-items: center; }
.share-text { display: grid; gap: 14px; }
.share-say { display: flex; gap: 12px; align-items: flex-start; }
.share-say b { font: 750 17px/1.3 var(--font-display); }
.share-preview { width: 112px; height: auto; aspect-ratio: 9 / 16; border-radius: 12px; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line); transform: rotate(3deg); transition: transform 0.4s var(--spring); background: var(--bg-2); }
.share-card:hover .share-preview { transform: rotate(0deg) scale(1.04); }
.calc-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); }
.calc-side .calc-scores { position: static; }
.calc-side .share-card { grid-template-columns: minmax(0, 1fr) 84px; gap: 12px; }
.calc-side .share-preview { width: 84px; }
.calc-side .share-say .avatar { display: none; }
@media (max-width: 900px) { .calc-side { position: static; } }
@media (max-width: 520px) { .share-card { grid-template-columns: minmax(0, 1fr) 84px; } .share-preview { width: 84px; } }

/* ---------- особые эмоции: три клика подряд по Зубрику (site.js, initZubrikLife) ---------- */
/* Зубрик-математик: «Эврика!» — лампочка над головой, формулы разлетаются */
/* формулы и буквы — контуры шрифтов (scripts/gen_glyphs.py): Latin Modern Math и Lora Bold Italic */
.zubrik[data-mood="eureka"] .zb-eureka { opacity: 1; }
.zubrik[data-mood="eureka"] .zb-eureka-bulb { transform-origin: 120px 30px; animation: zb-bulb 0.7s var(--spring) both, zb-bulb-glow 0.9s ease-in-out 0.7s 2 alternate; }
.zubrik[data-mood="eureka"] .zb-eureka-glyphs .zb-g { transform-box: fill-box; transform-origin: center; animation: zb-glyph 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.25s + var(--i) * 0.1s); }
.zubrik[data-mood="eureka"] .zb-m-smile { opacity: 0; }
.zubrik[data-mood="eureka"] .zb-m-open { opacity: 1; }
.zubrik[data-mood="eureka"] .zb-brow { transform: translateY(-5px); }
.zubrik[data-mood="eureka"] .zb-head { transform: rotate(-3deg) translateY(-3px); }
@keyframes zb-bulb { 0% { transform: translateY(14px) scale(0); opacity: 0; } 60% { transform: translateY(-2px) scale(1.15); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes zb-bulb-glow { to { filter: brightness(1.12) drop-shadow(0 0 10px rgba(255, 220, 90, 0.9)); } }
@keyframes zb-glyph { 0% { opacity: 0; transform: translateY(8px) scale(0.5); } 18% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); } }
/* Сэр Зубрик: «Typical London weather» — дождь и зонтик с флагом */
.zubrik-uk .zb-tache { transform-box: fill-box; transform-origin: center; transition: transform 0.4s var(--spring); }
.zubrik-uk:hover .zb-tache { transform: scaleX(1.08) translateY(-1px); }
.zubrik-uk[data-mood="rain"] .zb-rain, .zubrik-uk[data-mood="rain"] .zb-umbrella { opacity: 1; }
.zubrik-uk[data-mood="rain"] .zb-flag { opacity: 0; }
.zubrik-uk[data-mood="rain"] .zb-umbrella-top > * { transform-origin: 0 -74px; animation: zb-umbrella 0.8s var(--spring) both; }
.zubrik-uk[data-mood="rain"] .zb-rain path { animation: zb-drop 0.75s linear infinite; }
.zubrik-uk[data-mood="rain"] .zb-m-smile { opacity: 1; }
.zubrik-uk[data-mood="rain"] .zb-brow { transform: translateY(-3px); }
@keyframes zb-umbrella { 0% { transform: scale(0.12, 0.9); } 100% { transform: none; } }
@keyframes zb-drop { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(150px); opacity: 0; } }
/* Зубр Сергеевич: «Вдохновение» — мечтательно закрывает глаза, перо выводит в воздухе буквы */
.zubrik-ru[data-mood="verse"] .zb-verse { opacity: 1; }
.zubrik-ru[data-mood="verse"] .zb-verse .zb-g { transform-box: fill-box; transform-origin: center; animation: zb-glyph 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.2s + var(--i) * 0.14s); }
.zubrik-ru[data-mood="verse"] .zb-verse-ink circle { animation: zb-ink 1.2s ease-out 0.2s 2 both; }
.zubrik-ru[data-mood="verse"] .zb-quill { animation: zb-quill-write 0.5s ease-in-out 5 alternate; }
.zubrik-ru[data-mood="verse"] .zb-eyes { opacity: 0; }
.zubrik-ru[data-mood="verse"] .zb-happy, .zubrik-ru[data-mood="verse"] .zb-m-smile { opacity: 1; }
.zubrik-ru[data-mood="verse"] .zb-blush { opacity: 0.85; }
.zubrik-ru[data-mood="verse"] .zb-head { transform: rotate(-6deg) translateY(1px); }
.zubrik-ru[data-mood="verse"] .zb-brow { transform: translateY(-4px); }
@keyframes zb-quill-write { from { transform: rotate(-10deg); } to { transform: rotate(8deg) translateY(-3px); } }
@keyframes zb-ink { 0% { opacity: 0; transform: translateY(-6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(18px); } }
/* Зубрик Бонапарт: «Где же неприятель?» — подзорная труба у глаза, второй глаз прищурен */
.zubrik-nap[data-mood="spyglass"] .zb-spyglass { opacity: 1; }
.zubrik-nap[data-mood="spyglass"] .zb-spyglass { transform-origin: 200px 250px; animation: zb-spy-in 0.6s var(--spring) both; }
.zubrik-nap[data-mood="spyglass"] .zb-spyglass-tube { animation: zb-spy-scan 3.2s ease-in-out 0.6s both; }
.zubrik-nap[data-mood="spyglass"] .zb-eye:first-child .zb-lid { opacity: 1; }
.zubrik-nap[data-mood="spyglass"] .zb-look { transform: translate(3px, -2px); }
.zubrik-nap[data-mood="spyglass"] .zb-brow-r { transform: translateY(-6px); }
.zubrik-nap[data-mood="spyglass"] .zb-brow-l { transform: translateY(3px); }
.zubrik-nap[data-mood="spyglass"] .zb-head { transform: rotate(-2deg); }
@keyframes zb-spy-in { from { transform: translateY(60px) rotate(8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes zb-spy-scan { 0%, 100% { transform: translate(146px, 126px) rotate(-14deg); } 35% { transform: translate(146px, 126px) rotate(-20deg); } 70% { transform: translate(146px, 126px) rotate(-9deg); } }
@media (prefers-reduced-motion: reduce) { .zubrik[data-mood="eureka"] *, .zubrik-uk[data-mood="rain"] *, .zubrik-ru[data-mood="verse"] *, .zubrik-nap[data-mood="spyglass"] * { animation: none !important; } }

/* ---------- удобства v9.11: полоска прочтения, «Наверх», клавиши, салют ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--lime), #9FD13A 60%, #1D4A35); border-radius: 0 3px 3px 0; transition: transform 0.12s linear; }
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 55; width: 46px; height: 46px;
  border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #121212; background: var(--lime);
  box-shadow: 0 10px 24px -10px rgba(29, 74, 53, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  opacity: 0; transform: translateY(14px) scale(0.85); pointer-events: none; transition: opacity 0.25s ease, transform 0.45s var(--spring); }
.to-top svg { width: 20px; height: 20px; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top:active { transform: scale(0.94); }
body:has(.tabbar) .to-top { display: none; } /* v11: на телефоне наверх — повторное нажатие на текущую вкладку, как в iOS */
@media (min-width: 721px) { body:has(.tabbar) .to-top { display: grid; bottom: calc(24px + env(safe-area-inset-bottom)); } }
.kbd-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
kbd { font: 600 11.5px/1 "JetBrains Mono", ui-monospace, monospace; padding: 3px 6px 4px; border-radius: 6px; background: var(--surface, #fff);
  box-shadow: inset 0 -2px 0 var(--line), 0 0 0 1px var(--line); color: var(--ink-2); }
.answer.is-key { animation: answer-key 0.35s var(--spring); }
@keyframes answer-key { 0% { transform: scale(0.98); } 60% { transform: scale(1.012); } 100% { transform: none; } }
.burst { position: absolute; width: 0; height: 0; z-index: 90; pointer-events: none; }
.burst i { position: absolute; left: -4px; top: -5px; width: 8px; height: 11px; border-radius: 2px; animation: burst 1.2s cubic-bezier(0.15, 0.7, 0.3, 1) both; }
.burst i:nth-child(3n) { border-radius: 50%; width: 8px; height: 8px; }
@keyframes burst { 0% { transform: translate(0, 0) scale(0.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 46px)) rotate(var(--r)) scale(1); opacity: 0; } }
.mascot { position: relative; }
.gauge { display: grid; justify-items: center; margin: 2px 0 6px; }
.gauge svg { width: min(190px, 100%); height: auto; overflow: visible; }
.gauge .g-track { fill: none; stroke: var(--line); stroke-width: 12; stroke-linecap: round; }
.gauge .g-fill { fill: none; stroke: var(--lime-2); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 1s var(--ease); }
.gauge .g-num { font: 800 26px/1 Inter, sans-serif; fill: var(--ink); }
.gauge .g-cap { font: 600 11px/1 Inter, sans-serif; fill: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .scroll-progress, .to-top { transition: none; } .burst { display: none; } }

/* тесты по темам — карточки-чипы на странице предмета */
.topic-tests { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.topic-test { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px;
  border-radius: 16px; background: var(--surface, #fff); box-shadow: 0 0 0 1px var(--line), var(--shadow); color: inherit; text-decoration: none;
  transition: transform 0.35s var(--spring), box-shadow 0.25s ease; }
.topic-test b { font-size: 14.5px; line-height: 1.25; }
.topic-test small { grid-row: 2; color: var(--ink-3); font-size: 12.5px; }
.topic-test svg { grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; color: var(--ink-3); transition: transform 0.3s var(--spring), color 0.2s; }
.topic-test:hover { transform: translateY(-2px); box-shadow: 0 0 0 1.5px var(--lime-2), var(--shadow); }
.topic-test:hover svg { transform: translateX(3px); color: var(--ink); }

/* ---------- лига школ ---------- */
.league-page { --gold: #E3B341; --gold-2: #B8892A; --silver: #C3CAD3; --silver-2: #8C96A3; --bronze: #D69062; --bronze-2: #A3613A; }
.league-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: end; }
.league-hero-text { display: grid; gap: 12px; align-content: end; padding-bottom: 8px; }
.league-hero .h1 { margin: 0; }
.league-hero .lead { margin: 0; max-width: 54ch; }
.league-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.league-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font: 600 13px/1.2 var(--font-body);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); }
.league-chip .ico { width: 16px; height: 16px; }
.league-chip-hot { background: color-mix(in srgb, var(--lime) 40%, var(--surface)); color: var(--ink); }
.league-weeks { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); justify-self: start; }
.league-weeks a { padding: 7px 14px; border-radius: 999px; font: 600 13.5px/1 var(--font-body); color: var(--ink-2); text-decoration: none; transition: background 0.2s, color 0.2s; }
.league-weeks a[aria-current="page"] { background: var(--ink); color: var(--surface); }

/* пьедестал: 2 — 1 — 3, Зубрики стоят на тумбах */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; min-height: 300px; }
.podium-col { display: grid; justify-items: center; text-align: center; animation: podium-in 0.8s var(--spring) both; animation-delay: calc(0.15s + var(--d) * 0.12s); }
.podium-zubrik { width: min(118px, 90%); margin-bottom: -6px; position: relative; z-index: 1; }
.podium-1 .podium-zubrik { width: min(146px, 100%); }
.podium-info { display: grid; gap: 2px; padding: 0 4px 8px; min-height: 64px; align-content: end; }
.podium-info b { font: 700 14px/1.2 var(--font-body); }
.podium-info small { font-size: 12px; color: var(--ink-3); }
.podium-pts { font: 700 13px/1 var(--font-body); color: var(--ink-2); margin-top: 3px; }
.podium-block { width: 100%; display: grid; place-items: center; border-radius: 18px 18px 6px 6px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--c1), var(--c2)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 14px 28px -18px rgba(0, 0, 0, 0.5); }
.podium-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 45%, transparent 60%);
  transform: translateX(-120%); animation: podium-shine 4.5s ease-in-out 1.4s infinite; }
.podium-num { font: 800 34px/1 var(--font-display, var(--font-body)); color: rgba(255, 255, 255, 0.92); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
.podium-1 .podium-block { height: 132px; --c1: var(--gold); --c2: var(--gold-2); }
.podium-2 .podium-block { height: 98px; --c1: var(--silver); --c2: var(--silver-2); }
.podium-3 .podium-block { height: 74px; --c1: var(--bronze); --c2: var(--bronze-2); }
.podium-col.is-empty .podium-zubrik { opacity: 0.45; filter: grayscale(0.6); }
.podium-col.is-empty .podium-block { background: transparent; box-shadow: inset 0 0 0 2px var(--line); border: 2px dashed color-mix(in srgb, var(--ink-3) 45%, transparent); }
.podium-col.is-empty .podium-num { color: var(--ink-3); text-shadow: none; }
.podium-col.is-empty .podium-block::after { display: none; }
@keyframes podium-in { from { opacity: 0; transform: translateY(28px) scale(0.96); } }
@keyframes podium-shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.league-champion { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 18px; font-size: 14.5px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold, #E3B341) 26%, var(--surface)), var(--surface)); box-shadow: 0 0 0 1px var(--line); }
.lc-cup { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #E3B341; color: #3A2A06; }
.league-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.league-board { display: grid; gap: 14px; }
.league-board-head { gap: 10px; flex-wrap: wrap; }
.league-board-head .h3 { margin: 0; }
.league-filter .field { min-width: 170px; padding-block: 8px; }
.league-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.league-division { display: flex; align-items: baseline; gap: 8px; padding: 10px 4px 2px; font: 700 12px/1.2 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.league-division small { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.league-division::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--div, #2F6B4F); transform: rotate(45deg); }
.league-division-belaveza { --div: #1D4A35; }
.league-division-berezina { --div: #3D7C5B; }
.league-division-naliboki { --div: #7FA38C; }
.league-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line); position: relative; overflow: hidden; animation: enter 0.5s var(--ease) both; animation-delay: calc(var(--i) * 0.035s); }
.league-row::before { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w); background: linear-gradient(90deg, var(--lime-2), var(--lime)); opacity: 0.9; border-radius: 0 3px 3px 0; }
.league-row.is-mine { box-shadow: 0 0 0 2px var(--lime-2), 0 10px 24px -16px rgba(29, 74, 53, 0.6); background: color-mix(in srgb, var(--lime) 14%, var(--surface)); }
.league-row.is-mine .lr-school b::after { content: "твоя школа"; margin-left: 8px; padding: 2px 7px; border-radius: 999px; font: 700 10.5px/1.4 var(--font-body); vertical-align: 2px; background: var(--lime); color: #121212; }
.lr-rank { font: 800 16px/1 var(--font-body); color: var(--ink-2); text-align: center; }
.medal { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 14px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16), 0 0 0 3px color-mix(in srgb, var(--m) 30%, transparent); background: var(--m); }
.medal-1 { --m: #D9A32E; } .medal-2 { --m: #9AA4B1; } .medal-3 { --m: #C2794B; }
.lr-school { display: grid; gap: 2px; min-width: 0; }
.lr-school b { font: 700 15px/1.25 var(--font-body); overflow: hidden; text-overflow: ellipsis; }
.lr-school small { color: var(--ink-3); font-size: 12.5px; }
.lr-move { font: 700 12px/1 var(--font-body); white-space: nowrap; }
.lr-move .up { color: #2E8B57; } .lr-move .down { color: #C2493D; }
.lr-points { font: 800 18px/1 var(--font-body); color: var(--ink); text-align: right; min-width: 48px; }
.league-empty { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px 0; }
.league-empty p { margin: 0; color: var(--ink-2); }
.my-school { display: grid; gap: 10px; }
.my-school .h3 { margin: 0; }
.my-school .notice { margin: 0; }
.ms-rank { display: flex; align-items: center; gap: 12px; }
.ms-rank b { font: 800 46px/1 var(--font-body); background: linear-gradient(180deg, var(--ink) 30%, color-mix(in srgb, var(--ink) 55%, var(--lime-2))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ms-rank span { font: 600 14px/1.3 var(--font-body); color: var(--ink-2); }
.ms-rank small { color: var(--ink-3); font-weight: 500; }
.ms-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ms-stats span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.ms-stats b { font: 800 22px/1 var(--font-body); }
.ms-stats small { color: var(--ink-3); font-size: 12px; }
.ms-goal { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.ms-change summary { cursor: pointer; font: 600 13.5px/1.4 var(--font-body); color: var(--ink-3); }
.ms-change[open] summary { margin-bottom: 10px; }
.league-rules ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 9px; }
.league-rules li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); }
.league-rules li span { display: grid; place-items: center; height: 30px; border-radius: 10px; font: 800 13px/1 var(--font-body); background: color-mix(in srgb, var(--lime) 45%, var(--surface)); color: #121212; }
.league-rules .h3 { margin: 0 0 10px; }
.sheet-chip-league .ico { color: #B8892A; }
@media (max-width: 920px) {
  .league-hero, .league-grid { grid-template-columns: 1fr; }
  .podium { min-height: 0; }
}
@media (max-width: 520px) {
  .podium { gap: 6px; }
  .podium-info b { font-size: 12.5px; }
  .podium-1 .podium-block { height: 104px; } .podium-2 .podium-block { height: 78px; } .podium-3 .podium-block { height: 60px; }
  .league-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .lr-move { display: none; }
  .league-empty { grid-template-columns: 76px 1fr; }
}
@media (prefers-reduced-motion: reduce) { .podium-col, .league-row { animation: none; } .podium-block::after { display: none; } }
.league-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; color: inherit; text-decoration: none;
  background: linear-gradient(100deg, color-mix(in srgb, #E3B341 22%, var(--surface)), var(--surface) 55%); transition: transform 0.35s var(--spring); }
.league-strip:hover { transform: translateY(-2px); }
.league-strip-cup { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(180deg, #E3B341, #B8892A); color: #2A1E05;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45); }
.league-strip-cup .ico { width: 28px; height: 28px; }
.league-strip-text { display: grid; gap: 2px; min-width: 0; }
.league-strip-text b { font-size: 16px; }
@media (max-width: 560px) { .league-strip { grid-template-columns: auto minmax(0, 1fr); } .league-strip > .btn { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 520px) { .league-row.is-mine .lr-school b::after { display: none; } }
.league-point { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px; font: 700 12.5px/1.2 var(--font-body);
  color: #3A2A06; background: linear-gradient(180deg, #F3CF6A, #E3B341); text-decoration: none; box-shadow: 0 6px 14px -8px rgba(184, 137, 42, 0.8);
  animation: league-point 0.9s var(--spring) 0.35s both; }
.league-point .ico { width: 15px; height: 15px; }
@keyframes league-point { 0% { opacity: 0; transform: translateY(10px) scale(0.7); } 60% { opacity: 1; transform: translateY(-3px) scale(1.06); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .league-point { animation: none; } }
/* витрина лиги на главной */
.section-tight { padding-block: 8px 40px; }
.league-teaser { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: end; padding: 34px 38px 0; border-radius: 30px;
  color: #F4F6EE; text-decoration: none; overflow: hidden; position: relative;
  background: radial-gradient(120% 140% at 0% 0%, #2F6B4F 0%, #1D4A35 45%, #0E2A1E 100%); box-shadow: var(--shadow-lg); }
.league-teaser::before { content: ""; position: absolute; inset: auto -10% -40% 40%; height: 70%; background: radial-gradient(closest-side, rgba(227, 179, 65, 0.35), transparent); pointer-events: none; }
.lt-text { display: grid; gap: 12px; align-content: center; padding-bottom: 34px; position: relative; }
.lt-text .kicker { color: #E3B341; }
.lt-text .h2 { color: #fff; margin: 0; }
.lt-text .lead { color: rgba(244, 246, 238, 0.82); margin: 0; }
.lt-text .btn { justify-self: start; }
.lt-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; position: relative; }
.lt-col { display: grid; justify-items: center; text-align: center; }
.lt-zubrik { width: 92px; margin-bottom: -4px; }
.lt-1 .lt-zubrik { width: 118px; }
.lt-name { font: 700 12.5px/1.2 var(--font-body); color: rgba(255, 255, 255, 0.9); min-height: 30px; padding: 0 4px 6px; display: grid; align-items: end; }
.lt-block { width: 100%; display: grid; place-items: center; font: 800 30px/1 var(--font-body); color: rgba(255, 255, 255, 0.95); border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, var(--c1), var(--c2)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4); }
.lt-1 .lt-block { height: 120px; --c1: #E3B341; --c2: #B8892A; }
.lt-2 .lt-block { height: 88px; --c1: #C3CAD3; --c2: #8C96A3; }
.lt-3 .lt-block { height: 66px; --c1: #D69062; --c2: #A3613A; }
.league-teaser:hover .lt-1 .lt-zubrik { animation: zb-hop 0.7s var(--spring); }
@media (max-width: 820px) { .league-teaser { grid-template-columns: 1fr; padding: 26px 20px 0; } .lt-text { padding-bottom: 0; } }

/* ---------- альбом Зубрика: наклейки ---------- */
.sticker { --size: 112px; position: relative; display: inline-grid; place-items: center; width: var(--size); aspect-ratio: 1; flex: none; }
.sticker-sm { --size: 52px; }
.sticker-face { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: end center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--ring) 22%, #fff), color-mix(in srgb, var(--ring) 45%, #fff));
  box-shadow: 0 0 0 calc(var(--size) * 0.045) #fff, 0 0 0 calc(var(--size) * 0.08) var(--ring), 0 calc(var(--size) * 0.08) calc(var(--size) * 0.16) -6px rgba(0, 0, 0, 0.35);
  transition: transform 0.45s var(--spring); }
.sticker-zubrik { width: 92%; margin-bottom: -16%; }
.sticker-zubrik .zubrik .zb-shadow { display: none; }
.sticker-badge { position: absolute; right: -6%; top: -4%; min-width: 36%; height: 34%; padding: 0 7%; border-radius: 999px; display: grid; place-items: center;
  font: 800 calc(var(--size) * 0.14)/1 var(--font-body); color: #121212; background: #fff; white-space: nowrap; box-shadow: 0 0 0 calc(var(--size) * 0.03) var(--ring), 0 4px 10px -4px rgba(0, 0, 0, 0.4); z-index: 1; }
.sticker.is-locked .sticker-face { background: var(--surface); box-shadow: 0 0 0 calc(var(--size) * 0.045) var(--surface), 0 0 0 calc(var(--size) * 0.08) var(--line); }
.sticker.is-locked .sticker-zubrik { filter: brightness(0); opacity: 0.12; }
.sticker.is-locked .sticker-badge { color: var(--ink-3); box-shadow: 0 0 0 calc(var(--size) * 0.03) var(--line); }
.album-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.album-progress { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.album-progress svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.album-progress .ap-track { fill: none; stroke: var(--line); stroke-width: 10; }
.album-progress .ap-fill { fill: none; stroke: var(--lime-2); stroke-width: 10; stroke-linecap: round; stroke-dasharray: var(--p) 100; transition: stroke-dasharray 1.2s var(--ease); }
.album-progress span { display: grid; justify-items: center; }
.album-progress b { font: 800 36px/1 var(--font-body); }
.album-progress small { color: var(--ink-3); font-size: 13px; }
.album-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px; }
.album-card { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 16px 10px 14px; border-radius: 22px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line); animation: enter 0.5s var(--ease) both; animation-delay: calc(var(--i) * 0.04s); }
.album-card .sticker { margin-bottom: 6px; }
.album-card b { font: 700 14.5px/1.25 var(--font-body); }
.album-card small { color: var(--ink-3); font-size: 12.5px; line-height: 1.35; }
.album-card.is-open .sticker-face { transform: rotate(-4deg); }
.album-card.is-open:hover .sticker-face { transform: rotate(3deg) scale(1.06); }
.album-card:not(.is-open) b { color: var(--ink-2); }
.album-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; color: inherit; text-decoration: none; transition: transform 0.35s var(--spring); }
.album-strip:hover { transform: translateY(-2px); }
.album-strip-text { display: grid; gap: 2px; }
.album-strip-text b { font-size: 16px; }
.album-strip-row { display: flex; gap: 6px; }
.album-strip-row .sticker:nth-child(odd) .sticker-face { transform: rotate(-6deg); }
.album-strip-row .sticker:nth-child(even) .sticker-face { transform: rotate(5deg); }
/* всплывашка «Новая наклейка!» */
.sticker-toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 96; transform: translateX(-50%); display: grid; gap: 8px;
  padding: 10px 44px 10px 10px; border-radius: 22px; background: var(--glass-strong, rgba(255, 255, 255, 0.92)); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); animation: st-in 0.7s var(--spring) 0.4s both; max-width: min(420px, calc(100vw - 24px)); }
.sticker-toast.is-out { animation: st-out 0.35s ease both; }
body:has(.tabbar) .sticker-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 721px) { body:has(.tabbar) .sticker-toast { bottom: calc(22px + env(safe-area-inset-bottom)); } }
.st-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.st-item .sticker-face { animation: st-pop 0.9s var(--spring) both; animation-delay: calc(0.6s + var(--d) * 0.15s); }
.st-text { display: grid; gap: 1px; }
.st-text small { font: 700 11px/1.2 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: #B8892A; }
.st-text b { font-size: 15px; }
.st-text span { font-size: 12.5px; color: var(--ink-3); }
.st-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--ink-3); cursor: pointer; }
.st-close .ico { width: 16px; height: 16px; }
@keyframes st-in { from { opacity: 0; transform: translate(-50%, 30px) scale(0.92); } }
@keyframes st-out { to { opacity: 0; transform: translate(-50%, 20px) scale(0.96); } }
@keyframes st-pop { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.15) rotate(8deg); } 100% { transform: scale(1) rotate(-4deg); } }
@media (max-width: 560px) { .album-hero { grid-template-columns: 1fr; } .album-progress { justify-self: start; width: 110px; height: 110px; } .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sticker { --size: 96px; } .sticker-sm { --size: 48px; } .album-strip { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sticker-toast, .st-item .sticker-face, .album-card { animation: none; } }

/* ---------- Зубрик v9.13: реакции 👍 👏 🎉 🤷 🤯 😅 🔥 🤩 🫡 👀 😂 🙏 ----------
   thumbs «Класс!», clap — аплодисменты, party — хлопушка и колпак, shrug — «ну что ж», mindblown — «взорвало мозг»,
   sweat — «ой-ой» (копыто на затылке), fire — «в огне» (серия), starstruck — звёзды в глазах, salute — «есть!»,
   eyes — косится, joy — смех до слёз, pray — «надеюсь!». Крупные детали — _zubrik_react.html. */
/* рукава жестов: у главного Зубрика — мех, у остальных — их костюм; манжеты — только у костюмов */
.zubrik .zb-sl-o, .zubrik .zb-sl, .zubrik .zb-sl-cuff { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.zubrik .zb-sl-o { stroke: #3A2416; stroke-width: 20px; }
.zubrik .zb-sl { stroke: #5E3B25; stroke-width: 17px; }
.zubrik .zb-sl-cuff { display: none; stroke-width: 18px; stroke-linecap: butt; }
.zubrik-math .zb-sl-o { stroke: #A9BED8; }
.zubrik-math .zb-sl { stroke: #DCE9F7; }
.zubrik-uk .zb-sl-o { stroke: #11162A; }
.zubrik-uk .zb-sl { stroke: #262F47; }
.zubrik-ru .zb-sl-o { stroke: #1A120D; }
.zubrik-ru .zb-sl { stroke: #4A372C; }
.zubrik-nap .zb-sl-o { stroke: #121A40; }
.zubrik-nap .zb-sl { stroke: #2B3B7C; }
.zubrik-math .zb-sl-cuff, .zubrik-uk .zb-sl-cuff, .zubrik-ru .zb-sl-cuff, .zubrik-nap .zb-sl-cuff { display: inline; }
.zubrik-math .zb-sl-cuff { stroke: #AFD32A; }
.zubrik-uk .zb-sl-cuff { stroke: #F4F1EA; }
.zubrik-ru .zb-sl-cuff { stroke: #F6F3EA; }
.zubrik-nap .zb-sl-cuff { stroke: #B3262E; }
/* что жест убирает: флажок Сэра Зубрика (в правой руке), скрещённые руки Зубра Сергеевича, руку Бонапарта за бортом */
.zubrik-uk:is([data-mood="thumbs"], [data-mood="party"], [data-mood="fire"], [data-mood="sweat"], [data-mood="clap"], [data-mood="pray"], [data-mood="shrug"]) .zb-flag,
.zubrik-ru:is([data-mood="thumbs"], [data-mood="party"], [data-mood="fire"], [data-mood="sweat"], [data-mood="clap"], [data-mood="pray"], [data-mood="shrug"], [data-mood="salute"]) .zb-cross,
.zubrik-nap:is([data-mood="clap"], [data-mood="pray"], [data-mood="shrug"], [data-mood="salute"]) .zb-nap-pose > g { opacity: 0; }

/* общее лицо: радостные дуги, открытый рот, румянец */
.zubrik:is([data-mood="clap"], [data-mood="party"], [data-mood="sweat"], [data-mood="joy"]) .zb-eyes,
.zubrik:is([data-mood="starstruck"], [data-mood="pray"]) .zb-eyes { opacity: 0; }
.zubrik:is([data-mood="clap"], [data-mood="party"], [data-mood="sweat"], [data-mood="joy"]) .zb-happy { opacity: 1; }
.zubrik:is([data-mood="thumbs"], [data-mood="clap"], [data-mood="party"], [data-mood="sweat"], [data-mood="fire"], [data-mood="starstruck"], [data-mood="joy"]) .zb-m-smile,
.zubrik:is([data-mood="shrug"], [data-mood="salute"], [data-mood="eyes"], [data-mood="mindblown"]) .zb-m-smile { opacity: 0; }
.zubrik:is([data-mood="thumbs"], [data-mood="clap"], [data-mood="party"], [data-mood="sweat"], [data-mood="fire"], [data-mood="starstruck"], [data-mood="joy"]) .zb-m-open { opacity: 1; }
.zubrik:is([data-mood="thumbs"], [data-mood="clap"], [data-mood="party"], [data-mood="sweat"], [data-mood="starstruck"], [data-mood="joy"], [data-mood="pray"]) .zb-blush { opacity: 0.9; }

/* 👍 класс: кулак с большим пальцем, подмигивает */
.zubrik[data-mood="thumbs"] .zb-arm-r { opacity: 1; animation: zb-thumb-in 0.6s var(--spring) both, zb-thumb-bob 2.2s ease-in-out 0.6s infinite; }
.zubrik[data-mood="thumbs"] .zb-arm-r .zb-hoof { opacity: 0; }
.zubrik[data-mood="thumbs"] .zb-fist { opacity: 1; }
.zubrik[data-mood="thumbs"] .zb-fist-spark { transform-box: fill-box; transform-origin: center; animation: zb-twinkle 1.3s ease-in-out 0.5s infinite; }
.zubrik[data-mood="thumbs"] .zb-eye:last-child { opacity: 0; }
.zubrik[data-mood="thumbs"] .zb-wink { opacity: 1; }
.zubrik[data-mood="thumbs"] .zb-brow-l { transform: translateY(-4px) rotate(-4deg); }
.zubrik[data-mood="thumbs"] .zb-brow-r { transform: translateY(3px) rotate(4deg); }
.zubrik[data-mood="thumbs"] .zb-head { transform: rotate(-4deg); }
@keyframes zb-thumb-in { 0% { transform: rotate(30deg) scale(0.2); } 55% { transform: rotate(-8deg) scale(1.08); } 100% { transform: rotate(0deg) scale(1); } }
@keyframes zb-thumb-bob { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg) translateY(-2px); } }

/* 👏 аплодисменты: три хлопка — пауза */
.zubrik[data-mood="clap"] .zb-palms { opacity: 1; }
.zubrik[data-mood="clap"] .zb-palm-l { transform-origin: 70px 264px; animation: zb-clap-l 1.8s ease-in-out infinite; }
.zubrik[data-mood="clap"] .zb-palm-r { transform-origin: 170px 264px; animation: zb-clap-r 1.8s ease-in-out infinite; }
.zubrik[data-mood="clap"] .zb-claplines { animation: zb-claplines 1.8s linear infinite; }
.zubrik[data-mood="clap"] .zb-palm-seam { opacity: 0; }
.zubrik[data-mood="clap"] .zb-brow { transform: translateY(-4px); }
.zubrik[data-mood="clap"] .zb-all { animation: zb-bounce 0.6s ease-in-out infinite; }
.zubrik .zb-claplines { opacity: 0; }
@keyframes zb-clap-l { 0%, 20%, 40%, 60%, 100% { transform: none; } 10%, 30%, 50% { transform: translate(-6px, 2px) rotate(-8deg); } }
@keyframes zb-clap-r { 0%, 20%, 40%, 60%, 100% { transform: none; } 10%, 30%, 50% { transform: translate(6px, 2px) rotate(8deg); } }
@keyframes zb-claplines { 0%, 18% { opacity: 0; } 20% { opacity: 1; } 27%, 38% { opacity: 0; } 40% { opacity: 1; } 47%, 58% { opacity: 0; } 60% { opacity: 1; } 67%, 100% { opacity: 0; } }
@keyframes zb-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* 🎉 праздник: колпак, хлопушка, конфетти и серпантин (один залп) */
.zubrik[data-mood="party"] .zb-arm-r { opacity: 1; animation: zb-popper-arm 0.9s var(--spring) both; }
.zubrik[data-mood="party"] .zb-popper, .zubrik[data-mood="party"] .zb-partyhat, .zubrik[data-mood="party"] .zb-confetti { opacity: 1; }
.zubrik[data-mood="party"] .zb-popper-tube { animation: zb-recoil 0.35s ease-out 0.5s both; }
.zubrik .zb-cf { transform-box: fill-box; transform-origin: center; }
.zubrik[data-mood="party"] .zb-confetti .zb-cf { animation: zb-confetti 2.6s cubic-bezier(0.2, 0.7, 0.4, 1) 0.5s both; }
.zubrik[data-mood="party"] .zb-confetti .zb-cf:nth-child(odd) { animation-duration: 3.1s; }
.zubrik[data-mood="party"] .zb-streamer { animation: zb-streamer 2.8s ease-out 0.5s both; }
.zubrik[data-mood="party"] .zb-ph { animation: zb-ph-in 0.6s var(--spring) both; }
.zubrik[data-mood="party"] .zb-all { animation: zb-hop 0.7s var(--spring) 0.45s 2, zb-breathe 4.8s ease-in-out 1.9s infinite; }
.zubrik-uk .zb-partyhat, .zubrik-nap .zb-partyhat { display: none; }
.zubrik-ru .zb-partyhat { transform: translateY(-13px); }
html .zubrik[data-mood="party"] .zb-hat { opacity: 0; }
.zubrik-uk[data-mood="party"] .zb-tophat { transform: translate(5px, -5px) rotate(12deg); }
.zubrik-nap[data-mood="party"] .zb-nap-hat { transform: translate(3px, -4px) rotate(9deg); }
@keyframes zb-popper-arm { 0% { transform: rotate(30deg) scale(0.2); } 45% { transform: rotate(-4deg) scale(1.04); } 60% { transform: rotate(5deg) scale(1); } 100% { transform: rotate(0deg) scale(1); } }
@keyframes zb-recoil { 0%, 100% { transform: none; } 30% { transform: translateY(6px); } }
@keyframes zb-confetti {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.3); opacity: 0; }
  6% { opacity: 1; }
  32% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); }
  78% { opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1.12), calc(var(--dy) + 110px)) rotate(calc(var(--r) * 2.2)) scale(0.9); opacity: 0; }
}
@keyframes zb-streamer { 0% { stroke-dashoffset: 1; opacity: 1; } 22% { stroke-dashoffset: 0; } 70% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes zb-ph-in { 0% { transform: translateY(-40px) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }

/* 🤷 ну что ж: копыта в стороны, бровь вверх, рот волной */
.zubrik[data-mood="shrug"] .zb-shrug { opacity: 1; }
.zubrik[data-mood="shrug"] .zb-shrug-l { transform-origin: 60px 226px; animation: zb-shrug-l 2.8s ease-in-out both; }
.zubrik[data-mood="shrug"] .zb-shrug-r { transform-origin: 180px 226px; animation: zb-shrug-r 2.8s ease-in-out both; }
.zubrik[data-mood="shrug"] .zb-head { animation: zb-shrug-head 2.8s ease-in-out both; }
.zubrik[data-mood="shrug"] .zb-brow-l { transform: translateY(-7px) rotate(-6deg); }
.zubrik[data-mood="shrug"] .zb-brow-r { transform: translateY(-2px) rotate(4deg); }
.zubrik[data-mood="shrug"] .zb-m-wavy { opacity: 1; }
.zubrik[data-mood="shrug"] .zb-look { transform: translate(-2px, -2px) !important; }
@keyframes zb-shrug-l { 0% { transform: translateY(8px) rotate(-16deg); opacity: 0; } 22%, 70% { transform: translateY(-5px) rotate(5deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes zb-shrug-r { 0% { transform: translateY(8px) rotate(16deg); opacity: 0; } 22%, 70% { transform: translateY(-5px) rotate(-5deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes zb-shrug-head { 0% { transform: none; } 22%, 70% { transform: rotate(7deg) translateY(2px); } 100% { transform: rotate(4deg); } }

/* 🤯 взорвало мозг: облако взрыва из макушки, шляпы и карандаш взлетают */
.zubrik[data-mood="mindblown"] .zb-boom, .zubrik[data-mood="mindblown"] .zb-debris { opacity: 1; }
.zubrik[data-mood="mindblown"] .zb-boom-cloud { transform-origin: 120px 74px; animation: zb-boom 0.6s var(--spring) both, zb-boom-pulse 0.5s ease-in-out 0.6s infinite alternate; }
.zubrik[data-mood="mindblown"] .zb-debris .zb-cf { animation: zb-confetti 1.9s cubic-bezier(0.2, 0.7, 0.4, 1) 0.15s infinite; }
.zubrik[data-mood="mindblown"] .zb-eye { animation: none; transform: scale(1.2); }
.zubrik[data-mood="mindblown"] .zb-look { transform-box: fill-box; transform-origin: center; transform: scale(0.7) !important; }
.zubrik[data-mood="mindblown"] .zb-brow { transform: translateY(-9px); }
.zubrik[data-mood="mindblown"] .zb-m-o { opacity: 1; transform-box: fill-box; transform-origin: center; transform: scale(1.35); }
.zubrik[data-mood="mindblown"] .zb-all { animation: zb-jolt 0.45s var(--spring) 1, zb-shiver 0.12s linear 0.45s 8; }
.zubrik[data-mood="mindblown"] .zb-ear-l { animation: none; transform: rotate(-18deg); }
.zubrik[data-mood="mindblown"] .zb-ear-r { animation: none; transform: rotate(18deg); }
.zubrik-uk[data-mood="mindblown"] .zb-tophat { transform: translate(6px, -34px) rotate(16deg); transition-duration: 0.4s; }
.zubrik-nap[data-mood="mindblown"] .zb-nap-hat { transform: translate(-4px, -30px) rotate(-14deg); transition-duration: 0.4s; }
.zubrik[data-mood="mindblown"] .zb-pencil { transform: translate(16px, -44px) rotate(-48deg); }
.zubrik-math[data-mood="mindblown"] .zb-specs { transform: translateY(-5px); }
.zubrik-ru[data-mood="mindblown"] .zb-curls { animation: zb-frizz 0.14s linear infinite alternate; }
@keyframes zb-boom { 0% { transform: scale(0); opacity: 0; } 50% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes zb-boom-pulse { from { transform: scale(1) rotate(0deg); } to { transform: scale(1.06) rotate(2deg); } }
@keyframes zb-shiver { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.5px); } }
@keyframes zb-frizz { from { transform: scale(1); } to { transform: scale(1.04, 1.06); } }

/* 😅 ой-ой: чешет затылок, капля пота */
.zubrik[data-mood="sweat"] .zb-scratch { opacity: 1; transform-origin: 186px 212px; animation: zb-scratch-in 0.45s var(--spring) both, zb-scratch 0.24s ease-in-out 0.45s 10 alternate; }
.zubrik[data-mood="sweat"] .zb-sweat { opacity: 1; animation: zb-sweat 2.2s ease-in infinite; }
.zubrik[data-mood="sweat"] .zb-brow-l { transform: translateY(-3px) rotate(-8deg); }
.zubrik[data-mood="sweat"] .zb-brow-r { transform: translateY(-3px) rotate(8deg); }
.zubrik[data-mood="sweat"] .zb-head { transform: rotate(4deg); }
@keyframes zb-scratch-in { 0% { transform: rotate(24deg) scale(0.5); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes zb-scratch { from { transform: rotate(0deg); } to { transform: rotate(-3deg); } }
@keyframes zb-sweat { 0% { transform: translateY(-3px); opacity: 0; } 15% { opacity: 1; } 75% { transform: translateY(6px); opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }

/* 🔥 в огне: пламя за спиной, кулак вверх, решительные брови */
.zubrik[data-mood="fire"] .zb-flames { opacity: 1; transform-origin: 120px 270px; animation: zb-flames-in 0.6s var(--spring) both; }
.zubrik .zb-fl { transform-box: fill-box; transform-origin: 50% 100%; }
.zubrik[data-mood="fire"] .zb-fl { animation: zb-flicker 0.42s ease-in-out infinite alternate; }
.zubrik[data-mood="fire"] .zb-arm-r { opacity: 1; animation: zb-fist-pump 0.9s ease-in-out infinite; }
.zubrik[data-mood="fire"] .zb-brow-l { transform: translateY(3px) rotate(14deg); }
.zubrik[data-mood="fire"] .zb-brow-r { transform: translateY(3px) rotate(-14deg); }
@keyframes zb-flames-in { from { transform: scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes zb-flicker { from { transform: scale(1, 1) skewX(0deg); } to { transform: scale(0.9, 1.14) skewX(-5deg); } }
@keyframes zb-fist-pump { 0%, 100% { transform: rotate(0deg); } 40% { transform: rotate(-8deg) translateY(-8px); } 60% { transform: rotate(-6deg) translateY(-6px); } }

/* 🤩 звёзды в глазах */
.zubrik[data-mood="starstruck"] .zb-stareyes { opacity: 1; }
.zubrik[data-mood="starstruck"] .zb-star { transform-box: fill-box; transform-origin: center; animation: zb-star-in 0.5s var(--spring) both, zb-star-spin 2.4s ease-in-out 0.5s infinite; }
.zubrik[data-mood="starstruck"] .zb-brow { transform: translateY(-6px); }
.zubrik[data-mood="starstruck"] .zb-stars { opacity: 1; }
.zubrik[data-mood="starstruck"] .zb-stars path { transform-box: fill-box; transform-origin: center; animation: zb-twinkle 1s ease-in-out infinite; }
.zubrik[data-mood="starstruck"] .zb-stars path:nth-child(2) { animation-delay: 0.33s; }
.zubrik[data-mood="starstruck"] .zb-stars path:nth-child(3) { animation-delay: 0.66s; }
.zubrik[data-mood="starstruck"] .zb-all { animation: zb-hop 0.7s var(--spring) 1, zb-breathe 4.8s ease-in-out 0.7s infinite; }
@keyframes zb-star-in { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0deg); } }
@keyframes zb-star-spin { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.12) rotate(14deg); } }

/* 🫡 есть! копыто к виску */
.zubrik[data-mood="salute"] .zb-salute { opacity: 1; transform-origin: 62px 210px; animation: zb-salute-in 0.55s var(--spring) both; }
.zubrik[data-mood="salute"] .zb-brow-l { transform: translateY(2px) rotate(6deg); }
.zubrik[data-mood="salute"] .zb-brow-r { transform: translateY(1px) rotate(-6deg); }
.zubrik[data-mood="salute"] .zb-m-flat { opacity: 1; }
.zubrik[data-mood="salute"] .zb-head { transform: translateY(-1px); }
.zubrik[data-mood="salute"] .zb-all { animation: zb-jolt 0.4s var(--spring) 0.35s 1, zb-breathe 4.8s ease-in-out 0.75s infinite; }
@keyframes zb-salute-in { 0% { transform: rotate(-40deg) scale(0.4); opacity: 0; } 60% { transform: rotate(4deg) scale(1.03); opacity: 1; } 100% { transform: none; opacity: 1; } }

/* 👀 косится: глаза влево-вправо, одна бровь вверх */
.zubrik[data-mood="eyes"] .zb-eye { animation: none; transform: scale(1.12); }
.zubrik[data-mood="eyes"] .zb-look { animation: zb-side-eye 3.2s ease-in-out infinite; }
.zubrik[data-mood="eyes"] .zb-brow-l { transform: translateY(-7px) rotate(-6deg); }
.zubrik[data-mood="eyes"] .zb-brow-r { transform: translateY(1px) rotate(-6deg); }
.zubrik[data-mood="eyes"] .zb-m-flat { opacity: 1; }
.zubrik[data-mood="eyes"] .zb-head { animation: zb-side-head 3.2s ease-in-out infinite; }
@keyframes zb-side-eye { 0%, 8% { transform: translate(0, 0); } 16%, 44% { transform: translate(-4.5px, 0.5px); } 54%, 84% { transform: translate(4.5px, 0.5px); } 94%, 100% { transform: translate(0, 0); } }
@keyframes zb-side-head { 0%, 8% { transform: none; } 16%, 44% { transform: rotate(-3deg); } 54%, 84% { transform: rotate(3deg); } 94%, 100% { transform: none; } }

/* 😂 смех до слёз */
.zubrik[data-mood="joy"] .zb-tears { opacity: 1; }
.zubrik[data-mood="joy"] .zb-tear-stream { stroke-dasharray: 5 4; animation: zb-flow 0.45s linear infinite; }
.zubrik[data-mood="joy"] .zb-tear-drop { transform-box: fill-box; transform-origin: center; animation: zb-tear 0.9s ease-in infinite; }
.zubrik[data-mood="joy"] .zb-tear-drop + .zb-tear-drop { animation-delay: 0.45s; }
.zubrik[data-mood="joy"] .zb-m-open { transform-box: fill-box; transform-origin: 50% 0; transform: scale(1.3); }
.zubrik[data-mood="joy"] .zb-brow { transform: translateY(-4px); }
.zubrik[data-mood="joy"] .zb-head { animation: zb-laugh-head 0.32s ease-in-out infinite alternate; }
.zubrik[data-mood="joy"] .zb-all { animation: zb-laugh 0.32s ease-in-out infinite alternate; }
@keyframes zb-flow { to { stroke-dashoffset: -9; } }
@keyframes zb-tear { 0% { transform: translate(0, -6px) scale(0.5); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(var(--tx, -6px), 14px) scale(1); opacity: 0; } }
@keyframes zb-laugh-head { from { transform: rotate(-3deg); } to { transform: rotate(3deg) translateY(1px); } }
@keyframes zb-laugh { from { transform: translateY(0); } to { transform: translateY(-3px) scale(1.01, 0.99); } }

/* 🙏 надеюсь: копыта вместе, глаза закрыты, брови домиком */
.zubrik[data-mood="pray"] .zb-palms { opacity: 1; animation: zb-pray 2.4s ease-in-out infinite; }
.zubrik[data-mood="pray"] .zb-calm { opacity: 1; }
.zubrik[data-mood="pray"] .zb-brow-l { transform: translateY(-3px) rotate(-10deg); }
.zubrik[data-mood="pray"] .zb-brow-r { transform: translateY(-3px) rotate(10deg); }
.zubrik[data-mood="pray"] .zb-head { transform: rotate(-3deg) translateY(1px); }
.zubrik[data-mood="pray"] .zb-stars { opacity: 1; }
.zubrik[data-mood="pray"] .zb-stars path { transform-box: fill-box; transform-origin: center; animation: zb-twinkle 2s ease-in-out infinite; }
.zubrik[data-mood="pray"] .zb-stars path:nth-child(2) { animation-delay: 0.7s; }
.zubrik[data-mood="pray"] .zb-stars path:nth-child(3) { animation-delay: 1.4s; }
@keyframes zb-pray { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  .zubrik:is([data-mood="thumbs"], [data-mood="clap"], [data-mood="party"], [data-mood="shrug"], [data-mood="mindblown"], [data-mood="sweat"],
    [data-mood="fire"], [data-mood="starstruck"], [data-mood="salute"], [data-mood="eyes"], [data-mood="joy"], [data-mood="pray"]) * { animation: none !important; }
  .zubrik .zb-confetti, .zubrik .zb-debris { display: none; }
}
/* серия верных ответов подряд на странице разбора (🔥 с пяти — и Зубрик «в огне») */
.streak-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 8px; border-radius: 999px; font: 700 12.5px/1.2 var(--font-body);
  color: #4A1405; background: linear-gradient(180deg, #FFC27A, #F0803F); box-shadow: 0 6px 14px -8px rgba(232, 103, 60, 0.8); animation: league-point 0.9s var(--spring) 0.5s both; }
.streak-chip .ico { width: 15px; height: 15px; }
.streak-chip + .league-point { margin-left: 0; }
.verdict:has(.streak-chip) .streak-chip { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .streak-chip { animation: none; } }
/* калькулятор: Зубрик у выбора специальности реагирует на вердикт (🎉 👍 🙏 😅 🤷) */
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-zubrik { width: 76px; flex: none; margin: -12px -4px -18px 0; }
/* разбор ответа: Зубрик целиком, не в кружке — реакцию видно (голова и конфетти выглядывают над плашкой) */
.hint-react { padding-block: 8px; padding-left: 14px; min-height: 62px; }
.react-zubrik { flex: none; width: 76px; margin: -40px 0 -12px; align-self: flex-end; }
.react-zubrik .zubrik .zb-shadow { display: none; }
@media (max-width: 560px) { .react-zubrik { width: 58px; margin-top: -28px; } }
/* страница-сообщение (в том числе 404): Зубрик целиком, чтобы было видно, как он разводит копытами */
.msg-zubrik { width: 124px; margin: -6px 0 -10px; }
.msg-zubrik .zubrik .zb-shadow { opacity: 0.08; }
@media (max-width: 560px) { .msg-zubrik { width: 92px; } }

/* «Предметы»: карточки в ряду одной высоты, текст начинается сверху, кнопка перехода прижата к низу —
   поэтому кнопки соседних карточек стоят на одном уровне, сколько бы строк ни было в описании */
@media (min-width: 641px) {
  .live-grid .live-card { align-items: stretch; }
  .live-grid .live-zubrik { align-self: center; }
  .live-grid .live-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .live-grid .live-body > p.faint { margin-top: auto; padding-top: 4px; }  /* свободное место — над блоком «цифры, ссылки, кнопка» */
  .live-grid .live-body > .btn { margin-top: 0; }
  .live-grid .live-links { margin-bottom: 8px; }
}
/* колонка Зубрика одной ширины во всех карточках — текст, ссылки и кнопки начинаются с одной линии;
   сцена «Бонапарт и конь» шире, поэтому остальные Зубрики стоят по центру своей колонки */
@media (min-width: 641px) {
  .live-grid .live-card, .live-grid .live-history { grid-template-columns: 160px minmax(0, 1fr); }
  .live-grid .live-zubrik { justify-self: center; }
  .live-grid .live-history .live-zubrik { width: 160px; margin: 0; }
}
@media (min-width: 1080px) and (max-width: 1240px) { .live-grid .live-title { font-size: 28px; } }

/* Спокойный режим на тестах и вариантах ЦТ (body.is-calm): Зубрик на странице неподвижен — не дышит, не жуёт,
   не засыпает, не следит за курсором. Оживает только по делу: на клик кивает и показывает копытом на задание (nudge),
   на «67» — танцует «шесть-семь». Из подвала выглядывает как обычно. Логика — site.js (calmPage). */
.is-calm .page .zubrik:not([data-mood="nudge"]):not([data-mood="dance"]),
.is-calm .page .zubrik:not([data-mood="nudge"]):not([data-mood="dance"]) * { animation: none !important; transition: none !important; }
.is-calm .page [data-zubrik] { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* 👉 «смотри в задание»: кивает и показывает копытом вниз-вправо, туда, где задание */
.zubrik[data-mood="nudge"] .zb-arm-r { opacity: 1; transform: rotate(75deg); animation: zb-point-in 0.45s var(--spring) both, zb-point-tap 0.7s ease-in-out 0.45s 2; }
.zubrik[data-mood="nudge"] .zb-arm-r .zb-hoof { opacity: 0; }
.zubrik[data-mood="nudge"] .zb-pointer { opacity: 1; }
.zubrik[data-mood="nudge"] .zb-head { animation: zb-nudge-nod 0.6s ease-in-out 0.15s 2; }
.zubrik[data-mood="nudge"] .zb-look { transform: translate(3.5px, 3.5px) !important; }
.zubrik[data-mood="nudge"] .zb-brow { transform: translateY(-3px); }
.zubrik-uk[data-mood="nudge"] .zb-flag, .zubrik-ru[data-mood="nudge"] .zb-cross { opacity: 0; }
@keyframes zb-point-in { 0% { transform: rotate(30deg) scale(0.2); } 70% { transform: rotate(80deg) scale(1.04); } 100% { transform: rotate(75deg) scale(1); } }
@keyframes zb-point-tap { 0%, 100% { transform: rotate(75deg); } 50% { transform: rotate(70deg) translate(3px, 3px); } }
@keyframes zb-nudge-nod { 0%, 100% { transform: none; } 45% { transform: rotate(4deg) translateY(3.5px); } }
@media (prefers-reduced-motion: reduce) { .zubrik[data-mood="nudge"] * { animation: none !important; } }

/* Зубрик на страницах теста — целиком, а не в кружке: так видно, куда он показывает */
.test-zubrik { flex: none; width: 58px; margin: -16px 0 -8px; }
.test-zubrik .zubrik .zb-shadow { display: none; }

/* ---------- кабинет учителя (/teacher), класс, вступление по коду, «Мои классы» ---------- */
.tc-hero { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 20px; align-items: center; }
.tc-hero .h1 em { font-style: normal; color: var(--accent-text); }
.tc-hero-zubrik .zubrik { width: 100%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.16)); }
.tc-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.tc-class-card { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); color: inherit; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); transition: transform 0.3s var(--spring), box-shadow 0.3s ease; }
.tc-class-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px var(--lime-2, var(--lime)), var(--shadow); }
.tc-class-subject { font: 700 12px/1.2 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.tc-class-title { font: 800 22px/1.15 var(--font-display); letter-spacing: -0.02em; }
.tc-code-chip { justify-self: start; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 13px; }
.tc-class-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 700; font-size: 14px; }
.tc-class-go .ico { width: 16px; height: 16px; }
.tc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tc-step { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.tc-step p { margin: 0; }
.tc-step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: var(--lime); font: 800 16px/1 var(--font-display); }
.tc-privacy h2 { display: flex; align-items: center; gap: 8px; }
.tc-privacy h2 .ico { width: 20px; height: 20px; }
.tc-yes { color: var(--ok); }
.tc-no { color: var(--red); }
.tc-back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.tc-back .ico { width: 15px; height: 15px; transform: rotate(180deg); }
.tc-back:hover { color: var(--ink); }
/* приглашение: код крупно, ссылка с кнопкой «Скопировать» */
.tc-invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: center; }
.tc-invite.is-new { box-shadow: inset 0 0 0 2px var(--lime), var(--shadow); }
.tc-code { display: grid; justify-items: center; gap: 2px; padding: 10px 18px; border-radius: var(--r); background: var(--forest); color: var(--lime); }
.tc-code .small { color: color-mix(in srgb, var(--lime) 70%, transparent); }
.tc-code b { font-size: 30px; letter-spacing: 0.14em; line-height: 1.1; }
.tc-link { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.tc-link .field { font-size: 14px; }
.tc-code-new { grid-column: 1 / -1; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; font: inherit; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.link-btn .ico { width: 15px; height: 15px; }
.link-btn { text-align: left; }
.link-btn.small { font-size: 14.5px; }
/* слабые темы и задания: полоска --p (0–100) */
.tc-weak { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.tc-weak-card { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.tc-weak-card .btn { margin-top: 4px; }
.tc-bar { width: 100%; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.tc-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); border-radius: inherit; background: linear-gradient(90deg, var(--lime-2, #C3EA2A), var(--lime)); }
.tc-weak-card .tc-bar i { background: linear-gradient(90deg, #F0803F, #F2C94C); }
.tc-tasks { display: grid; gap: 10px; }
.tc-task { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.tc-task.is-past { opacity: 0.7; }
.tc-task-done { display: grid; gap: 6px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--red); }
.icon-btn .ico { width: 16px; height: 16px; }
/* таблица учеников: на телефоне листается вбок */
.tc-table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.tc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tc-table th { padding: 12px 14px; text-align: left; font: 650 12.5px/1.2 var(--font-body); color: var(--ink-3); white-space: nowrap; border-bottom: 1px solid var(--line); }
.tc-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tc-table tbody tr:last-child td { border-bottom: 0; }
.tc-table td:first-child { white-space: nowrap; }
.tc-pct { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.tc-pct.is-low { background: var(--red-soft); color: var(--red); }
.tc-pct.is-mid { background: color-mix(in srgb, #F2C94C 30%, transparent); color: #8A6618; }
.tc-pct.is-high { background: var(--ok-soft); color: var(--ok); }
.tc-done { display: inline-flex; align-items: center; gap: 3px; color: var(--ok); font-weight: 700; }
.tc-done .ico { width: 14px; height: 14px; }
.tc-late { color: var(--red); font-weight: 650; }
.tc-wip { color: var(--ink-2); font-weight: 650; }
.tc-danger summary { cursor: pointer; }
.tc-delete { background: var(--red-soft); color: var(--red); }
/* вступление по коду и «Мои классы» */
.tc-join-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; }
.tc-join-zubrik .zubrik { width: 100%; }
.tc-join-form { display: grid; grid-template-columns: minmax(0, 220px) max-content; justify-content: start; gap: 8px; }
.tc-join-terms > .stack, .tc-privacy .two > .stack { align-content: start; }
.tc-join-form .field { font-size: 20px; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; }
.tc-my-class { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hw-list { display: grid; gap: 10px; }
.hw-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.hw-item .tc-bar { max-width: 320px; margin-top: 4px; }
.hw-item.is-done { opacity: 0.75; }
.hw-item.is-late .tc-bar i { background: linear-gradient(90deg, #F0803F, #E8566C); }
.dash-homework .card-head h2 { display: flex; align-items: center; gap: 8px; }
.dash-homework .card-head h2 .ico { width: 20px; height: 20px; }
.dash-homework .hw-item { box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 760px) {
  .tc-hero { grid-template-columns: minmax(0, 1fr) 96px; }
  .tc-steps { grid-template-columns: minmax(0, 1fr); }
  .tc-invite { grid-template-columns: minmax(0, 1fr); }
  .tc-code { justify-self: start; }
  .tc-task { grid-template-columns: minmax(0, 1fr) auto; }
  .tc-task-done { grid-column: 1 / -1; grid-row: 2; }
  .tc-join-head { grid-template-columns: 72px minmax(0, 1fr); }
  .hw-item { grid-template-columns: minmax(0, 1fr); }
  .hw-item .btn { justify-self: start; }
}
/* таблица учеников на телефоне — карточками: подписи берутся из data-label */
@media (max-width: 640px) {
  .tc-table-wrap { overflow: visible; background: none; box-shadow: none; border-radius: 0; }
  .tc-table, .tc-table tbody { display: block; }
  .tc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tc-table tr { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 10px; padding: 14px 16px;
    border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
  .tc-table td { display: grid; gap: 3px; align-content: start; padding: 0; border: 0; }
  .tc-table tbody tr:last-child td { border: 0; }
  .tc-table td[data-label]::before { content: attr(data-label); overflow: hidden; font: 650 11.5px/1.2 var(--font-body); color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
  .tc-table .tc-td-name { grid-column: 1 / -1; padding-right: 36px; font-size: 16px; }
  .tc-table .tc-td-wide { grid-column: 1 / -1; }
  .tc-table .tc-td-wide:has(> .faint:only-child) { display: none; }  /* «Слабая тема: —» на телефоне не показываем */
  .tc-table .tc-td-act { position: absolute; top: 8px; right: 8px; }
  .tc-table .tc-pct { justify-self: start; }
}

/* ---------- РТ: результаты и форма на странице маршрута ---------- */
.rt-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rt-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rt-list li:last-child { border-bottom: 0; }
.rt-head { display: inline-flex; align-items: baseline; gap: 10px; min-width: 150px; }
.rt-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.rt-form .rt-err, .rt-form .rt-submit { grid-column: 1 / -1; }
@media (max-width: 760px) { .rt-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .rt-form { grid-template-columns: minmax(0, 1fr); } }

/* Страница /admin/stats: простые таблицы, на телефоне листаются вбок */
.st-wrap { overflow-x: auto; margin: 10px 0 28px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.st-table th { padding: 10px 12px; text-align: right; font: 650 12.5px/1.2 var(--font-body); color: var(--ink-3); white-space: nowrap; border-bottom: 1px solid var(--line); }
.st-table td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-table th:first-child, .st-table td:first-child { text-align: left; }
.st-table tbody tr:last-child td { border-bottom: 0; }
.st-table tfoot td { font-weight: 700; border-top: 1px solid var(--line); }
.st-note { max-width: 70ch; margin: 0 0 8px; color: var(--ink-3); font-size: 14px; }
.st-warn { padding: 10px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); margin: 0 0 12px; }

/* ---------- v10 этап 4: «Занятие на сегодня», серия, цель и план ---------- */
.btn-xl { min-height: 60px; padding: 14px 28px; font-size: 18px; }
.dash-cta form { display: grid; }
.today-btn { width: 100%; }
.today-plus { font-weight: 750; }
.week i.frozen { background: color-mix(in srgb, var(--blue, #4A7BD0) 18%, transparent); color: var(--ink-2); font-size: 15px; }
.goal-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; color: inherit; text-decoration: none; transition: transform 0.35s var(--spring); }
.goal-strip:hover { transform: translateY(-2px); }
.goal-strip-text { display: grid; gap: 4px; min-width: 0; }
.goal-strip-text b { font-size: 16px; }
.goal-strip-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.goal-strip-row span { white-space: nowrap; }
.goal-target { display: grid; gap: 4px; }
.goal-target > b { font-size: 18px; }
.goal-warn { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-weight: 600; }
.goal-rows, .plan-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.goal-rows li { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px minmax(0, 150px); gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--bg-2); }
.goal-name { display: grid; gap: 2px; min-width: 0; }
.goal-num { display: grid; justify-items: center; line-height: 1.1; }
.goal-num b { font-size: 22px; font-weight: 800; }
.goal-gap { color: var(--ink-2); text-align: right; }
.plan-rows li { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.goal-exams { border: 0; padding: 0; margin: 0; }
.goal-exams .choice-row span { padding: 8px 12px; font-size: 14px; }
.goal-uni { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.goal-manual { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) {
  .goal-rows li { grid-template-columns: minmax(0, 1fr) 54px 54px; }
  .goal-gap { grid-column: 1 / -1; text-align: left; }
  .goal-manual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goal-uni { grid-template-columns: minmax(0, 1fr); }
  .goal-strip { grid-template-columns: minmax(0, 1fr); }
  .btn-xl { min-height: 56px; font-size: 17px; }
}

/* «Мои ошибки» (v10, этап 5) */
.mistake-filter { gap: 8px; }
.mistake-filter a.tag { text-decoration: none; }
.mistake { display: grid; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.mistake.is-closed { opacity: 0.72; }
.mistake-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.mistake-answers > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; }
.mistake-answers .bad { background: var(--red-soft); }
.mistake-answers .ok { background: var(--ok-soft); }
.mistake-answers dt { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mistake-answers dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
@media (max-width: 560px) { .mistake-answers { grid-template-columns: minmax(0, 1fr); } }
.mistake-meta { gap: 10px; }
.ladder { display: inline-flex; gap: 4px; }
.ladder i { min-width: 26px; padding: 2px 6px; border-radius: 8px; text-align: center; font: 600 12px/1.5 var(--font-body); font-style: normal; color: var(--ink-3); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.ladder i.done { background: var(--forest); color: #fff; }
.ladder i.half { background: linear-gradient(90deg, var(--forest) 50%, color-mix(in srgb, var(--ink) 8%, transparent) 50%); color: var(--ink); }
:root[data-theme="dark"] .ladder i.done { background: var(--lime); color: var(--lime-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ladder i.done { background: var(--lime); color: var(--lime-ink); } }

/* ---------- пробный вариант (v10, этап 6) ---------- */
.sim-nav button, .sim-nav span { flex: none; width: 36px; height: 32px; border: 0; border-radius: 9px; display: grid; place-items: center; font: 650 12px/1 var(--font-body); color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s var(--spring); }
.sim-default { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.sim-nav button:hover { transform: translateY(-1px); color: var(--ink); }
.sim-nav button.is-done { background: var(--forest); color: var(--lime); box-shadow: none; }
.sim-nav button.is-flag { box-shadow: inset 0 0 0 2px var(--amber, #E0A526); }
.sim-nav button.is-here { outline: 2px solid var(--ink); outline-offset: 1px; }
.sim-nav span.is-missing { cursor: not-allowed; opacity: 0.4; text-decoration: line-through; }
.sim .exam-timer.is-low b { color: var(--red); }
.sim-flag { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; cursor: pointer; }
.sim-flag input { width: 18px; height: 18px; accent-color: var(--forest); }
.sim-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--amber, #E0A526) 14%, transparent); }
.sim-note .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.sim-card.is-picked { box-shadow: inset 0 0 0 2px var(--lime-2), var(--shadow); }
.sim-history li { grid-template-columns: 44px minmax(0, 1fr); }
.sim-history .mark { width: 40px; border-radius: 12px; background: var(--bg-2); font-weight: 800; }
.sim-weak { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sim-weak li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sim-weak li:last-child { border-bottom: 0; }
.sim-weak .exam-num { width: auto; min-width: 44px; padding: 0 8px; }
.sim-table-wrap { overflow-x: auto; }
.sim-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.sim-table th, .sim-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sim-table th { font-weight: 600; color: var(--ink-3); font-size: 13px; }
.sim-table .mark { display: inline-grid; width: 22px; height: 22px; border-radius: 50%; place-items: center; vertical-align: middle; }
.sim-table .mark .ico { width: 13px; height: 13px; }
.sim-table .mark.ok { background: var(--ok-soft); color: var(--ok); }
.sim-table .mark.bad { background: var(--red-soft); color: var(--red); }
.sim-table tr.is-missing, .sim-table tr.is-gone { color: var(--ink-3); }
@media (max-width: 640px) { .sim-weak li { grid-template-columns: auto minmax(0, 1fr); } .sim-weak form { grid-column: 1 / -1; } }

/* ---------- v10, этап 8: Зубрык (раздел белорусского) — вышиванка, пояс, соломенный капелюш, колосок ---------- */
.zubrik-be .zb-torso { fill: #F4EEE2; }
.zubrik-be .zb-arm > path:first-child, .zubrik-be .zb-facepalm > path:first-child,
.zubrik-be .zb-book > path:first-child, .zubrik-be .zb-cup > path:first-child { fill: #F4EEE2; stroke: #D9CDB6; stroke-width: 1.4; }
.zubrik-be .zb-arm > path:nth-child(2), .zubrik-be .zb-facepalm > path:nth-child(2) { stroke: #E4D9C3; }
.zubrik-be .zb-pencil, .zubrik-be .zb-hat { display: none; }
.zubrik-be .zb-cup-body { fill: #F4EEE2; }
.zubrik-be .zb-cup-handle { stroke: #D9CDB6; }
.zubrik-be .zb-cup-mark { stroke: #C8102E; }
/* капелюш: при наведении Зубрык приподнимает его */
.zubrik-be .zb-bryl { transform-origin: 120px 76px; transition: transform 0.55s var(--spring); }
.zubrik-be:hover .zb-bryl { transform: translateY(-11px) rotate(-8deg); }
/* колосок во рту покачивается, кутасы пояса — на ветру */
.zubrik-be .zb-kolos { transform-origin: 127px 182px; animation: zb-kolos 3.4s ease-in-out infinite; transition: opacity 0.2s ease; }
.zubrik-be .zb-be-tail { transform-origin: 150px 244px; animation: zb-tail 3.6s ease-in-out infinite; }
.zubrik-be:is([data-mood="tea"], [data-mood="sleepy"], [data-mood="surprised"], [data-mood="joy"]) .zb-kolos,
.zubrik-be.is-chew .zb-kolos, .zubrik-be.is-yawn .zb-kolos { opacity: 0; }
.zubrik-be.is-chew .zb-grass { opacity: 0; }
@keyframes zb-kolos { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 60% { transform: rotate(5deg) translateY(1px); } }
@keyframes zb-kolos-twirl { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(14deg) translateY(1px); } }

/* Belarusian SWAG: окуляры съезжают на нос, капелюш набок, табличка SWAG, кивает в такт, колосок крутится */
.zubrik-be[data-mood="swag"] .zb-shades { opacity: 1; animation: zb-shades 0.7s var(--spring) both; }
.zubrik-be[data-mood="swag"] .zb-glint { animation: zb-glint 2.8s ease-in-out 0.7s infinite; }
.zubrik-be[data-mood="swag"] .zb-brow { transform: translateY(-5px); }
.zubrik-be[data-mood="swag"] .zb-bryl { transform: translate(8px, -3px) rotate(11deg); }
.zubrik-be[data-mood="swag"] .zb-head { animation: zb-groove 0.8s ease-in-out 0.7s infinite; }
.zubrik-be[data-mood="swag"] .zb-all { animation: zb-hop 0.7s var(--spring) 1, zb-breathe 4.8s ease-in-out 0.7s infinite; }
.zubrik-be[data-mood="swag"] .zb-arm-r { opacity: 1; transform: rotate(0deg); }
.zubrik-be[data-mood="swag"] .zb-kolos { animation: zb-kolos-twirl 0.8s ease-in-out infinite; }
.zubrik-be[data-mood="swag"] .zb-swag { opacity: 1; }
.zubrik-be[data-mood="swag"] .zb-swag-tag { transform-box: fill-box; transform-origin: center; animation: zb-swag-pop 0.6s var(--spring) 0.35s both, zb-swag-bob 1.6s ease-in-out 1s infinite; }
.zubrik-be[data-mood="swag"] .zb-swag-sparks path { transform-box: fill-box; transform-origin: center; animation: zb-twinkle 1.4s ease-in-out infinite; }
.zubrik-be[data-mood="swag"] .zb-swag-sparks path:nth-child(2) { animation-delay: 0.45s; }
.zubrik-be[data-mood="swag"] .zb-swag-sparks path:nth-child(3) { animation-delay: 0.9s; }
@keyframes zb-swag-pop { from { transform: scale(0.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes zb-swag-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(3deg); } }

/* Крыжачок: прыжки из стороны в сторону, руки по очереди вверх, капелюш подпрыгивает, сыплются ромбики орнамента */
.zubrik-be[data-mood="kryzhachok"] .zb-all { animation: zb-kryzh 0.8s ease-in-out infinite; }
.zubrik-be[data-mood="kryzhachok"] .zb-arm { opacity: 1; }
.zubrik-be[data-mood="kryzhachok"] .zb-arm-r { animation: zb-67-r 0.8s ease-in-out infinite; }
.zubrik-be[data-mood="kryzhachok"] .zb-arm-l { animation: zb-67-l 0.8s ease-in-out infinite; }
.zubrik-be[data-mood="kryzhachok"] .zb-eyes { opacity: 0; }
.zubrik-be[data-mood="kryzhachok"] .zb-happy { opacity: 1; }
.zubrik-be[data-mood="kryzhachok"] .zb-m-smile { opacity: 0; }
.zubrik-be[data-mood="kryzhachok"] .zb-m-open { opacity: 1; }
.zubrik-be[data-mood="kryzhachok"] .zb-blush { opacity: 0.9; }
.zubrik-be[data-mood="kryzhachok"] .zb-bryl { animation: zb-bryl-bob 0.4s ease-in-out infinite alternate; }
.zubrik-be[data-mood="kryzhachok"] .zb-be-tail { animation: zb-tail 0.4s ease-in-out infinite; }
.zubrik-be[data-mood="kryzhachok"] .zb-ornament { opacity: 1; }
.zubrik-be[data-mood="kryzhachok"] .zb-ornament path { transform-box: fill-box; transform-origin: center; animation: zb-rhomb-fall 1.8s linear infinite; }
@keyframes zb-kryzh { 0%, 100% { transform: translateX(-7px) rotate(-4deg); } 25% { transform: translateY(-13px); } 50% { transform: translateX(7px) rotate(4deg); } 75% { transform: translateY(-13px); } }
@keyframes zb-bryl-bob { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-7px) rotate(4deg); } }
@keyframes zb-rhomb-fall { from { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { transform: translateY(150px) rotate(180deg); opacity: 0; } }

.course-be { --uk-blue: #8E1B26; --uk-blue-solid: #8E1B26; --uk-red: #C8102E; --uk-red-solid: #B30E28; }
:root[data-theme="dark"] .course-be { --uk-blue: #F2A7AF; --uk-red: #F58A97; --uk-blue-solid: #B3263A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .course-be { --uk-blue: #F2A7AF; --uk-red: #F58A97; --uk-blue-solid: #B3263A; } }
.course-be .en-hero::before { background: radial-gradient(440px circle at 6% 112%, rgba(200, 16, 46, 0.16), transparent 62%), radial-gradient(380px circle at 102% -12%, rgba(215, 174, 85, 0.22), transparent 60%), radial-gradient(300px circle at 60% 120%, rgba(212, 245, 76, 0.16), transparent 60%); }
.btn-be { background: #B30E28; color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(244, 238, 226, 0.35), 0 10px 24px -12px rgba(142, 27, 38, 0.95); }
.btn-be:hover { transform: translateY(-2px); }
:root[data-theme="dark"] .btn-be { background: #C21A33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-be { background: #C21A33; } }
.live-belarusian::before { background: radial-gradient(340px circle at 0% 110%, rgba(200, 16, 46, 0.2), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(215, 174, 85, 0.18), transparent 60%); }
.trio-belarusian::before { background: radial-gradient(300px circle at 0% 110%, rgba(200, 16, 46, 0.2), transparent 65%); }
@media (prefers-reduced-motion: reduce) { .zubrik-be[data-mood="swag"] *, .zubrik-be[data-mood="kryzhachok"] *, .zubrik-be .zb-kolos, .zubrik-be .zb-be-tail { animation: none !important; } }
/* ---------- v11.8: Зубрик Дарвин (биология, скоро) — лысый лоб, седина от висков до бороды, сюртук, вьюрок на роге ---------- */
.zubrik-bio .zb-torso { fill: #3A312D; }
.zubrik-bio .zb-arm > path:first-child, .zubrik-bio .zb-facepalm > path:first-child,
.zubrik-bio .zb-book > path:first-child, .zubrik-bio .zb-cup > path:first-child { fill: #3A312D; }
.zubrik-bio .zb-arm > path:nth-child(2), .zubrik-bio .zb-facepalm > path:nth-child(2) { stroke: #564B45; }
.zubrik-bio .zb-sl-o { stroke: #231D1A; }
.zubrik-bio .zb-sl { stroke: #3A312D; }
.zubrik-bio .zb-sl-cuff { display: inline; stroke: #F4F1E8; }
/* своё вместо общего: купол вместо чёлки, седые брови и борода вместо тёмных; шапки и карандаш не носит */
.zubrik-bio .zb-pencil, .zubrik-bio .zb-hat, .zubrik-bio .zb-partyhat, .zubrik-bio .zb-beard, .zubrik-bio .zb-beard-lines,
.zubrik-bio path.zb-brow, .zubrik-bio .zb-blush:not(.zb-bio-blush), .zubrik-bio .zb-mane, .zubrik-bio .zb-mane + g, .zubrik-bio .zb-mane + g + g { display: none; }
.zubrik-bio .zb-cup-body { fill: #F4F1E8; }
.zubrik-bio .zb-cup-handle { stroke: #D9D2C2; }
.zubrik-bio .zb-cup-mark { stroke: #3A312D; }
.zubrik-bio .zb-bio-hair { transform-origin: 120px 170px; }
/* вьюрок на роге: вертит головой, дёргает хвостом; жук на лацкане иногда ползёт */
.zubrik-bio .zb-finch-head { transform-box: fill-box; transform-origin: 70% 80%; animation: zb-finch-look 6s ease-in-out infinite; }
.zubrik-bio .zb-finch-tail { transform-box: fill-box; transform-origin: 0% 50%; animation: zb-finch-tail 3.1s ease-in-out infinite; }
.zubrik-bio .zb-finch-wing { transform-box: fill-box; transform-origin: 90% 40%; }
.zubrik-bio .zb-finch-turn { transform-box: fill-box; transform-origin: center; }
.zubrik-bio .zb-bio-beetle { animation: zb-beetle 9s ease-in-out infinite; }
/* наведение: брови вверх, вьюрок подпрыгивает и чирикает */
.zubrik-bio:not(.is-peek):hover[data-mood="neutral"] .zb-brow { transform: translateY(-3px); }
.zubrik-bio:not(.is-peek):hover[data-mood="neutral"] .zb-finch-body { animation: zb-finch-hop 0.5s ease-in-out infinite; }
.zubrik-bio:not(.is-peek):hover[data-mood="neutral"] .zb-chirp { opacity: 1; }
.zubrik-bio .zb-chirp text { animation: zb-chirp 1.2s ease-out infinite; }
.zubrik-bio .zb-chirp text:last-child { animation-delay: 0.4s; }
/* flight — вьюрок облетает голову, Дарвин следит за ним глазами */
.zubrik-bio[data-mood="flight"] .zb-finch-fly { animation: zb-finch-fly 4.2s ease-in-out both; }
.zubrik-bio[data-mood="flight"] .zb-finch-turn { animation: zb-finch-turn 4.2s step-end both; }
.zubrik-bio[data-mood="flight"] .zb-finch-wing { animation: zb-finch-flap 0.14s linear 0.25s 26 alternate; }
.zubrik-bio[data-mood="flight"] .zb-finch-legs { animation: zb-finch-legs 4.2s linear both; }
.zubrik-bio[data-mood="flight"] .zb-look { animation: zb-bio-watch 4.2s ease-in-out both; }
.zubrik-bio[data-mood="flight"] .zb-head { animation: zb-bio-head 4.2s ease-in-out both; }
.zubrik-bio[data-mood="flight"] .zb-brow { transform: translateY(-5px); }
.zubrik-bio[data-mood="flight"] .zb-m-smile { opacity: 0; }
.zubrik-bio[data-mood="flight"] .zb-m-open { opacity: 1; }
.zubrik-bio[data-mood="flight"] .zb-chirp { animation: zb-chirp-show 4.4s linear both; }
.zubrik-bio[data-mood="party"] .zb-finch-body, .zubrik-bio[data-mood="cheer"] .zb-finch-body,
.zubrik-bio[data-mood="dance"] .zb-finch-body { animation: zb-finch-hop 0.5s ease-in-out infinite; }
.zubrik-bio[data-mood="mindblown"] .zb-finch-fly { transform: translate(-6px, -22px); transition: transform 0.4s var(--spring); }
@keyframes zb-finch-look { 0%, 38%, 100% { transform: rotate(0); } 42%, 58% { transform: rotate(14deg); } 62%, 78% { transform: rotate(-10deg); } 82% { transform: rotate(0); } }
@keyframes zb-finch-tail { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-16deg); } 86% { transform: rotate(5deg); } }
@keyframes zb-finch-flap { from { transform: rotate(0); } to { transform: rotate(48deg); } }
@keyframes zb-finch-hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-7px); } }
@keyframes zb-chirp { from { transform: translateY(4px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(-6px); opacity: 0; } }
@keyframes zb-chirp-show { 0%, 86% { opacity: 0; } 90%, 100% { opacity: 1; } }
@keyframes zb-beetle { 0%, 70%, 100% { transform: translate(0, 0); } 80% { transform: translate(-3px, 4px); } 90% { transform: translate(-1px, 2px); } }
/* маршрут вьюрка: с рога вверх, над лысиной влево, вдоль левого уха вниз, через лоб обратно на рог */
@keyframes zb-finch-fly {
  0% { transform: translate(0, 0); }
  8% { transform: translate(4px, -14px); }
  22% { transform: translate(-48px, -24px); }
  36% { transform: translate(-116px, -14px); }
  46% { transform: translate(-150px, 18px); }
  55% { transform: translate(-150px, 56px); }
  63% { transform: translate(-118px, 66px); }
  74% { transform: translate(-70px, 10px); }
  86% { transform: translate(-16px, -16px); }
  95% { transform: translate(0, -3px); }
  100% { transform: translate(0, 0); }
}
@keyframes zb-finch-turn { 0% { transform: none; } 58% { transform: scaleX(-1); } 94% { transform: none; } }
@keyframes zb-finch-legs { 0%, 6% { opacity: 1; } 9%, 91% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes zb-bio-watch {
  0%, 6% { transform: translate(3px, -3.5px); }
  22% { transform: translate(1px, -4.5px); }
  36% { transform: translate(-2.5px, -4px); }
  46% { transform: translate(-4.5px, -1.5px); }
  55% { transform: translate(-4.5px, 1px); }
  63% { transform: translate(-3.5px, 2px); }
  74% { transform: translate(-1px, -4px); }
  86%, 100% { transform: translate(3px, -3.5px); }
}
@keyframes zb-bio-head { 0%, 8% { transform: rotate(2deg); } 36% { transform: rotate(-2deg); } 55% { transform: rotate(-5deg) translateY(1px); } 74% { transform: rotate(-1deg); } 92%, 100% { transform: rotate(2deg); } }
.live-biology::before, .trio-biology::before { background: radial-gradient(320px circle at 0% 110%, rgba(44, 39, 37, 0.2), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(198, 232, 62, 0.22), transparent 60%); }
@media (prefers-reduced-motion: reduce) {
  .zubrik-bio[data-mood="flight"] *, .zubrik-bio .zb-finch-head, .zubrik-bio .zb-finch-tail, .zubrik-bio .zb-bio-beetle,
  .zubrik-bio:hover .zb-finch-body, .zubrik-bio .zb-chirp text { animation: none !important; }
}
/* ---------- v11.10: Зубрик-химик (химия, скоро) — кудри после взрыва, очки набекрень, халат в пятнах, колба ---------- */
.zubrik-chem .zb-torso { fill: #F3F4EF; }
.zubrik-chem .zb-arm > path:first-child, .zubrik-chem .zb-facepalm > path:first-child,
.zubrik-chem .zb-book > path:first-child, .zubrik-chem .zb-cup > path:first-child { fill: #F3F4EF; }
.zubrik-chem .zb-arm > path:nth-child(2), .zubrik-chem .zb-facepalm > path:nth-child(2) { stroke: #C3C9BE; }
.zubrik-chem .zb-sl-o { stroke: #C3C9BE; }
.zubrik-chem .zb-sl { stroke: #F3F4EF; }
/* лаймовые резиновые перчатки вместо копыт */
.zubrik-chem .zb-arm [fill="#1E140E"], .zubrik-chem .zb-front [fill="#1E140E"], .zubrik-chem .zb-facepalm [fill="#1E140E"] { fill: #B5DB2E; }
.zubrik-chem .zb-arm [stroke="#463229"], .zubrik-chem .zb-front [stroke="#463229"], .zubrik-chem .zb-facepalm [stroke="#463229"] { stroke: #8DB01B; }
.zubrik-chem .zb-pencil, .zubrik-chem .zb-hat, .zubrik-chem .zb-partyhat, .zubrik-chem path.zb-m-smile { display: none; }
.zubrik-chem .zb-cup-body { fill: #F4F8F8; }
.zubrik-chem .zb-cup-mark { stroke: #E86A9A; }
/* добрый: розовые щёки */
.zubrik-chem .zb-blush { fill: #EE8A86; }
/* колба в руке — пока руки свободны; в жестах с руками и в подвале убираем */
.zubrik-chem .zb-fx > .zb-chem-hold { opacity: 1; transition: opacity 0.25s ease; }
.zubrik-chem.is-peek .zb-fx > .zb-chem-hold,
.zubrik-chem:is([data-mood="cheer"], [data-mood="clap"], [data-mood="cool"], [data-mood="dance"], [data-mood="fire"],
  [data-mood="hug"], [data-mood="nudge"], [data-mood="oops"], [data-mood="party"], [data-mood="point"], [data-mood="proud"],
  [data-mood="read"], [data-mood="tea"], [data-mood="thumbs"], [data-mood="wave"], [data-mood="write"], [data-mood="salute"],
  [data-mood="shrug"], [data-mood="pray"], [data-mood="pet"], [data-mood="mindblown"]) .zb-fx > .zb-chem-hold { opacity: 0; }
/* живость: пузырьки, дымок и искры над кудрями, блик на очках; при наведении колба покачивается */
.zubrik-chem .zb-chem-bub { transform-box: fill-box; transform-origin: center; animation: zb-chem-bub 2.2s ease-in infinite; }
.zubrik-chem .zb-chem-bub:nth-child(2) { animation-delay: 0.4s; }
.zubrik-chem .zb-chem-bub:nth-child(3) { animation-delay: 0.8s; }
.zubrik-chem .zb-chem-bub:nth-child(4) { animation-delay: 1.2s; }
.zubrik-chem .zb-chem-bub:nth-child(5) { animation-delay: 1.6s; }
.zubrik-chem .zb-chem-bub:nth-child(6) { animation-delay: 2s; }
.zubrik-chem .zb-chem-swirl { transform-origin: 215px 154px; }
.zubrik-chem .zb-chem-tremble { transform-origin: 215px 154px; }
.zubrik-chem .zb-chem-surface { transform-box: fill-box; transform-origin: center; }
.zubrik-chem .zb-chem-glow { transform-box: fill-box; transform-origin: center; }
.zubrik-chem:not(.is-peek):hover[data-mood="neutral"] .zb-chem-swirl { animation: zb-chem-rock 1.4s ease-in-out infinite; }
.zubrik-chem:hover .zb-chem-bub { animation-duration: 0.9s; }
.zubrik-chem .zb-chem-steam circle { transform-box: fill-box; transform-origin: center; opacity: 0; }
.zubrik-chem .zb-chem-puff { transform-box: fill-box; transform-origin: center; animation: zb-chem-puff 3.6s ease-out infinite; }
.zubrik-chem .zb-chem-puff:nth-child(2) { animation-delay: 1.2s; }
.zubrik-chem .zb-chem-puff:nth-child(3) { animation-delay: 2.4s; }
.zubrik-chem .zb-chem-sparks path { transform-box: fill-box; transform-origin: center; animation: zb-chem-twinkle 2.6s ease-in-out infinite; }
.zubrik-chem .zb-chem-sparks path + path { animation-delay: 1.3s; }
.zubrik-chem .zb-chem-glint { transform-box: fill-box; transform-origin: center; animation: zb-chem-glint 5s ease-in-out infinite; }
@keyframes zb-chem-bub { from { transform: translateY(0) scale(0.6); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } to { transform: translateY(-18px) scale(1.1); opacity: 0; } }
@keyframes zb-chem-rock { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes zb-chem-puff { from { transform: translate(0, 6px) scale(0.4); opacity: 0; } 25% { opacity: 0.7; } to { transform: translate(4px, -16px) scale(1.4); opacity: 0; } }
@keyframes zb-chem-twinkle { 0%, 100% { transform: scale(0.5) rotate(0); opacity: 0.3; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes zb-chem-glint { 0%, 80%, 100% { opacity: 0; transform: scale(0.4); } 88% { opacity: 1; transform: scale(1.2) rotate(30deg); } }

/* boom, 6,4 с: встряхнул → цвет плывёт → кипит → хлопок → бриллиант по дуге → поймал → любуется → оглянулся → в карман */
.zubrik-chem[data-mood="boom"] .zb-fx > .zb-chem-boom { opacity: 1; transition: none; }
.zubrik-chem[data-mood="boom"] .zb-chem-swirl { animation: zb-chem-swirl 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-chem-tremble { animation: zb-chem-tremble 0.14s ease-in-out 1.9s 8 alternate; }
.zubrik-chem[data-mood="boom"] .zb-chem-surface { animation: zb-chem-slosh 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-chem-liquid { animation: zb-chem-color 6.4s ease-in-out both; }
.zubrik-chem[data-mood="boom"] .zb-chem-glow { animation: zb-chem-glow 6.4s ease-in-out both; }
.zubrik-chem[data-mood="boom"] .zb-chem-bub { animation-duration: 0.5s; }
.zubrik-chem[data-mood="boom"] .zb-chem-steam circle { animation: zb-chem-steam 6.4s ease-out both; }
.zubrik-chem[data-mood="boom"] .zb-chem-steam circle:nth-child(2) { animation-delay: 0.12s; }
.zubrik-chem[data-mood="boom"] .zb-chem-steam circle:nth-child(3) { animation-delay: 0.24s; }
.zubrik-chem .zb-chem-puffs circle { transform-box: fill-box; transform-origin: center; opacity: 0; }
.zubrik-chem[data-mood="boom"] .zb-chem-puffs circle { animation: zb-chem-pop 6.4s ease-out both; }
.zubrik-chem[data-mood="boom"] .zb-chem-gx { animation: zb-chem-gx 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-chem-gy { animation: zb-chem-gy 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-chem-gr { animation: zb-chem-gr 6.4s both; }
.zubrik-chem .zb-chem-gemstar path { transform-box: fill-box; transform-origin: center; }
.zubrik-chem[data-mood="boom"] .zb-chem-gemstar path { animation: zb-chem-twinkle 0.8s ease-in-out infinite; }
.zubrik-chem[data-mood="boom"] .zb-chem-gemstar path + path { animation-delay: 0.4s; }
.zubrik-chem .zb-chem-catch { transform-origin: 62px 232px; }
.zubrik-chem[data-mood="boom"] .zb-chem-catch { animation: zb-chem-catch 6.4s both; }
.zubrik-chem .zb-chem-stash { transform-box: fill-box; transform-origin: 50% 100%; }
.zubrik-chem[data-mood="boom"] .zb-chem-stash { animation: zb-chem-pocket 6.4s both; }
.zubrik-chem .zb-chem-spark, .zubrik-chem .zb-chem-spark2 { transform-box: fill-box; transform-origin: center; opacity: 0; }
.zubrik-chem[data-mood="boom"] .zb-chem-spark { animation: zb-chem-spark 6.4s ease-out both; }
.zubrik-chem[data-mood="boom"] .zb-chem-spark2 { animation: zb-chem-spark 6.4s ease-out 0.15s both; }
.zubrik-chem[data-mood="boom"] .zb-eye { animation: none; }
.zubrik-chem[data-mood="boom"] .zb-look { animation: zb-chem-look 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-brow { animation: zb-chem-brow 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-head { animation: zb-chem-head 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-chem-grin { animation: zb-chem-grin 6.4s both; }
.zubrik-chem[data-mood="boom"] .zb-m-o { animation: zb-chem-o 6.4s both; }
@keyframes zb-chem-swirl {
  0% { transform: rotate(0); animation-timing-function: ease-in-out; }
  5% { transform: rotate(-7deg); animation-timing-function: ease-in-out; }
  9% { transform: rotate(14deg); animation-timing-function: ease-in-out; }
  13% { transform: rotate(-14deg); animation-timing-function: ease-in-out; }
  17% { transform: rotate(13deg); animation-timing-function: ease-in-out; }
  21% { transform: rotate(-11deg); animation-timing-function: ease-in-out; }
  25% { transform: rotate(7deg); animation-timing-function: ease-in-out; }
  29%, 44% { transform: rotate(0); animation-timing-function: ease-out; }
  47% { transform: rotate(-9deg) translateY(3px); animation-timing-function: ease-in-out; }
  53%, 100% { transform: rotate(0); }
}
@keyframes zb-chem-slosh {
  0%, 5% { transform: rotate(0); animation-timing-function: ease-in-out; }
  9% { transform: rotate(-10deg); animation-timing-function: ease-in-out; }
  13% { transform: rotate(10deg); animation-timing-function: ease-in-out; }
  17% { transform: rotate(-9deg); animation-timing-function: ease-in-out; }
  21% { transform: rotate(8deg); animation-timing-function: ease-in-out; }
  25% { transform: rotate(-5deg); animation-timing-function: ease-in-out; }
  31%, 100% { transform: rotate(0); }
}
@keyframes zb-chem-tremble { from { transform: translate(-0.8px, 0.3px) rotate(-1.2deg); } to { transform: translate(0.8px, -0.3px) rotate(1.2deg); } }
@keyframes zb-chem-color { 0%, 8% { fill: #B5DB2E; } 17% { fill: #F2C230; } 26% { fill: #F29A3A; } 35% { fill: #E0457B; } 44%, 72% { fill: #9B5BD6; } 80% { fill: #E0457B; } 90% { fill: #F2C230; } 100% { fill: #B5DB2E; } }
@keyframes zb-chem-glow {
  0%, 14% { opacity: 0; fill: #F2C230; transform: scale(0.8); }
  26% { opacity: 0.25; fill: #F29A3A; }
  35% { opacity: 0.35; fill: #E0457B; transform: scale(1); }
  40% { opacity: 0.5; fill: #9B5BD6; transform: scale(1.1); }
  44% { opacity: 0.7; fill: #9B5BD6; transform: scale(1.25); }
  52% { opacity: 0; transform: scale(1.4); }
  100% { opacity: 0; }
}
@keyframes zb-chem-steam { 0%, 28% { opacity: 0; transform: translateY(6px) scale(0.4); } 34% { opacity: 0.8; } 40% { opacity: 0.6; transform: translateY(-6px) scale(1.1); } 44% { opacity: 0; transform: translateY(-12px) scale(1.3); } 100% { opacity: 0; } }
@keyframes zb-chem-pop { 0%, 45% { transform: scale(0.2); opacity: 0; } 47% { opacity: 0.95; transform: scale(1); } 58% { transform: scale(1.9) translateY(-8px); opacity: 0; } 100% { opacity: 0; } }
/* бриллиант: X и Y — разные группы, поэтому траектория — настоящая парабола */
@keyframes zb-chem-gx {
  0%, 46% { transform: translateX(215px); animation-timing-function: linear; }
  60%, 84% { transform: translateX(25px); animation-timing-function: linear; }
  94%, 100% { transform: translateX(76px); }
}
@keyframes zb-chem-gy {
  0%, 46% { transform: translateY(120px); animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  53% { transform: translateY(8px); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4); }
  60% { transform: translateY(144px); animation-timing-function: ease-out; }
  63% { transform: translateY(149px); animation-timing-function: ease-in-out; }
  67% { transform: translateY(141px); animation-timing-function: ease-in-out; }
  70%, 84% { transform: translateY(143px); animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  88.5% { transform: translateY(150px); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4); }
  94%, 100% { transform: translateY(230px); }
}
@keyframes zb-chem-gr {
  0%, 45% { transform: scale(0.15) rotate(0); opacity: 0; }
  47% { transform: scale(0.6) rotate(40deg); opacity: 1; }
  53% { transform: scale(1.3) rotate(260deg); }
  60% { transform: scale(1.25) rotate(360deg); }
  66% { transform: scale(1.45) rotate(360deg); }
  72% { transform: scale(1.25) rotate(360deg); }
  84% { transform: scale(1.25) rotate(360deg); }
  90% { transform: scale(0.95) rotate(520deg); opacity: 1; }
  94% { transform: scale(0.7) rotate(540deg); opacity: 1; }
  96%, 100% { transform: scale(0.7) rotate(540deg); opacity: 0; }
}
@keyframes zb-chem-catch {
  0%, 46% { transform: rotate(-40deg); opacity: 0; animation-timing-function: cubic-bezier(0.34, 1.4, 0.64, 1); }
  51% { opacity: 1; }
  56% { transform: rotate(0); animation-timing-function: ease-out; }
  60% { transform: rotate(0); animation-timing-function: ease-out; }
  63% { transform: rotate(0) translateY(5px); animation-timing-function: ease-in-out; }
  67%, 84% { transform: rotate(0) translateY(0); opacity: 1; animation-timing-function: ease-in-out; }
  86% { transform: rotate(5deg) translateY(-3px); opacity: 1; animation-timing-function: ease-in; }
  90%, 100% { transform: rotate(-14deg) translateY(10px); opacity: 0; }
}
@keyframes zb-chem-pocket { 0%, 93% { transform: scale(1); } 95.5% { transform: scale(1.08, 0.9); } 98% { transform: scale(0.97, 1.04); } 100% { transform: scale(1); } }
@keyframes zb-chem-spark { 0%, 93% { opacity: 0; transform: scale(0.3); } 96% { opacity: 1; transform: scale(1.25) rotate(45deg); } 100% { opacity: 0; transform: scale(0.8) rotate(90deg); } }
@keyframes zb-chem-look {
  0% { transform: translate(0, 0); animation-timing-function: ease-in-out; }
  5%, 28% { transform: translate(4.5px, 2.5px); animation-timing-function: ease-in-out; }
  44% { transform: translate(4.5px, 1px); animation-timing-function: ease-out; }
  48% { transform: translate(3.5px, -4px); animation-timing-function: ease-in-out; }
  53% { transform: translate(-0.5px, -5px); animation-timing-function: ease-in-out; }
  58%, 72% { transform: translate(-4.5px, 1.5px); animation-timing-function: ease-in-out; }
  75.5% { transform: translate(-5px, -0.5px); animation-timing-function: ease-in-out; }
  79% { transform: translate(5px, -0.5px); animation-timing-function: ease-in-out; }
  82.5% { transform: translate(-4px, 0); animation-timing-function: ease-in-out; }
  86% { transform: translate(-4px, 0.5px); animation-timing-function: ease-in-out; }
  92% { transform: translate(-3px, 4px); animation-timing-function: ease-in-out; }
  98%, 100% { transform: translate(0, 0); }
}
@keyframes zb-chem-brow {
  0%, 26% { transform: translateY(0); animation-timing-function: ease-in-out; }
  34%, 56% { transform: translateY(-5px); animation-timing-function: ease-in-out; }
  62%, 72% { transform: translateY(-2px); animation-timing-function: ease-in-out; }
  76%, 84% { transform: translateY(2.5px); animation-timing-function: ease-in-out; }
  90%, 100% { transform: translateY(0); }
}
@keyframes zb-chem-head {
  0%, 44% { transform: rotate(0); animation-timing-function: ease-out; }
  48% { transform: rotate(-4deg) translateY(-2px); animation-timing-function: ease-in-out; }
  56% { transform: rotate(-2deg); animation-timing-function: ease-in-out; }
  72% { transform: rotate(-2deg); animation-timing-function: ease-in-out; }
  75.5% { transform: rotate(-4deg); animation-timing-function: ease-in-out; }
  79% { transform: rotate(4deg); animation-timing-function: ease-in-out; }
  83% { transform: rotate(-1deg); animation-timing-function: ease-in-out; }
  92%, 100% { transform: rotate(0); }
}
@keyframes zb-chem-grin { 0%, 42% { opacity: 1; } 44%, 56% { opacity: 0; } 58%, 100% { opacity: 1; } }
@keyframes zb-chem-o { 0%, 42% { opacity: 0; } 44%, 56% { opacity: 1; } 58%, 100% { opacity: 0; } }
.live-chemistry::before, .trio-chemistry::before { background: radial-gradient(320px circle at 0% 110%, rgba(155, 91, 214, 0.16), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(198, 232, 62, 0.24), transparent 60%); }
@media (prefers-reduced-motion: reduce) {
  .zubrik-chem[data-mood="boom"] *, .zubrik-chem .zb-chem-bub, .zubrik-chem .zb-chem-puff, .zubrik-chem .zb-chem-glint,
  .zubrik-chem .zb-chem-sparks path, .zubrik-chem:hover .zb-chem-swirl { animation: none !important; }
}
/* ---------- v11.21: Зубрик Эйнштейн (физика, скоро) — седая шевелюра во все стороны, усы щёткой, твидовый кардиган с мелом ---------- */
.zubrik-phys .zb-torso { fill: #6E6862; }
.zubrik-phys .zb-arm > path:first-child, .zubrik-phys .zb-facepalm > path:first-child,
.zubrik-phys .zb-book > path:first-child, .zubrik-phys .zb-cup > path:first-child { fill: #6E6862; }
.zubrik-phys .zb-arm > path:nth-child(2), .zubrik-phys .zb-facepalm > path:nth-child(2) { stroke: #858078; }
.zubrik-phys .zb-sl-o { stroke: #4E4A45; }
.zubrik-phys .zb-sl { stroke: #6E6862; }
.zubrik-phys .zb-sl-cuff { display: inline; stroke: #F4F1E8; }
/* своё вместо общего: седая шевелюра вместо чёлки, седые брови, усы щёткой и своя улыбка под ними; шапки и карандаш не носит */
.zubrik-phys .zb-pencil, .zubrik-phys .zb-hat, .zubrik-phys .zb-partyhat, .zubrik-phys path.zb-brow,
.zubrik-phys path.zb-m-smile:not(.zb-phys-smile), .zubrik-phys .zb-mane, .zubrik-phys .zb-mane + g, .zubrik-phys .zb-mane + g + g { display: none; }
.zubrik-phys .zb-cup-body { fill: #F4F1E8; }
.zubrik-phys .zb-cup-mark { stroke: #6E6862; }
.zubrik-phys .zb-phys-tongue, .zubrik-phys .zb-phys-spikes, .zubrik-phys .zb-phys-string { opacity: 0; }
/* шевелюра живёт: пряди чуть колышутся; при наведении топорщатся (статическое электричество), брови вверх */
.zubrik-phys .zb-phys-halo, .zubrik-phys .zb-phys-spikes { transform-origin: 120px 122px; }
.zubrik-phys .zb-phys-top { transform-origin: 120px 112px; }
.zubrik-phys .zb-phys-halo { animation: zb-phys-sway 6.5s ease-in-out infinite; }
.zubrik-phys:not(.is-peek):hover[data-mood="neutral"] .zb-phys-halo { animation: zb-phys-bristle 0.45s ease-in-out infinite alternate; }
.zubrik-phys:not(.is-peek):hover[data-mood="neutral"] .zb-brow { transform: translateY(-3px); }
@keyframes zb-phys-sway { 0%, 100% { transform: skewX(0); } 30% { transform: skewX(-1.6deg); } 70% { transform: skewX(1.2deg); } }
@keyframes zb-phys-bristle { from { transform: scale(1); } to { transform: scale(1.045); } }
/* своё настроение static, 6 с: трёт лаймовый шарик о шевелюру — волосы встают дыбом и тянутся за шариком, искрят;
   отпускает шарик (он улетает), поворачивается к нам и показывает язык — вспышка фотокамеры, кадр; подмигивает,
   причёска оседает с пружинкой. Тайминг: 0–0,4 с рука с шариком, 0,4–1,6 трёт, 1,6–2 отводит, 2,1 отпускает,
   2,8–3,1 замах, 3,1 язык, 3,4 вспышка, 4,5 язык убран, 4,8 подмигивает. */
.zubrik-phys[data-mood="static"] .zb-fx > :is(.zb-phys-rub, .zb-phys-flash, .zb-phys-frame, .zb-phys-arcs) { opacity: 1; transition: none; }
.zubrik-phys :is(.zb-phys-arm, .zb-phys-hold) { transform-origin: 186px 212px; }
.zubrik-phys .zb-phys-balloon { transform-origin: 193px 88px; }
.zubrik-phys .zb-phys-lick { transform-origin: 120px 186px; }
.zubrik-phys .zb-phys-tache { transform-origin: 120px 176px; }
.zubrik-phys .zb-phys-frame { transform-origin: 120px 140px; }
.zubrik-phys :is(.zb-phys-zap path, .zb-phys-glint) { transform-box: fill-box; transform-origin: center; }
.zubrik-phys[data-mood="static"] .zb-phys-arm { animation: zb-phys-arm 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-hold { animation: zb-phys-hold 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-scrub { animation: zb-phys-scrub 0.15s ease-in-out 0.4s 8 alternate; }
.zubrik-phys[data-mood="static"] .zb-phys-balloon { animation: zb-phys-fly 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-string { animation: zb-phys-string 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-zap path { animation: zb-phys-zap 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-zap path + path { animation-delay: 0.12s; }
.zubrik-phys[data-mood="static"] .zb-phys-arcs { animation: zb-phys-arcs 6s linear both; }
.zubrik-phys[data-mood="static"] .zb-phys-spikes { animation: zb-phys-spikes 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-halo { animation: zb-phys-charge 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-top { animation: zb-phys-top 6s both; }
.zubrik-phys[data-mood="static"] .zb-look { animation: zb-phys-look 6s ease-in-out both; }
.zubrik-phys[data-mood="static"] .zb-eye { animation: zb-phys-eye 6s both; }
.zubrik-phys[data-mood="static"] .zb-eye:last-child { animation: zb-phys-eye 6s both, zb-phys-wink-eye 6s step-end both; }
.zubrik-phys[data-mood="static"] .zb-wink { animation: zb-phys-wink 6s step-end both; }
.zubrik-phys[data-mood="static"] .zb-brow-l { animation: zb-phys-brow-l 6s both; }
.zubrik-phys[data-mood="static"] .zb-brow-r { animation: zb-phys-brow-r 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-wrinkles { animation: zb-phys-wrinkles 6s both; }
.zubrik-phys[data-mood="static"] .zb-head { animation: zb-phys-head 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-tongue { animation: zb-phys-tongue 6s step-end both; }
.zubrik-phys[data-mood="static"] .zb-phys-lick { animation: zb-phys-lick 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-smile { animation: zb-phys-smile 6s step-end both; }
.zubrik-phys[data-mood="static"] .zb-phys-tache { animation: zb-phys-tache 6s both; }
.zubrik-phys[data-mood="static"] .zb-blush { animation: zb-phys-blush 6s both; }
.zubrik-phys[data-mood="static"] .zb-phys-flash { animation: zb-phys-flash 6s ease-out both; }
.zubrik-phys[data-mood="static"] .zb-phys-glint { animation: zb-phys-glint 6s ease-out both; }
.zubrik-phys[data-mood="static"] .zb-phys-frame { animation: zb-phys-frame 6s both; }
/* вспышка: Зубрика на миг высвечивает (где фильтры у SVG не работают — остаются блик и рамка кадра) */
.zubrik-phys[data-mood="static"] .zb-all { animation: zb-breathe 4.8s ease-in-out infinite, zb-phys-lit 6s ease-out both; }
@keyframes zb-phys-arm {
  0% { transform: rotate(38deg) scale(0.6); opacity: 0; animation-timing-function: cubic-bezier(0.34, 1.4, 0.64, 1); }
  6.5% { transform: rotate(0) scale(1); opacity: 1; }
  26.7% { transform: translate(0, 0) rotate(0) scale(1); animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.2); }
  31% { transform: translate(15px, -24px) rotate(3deg) scale(1); }
  36% { transform: translate(14px, -22px) rotate(2deg) scale(1); opacity: 1; animation-timing-function: ease-in; }
  40% { opacity: 1; }
  42%, 100% { transform: translate(10px, 6px) rotate(30deg) scale(0.3); opacity: 0; }
}
/* шарик едет вместе с рукой, пока она его держит; отпущенный остаётся на месте и улетает сам (zb-phys-fly) */
@keyframes zb-phys-hold {
  0% { transform: rotate(38deg) scale(0.6); opacity: 0; animation-timing-function: cubic-bezier(0.34, 1.4, 0.64, 1); }
  6.5% { transform: rotate(0) scale(1); opacity: 1; }
  26.7% { transform: translate(0, 0) rotate(0) scale(1); animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.2); }
  31% { transform: translate(15px, -24px) rotate(3deg) scale(1); }
  36%, 100% { transform: translate(14px, -22px) rotate(2deg) scale(1); opacity: 1; }
}
@keyframes zb-phys-scrub { from { transform: translate(1px, -2px); } to { transform: translate(-2.5px, 4px) rotate(-2deg); } }
@keyframes zb-phys-fly {
  0%, 35% { transform: none; opacity: 1; animation-timing-function: cubic-bezier(0.4, 0, 0.8, 0.6); }
  40% { transform: translate(3px, -22px) rotate(-5deg); }
  46% { transform: translate(10px, -70px) rotate(6deg); opacity: 1; }
  54%, 100% { transform: translate(18px, -150px) rotate(12deg); opacity: 0; }
}
@keyframes zb-phys-string { 0%, 35% { opacity: 0; } 36%, 51% { opacity: 1; } 54%, 100% { opacity: 0; } }
@keyframes zb-phys-zap {
  0%, 8% { opacity: 0; transform: scale(0.4); }
  10% { opacity: 1; transform: scale(1.2) rotate(30deg); }
  13% { opacity: 0.3; transform: scale(0.6) rotate(40deg); }
  16% { opacity: 1; transform: scale(1.1) rotate(70deg); }
  19% { opacity: 0.3; transform: scale(0.6) rotate(80deg); }
  22.5% { opacity: 1; transform: scale(1.2) rotate(110deg); }
  27%, 100% { opacity: 0; transform: scale(0.4) rotate(130deg); }
}
@keyframes zb-phys-arcs { 0%, 28% { opacity: 0; } 29% { opacity: 1; } 31% { opacity: 0.15; } 32.5% { opacity: 1; } 34.5% { opacity: 0; } 36% { opacity: 0.9; } 38%, 100% { opacity: 0; } }
@keyframes zb-phys-spikes {
  0%, 27% { opacity: 0; transform: scale(0.7); }
  30% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  33% { transform: scale(0.98) rotate(1deg); }
  36%, 74% { opacity: 1; transform: scale(1); }
  84%, 100% { opacity: 0; transform: scale(0.75); }
}
@keyframes zb-phys-charge {
  0%, 7% { transform: none; }
  26% { transform: scale(1.03) rotate(0.5deg); }
  30% { transform: scale(1.13) rotate(2deg); }
  34% { transform: scale(1.06) rotate(1deg); }
  38%, 76% { transform: scale(1.08) rotate(0); }
  84% { transform: scale(0.97); }
  90% { transform: scale(1.025); }
  95%, 100% { transform: none; }
}
@keyframes zb-phys-top {
  0%, 26% { transform: none; }
  30% { transform: scale(1.06) translateY(-2px); }
  34%, 76% { transform: scale(1.04) translateY(-1px); }
  85% { transform: scale(0.99); }
  92%, 100% { transform: none; }
}
@keyframes zb-phys-look {
  0% { transform: none; }
  5%, 26% { transform: translate(3px, -3px); }
  31% { transform: translate(3.5px, -4.5px); }
  40% { transform: translate(3px, -5.5px); }
  46% { transform: translate(1.5px, -6px); }
  50%, 100% { transform: none; }
}
@keyframes zb-phys-eye {
  0%, 51% { transform: scale(1); }
  54% { transform: scale(1.14); }
  58%, 74% { transform: scale(1.08); }
  79%, 100% { transform: scale(1); }
}
@keyframes zb-phys-wink-eye { 0% { opacity: 1; } 80% { opacity: 0; } 88%, 100% { opacity: 1; } }
@keyframes zb-phys-wink { 0% { opacity: 0; } 80% { opacity: 1; } 88%, 100% { opacity: 0; } }
@keyframes zb-phys-brow-l {
  0% { transform: none; }
  6%, 26% { transform: translateY(-2px); }
  30% { transform: translateY(-6px); }
  40% { transform: translateY(-4px); }
  47% { transform: translateY(2.5px); }
  52% { transform: translateY(-9px); }
  56%, 76% { transform: translateY(-7px); }
  82% { transform: translateY(-1px); }
  92%, 100% { transform: none; }
}
@keyframes zb-phys-brow-r {
  0% { transform: none; }
  6%, 26% { transform: translateY(-3px); }
  30% { transform: translateY(-6px); }
  40% { transform: translateY(-4px); }
  47% { transform: translateY(-4px); }
  52% { transform: translateY(-9px); }
  56%, 76% { transform: translateY(-7px); }
  82% { transform: translateY(2px); }
  92%, 100% { transform: none; }
}
@keyframes zb-phys-wrinkles { 0%, 47% { opacity: 0.3; } 52%, 76% { opacity: 0.62; } 84%, 100% { opacity: 0.3; } }
@keyframes zb-phys-head {
  0% { transform: none; }
  6%, 26% { transform: rotate(2.5deg); }
  30% { transform: rotate(-1deg) translateY(-1.5px); }
  38% { transform: rotate(-2deg) translateY(-2px); }
  47% { transform: rotate(3deg) translateY(2.5px); animation-timing-function: cubic-bezier(0.3, 1.6, 0.5, 1); }
  52% { transform: rotate(-5deg) translateY(-3px); }
  56% { transform: rotate(-3.5deg) translateY(-1px); }
  62% { transform: rotate(-4.5deg) translateY(-1.5px); }
  68% { transform: rotate(-3deg) translateY(-1px); }
  76% { transform: rotate(-4deg) translateY(-1.5px); }
  84% { transform: rotate(1.5deg); }
  92%, 100% { transform: none; }
}
@keyframes zb-phys-tongue { 0% { opacity: 0; } 51% { opacity: 1; } 79.5%, 100% { opacity: 0; } }
@keyframes zb-phys-lick {
  0%, 51% { transform: rotate(0) scaleY(0); animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1); }
  55% { transform: rotate(0) scaleY(1.16); }
  58% { transform: rotate(0) scaleY(0.94); }
  61% { transform: rotate(0) scaleY(1); }
  64% { transform: rotate(7deg) scaleY(1.02); }
  67% { transform: rotate(-6deg) scaleY(1); }
  70% { transform: rotate(4deg) scaleY(1.02); }
  73% { transform: rotate(-2deg) scaleY(1); }
  76% { transform: rotate(0) scaleY(1); animation-timing-function: ease-in; }
  79.5%, 100% { transform: rotate(0) scaleY(0); }
}
@keyframes zb-phys-smile { 0% { opacity: 1; } 51% { opacity: 0; } 79.5%, 100% { opacity: 1; } }
@keyframes zb-phys-tache { 0%, 50% { transform: none; } 54%, 76% { transform: translateY(-1.6px) scaleX(1.05); } 80%, 100% { transform: none; } }
@keyframes zb-phys-blush { 0%, 50% { opacity: 0.45; } 56%, 86% { opacity: 0.8; } 94%, 100% { opacity: 0.45; } }
@keyframes zb-phys-flash { 0%, 56% { opacity: 0; } 57% { opacity: 1; } 61% { opacity: 0.7; } 67%, 100% { opacity: 0; } }
@keyframes zb-phys-lit { 0%, 56% { filter: brightness(1); } 57% { filter: brightness(1.55) saturate(0.7); } 64%, 100% { filter: brightness(1); } }
@keyframes zb-phys-glint { 0%, 56% { transform: scale(0.2) rotate(0); } 58% { transform: scale(1.3) rotate(20deg); } 66%, 100% { transform: scale(0) rotate(60deg); } }
@keyframes zb-phys-frame {
  0%, 56% { opacity: 0; transform: scale(1.06); }
  58% { opacity: 1; transform: scale(1); }
  74% { opacity: 1; transform: scale(1); }
  80%, 100% { opacity: 0; transform: scale(0.98); }
}
.live-physics::before, .trio-physics::before { background: radial-gradient(320px circle at 0% 110%, rgba(110, 104, 98, 0.18), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(198, 232, 62, 0.24), transparent 60%); }
@media (prefers-reduced-motion: reduce) {
  .zubrik-phys[data-mood="static"] *, .zubrik-phys .zb-phys-halo { animation: none !important; }
}
/* ---------- /Эйнштейн ---------- */
/* v10, этап 8: пять предметов — пять вкладок в меню и пять карточек на главной */
.subj-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.subj-name b { font-size: 12px; letter-spacing: -0.02em; }
@media (max-width: 440px) { .subj-tab { padding: 8px 2px 6px; } .subj-name b { font-size: 10.5px; letter-spacing: -0.03em; } }
@media (min-width: 1101px) { .trio { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; } }


/* ======================================================================
   Zubrik AI 11.0 — «стекло нового поколения»
   Меньше кнопок, больше воздуха. Стекло с бликом, толщиной и преломлением по краю (в Chromium — настоящее
   преломление через SVG-фильтр, см. initLens в site.js), пружинящие нажатия, меню с Зубриками вместо иконок.
   Всё ниже переопределяет правила выше; цвета — через переменные.
   ====================================================================== */

:root {
  --lg-spec: rgba(255, 255, 255, 0.85);
  --lg-inner: rgba(255, 255, 255, 0.9);
  --lg-inner-dark: rgba(18, 30, 22, 0.06);
  --press: cubic-bezier(0.3, 1.5, 0.5, 1);
  --glide: cubic-bezier(0.22, 1, 0.36, 1);
  /* стеклянные панели контента: полупрозрачные над «авророй» фона (без размытия — фон и так мягкий, телефону легче) */
  --panel: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0.64) 100%);
  --panel-rim: inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 0.5px rgba(20, 40, 28, 0.09);
  --bevel: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.95), inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, 0.55);
}
:root {
  --bg: #F5F7F2;
  --amb-1: rgba(212, 245, 76, 0.34);
  --amb-2: rgba(70, 190, 140, 0.13);
  --amb-3: rgba(120, 150, 255, 0.12);
}
:root[data-theme="dark"] {
  --lg-spec: rgba(255, 255, 255, 0.14); --lg-inner: rgba(255, 255, 255, 0.12); --lg-inner-dark: rgba(0, 0, 0, 0.35);
  --bg: #0B1510; --amb-1: rgba(212, 245, 76, 0.13); --amb-2: rgba(40, 150, 100, 0.26); --amb-3: rgba(120, 150, 255, 0.10);
  --panel: linear-gradient(180deg, rgba(36, 58, 46, 0.62) 0%, rgba(20, 36, 28, 0.5) 100%);
  --panel-rim: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.045), 0 0 0 0.5px rgba(0, 0, 0, 0.55);
  --bevel: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.22), inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, 0.08);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --lg-spec: rgba(255, 255, 255, 0.14); --lg-inner: rgba(255, 255, 255, 0.12); --lg-inner-dark: rgba(0, 0, 0, 0.35);
  --bg: #0B1510; --amb-1: rgba(212, 245, 76, 0.13); --amb-2: rgba(40, 150, 100, 0.26); --amb-3: rgba(120, 150, 255, 0.10);
  --panel: linear-gradient(180deg, rgba(36, 58, 46, 0.62) 0%, rgba(20, 36, 28, 0.5) 100%);
  --panel-rim: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.045), 0 0 0 0.5px rgba(0, 0, 0, 0.55);
  --bevel: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.22), inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, 0.08);
} }
:root[data-theme="light"] { --bg: #F5F7F2; }

html { -webkit-tap-highlight-color: transparent; }
a, button, label, summary { touch-action: manipulation; }
body { text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss03"; }

/* ---------- стекло: блик следует за курсором, толщина видна по нижней кромке ---------- */
.lg {
  background:
    radial-gradient(140% 90% at var(--mx, 28%) -20%, var(--lg-spec), transparent 46%),
    linear-gradient(180deg, var(--lg-glow), transparent 38%),
    var(--lg-tint);
  -webkit-backdrop-filter: blur(26px) saturate(210%) brightness(1.03);
  backdrop-filter: blur(26px) saturate(210%) brightness(1.03);
  box-shadow:
    var(--bevel),
    inset 0 1px 0 var(--lg-edge),
    inset 0 -1px 0 var(--lg-edge-2),
    inset 0 12px 22px -16px var(--lg-inner),
    inset 0 -14px 22px -18px var(--lg-inner-dark),
    0 0 0 0.5px var(--lg-line),
    var(--lg-drop);
}
.lg::after {
  padding: 1.2px;
  background: conic-gradient(from 200deg at 50% 50%, var(--lg-edge) 0deg, transparent 60deg, transparent 150deg, var(--lg-edge-2) 180deg, transparent 220deg, transparent 300deg, var(--lg-edge) 360deg);
  opacity: 0.9;
}
/* в Chromium край стекла преломляет то, что под ним (фильтр строит site.js) */
.has-lens { -webkit-backdrop-filter: var(--lens-filter) !important; backdrop-filter: var(--lens-filter) !important; }

/* ---------- нажатия: всё живое пружинит, как в iOS ---------- */
.btn, .tab, .mrow, .subj-tab, .sheet-calc, .menu-btn, .trio-card, .math-tool, .trap, .role-card, .en-topic { -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(0.96); transition: transform 0.12s ease; }
.btn { transition: transform 0.45s var(--press), box-shadow 0.3s var(--glide), background-color 0.2s ease, color 0.2s ease; }

/* ---------- шапка: логотип, три ссылки, круглая кнопка меню ---------- */
.topbar-inner { min-height: 58px; padding: 7px 7px 7px 20px; gap: 6px; }
.brand .logo-svg { height: 25px; }
.topnav { margin-left: auto; margin-right: auto; }
.topnav a { font-size: 14.5px; padding: 9px 14px; }
.topbar-login { margin-left: auto; padding: 10px 14px; border-radius: 999px; font: 600 14.5px/1 var(--font-body); color: var(--ink); text-decoration: none; transition: background-color 0.2s ease; }
.topnav ~ .topbar-login { margin-left: 0; }
.topbar-login:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.topbar-cta { margin-left: 2px !important; }
.menu-btn {
  width: 44px; height: 44px; padding: 0; justify-content: center; flex: none;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  box-shadow: inset 0 1px 0 var(--lg-edge), inset 0 0 0 0.5px var(--lg-edge-2), 0 0 0 0.5px var(--lg-line);
  transition: transform 0.45s var(--press), background-color 0.2s ease;
}
.menu-btn:hover { transform: none; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.menu-btn:active { transform: scale(0.9); transition-duration: 0.1s; }
.burger { width: 18px; height: 10px; }
.menu-btn > .burger { display: inline-block !important; }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 8px; right: 0; }
.menu-btn:hover .burger i:nth-child(1) { transform: translateY(1px); }
.menu-btn:hover .burger i:nth-child(2) { transform: translateY(-1px); }
.me { margin-left: 0; }
/* калькулятор в шапке — круглая стеклянная кнопка, когда ссылок в шапке нет (планшет, телефон) */
.topbar-calc {
  display: none; width: 44px; height: 44px; flex: none; place-items: center; border-radius: 50%;
  color: var(--ink); text-decoration: none;
  background: color-mix(in srgb, var(--lime) 55%, transparent);
  box-shadow: var(--bevel), inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 0.5px color-mix(in srgb, var(--lime-2) 70%, transparent), 0 6px 14px -8px rgba(110, 140, 10, 0.7);
  transition: transform 0.45s var(--press), background-color 0.2s ease;
}
.topbar-calc .ico { width: 21px; height: 21px; }
.topbar-calc:hover { background: var(--lime); }
.topbar-calc:active { transform: scale(0.9); transition-duration: 0.1s; }
.topbar-calc[aria-current="page"] { background: var(--lime); }
@media (max-width: 1100px) { .topnav { display: none; } .topbar-login, .me, .topnav ~ .topbar-login, .topnav ~ .me { margin-left: auto; } .topbar-calc { display: grid; } .topbar-login ~ .topbar-calc, .me ~ .topbar-calc { margin-left: 0; } }
@media (max-width: 720px) {
  .topbar { padding-top: 8px; }
  .topbar-inner { min-height: 54px; padding: 5px 5px 5px 18px; }
  .brand .logo-svg { height: 22px; }
  .topbar-login, .topbar-cta, .me { display: none !important; }
  .topbar-calc { margin-left: auto !important; }
  .menu-btn { width: 44px; height: 44px; }
}

/* ---------- меню ---------- */
.sheet { width: min(560px, 100%); gap: 14px; padding: 14px; border-radius: 34px; }
.sheet-head { padding: 2px 2px 0 10px; }
.sheet-logo { display: inline-flex; color: var(--ink); }
.sheet-logo .logo-svg { height: 22px; width: auto; display: block; }

/* Предметы: плитки-значки с Зубриками «по плечи» (тот же значок — в стартовом тесте, маршруте и плане) */
.subj-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.subj-tabs .lg-thumb { display: none; }
.subj-tab { flex-direction: column; align-items: center; gap: 8px; padding: 0; border-radius: 0; background: none !important; text-align: center; color: var(--ink-3); transition: color 0.25s ease, transform 0.5s var(--press); }
.subj-tab:active { transform: scale(0.94); transition-duration: 0.1s; }
.subj-art {
  position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 26%;
  overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 20px -14px rgba(40, 40, 20, 0.6);
  transition: transform 0.55s var(--press), box-shadow 0.35s var(--glide);
}
.subj-name { font: 650 12.5px/1.15 var(--font-body); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.subj-tab[aria-selected="true"] { color: var(--ink); }
.subj-tab[aria-selected="true"] .subj-art { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ava-ring, var(--ink)), 0 16px 26px -14px var(--ava-ring, rgba(0, 0, 0, 0.5)); }
.subj-tab[aria-selected="true"] .subj-ava img { transform: translateY(-3%) scale(1.05); }
.subj-tab:hover .subj-art { transform: translateY(-3px); }
.subj-tab:focus-visible { outline: none; }
.subj-tab:focus-visible .subj-art { outline: 2px solid var(--blue); outline-offset: 4px; }
.subj-art.is-pop img { animation: ava-pop 0.65s var(--press); }
@keyframes ava-pop { 35% { transform: translateY(-9%) rotate(-5deg) scale(1.08); } 70% { transform: translateY(-2%) rotate(2deg) scale(1.04); } }
.subj-math { --ava-ring: #7EA515; }
.subj-russian { --ava-ring: #8A5634; }
.subj-english { --ava-ring: #3953B8; }
.subj-history { --ava-ring: #A87C22; }
.subj-belarusian { --ava-ring: #C8102E; }

/* сам значок: светлая плитка цвета предмета, узор предмета, свет за головой, стеклянная кромка */
.subj-ava {
  --ava-a: #F4FCCB; --ava-b: #C9E845; --ava-deep: rgba(110, 150, 10, 0.55);
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M6 3v6M3 6h6M15.5 15.5l5 5M20.5 15.5l-5 5' stroke='%23597A08' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  position: relative; display: block; width: 100%; height: 100%; overflow: hidden; isolation: isolate; border-radius: inherit;
  background: radial-gradient(72% 58% at 50% 34%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 72%), linear-gradient(165deg, var(--ava-a), var(--ava-b));
}
.subj-ava::before { content: ""; position: absolute; inset: 0; z-index: 0; background-image: var(--ava-motif); background-size: 36% 36%; opacity: 0.32; -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }
.subj-ava img { position: absolute; z-index: 1; left: -3%; bottom: -10%; width: 106%; height: auto; max-width: none; filter: drop-shadow(0 3px 5px rgba(50, 30, 10, 0.3)); transition: transform 0.6s var(--press); transform-origin: 50% 70%; }
.subj-ava::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; background: radial-gradient(90% 40% at 28% 0%, rgba(255, 255, 255, 0.55), transparent 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 -10px 16px -12px var(--ava-deep); }
.subj-ava-russian { --ava-a: #F7ECDF; --ava-b: #DDB38A; --ava-deep: rgba(120, 70, 30, 0.55);
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M4 16c3-6 6-9 11-11' stroke='%237A4A2B' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='18' cy='18' r='1.6' fill='%237A4A2B'/%3E%3C/svg%3E"); }
.subj-ava-english { --ava-a: #E9EEFF; --ava-b: #A8BAF4; --ava-deep: rgba(40, 60, 160, 0.5);
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M0 24L24 0M-6 6L6 -6M18 30L30 18' stroke='%232E4FB3' stroke-width='2.2' fill='none'/%3E%3C/svg%3E"); }
.subj-ava-history { --ava-a: #F8F0D6; --ava-b: #DDBB67; --ava-deep: rgba(150, 105, 20, 0.55);
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 5l1.8 3.7 4 .6-2.9 2.8.7 4-3.6-1.9-3.6 1.9.7-4-2.9-2.8 4-.6z' fill='%231E2B5E'/%3E%3C/svg%3E"); }
.subj-ava-belarusian { --ava-a: #FDEFEC; --ava-b: #EAA79E; --ava-deep: rgba(180, 20, 40, 0.5);
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 4l6 8-6 8-6-8z' stroke='%23B3142B' stroke-width='1.6' fill='none'/%3E%3Cpath d='M12 9.5l2 2.5-2 2.5-2-2.5z' fill='%23B3142B'/%3E%3C/svg%3E"); }
.subj-ava-biology { --ava-a: #EEF7E3; --ava-b: #A9D27E; --ava-deep: rgba(42, 90, 40, 0.5);  /* v11.8: листики */
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M5 19c1-8 6-13 14-14-1 8-6 13-14 14z' stroke='%232A6B34' stroke-width='1.4' fill='none'/%3E%3Cpath d='M6 18l9-9' stroke='%232A6B34' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.subj-ava-chemistry { --ava-a: #FBEAF1; --ava-b: #E9A3C0; --ava-deep: rgba(150, 40, 80, 0.45);  /* v11.10: колбочки */
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M10 4h4M11 4v6l-5 9h12l-5-9V4' stroke='%23A0305E' stroke-width='1.4' fill='none' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.subj-ava-physics { --ava-a: #EEF0F3; --ava-b: #B9C3CF; --ava-deep: rgba(40, 60, 90, 0.45);  /* v11.21: атом */
  --ava-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='none' stroke='%23344A66' stroke-width='1.2'%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.6'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.6' transform='rotate(60 12 12)'/%3E%3Cellipse cx='12' cy='12' rx='9' ry='3.6' transform='rotate(-60 12 12)'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.6' fill='%23344A66'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .subj-ava { filter: brightness(0.94) saturate(0.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .subj-ava { filter: brightness(0.94) saturate(0.95); } }
.subj-badge, .pick-badge { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 4px 10px -6px rgba(40, 30, 10, 0.5); }
.subj-badge .subj-ava img, .pick-badge .subj-ava img { filter: none; }
.subj-tab[aria-selected="true"] .subj-badge { transform: none; }
.subj-who { margin: 2px 6px 8px; font: 650 13px/1.2 var(--font-body); color: var(--ink-3); }
.subj-panel.is-in .mrow { animation: tile-in 0.42s var(--glide) backwards; animation-delay: calc(var(--i, 0) * 0.03s); }

/* разделы предмета — строки без иконок, со стрелкой */
.mrows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mrow {
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 58px;
  padding: 10px 10px 10px 16px; border-radius: 18px;
  background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-edge-2);
  color: var(--ink); text-decoration: none;
  transition: background-color 0.2s ease, transform 0.45s var(--press);
}
.mrow:hover { background: var(--lg-fill-hover); }
.mrow:active { transform: scale(0.97); transition-duration: 0.1s; }
.mrow-text { min-width: 0; flex: 1; }
.mrow b { display: block; font: 650 15px/1.2 var(--font-body); letter-spacing: -0.01em; }
.mrow small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-go { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--glide); }
.mrow:hover .mrow-go { transform: translateX(2px); stroke: var(--ink); }
.mrow[aria-current="page"] { background: var(--lg-fill-hover); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.mrows > .mrow:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* калькулятор — отдельной заметной карточкой */
.sheet-calc {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 22px;
  background: color-mix(in srgb, var(--lime) 22%, var(--lg-fill)); box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--lime) 60%, transparent);
  color: var(--ink); text-decoration: none; transition: transform 0.45s var(--press), background-color 0.2s ease;
  animation: tile-in 0.45s var(--glide) 0.08s backwards;
}
.sheet-calc:hover { background: color-mix(in srgb, var(--lime) 34%, var(--lg-fill)); }
.sheet-calc:active { transform: scale(0.98); }
.sheet-calc-num { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--lime); color: var(--lime-ink); font: 850 17px/1 var(--font-display); letter-spacing: -0.03em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 14px -8px rgba(110, 140, 10, 0.9); }
.sheet-calc-text { flex: 1; min-width: 0; }
.sheet-calc b { display: block; font: 700 15.5px/1.2 var(--font-body); letter-spacing: -0.01em; }
.sheet-calc small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }

.sheet-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px; animation: tile-in 0.45s var(--glide) 0.12s backwards; }
.sheet-links a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--lg-fill); box-shadow: inset 0 0 0 0.5px var(--lg-edge-2); color: var(--ink); text-decoration: none; font: 600 14px/1 var(--font-body); transition: background-color 0.2s ease, transform 0.4s var(--press); }
.sheet-links a:hover { background: var(--lg-fill-hover); }
.sheet-links a:active { transform: scale(0.95); }
.sheet-links a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.sheet-foot { padding: 2px 2px 0; }
.sheet-foot .segmented span { padding: 7px 14px; }
.sheet-logout { padding: 0 16px; }
.sheet-note { padding-right: 10px; color: var(--ink-3); }

@media (max-width: 640px) {
  .sheet { padding: 8px 14px calc(env(safe-area-inset-bottom, 0px) + 16px); gap: 12px; border-radius: 32px 32px 0 0; }
  .sheet-head { padding: 4px 0 0 6px; }
  .subj-tabs { gap: 8px; }
  .subj-name { font-size: 11px; letter-spacing: -0.025em; }
  .mrows { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mrow { min-height: 52px; padding: 8px 10px 8px 14px; }
  .mrow small { display: block; }
  .sheet-cta { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ---------- главная: первый экран ---------- */
.hero-light::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 28%, transparent), transparent); }
.hero2 h1 { font-size: clamp(38px, 5vw, 66px); letter-spacing: -0.045em; line-height: 0.98; }
.hero2 .lead { max-width: 28em; }
.hero-actions { align-items: center; gap: 8px 22px; }
.hero-login { font: 600 16px/1 var(--font-body); color: var(--ink); text-decoration: none; padding: 12px 4px; border-bottom: 1.5px solid var(--line-2); border-radius: 0; transition: border-color 0.2s ease; }
.hero-login:hover { border-color: var(--ink); }
.hero-trust { font-size: 14px; color: var(--ink-3); }
.mascot-halo { position: absolute; z-index: -1; left: 50%; top: 58%; width: min(420px, 90%); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--lime) 55%, transparent) 0%, color-mix(in srgb, var(--lime) 18%, transparent) 62%, transparent 100%); }
.mascot { isolation: isolate; }
.speech { background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); box-shadow: inset 0 1px 0 var(--lg-edge), 0 0 0 0.5px var(--line-2), var(--shadow-lg); }
.speech::after { background: color-mix(in srgb, var(--surface) 92%, transparent); }

/* сетка первого экрана: текст и кнопка слева, Зубрик справа; на телефоне — текст, Зубрик, стеклянная панель */
.hero2 { grid-template-areas: "copy mascot" "cta mascot"; grid-template-rows: auto auto; align-content: center; row-gap: 0; }
.hero-copy { grid-area: copy; align-self: end; }
.hero2 .mascot { grid-area: mascot; }
.hero-cta-panel { grid-area: cta; align-self: start; }
@media (max-width: 900px) { .hero2 { grid-template-areas: "copy" "mascot" "cta"; } }
/* планшет: текст и кнопка слева, Зубрик справа — кнопка видна без прокрутки */
@media (min-width: 641px) and (max-width: 900px) {
  .hero2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); grid-template-areas: "copy mascot" "cta mascot"; column-gap: 20px; }
  .hero2 h1 { font-size: clamp(38px, 6vw, 52px); }
  .hero2 .mascot .zubrik { width: min(260px, 100%); }
  .hero2 .mascot .speech { font-size: 16px; padding: 12px 16px; }
}

@media (max-width: 640px) {
  .hero-light { padding-block: 8px 30px; }
  .hero2 { text-align: center; }
  .hero-chips { justify-content: center; }
  .hero2 h1 { font-size: 37px; margin: 14px 0 12px; }
  .hero2 .lead { margin-inline: auto; font-size: 16.5px; max-width: 22em; }

  /* Зубрик выглядывает из-за стеклянной панели и держится за её край копытами; туловище видно сквозь стекло */
  .hero2 .mascot { order: 0; position: relative; z-index: 1; display: block; height: 164px; margin: 14px 0 0; }
  .hero2 .mascot .zubrik { position: absolute; left: 50%; top: 16px; width: 196px; margin-left: -128px; filter: drop-shadow(0 14px 18px rgba(29, 74, 53, 0.28)); }
  /* копыта лежат на краю панели по бокам от подбородка, как локти на парте */
  .hero2 .mascot .zb-grip { opacity: 1; transform: translateY(29px); }
  .hero2 .mascot .zb-arm, .hero2 .mascot .zb-shadow, .hero2 .mascot .zb-pencil { display: none; }
  .hero2 .mascot-halo { left: calc(50% - 30px); top: 100px; width: 250px; }
  .hero2 .mascot .speech { position: absolute; left: calc(50% + 40px); right: 0; top: 14px; margin: 0; padding: 10px 13px; border-radius: 18px 18px 18px 6px; font-size: 14px; line-height: 1.25; text-align: left; }
  .hero2 .mascot .speech::after { display: block; left: -4px; bottom: 6px; width: 12px; height: 12px; margin: 0; transform: rotate(45deg); box-shadow: -2px 2px 0 -1px var(--line); border-radius: 0 0 0 3px; }

  .hero-cta-panel {
    position: relative; z-index: 2; padding: 18px 16px 12px; border-radius: 30px;
    background: radial-gradient(120% 70% at 30% -20%, rgba(255, 255, 255, 0.7), transparent 50%), color-mix(in srgb, var(--surface) 46%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(190%) brightness(1.04);
    backdrop-filter: blur(20px) saturate(190%) brightness(1.04);
    box-shadow: var(--bevel), inset 0 1px 0 var(--lg-edge), inset 0 12px 22px -16px var(--lg-inner), 0 0 0 0.5px var(--lg-line), 0 24px 50px -24px rgba(29, 60, 40, 0.4);
  }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 2px; margin-top: 0; }
  .hero-login { align-self: center; border: 0; color: var(--ink-2); font-size: 15px; }
  .hero-trust { justify-content: center; margin: 2px 0 0; font-size: 12.5px; }
}
@media (max-width: 640px) { :root[data-theme="dark"] .hero-cta-panel { background: radial-gradient(120% 70% at 30% -20%, rgba(255, 255, 255, 0.1), transparent 50%), rgba(20, 36, 28, 0.5); } }
@media (max-width: 640px) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-cta-panel { background: radial-gradient(120% 70% at 30% -20%, rgba(255, 255, 255, 0.1), transparent 50%), rgba(20, 36, 28, 0.5); } }

/* ---------- главная: калькулятор баллов прямо под первым экраном ---------- */
.calc-band-wrap { padding-top: 0; }
.calc-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(20px, 4vw, 56px); align-items: center; margin: 0; padding: clamp(22px, 3.4vw, 40px); border-radius: var(--r-xl); }
.calc-band::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(420px circle at 0% 120%, color-mix(in srgb, var(--lime) 30%, transparent), transparent 65%); }
.calc-band-text { display: grid; gap: 12px; justify-items: start; }
.calc-band-text .h2 { font-size: clamp(30px, 3.6vw, 46px); }
.calc-band-text p { margin: 0; max-width: 34em; }
.calc-band-tool { display: grid; gap: 12px; padding: 18px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 1px 0 var(--lg-edge), 0 0 0 0.5px var(--line); }
.calc-band-total { display: flex; align-items: baseline; gap: 8px; }
.calc-band-total b { font: 850 52px/1 var(--font-display); letter-spacing: -0.045em; transition: color 0.3s ease; }
.calc-band-total span { color: var(--ink-3); font-weight: 600; }
.mini-slider { display: grid; gap: 6px; }
.mini-slider > span { display: flex; justify-content: space-between; font: 600 14px/1.2 var(--font-body); color: var(--ink-2); }
.mini-slider b { color: var(--ink); }
.mini-slider input[type="range"] { width: 100%; }
@media (max-width: 860px) { .calc-band { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .calc-band { padding: 20px 16px 16px; } .calc-band-tool { padding: 14px; } .calc-band-total b { font-size: 44px; } }

/* три Зубрика: вся карточка — ссылка, без лишней кнопки */
.trio-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font: 650 15px/1 var(--font-body); color: var(--accent-text); }
.trio-go .ico { width: 16px; height: 16px; transition: transform 0.3s var(--glide); }
.trio-card:hover .trio-go .ico { transform: translateX(3px); }
.trio-card:active { transform: scale(0.98); }
.trio-history::before { background: radial-gradient(300px circle at 0% 110%, rgba(184, 137, 42, 0.28), transparent 65%), radial-gradient(240px circle at 110% -10%, rgba(30, 43, 94, 0.12), transparent 60%); }
.trio-belarusian::before { background: radial-gradient(300px circle at 0% 110%, rgba(200, 16, 46, 0.18), transparent 65%); }
.live-badge { display: none; }

/* ---------- математика: свой обзор, лаймово-лесной ---------- */
.course-math { --uk-blue: #1D4A35; --uk-blue-solid: #1D4A35; --uk-red: #3E7A2E; --uk-red-solid: #1D4A35; }
:root[data-theme="dark"] .course-math { --uk-blue: #D4F54C; --uk-red: #B7E35A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .course-math { --uk-blue: #D4F54C; --uk-red: #B7E35A; } }
.course-math .en-hero::before { background: radial-gradient(440px circle at 6% 112%, color-mix(in srgb, var(--lime) 45%, transparent), transparent 62%), radial-gradient(380px circle at 102% -12%, rgba(29, 74, 53, 0.14), transparent 60%); }
.math-big { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.traps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trap { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform 0.45s var(--press), box-shadow 0.3s var(--glide); }
a.trap:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
a.trap:active { transform: scale(0.98); }
.trap-glyph { display: inline-grid; place-items: center; justify-self: start; min-width: 48px; height: 40px; padding: 0 10px; margin-bottom: 4px; border-radius: 14px; background: var(--lime-soft); color: var(--accent-text); font: 850 18px/1 var(--font-display); letter-spacing: -0.02em; }
.trap b { font: 750 17px/1.25 var(--font-display); letter-spacing: -0.015em; }
.trap-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 650; color: var(--accent-text); }
.trap-go .ico { width: 15px; height: 15px; }
.trap-egg { background: linear-gradient(155deg, color-mix(in srgb, var(--lime) 30%, var(--surface)), var(--surface) 70%); }
.math-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.math-tool { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 4%, transparent); color: var(--ink); text-decoration: none; transition: background-color 0.2s ease, transform 0.45s var(--press); }
.math-tool:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.math-tool:active { transform: scale(0.98); }
.math-tool b { font: 650 15.5px/1.25 var(--font-body); }
.math-tool small { grid-column: 1; color: var(--ink-3); font-size: 13px; }
.math-tool .ico { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--ink-3); }
@media (max-width: 860px) { .traps, .math-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 640px) { .traps.m-scroll { grid-template-columns: none; grid-auto-columns: 78%; } .math-tools { grid-template-columns: minmax(0, 1fr); } }

/* ---------- регистрация: кто ты ---------- */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; border: 0; }
.roles legend { padding: 0; margin-bottom: 8px; font-weight: 650; font-size: 15px; }
.role { position: relative; }
.role input { position: absolute; opacity: 0; pointer-events: none; }
.role-card { display: grid; gap: 3px; height: 100%; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 4%, transparent); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow 0.25s ease, background-color 0.25s ease, transform 0.45s var(--press); }
.role-card b { font: 700 15px/1.2 var(--font-body); }
.role-card small { font-size: 12.5px; line-height: 1.3; color: var(--ink-3); }
.role-card:active { transform: scale(0.96); }
.role input:checked + .role-card { background: color-mix(in srgb, var(--lime) 24%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent-text); }
.role input:focus-visible + .role-card { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 420px) { .roles { grid-template-columns: minmax(0, 1fr); } .role-card { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; } }

/* ---------- плавность ---------- */
@media (prefers-reduced-motion: reduce) { .subj-art, .subj-art .zubrik, .mrow, .btn { transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .lg, .speech { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--surface) !important; } }
/* меню не шире экрана, даже с длинной почтой ученика */
.sheet { grid-template-columns: minmax(0, 1fr); }
.sheet-user { min-width: 0; }
@media (max-width: 380px) { .sheet-pill { display: none; } }

/* ======================================================================
   11.1 — больше стекла
   ====================================================================== */
/* карточки контента — стеклянные панели над «авророй» фона */
.card, .card-pad, .how-step, .feature, .demo-card, .auth-card, .settings-card, .paper-card, .en-topic, .en-cat, .live-card, .soon-card,
.trio-card, .hx-sec, .hx-pager-link, .hx-tl-card, .amb-card, .trap, .tc-step, .tc-weak-card, .vs, .report, .dash-say, .phrase, .pick, .league-weeks {
  background: var(--panel);
  box-shadow: var(--panel-rim), var(--shadow-sm);
}
.card { border-color: transparent; }
.trio-card:hover, a.trap:hover, .en-topic:hover, .paper-card:hover, .amb-card:hover { box-shadow: var(--panel-rim), var(--shadow); }
.trap-egg { background: linear-gradient(155deg, color-mix(in srgb, var(--lime) 34%, transparent), transparent 70%), var(--panel); }
.section-alt { background: color-mix(in srgb, var(--bg-2) 45%, transparent); }
.math-tool, .role-card { background: color-mix(in srgb, var(--surface) 50%, transparent); box-shadow: var(--panel-rim); }
.role input:checked + .role-card { background: color-mix(in srgb, var(--lime) 26%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent-text); }
@media (max-width: 640px) { .start-card { background: none; box-shadow: none; } }

/* кнопки: стеклянная — с кромкой и бликом, лаймовая — с объёмом */
.btn-glass {
  background: radial-gradient(120% 90% at 30% -30%, rgba(255, 255, 255, 0.75), transparent 55%), color-mix(in srgb, var(--surface) 50%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--bevel), inset 0 1px 0 var(--lg-edge), 0 0 0 0.5px var(--line-2), 0 6px 16px -10px rgba(0, 0, 0, 0.25);
}
.btn-lime { box-shadow: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.14), 0 10px 26px -12px rgba(120, 150, 10, 0.9); }

/* пузырь Зубрика — стекло */
.speech { box-shadow: var(--bevel), inset 0 1px 0 var(--lg-edge), 0 0 0 0.5px var(--line-2), var(--shadow-lg); }

/* «наверх» — стеклянная круглая кнопка вместо лаймовой */
.to-top {
  color: var(--ink);
  background: radial-gradient(120% 90% at 30% -30%, rgba(255, 255, 255, 0.8), transparent 55%), color-mix(in srgb, var(--surface) 55%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: blur(18px) saturate(190%);
  box-shadow: var(--bevel), inset 0 1px 0 var(--lg-edge), 0 0 0 0.5px var(--lg-line), 0 12px 26px -12px rgba(0, 0, 0, 0.35);
}

/* исправления вёрстки (11.1) */
/* длинное название темы в бейдже переносится, а не распирает карточку (вариант по истории на телефоне был шире экрана) */
.tag { max-width: 100%; white-space: normal; text-align: left; }
.stack > *, .exam-task { min-width: 0; }
/* шапка прозрачнее: под ней видно (и преломляется) то, что прокручивается */
.topbar-inner { --lg-tint: rgba(255, 255, 255, 0.5); }
:root[data-theme="dark"] .topbar-inner { --lg-tint: rgba(16, 30, 23, 0.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar-inner { --lg-tint: rgba(16, 30, 23, 0.5); } }
/* view-transition-name делает элемент «корнем фона»: стекло внутри него не видит страницу и ничего не размывает.
   Поэтому имя перехода — у самой плашки, а не у её обёртки (раньше шапка из-за этого не была матовой). */
.topbar { view-transition-name: none; }
.topbar-inner { view-transition-name: topbar; }
.vs-avatar { background: linear-gradient(165deg, #F4FCCB, #C9E845); }
.vs-avatar img { width: 118%; height: auto; max-width: none; margin-top: 8px; }

/* ======================================================================
   11.2 — Зубрик на первом экране: позы по времени суток, протирает стекло, стучит по стеклу
   ====================================================================== */
/* колпак и повязка внутри рисунка Зубрика */
.zubrik.has-nightcap .zb-nightcap, .zubrik.has-headband .zb-headband { opacity: 1; }
.zubrik.has-nightcap .zb-pencil { opacity: 0; }
.zubrik.has-nightcap .zb-nightcap { transform-origin: 120px 66px; animation: zb-hat 5.6s ease-in-out infinite; }
html[data-season] .zubrik .zb-nightcap, html[data-season] .zubrik .zb-headband { opacity: 0; }  /* праздничная шапка важнее */
.zubrik.has-headband .zb-brow { transform: translateY(2.5px); }  /* сосредоточился */
.zubrik.has-headband .zb-brow-l { transform: translateY(2.5px) rotate(5deg); transform-box: fill-box; transform-origin: center; }
.zubrik.has-headband .zb-brow-r { transform: translateY(2.5px) rotate(-5deg); transform-box: fill-box; transform-origin: center; }

/* ореол за Зубриком — цвет времени суток */
.hero-pose-morning .mascot-halo { background: radial-gradient(closest-side, rgba(255, 196, 120, 0.55) 0%, color-mix(in srgb, var(--lime) 22%, transparent) 60%, transparent 100%); }
.hero-pose-evening .mascot-halo { background: radial-gradient(closest-side, rgba(255, 176, 84, 0.5) 0%, rgba(255, 150, 70, 0.16) 60%, transparent 100%); }
.hero-pose-night .mascot-halo { background: radial-gradient(closest-side, rgba(96, 116, 230, 0.42) 0%, rgba(70, 90, 200, 0.14) 60%, transparent 100%); }
.hero-pose-night .mascot-halo::before {
  content: ""; position: absolute; inset: 10%; border-radius: 50%;
  background:
    radial-gradient(1.6px 1.6px at 22% 30%, #FFF6C9 98%, transparent), radial-gradient(1.2px 1.2px at 70% 18%, #FFF6C9 98%, transparent),
    radial-gradient(1.4px 1.4px at 82% 46%, #FFF6C9 98%, transparent), radial-gradient(1.1px 1.1px at 36% 12%, #FFF6C9 98%, transparent),
    radial-gradient(1.3px 1.3px at 14% 58%, #FFF6C9 98%, transparent);
  animation: hero-twinkle 3.2s ease-in-out infinite alternate;
}
@keyframes hero-twinkle { from { opacity: 0.35; } to { opacity: 1; } }
:root[data-theme="light"] .hero-pose-night .mascot-halo::before { filter: drop-shadow(0 0 1px rgba(60, 70, 160, 0.9)); }

/* реквизит стоит на краю панели (только на телефоне; на компьютере Зубрик сам держит кружку и книгу) */
.hero-prop, .hero-lamp-light { display: none; }
.hero-mug .hero-steam { color: color-mix(in srgb, var(--ink) 30%, transparent); }
.hero-mug .hero-steam path { transform-box: fill-box; transform-origin: center bottom; animation: zb-steam 2.4s ease-in-out infinite; }
.hero-mug .hero-steam path:nth-child(2) { animation-delay: 0.8s; }
.hero-mug .hero-steam path:nth-child(3) { animation-delay: 1.6s; }
.hero-bulb { filter: drop-shadow(0 0 6px rgba(255, 210, 120, 0.95)); }

/* окно стекла, лапа с шарфом, круги от стука */
.hero-glass, .hero-wiper, .hero-knock { display: none; }

@media (max-width: 640px) {
  .hero-prop { display: block; position: absolute; z-index: 2; bottom: -2px; }
  .hero-mug { left: 14px; width: 42px; }
  .hero-lamp { right: 8px; width: 66px; }
  .hero-lamp-light { display: block; position: absolute; z-index: 1; left: calc(50% - 128px); top: 20px; width: 220px; height: 200px; pointer-events: none; background: radial-gradient(closest-side at 60% 40%, rgba(255, 205, 120, 0.42), transparent); mix-blend-mode: screen; animation: hero-lamp 4s ease-in-out infinite alternate; }
  @keyframes hero-lamp { from { opacity: 0.8; } to { opacity: 1; } }
  .hero2 .mascot .zb-book, .hero2 .mascot .zb-pen, .hero2 .mascot .zb-cup { display: none; }

  /* панель: сверху «окно» матового стекла, сквозь которое виден Зубрик; стекло — отдельный слой, его можно протереть */
  .hero-cta-panel { padding-top: 58px; background: rgba(255, 255, 255, 0.08) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .hero-cta-panel > .hero-glass, .hero-cta-panel > .hero-wiper, .hero-cta-panel > .hero-knock { animation: none; }
  .hero-glass {
    display: block; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
    background: radial-gradient(120% 70% at 30% -20%, rgba(255, 255, 255, 0.6), transparent 50%), color-mix(in srgb, var(--surface) 44%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(190%) brightness(1.04);
    backdrop-filter: blur(16px) saturate(190%) brightness(1.04);
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  }
  .hero-cta-panel > .hero-actions, .hero-cta-panel > .hero-trust { position: relative; z-index: 3; }
  .hero-wiper { display: block; position: absolute; z-index: 0; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; }
  .hero-wiper.is-on { opacity: 1; }
  .hw-arm { stroke: #553521; stroke-width: 24; stroke-linecap: round; }
  .hw-fur { stroke: #6E4428; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 10 14; }
  .hero-knock { display: block; position: absolute; z-index: 2; left: var(--kx, 50%); top: var(--ky, 30px); width: 0; height: 0; pointer-events: none; }
  .hero-knock i { position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(29, 74, 53, 0.12); opacity: 0; }
  .hero-knock.is-on i { animation: hero-ripple 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .hero-knock.is-on i:nth-child(2) { animation-delay: 0.12s; }
  @keyframes hero-ripple { from { opacity: 0.9; transform: scale(0.3); } to { opacity: 0; transform: scale(1.6); } }

  /* пока трёт стекло — правое копыто не на краю, а работает */
  .mascot.is-wiping .zb-grip-r, .mascot.is-knocking .zb-grip-r { opacity: 0; }
  .mascot.is-knocking .zubrik { transform: translateY(-6px); }
  .hero2 .mascot .zubrik { transition: transform 0.5s var(--press); }
}
:root[data-theme="dark"] .hero-glass { background: radial-gradient(120% 70% at 30% -20%, rgba(255, 255, 255, 0.1), transparent 50%), rgba(20, 36, 28, 0.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-glass { background: radial-gradient(120% 70% at 30% -20%, rgba(255, 255, 255, 0.1), transparent 50%), rgba(20, 36, 28, 0.5); } }

/* кнопка подпрыгивает от стука; реплика меняется плавно */
.btn.is-knocked { animation: knock-bounce 0.42s var(--press); }
@keyframes knock-bounce { 40% { transform: translateY(-4px) scale(1.035); } }
.speech { transition: opacity 0.18s ease, transform 0.25s var(--press); }
.speech.is-swap { opacity: 0; transform: translateY(4px) scale(0.96); }
@media (prefers-reduced-motion: reduce) { .hero-pose-night .mascot-halo::before, .hero-lamp-light, .hero-mug .hero-steam path { animation: none; } }
@media (max-width: 640px) {
  .hero-cta-panel::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; box-shadow: var(--bevel), inset 0 1px 0 var(--lg-edge), inset 0 -1px 0 var(--lg-edge-2); }
}
.hero-wiper.is-knock .hw-rag { display: none; }  /* стучит копытом, а не шарфом */
.zubrik.has-headband .zb-pencil { opacity: 0; }
@media (min-width: 641px) {
  .hero2 .mascot .zubrik { transition: transform 0.45s var(--press); }
  .hero2 .mascot.is-turned .zubrik { transform: scaleX(-1); }
}

/* ======================================================================
   11.3 — пропорции: вложенные скругления (внутренний радиус = внешний − отступ), сетка 8 px,
   кнопки 48 px с мягкой тенью, ровная иерархия «кнопка → ссылка → подпись»
   ====================================================================== */
/* кнопки: одна высота, тень мягче — кнопка не «давит» на соседей */
.btn { min-height: 48px; padding: 12px 22px; }
.btn-sm { min-height: 40px; padding: 8px 16px; }
.btn-lime { box-shadow: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1.5px 0 rgba(0, 0, 0, 0.07), 0 1px 2px rgba(60, 80, 0, 0.16), 0 6px 16px -8px rgba(120, 150, 10, 0.6); }
.btn-lime:hover { box-shadow: inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1.5px 0 rgba(0, 0, 0, 0.07), 0 2px 4px rgba(60, 80, 0, 0.14), 0 12px 24px -10px rgba(120, 150, 10, 0.7); }
.lead { text-wrap: pretty; }

/* шапка: всё по 44 px (на телефоне 40) с одинаковым отступом от края плашки — углы вложенные */
.topbar-inner { min-height: 58px; padding: 7px 7px 7px 20px; }
.topbar-cta { min-height: 44px; padding-inline: 18px; }
.topbar-login { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; }
@media (max-width: 720px) {
  .topbar-inner { min-height: 54px; padding: 7px 7px 7px 18px; }
  .topbar-calc, .menu-btn { width: 40px !important; height: 40px !important; }
  .topbar-calc .ico { width: 19px; height: 19px; }
  .topbar-calc { box-shadow: var(--bevel), inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 0 0.5px color-mix(in srgb, var(--lime-2) 70%, transparent); }
}

/* первый экран: блок «кнопка + ссылка + подпись» */
.hero-cta { grid-area: cta; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin-top: 30px; }
.hero-cta-panel { grid-area: auto; position: relative; }
.hero-cta > .hero-cta-panel { animation-name: hero-rise; }  /* без прозрачности и размытия: иначе стекло внутри на миг перестаёт быть стеклом */
@keyframes hero-rise { from { transform: translateY(22px); } }
.hero-cta .hero-trust { flex-basis: 100%; margin: 10px 0 0; }
.hero-start { position: relative; z-index: 3; }

@media (max-width: 640px) {
  .hero-cta { display: grid; justify-items: center; gap: 0; margin-top: 0; }
  /* панель: окно стекла 52 px, кнопка с отступом 8 px; радиус 32 = 24 (кнопка) + 8 */
  .hero-cta-panel { justify-self: stretch; padding: 52px 8px 8px !important; border-radius: 32px; }
  .hero-start { display: flex; width: 100%; min-height: 48px; }
  .hero-login { margin-top: 10px; padding: 8px 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
  .hero-cta .hero-trust { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); text-align: center; }
  .hero2 .lead { text-wrap: balance; }
}

/* калькулятор на главной: вложенные углы */
.calc-band { border-radius: 32px; }
.calc-band-tool { border-radius: 24px; padding: 20px 20px 8px; gap: 14px; }
.calc-band-tool .btn { margin: 6px -12px 0; width: calc(100% + 24px); }  /* кнопка в 8 px от края: 24 + 8 = 32 */
.calc-band-tool { border-radius: 32px; }
@media (max-width: 640px) {
  .calc-band { padding: 24px 16px 8px; gap: 18px; }
  /* на телефоне без вложенной карточки: ползунки прямо в карточке, кнопка в 8 px от края — радиус 32 = 24 + 8 */
  .calc-band-tool { padding: 18px 0 0; border-radius: 0; background: none; box-shadow: inset 0 1px 0 var(--line); }
  .calc-band-tool .btn { margin: 4px -8px 0; width: calc(100% + 16px); }
}
/* карточки цен: кнопка «лотком» в 8 px от края, радиус 32 = 24 (кнопка) + 8 */
.price, .card-pad.price, .stage.price { --price-pad: clamp(22px, 3vw, 32px); padding: var(--price-pad) var(--price-pad) 8px; border-radius: 32px; }
.price > .btn:last-child { margin: 6px calc(8px - var(--price-pad)) 0; width: calc(100% + 2 * var(--price-pad) - 16px); }
/* у «Месяца» общий .card-pad (grid) перебивал раскладку цены — кнопка не стояла внизу, под ней была пустота */
.card-pad.price { display: flex; flex-direction: column; align-content: normal; }
/* меню: строки и карточка калькулятора вложены в шторку (34 − 14 = 20; на телефоне 32 − 14 = 18) */
.mrow, .sheet-calc { border-radius: 20px; }
@media (max-width: 640px) { .mrow, .sheet-calc { border-radius: 18px; } }

/* ореол за Зубриком центрируется свойством translate, а не transform: иначе анимация появления (.enter > *, тоже transform)
   перебивала центрирование, и при каждом заходе на главную ореол 0,9 с выезжал справа снизу из-под панели —
   ночью он сине-фиолетовый, это и была «фиолетовая полоса» */
.mascot-halo { transform: none; translate: -50% -50%; }
.mascot.enter > .mascot-halo { animation: halo-in 1.1s var(--ease) 0.1s both; }
@keyframes halo-in { from { opacity: 0; scale: 0.82; } }

/* ======================================================================
   11.4 — исправления по отзыву
   ====================================================================== */
/* разбор мини-теста: у свёрнутого верного ответа видно ответ и стрелку — не выглядит как пустое задание */
.en-review summary { align-items: center; }
.en-review-q { flex: 1; min-width: 0; }
.en-review-more { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 650 13px/1 var(--font-body); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.en-review-more::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.3s var(--glide); }
.en-review[open] .en-review-more::after { transform: rotate(-135deg) translate(-2px, -2px); }
.en-review[open] .en-review-more { font-size: 0; gap: 0; }
/* шапка: ссылки прижаты к «Войти» справа — без дыры посередине плашки */
.topnav { margin-left: auto; margin-right: 6px; }
.topnav ~ .topbar-login, .topnav ~ .me { margin-left: 0; }
/* до 1100 px ссылок нет — «Войти»/профиль снова уходят вправо (иначе на планшете кнопки слипались с логотипом) */
@media (max-width: 1100px) { .topnav ~ .topbar-login, .topnav ~ .me { margin-left: auto; } }

/* калькулятор на главной: текст сверху, цифры снизу — колонка заполнена, а не «плавает» посередине */
.calc-band { align-items: stretch; }
.calc-band-text { align-content: start; grid-template-rows: auto auto auto 1fr; padding-block: 12px 4px; }
.calc-facts { align-self: end; display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 8px; margin: 18px 0 0; }
.calc-facts div { padding: 14px 18px 12px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: var(--panel-rim); }
.calc-facts dt { font: 850 30px/1 var(--font-display); letter-spacing: -0.035em; }
.calc-facts dd { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 860px) { .calc-band-text { padding-block: 0; } .calc-facts { margin-top: 8px; } }
@media (max-width: 640px) { .calc-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .calc-facts div { padding: 12px; border-radius: 16px; } .calc-facts dt { font-size: 22px; white-space: nowrap; } .calc-facts dd { font-size: 11.5px; white-space: normal; overflow-wrap: anywhere; hyphens: auto; } }
@media (max-width: 400px) { .calc-facts div { padding: 12px 10px; } .calc-facts dt { font-size: 20px; } }

/* «Пять Зубриков»: больше света за каждым — ореол цвета предмета */
.trio-zubrik { position: relative; isolation: isolate; }
.trio-zubrik::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 52%; width: 150%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, var(--trio-glow, color-mix(in srgb, var(--lime) 60%, transparent)), transparent 72%); opacity: 0.9; transition: opacity 0.4s ease, scale 0.6s var(--glide); }
.trio-card:hover .trio-zubrik::before { opacity: 1; scale: 1.08; }
.trio-russian { --trio-glow: rgba(230, 170, 110, 0.55); }
.trio-english { --trio-glow: rgba(130, 160, 255, 0.5); }
.trio-history { --trio-glow: rgba(240, 200, 100, 0.55); }
.trio-belarusian { --trio-glow: rgba(250, 130, 130, 0.45); }
:root[data-theme="dark"] .trio-zubrik::before { opacity: 1; filter: saturate(1.2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .trio-zubrik::before { opacity: 1; filter: saturate(1.2); } }
.trio-zubrik .zubrik { filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.22)) drop-shadow(0 0 22px rgba(255, 255, 255, 0.12)); }
@media (min-width: 861px) {
  .calc-band-text { gap: 16px; }
  .calc-band-text .h2 { font-size: clamp(40px, 4.4vw, 58px); max-width: 11em; }
  .calc-band-text p { font-size: 17px; max-width: 30em; }
}

/* 11.4.1 — на страницах предметов за каждым Зубриком лёгкий свет цвета предмета */
.course-math { --subj-glow: rgba(212, 245, 76, 0.9); --subj-tint: rgba(212, 245, 76, 0.45); }
.course-ru { --subj-glow: rgba(236, 160, 90, 0.85); --subj-tint: rgba(236, 160, 90, 0.42); }
.course-uk { --subj-glow: rgba(110, 145, 255, 0.85); --subj-tint: rgba(110, 145, 255, 0.4); }
.course-nap { --subj-glow: rgba(245, 200, 80, 0.88); --subj-tint: rgba(245, 200, 80, 0.42); }
.course-be { --subj-glow: rgba(245, 100, 115, 0.8); --subj-tint: rgba(245, 100, 115, 0.4); }
/* 11.7.3: без border-radius. Safari обрезает содержимое <svg> по скруглению (как у картинки): Зубрик 240×280 оказывался
   в вертикальном овале — шляпа, рога и низ срезаны, а тень drop-shadow обводила этот овал «рамкой». Ореол и так круглый:
   closest-side сходит в прозрачность к краям, скругление ему не нужно (в Chrome картинка та же). */
.en-page .en-hero-zubrik .zubrik, .en-page .result-hero .zubrik, .en-page .hint .zubrik:not(.avatar .zubrik) {
  background: radial-gradient(closest-side at 50% 52%, var(--subj-glow, transparent), transparent 100%);
}
.en-page .avatar { background: radial-gradient(circle at 50% 40%, var(--subj-tint, transparent), transparent 75%), color-mix(in srgb, var(--surface) 70%, transparent); }
.en-page .zb-ride, .en-page [data-ride] { background: radial-gradient(closest-side at 60% 55%, var(--subj-glow, transparent), transparent 100%); }
/* больше цвета: вся первая карточка предмета подсвечена цветом предмета со стороны Зубрика */
.en-page .en-hero { background:
    radial-gradient(70% 90% at 0% 0%, var(--subj-tint, transparent), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, color-mix(in srgb, var(--subj-tint, transparent) 60%, transparent), transparent 70%),
    var(--lg-tint); }
@media (max-width: 640px) { .en-page .en-hero { background:
    radial-gradient(80% 55% at 100% 0%, var(--subj-tint, transparent), transparent 75%),
    radial-gradient(70% 50% at 0% 100%, color-mix(in srgb, var(--subj-tint, transparent) 55%, transparent), transparent 75%),
    var(--lg-tint); } }
.en-page .en-hero-zubrik .zubrik { filter: drop-shadow(0 0 26px var(--subj-tint, transparent)) drop-shadow(0 14px 18px rgba(0, 0, 0, 0.22)); }

/* ---------- 11.5 — первый экран на телефоне без «окна» матового стекла ----------
   Раньше Зубрик стоял за стеклянной панелью: над кнопкой была размытая полоса (ночью — синяя), похожая на сбой
   отрисовки. Теперь Зубрик целиком, держит кружку, книгу и карандаш как на компьютере, реплика — справа от него,
   под ним чистая кнопка на всю ширину. Стекло, протирание и стук отключены (site.js: initHeroGlass). */
@media (max-width: 640px) {
  .hero2 .mascot { height: 206px; margin: 18px 0 2px; }
  .hero2 .mascot .zubrik { top: 4px; width: 172px; margin-left: -122px; }
  .hero2 .mascot .zb-grip { opacity: 0; transform: none; }
  .hero2 .mascot .zb-arm, .hero2 .mascot .zb-shadow, .hero2 .mascot .zb-pencil,
  .hero2 .mascot .zb-book, .hero2 .mascot .zb-pen, .hero2 .mascot .zb-cup { display: inline; }
  .hero2 .mascot-halo { left: calc(50% - 36px); top: 104px; width: 230px; }
  .hero2 .mascot .speech { left: calc(50% + 40px); right: 0; top: 22px; }
  .hero-prop, .hero-lamp-light, .hero-glass, .hero-wiper, .hero-knock { display: none !important; }
  .hero-cta-panel, :root .hero-cta-panel { padding: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important; }
  .hero-cta-panel::after { display: none; }
  .hero-start { min-height: 52px; font-size: 16px; }
}
@media (max-width: 640px) { .to-top { width: 42px; height: 42px; } }
/* 11.5 — мова: белорусские названия тем длинные; моноширинный капс на телефоне рвался на 2–3 строки
   и заголовки карточек стояли на разной высоте. Шрифт текста, до двух строк, место под две строки зарезервировано. */
.course-be .en-topic-en { font: 700 11.5px/1.25 var(--font-body); letter-spacing: 0.05em; }
@media (max-width: 640px) {
  .course-be .en-topic-en { font-size: 10.5px; min-height: 2.5em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
@media (max-width: 380px) { .hero2 .mascot { height: 192px; } .hero2 .mascot .zubrik { width: 160px; margin-left: -120px; } .hero2 .mascot .speech { left: calc(50% + 34px); } }

/* ---------- 11.5 — кабинет родителя (/parent) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pr-child-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pr-child-head .me-dot { width: 44px; height: 44px; font-size: 18px; }
.pr-child-head > .stack { flex: 1 1 160px; }
.pr-week { margin-left: auto; }
.pr-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
.pr-day { display: grid; justify-items: center; gap: 4px; }
.pr-day i { width: 100%; max-width: 44px; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.pr-day.is-on i { background: var(--lime); color: var(--lime-ink, #121212); box-shadow: none; }
.pr-day i .ico { width: 18px; height: 18px; }
.pr-day small { font-size: 12px; color: var(--ink-3); }
.pr-day.is-today small { color: var(--ink); font-weight: 700; }
.pr-tip { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45;
  background: color-mix(in srgb, #F2C94C 16%, transparent); }
.pr-tip.is-ok { background: color-mix(in srgb, var(--lime) 18%, transparent); }
.pr-tip .ico { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.pr-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 20px; }
.pr-subj { display: grid; gap: 6px; }
.pr-hw { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.pr-hw.is-done b { color: var(--ok, #2E7D4F); }
.pr-hw.is-late b { color: #C2410C; }
@media (max-width: 640px) { .pr-week { margin-left: 0; } }

/* ---------- 11.5 — кабинет учителя: сводка, все задания, лента ---------- */
.tc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.tc-stats div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 60%, transparent); box-shadow: var(--panel-rim, inset 0 0 0 1px var(--line)); }
.tc-stats b { font: 850 28px/1 var(--font-display); letter-spacing: -0.03em; }
.tc-stats span { font-size: 12.5px; color: var(--ink-3); line-height: 1.25; }
a.tc-task-link { color: inherit; text-decoration: none; grid-template-columns: minmax(0, 1fr) minmax(140px, 220px); }
a.tc-task-link:hover { box-shadow: var(--panel-rim, inset 0 0 0 1px var(--line)), var(--shadow); }
.tc-feed { display: grid; gap: 2px; padding: 8px; }
.tc-feed-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; }
.tc-feed-row + .tc-feed-row { box-shadow: inset 0 1px 0 var(--line); }
@media (max-width: 640px) { .tc-stats b { font-size: 22px; } .tc-stats div { padding: 10px; } a.tc-task-link { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .tc-stats span { font-size: 11px; hyphens: auto; overflow-wrap: anywhere; } }
.tc-hero .tc-stats { margin-top: 4px; }


/* ---------- 11.5.1 — исправления по iPhone ----------
   1) Вылеты страницы в iOS Safari: на главной десятки карточек с backdrop-filter (размытие фона); каждая — отдельный
      слой в видеопамяти, и Safari перезагружает вкладку. На телефонах и планшетах размытие остаётся только у шапки,
      меню, «Наверх» и реплик; карточки — плотный полупрозрачный фон, выглядят так же.
   2) Квадратные углы у карточек «Репетитор, ИИ-чат или Зубрик?»: Safari не обрезает размытие фона по скруглению,
      если карточка двигается (появление при прокрутке). Без backdrop-filter углов нет.
   3) Полоса поперёк меню: светлая обводка стекла (.lg::after, inset: 0) в прокручиваемой шторке уезжала вместе
      с содержимым, и её нижний край рисовал линию. В шторке обводку даёт box-shadow, ::after не нужен. */
@media (hover: none), (max-width: 1024px) {
  .glass:not(.topbar-inner):not(.sheet), .lg:not(.topbar-inner):not(.sheet):not(.lg-round), .hx-jump {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  .lg:not(.topbar-inner):not(.sheet) { --lg-tint: var(--lg-tint-strong); }
  .glass:not(.topbar-inner):not(.sheet) { background-color: var(--glass-strong); }
  .has-lens:not(.topbar-inner):not(.sheet) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
.sheet.lg::after { display: none; }
/* Зубрик на первом экране появляется только прозрачностью: сдвиг SVG с drop-shadow в iOS Safari растрируется мыльно */
.mascot.enter > .zubrik { animation-name: enter-fade; }
@keyframes enter-fade { from { opacity: 0; } }

/* ---------- 11.5.2 — меню открывается одним плавным движением ----------
   Было: шторка выезжала, а внутри по очереди вспыхивали строки, вкладки и кнопки (tile-in), плюс размытие фона
   под шторкой и самой шторки — в iOS Safari размытие дорисовывалось после анимации, получался «щелчок».
   Стало: только шторка (на телефоне — снизу, на компьютере — плавно из-под кнопки), фон просто затемняется. */
.sheet *, .subj-panel.is-in .mrow, .subj-panel.is-in .mtile { animation: none !important; }
.menu[open] .sheet { animation: menu-pop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.menu.is-closing .sheet { animation: menu-pop-out 0.2s ease-in forwards; }
@keyframes menu-pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
@keyframes menu-pop-out { to { opacity: 0; transform: translateY(-6px) scale(0.98); } }
@media (max-width: 640px) {
  .menu[open] .sheet { animation: menu-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .menu.is-closing .sheet { animation: menu-fall 0.28s cubic-bezier(0.4, 0, 1, 1) forwards; }
  @keyframes menu-rise { from { transform: translateY(100%); } }
  @keyframes menu-fall { to { transform: translateY(100%); } }
}
@media (hover: none), (max-width: 1024px) {
  /* 11.5.3: фон под меню снова размыт (8 px), шторка — плотная: одно размытие вместо двух, без рывка в Safari */
  .menu::backdrop { -webkit-backdrop-filter: blur(8px) saturate(140%); backdrop-filter: blur(8px) saturate(140%); }
  .sheet.lg { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; --lg-tint: var(--surface); }
}
@media (prefers-reduced-motion: reduce) { .menu[open] .sheet, .menu.is-closing .sheet { animation-duration: 0.01s; } }
/* 11.5.2 — шапка учителя и родителя на телефоне: меню справа (калькулятора и профиля в шапке нет) */
@media (max-width: 640px) { .topbar-staff .menu-btn { margin-left: auto; } }
.tc-stats span { hyphens: manual !important; overflow-wrap: normal !important; }
@media (max-width: 640px) { .tc-stats span { font-size: 12px; } }
/* 11.5.2 — кабинет учителя на телефоне */
.tc-assign-wrap > summary { list-style: none; width: fit-content; cursor: pointer; }
.tc-assign-wrap > summary::-webkit-details-marker { display: none; }
.tc-assign-wrap[open] > summary { display: none; }
@media (max-width: 640px) {
  .tc-hero-board { display: block; position: relative; }
  .tc-hero-board .tc-hero-zubrik { position: absolute; right: -4px; top: -6px; width: 92px; }
  .tc-hero-board .h1 { padding-right: 96px; }
  .tc-hero-board .tc-stats { max-width: none; }
  .tc-stats span { font-size: 12.5px; }
}

/* v11.6: тарифы (/pay) */
.pay-page .pay-prices { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); max-width: none; margin: 8px 0; }
.pay-page .price form, .pay-page .price > div:last-child { margin: 0; }
.pay-page .price .btn { width: 100%; }
.pay-page .price-old { color: inherit; opacity: 0.6; margin-right: 2px; }
.pay-page .price-cta { display: grid; gap: 8px; text-align: center; }
.pay-page .price-cta small { font-size: 13px; opacity: 0.75; }
.class-tariff .meter { height: 8px; border-radius: 99px; background: var(--line, rgba(0,0,0,.08)); overflow: hidden; margin: 10px 0 4px; }
.class-tariff .meter i { display: block; height: 100%; background: var(--lime); border-radius: inherit; }

/* v11.7: «Подтверди почту» — над содержимым страницы, пока почта не подтверждена */
.verify-wrap { margin-top: 12px; }
.verify-bar { flex-wrap: wrap; background: var(--lime-soft); }
.verify-bar .ico { color: var(--accent-text); }
.verify-bar > span { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.verify-bar .link-btn { margin-left: auto; }

/* ---------- 11.7.1 — слабые телефоны и плавное меню в iOS ----------
   1) Зубрики за краем экрана и под открытым меню замирают (site.js, initStage): их анимации SVG браузер считает
      на главном потоке, и на главной слабый телефон был занят на 100 % без единого касания.
   2) Меню открывается через dialog.show(), а не showModal() (site.js, initMenu): модальное окно заставляло браузер
      пересчитать стили всей страницы до первого кадра анимации. У немодального окна нет ::backdrop — затемнение рисует
      .menu::before; меню поверх всего (тосты, конфетти, облачка Зубрика), как раньше в top layer.
   3) На телефонах и планшетах под меню нет размытия на весь экран: iOS Safari пересчитывал его на каждом кадре
      появления, отсюда рывки шторки. Фон просто затемняется, сама шторка — плотная (так было и в 11.5.3).
   4) Пятна света на фоне (.ambient) на телефонах не плавают: три слоя по 70–80vmax держали десятки мегабайт
      видеопамяти и заставляли шапку заново размывать фон на каждом кадре. */
/* Именно animation: none, а не animation-play-state: paused: анимация SVG «на паузе» в Chromium продолжает требовать
   кадры главного потока (замер на /math: 150–400 мс работы в секунду против 30 мс у работающей), а снятая — ничего.
   Когда Зубрик снова виден, его анимации начинаются сначала — моргание и дыхание этого не выдают. Сам <svg> не трогаем:
   на нём только разовые анимации появления (enter-fade у героя), они не должны повторяться при возврате прокруткой. */
.js .is-offstage * { animation: none !important; }

.menu { z-index: 200; }
.menu::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(236, 242, 232, 0.34);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
  backdrop-filter: blur(6px) saturate(130%);
  animation: backdrop-in 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}
:root[data-theme="dark"] .menu::before { background: rgba(2, 8, 5, 0.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu::before { background: rgba(2, 8, 5, 0.5); } }
.menu.is-closing::before { animation: backdrop-out 0.28s ease forwards; }
html.menu-open { overflow: hidden; }
/* 11.7.2: на телефоне контейнер меню не прокручивается вообще (overflow: clip — это не контейнер прокрутки):
   ни фокус, ни браузер не могут сдвинуть его так, чтобы шторка уехала за верхний край. Прокручивается только сама шторка. */
@media (max-width: 640px) { .menu { overflow: hidden; overflow: clip; } }

@media (hover: none), (max-width: 1024px) {
  .menu::before {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(12, 22, 16, 0.3);
    animation-duration: 0.36s;
  }
  :root[data-theme="dark"] .menu::before { background: rgba(0, 4, 2, 0.62); }
  .ambient i { animation: none !important; will-change: auto !important; }
}
@media (hover: none) and (prefers-color-scheme: dark), (max-width: 1024px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .menu::before { background: rgba(0, 4, 2, 0.62); }
}

/* Главная: секции ниже первого экрана браузер раскладывает и рисует, только когда до них долистали
   (content-visibility: auto; Safari 18+, Chrome, Firefox; старые браузеры просто игнорируют). На главной ~5000 элементов:
   при загрузке на слабом телефоне главный поток работал на 28 % меньше, первая отрисовка — на 0,6 с раньше.
   auto в contain-intrinsic-size — браузер запоминает настоящую высоту секции, полоса прокрутки не прыгает.
   Это только на время загрузки: потом site.js (initDeferPaint) в простое снимает класс с секций по одной, а переход
   по якорю, «Назад» и обновление сначала дорисовывают всё — иначе прокрутка промахнулась бы. */
.defer-paint { content-visibility: auto; contain-intrinsic-size: auto 800px; }

/* 11.7.4: тариф, выбранный до регистрации, подсвечен — осталось нажать «Оплатить» */
.pay-page .price.is-chosen { outline: 3px solid var(--lime); outline-offset: 3px; scroll-margin-top: 110px; }

/* ---------- 11.9: биология — Зубрик Дарвин: тёмный сюртук, лесная зелень и лаймовый жук ---------- */
.course-bio { --uk-blue: #2F5A2C; --uk-blue-solid: #2E5A2B; --uk-red: #7A5232; --uk-red-solid: #7A5232; --bio-leaf: #5E8F2A;
  --subj-glow: rgba(170, 220, 90, 0.85); --subj-tint: rgba(170, 220, 90, 0.42); }
:root[data-theme="dark"] .course-bio { --uk-blue: #B6E08E; --uk-red: #E2B88E; --uk-blue-solid: #3F7A3A; --bio-leaf: #C6E83E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .course-bio { --uk-blue: #B6E08E; --uk-red: #E2B88E; --uk-blue-solid: #3F7A3A; --bio-leaf: #C6E83E; } }
.course-bio .en-hero::before { background: radial-gradient(440px circle at 6% 112%, rgba(47, 90, 44, 0.22), transparent 62%), radial-gradient(380px circle at 102% -12%, rgba(122, 82, 50, 0.14), transparent 60%), radial-gradient(300px circle at 60% 120%, rgba(198, 232, 62, 0.22), transparent 60%); }
.btn-bio { background: #2E5A2B; color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(198, 232, 62, 0.5), 0 10px 24px -12px rgba(30, 70, 30, 0.95); }
.btn-bio:hover { transform: translateY(-2px); }
:root[data-theme="dark"] .btn-bio { background: #3F7A3A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-bio { background: #3F7A3A; } }
.course-bio .en-topic-en { color: var(--bio-leaf); }
.course-bio .exam-nav a { width: 40px; }
.course-bio .exam-nav a.is-done, .course-bio .exam-task.is-done .exam-num { background: #2E5A2B; color: #DDF58A; }
.live-biology::before { background: radial-gradient(340px circle at 0% 110%, rgba(47, 90, 44, 0.22), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(198, 232, 62, 0.2), transparent 60%); }
.trio-biology::before { background: radial-gradient(300px circle at 0% 110%, rgba(47, 90, 44, 0.2), transparent 65%), radial-gradient(240px circle at 110% -10%, rgba(198, 232, 62, 0.16), transparent 60%); }
.trio-biology { --trio-glow: rgba(170, 220, 90, 0.5); }
.subj-biology { --ava-ring: #4E8A2E; }

/* 11.9: «Мои предметы» — выбор экзаменов после регистрации и в профиле (/subjects/mine) */
.my-subj-card { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.my-subj-card .pick-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick.is-soon { opacity: 0.78; }
.pick .pick-text small.soon-note { color: var(--ink-3); }
/* v11.25: «Мои предметы» по группам */
.my-subj-label { display: flex; align-items: center; gap: 8px; }
.my-subj-label .tag { font-size: 12px; padding: 1px 8px; }
@media (min-width: 640px) { .my-subj-group .pick-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.my-subj-now { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.my-subj-now .subj-badge { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; display: inline-block; }
@media (max-width: 640px) { .my-subj-card .pick-subjects { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 11.11: химия — Зубрик-химик: белый халат, фиолетовая колба и лаймовый алмаз ---------- */
.course-chem { --uk-blue: #4B2F7A; --uk-blue-solid: #55348C; --uk-red: #B23A6E; --uk-red-solid: #B23A6E; --chem-glass: #7A4FC0;
  --subj-glow: rgba(181, 219, 46, 0.85); --subj-tint: rgba(155, 91, 214, 0.38); }
:root[data-theme="dark"] .course-chem { --uk-blue: #CDB6F5; --uk-red: #F29BC0; --uk-blue-solid: #6B45A8; --chem-glass: #C6E83E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .course-chem { --uk-blue: #CDB6F5; --uk-red: #F29BC0; --uk-blue-solid: #6B45A8; --chem-glass: #C6E83E; } }
.course-chem .en-hero::before { background: radial-gradient(440px circle at 6% 112%, rgba(85, 52, 140, 0.22), transparent 62%), radial-gradient(380px circle at 102% -12%, rgba(232, 106, 154, 0.14), transparent 60%), radial-gradient(300px circle at 60% 120%, rgba(181, 219, 46, 0.22), transparent 60%); }
.btn-chem { background: #55348C; color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(181, 219, 46, 0.55), 0 10px 24px -12px rgba(60, 30, 110, 0.95); }
.btn-chem:hover { transform: translateY(-2px); }
/* v11.24: физика — кнопка цвета грифельной доски Эйнштейна, мелок лаймом */
.btn-phys { background: #24476E; color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(198, 232, 62, 0.55), 0 10px 24px -12px rgba(20, 45, 80, 0.95); }
.btn-phys:hover { transform: translateY(-2px); }
:root[data-theme="dark"] .btn-phys { background: #355F92; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-phys { background: #355F92; } }
.phys-consts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.phys-consts li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 14%, transparent); }
.phys-consts b { font-variant-numeric: tabular-nums; white-space: nowrap; }
:root[data-theme="dark"] .btn-chem { background: #6B45A8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-chem { background: #6B45A8; } }
.course-chem .en-topic-en { color: var(--chem-glass); }
.course-chem .exam-nav a { width: 40px; }
.course-chem .exam-nav a.is-done, .course-chem .exam-task.is-done .exam-num { background: #55348C; color: #DDF58A; }
.live-chemistry::before { background: radial-gradient(340px circle at 0% 110%, rgba(85, 52, 140, 0.22), transparent 65%), radial-gradient(260px circle at 110% -10%, rgba(181, 219, 46, 0.22), transparent 60%); }
.trio-chemistry::before { background: radial-gradient(300px circle at 0% 110%, rgba(85, 52, 140, 0.2), transparent 65%), radial-gradient(240px circle at 110% -10%, rgba(181, 219, 46, 0.16), transparent 60%); }
.trio-chemistry { --trio-glow: rgba(155, 91, 214, 0.5); }
.subj-chemistry { --ava-ring: #6B45A8; }
.chem-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chem-row li { padding: 4px 9px; border-radius: 10px; background: color-mix(in srgb, var(--chem-glass) 12%, transparent); font-weight: 600; }
.chem-row li.is-h { background: #B5DB2E; color: #1E2A06; }
.chem-rules { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }

/* v11.12: предметы в меню — лента по пять плиток, листается вбок. У ученика — свои предметы и плитка «+» с остальными */
.subj-tabs {
  display: flex; gap: 8px; margin: -8px -6px; padding: 8px 6px 4px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-padding-inline: 6px; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
}
.subj-tabs::-webkit-scrollbar { display: none; }
.subj-tabs.is-end { -webkit-mask-image: none; mask-image: none; }
.subj-tabs > .subj-tab { flex: 0 0 calc((100% - 32px) / 5); min-width: 0; scroll-snap-align: start; }
.subj-tabs > [data-extra] { display: none; }
.subj-tabs.is-open > [data-extra] { display: flex; animation: tile-in 0.35s var(--ease) backwards; }
.subj-plus { display: grid; place-items: center; color: var(--ink-3); background: var(--lg-fill); box-shadow: inset 0 0 0 1.5px var(--lg-edge-2) !important; }
.subj-plus svg { transition: transform 0.35s var(--spring); }
.subj-tabs.is-open .subj-more svg { transform: rotate(45deg); }
.subj-more, .subj-edit { color: var(--ink-3); text-decoration: none; }
/* v11.29: подпись группы предметов в ленте меню — узкая вертикальная плашка перед первой плиткой группы */
.subj-tabs > .subj-sep { flex: 0 0 18px; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; align-self: stretch;
  border-left: 1px solid var(--line-2); margin-left: 2px; }
.subj-tabs > .subj-sep.is-first { border-left: 0; margin-left: 0; }
.subj-sep i { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 10px/1 var(--font-body); font-style: normal;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.subj-tabs > .subj-sep[data-extra] { display: none; }
.subj-tabs.is-open > .subj-sep[data-extra] { display: flex; }
.subj-group > .section-row h2 { margin: 0; }
.subj-more:hover .subj-plus, .subj-edit:hover .subj-plus { color: var(--ink); }

/* ---------- 11.12: рисунки к заданиям и конспектам (биология), алгоритмы решения, таблицы, подсказки ---------- */
/* Палитра схем: контур — цвет текста, заливки — мягкие тона; в тёмной теме — приглушённые. Классы f-* — в SVG из templates/fig/ */
.sci-fig { --f-ink: var(--ink); --f-ink-2: var(--ink-2); --f-ink-3: var(--ink-3); --f-paper: var(--surface);
  --f-cyto: #EEF5E3; --f-cyto-2: #DDEBC8; --f-nuc: #E3D7F2; --f-nuc-2: #B9A3DA; --f-mito: #F7D3B8; --f-mito-2: #E39A6A;
  --f-leaf: #8CC152; --f-leaf-2: #5E8F2A; --f-wall: #CFE3A6; --f-er: #B9D3F0; --f-golgi: #F3C7D8; --f-yel: #F6DE7A;
  --f-art: #D9483B; --f-art-soft: #F7CFC9; --f-ven: #3C66C8; --f-ven-soft: #CCD8F5; --f-bone: #F3EBD9; --f-water: #CFE6F3;
  --f-mark: #2E5A2B; --f-on-mark: #FFFFFF;
  margin: 0; display: grid; gap: 10px; justify-items: center; }
:root[data-theme="dark"] .sci-fig { --f-cyto: #1B2E22; --f-cyto-2: #24402D; --f-nuc: #352B4A; --f-nuc-2: #6D5A94; --f-mito: #4D3426;
  --f-mito-2: #A86A42; --f-leaf: #6FA33E; --f-leaf-2: #9FD066; --f-wall: #33502A; --f-er: #2A4466; --f-golgi: #5B3346; --f-yel: #6E5E22;
  --f-art: #FF7B6B; --f-art-soft: #5A2A26; --f-ven: #93ABFF; --f-ven-soft: #26355E; --f-bone: #3A352A; --f-water: #1E3846; --f-mark: #C6E83E; --f-on-mark: #10200F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sci-fig { --f-cyto: #1B2E22; --f-cyto-2: #24402D; --f-nuc: #352B4A;
  --f-nuc-2: #6D5A94; --f-mito: #4D3426; --f-mito-2: #A86A42; --f-leaf: #6FA33E; --f-leaf-2: #9FD066; --f-wall: #33502A; --f-er: #2A4466;
  --f-golgi: #5B3346; --f-yel: #6E5E22; --f-art: #FF7B6B; --f-art-soft: #5A2A26; --f-ven: #93ABFF; --f-ven-soft: #26355E; --f-bone: #3A352A;
  --f-water: #1E3846; --f-mark: #C6E83E; --f-on-mark: #10200F; } }
.sci-fig svg { width: 100%; max-width: 560px; height: auto; display: block; padding: 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--ink) 3%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.sci-fig-task svg { max-width: 480px; }
.sci-fig svg text { font-family: var(--font-body); fill: var(--f-ink); }
.sci-fig .f-ln { fill: none; stroke: var(--f-ink); stroke-linecap: round; stroke-linejoin: round; }
.sci-fig .f-thin { fill: none; stroke: var(--f-ink-2); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.sci-fig .f-dash { fill: none; stroke: var(--f-ink-3); stroke-width: 1.2; stroke-dasharray: 4 4; }
.sci-fig .f-lead { fill: none; stroke: var(--f-ink-2); stroke-width: 1; }
.sci-fig .f-mark circle { fill: var(--f-mark); }
.sci-fig .f-mark text { fill: var(--f-on-mark); font-weight: 750; font-size: 14px; text-anchor: middle; dominant-baseline: central; }
.sci-fig .f-lbl { font-size: 12.5px; fill: var(--f-ink-2); }
.sci-fig .f-ttl { font-size: 13px; font-weight: 700; fill: var(--f-ink); }
.sci-fig .f-node circle { fill: var(--f-paper); stroke: var(--f-ink); stroke-width: 1.6; }
.sci-fig .f-node text { font-size: 14px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.sci-fig .f-arrow { fill: none; stroke: var(--f-ink); stroke-width: 1.5; marker-end: url(#f-arrowhead); }
.sci-fig figcaption { width: 100%; max-width: 560px; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.sci-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 12px; }
.sci-legend li { display: flex; gap: 8px; align-items: baseline; color: var(--ink); line-height: 1.35; }
.sci-n { flex: none; min-width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: #2E5A2B;
  color: #FFFFFF; font: 750 12px/1 var(--font-body); }
.sci-table-wrap { overflow-x: auto; margin-top: 12px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-2); }
.sci-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.sci-table th, .sci-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.sci-table thead th { background: color-mix(in srgb, var(--uk-blue, #2F5A2C) 12%, transparent); font-weight: 750; font-size: 13.5px; }
.sci-table tbody th { font-weight: 700; color: var(--ink); }
.sci-table tr:last-child th, .sci-table tr:last-child td { border-bottom: 0; }
.sci-algo { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bio-leaf, #5E8F2A) 45%, transparent); }
.sci-algo-head { display: grid; gap: 4px; }
.sci-algo-head .h3 { margin: 0; }
.sci-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.sci-steps li { counter-increment: step; position: relative; padding-left: 36px; font-size: 16px; line-height: 1.5; }
.sci-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); font: 750 13px/1 var(--font-body); }
.sci-example { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 15.5px; line-height: 1.5; }
.sci-mnemo { background: color-mix(in srgb, var(--lime) 16%, var(--surface)); }
.sci-mnemo .hx-points li::before { background: var(--bio-leaf, #5E8F2A); }
.sci-hint summary { list-style-position: inside; }
.hx-block[id] { scroll-margin-top: 96px; }
@media (max-width: 560px) { .sci-fig svg { padding: 6px; } .sci-legend { grid-template-columns: 1fr 1fr; } }
.sci-scroll { width: 100%; display: grid; justify-items: center; }
@media (max-width: 560px) {  /* широкий рисунок не мельчит подписи: листается вбок (--fw — ширина viewBox, фильтр fig_w) */
  .sci-scroll { overflow-x: auto; overscroll-behavior-x: contain; justify-items: start; }
  .sci-scroll svg { min-width: calc(var(--fw, 0) * 0.7px); margin-inline: auto; }
}
.sci-fig svg { stroke-width: 1.4; }  /* наследуется: атрибут stroke-width на элементе сильнее */
.sci-fig .f-cyto, .sci-fig .f-cyto2, .sci-fig .f-nuc, .sci-fig .f-nuc2, .sci-fig .f-mito, .sci-fig .f-leaf, .sci-fig .f-wall,
.sci-fig .f-er, .sci-fig .f-golgi, .sci-fig .f-yel, .sci-fig .f-art, .sci-fig .f-arts, .sci-fig .f-ven, .sci-fig .f-vens,
.sci-fig .f-bone, .sci-fig .f-water, .sci-fig .f-paper { stroke: var(--f-ink); }
.sci-fig .f-cyto { fill: var(--f-cyto); } .sci-fig .f-cyto2 { fill: var(--f-cyto-2); } .sci-fig .f-nuc { fill: var(--f-nuc); }
.sci-fig .f-nuc2 { fill: var(--f-nuc-2); } .sci-fig .f-mito { fill: var(--f-mito); } .sci-fig .f-leaf { fill: var(--f-leaf); }
.sci-fig .f-leaf2 { fill: var(--f-leaf-2); } .sci-fig .f-wall { fill: var(--f-wall); } .sci-fig .f-er { fill: var(--f-er); }
.sci-fig .f-golgi { fill: var(--f-golgi); } .sci-fig .f-yel { fill: var(--f-yel); } .sci-fig .f-art { fill: var(--f-art); }
.sci-fig .f-arts { fill: var(--f-art-soft); } .sci-fig .f-ven { fill: var(--f-ven); } .sci-fig .f-vens { fill: var(--f-ven-soft); }
.sci-fig .f-bone { fill: var(--f-bone); } .sci-fig .f-water { fill: var(--f-water); } .sci-fig .f-paper { fill: var(--f-paper); }
.sci-fig .f-ink { fill: var(--f-ink); stroke: none; }
.sci-fig [class^="f-s-"], .sci-fig [class*=" f-s-"] { fill: none; }
.sci-fig .f-s-er { stroke: var(--f-er); } .sci-fig .f-s-leaf2 { stroke: var(--f-leaf-2); } .sci-fig .f-s-ven { stroke: var(--f-ven); }
.sci-fig .f-s-art { stroke: var(--f-art); } .sci-fig .f-s-arts { stroke: var(--f-art-soft); } .sci-fig .f-s-yel { stroke: var(--f-yel); }
.sci-fig .f-s-nuc2 { stroke: var(--f-nuc-2); } .sci-fig .f-s-mito2 { stroke: var(--f-mito-2); } .sci-fig .f-s-leaf { stroke: var(--f-leaf); }
.sci-fig .f-wide { stroke-width: 3; }
.sci-fig .f-s-golgi { stroke: var(--f-golgi); }
.sci-fig .f-ped-ill { fill: var(--f-ink); stroke: var(--f-ink); }

/* ---- 11.13: рисунки химии (templates/fig/ch_*.svg): посуда, растворы, пламя, модели молекул, индикаторы ---- */
.sci-fig { --f-liq: #CFE6F3; --f-liq-2: #F6E3A2; --f-liq-3: #E7D9C4; --f-solid: #3B3B3B; --f-metal: #C9CED6; --f-flame: #F5A43A;
  --f-at-c: #4A4F57; --f-at-h: #FFFFFF; --f-orb: rgba(60, 102, 200, 0.18); --f-acid: #F2B8AE; --f-neutral: #D9E8C4; --f-alk: #BFCDEE;
  --f-ind-red: #E0584A; --f-ind-violet: #8E62C2; --f-ind-blue: #3F6FD1; --f-ind-crimson: #D23A82; --f-ind-pink: #F28DA8;
  --f-ind-orange: #F39A3B; --f-ind-yellow: #F2D24B; }
:root[data-theme="dark"] .sci-fig { --f-liq: #24506A; --f-liq-2: #5A4D22; --f-liq-3: #4A3F30; --f-solid: #9AA0AA; --f-metal: #5B6270;
  --f-flame: #E08A2A; --f-at-c: #9AA1AC; --f-at-h: #E8ECF2; --f-orb: rgba(147, 171, 255, 0.22); --f-acid: #5A2A26; --f-neutral: #2E4424;
  --f-alk: #26355E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sci-fig { --f-liq: #24506A; --f-liq-2: #5A4D22; --f-liq-3: #4A3F30;
  --f-solid: #9AA0AA; --f-metal: #5B6270; --f-flame: #E08A2A; --f-at-c: #9AA1AC; --f-at-h: #E8ECF2; --f-orb: rgba(147, 171, 255, 0.22);
  --f-acid: #5A2A26; --f-neutral: #2E4424; --f-alk: #26355E; } }
.sci-fig .f-liq { fill: var(--f-liq); } .sci-fig .f-liq2 { fill: var(--f-liq-2); } .sci-fig .f-liq3 { fill: var(--f-liq-3); }
.sci-fig .f-solid { fill: var(--f-solid); } .sci-fig .f-flame { fill: var(--f-flame); stroke: var(--f-ink); stroke-width: 1; }
.sci-fig .f-metal, .sci-fig .f-glass { stroke: var(--f-ink); } .sci-fig .f-metal { fill: var(--f-metal); }
.sci-fig .f-glass { fill: color-mix(in srgb, var(--f-ink) 5%, transparent); }
.sci-fig .f-paperfill { fill: var(--f-paper); stroke: none; }
.sci-fig .f-stick { fill: none; stroke: var(--f-ink-2); stroke-width: 3; stroke-linecap: round; }
.sci-fig .f-at-c { fill: var(--f-at-c); stroke: var(--f-ink); } .sci-fig .f-at-h { fill: var(--f-at-h); stroke: var(--f-ink); }
.sci-fig .f-orb { fill: var(--f-orb); stroke: var(--f-ink-2); }
.sci-fig .f-acid, .sci-fig .f-neutral, .sci-fig .f-alk, .sci-fig [class^="f-ind-"] { stroke: var(--f-ink); stroke-width: 1; }
.sci-fig .f-acid { fill: var(--f-acid); } .sci-fig .f-neutral { fill: var(--f-neutral); } .sci-fig .f-alk { fill: var(--f-alk); }
.sci-fig .f-ind-red { fill: var(--f-ind-red); } .sci-fig .f-ind-violet { fill: var(--f-ind-violet); } .sci-fig .f-ind-blue { fill: var(--f-ind-blue); }
.sci-fig .f-ind-crimson { fill: var(--f-ind-crimson); } .sci-fig .f-ind-pink { fill: var(--f-ind-pink); }
.sci-fig .f-ind-orange { fill: var(--f-ind-orange); } .sci-fig .f-ind-yellow { fill: var(--f-ind-yellow); }
.sci-fig svg text.f-on-light { fill: #16181C; }  /* подпись на яркой заливке (индикаторы, H₂ в ряду активности): тёмная в обеих темах */

/* ---- 11.14: «Таблицы» по химии — таблица Менделеева, растворимость, ряд активности (_chem_ref.html, _chem_tables.html) ----
   Компьютер (≥ 1024 px): панель справа во всю высоту, страница сдвигается влево — задание и таблица видны рядом.
   Телефон и планшет: шторка снизу на половину экрана (data-size="half"), задание прокручивается над ней; можно развернуть. */
:root { --cref-w: clamp(460px, 46vw, 780px); --cref-half: 58dvh;
  --pt-s: #F7D3DC; --pt-p: #F8EBB0; --pt-d: #CFE0F7; --pt-f: #D7EFCF;
  --sol-r: #2E7D32; --sol-m: #B7791F; --sol-n: #C0392B; --sol-hl: color-mix(in srgb, var(--lime) 34%, var(--surface)); }
:root[data-theme="dark"] { --pt-s: #4A2730; --pt-p: #4A4220; --pt-d: #22344F; --pt-f: #253F25; --sol-r: #7BD389; --sol-m: #F0C060; --sol-n: #FF8A7A;
  --sol-hl: color-mix(in srgb, var(--lime) 22%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pt-s: #4A2730; --pt-p: #4A4220; --pt-d: #22344F; --pt-f: #253F25;
  --sol-r: #7BD389; --sol-m: #F0C060; --sol-n: #FF8A7A; --sol-hl: color-mix(in srgb, var(--lime) 22%, var(--surface)); } }

.cref-fab { position: fixed; z-index: 60; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 14px; border-radius: 999px;
  background: var(--lime); color: var(--lime-ink); font: 700 15px/1 var(--font-body); text-decoration: none; box-shadow: var(--shadow-lg);
  transition: transform 0.15s ease; -webkit-tap-highlight-color: transparent; }
.cref-fab:hover { transform: translateY(-1px); }
.cref-fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cref-fab svg, .cref-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.cref-on .cref-fab { display: none; }

.cref { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; height: var(--cref-half); display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); animation: cref-up 0.22s ease-out; }
.cref[hidden] { display: none; }
.cref[data-size="full"] { height: calc(100dvh - 12px - env(safe-area-inset-top, 0px)); }
@keyframes cref-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
html.cref-on.cref-half body { padding-bottom: var(--cref-half); }  /* задание можно докрутить до верхней половины экрана */
.cref-head { position: relative; display: flex; align-items: center; gap: 6px; padding: 18px 10px 8px 12px; border-bottom: 1px solid var(--line); }
.cref-grip { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 72px; height: 18px; padding: 0; border: 0; background: none;
  cursor: grab; touch-action: none; }
.cref-grip span { display: block; width: 40px; height: 5px; margin: 6px auto 0; border-radius: 99px; background: var(--line-2); }
.cref-tabs { display: flex; gap: 4px; flex: 1; min-width: 0; padding: 3px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow-x: auto; scrollbar-width: none; }
.cref-tabs::-webkit-scrollbar { display: none; }
.cref-tabs [role="tab"] { flex: 1 0 auto; min-height: 38px; padding: 0 12px; border: 0; border-radius: 11px; background: none; color: var(--ink-2);
  font: 650 14px/1 var(--font-body); cursor: pointer; white-space: nowrap; }
.cref-tabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.cref-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--ink-2); cursor: pointer; }
.cref-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.cref-tabs [role="tab"]:focus-visible, .cref-btn:focus-visible, .cref-grip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cref[data-size="full"] .cref-size-btn svg { transform: rotate(180deg); }
.cref-body { flex: 1; min-height: 0; display: flex; }
.cref-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; overflow-y: auto; }
.cref-pane[hidden] { display: none; }
.cref-pane .cref-scroll { flex: 1 1 auto; min-height: 120px; }
.cref-pane > :not(.cref-scroll) { flex-shrink: 0; }  /* поиск, подсказка и пояснение не сжимаются — сжимается только таблица */
.cref-pane[data-cref-pane="pt"] .cref-scroll { flex: none; }  /* v11.16: таблица Менделеева без прокрутки вбок — листается вся вкладка */
@media (max-width: 1023px) {
  .cref-pane { gap: 6px; padding: 8px 10px 10px; }
  .cref-pane .cref-info { min-height: 0; padding: 6px 10px; font-size: 13.5px; }
  .cref-pane .cref-note { font-size: 11.5px; }
  .cref-pane .cref-search input { min-height: 38px; font-size: 16px; }  /* 16 px — iPhone не приближает страницу при вводе */
}

@media (min-width: 1024px) {
  .cref { top: 0; left: auto; width: var(--cref-w); height: auto; border-radius: 0; box-shadow: -18px 0 40px -28px rgba(0, 0, 0, 0.35), -1px 0 0 var(--line);
    animation-name: cref-left; }
  .cref[data-size="full"] { height: auto; }
  @keyframes cref-left { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .cref-head { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .cref-grip, .cref-size-btn { display: none; }
  html.cref-on body { padding-right: var(--cref-w); }  /* задание и таблица рядом, ничего не закрыто */
  html.cref-on.cref-half body { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .cref { animation: none; } }
@media print { .cref, .cref-fab { display: none !important; } }

@media (max-width: 430px) { .cref-long { display: none; } .cref-tabs [role="tab"] { padding: 0 9px; font-size: 13.5px; } }

/* общие части таблиц */
.cref-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cref-search { flex: 1 1 200px; }
.cref-search input { width: 100%; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font: 500 15px/1 var(--font-body); }
.cref-search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.pt-key { display: inline-flex; align-items: center; gap: 4px; font: 600 12.5px/1 var(--font-body); color: var(--ink-2); }
.pt-key i { width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; box-shadow: inset 0 0 0 1px var(--line-2); }
.cref-info { margin: 0; min-height: 2.8em; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent);
  font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.cref-info b { color: var(--ink); }
.cref-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.cref-scroll { container-type: inline-size; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.cref-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* периодическая система. v11.16: по умолчанию (узко — телефон, шторка) таблица целиком по ширине, без прокрутки вбок:
   в клетке только символ, а Ar, конфигурация и место элемента — крупно в карточке над d-элементами (.pt-card).
   Где места ≥ 600 px (панель на компьютере, телефон боком, страница) — в клетке ещё Z и Ar. */
.pt { display: grid; grid-template-columns: 13px repeat(18, minmax(0, 1fr)); gap: 1.5px; width: 100%; padding-bottom: 2px; }
.pt-g { display: grid; place-items: end center; padding: 0 0 3px; font: 700 9px/1 var(--font-body); color: var(--ink-2); text-align: center; }
.pt-g small { display: none; font-size: inherit; }
.pt-p-label, .pt-corner { position: sticky; left: 0; z-index: 1; display: grid; place-items: center; background: var(--surface);
  font: 700 10px/1 var(--font-body); color: var(--ink-2); }
.pt-f-label { font-size: 7.5px; }
.pt-spacer { grid-column: 1 / -1; height: 4px; }
.pt-gap { min-height: 24px; }
.pt-el, .pt-ref { position: relative; display: grid; place-items: center; min-width: 0; min-height: 24px; padding: 0; overflow: hidden;
  border: 0; border-radius: 4px; color: #121212; font-family: var(--font-body); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pt-card-sym { color: #121212; }
:root[data-theme="dark"] .pt-el, :root[data-theme="dark"] .pt-ref, :root[data-theme="dark"] .pt-card-sym { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pt-el, :root:not([data-theme="light"]) .pt-ref,
  :root:not([data-theme="light"]) .pt-card-sym { color: var(--ink); } }
.pt-s { background: var(--pt-s); } .pt-p { background: var(--pt-p); } .pt-d { background: var(--pt-d); } .pt-f { background: var(--pt-f); }
.pt-ref { font-size: 9px; font-weight: 700; cursor: default; }
.pt-ref-long { display: none; }
.pt-z, .pt-ar { display: none; }
.pt-sym { font-size: 11.5px; font-weight: 750; line-height: 1; letter-spacing: -0.02em; }
.pt-el:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.pt-el:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 2; }
.pt-el.is-pick { box-shadow: inset 0 0 0 2px var(--ink); transform: scale(1.08); z-index: 2; }

/* карточка элемента — в пустом месте периодов 1–3 над группами 3–12 */
.pt-card { grid-column: 4 / 14; grid-row: 2 / 5; display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 4px 7px; min-width: 0;
  padding: 4px 7px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 4%, transparent); overflow: hidden; }
.pt-card-hint { margin: 0; font-size: 10.5px; line-height: 1.3; color: var(--ink-2); }
.pt-card .pt-key { display: none; }
.pt-card.is-on { flex-wrap: nowrap; }
.pt-card-sym { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; font: 800 18px/1 var(--font-body); }
.pt-card-text { display: grid; gap: 1px; min-width: 0; font-size: 10.5px; line-height: 1.2; color: var(--ink-2); }
.pt-card-text > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pt-card-text > .pt-card-place { white-space: normal; }
.pt-card-name { font-size: 11.5px; font-weight: 650; color: var(--ink); }
.pt-card-ar { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* растворимость. По умолчанию (узко) — .sol-tall: катионы строками, 13 анионов столбцами — по ширине, прокрутка только вниз */
.sol { border-collapse: separate; border-spacing: 0; font: 600 13.5px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.sol-wide { display: none; }
.sol-tall { width: 100%; font-size: 13px; }
.sol th, .sol td { height: 30px; padding: 0 1px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sol thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); font-size: 11px; font-weight: 700; line-height: 1.1; vertical-align: bottom; padding: 4px 1px; }
.sol-q { display: block; margin-top: 1px; font-size: 9px; font-weight: 650; color: var(--ink-2); }
.sol tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); font-size: 12px; font-weight: 700; white-space: nowrap; padding: 0 6px; text-align: left; }
.sol .sol-corner { left: 0; z-index: 3; font-size: 8.5px; font-weight: 600; color: var(--ink-2); line-height: 1.15; }
.sol .sol-corner span { display: block; text-align: left; }
.sol .sol-corner span:first-child { text-align: right; }
.sol td { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sol-r { color: var(--sol-r); } .sol-m { color: var(--sol-m); } .sol-n { color: var(--sol-n); } .sol-x { color: var(--ink-3, var(--ink-2)); }
.sol td.sol-n { background: color-mix(in srgb, var(--sol-n) 9%, transparent); }
.sol td.sol-m { background: color-mix(in srgb, var(--sol-m) 9%, transparent); }
.sol .is-hl { background: var(--sol-hl) !important; }
.sol td.is-pick { box-shadow: inset 0 0 0 2.5px var(--ink); }
.sol-legend { font-size: 11.5px; }
.sol-legend-long { display: none; }
.cref-info:empty { display: none; }
.sol-legend span:not(.sol-legend-long) { display: inline-block; min-width: 1.2em; font-weight: 800; text-align: center; }

/* ряд активности */
.series { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.series li { min-width: 40px; padding: 9px 8px; border-radius: 9px; text-align: center; font: 750 15px/1 var(--font-body); background: var(--pt-d); color: inherit; }
.series .series-water { background: var(--pt-s); }
.series .series-h { background: var(--lime); color: var(--lime-ink); }
.series .series-noble { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.series-arrow { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.series-arrow::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--ink-2), var(--ink-2)) left center / calc(100% - 8px) 2px no-repeat;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); min-height: 10px; background-size: 100% 2px; }
.cref-rules { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.45; }

/* совсем узко (страница на маленьком телефоне) — символы и карточка чуть мельче, чтобы Mn, Nb, Cm не слипались */
@container (max-width: 340px) {
  .pt-sym { font-size: 10.5px; letter-spacing: -0.04em; }
  .pt-card { padding: 3px 5px; gap: 5px; }
  .pt-card-sym { width: 30px; height: 30px; font-size: 15px; }
  .pt-card-hint, .pt-card-text { font-size: 10px; }
}

/* места хватает (панель на компьютере, телефон боком, страница) — подробные клетки и широкая таблица растворимости */
@container (min-width: 600px) {
  .pt { grid-template-columns: 20px repeat(18, minmax(0, 1fr)); gap: 2px; padding-bottom: 4px; }
  .pt-g { place-items: center; gap: 1px; padding: 2px 0 4px; font-size: 9.5px; font-weight: 600; line-height: 1.1; }
  .pt-g b { font-size: 11px; color: var(--ink); }
  .pt-g small { display: block; }
  .pt-p-label, .pt-corner { font-size: 12px; }
  .pt-f-label { font-size: 10px; }
  .pt-spacer { height: 6px; }
  .pt-gap { min-height: 46px; }
  .pt-el, .pt-ref { grid-template-rows: auto 1fr auto; place-items: stretch; justify-items: center; min-height: 46px; padding: 3px 2px; border-radius: 7px; }
  .pt-ref { place-items: center; font-size: 10px; font-weight: 650; }
  .pt-ref-long { display: inline; } .pt-ref-short { display: none; }
  .pt-z { display: block; justify-self: start; font-size: 8px; line-height: 1; opacity: 0.75; }
  .pt-ar { display: block; font-size: 8.5px; line-height: 1; opacity: 0.85; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .pt-sym { font-size: 14px; line-height: 1.15; letter-spacing: 0; }
  .pt-el.is-pick { box-shadow: inset 0 0 0 2.5px var(--ink); transform: scale(1.06); }
  .pt-card { gap: 8px 12px; padding: 8px 14px; border-radius: 12px; }
  .pt-card-hint { font-size: 13px; }
  .pt-card .pt-key { display: inline-flex; }
  .pt-card-sym { width: 58px; height: 58px; border-radius: 11px; font-size: 27px; }
  .pt-card-text { gap: 2px; font-size: 12.5px; }
  .pt-card-name { font-size: 14px; }
  .pt-card-ar { font-size: 18px; }

  .sol-tall { display: none; }
  .sol-wide { display: table; width: 100%; font-size: 12.5px; }
  .sol-wide th, .sol-wide td { min-width: 0; height: 32px; padding: 0 1px; }
  .sol-wide thead th { font-size: 11px; white-space: nowrap; vertical-align: middle; }
  .sol-wide tbody th { padding: 0 4px; font-size: 11.5px; }
  .sol-wide { table-layout: fixed; }
  .sol-wide .sol-corner { width: 54px; }
  .sol-legend { font-size: 12.5px; }
  .sol-legend-long { display: inline; }
}
/* совсем просторно (страница на компьютере, широкая панель) — клетки крупнее */
@container (min-width: 760px) {
  .pt { grid-template-columns: 26px repeat(18, minmax(0, 1fr)); }
  .pt-el, .pt-gap, .pt-ref { min-height: 52px; }
  .pt-sym { font-size: 17px; }
  .pt-z { font-size: 9px; }
  .pt-ar { font-size: 9.5px; letter-spacing: 0; }
}

/* отдельная страница /chemistry/reference: таблицы во всю высоту, без панели */
.cref-page .cref-scroll { max-height: none; }
/* ---------- 11.14: «С чего начать», план на неделю, прогресс по предметам (главная) ---------- */
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.start-opt { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.start-opt.is-rec { background: var(--lime-soft); box-shadow: inset 0 0 0 1.5px var(--lime-2); }
.start-opt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.start-why { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 14px; color: var(--ink-2); }
.start-opt .btn { justify-self: start; margin-top: 2px; }
.wp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wp-day { display: grid; gap: 4px; align-content: start; padding: 10px; border-radius: 14px; min-height: 104px; background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 13.5px; }
.wp-day .wp-label { font-size: 12.5px; color: var(--ink-3); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.wp-day .wp-label .ico { width: 14px; height: 14px; color: var(--lime-ink); }
.wp-day .wp-subj { font-size: 14px; line-height: 1.2; }
.wp-day .wp-topic { color: var(--ink-2); line-height: 1.25; }
.wp-day .wp-meta { color: var(--ink-3); font-size: 12.5px; }
.wp-mock { background: color-mix(in srgb, var(--lime) 22%, transparent); }
.wp-rest { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.wp-day.is-now { box-shadow: inset 0 0 0 2px var(--ink); }
.wp-day.is-done { background: var(--lime-soft); }
.wp-day.is-miss { opacity: 0.55; }
.pg-rows { display: grid; gap: 10px; }
.pg-row { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(80px, 1fr); align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; color: inherit; text-decoration: none; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.pg-row:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pg-name { display: grid; gap: 2px; min-width: 0; }
.pg-score { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pg-score .num { font-size: 22px; }
@media (max-width: 760px) {
  .wp-days { grid-template-columns: 1fr; }
  .wp-day { min-height: 0; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; }
  .wp-day > :not(.wp-label) { grid-column: 2; }
  .pg-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pg-row .pg-bar { grid-column: 1 / -1; }
}
/* 11.14: маршрут к ЦЭ по номерам бланка */
.pot-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pot-head > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.pot-num { font-size: clamp(30px, 4vw, 40px); font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; }
.pot-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pot-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.pot-steps li.is-first { background: var(--lime-soft); }
.pot-steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pot-how summary { cursor: pointer; }
.pot-how p { margin: 8px 0 0; max-width: 72ch; }

/* ---------- 11.15: база перед занятием, «Как идут темы», мои предметы, смена Зубриков ---------- */
.base-block, .base-mnemo, .base-example { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.base-mnemo { background: var(--lime-soft); }
.base-example details summary { cursor: pointer; margin-top: 6px; }
.base-options { margin: 4px 0; padding-left: 22px; display: grid; gap: 2px; }
.feel-rows { display: grid; gap: 8px; }
.feel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.feel-row .feel-name { display: grid; gap: 2px; min-width: 0; }
.feel-seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.feel-seg label { position: relative; cursor: pointer; }
.feel-seg input { position: absolute; opacity: 0; pointer-events: none; }
.feel-seg span { display: block; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.feel-seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.feel-seg input[value="hard"]:checked + span { background: var(--red-soft); color: var(--red); }
.feel-seg input[value="easy"]:checked + span { background: var(--lime); color: var(--lime-ink); }
.feel-seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (max-width: 640px) { .feel-row { grid-template-columns: minmax(0, 1fr); } .feel-seg span { padding: 6px 10px; } }
.start-opt-more { display: grid; gap: 8px; }
.start-opt-more summary { cursor: pointer; font-size: 14px; color: var(--ink-2); }
.start-opt-more select { width: 100%; }
.len-seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.len-seg label { cursor: pointer; }
.len-seg input { position: absolute; opacity: 0; pointer-events: none; }
.len-seg span { display: block; padding: 5px 11px; border-radius: 999px; font-size: 13.5px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.len-seg input:checked + span { background: var(--ink); color: var(--surface); }
.my-subj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.my-subj-tile { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.my-subj-tile .subj-art { width: 56px; height: 56px; display: block; }
.my-subj-tile .subj-art svg, .my-subj-tile .subj-art img { width: 100%; height: 100%; }
.my-subj-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.my-subj-links a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 13.5px; color: inherit; text-decoration: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.my-subj-links a:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.my-subj-links .ico { width: 14px; height: 14px; }
/* выбор предметов: Зубрики меняются свайпом */
.zb-stage { position: relative; display: grid; justify-items: center; gap: 8px; touch-action: pan-y; user-select: none; }
.zb-stage-box { position: relative; width: 200px; aspect-ratio: 1 / 1.1; overflow: visible; }
.zb-stage-box > .zubrik { position: absolute; inset: 0; width: 100%; }
/* плавно: долгий выезд с мягким торможением, без пружины; старый Зубрик уходит чуть быстрее, кадры перекрываются */
.zb-stage-box > .zubrik.zb-in { animation: zb-swipe-in 1.1s cubic-bezier(.22, 1, .36, 1) both; }
.zb-stage-box > .zubrik.zb-out { animation: zb-swipe-out 0.8s cubic-bezier(.55, 0, .45, 1) both; pointer-events: none; }
.zb-stage-box > .zubrik.zb-in-back { animation: zb-swipe-in-back 1.1s cubic-bezier(.22, 1, .36, 1) both; }
.zb-stage-box > .zubrik.zb-out-back { animation: zb-swipe-out-back 0.8s cubic-bezier(.55, 0, .45, 1) both; pointer-events: none; }
@keyframes zb-swipe-in { from { transform: translateX(-38%) rotate(-5deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes zb-swipe-out { from { transform: none; opacity: 1; } to { transform: translateX(42%) rotate(6deg); opacity: 0; } }
@keyframes zb-swipe-in-back { from { transform: translateX(38%) rotate(5deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes zb-swipe-out-back { from { transform: none; opacity: 1; } to { transform: translateX(-42%) rotate(-6deg); opacity: 0; } }
.zb-stage-hint { font-size: 12.5px; color: var(--ink-3); text-align: center; }
@media (max-width: 680px) { .zb-stage-box { width: 140px; } }
@media (prefers-reduced-motion: reduce) { .zb-stage-box > .zubrik { animation: none !important; } }
.my-subj-card .zb-stage { justify-self: center; }
@media (max-width: 640px) { .my-subj-card.start-card .h1 { padding-right: 0; } .my-subj-card > .zb-stage { position: static; } }

/* ---------- 11.18 — заставка главной: камера в глазу Зубрика (static/intro.js) ----------
   html.zb-intro ставится в <head> до первой отрисовки. Шторка цвета фона закрывает страницу, первый экран поднят
   над ней, но его текст и кнопки спрятаны — виден только Зубрик, которого intro.js «снимает» вплотную через viewBox.
   Прокрутки нет (и рисунок, вылезший за экран, не раздвигает страницу вбок); место под полосу прокрутки
   оставлено, чтобы после заставки ничего не сдвинулось. html.zb-landed — посадка (камера ещё доезжает последние пиксели): текст и кнопки проявляются. */
html.zb-intro { overflow: hidden; scrollbar-gutter: stable; }
html.zb-intro body { overflow: hidden; }
html.zb-intro::after { content: ""; position: fixed; inset: 0; z-index: 45; background: var(--bg); opacity: var(--zb-veil, 1); }
html.zb-intro .hero-light { z-index: 46; overflow: visible; }
/* свечение первого экрана выходит за его край, а он во время заставки не обрезает (Зубрик на весь экран) —
   поэтому свечение ждёт самого конца, иначе его край мигнул бы при возврате обрезки */
html.zb-intro .hero-light::before { opacity: 0 !important; animation: none !important; }
html.zb-intro:not(.zb-landed) .mascot > :not(.zubrik) { opacity: 0; animation: none; }
html.zb-intro:not(.zb-landed) .hero-copy > *, html.zb-intro:not(.zb-landed) .hero-cta > * { visibility: hidden; animation: none; }
html.zb-intro:not(.zb-landed) .mascot > .zubrik { animation: none; filter: none; }  /* тень на весь экран — лишняя работа */
html.zb-intro .mascot > .zubrik:not([data-intro]) { visibility: hidden; }  /* до первого кадра заставки — не мелькать маленьким */
/* поза (чай с закрытыми глазами, сонные веки) не должна просвечивать в первом кадре: переходы выключены, кроме своих */
.zubrik[data-intro] * { transition: none; }
.zubrik[data-intro] .zb-eye, .zubrik[data-intro] .zb-look { animation: none !important; }
.zubrik[data-intro] .zb-brow { transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1); }
.zb-iris { opacity: var(--zb-iris, 1); }

/* посадка: камера доезжает до места сама (без скачка), дальше всё только проявляется — мягко и по очереди:
   плашки, заголовок, текст, кнопка, ссылка, реплика Зубрика */
html.zb-landed .hero-light::before { animation: enter-fade 1.1s var(--ease) both; }
html.zb-landed .mascot > .zubrik { animation: zb-shadow-in 0.9s var(--ease) both; }
html.zb-landed .mascot > .mascot-halo { animation: enter-fade 1.2s var(--ease) both; }
html.zb-landed .mascot > .speech { animation: zb-say-in 0.7s var(--ease) 0.55s both; }
html.zb-landed .mascot > .hero-prop { animation: enter-fade 0.7s var(--ease) 0.15s both; }
html.zb-landed .hero-copy > *, html.zb-landed .hero-cta > :not(.hero-cta-panel) { animation: zb-rise 1s var(--ease) both; }
html.zb-landed .hero-copy > :nth-child(2) { animation-delay: 0.09s; }
html.zb-landed .hero-copy > :nth-child(3) { animation-delay: 0.18s; }
/* стеклянная панель с кнопкой поднимается без прозрачности (стекло) — поэтому до своей очереди просто не видна */
html.zb-landed .hero-cta > .hero-cta-panel { animation: hero-rise 1s var(--ease) 0.28s both, zb-wait 0.28s; }
html.zb-landed .hero-cta > :nth-child(2) { animation-delay: 0.36s; }
html.zb-landed .hero-cta > :nth-child(3) { animation-delay: 0.44s; }
@keyframes zb-wait { from, to { visibility: hidden; } }
@keyframes zb-shadow-in { from { filter: drop-shadow(0 0 0 rgba(29, 74, 53, 0)); } }
@keyframes zb-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes zb-say-in { from { opacity: 0; transform: translateY(6px) scale(0.94); } }
@media (prefers-reduced-motion: reduce) { html.zb-landed .mascot > *, html.zb-landed .hero-copy > *, html.zb-landed .hero-cta > * { animation: none !important; } }

/* v11.20 — чертежи к заданиям математики (factory/mathfig.py): цвета из темы, подписи с ореолом цвета фона */
.m-fig { --m-acc: #1D5FBF; --m-ask: #C2410C; --m-soft: #DCE8FB; --m-soft2: #FCE3D2; --m-grid: color-mix(in srgb, var(--ink) 16%, transparent);
  --m-halo: var(--surface); display: grid; margin: 12px 0 4px; white-space: normal; }
:root[data-theme="dark"] .m-fig { --m-acc: #8DB6FF; --m-ask: #FFA466; --m-soft: #1E2C47; --m-soft2: #47291A;
  --m-grid: color-mix(in srgb, var(--ink) 20%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .m-fig { --m-acc: #8DB6FF; --m-ask: #FFA466; --m-soft: #1E2C47;
  --m-soft2: #47291A; --m-grid: color-mix(in srgb, var(--ink) 20%, transparent); } }
.m-fig svg { width: min(100%, calc(var(--fw, 340) * 1.15px)); max-width: 400px; stroke-width: 2; }
.m-fig .sci-scroll { justify-items: start; }
.m-fig .m-ln { fill: none; stroke: var(--f-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.m-fig .m-hid { fill: none; stroke: var(--f-ink-2); stroke-width: 1.6; stroke-dasharray: 6 5; stroke-linecap: round; }
.m-fig .m-thin { fill: none; stroke: var(--f-ink); stroke-width: 1.4; }
.m-fig .m-aux { fill: none; stroke: var(--m-acc); stroke-width: 2; stroke-linecap: round; }
.m-fig .m-aux-hid { fill: none; stroke: var(--m-acc); stroke-width: 1.8; stroke-dasharray: 6 5; }
.m-fig .m-ask { fill: none; stroke: var(--m-ask); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.m-fig .m-ask-hid { fill: none; stroke: var(--m-ask); stroke-width: 2.2; stroke-dasharray: 6 5; stroke-linecap: round; }
.m-fig .m-soft, .m-fig .m-soft-fill { fill: var(--m-soft); stroke: none; }
.m-fig .m-soft2-fill { fill: var(--m-soft2); stroke: none; }
.m-fig .m-ang { fill: none; stroke: var(--m-acc); stroke-width: 1.6; }
.m-fig .m-grid { fill: none; stroke: var(--m-grid); stroke-width: 1; }
.m-fig .m-axis { fill: none; stroke: var(--f-ink); stroke-width: 1.6; }
.m-fig .m-head { fill: var(--f-ink); stroke: none; }
.m-fig .m-pt { fill: var(--f-ink); stroke: none; }
.m-fig .m-pt-ask { fill: var(--m-ask); stroke: none; }
.m-fig .m-pt-acc { fill: var(--m-acc); stroke: none; }
.m-fig svg text { paint-order: stroke; stroke: var(--m-halo); stroke-width: 4px; stroke-linejoin: round; }
.m-fig .m-lbl { font-size: 17px; font-style: italic; font-family: "Times New Roman", Georgia, serif; fill: var(--f-ink); }
.m-fig .m-val { font-size: 15px; font-weight: 750; fill: var(--m-acc); }
.m-fig .m-q { font-size: 15px; font-weight: 750; fill: var(--m-ask); }
.m-fig .m-tick { font-size: 13px; fill: var(--f-ink-2); }
.m-fig .m-open { fill: var(--m-halo); stroke: var(--f-ink); stroke-width: 1.8; }

/* ---------- v11.30: стартовый тест — Зубрик ведущий, предметы компактно, лесенка сложности ---------- */
.start-shell { max-width: 1080px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(20px, 4vw, 48px); align-items: start; }
.start-main { display: grid; gap: 22px; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg); }
.start-lead { font-size: 18px; margin: 0; }
.start-host { position: sticky; top: 96px; display: grid; justify-items: center; gap: 0; padding-top: 12px; }
.start-host .mascot .zubrik { width: min(320px, 100%); }
.start-say { max-width: 300px; text-align: center; font-size: 18px; }
.start-say small { display: block; margin-top: 6px; font: 600 14px/1.35 var(--font-body); letter-spacing: 0; color: var(--ink-2); }
.start-say small:empty { display: none; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ladder li { display: grid; align-content: end; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--bg-2); }
.ladder b { font: 700 14.5px/1.25 var(--font-body); }
.ladder small { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); }
.ladder-step { display: block; width: 34px; height: calc(8px * var(--h)); margin-bottom: 8px; border-radius: 5px; background: linear-gradient(90deg, var(--lime), color-mix(in srgb, var(--lime) 55%, var(--forest))); }
.start-picks { display: grid; gap: 14px; }
.pick-group { display: grid; gap: 8px; }
.pick-group-title { font: 650 12px/1.2 var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick-sm { padding: 8px 10px 8px 8px; border-radius: 16px; }
.pick-sm .pick-badge { width: 36px; height: 36px; border-radius: 11px; }
.pick-sm .pick-text b { font-size: 14.5px; }
.pick-sm .pick-text small { font-size: 12px; }
.start-more { display: grid; gap: 10px; }
.start-more > summary { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 14px; border-radius: 999px; cursor: pointer; list-style: none; font: 650 14px/1.2 var(--font-body); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.start-more > summary::-webkit-details-marker { display: none; }
.start-more > summary .ico { width: 16px; height: 16px; }
.start-more[open] > summary { color: var(--ink); }
.start-go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
@media (max-width: 880px) {
  .start-shell { grid-template-columns: minmax(0, 1fr); }
  .start-host { position: relative; top: 0; order: -1; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; gap: 12px; padding-top: 0; }
  .start-host .mascot { order: -1; }
  .start-host .mascot .zubrik { width: 120px; }
  .start-say { text-align: left; font-size: 16px; margin: 0; }
  .start-say::after { left: -6px; top: 50%; bottom: auto; margin: -9px 0 0; box-shadow: -3px 3px 0 -2px var(--line); border-radius: 0 0 0 4px; }
}
@media (max-width: 640px) {
  .start-main { padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .start-host .mascot .zubrik { width: 96px; }
  .ladder { gap: 6px; }
  .ladder li { padding: 10px; }
  .ladder b { font-size: 13px; }
  .ladder small { display: none; }
  .ladder-step { width: 26px; height: calc(6px * var(--h)); margin-bottom: 6px; }
  .pick-grid { grid-template-columns: minmax(0, 1fr); }
}
/* v11.30: напоминание на главной — пока стартовый тест не пройден */
.start-nudge { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; color: inherit; text-decoration: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lime) 70%, transparent), var(--shadow-sm); transition: transform 0.35s var(--spring); }
.start-nudge:hover { transform: translateY(-2px); }
.start-nudge-zb .zubrik { width: 96px; }
.start-nudge-text { display: grid; gap: 4px; min-width: 0; }
.start-nudge-text b { font: 750 19px/1.25 var(--font-display); letter-spacing: -0.01em; }
@media (max-width: 640px) {
  .start-nudge { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .start-nudge-zb .zubrik { width: 64px; }
  .start-nudge > .btn { grid-column: 1 / -1; justify-self: start; }
}
/* v11.30: на главной восемь Зубриков — два ряда по четыре (было пять в ряд и «хвост» из двух) */
@media (min-width: 1101px) { .trio { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.trio-physics { --trio-glow: rgba(198, 232, 62, 0.4); }
