/* ===== ZETT Mini App — по макету _incoming/design/miniapp-design.html. Сначала телефон (360–430) ===== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/inter-cyrillic.woff2') 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 700; font-display: swap;
  src: url('fonts/inter-cyrillic-ext.woff2') 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 700; font-display: swap;
  src: url('fonts/inter-latin.woff2') 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: 'Unbounded'; font-style: normal; font-weight: 600 900; font-display: swap;
  src: url('fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600 900; font-display: swap;
  src: url('fonts/unbounded-latin.woff2') 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; }
/* JetBrains Mono (SIL OFL 1.1, лицензия — fonts/OFL-JetBrainsMono.txt) */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/jetbrains-mono-cyrillic.woff2') 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: 500; font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') 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 {
  --app: #080808;
  --s1: #121212;
  --s2: #1A1A1A;
  --line: #262626;
  --line2: #333;
  --lime: #D4FF00;
  --ink: #0A0A0A;
  --t1: #FFFFFF;
  --t2: #B5B5B5;
  --t3: #8A8A8A;
  --glow: 0 0 32px rgba(212, 255, 0, .35);
  --head: 'Unbounded', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-space: calc(120px + var(--safe-b));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--app); color: var(--t1); font-family: var(--body); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: var(--lime); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Невидимое расширение области нажатия до 44 px у маленьких кнопок */
.hit { position: relative; }
.hit::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }

.app { max-width: 480px; margin: 0 auto; padding: 16px 16px var(--nav-space); }
.app--lesson { padding-bottom: calc(110px + var(--safe-b)); }
.app--lock { padding-bottom: 16px; }

/* Переход между экранами: лёгкий сдвиг + fade 200 мс */
/* без fill-mode: после анимации у блока не остаётся transform (иначе fixed-элементы внутри «прилипают» к нему) */
.screen { animation: screen-in .2s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.press { transition: transform .15s ease-out; }
.press:active { transform: scale(.98); }

/* ---------- Шапка главной ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--lime); box-shadow: 0 0 14px rgba(212, 255, 0, .5);
  display: flex; align-items: center; justify-content: center; background: #0A0A0A; font-family: var(--head); font-weight: 900; font-size: 9px; color: var(--lime); }
.hi { min-width: 0; }
.hi small { display: block; color: var(--t3); font-size: 12px; line-height: 1.3; }
.hi b { display: block; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ava { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #2c3a1a, #0f1406); border: 1px solid var(--line2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.ava img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Баннер-карусель ---------- */
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: -16px -16px -16px; padding: 16px; gap: 32px; scrollbar-width: none; scroll-padding: 0 16px; }
.carousel::-webkit-scrollbar { display: none; }
.hero { flex: 0 0 100%; scroll-snap-align: center; position: relative; height: 200px; border-radius: 26px; overflow: hidden; background: var(--lime); color: var(--ink); padding: 18px; box-shadow: var(--glow); }
.hero .tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--lime); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.hero h2 { margin: 12px 0 4px; font-family: var(--head); font-weight: 900; font-size: 24px; line-height: 1.02; text-transform: uppercase; letter-spacing: -.02em; max-width: 200px; }
.hero p { margin: 0; font-size: 12px; font-weight: 600; color: #2E3A00; max-width: 190px; }
.hero .go { position: absolute; z-index: 2; left: 18px; bottom: 16px; height: 38px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--ink); color: var(--lime);
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.hero .go i { width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--ink); display: flex; align-items: center; justify-content: center; font-style: normal; }
.hero .art { position: absolute; right: -6px; top: 22px; width: 150px; height: 190px; }
.mini { position: absolute; width: 74px; height: 132px; border-radius: 16px; background: #0A0A0A; border: 3px solid #0A0A0A; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); overflow: hidden; }
.mini::after { content: ""; position: absolute; left: 50%; top: 5px; width: 22px; height: 6px; margin-left: -11px; border-radius: 4px; background: #000; }
.mini .p { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--lime); display: flex; align-items: center; justify-content: center; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0 18px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: #333; transition: width .25s, background .25s; }
.dots i.on { width: 20px; background: var(--lime); }
.dots--single { height: 6px; }
.dots--single i { display: none; }

/* ---------- Чипсы ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 20px; padding: 3px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 38px; padding: 0 14px; border-radius: 13px; background: var(--s1); border: 1px solid var(--line); display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--t2); white-space: nowrap; }
.chip.on { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.chip .soon { font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: rgba(212, 255, 0, .14); color: var(--lime); }

/* ---------- Секции ---------- */
.sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.sec h3 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 17px; }
.sec .more { font-size: 12px; font-weight: 700; color: var(--lime); display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); white-space: nowrap; }
.title { margin: 6px 0 16px; font-family: var(--head); font-weight: 900; font-size: 24px; line-height: 1.1; text-transform: uppercase; letter-spacing: -.02em; }

/* ---------- «Продолжить» ---------- */
.cont { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 20px; background: var(--s1); border: 1px solid rgba(212, 255, 0, .35); }
.cont .num { flex: 0 0 52px; height: 52px; border-radius: 15px; background: var(--lime); color: var(--ink); display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 900; font-size: 16px; }
.cont .t { flex: 1; min-width: 0; }
.cont small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--lime); text-transform: uppercase; }
.cont b { display: block; font-size: 14px; line-height: 1.25; margin: 2px 0 6px; }
.cont .chev { flex: 0 0 auto; color: var(--lime); }
.bar { height: 5px; border-radius: 3px; background: #262626; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--lime); border-radius: 3px; transition: width .4s; }

/* ---------- Карточки курсов ---------- */
.hs { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.hs::-webkit-scrollbar { display: none; }
.course { flex: 0 0 220px; scroll-snap-align: start; display: block; border-radius: 22px; background: var(--s1); border: 1px solid var(--line); overflow: hidden; }
.course--wide { flex: none; width: 100%; }
.course--wide + .course--wide { margin-top: 12px; }
.course--wide .cover { height: 150px; }
.cover { position: relative; height: 130px; overflow: hidden; }
.cover--lime { background: radial-gradient(circle at 70% 30%, rgba(212, 255, 0, .55), transparent 55%), #11140A; }
.cover--stripes { background: repeating-linear-gradient(135deg, #151515 0 14px, #111 14px 28px); }
.cover .accent { position: absolute; right: 20px; bottom: 18px; font-family: var(--head); font-weight: 900; font-size: 54px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(212, 255, 0, .5); }
.cover .badge { position: absolute; z-index: 2; left: 10px; top: 10px; padding: 4px 8px; border-radius: 8px; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.b-lime { background: var(--lime); color: var(--ink); }
.b-dark { background: rgba(10, 10, 10, .85); color: var(--t1); border: 1px solid #333; }
.course .info { padding: 12px; }
.course .info b { display: block; font-family: var(--head); font-weight: 800; font-size: 14px; line-height: 1.2; }
.course .info small { display: block; margin-top: 6px; color: var(--t3); font-size: 12px; }
.course .info .bar { margin-top: 8px; }
.soonc { opacity: .75; }
.soonc .cover { filter: grayscale(.6); }

/* ---------- Плитки шаблонов ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; padding: 14px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line); min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.ic { width: 34px; height: 34px; border-radius: 11px; background: rgba(212, 255, 0, .12); color: var(--lime); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tile b { font-size: 13px; line-height: 1.25; font-weight: 700; }
.new { position: absolute; right: 10px; top: 10px; padding: 3px 7px; border-radius: 7px; background: var(--lime); color: var(--ink); font-size: 9px; font-weight: 800; }

/* ---------- Обновления ---------- */
.upd { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line); }
.upd + .upd { margin-top: 10px; }
.upd > .uic { flex: 0 0 44px; height: 44px; border-radius: 14px; background: var(--s2); display: flex; align-items: center; justify-content: center; color: var(--lime); }
.upd .ut { flex: 1; min-width: 0; }
.upd b { display: block; font-size: 14px; line-height: 1.3; }
.upd small { color: var(--t3); font-size: 12px; }
.upd-card { border-radius: 20px; background: var(--s1); border: 1px solid var(--line); padding: 14px; }
.upd-card + .upd-card { margin-top: 12px; }
.upd-card .uhead { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.upd-card .udate { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--lime); }
.upd-card h4 { margin: 2px 0 0; font-family: var(--head); font-weight: 800; font-size: 15px; line-height: 1.3; }

/* ---------- Нижнее меню ---------- */
.nav { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px; bottom: calc(18px + var(--safe-b)); height: 72px; border-radius: 26px;
  background: rgba(18, 18, 18, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-around; }
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 600; color: #9a9a9a; width: 62px; min-height: 56px; }
.nav button.on { color: var(--lime); }
.nav .home { position: relative; top: -20px; }
.nav .home .c { width: 62px; height: 62px; border-radius: 50%; background: #1d1d1d; color: #bbb; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--app); transition: background .2s, color .2s; }
.nav .home em { font-style: normal; color: #9a9a9a; margin-top: 2px; }
.nav .home.on .c { background: var(--lime); color: var(--ink); box-shadow: 0 0 0 6px var(--app), 0 0 30px rgba(212, 255, 0, .5); }
.nav .home.on em { color: var(--lime); }

/* ---------- Страница курса ---------- */
.chero { position: relative; border-radius: 26px; overflow: hidden; height: 220px; margin-bottom: 14px;
  background: radial-gradient(circle at 75% 25%, rgba(212, 255, 0, .6), transparent 55%), #0E1108; }
.chero .over { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 8, 0) 35%, rgba(8, 8, 8, .92)); padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.chero .ctag { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.chero h2 { margin: 6px 0 0; font-family: var(--head); font-weight: 900; font-size: 26px; line-height: 1.02; text-transform: uppercase; max-width: 280px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.stat { padding: 12px 10px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-family: var(--head); font-weight: 900; font-size: 20px; color: var(--lime); }
.stat small { color: var(--t3); font-size: 11px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { flex: 1; min-width: 0; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--t3); }
.tabs button.on { background: var(--s2); color: var(--t1); box-shadow: inset 0 0 0 1px #333; }
.mod { border-radius: 20px; background: var(--s1); border: 1px solid var(--line); margin-bottom: 10px; overflow: hidden; }
.mod.cur { border-color: rgba(212, 255, 0, .4); }
.mod .mh { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; }
.mod .mn { flex: 0 0 38px; font-family: var(--head); font-weight: 900; font-size: 22px; color: transparent; -webkit-text-stroke: 1.4px var(--lime); }
.mod .mt { flex: 1; min-width: 0; }
.mod .mh b { display: block; font-family: var(--head); font-weight: 800; font-size: 14px; line-height: 1.25; }
.mod .mh small { color: var(--t3); font-size: 12px; }
.mod .mh small em { font-style: normal; color: var(--lime); font-weight: 700; }
.mring { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(var(--lime) var(--p), #2a2a2a 0); display: flex; align-items: center; justify-content: center; }
.mring::after { content: ""; width: 28px; height: 28px; border-radius: 50%; background: var(--s1); }
.mbody { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease-out; }
.mbody > div { overflow: hidden; }
.mod.open .mbody { grid-template-rows: 1fr; }
.les { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 14px; border-top: 1px solid var(--line); }
.les.now { background: rgba(212, 255, 0, .05); }
.les .ln { flex: 0 0 24px; font-family: var(--head); font-weight: 800; font-size: 12px; color: var(--t3); }
.les.now .ln { color: var(--lime); }
.les .lt { flex: 1; min-width: 0; }
.les .lt b { display: block; font-size: 13px; line-height: 1.3; font-weight: 600; }
.les .lt small { color: var(--t3); font-size: 11px; }
.st { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.st.done { background: var(--lime); color: var(--ink); }
.st.go { border: 1px solid var(--lime); color: var(--lime); }
.st.open { border: 1px solid #444; color: #aaa; }
.st.lock { background: var(--s2); color: #777; }
.free { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--lime); color: var(--ink); margin-left: 6px; vertical-align: 2px; letter-spacing: .04em; }

/* ---------- Шаблоны (список) ---------- */
.search { position: relative; margin-bottom: 14px; }
.search input { width: 100%; height: 46px; padding: 0 14px 0 42px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); color: var(--t1); font-size: 14px; outline: none; }
.search input:focus { border-color: rgba(212, 255, 0, .5); }
.search input::placeholder { color: var(--t3); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--t3); }
.tpl { border-radius: 18px; background: var(--s1); border: 1px solid var(--line); padding: 14px; }
.tpl + .tpl { margin-top: 10px; }
.tpl .th { display: flex; gap: 12px; align-items: flex-start; }
.tpl .tt { flex: 1; min-width: 0; }
.tpl .tt b { display: block; font-size: 14px; line-height: 1.3; }
.tpl .from { display: block; margin-top: 3px; color: var(--t3); font-size: 12px; line-height: 1.35; text-align: left; }
.tpl .pv { margin-top: 12px; border-radius: 12px; background: #0D0F0A; border: 1px solid #2a2e20; padding: 10px 12px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: #e6e6e6; }
.tpl .pv span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.tpl .hid { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--t3); }
.tpl .tnew { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: var(--lime); color: var(--ink); font-size: 9px; font-weight: 800; vertical-align: 2px; }
.copy { flex: 0 0 auto; height: 30px; padding: 0 10px; border-radius: 9px; background: var(--lime); color: var(--ink); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.copy.locked { background: var(--s2); color: var(--t2); border: 1px solid var(--line2); }
.empty-note { text-align: center; color: var(--t3); padding: 30px 0; }

/* ---------- Урок ---------- */
.lhead small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--lime); text-transform: uppercase; }
.lhead h2 { margin: 6px 0 8px; font-family: var(--head); font-weight: 900; font-size: 22px; line-height: 1.1; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.meta span { height: 28px; padding: 0 10px; border-radius: 9px; background: var(--s1); border: 1px solid var(--line); font-size: 12px; color: var(--t2); display: flex; align-items: center; gap: 6px; }
.lprog { position: sticky; top: 0; z-index: 10; margin: 0 -16px 18px; padding: 6px 16px; background: var(--app); }
.lprog div { height: 4px; border-radius: 2px; background: #222; overflow: hidden; }
.lprog i { display: block; width: 0; height: 100%; background: var(--lime); border-radius: 2px; }

.txt { overflow-wrap: anywhere; }
.txt > :first-child { margin-top: 0; }
.txt h3 { margin: 22px 0 10px; font-family: var(--head); font-weight: 800; font-size: 17px; line-height: 1.25; }
.txt h4 { margin: 18px 0 8px; font-family: var(--head); font-weight: 800; font-size: 15px; line-height: 1.3; }
.txt h5 { margin: 16px 0 8px; font-size: 14px; font-weight: 700; }
.txt p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: #d6d6d6; }
.txt strong { color: var(--t1); }
.txt ul, .txt ol { margin: 0 0 12px; padding-left: 20px; color: #d6d6d6; font-size: 14px; line-height: 1.6; }
.txt li { margin: 4px 0; }
.txt li::marker { color: var(--lime); }
.txt code { font-family: var(--mono); font-size: .86em; background: var(--s2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.call { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--lime); background: rgba(212, 255, 0, .06); margin: 14px 0; }
.call--tip { border-color: var(--line2); background: var(--s1); }
.call > b { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .06em; color: var(--lime); margin-bottom: 4px; text-transform: uppercase; }
.call--tip > b { color: var(--t2); }
.call .ctitle { font-size: 13px; font-weight: 700; color: var(--t1); margin-bottom: 4px; }
.call p, .call li { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: #e6e6e6; }
.call > :last-child, .call .cbody > :last-child { margin-bottom: 0; }
.code { border-radius: 16px; background: #0D0F0A; border: 1px solid #2a2e20; overflow: hidden; margin: 14px 0; }
.code .ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 12px; border-bottom: 1px solid #20231a; }
.code .ch > span { font-family: var(--mono); font-size: 11px; color: #8e9384; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code pre { margin: 0; padding: 12px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: #e6e6e6; white-space: pre-wrap; word-break: break-word; }
.chk { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.chk label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); font-size: 13px; line-height: 1.4; cursor: pointer; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.box { flex: 0 0 22px; height: 22px; border-radius: 7px; border: 1.5px solid #555; display: flex; align-items: center; justify-content: center; color: transparent; transition: background .2s, border-color .2s; }
.chk input:checked + .box { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.chk input:focus-visible + .box { outline: 2px solid var(--lime); outline-offset: 2px; }
.twrap { margin: 14px 0; border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.txt table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.45; }
.txt th, .txt td { padding: 10px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); overflow-wrap: normal; hyphens: auto; }
.txt th { background: var(--s1); color: var(--t2); font-weight: 600; border-top: 0; }
.txt td code { white-space: nowrap; }
.fig { margin: 14px 0; }
.fig img, .gal img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--s1); cursor: zoom-in; }
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.lbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(26px + var(--safe-b)); background: linear-gradient(rgba(8, 8, 8, 0), #080808 30%); }
.lbar > div { display: flex; gap: 10px; max-width: 448px; margin: 0 auto; }
.lbar button { flex: 1; min-width: 0; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; text-align: center; }
.lbar .a1 { background: var(--s1); border: 1px solid var(--line2); color: var(--t1); }
.lbar .a1.on { border-color: var(--lime); color: var(--lime); background: rgba(212, 255, 0, .08); }
.lbar .a2 { background: var(--lime); color: var(--ink); box-shadow: var(--glow); }

/* ---------- Архив ---------- */
.arch { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); }
.arch .aic { flex: 0 0 44px; height: 44px; border-radius: 14px; background: rgba(212, 255, 0, .12); color: var(--lime); display: flex; align-items: center; justify-content: center; }
.arch .at { flex: 1; min-width: 0; }
.arch b { display: block; font-family: var(--head); font-weight: 800; font-size: 14px; }
.arch p { margin: 4px 0 12px; color: var(--t2); font-size: 13px; line-height: 1.5; }

/* ---------- Кнопки ---------- */
.big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border-radius: 18px; background: var(--lime); color: var(--ink);
  font-family: var(--head); font-weight: 800; font-size: 14px; box-shadow: var(--glow); text-align: center; padding: 0 14px; }
.ghost { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; height: 48px; border-radius: 16px; border: 1px solid var(--line2); color: var(--t1); font-weight: 600; font-size: 14px; }
.arch .ghost { margin-top: 0; height: 44px; }

/* ---------- Закрытый урок ---------- */
.blurred { filter: blur(6px); opacity: .45; pointer-events: none; user-select: none; }
.fake { display: block; height: 12px; border-radius: 6px; background: #3a3a3a; margin: 0 0 10px; }
.fake--code { height: 90px; border-radius: 16px; background: #0D0F0A; border: 1px solid #2a2e20; margin-top: 16px; }
.lockwrap { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(30px + var(--safe-b)); }
.sheet { max-width: 448px; margin: 0 auto; border-radius: 30px; background: #111; border: 1px solid var(--line2); padding: 22px 18px 18px; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); text-align: center; }
.lk { width: 72px; height: 72px; margin: -56px auto 12px; border-radius: 50%; background: var(--lime); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px #111, 0 0 40px rgba(212, 255, 0, .5); }
.sheet h3 { margin: 0 0 6px; font-family: var(--head); font-weight: 900; font-size: 20px; text-transform: uppercase; }
.sheet p { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--t2); }
.inc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; text-align: left; }
.inc span { padding: 10px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); font-size: 12px; font-weight: 600; line-height: 1.25; display: flex; align-items: center; gap: 8px; }
.inc span i { flex: 0 0 22px; height: 22px; border-radius: 7px; background: rgba(212, 255, 0, .14); color: var(--lime); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 700; }

/* ---------- Профиль ---------- */
.me { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; background: var(--s1); border: 1px solid var(--line); margin-bottom: 12px; }
.me .ava { flex-basis: 56px; width: 56px; height: 56px; font-size: 20px; border: 2px solid var(--lime); box-shadow: 0 0 14px rgba(212, 255, 0, .4); }
.me b { display: block; font-family: var(--head); font-weight: 800; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.me small { color: var(--t3); font-size: 12px; }
.stat-line { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); }
.stat-line.on { border-color: rgba(212, 255, 0, .35); }
.stat-line .dot { flex: 0 0 12px; height: 12px; border-radius: 50%; background: #555; }
.stat-line.on .dot { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.stat-line b { display: block; font-size: 14px; }
.stat-line small { color: var(--t3); font-size: 12px; }
.stat-line + .big { margin-top: 10px; }
.pmods { border-radius: 20px; background: var(--s1); border: 1px solid var(--line); overflow: hidden; }
.pmod { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pmod + .pmod { border-top: 1px solid var(--line); }
.pmod .mn { flex: 0 0 30px; font-family: var(--head); font-weight: 900; font-size: 16px; color: transparent; -webkit-text-stroke: 1.2px var(--lime); }
.pmod .pt { flex: 1; min-width: 0; }
.pmod b { display: block; font-size: 13px; font-weight: 600; }
.pmod small { color: var(--t3); font-size: 11px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line); }
.row .uic { flex: 0 0 44px; height: 44px; border-radius: 14px; background: var(--s2); display: flex; align-items: center; justify-content: center; color: var(--lime); }
.row .rt { flex: 1; min-width: 0; }
.row b { display: block; font-size: 14px; }
.row small { color: var(--t3); font-size: 12px; }
.row .chev { color: var(--t3); }
.gap { height: 12px; }

/* ---------- Демо-кнопка «Назад» (в Telegram — системная) ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; margin-bottom: 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: 12px; font-weight: 600; color: #ddd; }

/* ---------- Скелетоны ---------- */
.sk { position: relative; overflow: hidden; background: var(--s1); border-radius: 14px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Тост, картинка на весь экран, ошибки ---------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(108px + var(--safe-b)); transform: translateX(-50%); padding: 10px 16px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line2);
  font-size: 13px; font-weight: 600; white-space: nowrap; animation: screen-in .2s ease-out both; }
.viewer { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.msg { text-align: center; padding: 70px 10px; }
.msg .logo { margin: 0 auto 20px; width: 56px; height: 56px; font-size: 12px; }
.msg h2 { margin: 0 0 10px; font-family: var(--head); font-weight: 900; font-size: 20px; text-transform: uppercase; }
.msg p { margin: 0 0 22px; color: var(--t2); }

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