/* HUDOOR — личный кабинет (Telegram Mini App). Палитра академии, раскладка как в приложении. */

:root {
  --bg: #030c09;
  --bg2: #071510;
  --bg3: #0c1f18;
  --bg4: #133025;
  --tx: #eef4f0;
  --mut: #a9bdb4;
  --gold: #e2b857;
  --gold2: #f4d98a;
  --mint: #2fe0aa;
  --on-gold: #2a1d02;
  --line: rgba(150, 255, 220, .11);
  --line2: rgba(150, 255, 220, .22);
  --card: #0b1a14;

  --display: 'Unbounded', system-ui, sans-serif;
  --text: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gold-grad: linear-gradient(100deg, #f4d98a, #e2b857 60%, #cfa043);
  --pad: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100svh;
  background: radial-gradient(70% 40% at 80% 0%, rgba(47, 224, 170, .1), transparent 70%), var(--bg);
  background-attachment: fixed;
  color: var(--tx);
  font: 400 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 10px; }

.app { max-width: 640px; margin: 0 auto; padding: 0 var(--pad) calc(96px + env(safe-area-inset-bottom)); }
.view[hidden] { display: none; }
.view { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

/* Шапка */
.top { position: relative; display: flex; align-items: center; justify-content: center; height: 60px; }
.wordmark { font: 700 17px/1 var(--display); letter-spacing: .24em; }
.wordmark span { color: var(--mint); }
.back { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 14px 0 8px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .07); cursor: pointer; font-size: 15px; font-weight: 500; }
.back[hidden] { display: none; }
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.h1 { font: 700 26px/1.15 var(--display); letter-spacing: -.03em; margin: 8px 0 18px; }
.h2 { font: 700 15px/1.2 var(--display); letter-spacing: .02em; text-transform: uppercase; margin: 26px 0 12px; color: var(--mut); }

/* Карточка профиля */
.profile {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line);
  transition: border-color .2s;
}
.profile:active { transform: scale(.99); }
.avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #2fe0aa, #12291f); font: 700 20px/1 var(--display); color: #04140e; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { margin: 0 0 6px; font-size: 18px; font-weight: 600; line-height: 1.2; }
.profile-sub { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--mut); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--gold-grad); color: var(--on-gold); font-size: 13px; font-weight: 700; }
.chev { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Два блока: ближайший урок и календарь */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.next-card, .cal { border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.next-card { display: flex; flex-direction: column; cursor: pointer; }
.next-card .cover { aspect-ratio: 16 / 10; }
.next-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.next-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--gold2); }
.next-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.next-meta { margin: auto 0 0; font-size: 12px; color: var(--mut); }

.cal { padding: 10px 10px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { margin: 0; font-size: 13px; font-weight: 700; text-transform: capitalize; }
.cal-nav { display: flex; gap: 2px; }
.cal-nav button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); cursor: pointer; display: grid; place-items: center; }
.cal-nav button[disabled] { opacity: .25; cursor: default; }
.cal-nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-wd { font-size: 10px; color: var(--mut); padding: 2px 0; }
.cal-day { position: relative; height: 30px; display: flex; align-items: flex-start; justify-content: center; padding: 4px 0 0; border: 0; background: none; border-radius: 8px; font-size: 12px; line-height: 1.1; font-weight: 500; color: rgba(238, 244, 240, .4); }
.cal-day.has { color: var(--tx); cursor: pointer; }
.cal-day.has::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--c); }
.cal-day.done::after { box-shadow: 0 0 0 1.5px var(--card), 0 0 6px var(--c); }
.cal-day.today { background: rgba(226, 184, 87, .16); color: var(--gold2); font-weight: 700; }
.cal-day.att { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold2); }

/* Расшифровка цветов */
.legend { list-style: none; margin: 10px 2px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--mut); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.legend .att-key i { width: 14px; height: 14px; border-radius: 5px; background: none; box-shadow: inset 0 0 0 1.5px var(--gold); }

/* Карточка дня */
.day-info { display: grid; gap: 10px; }
.day-info:empty { display: none; }
.day-cover { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; }
.day-cover .cover { height: 100%; }
.day-course { margin: 4px 0 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--c); }
.day-course i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.day-title { margin: 0; font: 700 19px/1.25 var(--display); letter-spacing: -.02em; }
.day-speaker { margin: 0; color: var(--mut); font-size: 14px; }
.day-wait { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); color: var(--mut); font-size: 14px; }
.day-att { width: 100%; border: 1px solid rgba(226, 184, 87, .5); background: rgba(226, 184, 87, .08); color: var(--gold2); }
.day-att svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.day-att.on { background: rgba(47, 224, 170, .14); border-color: rgba(47, 224, 170, .5); color: var(--mint); }
.btn-gold { background: var(--gold-grad); color: var(--on-gold); }
.btn-gold svg { width: 18px; height: 18px; fill: currentColor; }
.day-go { width: 100%; }
.cal-day.sel { outline: 1.5px solid var(--gold); }
.cal-big { padding: 16px; }
.cal-big .cal-title { font-size: 16px; }
.cal-big .cal-day { height: 46px; padding-top: 9px; font-size: 15px; border-radius: 12px; }
.cal-big .cal-day.has::after { bottom: 8px; width: 6px; height: 6px; margin-left: -3px; }
.cal-big .cal-wd { font-size: 12px; }
.cal-big .cal-nav button { width: 34px; height: 34px; }

/* Быстрые плитки */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.quick-item { min-width: 0; display: grid; justify-items: center; align-content: start; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; }
.quick-ico { width: 100%; aspect-ratio: 1.6; display: grid; place-items: center; border-radius: 20px; background: var(--card); border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s; }
.quick-ico svg { width: 44px; height: 44px; }
.quick-item:active .quick-ico { transform: scale(.95); }
.quick-item:hover .quick-ico { border-color: var(--line2); }
.quick-label { max-width: 100%; font: 700 10.5px/1.3 var(--display); text-transform: uppercase; text-align: center; overflow-wrap: anywhere; hyphens: auto; }

/* Плитки направлений */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.tile { position: relative; display: block; aspect-ratio: 1; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s; }
.tiles li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tiles li:last-child:nth-child(odd) .tile { aspect-ratio: 2.1; }
.tile:active { transform: scale(.98); }
.tile .cover { position: absolute; inset: 0; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(3, 12, 9, .92)); }
.tile-name { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tile-name b { font: 700 15px/1.15 var(--display); text-transform: uppercase; letter-spacing: -.01em; }
.tile-name b::after { content: ' ›'; color: var(--gold); }
.tile-name span { font: 700 18px/1 var(--display); color: var(--tx); }
.tile .soon { position: absolute; right: 12px; top: 12px; z-index: 1; padding: 4px 10px; border-radius: 99px; background: rgba(3, 12, 9, .7); color: var(--gold2); font-size: 12px; font-weight: 700; }

/* Обложки, нарисованные кодом */
.cover { position: relative; overflow: hidden; background: #08130f; }
.cover svg, .cover img { width: 100%; height: 100%; object-fit: cover; }

/* Страница направления */
.course-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: end; margin: 6px 0 16px; }
.course-head h1 { margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -.03em; }
.course-head p { margin: 0; color: var(--mut); font-size: 14px; grid-column: 1; }
.course-head .count { grid-row: 1 / 3; grid-column: 2; text-align: right; font-size: 13px; color: var(--mut); }
.course-head .count b { display: block; font: 700 22px/1 var(--display); color: var(--gold2); }

/* Лента уроков */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lesson { border-radius: 24px; background: var(--card); border: 1px solid var(--line); padding: 14px; }
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lesson-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.lesson-date { display: block; margin-top: 3px; font-size: 13px; font-weight: 400; color: var(--mut); }
.heart { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 0; color: var(--mut); font-size: 12px; line-height: 1.2; text-align: right; }
.heart i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #04110c; border: 1px solid var(--line2); }
.heart svg { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; transition: transform .3s var(--ease); }
.heart[aria-pressed="true"] svg { fill: var(--gold); }
.heart:active svg { transform: scale(1.3); }
.lesson-cover { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer; aspect-ratio: 16 / 9; }
.lesson-cover .cover { position: absolute; inset: 0; }
.play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); box-shadow: 0 8px 26px rgba(0, 0, 0, .45); transition: transform .25s var(--ease); }
.play svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--on-gold); }
.lesson-cover:hover .play { transform: scale(1.08); }
.lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3, 12, 9, .55); }
.lock span { padding: 8px 14px; border-radius: 99px; background: rgba(3, 12, 9, .85); border: 1px solid var(--line2); font-size: 14px; font-weight: 600; }
.lesson.locked .lesson-cover { cursor: default; }
.bar-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .15); }
.bar-progress span { display: block; height: 100%; background: var(--gold-grad); transform-origin: 0 50%; }
.seen-badge { position: absolute; right: 10px; top: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(3, 12, 9, .8); color: var(--mint); font-size: 12px; font-weight: 700; }
.mat-btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; min-height: 44px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .05); cursor: pointer; font-size: 14px; font-weight: 600; }
.mat-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.empty { color: var(--mut); text-align: center; padding: 30px 10px; }

/* Расписание: список дней */
.day-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.day-row { --c: var(--gold); display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px 12px 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.day-row.open { cursor: pointer; }
.day-row.today { border-color: rgba(226, 184, 87, .55); }
.day-row .d { text-align: center; }
.day-row .d b { display: block; font: 700 20px/1.1 var(--display); }
.day-row .d span { font-size: 12px; color: var(--mut); }
.day-row .t { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.day-row .s { margin: 3px 0 0; font-size: 13px; color: var(--mut); }
.day-row .s b { color: var(--c); font-weight: 600; }
.day-row .a { font-size: 13px; font-weight: 600; color: var(--mut); }
.day-row.open .a { color: var(--gold2); }

/* Прогресс */
.progress-total { padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
.ring { --p: 0; width: 76px; height: 76px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); }
.ring b { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font: 700 16px/1 var(--display); }
.progress-total p { margin: 0; color: var(--mut); font-size: 14px; }
.progress-total strong { display: block; color: var(--tx); font-size: 18px; margin-bottom: 4px; }
.progress-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.progress-list li { --c: var(--gold); padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.progress-list .row { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; margin-bottom: 8px; }
.progress-list .row span { color: var(--mut); font-weight: 500; font-size: 14px; }
.track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.track span { display: block; height: 100%; border-radius: inherit; background: var(--c); transform-origin: 0 50%; transition: transform .6s var(--ease); }
.note { color: var(--mut); font-size: 13px; margin: 14px 4px 0; }

/* Нижняя панель */
.tabbar {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%);
  width: min(640px - 32px, calc(100vw - 24px));
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px; border-radius: 26px;
  background: rgba(10, 24, 18, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
}
.tabbar a { display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 20px; font-size: 12px; color: var(--mut); transition: color .2s, background-color .2s; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--gold2); background: rgba(226, 184, 87, .1); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 99px; font: 600 14px/1 var(--text); cursor: pointer; white-space: nowrap; }
.btn-ghost { background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 50%; background: rgba(255, 255, 255, .04); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Страница урока (плеер) и шторка материалов */
.player, .sheet {
  width: min(640px, 100vw); max-width: none; max-height: 100svh; margin: auto auto 0;
  padding: 0; border: 1px solid var(--line2); border-bottom: 0; border-radius: 24px 24px 0 0;
  background: var(--bg2); color: var(--tx);
  overflow-y: auto; overscroll-behavior: contain;
}
.player::backdrop, .sheet::backdrop { background: rgba(2, 8, 6, .82); }
.player[open], .sheet[open] { animation: sheetIn .35s var(--ease); }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.player-inner, .sheet-inner { padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.player-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.player-meta { margin: 0; color: var(--mut); font-size: 13px; }
.player-title { margin: 4px 0 0; font: 700 19px/1.25 var(--display); letter-spacing: -.02em; }
.player-screen { position: relative; aspect-ratio: 16 / 9; margin-inline: -16px; overflow: hidden; background: #000; }
.player-screen video, .player-screen iframe, .kp-mount { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--mut); }
.player-empty .cover { position: absolute; inset: 0; opacity: .35; }
.player-empty div { position: relative; }
.player-empty strong { display: block; font: 700 18px/1.3 var(--display); margin-bottom: 6px; color: var(--tx); }
.player-loader { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.player-loader i { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-bar { display: grid; gap: 10px; }
.speeds { display: flex; justify-content: space-between; gap: 4px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.speeds button { flex: 1; border: 0; background: none; border-radius: 99px; padding: 8px 6px; font-size: 14px; font-weight: 600; color: var(--mut); cursor: pointer; }
.speeds button[aria-pressed="true"] { background: var(--gold-grad); color: var(--on-gold); }
.fav-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; border: 1px solid var(--line2); border-radius: 99px; background: rgba(255, 255, 255, .03); font-weight: 600; font-size: 14px; cursor: pointer; }
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav-btn[aria-pressed="true"] { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.pl-desc { font-size: 15px; color: var(--tx); }
.pl-desc p { margin: 0; white-space: pre-line; }
.pl-desc.clamp p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl-desc button { margin-top: 6px; border: 0; background: none; padding: 0; color: var(--gold2); font-weight: 600; cursor: pointer; }
.pl-block { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; }
.pl-block > summary { cursor: pointer; min-height: 50px; display: flex; align-items: center; font-weight: 600; }
.pl-h { margin: 12px 0 6px; font-weight: 600; }
.materials { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.materials a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 15px; }
.materials a::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.chapters { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 2px; }
.chapters button { width: 100%; display: grid; grid-template-columns: 64px 1fr; gap: 10px; text-align: left; border: 0; background: none; padding: 9px 6px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.chapters button:hover { background: rgba(226, 184, 87, .08); }
.chapters time { color: var(--gold2); font-variant-numeric: tabular-nums; font-weight: 600; }
.player-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.player-nav .btn { padding: 0 10px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 90; padding: 12px 20px; border-radius: 99px; background: var(--gold-grad); color: var(--on-gold); font-weight: 600; font-size: 14px; transform: translate(-50%, 30px); opacity: 0; transition: transform .35s var(--ease), opacity .25s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* На широком экране — чуть крупнее */
@media (min-width: 600px) {
  :root { --pad: 24px; }
  .next-title { font-size: 15px; }
  .quick-label { font-size: 12px; }
  .tile-name b { font-size: 17px; }
}
@media (max-width: 360px) {
  .duo { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== Правки 13–23 ===== */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Продолжить просмотр — горизонтальная лента */
.hscroll { list-style: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 4px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.cont { flex: 0 0 62%; max-width: 260px; scroll-snap-align: start; cursor: pointer; }
.cont-cover { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.cont-cover .cover { position: absolute; inset: 0; }
.cont b { margin-top: 8px; font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cont small { color: var(--gold2); font-size: 12px; font-weight: 600; }
.play-sm { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.play-sm svg { width: 16px; height: 16px; }

/* Метка на плитке встреч */
.quick-ico { position: relative; }
.quick-badge { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 99px; background: var(--gold-grad); color: var(--on-gold); font: 700 10px/1.4 var(--text); }
.quick-badge[hidden] { display: none; }
a.quick-item { color: inherit; }

/* Сердечко на плитке направления */
.tile-wrap { position: relative; }
.tile-fav { position: absolute; top: 10px; left: 10px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(3, 12, 9, .7); cursor: pointer; }
.tile-fav svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; }
.tile-fav[aria-pressed="true"] svg { fill: var(--gold); }
.tile-fav:active { transform: scale(.9); }
.course-fav { grid-column: 1 / -1; justify-self: start; margin-top: 10px; flex-direction: row-reverse; text-align: left; font-size: 13px; color: var(--tx); }
.course-fav i { width: 34px; height: 34px; }

/* Поиск и фильтры */
.search-block { margin-top: 6px; }
.search { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--mut); }
.search:focus-within { border-color: rgba(226, 184, 87, .6); color: var(--tx); }
.search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; color: var(--tx); font: 16px var(--text); outline: none; }
.search input::placeholder { color: var(--mut); }
.search-clear { border: 0; background: rgba(255, 255, 255, .08); width: 26px; height: 26px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; color: var(--tx); }
.search-clear[hidden] { display: none; }
.filters { display: flex; gap: 6px; overflow-x: auto; margin: 10px calc(var(--pad) * -1) 0; padding: 2px var(--pad) 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .03); color: var(--mut); font: 500 13px/1 var(--text); cursor: pointer; white-space: nowrap; }
.fchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.fchip.on { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); font-weight: 600; }
.fchip.on i { background: var(--on-gold); }
.fsep { flex: none; width: 1px; margin: 6px 2px; background: var(--line2); }
.results-head { display: flex; justify-content: space-between; align-items: center; margin: 12px 2px 8px; font-size: 13px; color: var(--mut); }
.results-head:empty { display: none; }
.results-head button { border: 0; background: none; color: var(--gold2); font-weight: 600; cursor: pointer; padding: 4px 0; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mini { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.mini:active { transform: scale(.99); }
.mini-cover { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; }
.mini-cover .cover { position: absolute; inset: 0; }
.mini-text { min-width: 0; display: grid; gap: 3px; padding-right: 22px; }
.mini-text b { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-text small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); }
.mini-text small i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.st { font-style: normal; font-size: 12px; font-weight: 600; }
.st-new, .st-started { color: var(--gold2); }
.st-seen { color: var(--mint); }
.st-soon { color: var(--mut); }
.help-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.help-link svg { width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Аккаунт */
.acc-head { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; margin: 4px 0 16px; }
.avatar-lg { width: 84px; height: 84px; font-size: 28px; }
.acc-name { margin: 0 0 6px; font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.acc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 14px; }
.acc-tabs button { min-height: 40px; border: 0; border-radius: 12px; background: none; color: var(--mut); font-weight: 600; font-size: 14px; cursor: pointer; }
.acc-tabs button[aria-selected="true"] { background: var(--gold-grad); color: var(--on-gold); }
.acc-pane[hidden] { display: none; }
.form { display: grid; gap: 14px; }
.fill { padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); --c: var(--gold); }
.fill .row { display: grid; gap: 2px; margin-bottom: 10px; font-weight: 600; }
.fill small { font-weight: 400; color: var(--mut); font-size: 13px; }
.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-btns { display: grid; gap: 8px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--mut); font-weight: 500; }
.field input, .field textarea, .hobby-add input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--tx); font: 16px/1.4 var(--text); outline: none; resize: vertical; }
.field input:focus, .field textarea:focus, .hobby-add input:focus { border-color: rgba(226, 184, 87, .6); }
.hobbies { display: flex; flex-wrap: wrap; gap: 6px; }
.hobby-add { display: flex; gap: 8px; margin-top: 4px; }
.hobby-add .btn { flex: none; }
.hist-day { margin: 16px 2px 8px; font-size: 13px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.hist-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--mut); font-size: 18px; line-height: 1; cursor: pointer; }
.danger-link { display: block; margin: 18px auto 0; border: 0; background: none; color: #ff8f8f; font-size: 14px; cursor: pointer; padding: 8px; }

/* Помощь */
.care { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-radius: 22px; background: radial-gradient(80% 120% at 0% 0%, rgba(47, 224, 170, .16), transparent 70%), var(--card); border: 1px solid var(--line2); }
.care-title { margin: 0; font: 700 18px/1.2 var(--display); }
.care-sub { margin: 4px 0 0; color: var(--mut); font-size: 13px; }
.care .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.acc-list { display: grid; gap: 8px; }
.acc-list details, .policy { border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.acc-list summary, .policy summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 56px; padding: 12px 16px; font-weight: 600; font-size: 15px; }
.acc-list summary::-webkit-details-marker, .policy summary::-webkit-details-marker { display: none; }
.acc-list summary::after, .policy summary::after { content: '+'; flex: none; color: var(--gold); font-size: 22px; transition: transform .25s var(--ease); }
.acc-list details[open] summary::after, .policy[open] summary::after { transform: rotate(45deg); }
.acc-list details p { margin: 0; padding: 0 16px 16px; color: var(--mut); font-size: 15px; }
.rules { padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.rules p { margin: 0; color: var(--mut); }
.rules ol { margin: 12px 0; padding-left: 22px; display: grid; gap: 10px; }
.rules li::marker { color: var(--gold); font-weight: 700; }
.rules b { color: var(--tx); }
#policy { padding: 0 16px 16px; }
#policy h3 { margin: 14px 0 4px; font-size: 15px; }
#policy p { margin: 0; color: var(--mut); font-size: 14px; }

/* Оффлайн-встречи */
.meet { padding: 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.meet.big { border-color: rgba(226, 184, 87, .5); background: radial-gradient(80% 120% at 100% 0%, rgba(226, 184, 87, .14), transparent 70%), var(--card); }
.meet.past { opacity: .65; }
.meet-when { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--gold2); }
.tag-soon, .tag-past { padding: 2px 10px; border-radius: 99px; font-size: 12px; }
.tag-soon { background: var(--gold-grad); color: var(--on-gold); }
.tag-past { background: rgba(255, 255, 255, .08); color: var(--mut); }
.meet-title { margin: 8px 0 4px; font: 700 19px/1.25 var(--display); letter-spacing: -.02em; }
.meet-sub, .meet-place { margin: 2px 0 0; color: var(--mut); font-size: 14px; }
.meet-place { color: var(--tx); }
.meet-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.meet-btns .btn { flex: 1 1 auto; }
.locked-box { padding: 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line2); display: grid; gap: 10px; }
.locked-box b { font: 700 17px/1.3 var(--display); }
.locked-box p { margin: 0; color: var(--mut); font-size: 14px; }
.locked-box .btn { justify-self: start; }

/* Комментарии */
.comments { padding-bottom: 14px; }
.comments-empty { margin: 0; color: var(--mut); font-size: 14px; }
.comments-open { width: 100%; margin-top: 10px; }
.comments iframe { width: 100% !important; border-radius: 12px; }
#fav-courses-wrap[hidden], #continue[hidden], .h2[hidden] { display: none; }
.hscroll { scroll-padding-inline: var(--pad); }
.mini:has(.hist-del) .mini-text { padding-right: 34px; }

/* ===== Премиальный фон ===== */
/* Слой 1 — свечения (медленно «дышат»), слой 2 — орнамент из восьмиконечных звёзд, крупная звезда и зерно */
body { background: #020906; }
body::before, body::after { content: ''; position: fixed; pointer-events: none; z-index: 0; }
body::before {
  inset: -15%;
  background:
    radial-gradient(38% 26% at 82% 8%, rgba(47, 224, 170, .24), transparent 70%),
    radial-gradient(30% 22% at 8% 30%, rgba(226, 184, 87, .14), transparent 70%),
    radial-gradient(45% 30% at 75% 78%, rgba(18, 120, 88, .22), transparent 72%),
    radial-gradient(35% 25% at 15% 92%, rgba(226, 184, 87, .08), transparent 70%),
    linear-gradient(180deg, #05160f 0%, #030c09 55%, #020806 100%);
  animation: glow-drift 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes glow-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3%, 2%, 0) scale(1.05); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.02); }
}
body::after {
  inset: 0;
  background-image:
    /* крупная золотая звезда-контур за верхом экрана */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-110 -110 220 220'%3E%3Cg fill='none' stroke='%23e2b857' stroke-opacity='.3' stroke-width='.6'%3E%3Cpath d='M0,-100 29.3,-70.7 70.7,-70.7 70.7,-29.3 100,0 70.7,29.3 70.7,70.7 29.3,70.7 0,100 -29.3,70.7 -70.7,70.7 -70.7,29.3 -100,0 -70.7,-29.3 -70.7,-70.7 -29.3,-70.7Z'/%3E%3Cpath d='M0,-80 23.4,-56.6 56.6,-56.6 56.6,-23.4 80,0 56.6,23.4 56.6,56.6 23.4,56.6 0,80 -23.4,56.6 -56.6,56.6 -56.6,23.4 -80,0 -56.6,-23.4 -56.6,-56.6 -23.4,-56.6Z' stroke-opacity='.1'/%3E%3Ccircle r='46' stroke-opacity='.08'/%3E%3C/g%3E%3C/svg%3E"),
    /* орнамент: решётка восьмиконечных звёзд */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%2396ffdc' stroke-opacity='.1' stroke-width='1'%3E%3Cpath d='M44 18l7.6 10.4H64v12.4L74 44l-10 7.6V64H51.6L44 74l-7.6-10H24V51.6L14 44l10-7.6V28.4h12.4z'/%3E%3Cpath d='M0 0l14 14M88 0L74 14M0 88l14-14M88 88L74 74'/%3E%3C/g%3E%3C/svg%3E"),
    /* зерно */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat, repeat;
  background-size: min(115vw, 720px) auto, 88px 88px, 140px 140px;
  background-position: calc(50% + min(38vw, 240px)) -120px, center top, 0 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .15) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .15) 100%);
  opacity: .9;
}
.app { position: relative; z-index: 1; }

/* Полупрозрачные карточки, чтобы фон просвечивал */
:root { --card: rgba(9, 24, 18, .78); }
.profile, .next-card, .cal, .quick-ico, .lesson, .day-row, .progress-total, .progress-list li, .mini, .help-link,
.fill, .rules, .acc-list details, .policy, .meet, .locked-box, .search, .acc-tabs {
  border-color: rgba(150, 255, 220, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.profile { background: linear-gradient(120deg, rgba(226, 184, 87, .1), transparent 45%), var(--card); }
.tabbar { background: rgba(6, 18, 13, .86); }

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

/* Замок: направление без доступа (включается режимом access.mode = "paid") */
.lock-ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex: none; }
.lock-badge { display: inline-flex; align-items: center; gap: 5px; }
.feed > .locked-box { list-style: none; }
.locked-box .lock-ico { width: 26px; height: 26px; color: var(--gold); }

/* ===== Компактный вид для телефона: меньше масштаб, легче главный экран ===== */
@media (max-width: 600px) {
  :root { --pad: 14px; }
  body { font-size: 15px; }
  .app { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .top { height: 50px; }
  .wordmark { font-size: 15px; letter-spacing: .22em; }
  .back { height: 34px; font-size: 14px; }
  .h1 { font-size: 22px; margin: 4px 0 14px; }
  .h2 { font-size: 12px; margin: 20px 0 10px; letter-spacing: .04em; }

  /* профиль — одной строкой */
  .profile { grid-template-columns: 42px 1fr auto; gap: 10px; padding: 10px 12px; border-radius: 18px; }
  .profile .avatar { width: 42px; height: 42px; font-size: 15px; }
  .profile-name { font-size: 15px; margin-bottom: 3px; }
  .profile-sub { font-size: 12px; gap: 6px; }
  .pill { font-size: 11px; padding: 2px 8px; }
  .chev { width: 18px; height: 18px; }

  /* урок и календарь */
  .duo { gap: 8px; margin-top: 8px; }
  .next-card, .cal { border-radius: 18px; }
  .next-card .cover { aspect-ratio: 16 / 8; }
  .next-body { padding: 8px 10px 10px; gap: 2px; }
  .next-label { font-size: 11px; }
  .next-title { font-size: 13px; -webkit-line-clamp: 2; }
  .next-meta { font-size: 11px; }
  .cal { padding: 8px 8px 8px; }
  .cal-head { margin-bottom: 2px; }
  .cal-title { font-size: 12px; }
  .cal-nav button { width: 22px; height: 22px; }
  .cal-nav svg { width: 12px; height: 12px; }
  .cal-wd { font-size: 9px; padding: 1px 0; }
  .cal-day { height: 23px; padding-top: 2px; font-size: 11px; border-radius: 6px; }
  .cal-day.has::after { width: 4px; height: 4px; margin-left: -2px; bottom: 2px; }

  /* быстрые плитки — ниже и легче */
  .quick { gap: 8px; margin-top: 8px; }
  .quick-item { gap: 6px; }
  .quick-ico { aspect-ratio: 2.1; border-radius: 16px; }
  .quick-ico svg { width: 30px; height: 30px; }
  .quick-label { font: 600 11px/1.25 var(--text); text-transform: none; }
  .quick-badge { top: 5px; right: 5px; font-size: 9px; }

  /* плитки направлений — ниже, подписи мельче */
  .tiles { gap: 8px; }
  .tile { aspect-ratio: 1.35; border-radius: 18px; }
  .tiles li:last-child:nth-child(odd) .tile { aspect-ratio: 2.8; }
  .tile-name { left: 12px; right: 12px; bottom: 10px; }
  .tile-name b { font-size: 12px; }
  .tile-name span { font-size: 14px; }
  .tile .soon { font-size: 10px; padding: 3px 8px; top: 8px; right: 8px; }
  .tile-fav { width: 30px; height: 30px; top: 8px; left: 8px; }
  .tile-fav svg { width: 15px; height: 15px; }

  /* продолжить, поиск */
  .cont { flex-basis: 52%; }
  .cont b { font-size: 13px; }
  .search { min-height: 44px; border-radius: 14px; }
  .search input { height: 42px; font-size: 15px; }
  .fchip { min-height: 32px; padding: 0 11px; font-size: 12px; }
  .mini { grid-template-columns: 80px minmax(0, 1fr); padding: 7px; gap: 10px; }
  .mini-text b { font-size: 13px; }
  .help-link { margin-top: 18px; padding: 13px 14px; font-size: 14px; border-radius: 16px; }

  /* ленты уроков */
  .course-head h1 { font-size: 20px; }
  .course-head p { font-size: 13px; }
  .course-head .count b { font-size: 18px; }
  .feed { gap: 10px; }
  .lesson { padding: 12px; border-radius: 20px; }
  .lesson-top { margin-bottom: 10px; }
  .lesson-title { font-size: 15px; }
  .lesson-date { font-size: 12px; }
  .heart { font-size: 11px; gap: 6px; }
  .heart i { width: 34px; height: 34px; }
  .heart svg { width: 17px; height: 17px; }
  .play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .play svg { width: 18px; height: 18px; }
  .mat-btn { min-height: 40px; font-size: 13px; }

  /* расписание и аккаунт */
  .cal-big { padding: 12px; }
  .cal-big .cal-day { height: 38px; padding-top: 7px; font-size: 14px; }
  .day-row { grid-template-columns: 46px 1fr auto; padding: 10px 12px 10px 8px; gap: 10px; }
  .day-row .d b { font-size: 17px; }
  .day-row .t { font-size: 14px; }
  .acc-head { grid-template-columns: 64px 1fr; gap: 12px; }
  .avatar-lg { width: 64px; height: 64px; font-size: 22px; }
  .acc-name { font-size: 18px; }

  /* нижняя панель — тоньше */
  .tabbar { padding: 4px; border-radius: 22px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a { padding: 6px 0 5px; font-size: 11px; gap: 2px; border-radius: 18px; }
  .tabbar svg { width: 21px; height: 21px; }
}

/* ================================================================
   Быстрые разделы — премиальные иконки в золотом медальоне
   ================================================================ */
.quick-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.quick-ico {
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(226, 184, 87, .11), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 60%),
    var(--card);
  border-color: rgba(226, 184, 87, .16);
  box-shadow: inset 0 1px 0 rgba(244, 217, 138, .08), 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease), border-color .25s, box-shadow .25s;
}
.quick-ico svg {
  box-sizing: border-box; width: 62px; height: 62px; padding: 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, rgba(244, 217, 138, .16), rgba(226, 184, 87, .03) 62%, transparent 72%), #07140f;
  border: 1px solid rgba(226, 184, 87, .38);
  box-shadow: 0 0 0 5px rgba(226, 184, 87, .045), inset 0 1px 0 rgba(251, 231, 168, .22), 0 8px 22px rgba(0, 0, 0, .45);
  transition: box-shadow .3s, border-color .3s;
}
.quick-item:hover .quick-ico { border-color: rgba(226, 184, 87, .34); }
.quick-item:hover .quick-ico svg { border-color: rgba(244, 217, 138, .6); box-shadow: 0 0 0 5px rgba(226, 184, 87, .07), 0 0 26px rgba(226, 184, 87, .22), inset 0 1px 0 rgba(251, 231, 168, .3); }
.quick-label { font: 600 10px/1.35 var(--display); letter-spacing: .08em; color: #e9e2cf; hyphens: manual; overflow-wrap: normal; word-break: normal; }

/* ================================================================
   Помощь на главной: два пункта + служба заботы внизу
   ================================================================ */
.help-block { margin-top: 8px; }
.help-rows { display: grid; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid rgba(150, 255, 220, .13); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.help-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; transition: background .2s; }
.help-row + .help-row { border-top: 1px solid rgba(150, 255, 220, .09); }
.help-row:hover { background: rgba(226, 184, 87, .05); }
.help-medal { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 28%, rgba(244, 217, 138, .16), rgba(226, 184, 87, .03) 62%), #07140f;
  border: 1px solid rgba(226, 184, 87, .34); box-shadow: inset 0 1px 0 rgba(251, 231, 168, .2); }
.help-medal svg { width: 22px; height: 22px; }
.help-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.help-text b { font-size: 15px; font-weight: 600; }
.help-text small { font-size: 13px; color: var(--mut); }
.help-chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.care-home { margin-top: 10px; }
#sec-faq, #sec-rules, #sec-care { scroll-margin-top: 80px; }

/* ================================================================
   Карточки уроков — светлая рамка с обложкой, материалы ниже
   ================================================================ */
.lesson { padding: 0; overflow: hidden; background: #0d1813; border: 1px solid rgba(255, 255, 255, .08); }
.lesson-frame { padding: 16px; border-radius: 24px; background: #eceeec; color: #111813; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset; }
.lesson-top { align-items: flex-start; }
.lesson-title { color: #111813; font-size: 17px; }
.lesson-date { color: #6b7570; }
.lesson .heart { color: #7c8580; }
.lesson .heart i { background: #141a17; border: 0; }
.lesson-cover { border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.lesson.locked .lesson-frame { background: #dfe2e0; }
.lesson .mat-btn { width: auto; margin: 12px 14px 14px; background: rgba(255, 255, 255, .06); min-height: 48px; }

@media (max-width: 600px) {
  .quick-ico svg { width: 46px; height: 46px; padding: 10px; box-shadow: 0 0 0 3px rgba(226, 184, 87, .045), inset 0 1px 0 rgba(251, 231, 168, .22), 0 6px 16px rgba(0, 0, 0, .4); }
  .quick-label { font: 600 11px/1.25 var(--text); letter-spacing: 0; text-transform: none; }
  .help-row { gap: 12px; padding: 12px 14px; }
  .help-medal { width: 38px; height: 38px; }
  .help-medal svg { width: 20px; height: 20px; }
  .help-text b { font-size: 14px; }
  .help-text small { font-size: 12px; }
  .lesson { padding: 0; border-radius: 20px; }
  .lesson-frame { padding: 14px; border-radius: 20px; }
  .lesson-title { font-size: 15px; }
  .lesson .mat-btn { margin: 10px 12px 12px; min-height: 42px; }
}

/* ================================================================
   Плеер — название, избранное и видео в белой рамке
   ================================================================ */
.player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.player-head .player-meta { min-width: 0; }
.player-frame { padding: 16px; border-radius: 24px; background: #eceeec; color: #111813; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 12px 32px rgba(0, 0, 0, .35); }
.player-frame .player-top { align-items: flex-start; margin-bottom: 14px; }
.player-frame .player-title { margin: 0; color: #111813; font-size: 18px; }
.player-frame .player-screen { margin-inline: 0; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.player-heart { color: #7c8580; }
.player-heart i { background: #141a17; border: 0; }
.player-heart svg { fill: none; stroke: var(--gold); }
.player-heart[aria-pressed="true"] svg { fill: var(--gold); }

@media (max-width: 600px) {
  .player-frame { padding: 14px; border-radius: 20px; }
  .player-frame .player-title { font-size: 16px; }
  .player-frame .player-top { margin-bottom: 12px; }
}
