/* ═══════════════════════════════════════════════
   APP NAVIGATION — Sidebar (desktop) + Tabbar (mobile)
   Scroll-triggered, GPU-only transitions (no layout shifts)
═══════════════════════════════════════════════ */

/* ── Sidebar ───────────────────────────────────────── */
.app-sidebar {
  visibility: visible;
  position: fixed;
  left: 10px; top: 10px; bottom: 10px;
  width: 210px;
  z-index: 900;
  background:
    linear-gradient(180deg, rgba(28, 38, 58, 0.50) 0%, rgba(7, 9, 15, 0.64) 48%, rgba(8, 9, 14, 0.76) 100%);
  backdrop-filter: blur(34px) saturate(150%);
  -webkit-backdrop-filter: blur(34px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 16px;
  transform: translateX(-100%);
  transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  overflow: hidden;
}

.app-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 5%, rgba(107, 145, 255, 0.14), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(255, 255, 255, 0.06), transparent 36%);
  pointer-events: none;
}

.app-sidebar.nav-visible {
  transform: translateX(0);
}

/* Glow edge when visible */
.app-sidebar.nav-visible::after {
  content: '';
  position: absolute;
  top: 0; right: -1px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255,255,255,0.08) 30%,
    rgba(255,255,255,0.06) 70%,
    transparent 100%);
}

/* Brand */
.sidebar-head { padding: 0 10px; margin-bottom: 22px; position: relative; z-index: 1; }

.sidebar-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}

.sidebar-logo-img {
  width: 30px; height: 30px;
  object-fit: contain;
  filter: brightness(1.15);
}

.sidebar-logo-wordmark {
  width: 108px;
  height: auto;
  filter: brightness(1.2);
}

.sidebar-brand-name {
  color: rgba(255,255,255,.86);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: lowercase;
  font-family: 'Inter', sans-serif;
}

/* Nav items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  z-index: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
  position: relative;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.92);
  transform: translateX(1px);
}

.sidebar-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.075));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 10px 28px rgba(0, 0, 0, 0.20);
  color: #fff;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -1px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 18px;
  background: rgba(255,255,255,0.68);
  border-radius: 999px;
}

.sidebar-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-icon svg { width: 18px; height: 18px; opacity: .9; }

.sidebar-label { line-height: 1; }

/* Spacer pushes footer down */
.sidebar-flex-grow {
  flex: 1;
  min-height: 18px;
  position: relative;
  z-index: 1;
}

/* Footer */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-account-wrap .sidebar-item {
  border: 1px solid rgba(255, 255, 255, 0.088);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
}

.sidebar-account-wrap .sidebar-item:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-account-wrap .sidebar-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.16);
}

/* Motivational promo card */
.sidebar-promo {
  margin-top: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 16px;
  padding: 13px 12px;
  position: relative;
  overflow: hidden;
}

.sidebar-promo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left,
    rgba(255,255,255,0.04) 0%,
    transparent 65%);
  pointer-events: none;
}

.sidebar-promo-title {
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 5px;
  font-family: 'Inter', sans-serif;
}

.sidebar-promo-desc {
  color: rgba(255,255,255,.40);
  font-size: 10.5px;
  line-height: 1.55;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

/* ── Hide sidebar on mobile ──────────────────────────── */
@media (max-width: 768px) {
  .app-sidebar { display: none !important; }

  body:not(.account-page) footer.footer,
  body:not(.account-page) footer.footer.app-injected-footer {
    display: none !important;
  }

  /* Футер из nav.js — запас над фиксированным таб-баром (по умолчанию уменьшен, увеличен только на странице профиля) */
  footer.footer.app-injected-footer {
    padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.account-page footer.footer.app-injected-footer {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* ── Tab Bar ─────────────────────────────────────────── */
.app-tabbar {
  display: flex !important; /* Показывается по умолчанию на мобильных */
  visibility: visible;
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 900;
  background:
    linear-gradient(180deg, rgba(28, 38, 58, 0.50) 0%, rgba(7, 9, 15, 0.70) 100%);
  backdrop-filter: blur(34px) saturate(150%);
  -webkit-backdrop-filter: blur(34px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  align-items: center;
  justify-content: space-around;
  padding: 8px;
  transform: translateY(110%);
  opacity: 1;
  transition:
    transform 0.34s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease;
  will-change: transform;
  overflow: hidden;
}

.app-tabbar.nav-visible {
  transform: translateY(0);
}

.access-prompt {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.access-prompt-card {
  width: min(420px, 100%);
  position: relative;
  border-radius: 26px;
  padding: 30px;
  min-height: 300px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045)),
    rgba(8,8,12,.82);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 34px 90px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.08);
  color: #fff;
  text-align: center;
}

.access-prompt-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.62);
  cursor: pointer;
  font-size: 18px;
}

.access-prompt-kicker {
  margin-bottom: 12px;
  color: rgba(255,255,255,.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.access-prompt-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -.5px;
}

.access-prompt-card p {
  margin: 0 0 22px;
  color: rgba(255,255,255,.55);
  font-size: 14px;
  line-height: 1.6;
}

.access-prompt-primary {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: #fff;
  color: #050506;
  font: 700 14px/1 Inter, sans-serif;
  cursor: pointer;
}

.lesson-item.locked,
.lesson-row.locked {
  opacity: .58;
  cursor: pointer;
}

.lesson-item.locked .lesson-number,
.lesson-row.locked .l-num {
  color: transparent !important;
  position: relative;
}

.lesson-item.locked .lesson-number::after,
.lesson-row.locked .l-num::after {
  content: '⌁';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.62);
  font-size: 14px;
}

.lesson-lock-note {
  display: inline-flex;
  width: fit-content;
  margin-left: auto;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}

.watermark {
  left: auto !important;
  right: 14px !important;
  top: 14px !important;
  opacity: .38 !important;
}

.watermark img {
  height: 22px !important;
}

.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.48);
  font-family: 'Inter', sans-serif;
  padding: 7px 3px 6px;
  border-radius: 18px;
  transition: color 0.15s, background .15s, box-shadow .15s;
  min-width: 0;
  flex: 1;
  max-width: 68px;
  -webkit-tap-highlight-color: transparent;
}

.tabbar-item.active {
  color: #fff;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.18), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.055));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 10px 28px rgba(0,0,0,.22);
}

.tabbar-item.active .tabbar-icon-wrap {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,.16);
}

.tabbar-icon-wrap {
  width: 38px;
  height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color .15s, transform .15s;
}

.tabbar-icon-wrap svg {
  width: 21px;
  height: 21px;
  display: block;
  stroke-width: 1.85;
}

.tabbar-label {
  font-size: 8.2px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.01em;
}

.tabbar-item-shorts .tabbar-icon-wrap {
  justify-content: center;
}

.tabbar-item-shorts .tabbar-icon-wrap svg {
  display: block;
  transform: translateX(-0.5px);
}

.tabbar-item-shorts.tabbar-item.active .tabbar-icon-wrap {
  margin-inline: auto;
}

/* Шесть вкладок: компактнее, чтобы всё помещалось */
@media (max-width: 768px) {
  .app-tabbar .tabbar-item {
    max-width: 56px;
    padding: 6px 2px 5px;
    gap: 3px;
  }

  .app-tabbar .tabbar-icon-wrap {
    width: 34px;
    height: 28px;
  }

  .app-tabbar .tabbar-label {
    font-size: 7.5px;
    letter-spacing: -.02em;
  }
}

/* ── Mobile top glass header ─────────────────────────── */
.app-mobile-header {
  visibility: visible;
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  right: auto;
  z-index: 901;
  width: min(600px, calc(100vw - 28px));
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(28, 38, 58, 0.38), rgba(7, 9, 15, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.105);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  box-shadow:
    0 14px 46px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.11);
  transform: translate(-50%, 0);
  transition:
    transform .24s cubic-bezier(.4, 0, .2, 1),
    opacity .2s ease;
  will-change: transform;
}

/* Shared header back button */
.ai-header-back {
  grid-column: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 40% 20%, rgba(255,255,255,.18), transparent 52%),
    rgba(255,255,255,.06);
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ai-header-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .app-mobile-header.has-back-button {
    display: grid !important;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
  }

  .app-mobile-header.has-back-button .mobile-header-brand {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .app-mobile-header.has-back-button .mobile-header-actions {
    grid-column: 3;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .back-link-glass {
    display: none !important;
  }
}

.app-mobile-header.mobile-header-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
}

.mobile-header-logo {
  width: 84px;
  height: auto;
  display: block;
  filter: brightness(1.18);
}

.mobile-login-btn {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.86);
  border-radius: 999px;
  padding: 7px 13px;
  font: 600 12px/1 Inter, sans-serif;
}

.mobile-profile-dot {
  width: 29px;
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.105), rgba(255,255,255,.045));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    0 10px 26px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,255,255,.16);
  text-decoration: none;
  overflow: hidden;
}

.mobile-profile-avatar {
  position: relative;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: block;
  background: rgba(255,255,255,.055);
}

.mobile-avatar-head {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.82);
  box-shadow: 0 0 14px rgba(255,255,255,.18);
}

.mobile-avatar-body {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 13px;
  height: 7px;
  border-radius: 12px 12px 6px 6px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.62);
}

.mobile-profile-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ── Desktop: sidebar is permanent, content is fixed beside it ── */
@media (min-width: 769px) {
  .app-sidebar {
    transform: translateX(0) !important;
  }
  .app-sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: -1px; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom,
      transparent 0%,
      rgba(255,255,255,0.08) 30%,
      rgba(255,255,255,0.06) 70%,
      transparent 100%);
  }
  body {
    padding-left: 0;
  }

  .main-content,
  .footer-content,
  .footer-bottom,
  .profile-wrap {
    width: calc(100vw - 232px);
    max-width: none;
    margin-left: 232px !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  /* Today: beside sidebar, remove default padding so cards reach full width */
  body.home-today-active .main-content {
    width: calc(100vw - 232px) !important;
    margin-left: 232px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Splash / Onboarding: full-screen overlay, ignore sidebar */
  body.home-first-run-active .main-content,
  body.home-splash-active .main-content {
    width: 100vw !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .hero,
  .profiling-hero {
    width: 100% !important;
    margin-left: 0 !important;
    box-sizing: border-box;
  }

  body > .hero,
  body > .profiling-hero {
    width: calc(100vw - 232px) !important;
    max-width: none;
    margin-left: 232px !important;
    margin-right: 0 !important;
  }

  .main-content > .hero,
  .main-content > .profiling-hero {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .hero::before,
  .profiling-hero::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 220px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0,0,0,.74) 0%, rgba(0,0,0,.34) 42%, rgba(0,0,0,0) 100%);
  }

  .hero-content,
  .profiling-hero-content {
    position: relative;
    z-index: 2;
  }

  .course-sidebar,
  .sidebar {
    position: static !important;
    top: auto !important;
  }

  .hero:not(.hero-courses) .hero-content {
    transform: translateX(-4vw);
  }

  .hero-actions {
    display: none !important;
  }
}

/* ── Hide tabbar on desktop ──────────────────────────── */
@media (min-width: 769px) {
  .app-tabbar { display: none !important; }
}

@media (max-width: 768px) {
  .app-mobile-header { display: flex; }
  body.no-app-hero { padding-top: 52px; }
  body.has-app-hero { padding-top: 0; }
  body.home-first-run-active,
  body.home-splash-active {
    padding-top: 0 !important;
  }
  .hero-actions { display: none !important; }
  .app-tabbar.nav-visible { transform: translateY(0); }

  body.program-search-focused .app-tabbar.nav-visible {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 34px));
  }

  .hero,
  .profiling-hero {
    margin-top: 0 !important;
  }

  .hero-courses {
    margin-top: 0 !important;
    min-height: clamp(330px, 43vh, 430px) !important;
    padding-top: calc(138px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 22px !important;
    background-position: center top !important;
    background-size: cover !important;
  }

  .hero:not(.hero-courses) {
    padding-top: 150px !important;
    padding-bottom: 68px !important;
    min-height: clamp(500px, 70vh, 660px) !important;
    background-position: center top, center top !important;
    background-size: auto, auto 152% !important;
    background-repeat: no-repeat !important;
  }

  .hero-content,
  .profiling-hero-content {
    position: relative;
    z-index: 2;
  }

  /* Mobile video/course layout: player first, lessons as normal content */
  .geshtalt-page,
  .marathon-page {
    padding: 18px 14px 28px !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .week-page,
  .main-content > div[style*="max-width:1280px"] {
    padding-top: 18px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: 28px !important;
  }

  .course-back-wrap {
    display: inline-flex !important;
    position: fixed !important;
    top: calc(132px + env(safe-area-inset-top, 0px)) !important;
    left: 14px !important;
    z-index: 980 !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transform: translateY(-8px) !important;
    transition: opacity .22s ease, transform .22s ease !important;
  }

  .course-back-wrap .back-link-glass {
    transform: none !important;
    transform-origin: left top !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  .course-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  .course-main {
    min-width: 0 !important;
    gap: 18px !important;
  }

  .video-container,
  .single-video-wrap,
  .player-video-wrap {
    border-radius: 20px !important;
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    overflow: hidden !important;
    clip-path: inset(0 round 20px) !important;
    -webkit-mask-image: -webkit-radial-gradient(#fff, #000) !important;
  }

  .video-loader {
    display: none !important;
  }

  .course-sidebar,
  .sidebar {
    order: 2 !important;
    position: static !important;
    margin-top: 4px !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 12px !important;
    border-radius: 22px !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)) !important;
    border: 1px solid rgba(255,255,255,.095) !important;
    box-shadow:
      0 18px 55px rgba(0,0,0,.34),
      inset 0 1px 0 rgba(255,255,255,.08) !important;
    backdrop-filter: blur(22px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(135%) !important;
  }

  .sidebar-header {
    padding: 2px 2px 10px !important;
    margin-bottom: 6px !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
    background: transparent !important;
  }

  .lessons-list,
  .week-lessons {
    max-height: none !important;
    overflow: visible !important;
  }

  .lesson-item {
    padding: 13px 10px !important;
    border-radius: 14px !important;
    border-bottom: 0 !important;
    gap: 12px !important;
  }

  .lesson-item + .lesson-item {
    margin-top: 4px !important;
  }

  .lesson-item.active {
    border-left: 0 !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.055)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.10),
      0 10px 28px rgba(0,0,0,.18) !important;
  }

  .lesson-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.35 !important;
  }

  .week-group {
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
  }

  .week-header,
  .week-toggle {
    padding: 14px 10px !important;
    border-radius: 14px !important;
  }

  .week-group.open .week-header,
  .week-group.open .week-toggle {
    background: rgba(255,255,255,.055) !important;
  }

  .back-link-glass {
    display: inline-flex !important;
    position: fixed !important;
    top: calc(132px + env(safe-area-inset-top, 0px)) !important;
    left: 14px !important;
    z-index: 980 !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    font-size: 0 !important;
    color: rgba(255,255,255,.88) !important;
    background:
      radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 34%),
      linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05)) !important;
    border: 1px solid rgba(255,255,255,.15) !important;
    box-shadow:
      0 12px 34px rgba(0,0,0,.34),
      inset 0 1px 0 rgba(255,255,255,.14) !important;
    backdrop-filter: blur(22px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(140%) !important;
    pointer-events: auto !important;
    opacity: 0 !important;
    transform: translateY(-8px) !important;
    transition: opacity .22s ease, transform .22s ease !important;
  }

  body.mobile-scrolled .back-link-glass {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .back-link-glass svg {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    display: block !important;
    transform: translateX(-1px) !important;
  }

  .now-playing {
    font-size: 13px !important;
    margin-top: 10px !important;
  }

  body:has(.ai-main) .app-tabbar {
    display: none !important;
  }

  body:has(.ai-main) .back-link-glass {
    position: fixed !important;
    margin: 0 !important;
  }

  body:has(.ai-main) .ai-back-mobile {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    font-size: 0 !important;
  }

  body:has(.ai-main) .ai-back-mobile svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    margin: 0 !important;
    transform: none !important;
  }

  .access-prompt {
    align-items: flex-end;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    background: rgba(0,0,0,.76);
  }

  .access-prompt-card {
    width: 100%;
    min-height: 330px;
    padding: 32px 24px 24px;
    border-radius: 26px;
    background:
      linear-gradient(180deg, rgba(27,27,31,.99), rgba(5,5,7,.98));
    box-shadow: 0 -18px 80px rgba(0,0,0,.72);
  }
}
