/* ============================================================
   СИСТЕМА МОЛОДЦОВ — Premium Design System
   Style: Framer / Rork / Apple (Dark Mode)
   ============================================================ */

:root, html {
  color-scheme: dark;
}

/* Prevent flash of legacy/raw navigation before nav.js/nav.css initializes */
.navbar,
.glass-tab-bar {
  display: none !important;
}

.app-tabbar {
  visibility: visible;
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px;
  border-radius: 24px;
  background: rgba(7, 9, 15, .74);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  backdrop-filter: blur(26px) saturate(140%);
  border: 1px solid rgba(255,255,255,.12);
  transform: translateY(110%);
}

.app-mobile-header {
  visibility: visible;
}

.app-sidebar {
  visibility: hidden;
}

.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: rgba(255,255,255,.48);
}

.tabbar-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tabbar-icon-wrap svg {
  display: block;
}

/* ── New UX: Intro / Onboarding / Today ─────────────────── */
.hidden {
  display: none !important;
}

html.home-boot-today #system-intro,
html.home-boot-today #onboarding-flow,
html.home-boot-first-run #today-screen,
html.home-boot-today .hero,
html.home-boot-today .home-hub-section,
html.home-boot-today #author,
html.home-boot-today .footer,
html.home-boot-first-run .hero,
html.home-boot-first-run .home-hub-section,
html.home-boot-first-run #author,
html.home-boot-first-run .footer {
  display: none !important;
}

body:not(.home-first-run-active) .system-intro-screen:not(.hidden),
body:not(.home-first-run-active) .onboarding-flow:not(.hidden),
body:not(.home-today-active) .today-screen:not(.hidden) {
  display: none !important;
}

.home-first-run-active .main-content,
.home-splash-active .main-content,
.home-today-active .main-content {
  width: 100vw !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.home-first-run-active,
.home-splash-active,
.home-onboarding-active:not(body.home-today-active) {
  height: 100svh;
  overflow: hidden !important;
  overscroll-behavior: none;
}

.home-first-run-active .main-content,
.home-splash-active .main-content {
  height: 100svh;
  overflow: hidden !important;
}

.home-first-run-active .system-intro-screen:not(.hidden) {
  display: grid;
}

.home-first-run-active .onboarding-flow:not(.hidden),
.home-today-active .today-screen:not(.hidden) {
  display: block;
}

.home-splash-active .navbar,
.home-splash-active .app-mobile-header,
.home-splash-active .app-sidebar,
.home-splash-active .app-tabbar {
  display: none !important;
}

.home-first-run-active .navbar,
.home-first-run-active .app-mobile-header,
.home-first-run-active .app-sidebar,
.home-first-run-active .app-tabbar {
  display: none !important;
}

.home-today-active .hero,
.home-today-active .home-hub-section,
.home-today-active #author,
.home-today-active .footer {
  display: none !important;
}

.system-splash {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.08), transparent 28%),
    #020306;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease, transform .7s ease;
}

.home-splash-active .system-splash {
  opacity: 1;
  pointer-events: auto;
}

.system-splash-logo {
  width: min(68vw, 440px);
  max-height: 180px;
  object-fit: contain;
  opacity: .96;
  transform: translateY(6px) scale(.98);
  animation: splashLogoIn 1.8s ease both;
}

.liza-tour {
  position: fixed;
  inset: 0;
  z-index: 5600;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}

.liza-tour.hidden {
  display: none !important;
}

.liza-tour-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(87,181,154,.18), transparent 34%),
    rgba(0,0,0,.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.liza-tour-card {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100svh - 28px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.14), transparent 44%),
    linear-gradient(180deg, rgba(18,25,31,.96), rgba(5,7,10,.98));
  box-shadow:
    0 34px 110px rgba(0,0,0,.62),
    inset 0 1px 0 rgba(255,255,255,.14);
  padding: clamp(18px, 4svh, 24px);
  color: #fff;
  text-align: center;
}

.liza-tour-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  color: rgba(255,255,255,.68);
  background: rgba(255,255,255,.07);
  font-size: 22px;
  line-height: 1;
}

.liza-device-card {
  width: min(128px, 34vw);
  height: min(244px, 34svh);
  min-height: 190px;
  margin: 0 auto clamp(14px, 3svh, 20px);
  padding: 6px;
  position: relative;
  border-radius: 30px;
  border: 2px solid rgb(40, 40, 40);
  background: #000;
  box-shadow: 2px 16px 50px rgba(0,0,0,.52);
}

.liza-device-screen {
  height: 100%;
  overflow: hidden;
  border-radius: 23px;
  background-image: linear-gradient(to right bottom, #8e8989, #ff004431, #5a3e4b, #262225, #2c0334, #ffffff, #6a6878, #c1d9ff, #003d94, #002e66, #001d3a, #020812);
  background-size: 220% 220%;
  animation: lizaDeviceGradient 5.5s ease-in-out infinite alternate;
}

.liza-device-hello {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: clamp(1.05rem, 5vw, 1.3rem);
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.liza-device-hello span {
  margin-top: 3px;
  opacity: .72;
  font-size: .74rem;
}

.liza-device-top {
  position: absolute;
  top: 0;
  right: 50%;
  width: 35%;
  height: 18px;
  transform: translateX(50%);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background: #010101;
}

.liza-device-speaker {
  position: absolute;
  top: 3px;
  right: 50%;
  width: 40%;
  height: 2px;
  transform: translateX(50%);
  border-radius: 2px;
  background: rgb(20,20,20);
}

.liza-device-camera {
  position: absolute;
  top: 6px;
  right: 84%;
  width: 6px;
  height: 6px;
  transform: translateX(50%);
  border-radius: 50%;
  background: rgba(255,255,255,.048);
}

.liza-device-camera div {
  position: absolute;
  width: 3px;
  height: 3px;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  border-radius: 50%;
  background: rgba(0,0,255,.212);
}

.liza-device-btn1,
.liza-device-btn2,
.liza-device-btn3 {
  position: absolute;
  width: 2px;
  right: -4px;
  background-image: linear-gradient(to right, #111, #222, #333, #464646, #595959);
}

.liza-device-btn1 { top: 30%; height: 45px; }
.liza-device-btn2,
.liza-device-btn3 { left: -4px; right: auto; height: 30px; transform: scale(-1); }
.liza-device-btn2 { top: 26%; }
.liza-device-btn3 { top: 36%; }

.liza-tour-kicker {
  margin: 0 0 8px;
  color: rgba(87,181,154,.9);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.liza-tour-copy h2 {
  margin: 0 0 9px;
  font-size: clamp(24px, 7vw, 31px);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.liza-tour-copy p:last-child {
  margin: 0 auto;
  max-width: 350px;
  color: rgba(255,255,255,.62);
  font-size: clamp(13px, 3.6vw, 14px);
  line-height: 1.45;
}

.liza-tour-actions {
  display: flex;
  gap: 10px;
  margin-top: clamp(16px, 3.2svh, 22px);
}

.liza-tour-actions button {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font: 850 14px/1 Inter, sans-serif;
}

.liza-tour-primary {
  color: #050506;
  background: #fff;
}

.liza-tour-secondary {
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.08);
}

@keyframes lizaDeviceGradient {
  from { background-position: 0% 0%; }
  to { background-position: 100% 100%; }
}

@keyframes splashLogoIn {
  0% { opacity: 0; transform: translateY(12px) scale(.96); filter: blur(8px); }
  45% { opacity: .96; filter: blur(0); }
  100% { opacity: .9; transform: translateY(0) scale(1); filter: blur(0); }
}

.home-onboarding-active .hero,
.home-onboarding-active .home-hub-section,
.home-onboarding-active #author,
.home-onboarding-active .footer {
  display: none !important;
}

.system-intro-screen,
.onboarding-flow,
.today-screen {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(96px, 12vw, 136px) 24px 96px;
}

.system-intro-screen {
  min-height: 100svh;
  width: 100vw;
  display: grid;
  place-items: center;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.06), transparent 28%),
    #000;
}

.auth-gateway-shell {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  border: 0;
  background: #000;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) clamp(20px, 5vw, 72px) max(34px, env(safe-area-inset-bottom));
}

.auth-gateway-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: min(58svh, 560px);
  background:
    linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.04) 52%, rgba(0,0,0,.72) 86%, #000 100%),
    url('/assets/webp/aut.webp') center top / cover no-repeat;
  pointer-events: none;
}

.auth-gateway-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(255,255,255,.055), transparent 18%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.06) 48%, rgba(0,0,0,.72) 92%);
  pointer-events: none;
}

.auth-gateway-panel {
  position: relative;
  z-index: 2;
  min-height: auto;
  width: min(100%, 760px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding-block: clamp(110px, 20svh, 180px) 0;
  transform: translateY(-14svh);
}

.auth-provider-panel {
  min-height: auto;
}

.auth-gateway-copy {
  width: min(100%, 760px);
  text-align: center;
}

.auth-gateway-logo {
  width: min(40vw, 178px);
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  filter: brightness(1.08);
}

.auth-gateway-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.045)),
    rgba(255,255,255,.05);
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 650;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 10px 28px rgba(0,0,0,.24);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.auth-gateway-copy h1,
.auth-gateway-copy h2 {
  max-width: 680px;
  margin: 22px auto 0;
  color: #fff;
  font-size: clamp(30px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 650;
}

.auth-gateway-copy h2 {
  font-size: clamp(28px, 4.2vw, 46px);
}

.auth-gateway-copy p {
  max-width: 520px;
  margin: 14px auto 0;
  color: rgba(255,255,255,.52);
  font-size: clamp(14px, 1.55vw, 18px);
  line-height: 1.42;
}

.auth-gateway-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.auth-gateway-dots span {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
}

.auth-gateway-dots span.active {
  width: 46px;
  background: rgba(255,255,255,.9);
}

.auth-gateway-actions {
  display: grid;
  gap: 10px;
  width: min(100%, 390px);
  margin: 4px auto 0;
}

.glass-back-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.045)),
    rgba(8,10,16,.22);
  color: rgba(255,255,255,.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 18px 42px rgba(0,0,0,.30);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
}

.glass-back-icon svg {
  width: 22px;
  height: 22px;
}

.glass-back-icon:active {
  transform: scale(.96);
}

.glass-back-icon:disabled {
  opacity: 0;
  pointer-events: none;
}

.auth-provider-panel .glass-back-icon {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 0;
  z-index: 4;
}

.ios-auth-button {
  min-height: 54px;
  width: 100%;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.02em;
  cursor: pointer;
  transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.ios-auth-button:active {
  transform: scale(.985);
}

.ios-auth-button:disabled {
  opacity: .55;
}

.auth-soon-button {
  opacity: .78 !important;
  cursor: default;
}

.auth-soon-button em {
  margin-left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.08);
  color: rgba(0,0,0,.58);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.ios-auth-button-primary {
  border: 0;
  color: #0b0b0d;
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(238,234,226,.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 16px 40px rgba(0,0,0,.34);
}

.ios-auth-button-secondary {
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.82);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
    rgba(0,0,0,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.yandex-id-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.yandex-id-mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fc3f1d;
  color: #fff;
  font-weight: 800;
  line-height: 1;
}

.auth-provider-panel .auth-gateway-copy {
  margin-top: 0;
}

.auth-gateway-actions .auth-error {
  min-height: 18px;
  margin: 0;
  color: rgba(255,130,130,.9);
  font-size: 12px;
  text-align: center;
}

.system-intro-orb {
  position: absolute;
  width: min(76vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, rgba(255,255,255,.2), transparent 24%),
    radial-gradient(circle at 60% 54%, rgba(140, 120, 255, .26), transparent 36%),
    radial-gradient(circle at 42% 64%, rgba(35, 200, 210, .18), transparent 40%);
  filter: blur(28px);
  opacity: .72;
  animation: heroImageDrift 16s ease-in-out infinite alternate;
}

.system-intro-card,
.onboarding-card,
.today-hero-card,
.today-main-card,
.today-checkin-card,
.today-support-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.13), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.028)),
    rgba(3, 5, 10, .36);
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  backdrop-filter: blur(34px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -1px 0 rgba(255,255,255,.045),
    0 30px 90px rgba(0,0,0,.32);
}

.system-intro-card {
  width: min(620px, 100%);
  padding: clamp(28px, 6vw, 50px);
  border-radius: 36px;
  text-align: center;
}

.system-intro-logo {
  width: min(48vw, 240px);
  height: auto;
  object-fit: contain;
  margin-bottom: 32px;
}

.system-intro-kicker {
  margin: 0 0 10px;
  color: rgba(255,255,255,.54);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.system-intro-card h1,
.today-hero-card h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 72px);
  line-height: .95;
  letter-spacing: -.06em;
}

.ux-button {
  --ux-button-bg: rgba(255,255,255,.08);
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.04)),
    var(--ux-button-bg);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.ux-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.28);
}

.ux-button:disabled {
  opacity: .42;
  cursor: default;
  transform: none;
}

.ux-button-primary {
  --ux-button-bg: rgba(255,255,255,.14);
}

.ux-button-secondary {
  --ux-button-bg: rgba(255,255,255,.045);
  color: rgba(255,255,255,.78);
}

.system-intro-card p:not(.system-intro-kicker) {
  max-width: 460px;
  margin: 18px auto 0;
  color: rgba(255,255,255,.66);
  line-height: 1.55;
}

.system-intro-actions,
.onboarding-actions,
.today-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.onboarding-flow {
  height: 100svh;
  min-height: 100svh;
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .onboarding-flow {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.onboarding-card {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 0;
  padding: max(12px, env(safe-area-inset-top)) 28px max(12px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: #07100E;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .onboarding-card {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.onboarding-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,255,255,.10), transparent 24%),
    linear-gradient(to bottom, rgba(0,0,0,.06), rgba(0,0,0,.40) 48%, #000 94%);
  z-index: 0;
}

.onboarding-topbar {
  flex-shrink: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 3;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.onboarding-back-link {
  position: static;
}

.onboarding-sheet {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: clamp(8px, 2svh, 18px) 0 max(54px, calc(54px + env(safe-area-inset-bottom)));
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.onboarding-sheet > .onboarding-progress-dots,
.onboarding-sheet > .hub-kicker,
.onboarding-sheet > h2,
.onboarding-sheet > p {
  flex-shrink: 0;
}

.onboarding-sheet > .onboarding-name-input {
  flex-shrink: 0;
}

.onboarding-actions {
  flex-shrink: 0;
  margin-top: auto;
}

.onboarding-progress-dots {
  display: flex;
  gap: 9px;
  margin: 2px 0 18px;
}

.onboarding-progress-dots span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  transition: width .2s ease, background .2s ease;
}

.onboarding-progress-dots span.active,
.onboarding-progress-dots span.done {
  background: rgba(255,255,255,.84);
}

.onboarding-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  margin-bottom: 28px;
  overflow: hidden;
}

.onboarding-progress span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(160,180,255,.78));
  transition: width .25s ease;
}

.onboarding-card h2 {
  margin: 0 0 8px;
  font-size: clamp(25px, 5.3vw, 34px);
  line-height: 1.1;
  letter-spacing: -.04em;
  color: #fff;
}

.onboarding-card p {
  color: rgba(255,255,255,.62);
  font-size: 14px;
  line-height: 1.38;
}

.onboarding-select-hint {
  margin: 20px 0 0;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.34) !important;
}

.onboarding-name-input {
  width: min(100%, 420px);
  min-height: 54px;
  margin: 14px auto 0;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.26);
  outline: none;
  color: rgba(255,255,255,.94);
  text-align: center;
  font: 700 17px/1 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.02em;
  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,.28), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.055)),
    rgba(12,14,18,.32);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  backdrop-filter: blur(20px) saturate(190%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -1px 0 rgba(255,255,255,.08),
    0 18px 46px rgba(0,0,0,.32);
}

.onboarding-name-input::placeholder {
  color: rgba(255,255,255,.38);
}

.onboarding-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 10px;
  flex: 1 1 0%;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.onboarding-options button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 125% 82% at 50% -12%, rgba(255,255,255,.28), transparent 54%),
    linear-gradient(168deg, rgba(255,255,255,.11), rgba(255,255,255,.028)),
    rgba(14,16,22,.14);
  color: rgba(255,255,255,.92);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 620;
  text-align: left;
  min-height: 50px;
  -webkit-backdrop-filter: blur(16px) saturate(165%) brightness(1.03);
  backdrop-filter: blur(16px) saturate(165%) brightness(1.03);
  box-shadow:
    0 14px 38px rgba(0,0,0,.26),
    inset 0 0 0 1px rgba(255,255,255,.055),
    inset 0 -14px 26px rgba(0,0,0,.09);
  -webkit-tap-highlight-color: transparent;
}

.onboarding-options button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255,255,255,.14), transparent 36%),
    linear-gradient(215deg, rgba(255,255,255,.06), transparent 40%);
  opacity: .48;
}

.onboarding-options button span {
  position: relative;
  z-index: 1;
  font-size: 14px;
}

.onboarding-options button i {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.28);
  flex: 0 0 auto;
  position: relative;
}

.onboarding-options button.active {
  background:
    radial-gradient(ellipse 125% 88% at 48% -10%, rgba(255,255,255,.42), transparent 50%),
    linear-gradient(168deg, rgba(255,255,255,.18), rgba(255,255,255,.055)),
    rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.38);
  color: #fff;
  box-shadow:
    0 18px 46px rgba(0,0,0,.30),
    inset 0 0 0 1px rgba(255,255,255,.11),
    inset 0 -16px 28px rgba(0,0,0,.08),
    0 0 0 1px rgba(255,255,255,.04);
}

.today-checkin-options button.active {
  background:
    radial-gradient(circle at 34% 0%, rgba(255,255,255,.22), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.045)),
    rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.34);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    0 12px 28px rgba(0,0,0,.28);
}

.onboarding-options button.active i {
  border-color: rgba(255,255,255,.92);
}

.onboarding-options button.active i::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: rgba(255,255,255,.92);
}

.onboarding-result-card {
  flex-shrink: 0;
  margin-top: 20px;
  min-height: clamp(230px, 34svh, 320px);
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.18);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-main);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 24px 72px rgba(0,0,0,.34);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.onboarding-result-card::before,
.onboarding-result-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
}

.onboarding-result-card::before {
  z-index: -2;
  background: var(--result-bg, url('/assets/webp/ai_back.webp')) center/cover no-repeat;
}

.onboarding-result-card::after {
  z-index: -1;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.14), transparent 30%),
    linear-gradient(180deg, rgba(5,5,6,.28) 0%, rgba(5,5,6,.36) 42%, rgba(5,5,6,.78) 76%, rgba(5,5,6,.99) 100%),
    linear-gradient(0deg, rgba(5,5,6,1) 0 48px, rgba(5,5,6,.86) 118px, rgba(5,5,6,0) 190px);
}

.onboarding-actions {
  margin-top: clamp(14px, 4svh, 34px);
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.onboarding-actions .ios-auth-button {
  position: relative;
  overflow: hidden;
  min-height: 52px;
  width: auto;
  min-width: 150px;
  box-sizing: border-box;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1;
  padding: 0 26px;
  border: 1px solid rgba(255,255,255,.38);
  color: rgba(255,255,255,.96);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.48) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.08) 100%),
    rgba(30,32,40,.18);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.60),
    inset 0 -1px 0 rgba(255,255,255,.12),
    0 12px 32px rgba(0,0,0,.28);
}

.onboarding-result-card span {
  display: block;
  margin-bottom: 12px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.onboarding-result-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(24px, 4.4vw, 38px);
  letter-spacing: -.05em;
  line-height: .98;
}

.onboarding-result-card p {
  max-width: 560px;
  color: rgba(255,255,255,.68) !important;
}

.today-screen {
  display: block;
  min-height: 100svh;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  padding-top: 0;
  padding-bottom: 132px;
  padding-inline: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 32%),
    radial-gradient(circle at 50% 42%, rgba(138,115,255,.10), transparent 38%),
    var(--bg-main);
  overscroll-behavior-y: none;
}

.home-today-active {
  background: var(--bg-main);
  overscroll-behavior-y: none;
}

.today-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: calc(clamp(132px, 14vw, 178px) + 80px) clamp(24px, 6vw, 72px) clamp(52px, 8vw, 92px);
  border: 0;
  border-radius: 0;
  min-height: clamp(500px, 68svh, 720px);
  align-items: flex-end;
  isolation: isolate;
  width: 100%;
  margin: -80px 0 0;
  box-shadow: inset 0 -120px 90px var(--bg-main);
  transform: translateZ(0);
}

.today-hero-card .hub-kicker,
.today-hero-card h1,
.today-hero-card p {
  width: min(100%, 1180px);
  margin-left: auto;
  margin-right: auto;
}

.today-hero-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 48%;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(7,10,15,0) 0%, rgba(7,10,15,.72) 56%, var(--bg-main) 84%, var(--bg-main) 100%);
  z-index: 0;
}

.today-hero-card::before,
.today-main-card::before,
.today-checkin-card::before,
.today-support-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.16), transparent 28%),
    linear-gradient(120deg, rgba(255,255,255,.075), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 46%);
  opacity: .82;
  z-index: 0;
}

.today-hero-card > *,
.today-main-card > *,
.today-checkin-card > *,
.today-support-card > * {
  position: relative;
  z-index: 1;
}

.today-hero-card p {
  max-width: 650px;
  color: rgba(255,255,255,.66);
}

.today-hero-copy {
  width: min(100%, 720px);
  max-width: 1180px;
  margin-inline: auto;
  margin-left: 0;
}

.today-carousel-controls {
  position: absolute;
  right: clamp(18px, 6vw, 72px);
  bottom: clamp(28px, 5vw, 58px);
  display: flex;
  gap: 9px;
  z-index: 2;
}

.today-carousel-controls button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.9);
  background:
    radial-gradient(circle at 35% 0%, rgba(255,255,255,.22), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.045)),
    rgba(0,0,0,.24);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 14px 34px rgba(0,0,0,.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.today-carousel-controls button:active {
  transform: scale(.96);
}

.today-carousel-controls svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .today-carousel-controls {
    display: none !important;
  }
}

.today-hero-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(36px, 6vw, 66px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
}

.today-hero-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  transition: width .2s ease, background .2s ease;
}

.today-hero-dots span.active {
  width: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
}

.today-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: min(calc(100% - clamp(16px, 4vw, 56px)), 1180px);
  margin: 12px auto 0;
}

@media (min-width: 769px) {
  .today-screen {
    padding-top: 0;
    padding-inline: 0;
  }

  .today-hero-card {
    min-height: clamp(470px, 52vw, 640px);
    border-radius: 0;
  }

  .today-hero-copy {
    width: min(100%, 620px);
  }

  .today-hero-card h1 {
    font-size: clamp(48px, 5.2vw, 76px);
  }

  .today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(22px, 2.6vw, 36px);
    width: min(calc(100% - clamp(16px, 4vw, 56px)), 1100px);
  }

  .today-main-card,
  .today-support-card {
    min-height: clamp(360px, 44vh, 540px);
    align-items: end;
    grid-template-columns: 1fr;
    padding: clamp(26px, 2.8vw, 36px);
  }

  .today-main-card h2,
  .today-support-card h3 {
    font-size: clamp(22px, 2.1vw, 30px);
    letter-spacing: -0.035em;
  }

  .today-main-card > div > p,
  .today-support-card > div > p {
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.65;
    max-width: 42ch;
  }

  .today-day-pill {
    padding: 7px 12px;
  }

  .today-program-button {
    justify-self: end;
    align-self: end;
    min-height: 52px;
    padding: 0 20px 0 22px;
    font-size: 14px;
  }

  .today-support-button {
    min-height: 50px;
    font-size: 14px;
    padding: 0 20px;
  }

  .today-program-button svg {
    width: 19px;
    height: 19px;
  }
}

.today-main-card,
.today-checkin-card,
.today-support-card {
  border-radius: 24px;
}

.today-hero-card,
.today-main-card,
.today-checkin-card,
.today-support-card,
.ux-visual-hero,
.ux-path-stage,
.ux-practice-card {
  background:
    linear-gradient(to bottom, rgba(0,0,0,.04), rgba(0,0,0,.32) 46%, rgba(0,0,0,.82) 100%),
    var(--ux-bg),
    rgba(6, 8, 13, .62);
  background-position: var(--ux-bg-pos, center 35%);
  background-size: cover;
}

.today-main-card,
.today-support-card {
  background: var(--bg-main);
  background-position: center;
  background-size: cover;
  isolation: isolate;
  overflow: hidden;
}

.today-main-card {
  border-color: rgba(255,255,255,.13);
  border-bottom-color: transparent;
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 24px 68px rgba(0,0,0,.34);
}

.today-main-card::after,
.today-support-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg,
      rgba(5,5,6,.0) 0%,
      rgba(5,5,6,.12) 40%,
      rgba(5,5,6,.62) 72%,
      rgba(5,5,6,.86) 100%);
  z-index: 0;
}

.today-main-card::after {
  background:
    linear-gradient(180deg,
      rgba(5,5,6,.0) 0%,
      rgba(5,5,6,.14) 38%,
      rgba(5,5,6,.66) 70%,
      rgba(5,5,6,.90) 100%);
}

.today-main-card::before,
.today-support-card::before {
  z-index: -1;
  background:
    var(--ux-bg),
    var(--bg-main);
  background-position: center;
  background-size: cover;
  opacity: 1;
}

.today-checkin-card {
  margin-top: 14px;
  padding: 20px;
  min-height: clamp(210px, 24vw, 280px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 50% 42%, rgba(170,170,255,.18), transparent 22%),
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
    rgba(3,5,9,.46);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 18px 46px rgba(0,0,0,.28);
}

.today-main-card h2,
.today-checkin-card h3,
.today-support-card h3 {
  margin: 4px 0 12px;
  font-size: clamp(21px, 4vw, 34px);
  letter-spacing: -.04em;
}

.today-main-card p,
.today-checkin-card p,
.today-support-card p {
  color: rgba(255,255,255,.62);
  line-height: 1.55;
}

.today-checkin-options {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0 4px;
  margin-inline: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.today-checkin-options::-webkit-scrollbar {
  display: none;
}

.today-checkin-options button {
  flex: 1 0 82px;
  min-height: 64px;
  padding: 8px 8px 7px;
  display: grid;
  place-items: center;
  gap: 4px;
  border-radius: 17px;
  text-align: center;
  font-size: 10px;
  letter-spacing: -.02em;
  background:
    radial-gradient(circle at 34% 0%, rgba(255,255,255,.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.032)),
    rgba(0,0,0,.18);
  border-color: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  backdrop-filter: blur(18px) saturate(155%);
}

.today-checkin-card::after {
  content: "";
  width: min(42vw, 180px);
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  border-radius: 45% 55% 52% 48%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.72), transparent 10%),
    conic-gradient(from 20deg, rgba(255,142,96,.78), rgba(255,224,124,.8), rgba(138,206,255,.82), rgba(180,132,255,.8), rgba(255,142,96,.78));
  filter: blur(.2px) saturate(120%);
  opacity: .38;
  pointer-events: none;
}

.today-mood-scale {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.today-mood-scale strong {
  text-align: center;
  font-size: clamp(18px, 3vw, 24px);
  letter-spacing: -.04em;
}

.today-mood-scale span {
  height: 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 11px, transparent 12px),
    linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.34), rgba(255,255,255,.15));
}

.today-mood-labels {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.42);
  font-size: 11px;
}

.today-mood-labels em {
  font-style: normal;
}

.today-checkin-options button span {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.8);
}

.today-checkin-options button svg {
  width: 19px;
  height: 19px;
}

.today-section-title {
  width: min(calc(100% - clamp(16px, 4vw, 56px)), 1180px);
  margin: 26px auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.today-section-title .hub-kicker {
  margin: 0;
}

.today-main-card {
  min-height: clamp(190px, 24vw, 260px);
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.today-day-pill {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  background:
    radial-gradient(circle at 34% 0%, rgba(255,255,255,.24), transparent 34%),
    rgba(0,0,0,.24);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 750;
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.today-program-tracker {
  display: block;
  margin-top: 14px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 700;
}

.today-program-ring {
  --pct: 0;
  width: 58px;
  height: 58px;
  position: relative;
  margin-top: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.36) 0 54%, transparent 55%),
    rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

.today-program-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.today-program-ring circle {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
}

.today-program-ring circle:first-child {
  stroke: rgba(255,255,255,.14);
}

.today-program-ring circle:last-child {
  stroke: rgba(255,255,255,.92);
  stroke-dasharray: 113;
  stroke-dashoffset: calc(113 - (113 * var(--pct)) / 100);
  filter: drop-shadow(0 0 10px rgba(255,255,255,.28));
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.85,.2,1);
}

.today-program-ring span {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.today-program-button {
  position: relative;
  min-height: 48px;
  padding: 0 17px 0 19px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.30);
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,.25), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.17), rgba(255,255,255,.045)),
    rgba(0,0,0,.20);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  backdrop-filter: blur(24px) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    inset 0 -1px 0 rgba(255,255,255,.06),
    0 14px 36px rgba(0,0,0,.28);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.today-program-button svg {
  width: 17px;
  height: 17px;
  margin-left: 1px;
}

.today-card-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: -8px;
  color: rgba(255,255,255,.52);
  font-size: 11px;
  font-style: normal;
}

.today-card-progress span {
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(235,198,153,.9) 0 20%, rgba(255,255,255,.14) 20% 100%);
}

.today-card-progress em {
  font-style: normal;
}

.today-support-card {
  min-height: clamp(190px, 22vw, 260px);
  padding: 24px;
  display: grid;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  text-decoration: none;
}

.today-support-button {
  width: fit-content;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border: 1px solid rgba(255,255,255,.24);
  color: rgba(255,255,255,.9);
  background:
    radial-gradient(circle at 32% 10%, rgba(255,255,255,.24), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.04)),
    rgba(0,0,0,.20);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  font-size: 14px;
  font-weight: 800;
}

.today-pro-badge {
  position: absolute !important;
  top: 18px;
  right: 18px;
  z-index: 2 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: rgba(7,16,14,.96);
  background:
    radial-gradient(circle at 32% 0%, rgba(255,255,255,.82), transparent 42%),
    linear-gradient(180deg, #f7ead0, #d8bf9b);
  border: 1px solid rgba(255,255,255,.44);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 10px 28px rgba(216,191,155,.24);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
}

.today-chat-card > div {
  padding-right: 118px;
}

@media (max-width: 760px) {
  .system-intro-screen,
  .onboarding-flow,
  .today-screen {
    padding-top: max(112px, calc(102px + env(safe-area-inset-top)));
  }

  .today-screen {
    padding-top: 0;
    padding-inline: 0;
  }

  .today-chat-card {
    align-content: end;
    gap: 10px;
  }

  .today-chat-card > div {
    padding-right: 0;
  }

  .today-chat-card .today-pro-badge {
    position: relative !important;
    top: auto;
    right: auto;
    justify-self: start;
    align-self: start;
    min-height: 28px;
    padding: 0 12px;
    font-size: 10px;
    order: -1;
  }

  .system-intro-screen {
    padding: 0;
    width: 100vw;
  }

  .auth-gateway-shell {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    border-radius: 0;
    margin: 0;
    padding: max(14px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom));
    background: #000;
  }

  .auth-gateway-shell::before {
    height: 52svh;
    background:
      linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.05) 52%, rgba(0,0,0,.72) 86%, #000 100%),
      url('/assets/webp/aut.webp') center top / cover no-repeat;
  }

  .auth-gateway-panel {
    width: 100%;
    min-height: auto;
    gap: 16px;
    padding-block: clamp(110px, 24svh, 180px) 0;
    transform: translateY(-15svh);
  }

  .auth-gateway-logo {
    width: min(34vw, 138px);
  }

  .auth-gateway-copy h1,
  .auth-gateway-copy h2 {
    max-width: 340px;
    font-size: clamp(28px, 8vw, 38px);
    margin-top: 18px;
  }

  .auth-gateway-copy h2 {
    font-size: clamp(24px, 7vw, 32px);
  }

  .auth-gateway-copy p {
    max-width: 320px;
    font-size: 14px;
  }

  .auth-gateway-dots {
    margin-top: 18px;
  }

  .today-hero-card {
    min-height: clamp(520px, 72svh, 640px);
    padding: calc(max(118px, calc(104px + env(safe-area-inset-top))) + 72px) 24px 64px;
    border-radius: 0;
    margin-top: -72px;
  }

  .today-carousel-controls {
    right: 24px;
    bottom: 34px;
  }

  .today-carousel-controls button {
    width: 38px;
    height: 38px;
  }

  .today-hero-dots {
    bottom: 42px;
    gap: 7px;
  }

  .today-hero-dots span {
    width: 4px;
    height: 4px;
  }

  .today-hero-dots span.active {
    width: 14px;
  }

  .today-checkin-card,
  .today-main-card,
  .today-support-card {
    border-radius: 24px;
  }

  .today-main-card {
    min-height: 230px;
    grid-template-columns: 1fr;
    align-items: end;
  }

  .today-program-button {
    width: fit-content;
    justify-self: end;
  }

  .today-support-card {
    min-height: 230px;
    grid-template-columns: 1fr;
  }

  .today-checkin-card {
    padding: 16px;
  }

  .today-checkin-options {
    margin-right: -16px;
    padding-right: 16px;
  }

  .today-checkin-options button {
    flex-basis: 78px;
  }

  .ios-auth-button {
    min-height: 50px;
    border-radius: 15px;
    font-size: 15px;
  }

  .onboarding-flow {
    padding: 0;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  @supports (height: 100dvh) {
    .onboarding-flow,
    .onboarding-card {
      height: 100dvh;
      min-height: 100dvh;
    }
  }

  .onboarding-card {
    height: 100svh;
    min-height: 100svh;
    padding: max(10px, env(safe-area-inset-top)) 14px 0;
    overflow: hidden;
    background: #07100E;
  }

  .onboarding-topbar {
    min-height: 34px;
  }

  .onboarding-sheet {
    padding: 8px 0 max(74px, calc(74px + env(safe-area-inset-bottom)));
    min-height: 0;
  }

  .onboarding-progress-dots {
    margin-bottom: 12px;
  }

  .onboarding-select-hint {
    margin-top: 12px;
  }

  .onboarding-card h2 {
    font-size: clamp(23px, 7vw, 29px);
  }

  .onboarding-card p {
    font-size: 12.5px;
  }

  .onboarding-options {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 8px;
  }

  .onboarding-options button {
    min-height: 43px;
    border-radius: 16px;
    padding: 0 13px;
  }

  .onboarding-options button span {
    font-size: 12.7px;
  }

  .onboarding-options button i {
    width: 18px;
    height: 18px;
  }

  .onboarding-actions {
    margin-top: auto;
    padding-top: clamp(10px, 2.4svh, 18px);
  }

  .onboarding-actions .ios-auth-button {
    min-height: 50px;
    min-width: 140px;
    font-size: 14.5px;
    padding: 0 24px;
  }

  .system-intro-card,
  .today-hero-card,
  .today-main-card,
  .today-checkin-card {
    border-radius: 28px;
  }

  .today-hero-card {
    border-radius: 0;
  }

  .today-hero-card,
  .today-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ── New UX route pages ─────────────────────────────────── */
.ux-route-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(120, 112, 255, .12), transparent 34%),
    #030407;
}

.ux-page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(98px, 10vw, 132px) 24px 120px;
}

@media (min-width: 769px) {
  body.home-first-run-active .onboarding-card,
  body.home-onboarding-active .onboarding-card {
    background:
      radial-gradient(circle at 50% 0%, rgba(255,255,255,.09), transparent 28%),
      linear-gradient(180deg, rgba(18,18,22,.82), #000 72%),
      #000;
  }

  body.home-first-run-active .onboarding-card::after,
  body.home-onboarding-active .onboarding-card::after {
    background:
      radial-gradient(circle at 50% 18%, rgba(255,255,255,.08), transparent 26%),
      linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.34) 58%, #000 100%);
  }

  body.ux-route-page .ux-page-shell,
  body.path-product-page .ux-page-shell {
    width: calc(100vw - 232px);
    max-width: none;
    margin-left: 232px;
    margin-right: 0;
    box-sizing: border-box;
  }

  /* Оболочки внутри main: отступ уже задан у .main-content (nav.css) — второе смещение даёт «дыру» и съезжают Shorts/Сообщество */
  body.ux-route-page main.main-content > .ux-page-shell,
  body.path-product-page main.main-content > .ux-page-shell {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    min-height: 0;
    height: auto;
    overflow-y: visible;
    overscroll-behavior: auto;
  }

  body.path-product-page .path-app-shell {
    padding-left: clamp(22px, 2.4vw, 36px);
    padding-right: clamp(22px, 2.4vw, 36px);
  }

  /* Только корневой <main class="ux-page-shell"> (напр. Практики). Внутри main.main-content — обычный поток */
  body.ux-route-page main.ux-page-shell {
    min-height: 100svh;
    height: 100svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: 32px;
  }

  body.ux-route-page .ux-visual-hero {
    min-height: min(42svh, 420px);
    flex: 0 0 auto;
  }

  body.community-page main.main-content > .ux-page-shell {
    padding-top: 0;
  }

  .community-page-hero {
    min-height: min(52svh, 540px);
    margin-left: calc(-1 * clamp(22px, 2.4vw, 36px));
    margin-right: calc(-1 * clamp(22px, 2.4vw, 36px));
    padding-left: clamp(28px, 4vw, 58px);
    padding-right: clamp(28px, 4vw, 58px);
  }
}

/* ── Community page hero ─────────────────────────────────── */
.community-page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(46svh, 420px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(clamp(26px, 4vw, 48px) + 80px) clamp(26px, 4vw, 48px) clamp(26px, 4vw, 48px);
  margin-top: -80px;
  margin-bottom: 20px;
  border-radius: 0 0 32px 32px;
  background-color: var(--bg-main);
  background-size: cover;
  background-position: center top;
}

.community-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,.0) 0%,
      rgba(0,0,0,.18) 40%,
      rgba(0,0,0,.72) 80%,
      rgba(0,0,0,.90) 100%);
  z-index: 0;
}

.community-page-hero-copy {
  position: relative;
  z-index: 1;
}

.community-page-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: .92;
  letter-spacing: -.07em;
  color: #fff;
}

.community-page-hero p:not(.hub-kicker) {
  max-width: 560px;
  color: rgba(255,255,255,.62);
  line-height: 1.6;
  margin: 0;
}

body.community-page .community-after-hero {
  padding-top: clamp(14px, 3.5vw, 26px);
}

body.community-page .ux-community-grid {
  width: min(calc(100% - clamp(16px, 4vw, 56px)), 1180px);
  margin-inline: auto;
}

.ux-page-hero {
  max-width: 760px;
  margin-bottom: 22px;
}

.ux-visual-hero {
  max-width: none;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.17);
}

.ux-page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 86px);
  line-height: .92;
  letter-spacing: -.07em;
}

.ux-page-hero p:not(.hub-kicker) {
  max-width: 640px;
  color: rgba(255,255,255,.62);
  line-height: 1.6;
}

.ux-path-grid,
.ux-path-timeline,
.ux-practice-grid,
.ux-community-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ux-path-card,
.ux-path-stage,
.ux-practice-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 30px;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035)),
    rgba(6, 8, 13, .46);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  backdrop-filter: blur(28px) saturate(145%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 20px 70px rgba(0,0,0,.25);
}

/* Сообщество: те же слои, что у карточек «Сегодня» — без backdrop-filter (щели на Android) */
.ux-community-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 30px;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-bottom-color: transparent;
  background: var(--bg-main);
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 20px 70px rgba(0,0,0,.25);
}

.ux-community-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    var(--ux-bg),
    var(--bg-main);
  background-position: var(--ux-pos, center);
  background-size: var(--ux-size, cover);
  background-repeat: no-repeat;
}

.ux-community-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(5,5,6,.06) 0%,
      rgba(5,5,6,.38) 52%,
      rgba(5,5,6,.84) 88%,
      rgba(5,5,6,.98) 100%);
}

.community-card-telegram::after {
  background:
    linear-gradient(180deg,
      rgba(0,0,0,.18) 0%,
      rgba(0,0,0,.48) 52%,
      rgba(0,0,0,.86) 88%,
      rgba(5,5,6,.98) 100%);
}

.ux-community-card > * {
  position: relative;
  z-index: 2;
}

.community-card-webinars {
  --ux-pos: center 38%;
  --ux-size: 112% auto;
}

.community-card-marathons {
  --ux-pos: center 42%;
  --ux-size: 112% auto;
}

.community-card-telegram {
  --ux-bg: url('/assets/webp/tg_open.webp');
  --ux-pos: center;
  --ux-size: cover;
}

.ux-community-card-disabled {
  cursor: default;
  opacity: .82;
}

.ux-community-card-disabled span {
  color: rgba(255,255,255,.82);
}

.ux-path-timeline {
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
}

.ux-path-stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
}

.ux-path-stage.active {
  min-height: 360px;
}

.ux-path-card-primary,
.ux-community-card-wide {
  grid-column: span 2;
}

.ux-path-card span,
.ux-path-stage span,
.ux-practice-card span,
.ux-community-card span {
  display: block;
  margin-bottom: 14px;
  color: rgba(255,255,255,.48);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ux-path-card h2,
.ux-path-card h3,
.ux-path-stage h2,
.ux-path-stage h3,
.ux-practice-card strong,
.ux-community-card strong {
  display: block;
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1;
  letter-spacing: -.04em;
}

.ux-path-card p,
.ux-path-stage p,
.ux-community-card p {
  color: rgba(255,255,255,.62);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .ux-path-grid,
  .ux-path-timeline,
  .ux-practice-grid,
  .ux-community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .ux-page-shell {
    padding: max(86px, calc(76px + env(safe-area-inset-top))) 14px 110px;
  }

  /* Герой начинается от верха экрана; отступ под фикс-шапку — padding внутри блока */
  body.community-page main.main-content > .ux-page-shell {
    padding-top: 0;
  }

  body.community-page .community-after-hero {
    padding-top: clamp(12px, 3.2vw, 22px);
    padding-left: 0;
    padding-right: 0;
  }

  body.community-page .ux-community-grid {
    width: min(calc(100vw - 32px), 520px);
    max-width: calc(100vw - 32px);
    margin-left: auto;
    margin-right: auto;
  }

  .community-page-hero {
    min-height: min(44svh, 360px);
    margin-top: 0;
    margin-left: -14px;
    margin-right: -14px;
    padding-top: calc(max(76px, calc(58px + env(safe-area-inset-top, 0px))) + clamp(14px, 4vw, 22px));
    padding-bottom: clamp(22px, 6vw, 36px);
    padding-left: clamp(18px, 4vw, 22px);
    padding-right: clamp(18px, 4vw, 22px);
  }

  .ux-path-grid,
  .ux-path-timeline,
  .ux-practice-grid,
  .ux-community-grid {
    grid-template-columns: 1fr;
  }

  .ux-visual-hero {
    min-height: 300px;
    border-radius: 30px;
  }

  .ux-path-stage,
  .ux-path-stage.active,
  .ux-practice-card,
  .ux-community-card {
    min-height: 220px;
  }

  .ux-path-card-primary,
  .ux-community-card-wide {
    grid-column: span 1;
  }
}

/* ── Path Product Screen ─────────────────────────────────── */
.path-product-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 30%),
    radial-gradient(circle at 50% 42%, rgba(170,126,70,.10), transparent 38%),
    #030407;
}

.path-app-shell {
  width: 100%;
  max-width: none;
  padding-inline: clamp(14px, 2.8vw, 34px);
}

.path-hero-card,
.path-glass-panel,
.path-loop-card,
.path-direction-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.13), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.028)),
    rgba(3, 5, 10, .36);
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  backdrop-filter: blur(34px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -1px 0 rgba(255,255,255,.045),
    0 30px 90px rgba(0,0,0,.32);
}

.path-hero-card::before,
.path-glass-panel::before,
.path-direction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.02), rgba(0,0,0,.30) 42%, rgba(0,0,0,.72)),
    var(--ux-bg),
    rgba(4,6,10,.5);
  background-position: center;
  background-size: cover;
}

.path-hero-card::after,
.path-glass-panel::after,
.path-direction-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(120deg, rgba(255,255,255,.08), transparent 42%);
  opacity: .8;
}

.path-hero-card > *,
.path-glass-panel > *,
.path-direction-card > * {
  position: relative;
  z-index: 1;
}

.path-hero-card {
  min-height: clamp(420px, 58svh, 560px);
  border-radius: 34px;
  padding: clamp(24px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.path-hero-top,
.path-hero-actions,
.path-now-actions,
.path-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.path-hero-top span,
.path-card-kicker,
.path-loop-card span,
.path-direction-card span {
  color: rgba(255,255,255,.52);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.path-hero-copy {
  max-width: 720px;
}

.path-hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: .92;
  letter-spacing: -.075em;
}

.path-hero-copy p,
.path-check-card p,
.path-loop-card p,
.path-direction-card p,
.path-now-card p {
  color: rgba(255,255,255,.64);
  line-height: 1.55;
}

.path-glass-button,
.path-now-actions a {
  min-height: 48px;
  width: fit-content;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  color: rgba(255,255,255,.88);
  text-decoration: none;
  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,.24), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.045)),
    rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  backdrop-filter: blur(26px) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 18px 42px rgba(0,0,0,.26);
  font-weight: 650;
}

.path-glass-button-primary {
  color: #101013;
  border-color: rgba(255,255,255,.58);
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(230,226,218,.88));
}

.path-current-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 14px;
  margin-top: 14px;
}

.path-now-card,
.path-check-card {
  min-height: 210px;
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.path-now-card h2,
.path-check-card h3,
.path-section-head h2,
.path-loop-card h3,
.path-direction-card strong {
  margin: 8px 0 10px;
  color: #fff;
  line-height: 1;
  letter-spacing: -.045em;
}

.path-now-card h2 {
  font-size: clamp(28px, 4.5vw, 48px);
}

.path-progress-line {
  height: 4px;
  border-radius: 999px;
  margin-top: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.13);
}

.path-progress-line span {
  display: block;
  width: 22%;
  height: 100%;
  border-radius: inherit;
  background: rgba(235,198,153,.92);
}

.path-now-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.path-now-actions a {
  min-height: 42px;
  font-size: 13px;
}

.path-section {
  margin-top: 34px;
}

.path-section-head {
  align-items: flex-end;
  margin: 0 6px 14px;
}

.path-section-head h2 {
  max-width: 680px;
  font-size: clamp(28px, 4vw, 48px);
}

.path-loop-grid,
.path-directions-grid {
  display: grid;
  gap: 14px;
}

.path-loop-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.path-loop-card {
  min-height: 190px;
  border-radius: 26px;
  padding: 22px;
}

.path-loop-card h3 {
  font-size: clamp(22px, 2.6vw, 30px);
}

.path-day-card {
  border-radius: 28px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
    rgba(7,8,10,.72);
  border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 24px 70px rgba(0,0,0,.34);
}

.path-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 14px;
}

.path-day-head h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -.045em;
}

.path-day-head span,
.path-task-row em,
.path-task-row small {
  color: rgba(255,255,255,.48);
  font-size: 12px;
  font-style: normal;
}

.path-task-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}

.path-task-row + .path-task-row {
  margin-top: 10px;
}

.path-task-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.9);
  background:
    radial-gradient(circle at 35% 0%, rgba(255,255,255,.22), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.14);
  font-size: 13px;
  font-weight: 800;
}

.path-task-row strong,
.path-task-row small {
  display: block;
}

.path-task-row strong {
  margin-bottom: 4px;
  font-size: 16px;
  letter-spacing: -.02em;
}

.path-directions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.path-direction-card {
  min-height: 230px;
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  text-decoration: none;
}

.path-direction-card strong {
  display: block;
  font-size: clamp(24px, 3vw, 36px);
}

@media (max-width: 980px) {
  .path-current-grid,
  .path-loop-grid,
  .path-directions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .path-app-shell {
    padding-inline: 14px;
  }

  .path-hero-card {
    min-height: clamp(410px, 58svh, 500px);
    border-radius: 30px;
    padding: 25px;
  }

  .path-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .path-glass-button {
    width: 100%;
  }

  .path-current-grid,
  .path-loop-grid,
  .path-directions-grid {
    grid-template-columns: 1fr;
  }

  .path-now-card,
  .path-check-card,
  .path-direction-card {
    min-height: 200px;
    border-radius: 24px;
  }
}

/* ── Apple-style Activity Indicator ── */
.apple-spinner {
  position: relative;
  width: 36px;
  height: 36px;
}
.apple-spinner span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 9px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: rgba(255,255,255,0.85);
  transform-origin: center 18px;
  animation: apple-spin 1s linear infinite;
}
.apple-spinner span:nth-child(1)  { transform: rotate(0deg)   translateY(-18px); animation-delay: -0.875s; }
.apple-spinner span:nth-child(2)  { transform: rotate(45deg)  translateY(-18px); animation-delay: -0.75s; }
.apple-spinner span:nth-child(3)  { transform: rotate(90deg)  translateY(-18px); animation-delay: -0.625s; }
.apple-spinner span:nth-child(4)  { transform: rotate(135deg) translateY(-18px); animation-delay: -0.5s; }
.apple-spinner span:nth-child(5)  { transform: rotate(180deg) translateY(-18px); animation-delay: -0.375s; }
.apple-spinner span:nth-child(6)  { transform: rotate(225deg) translateY(-18px); animation-delay: -0.25s; }
.apple-spinner span:nth-child(7)  { transform: rotate(270deg) translateY(-18px); animation-delay: -0.125s; }
.apple-spinner span:nth-child(8)  { transform: rotate(315deg) translateY(-18px); animation-delay: 0s; }
@keyframes apple-spin {
  0%   { opacity: 1; }
  100% { opacity: 0.12; }
}

/* Keep native mobile play/pause controls visible. */
video::cue { background: transparent; }
video::-internal-media-interstitial-panel { display: none !important; }

/* Video loading overlay */
.video-loader {
  position: absolute;
  inset: 0;
  display: none !important;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  border-radius: 16px;
  z-index: 10;
  pointer-events: none;
  transition: opacity .25s;
}
.video-container .video-loader,
.single-video-wrap .video-loader,
.player-video-wrap .video-loader {
  align-items: center !important;
  justify-content: center !important;
  padding-top: 0 !important;
  background: rgba(0,0,0,.6) !important;
  border-radius: 16px !important;
  animation: none !important;
}
.video-loader.hidden { opacity: 0; pointer-events: none; animation: none; }
.video-loader .apple-spinner {
  z-index: 1;
  transform: none;
}

.video-preview-overlay {
  position: absolute;
  inset: -1px;
  z-index: 8;
  border: 0;
  border-radius: inherit;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-main);
  background-position: center;
  background-size: cover;
  overflow: hidden;
  transition: opacity .22s ease, transform .22s ease;
}

.video-preview-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(0,0,0,.04), rgba(0,0,0,.28) 54%, rgba(0,0,0,.5)),
    linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.34));
}

.video-preview-overlay.hidden {
  display: none;
}

.video-preview-action {
  position: relative;
  min-width: clamp(64px, 15vw, 84px);
  height: clamp(64px, 15vw, 84px);
  padding: 0 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,255,255,.12)),
    rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.34);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 24px 70px rgba(0,0,0,.48),
    0 0 0 8px rgba(255,255,255,.07),
    inset 0 1px 0 rgba(255,255,255,.36);
  transform: translateZ(0);
  transition: transform .18s ease, opacity .18s ease;
}

.video-preview-icon {
  display: block;
  width: 0;
  height: 0;
  border-top: clamp(10px, 2.5vw, 14px) solid transparent;
  border-bottom: clamp(10px, 2.5vw, 14px) solid transparent;
  border-left: clamp(16px, 3.8vw, 22px) solid #fff;
  transform: translateX(2px);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
}

.video-preview-status {
  display: none;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}

.video-preview-ring {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.34);
  border-top-color: #fff;
  animation: video-preview-spin .8s linear infinite;
}

@keyframes video-preview-spin {
  to { transform: rotate(360deg); }
}

.video-preview-play::before {
  content: '';
  width: 0;
  height: 0;
  border-top: clamp(10px, 2.5vw, 14px) solid transparent;
  border-bottom: clamp(10px, 2.5vw, 14px) solid transparent;
  border-left: clamp(16px, 3.8vw, 22px) solid #fff;
  transform: translateX(2px);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
}

.video-preview-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  display: none;
  pointer-events: none;
}

.video-preview-spinner span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  margin-top: -4px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  transform-origin: 50% 16px;
  animation: video-preview-spinner-fade .85s linear infinite;
}

.video-preview-spinner span:nth-child(1) { transform: rotate(0deg) translateY(-12px); animation-delay: -0.74375s; }
.video-preview-spinner span:nth-child(2) { transform: rotate(45deg) translateY(-12px); animation-delay: -0.6375s; }
.video-preview-spinner span:nth-child(3) { transform: rotate(90deg) translateY(-12px); animation-delay: -0.53125s; }
.video-preview-spinner span:nth-child(4) { transform: rotate(135deg) translateY(-12px); animation-delay: -0.425s; }
.video-preview-spinner span:nth-child(5) { transform: rotate(180deg) translateY(-12px); animation-delay: -0.31875s; }
.video-preview-spinner span:nth-child(6) { transform: rotate(225deg) translateY(-12px); animation-delay: -0.2125s; }
.video-preview-spinner span:nth-child(7) { transform: rotate(270deg) translateY(-12px); animation-delay: -0.10625s; }
.video-preview-spinner span:nth-child(8) { transform: rotate(315deg) translateY(-12px); animation-delay: 0s; }

@keyframes video-preview-spinner-fade {
  0% { opacity: 1; }
  100% { opacity: .16; }
}

.video-preview-overlay:hover .video-preview-play,
.video-preview-overlay:focus-visible .video-preview-play {
  transform: scale(1.04) translateZ(0);
}

.video-preview-overlay:hover .video-preview-action,
.video-preview-overlay:focus-visible .video-preview-action {
  transform: scale(1.04) translateZ(0);
}

.video-preview-overlay.loading {
  cursor: wait;
}

.video-preview-overlay.loading .video-preview-action,
.video-preview-overlay.loading .video-preview-play {
  transform: scale(.96) translateZ(0);
}

.video-preview-overlay.loading .video-preview-icon,
.video-preview-overlay.loading .video-preview-play::before {
  display: none;
}

.video-preview-overlay.loading .video-preview-status {
  display: inline-flex;
}

.video-preview-overlay.loading .video-preview-spinner {
  display: block;
}

/* Skeleton shimmer */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton-pulse {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 0%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.05) 100%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
.skeleton-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
}
.skeleton-num  { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.skeleton-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.skeleton-title { height: 14px; width: 75%; }
.skeleton-dur   { height: 11px; width: 40%; }

:root {
  /* Colors */
  --bg-main: #07100E;
  --bg-surface: #0D111A;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text-1: #ffffff;
  --text-2: #a1a1aa;
  --text-3: #71717a;

  /* Accents */
  --accent: #FF6B35;
  --accent-glow: rgba(255, 107, 53, 0.4);
  --blue: #007AFF;
  --purple: #8B5CF6;
  --green: #34C759;

  /* Liquid glass preset */
  --sm-glass-bg: rgba(3, 4, 8, 0.28);
  --sm-glass-bg-strong: rgba(4, 6, 12, 0.42);
  --sm-glass-border: rgba(255, 255, 255, 0.16);
  --sm-glass-border-strong: rgba(255, 255, 255, 0.24);
  --sm-glass-light: rgba(255, 255, 255, 0.22);
  --sm-glass-warm: rgba(255, 226, 178, 0.08);
  --sm-glass-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Radii */
  --r-sm: 12px;
  --r-md: 24px;
  --r-lg: 32px;
  --r-pill: 99px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── System Liquid Glass Primitives ───────────────────────── */
.sm-liquid-surface,
.sm-liquid-button,
.sm-liquid-badge,
.sm-liquid-input {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--sm-glass-border);
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.16), transparent 34%),
    radial-gradient(circle at 82% 110%, var(--sm-glass-warm), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.012) 48%, rgba(255,255,255,.034)),
    var(--sm-glass-bg);
  -webkit-backdrop-filter: blur(26px) saturate(180%) contrast(112%);
  backdrop-filter: blur(26px) saturate(180%) contrast(112%);
  box-shadow:
    var(--sm-glass-shadow),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(255,255,255,.035);
}

.sm-liquid-surface::before,
.sm-liquid-button::before,
.sm-liquid-badge::before,
.sm-liquid-input::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), transparent 38%),
    linear-gradient(115deg, rgba(255,255,255,.08), transparent 34%, rgba(255,255,255,.05));
}

.sm-liquid-button,
.sm-liquid-badge {
  color: rgba(255,255,255,.94);
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}

.sm-liquid-button:hover,
.sm-liquid-button:focus-visible {
  border-color: var(--sm-glass-border-strong);
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.22), transparent 36%),
    radial-gradient(circle at 82% 110%, rgba(255,226,178,.12), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.018) 48%, rgba(255,255,255,.044)),
    var(--sm-glass-bg-strong);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

*:focus {
  outline-color: rgba(255,255,255,.22);
}

a,
button,
input,
textarea,
select,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-main);
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 50% -12%, rgba(31, 44, 68, 0.28), transparent 34%),
    radial-gradient(circle at 0% 18%, rgba(255, 107, 53, 0.045), transparent 30%),
    var(--bg-main);
  color: var(--text-1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.text-gradient {
  color: var(--text-1);
}

/* ── Layout ───────────────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  padding-bottom: 40px;
}

.section {
  padding: 60px 0;
  position: relative;
}

.hero + .section {
  padding-top: 26px;
}

.section-header {
  margin-bottom: 40px;
}

.bento-section .section-header {
  margin-bottom: 34px;
  text-align: center;
}

.section-title {
  font-size: clamp(1.65rem, 2.2vw, 1.95rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  margin-bottom: 10px;
}

.section-desc {
  font-size: clamp(.95rem, 1.35vw, 1.05rem);
  line-height: 1.55;
  color: var(--text-2);
}

/* ── Navbar (Desktop & Top Mobile) ────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-1);
}

.brand-outlined {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 4px 12px;
  transition: border-color 0.3s var(--ease);
}

.brand-outlined:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-logo-img.small {
  height: 54px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--text-1);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.96);
}

.btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s var(--ease);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

.btn-primary {
  background: var(--text-1);
  color: var(--bg-main);
}

.btn-primary:hover {
  background: #e4e4e7;
}

.btn-secondary {
  background: transparent;
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-nav-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-pill);
  color: var(--text-1);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: all 0.3s var(--ease);
  background: transparent;
  cursor: pointer;
}

.btn-nav-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-nav-outline svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.btn-nav-outline:hover svg {
  transform: translate(2px, -2px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-1);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-tg { color: #fff; }
.btn-tg svg { color: var(--blue); }

.btn-secondary,
.btn-nav-outline,
.btn-glass,
.ai-toggle-btn,
.ai-outline-btn,
.lesson-action-btn,
.btn-support-outline,
.btn-footer-telegram {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--sm-glass-border);
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.16), transparent 34%),
    radial-gradient(circle at 82% 110%, var(--sm-glass-warm), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.012) 48%, rgba(255,255,255,.034)),
    var(--sm-glass-bg);
  -webkit-backdrop-filter: blur(26px) saturate(180%) contrast(112%);
  backdrop-filter: blur(26px) saturate(180%) contrast(112%);
  box-shadow:
    0 18px 52px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -1px 0 rgba(255,255,255,.035);
}

.btn-secondary::after,
.btn-nav-outline::after,
.btn-glass::after,
.ai-toggle-btn::after,
.ai-outline-btn::after,
.lesson-action-btn::after,
.btn-support-outline::after,
.btn-footer-telegram::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 16%;
  top: 1px;
  height: 1px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  opacity: .58;
}

.btn-secondary:hover,
.btn-nav-outline:hover,
.btn-glass:hover,
.ai-toggle-btn:hover,
.ai-toggle-btn:focus-visible,
.ai-outline-btn:hover,
.ai-outline-btn:focus-visible,
.lesson-action-btn:hover,
.btn-support-outline:hover,
.btn-footer-telegram:hover {
  border-color: var(--sm-glass-border-strong);
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.22), transparent 36%),
    radial-gradient(circle at 82% 110%, rgba(255,226,178,.12), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.018) 48%, rgba(255,255,255,.044)),
    var(--sm-glass-bg-strong);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: 
    linear-gradient(to bottom, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.42) 74%, var(--bg-main) 100%),
    url('../assets/webp/new_main.webp') center/cover no-repeat;
  background-size: auto, 106% auto;
  animation: heroSoftPan 22s ease-in-out infinite alternate;
}

@keyframes heroSoftPan {
  from {
    background-position: center, 48% 48%;
    background-size: auto, 106% auto;
  }
  to {
    background-position: center, 54% 52%;
    background-size: auto, 111% auto;
  }
}

@keyframes heroSoftPanMobile {
  from {
    background-position: center, 44% 42%;
    background-size: auto, auto 142%;
  }
  to {
    background-position: center, 58% 48%;
    background-size: auto, auto 152%;
  }
}

.hero-courses {
  background: 
    linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 70%, var(--bg-main) 100%),
    url('../assets/webp/hero_course.webp') center/cover no-repeat;
  min-height: clamp(360px, 52vh, 560px);
  align-items: flex-start;
  text-align: left;
  padding-top: clamp(140px, 18vh, 190px);
  padding-bottom: clamp(54px, 8vh, 92px);
  overflow: hidden;
}

.hero-courses::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 34px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(5,5,6,0), var(--bg-main) 88%);
}

.hero-courses .hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-courses .hero-subtitle {
  margin: 0 0 40px 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-glow {
  display: none;
}

.hero-top-text {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.05rem, 5vw, 3.35rem);
  line-height: .98;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ── Bento Grid (Обучение) ────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 340px;
  gap: 24px;
}

.bento-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  text-decoration: none;
  color: var(--text-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.bento-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.6s var(--ease);
}

.bento-card:hover .card-bg {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.08) 64%, transparent 100%);
  z-index: 1;
  transition: opacity 0.4s var(--ease);
}

.bento-card:hover .card-overlay {
  opacity: 0.8;
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-text h3 {
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.12;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.card-text p {
  color: rgba(255,255,255,0.8);
  font-size: .84rem;
  line-height: 1.45;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.card-arrow {
  position: absolute;
  top: 32px; right: 32px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  color: var(--text-1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.8) translate(-10px, 10px);
  transition: all 0.4s var(--ease);
  z-index: 3;
}

/* Glass badge for bento cards */
.card-badge-glass {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 12px;
  width: fit-content;
}

.card-arrow svg { width: 20px; height: 20px; }

.bento-card:hover .card-arrow {
  opacity: 1;
  transform: scale(1) translate(0, 0);
  background: var(--text-1);
  color: var(--bg-primary);
}

.bento-card .card-arrow {
  opacity: 1;
  transform: scale(1) translate(0, 0);
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.bento-card:hover .card-arrow {
  background: rgba(255,255,255,0.92);
  color: #050506;
}

/* Disabled / Coming Soon */
.bento-card.disabled {
  cursor: default;
  pointer-events: none;
}

.bento-card.disabled .card-overlay {
  background: rgba(10,10,16,0.65);
}

.bento-card.disabled:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}

.card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  padding: 6px 14px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Bento Sizing */
.bento-card.wide {
  grid-column: span 2;
}

.program-card-full {
  grid-column: 1 / -1;
}

/* ── Home Hub ───────────────────────────────────────────── */
.home-hub-section {
  padding-top: 54px;
}

.hub-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
  text-align: left;
}

.hub-section-header .section-title {
  max-width: 720px;
  margin-bottom: 8px;
}

.hub-section-header .section-desc {
  max-width: 580px;
}

.hub-kicker {
  margin: 0 0 9px;
  color: rgba(255,255,255,.38);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.86);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.program-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 34%);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: none;
  padding: 2px 4px 22px;
  margin-inline: -4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-rail-section {
  overflow: hidden;
}

.compact-rail {
  grid-auto-columns: minmax(360px, 44%);
}

.webinar-rail {
  grid-auto-columns: minmax(0, 100%);
  max-width: 100%;
}

.single-feature-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 430px;
}

.single-feature-card .hub-feature-content {
  height: auto;
  min-height: 430px;
  justify-content: flex-end;
  padding-top: 96px;
}

.program-rail::-webkit-scrollbar {
  display: none;
}

.program-rail-card {
  min-height: 398px;
  position: relative;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  color: var(--text-1);
  text-decoration: none;
  overflow: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.program-rail-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 42px rgba(0,0,0,.34);
}

.program-rail-card .card-bg,
.program-rail-card .card-overlay,
.program-rail-card .card-content {
  border-radius: inherit;
}

.program-rail-all {
  justify-content: flex-end;
  background:
    radial-gradient(circle at 24% 0%, rgba(255,255,255,.13), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
}

.program-rail-all .card-overlay {
  background:
    radial-gradient(circle at 26% 12%, rgba(255,255,255,.14), transparent 34%),
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.68) 72%, rgba(0,0,0,.82));
}

.program-rail-all span {
  position: relative;
  z-index: 2;
  color: rgba(255,255,255,.46);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.program-rail-all strong {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  max-width: 160px;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -.035em;
}

@media (hover: none), (pointer: coarse) {
  .program-rail-card,
  .program-rail-card:hover,
  .program-rail-card:focus-visible,
  .ai-time-chip,
  .ai-time-chip:hover,
  .ai-time-chip:focus-visible {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
  }

  .program-rail-card:hover .card-bg,
  .program-rail-card:focus-visible .card-bg,
  .bento-card:hover .card-bg,
  .support-card:hover .support-card-bg {
    transform: none !important;
  }
}

.hub-feature-grid {
  padding-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 280px;
  gap: 52px 16px;
}

.hub-feature-card {
  position: relative;
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-1);
  background: var(--bg-surface);
}

.hub-feature-card::before {
  content: attr(data-title);
  position: absolute;
  left: 2px;
  top: -34px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.hub-feature-content > .hub-kicker {
  display: none;
}

.hub-feature-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.hub-feature-bg,
.hub-feature-overlay {
  position: absolute;
  inset: 0;
}

.hub-feature-bg {
  background-size: cover;
  background-position: center;
  transition: transform .55s var(--ease);
}

.hub-feature-card:hover .hub-feature-bg {
  transform: scale(1.04);
}

.hub-feature-overlay {
  background:
    linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.46)),
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.12), transparent 36%);
}

.hub-feature-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hub-feature-content h3 {
  margin: 0 0 10px;
  max-width: 560px;
  font-size: clamp(20px, 2.65vw, 32px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.hub-feature-card:not(.hub-feature-card-large) .hub-feature-content h3 {
  font-size: 20px;
}

.hub-feature-content p {
  margin: 0;
  max-width: 480px;
  color: rgba(255,255,255,.66);
  font-size: 14px;
  line-height: 1.5;
}

.hub-session-card strong {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.22), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  color: #fff;
  font-size: 14px;
}

/* ── Programs Page ─────────────────────────────────────── */
.programs-main {
  padding-top: 126px;
}

.programs-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px 12px;
}

.programs-hero-copy {
  max-width: 820px;
}

.programs-search-shell {
  width: min(100%, 920px);
  margin: 0 0 18px;
}

.programs-hero h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 96px);
  line-height: .92;
  letter-spacing: -.07em;
}

.programs-hero p:not(.hub-kicker) {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--text-2);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
}

.programs-catalog-section {
  padding-top: 0;
}

.programs-catalog-section .section-header {
  text-align: left;
  margin-bottom: 28px;
}

/* ── Minimal List (Каналы) ────────────────────────────────── */
.minimal-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.minimal-list-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none !important;
  color: var(--text-1) !important;
  transition: all 0.3s var(--ease);
}

.minimal-list-item:visited,
.minimal-list-item:active,
.minimal-list-item:link {
  color: var(--text-1) !important;
  text-decoration: none !important;
}

.minimal-list-item:hover {
  background: rgba(255, 255, 255, 0.02);
  padding-left: 24px;
  padding-right: 24px;
}

.minimal-list-number {
  font-size: 3rem;
  font-weight: 300;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  width: 120px;
  flex-shrink: 0;
  transition: color 0.3s var(--ease);
}

.minimal-list-item:hover .minimal-list-number {
  color: var(--text-1);
}

.minimal-list-content {
  flex: 1;
  padding-left: 40px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.minimal-list-content h3 {
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-1);
}

.minimal-list-content p {
  font-size: 1rem;
  color: var(--text-2);
  margin: 0;
}

.minimal-list-arrow {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  opacity: 0.5;
  transition: all 0.3s var(--ease);
  margin-left: auto;
}

.minimal-list-arrow svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s var(--ease);
}

.minimal-list-item:hover .minimal-list-arrow {
  opacity: 1;
}

.minimal-list-item:hover .minimal-list-arrow svg {
  transform: translateX(8px);
}

/* ── Courses List (Horizontal Cards) ──────────────────────── */
.courses-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 80px;
}

.course-card {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-1);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  position: relative;
  min-height: 200px;
  max-height: 240px;
}

.course-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  background: var(--bg-card-hover);
}

.course-image {
  width: 35%;
  min-width: 300px;
  position: relative;
  overflow: hidden;
  display: flex;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.course-card:hover .course-image img {
  transform: scale(1.05);
}

.course-info {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.course-text h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-1);
}

.course-text p {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 90%;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 0.875rem;
  margin-top: auto;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.meta-dot {
  opacity: 0.5;
}

.course-arrow {
  position: absolute;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: all 0.3s var(--ease);
}

.course-arrow svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s var(--ease);
}

.course-card:hover .course-arrow {
  color: var(--text-1);
}

.course-card:hover .course-arrow svg {
  transform: translateX(6px);
}

/* ── Program Search ─────────────────────────────────────── */
.program-search-shell {
  width: min(100%, 920px);
  margin: 0 auto 34px;
  position: relative;
}

.program-search-box {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 58px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% -45%, rgba(255,255,255,.2), transparent 36%),
    radial-gradient(circle at 96% 140%, rgba(255,255,255,.06), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 54%, rgba(255,255,255,.026)),
    rgba(2, 4, 8, .16);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    0 20px 58px rgba(0,0,0,.52),
    0 1px 0 rgba(255,255,255,.08),
    inset 0 1px 0 rgba(255,255,255,.2),
    inset 0 -1px 0 rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(38px) saturate(210%) contrast(118%) brightness(1.04);
  backdrop-filter: blur(38px) saturate(210%) contrast(118%) brightness(1.04);
  overflow: hidden;
}

.program-search-box::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.018) 44%, rgba(255,255,255,.035)),
    linear-gradient(105deg, rgba(255,255,255,.08), transparent 32%, rgba(255,255,255,.045));
}

.program-search-box::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  top: 7px;
  height: 1px;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  opacity: .7;
}

.program-search-box:focus-within {
  border-color: rgba(255,255,255,.28);
  background:
    radial-gradient(circle at 18% -45%, rgba(255,255,255,.27), transparent 38%),
    radial-gradient(circle at 96% 140%, rgba(255,255,255,.08), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,.066), rgba(255,255,255,.014) 54%, rgba(255,255,255,.035)),
    rgba(2, 4, 8, .2);
  box-shadow:
    0 26px 82px rgba(0,0,0,.54),
    0 0 34px rgba(255,255,255,.035),
    inset 0 1px 0 rgba(255,255,255,.26);
}

.program-search-box svg {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  margin-left: 20px;
  color: rgba(255,255,255,.68);
  flex: 0 0 auto;
}

.program-search-input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255,255,255,.92);
  font: 600 clamp(15px, 1.7vw, 17px)/1.2 Inter, sans-serif;
  padding: 0 20px 0 13px;
}

.program-search-input::placeholder {
  color: rgba(255,255,255,.4);
}

.program-search-meta {
  display: none;
}

.program-search-shell + .section-title {
  margin-top: 0;
}

.program-search-hidden {
  display: none !important;
}

.program-search-empty {
  display: none;
  margin: 28px auto 0;
  max-width: 520px;
  color: rgba(255,255,255,.55);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.program-search-empty.visible {
  display: block;
}

@media (max-width: 640px) {
  .program-search-shell {
    width: 100%;
    margin-bottom: 26px;
  }

  .program-search-box {
    min-height: 58px;
    border-radius: 24px;
  }

  .program-search-box svg {
    width: 21px;
    height: 21px;
    margin-left: 18px;
  }

  .program-search-input {
    padding-left: 12px;
    padding-right: 18px;
    font-size: 16px;
  }
}

/* ── Course Page ──────────────────────────────────────────── */
.course-page {
  padding-top: 120px;
}

.back-link-container {
  margin-bottom: 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.back-link--glass {
  padding: 10px 20px 10px 16px;
  border-radius: var(--r-pill);
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.back-link--glass::after {
  display: none;
}

.back-link--glass:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.back-link--glass svg {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}

.back-link--glass:hover svg {
  transform: translateX(-3px);
}

.back-link-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.76);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.14), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
  box-shadow: 0 12px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
  margin-bottom: 24px;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.back-link-glass::after {
  display: none;
}

.back-link-glass:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}

.back-link-glass svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.course-back-wrap {
  padding: 32px 24px 0;
  max-width: 1280px;
  margin: 0 auto 4px;
  box-sizing: border-box;
}

.course-back-wrap + div[style*="max-width:1280px"],
.course-back-wrap + .therapy-inner {
  padding-top: 0 !important;
}

.course-page-shell {
  padding: 32px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .course-back-wrap {
    padding: 8px 14px 0;
    position: sticky;
    top: calc(76px + env(safe-area-inset-top));
    z-index: 850;
    pointer-events: none;
  }

  .course-back-wrap .back-link-glass,
  .back-link-glass {
    position: sticky;
    top: calc(76px + env(safe-area-inset-top));
    z-index: 850;
    margin-bottom: 14px !important;
    pointer-events: auto;
  }
}

.course-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.course-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Десктоп: сообщество — ширина карточек как на главной ── */
@media (min-width: 901px) {
  body.community-page .ux-community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(22px, 2.6vw, 36px);
    max-width: 1100px !important;
  }

  body.community-page .ux-community-card-wide {
    grid-column: span 2;
  }

  body.community-page .ux-community-card strong {
    font-size: clamp(20px, 2.2vw, 28px);
  }
}

/* ── Десктоп: «Работа с травмами» — ограничение плеера, читаемая сетка ── */
@media (min-width: 769px) {
  body.trauma-course-page .trauma-page {
    max-width: min(1180px, 100%);
    margin-inline: auto;
    padding-top: clamp(20px, 2.8vh, 44px);
    padding-bottom: 48px;
    padding-inline: clamp(20px, 2.4vw, 32px);
  }

  body.trauma-course-page .course-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(270px, 340px);
    gap: clamp(22px, 3vw, 40px);
  }

  body.trauma-course-page .course-main .video-container {
    width: 100%;
    max-width: min(900px, 100%);
    max-height: min(58vh, 540px);
    margin-inline: 0;
    border-radius: 22px;
  }

  body.trauma-course-page .hero.hero-courses {
    min-height: clamp(240px, 30vh, 360px);
  }
}

.ai-lesson-panel {
  position: relative;
  display: none;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow:
    none;
  padding: 0;
}

.ai-lesson-panel.visible {
  display: block;
}

.video-container + .ai-timeline-panel.visible,
.now-playing + .ai-timeline-panel.visible {
  margin-top: clamp(28px, 4.5vw, 46px);
}

.ai-lesson-panel::before {
  display: none;
}

.ai-lesson-panel::after {
  display: none;
}

.course-ai-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 16px;
}

.course-ai-section-head h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.05;
  letter-spacing: -.04em;
  text-shadow: 0 18px 48px rgba(0,0,0,.52);
}

.course-ai-section-head p {
  margin: 0;
  color: rgba(255,255,255,.4);
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
}

.course-ai-section-head-analysis {
  margin-top: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
}

.ai-lesson-inner {
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(2, 3, 6, .18);
  -webkit-backdrop-filter: blur(34px) saturate(170%) contrast(108%);
  backdrop-filter: blur(34px) saturate(170%) contrast(108%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(255,255,255,.035),
    inset 0 0 42px rgba(0,0,0,.18),
    0 28px 90px rgba(0,0,0,.58),
    0 0 0 1px rgba(255,255,255,.02);
  padding: clamp(24px, 3.8vw, 38px);
  max-width: none;
}

.ai-lesson-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  width: fit-content;
  margin: 0 0 18px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background:
    radial-gradient(circle at 24% 0%, rgba(255,255,255,.18), transparent 36%),
    radial-gradient(circle at 78% 100%, rgba(255,219,170,.08), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.012) 48%, rgba(255,255,255,.035)),
    rgba(2,3,7,.28);
  color: rgba(255,255,255,.96);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(26px) saturate(190%) contrast(116%);
  backdrop-filter: blur(26px) saturate(190%) contrast(116%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -1px 0 rgba(255,255,255,.035),
    inset 0 0 22px rgba(255,255,255,.035),
    0 14px 36px rgba(0,0,0,.36),
    0 0 26px rgba(255,226,178,.055);
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

.ai-lesson-badge::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), transparent 36%),
    linear-gradient(90deg, rgba(255,255,255,.055), transparent 42%, rgba(255,255,255,.04));
  opacity: .78;
}

.ai-lesson-badge::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 18%;
  top: 1px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
  opacity: .72;
}

.ai-lesson-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle at 76% 66%, rgba(255,226,178,.16), transparent 24%),
    linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.5) 42%, rgba(0,0,0,.14) 100%),
    url('../assets/webp/open_all.webp');
  background-size: cover;
  background-position: center right;
  opacity: .94;
  transform: scale(1.015);
}

.ai-lesson-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 62%, rgba(255,222,178,.1), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.045), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 30%, rgba(0,0,0,.22) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    inset 1px 0 0 rgba(255,255,255,.04),
    inset -1px 0 0 rgba(255,255,255,.025);
}

.ai-lesson-title,
.ai-lesson-summary,
.ai-lesson-actions,
.ai-expanded {
  position: relative;
  z-index: 2;
}

.ai-timeline-panel {
  display: none;
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  padding: 0;
}

.ai-timeline-panel::before {
  display: none;
}

.ai-lesson-timeline {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  margin: 0;
  padding: 0 2px 8px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 0;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ai-lesson-timeline::before {
  display: none;
}

.ai-timeline-panel.visible {
  display: block;
}


.ai-lesson-timeline::-webkit-scrollbar {
  display: none;
}

.ai-time-chip {
  flex: 0 0 clamp(220px, 28vw, 340px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.055), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    rgba(8,10,16,.22);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  backdrop-filter: blur(28px) saturate(175%);
  color: rgba(255,255,255,.88);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 13px 15px;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(255,255,255,.025),
    0 12px 34px rgba(0,0,0,.28);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.ai-time-chip:hover,
.ai-time-chip:focus-visible {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.16);
  color: #fff;
  transform: translateY(-1px);
}

.ai-time-chip-time {
  color: rgba(255,255,255,.52);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ai-time-chip-title {
  overflow: hidden;
  color: inherit;
  display: -webkit-box;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-lesson-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -.03em;
  text-shadow: 0 18px 42px rgba(0,0,0,.45);
}

.ai-lesson-summary {
  margin: 0;
  max-width: 760px;
  color: rgba(255,255,255,.76);
  font-size: 15px;
  line-height: 1.65;
  text-shadow: 0 12px 34px rgba(0,0,0,.42);
}

.ai-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ai-toggle-btn {
  border: 1px solid rgba(255,255,255,.16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  color: rgba(255,255,255,.94);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.08), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.018)),
    rgba(8,10,16,.22);
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(255,255,255,.025),
    0 16px 44px rgba(0,0,0,.35),
    0 0 30px rgba(255,230,190,.06);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  backdrop-filter: blur(26px) saturate(175%);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.ai-toggle-btn:hover,
.ai-toggle-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.24);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.024)),
    rgba(10,12,18,.28);
}

.ai-toggle-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid rgba(255,255,255,.92);
  filter: drop-shadow(0 0 10px rgba(255,255,255,.2));
}

.ai-outline-btn {
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 24% 0%, rgba(255,255,255,.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
  color: rgba(255,255,255,.82);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.ai-expanded {
  display: none;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.ai-lesson-panel.expanded .ai-expanded {
  display: block;
}

.ai-section-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.ai-rich-text {
  color: rgba(255,255,255,.74);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.ai-chapters {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.ai-chapter-btn {
  flex: 0 0 min(84vw, 420px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  color: rgba(255,255,255,.86);
  cursor: pointer;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ai-chapter-btn:hover,
.ai-chapter-btn:focus-visible {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
}

.ai-chapter-time {
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ai-chapter-title {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.ai-chapter-desc {
  grid-column: 2;
  margin-top: -6px;
  color: rgba(255,255,255,.56);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .video-container + .ai-timeline-panel.visible,
  .now-playing + .ai-timeline-panel.visible {
    margin-top: 34px;
  }

  .course-ai-section-head-analysis {
    margin-top: 34px;
    margin-bottom: 14px;
  }

  .ai-timeline-panel,
  .ai-lesson-panel {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .ai-lesson-timeline,
  .ai-lesson-inner {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .ai-lesson-panel {
    padding: 0;
  }

  .ai-lesson-inner {
    border-radius: 24px;
    padding: 20px;
  }

  .ai-lesson-inner::before {
    background-position: 64% center;
    opacity: .82;
  }

  .ai-timeline-panel {
    margin-top: -10px;
  }

  .course-ai-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin: 0 18px 10px;
    padding-inline: 0;
  }

  .course-ai-section-head p {
    display: none;
  }

  .ai-time-chip {
    flex-basis: min(68vw, 260px);
    min-height: 76px;
  }

  .ai-lesson-title {
    font-size: 24px;
  }

  .ai-chapter-btn {
    flex-basis: 82vw;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .ai-chapter-desc {
    grid-column: auto;
    margin-top: 0;
  }
}

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    var(--bg-main);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.58),
    0 0 54px rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -40px 70px rgba(0, 0, 0, 0.32);
  position: relative;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
  clip-path: inset(0 round 22px);
}

.video-container::before,
.single-video-wrap::before,
.player-video-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.025),
    inset 0 0 36px rgba(0,0,0,.45),
    inset 0 -72px 70px rgba(0,0,0,.46);
}

.video-container::after,
.single-video-wrap::after,
.player-video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  opacity: .08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.15), transparent 18%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 100% 3px;
  mix-blend-mode: screen;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: inherit !important;
}

.media-mode-switch {
  width: fit-content;
  margin: 0 0 14px auto;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--sm-glass-border);
  border-radius: 999px;
  background:
    radial-gradient(circle at 24% 0%, rgba(255,255,255,.13), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.01)),
    rgba(3,4,8,.34);
  -webkit-backdrop-filter: blur(24px) saturate(175%) contrast(112%);
  backdrop-filter: blur(24px) saturate(175%) contrast(112%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(255,255,255,.035),
    0 14px 36px rgba(0,0,0,.34);
  position: relative;
  z-index: 12;
}

.media-mode-switch button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.62);
  font: 800 12px/1 Inter, sans-serif;
  letter-spacing: -.01em;
}

.media-mode-switch button.active {
  color: rgba(255,255,255,.96);
  background:
    radial-gradient(circle at 28% 0%, rgba(255,255,255,.24), transparent 36%),
    radial-gradient(circle at 84% 110%, rgba(255,226,178,.1), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.035)),
    rgba(255,255,255,.035);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -1px 0 rgba(255,255,255,.035),
    0 8px 20px rgba(0,0,0,.24);
}

.video-container.audio-inline-active video,
.video-container.audio-inline-active .video-preview-overlay,
.video-container.audio-inline-active .video-placeholder,
.video-container.audio-inline-active .watermark {
  opacity: 0;
  pointer-events: none;
}

.audio-inline-card {
  position: absolute;
  inset: 0;
  z-index: 7;
  width: 100%;
  border: 0;
  border-radius: inherit;
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  align-items: center;
  gap: clamp(16px, 4vw, 32px);
  padding: clamp(20px, 5vw, 40px);
  background: #090909;
  color: #fff;
  text-align: left;
  overflow: hidden;
}

.audio-inline-card::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: var(--audio-artwork, url('/assets/webp/ai_back.webp')) center/cover no-repeat;
  filter: blur(34px) brightness(.42) saturate(1.2);
  z-index: 0;
}

.audio-inline-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,.12), transparent 34%),
    linear-gradient(90deg, rgba(0,0,0,.42), rgba(0,0,0,.68));
}

.audio-inline-card > * {
  position: relative;
  z-index: 1;
}

.audio-inline-card.hidden {
  display: none;
}

.audio-inline-art {
  width: min(32vw, 180px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  box-shadow: 0 22px 58px rgba(0,0,0,.42);
}

.audio-inline-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.audio-inline-copy {
  min-width: 0;
  max-width: 460px;
}

.audio-inline-kicker {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.64);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.audio-inline-copy strong {
  display: block;
  color: #fff;
  font-size: clamp(22px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-inline-copy small {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.62);
  font-size: 14px;
}

/* ── Audio Player: native app style now-playing screen ── */
html:has(body.audio-player-open) {
  overflow: hidden;
  scrollbar-width: none;
}
body.audio-player-open {
  overflow: hidden;
  scrollbar-width: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
html:has(body.audio-player-open)::-webkit-scrollbar,
body.audio-player-open::-webkit-scrollbar {
  display: none;
}

.audio-mode-card {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 0 18px;
  background: #050505;
  color: #fff;
  overflow: hidden;
  scrollbar-width: none;
  isolation: isolate;
}

.audio-mode-card::-webkit-scrollbar {
  display: none;
}

.audio-mode-card::before,
.audio-mode-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.audio-mode-card::before {
  inset: -18%;
  background:
    linear-gradient(180deg, rgba(0,0,0,.1), #050505 78%),
    var(--audio-artwork, url('/assets/webp/ai_back.webp')) center/cover no-repeat;
  filter: blur(64px) brightness(.34) saturate(1.65);
  transform: scale(1.08);
  z-index: -2;
}

.audio-mode-card::after {
  inset: 0;
  background:
    radial-gradient(circle at 50% 6%, rgba(255,255,255,.16), transparent 32%),
    linear-gradient(180deg, rgba(0,0,0,.04) 0%, rgba(0,0,0,.58) 54%, #050505 100%);
  z-index: -1;
}

.audio-mode-card.hidden {
  display: none;
}

.audio-mode-card audio {
  display: none;
}

.audio-mode-shell {
  width: min(430px, 100%);
  height: 100dvh;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(200px, 1fr) auto;
  align-items: center;
  padding: calc(44px + env(safe-area-inset-top, 0px)) 0 calc(44px + env(safe-area-inset-bottom, 0px));
}

.audio-mode-topbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.audio-mode-eyebrow {
  min-width: 0;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}

.audio-mode-close,
.audio-mode-menu {
  position: relative;
  isolation: isolate;
  overflow: visible;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.92);
  background:
    radial-gradient(ellipse 130% 90% at 50% -8%, rgba(255,255,255,.26), transparent 55%),
    radial-gradient(circle at 72% 108%, rgba(255,255,255,.07), transparent 42%),
    linear-gradient(165deg, rgba(255,255,255,.16), rgba(255,255,255,.045));
  -webkit-backdrop-filter: blur(42px) saturate(190%) brightness(1.04);
  backdrop-filter: blur(42px) saturate(190%) brightness(1.04);
  box-shadow:
    0 10px 32px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(255,255,255,.07),
    inset 0 -12px 28px rgba(0,0,0,.14);
}

.audio-mode-close::after,
.audio-mode-menu::after {
  content: none;
}

.audio-mode-close:active,
.audio-mode-menu:active {
  transform: scale(.97);
}

.audio-mode-close:hover,
.audio-mode-menu:hover {
  border-color: rgba(255,255,255,.22);
  background:
    radial-gradient(ellipse 130% 90% at 50% -8%, rgba(255,255,255,.32), transparent 55%),
    radial-gradient(circle at 72% 108%, rgba(255,255,255,.10), transparent 44%),
    linear-gradient(165deg, rgba(255,255,255,.20), rgba(255,255,255,.065));
}

.audio-mode-close svg,
.audio-mode-menu svg,
.audio-mode-controls svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audio-mode-art {
  width: min(74vw, 330px);
  aspect-ratio: 1;
  justify-self: center;
  align-self: end;
  margin: clamp(22px, 5vh, 44px) 0 clamp(24px, 5vh, 42px);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  box-shadow:
    0 42px 95px rgba(0,0,0,.64),
    0 2px 0 rgba(255,255,255,.4) inset;
  transform: translateZ(0);
}

.audio-mode-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.audio-mode-body {
  width: 100%;
  min-width: 0;
  align-self: start;
}

.audio-mode-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 24px;
}

.audio-mode-title {
  min-width: 0;
  color: #fff;
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -.045em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-mode-artist {
  color: rgba(255,255,255,.58);
  font-size: 15px;
  font-weight: 650;
}

.audio-mode-progress {
  position: relative;
  height: 20px;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.audio-mode-progress::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
}

.audio-mode-progress span {
  position: relative;
  display: block;
  width: 0%;
  height: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 18px rgba(255,255,255,.22);
  transition: width .08s linear;
}

.audio-mode-progress span::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
  transform: translateY(-50%) scale(.72);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}

.audio-mode-progress:hover span::after,
.audio-mode-progress:active span::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.audio-mode-time {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  color: rgba(255,255,255,.48);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.audio-mode-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.audio-mode-controls button {
  position: relative;
  isolation: isolate;
  overflow: visible;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 125% 88% at 50% -10%, rgba(255,255,255,.22), transparent 52%),
    radial-gradient(circle at 68% 112%, rgba(255,255,255,.06), transparent 40%),
    linear-gradient(158deg, rgba(255,255,255,.13), rgba(255,255,255,.038)),
    rgba(8,10,14,.22);
  color: rgba(255,255,255,.86);
  font: 850 12px/1 Inter, sans-serif;
  -webkit-backdrop-filter: blur(40px) saturate(185%) brightness(1.03);
  backdrop-filter: blur(40px) saturate(185%) brightness(1.03);
  box-shadow:
    0 12px 30px rgba(0,0,0,.38),
    inset 0 0 0 1px rgba(255,255,255,.06),
    inset 0 -14px 26px rgba(0,0,0,.16);
  -webkit-tap-highlight-color: transparent;
}

.audio-mode-controls button::after {
  content: none;
}

.audio-mode-controls [data-audio-seek],
.audio-mode-controls [data-seek] {
  color: rgba(255,255,255,.82);
}

.audio-mode-controls [data-audio-track],
.audio-mode-controls [data-track] {
  color: rgba(255,255,255,.58);
}

.audio-mode-controls .audio-mode-play {
  width: 72px;
  height: 72px;
  min-width: 72px;
  color: #fff;
  border-color: rgba(255,255,255,.28);
  background:
    radial-gradient(ellipse 115% 95% at 45% -5%, rgba(255,255,255,.52), transparent 48%),
    radial-gradient(circle at 72% 108%, rgba(255,255,255,.18), transparent 38%),
    linear-gradient(158deg, rgba(255,255,255,.30), rgba(255,255,255,.09)),
    rgba(255,255,255,.12);
  box-shadow:
    0 22px 52px rgba(0,0,0,.48),
    inset 0 0 0 1px rgba(255,255,255,.12),
    inset 0 -18px 34px rgba(0,0,0,.12),
    0 0 0 7px rgba(255,255,255,.04);
}

.audio-mode-controls .audio-mode-play svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.35;
}

.audio-icon-pause,
.audio-mode-card.is-playing .audio-icon-play {
  display: none !important;
}

.audio-mode-card.is-playing .audio-icon-pause {
  display: block !important;
}

.audio-mode-card:not(.is-playing) .audio-icon-play {
  display: block !important;
}

.audio-mode-card:not(.is-playing) .audio-icon-pause {
  display: none !important;
}

.audio-mode-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 3002;
  max-height: min(58vh, 460px);
  padding: 10px 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 28px;
  background: rgba(16,16,18,.86);
  box-shadow: 0 -26px 80px rgba(0,0,0,.58);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  transform: translateY(0);
  animation: audioSheetIn .24s ease both;
}

.audio-mode-sheet.hidden {
  display: none;
}

.audio-mode-sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
}

.audio-mode-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px 12px;
}

.audio-mode-sheet-head span {
  display: block;
  color: rgba(255,255,255,.48);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audio-mode-sheet-head strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.audio-mode-sheet-head button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  font-size: 22px;
  line-height: 1;
}

.audio-mode-chapters {
  max-height: calc(min(58vh, 460px) - 86px);
  padding: 0 2px 2px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.audio-mode-chapters::-webkit-scrollbar {
  display: none;
}

.audio-mode-chapters button {
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  background: rgba(255,255,255,.075);
  color: #fff;
  text-align: left;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

@keyframes audioSheetIn {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

.audio-mode-chapters span {
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.audio-mode-chapters strong {
  min-width: 0;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.audio-player-open {
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
}

body.audio-player-open::-webkit-scrollbar {
  display: none;
}

/* hide timecodes under video when audio tab is active */
.video-container.audio-inline-active ~ .ai-timeline-panel {
  display: none !important;
}

.course-author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0 8px;
}

.course-author-avatar-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.course-author-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--bg-main);
}

.course-author-name {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.course-details {
  padding: 8px 0 0;
}

.course-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text-1);
}

.course-desc {
  font-size: 1.125rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 52ch;
}

.course-sidebar {
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
  position: sticky;
  top: 100px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.lessons-count {
  font-size: 0.875rem;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: var(--r-pill);
}

.lessons-list {
  overflow-y: auto;
  flex: 1;
}

.lessons-list::-webkit-scrollbar {
  width: 6px;
}

.lessons-list::-webkit-scrollbar-track {
  background: transparent;
}

.lessons-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.lesson-item {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.lesson-item:last-child {
  border-bottom: none;
}

.lesson-item:hover {
  background: var(--bg-card-hover);
}

.lesson-item.active {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035));
  border-left: 1px solid rgba(255,255,255,.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 0 28px rgba(255,255,255,.045);
}

.lesson-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-2);
  font-weight: 500;
  flex-shrink: 0;
}

.lesson-item.active .lesson-number {
  background: #fff;
  color: var(--bg-main);
  box-shadow: 0 0 18px rgba(255,255,255,.22);
}

.lesson-info {
  flex: 1;
}

.lesson-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 4px;
}

.lesson-dur {
  font-size: 0.8125rem;
  color: var(--text-3);
}

.lesson-play-icon {
  opacity: 0;
  color: var(--text-1);
  transition: opacity 0.2s var(--ease);
}

.lesson-item:hover .lesson-play-icon,
.lesson-item.active .lesson-play-icon {
  opacity: 1;
}

/* ── Lesson Info Block (under player) ───────────────────── */
.lesson-info-block {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lesson-title-main {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
  letter-spacing: -0.02em;
}

.lesson-desc-main {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 640px;
}

.lesson-action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-1);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.lesson-action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.lesson-resources {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.lesson-resource {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 0.8125rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.lesson-resource:hover {
  background: var(--bg-card-hover);
  color: var(--text-1);
  border-color: var(--border-hover);
}

.lesson-resource svg {
  width: 24px;
  height: 24px;
  color: var(--text-3);
  transition: color 0.2s;
}

.lesson-resource:hover svg {
  color: var(--text-1);
}

@media (max-width: 768px) {
  .lesson-resources {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Support Grid ─────────────────────────────────────────── */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.support-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.support-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.support-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.6s var(--ease);
}

.support-card:hover .support-card-bg {
  transform: scale(1.05);
}

.support-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.support-card-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.support-icon {
  width: 48px; height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 60px;
}

.support-icon svg { width: 24px; height: 24px; color: var(--text-1); }

.support-text h3 { 
  font-size: 2rem; 
  margin-bottom: 12px; 
  color: var(--text-1);
}
.support-text p { 
  color: var(--text-2); 
  margin-bottom: 32px; 
  line-height: 1.6; 
  max-width: 80%;
}

/* Support Buttons */
.btn-support-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-pill);
  color: var(--text-1);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.3s var(--ease);
  background: transparent;
}

.btn-support-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-support-outline svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.btn-support-outline:hover svg {
  transform: translateX(4px);
}

.btn-support-text {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: var(--text-1);
  font-size: 0.9375rem;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn-support-text-label {
  position: relative;
}

.btn-support-text-label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s var(--ease);
}

.btn-support-text:hover .btn-support-text-label::after {
  background: rgba(255, 255, 255, 0.8);
}

.btn-support-text svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.btn-support-text:hover svg {
  transform: translateX(4px);
}

.mt-auto { margin-top: auto; }

/* ── Author Section ───────────────────────────────────────── */
.author-card {
  display: flex;
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.author-photo {
  flex-shrink: 0;
  width: 380px;
  height: 480px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #1a1a1f;
}

.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.author-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.author-headline {
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 8px;
}

.author-bio {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 540px;
}

.author-bio p {
  font-size: 1rem;
  line-height: 1.7;
  color: #9a9a9a;
  margin: 0;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: #0c0c0f;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 72px 0 0;
  margin-top: 64px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 72px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-content > .footer-col:not(.footer-about):not(.footer-cta) {
  display: none;
}

.footer-about {
  max-width: 220px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.footer-heading {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-list a {
  color: #888;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-list a:hover { color: #fff; }

.footer-desc {
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.7;
  margin: 0;
}

.footer-copy {
  font-size: 0.75rem;
  color: #555;
  margin: 0;
  line-height: 1.7;
}

.footer-cta {
  max-width: 260px;
}

.btn-footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #1a1a1f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  color: #ccc;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-footer-telegram svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-footer-telegram:hover {
  background: #22222a;
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1a1f;
  color: #777;
  transition: all 0.2s;
}

.footer-socials a svg {
  width: 16px;
  height: 16px;
}

.footer-socials a:hover {
  background: #22222a;
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 28px 64px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #555;
}

.footer-trust {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-trust svg {
  width: 14px;
  height: 14px;
  color: #555;
}

.footer-craft {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-craft svg {
  width: 14px;
  height: 14px;
  color: #555;
}

/* ── iOS Glass Tab Bar (Mobile) ───────────────────────────── */
.glass-tab-bar {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  z-index: 100;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-3);
  text-decoration: none;
  width: 64px;
  height: 56px;
  transition: color 0.2s var(--ease);
}

.tab-item svg { width: 24px; height: 24px; }
.tab-item span { font-size: 10px; font-weight: 500; }

.tab-item.active { color: var(--text-1); }

/* ── Animations ───────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUpAnim 0.8s var(--ease) forwards;
}

@keyframes fadeUpAnim {
  to { opacity: 1; transform: translateY(0); }
}

.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.2s; }
.fade-up:nth-child(3) { animation-delay: 0.3s; }
.fade-up:nth-child(4) { animation-delay: 0.4s; }

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bento-card.wide {
    grid-column: span 2;
  }

  .section-title { font-size: 1.75rem; }
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
  
  .glass-tab-bar {
    display: flex;
    width: calc(100% - 48px);
    justify-content: space-between;
  }

  .hero {
    padding: 132px 0 52px;
    min-height: min(62vh, 560px);
    background-repeat: no-repeat;
    animation-name: heroSoftPanMobile;
    animation-duration: 18s;
  }

  .hero .hero-content {
    padding-inline: 20px;
    max-width: 28rem;
    margin-inline: auto;
  }

  .hero-subtitle {
    margin-bottom: 28px;
    font-size: clamp(1rem, 3.8vw, 1.125rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 17.5rem;
    margin-inline: auto;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 17.5rem;
    justify-content: center;
  }

  .hero-actions .btn-lg {
    padding: 12px 20px;
    font-size: 0.9375rem;
  }

  .hero-courses .hero-content {
    max-width: none;
    width: 100%;
    padding-inline: 24px;
  }

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

  .hero-courses .hero-title {
    margin-bottom: 14px;
  }

  .hero-courses .hero-subtitle {
    margin-bottom: 0;
  }

  .course-card {
    flex-direction: column;
    min-height: auto;
    max-height: none;
  }

  .course-image {
    width: 100%;
    height: 240px;
    min-width: unset;
  }

  .course-info {
    padding: 24px;
  }

  .course-text h3 {
    font-size: 1.25rem;
  }

  .course-text p {
    max-width: 100%;
    font-size: 0.9375rem;
  }

  .course-arrow {
    display: none;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 340px;
  }

  .bento-card { padding: 32px; }

  .hero + .section {
    padding-top: 14px;
  }

  .hero:not(.hero-courses) {
    min-height: clamp(500px, 70vh, 660px);
    padding-top: 150px;
    padding-bottom: 68px;
  }
  
  .bento-card.wide {
    grid-column: span 1;
  }

  .home-hub-section {
    padding-top: 34px;
  }

  .hub-section-header {
    display: block;
    margin-bottom: 20px;
  }

  .hub-link {
    margin-top: 16px;
  }

  .program-rail {
    width: 100vw;
    grid-auto-columns: minmax(276px, 76vw);
    gap: 12px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 2px 18px 16px;
    scroll-padding-inline: 18px;
  }

  .compact-rail {
    grid-auto-columns: minmax(276px, 76vw);
  }

  .webinar-rail {
    grid-auto-columns: minmax(276px, 76vw);
    max-width: none;
  }

  .home-programs-section,
  .home-rail-section {
    overflow: visible;
  }

  .program-rail-card {
    min-height: 348px;
    padding: 22px;
  }

  .program-rail-card,
  .program-rail-card:hover,
  .program-rail-card:focus-visible,
  .ai-time-chip,
  .ai-time-chip:hover,
  .ai-time-chip:focus-visible {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
  }

  .program-rail-card:hover {
    box-shadow: 0 14px 32px rgba(0,0,0,.28);
  }

  .program-rail-card:hover .card-bg,
  .program-rail-card:focus-visible .card-bg {
    transform: none !important;
  }

  .hub-feature-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 54px;
  }

  .hub-feature-card,
  .hub-feature-card-large {
    grid-column: auto;
    grid-row: auto;
    min-height: 300px;
  }

  .hub-feature-card-large {
    min-height: 380px;
  }

  .hub-feature-content {
    padding: 22px;
  }

  .programs-main {
    padding-top: calc(176px + env(safe-area-inset-top, 0px));
  }

  .programs-hero {
    padding: 0 18px 10px;
  }

  .programs-search-shell {
    position: fixed;
    top: calc(106px + env(safe-area-inset-top, 0px));
    left: 14px;
    right: 14px;
    z-index: 720;
    width: auto;
    margin: 0;
    transition: opacity .24s ease, transform .24s ease, filter .24s ease;
    will-change: opacity, transform;
  }

  body.programs-search-hidden .programs-search-shell {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-18px) scale(.985);
    filter: blur(2px);
  }

  .programs-page .program-search-box {
    background:
      linear-gradient(180deg, rgba(255,255,255,.048), rgba(255,255,255,.008) 48%, rgba(255,255,255,.018)),
      rgba(255,255,255,.026) !important;
    border-color: rgba(255,255,255,.2) !important;
    box-shadow:
      0 18px 58px rgba(0,0,0,.58),
      inset 0 1px 0 rgba(255,255,255,.26),
      inset 0 -1px 0 rgba(255,255,255,.045),
      inset 16px 0 38px rgba(255,255,255,.025),
      inset -18px 0 42px rgba(255,255,255,.018) !important;
    -webkit-backdrop-filter: blur(42px) saturate(220%) contrast(120%) brightness(1.08) !important;
    backdrop-filter: blur(42px) saturate(220%) contrast(120%) brightness(1.08) !important;
  }

  .programs-page .program-search-box::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,0) 42%),
      linear-gradient(100deg, rgba(255,255,255,.055), transparent 34%, rgba(255,255,255,.035)) !important;
  }

  .programs-page .program-search-box::after {
    left: 18px;
    right: 18px;
    top: 6px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent) !important;
    opacity: .78 !important;
  }

  .programs-page .program-search-box:focus-within {
    background:
      linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.01) 48%, rgba(255,255,255,.024)),
      rgba(255,255,255,.035) !important;
    border-color: rgba(255,255,255,.28) !important;
  }

  .programs-hero h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .minimal-list-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 0;
  }

  .minimal-list-number {
    font-size: 2.5rem;
    width: auto;
    margin-bottom: 16px;
  }

  .minimal-list-content {
    padding-left: 0;
    border-left: none;
    margin-bottom: 16px;
  }

  .minimal-list-arrow {
    align-self: flex-end;
  }

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

  .course-sidebar {
    max-height: 500px;
    position: static;
  }

  .course-main,
  .course-layout {
    min-width: 0;
    overflow: visible;
  }

  .course-title {
    font-size: 1.6rem;
  }

  .video-container {
    border-radius: var(--r-sm);
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    aspect-ratio: 16 / 10;
    min-height: clamp(246px, 64vw, 365px);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .video-container.video-text-preview-container {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .video-container.video-text-preview-container .video-preview-overlay {
    background-position: center 48%;
  }

  .media-mode-switch {
    margin: 0 0 10px auto;
  }

  .media-mode-switch button {
    min-height: 30px;
    padding: 0 11px;
    font-size: 11px;
  }

  .audio-mode-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .audio-mode-shell {
    min-height: 100dvh;
    padding: calc(46px + env(safe-area-inset-top, 0px)) 0 calc(22px + env(safe-area-inset-bottom, 0px));
    grid-template-rows: auto minmax(240px, 1fr) auto;
  }

  .audio-mode-art {
    width: min(78vw, 320px);
    margin-top: clamp(28px, 7vh, 56px);
    margin-bottom: clamp(26px, 5vh, 42px);
    border-radius: 26px;
  }

  .audio-mode-title {
    font-size: clamp(21px, 6.6vw, 29px);
  }

  .audio-mode-controls {
    gap: 7px;
  }

  .audio-mode-controls .audio-mode-play {
    width: 70px;
    height: 70px;
    min-width: 70px;
  }

  .audio-mode-chapters {
    max-height: calc(min(58vh, 460px) - 86px);
  }

  .single-video-wrap,
  .player-video-wrap {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .geshtalt-page,
  .trauma-page,
  .course-page-shell,
  .marathon-page {
    padding-top: 18px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 14px)) !important;
  }

  .week-page,
  .main-content > div[style*="max-width:1280px"] {
    padding-top: 18px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 14px)) !important;
  }

  .course-back-wrap,
  .geshtalt-page > .back-link-glass,
  .trauma-page > .back-link-glass,
  .course-page-shell > .back-link-glass,
  .therapy-inner > .back-link-glass,
  .marathon-page > .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;
    margin: 0 !important;
    opacity: 0 !important;
    transform: translateY(-8px) !important;
    pointer-events: none !important;
    transition: opacity .22s ease, transform .22s ease !important;
  }

  body.mobile-scrolled .course-back-wrap,
  body.mobile-scrolled .geshtalt-page > .back-link-glass,
  body.mobile-scrolled .trauma-page > .back-link-glass,
  body.mobile-scrolled .course-page-shell > .back-link-glass,
  body.mobile-scrolled .therapy-inner > .back-link-glass,
  body.mobile-scrolled .marathon-page > .back-link-glass {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  .course-back-wrap {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    pointer-events: none !important;
  }

  .course-back-wrap .back-link-glass,
  .geshtalt-page > .back-link-glass,
  .trauma-page > .back-link-glass,
  .course-page-shell > .back-link-glass,
  .therapy-inner > .back-link-glass,
  .marathon-page > .back-link-glass {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 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;
  }

  .course-back-wrap .back-link-glass svg,
  .geshtalt-page > .back-link-glass svg,
  .trauma-page > .back-link-glass svg,
  .course-page-shell > .back-link-glass svg,
  .therapy-inner > .back-link-glass svg,
  .marathon-page > .back-link-glass svg {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    transform: translateX(-1px) !important;
  }

  .course-sidebar {
    margin-top: 4px;
    margin-bottom: calc(112px + env(safe-area-inset-bottom, 14px));
  }

  .therapy-inner .video-meta,
  .course-main .course-details,
  .lesson-info-block {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 14px));
  }

  .footer {
    padding-top: 22px;
    margin-top: 8px;
  }

  .video-container video,
  .single-video-wrap video,
  .player-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

.video-container {
  background: #000;
}

.video-container .video-mode-toggle,
.video-container .preview-mode-switch,
.video-container [data-preview-mode],
.video-container [data-media-mode] {
  transform: translateZ(0);
}

.video-container:has(.preview-mode-switch),
.video-container:has(.video-mode-toggle),
.video-container:has([data-media-mode]) {
  overflow: hidden;
}

  .support-grid { grid-template-columns: 1fr; }

  .author-card {
    flex-direction: column;
    gap: 32px;
    padding: 0;
  }

  .author-photo {
    width: 100%;
    height: 360px;
    border-radius: var(--r-md);
  }

  .author-headline { font-size: 2rem; }
  .author-bio p { font-size: 0.9375rem; }

  .footer-content {
    flex-direction: column;
    gap: 28px;
    text-align: left;
    padding: 0 24px;
  }

  .footer-about {
    max-width: none;
  }

  .footer-cta {
    max-width: none;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    text-align: center;
  }

  .footer-trust, .footer-craft {
    justify-content: center;
  }
}

/* CSP cleanup utilities: replace low-risk inline style attributes. */
.u-hidden {
  display: none;
}

.u-video-fill {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 16px;
}

.u-video-wide {
  width: 100%;
  border-radius: 16px;
}

.u-mt-0 {
  margin-top: 0;
}

.u-mt-8 {
  margin-top: 8px;
}

.u-mt-14 {
  margin-top: 14px;
}

.u-mt-16 {
  margin-top: 16px;
}

.u-mt-20 {
  margin-top: 20px;
}

.u-mt-24 {
  margin-top: 24px;
}

.u-mb-12 {
  margin-bottom: 12px;
}

.u-footer-offset {
  margin-top: 80px;
}

.today-screen {
  background:
    radial-gradient(circle at 50% 0%, rgba(216,191,155,.08), transparent 28%),
    radial-gradient(circle at 50% 42%, rgba(180,145,62,.10), transparent 38%),
    radial-gradient(circle at 0% 18%, rgba(150,88,70,.055), transparent 32%),
    #07100E;
}

.home-today-active {
  background: #07100E;
}

.today-hero-card {
  box-shadow: none;
}

.today-hero-card::after {
  bottom: 0;
  height: 38%;
  background:
    linear-gradient(to bottom,
      rgba(7,16,14,0) 0%,
      rgba(7,16,14,.10) 50%,
      rgba(7,16,14,.55) 88%,
      #07100E 100%);
}

.today-main-card {
  border-color: rgba(216,191,155,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    0 24px 72px rgba(0,0,0,.36),
    0 0 90px rgba(216,191,155,.075);
}

.today-main-card::after {
  background:
    linear-gradient(180deg,
      rgba(7,16,14,.02) 0%,
      rgba(7,16,14,.12) 34%,
      rgba(67,93,86,.42) 64%,
      rgba(7,16,14,.88) 100%),
    radial-gradient(circle at 18% 100%, rgba(216,191,155,.20), transparent 46%);
}

.today-main-card h2,
.today-main-card p {
  text-shadow: 0 2px 16px rgba(0,0,0,.52);
}

.today-main-card p {
  color: rgba(246,240,231,.74);
}

.today-psychologists-panel {
  margin-top: 18px;
}

.today-psychologists-card {
  width: min(calc(100% - clamp(16px, 4vw, 56px)), 1100px);
  margin: 0 auto;
  padding: clamp(14px, 2vw, 20px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2vw, 18px);
  align-items: stretch;
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(216,191,155,.2);
  background:
    radial-gradient(circle at 18% 0%, rgba(216,191,155,.22), transparent 36%),
    radial-gradient(circle at 88% 16%, rgba(91,128,112,.22), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.025)),
    rgba(7,16,14,.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 28px 76px rgba(0,0,0,.34);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}

.today-psychologists-panel.is-coming-soon .today-psychologists-team {
  opacity: .72;
}

.today-soon-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(216,191,155,.34);
  background: rgba(216,191,155,.14);
  color: rgba(246,240,231,.9);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.today-psychologists-card::before {
  content: "";
  position: absolute;
  inset: -24% -10% auto auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(216,191,155,.09);
  filter: blur(24px);
  pointer-events: none;
}

.today-psychologists-card > * {
  position: relative;
  z-index: 1;
}

.today-psychologists-copy {
  min-width: 0;
}

.today-psychologists-copy h2 {
  margin: 4px 0 6px;
  color: #fff;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1;
  letter-spacing: -.055em;
}

.today-psychologists-copy p:not(.ios-section-kicker) {
  max-width: 54ch;
  margin: 0;
  color: rgba(246,240,231,.7);
  font-size: 13px;
  line-height: 1.48;
}

.today-psychologists-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.today-psychologists-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.76);
  font-size: 10.5px;
  font-weight: 750;
}

.today-psychologists-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(216,191,155,.34);
  background: rgba(246,240,231,.94);
  color: #07100E;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.today-psychologists-button.is-disabled {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.55);
  pointer-events: none;
}

.today-psychologists-button:hover {
  transform: translateY(-1px);
  background: #fff;
}

.today-psychologists-team {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.today-psychologist-slot {
  min-width: 0;
  padding: 7px;
  border-radius: 17px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  text-align: center;
}

.today-psychologist-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid rgba(216,191,155,.16);
  background:
    radial-gradient(circle at 50% 18%, rgba(216,191,155,.20), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
}

.today-psychologist-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.today-psychologist-photo span {
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.13);
}

.today-psychologist-slot strong {
  display: block;
  color: rgba(255,255,255,.9);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.01em;
}

.today-psychologist-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(216,191,155,.34);
  background: rgba(216,191,155,.14);
  color: rgba(246,240,231,.92);
  font-size: 9.8px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}

.today-event-yoga-panel {
  margin-top: 18px;
}

.today-event-yoga-card {
  width: min(calc(100% - clamp(16px, 4vw, 56px)), 1100px);
  min-height: 164px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
  text-decoration: none;
  color: #fff;
  border-radius: 32px;
  border: 1px solid rgba(216,191,155,.2);
  background:
    radial-gradient(circle at 12% 0%, rgba(216,191,155,.2), transparent 34%),
    radial-gradient(circle at 84% 12%, rgba(123,158,142,.18), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.025)),
    rgba(7,16,14,.62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 26px 72px rgba(0,0,0,.32);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  overflow: hidden;
}

.today-event-yoga-card img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.36);
}

.today-event-yoga-card span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.today-event-yoga-card small {
  color: rgba(216,191,155,.82);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.today-event-yoga-card strong {
  color: #fff;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.02;
  letter-spacing: -.04em;
  max-width: 12ch;
}

.today-event-yoga-card em {
  max-width: 42ch;
  color: rgba(255,255,255,.62);
  font-size: 13.5px;
  line-height: 1.45;
  font-style: normal;
}

.today-event-yoga-card b {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.76);
  font-size: 30px;
  font-weight: 300;
}

@media (max-width: 768px) {
  .today-psychologists-card {
    width: min(calc(100% - 28px), 560px);
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
    gap: 18px;
    border-radius: 30px;
  }

  .today-psychologists-team {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(138px, 44%);
    overflow-x: auto;
    margin: 0 -2px;
    padding: 0 2px 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .today-psychologist-slot {
    scroll-snap-align: start;
  }

  .today-psychologists-copy h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .today-event-yoga-card {
    width: min(calc(100% - 28px), 520px);
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 14px;
    gap: 14px;
    align-items: end;
    border-radius: 28px;
  }

  .today-event-yoga-card img {
    width: 100%;
    height: 190px;
    border-radius: 22px;
  }

  .today-event-yoga-card span {
    gap: 7px;
    padding: 0 2px 2px;
  }

  .today-event-yoga-card strong {
    font-size: clamp(28px, 8vw, 36px);
    max-width: 9ch;
  }

  .today-event-yoga-card em {
    display: block;
    font-size: 13.5px;
  }

  .today-event-yoga-card b {
    display: none;
  }
}

.today-meditation-card {
  border-color: rgba(216,191,155,.48);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 26px 76px rgba(0,0,0,.32),
    0 0 96px rgba(216,191,155,.16);
}

.today-meditation-card::after {
  background:
    linear-gradient(180deg,
      rgba(216,191,155,.00) 0%,
      rgba(216,191,155,.16) 36%,
      rgba(216,191,155,.52) 74%,
      rgba(216,191,155,.82) 100%);
}

.today-meditation-card h3 {
  color: #F6F0E7;
  text-shadow: 0 2px 16px rgba(0,0,0,.42);
}

.today-meditation-card p {
  color: rgba(246,240,231,.78);
  text-shadow: 0 2px 14px rgba(0,0,0,.34);
}

.today-meditation-card .today-support-button {
  background: rgba(7,16,14,.88);
  color: #F6F0E7;
  border-color: rgba(216,191,155,.32);
}

.today-support-card:not(.today-meditation-card) {
  border-color: rgba(180,145,62,.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 22px 64px rgba(0,0,0,.34),
    0 0 84px rgba(180,145,62,.09);
}

.today-support-card:not(.today-meditation-card)::after {
  background:
    radial-gradient(circle at 72% 0%, rgba(180,145,62,.22), transparent 34%),
    radial-gradient(circle at 10% 100%, rgba(150,88,70,.13), transparent 42%),
    linear-gradient(180deg,
      rgba(7,16,14,.04) 0%,
      rgba(19,32,29,.28) 42%,
      rgba(7,16,14,.84) 100%);
}

.today-day-pill {
  color: rgba(246,240,231,.76);
  border-color: rgba(216,191,155,.24);
  background:
    linear-gradient(180deg, rgba(216,191,155,.13), rgba(67,93,86,.18)),
    rgba(19,32,29,.34);
}

@media (max-width: 768px) {
  .footer {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }
}

.meditation-audio-player {
  background:
    radial-gradient(circle at 50% 16%, rgba(216,191,155,.26), transparent 34%),
    radial-gradient(circle at 50% 74%, rgba(180,145,62,.16), transparent 42%),
    #07100E;
}

.meditation-audio-player::before {
  background:
    linear-gradient(180deg, rgba(216,191,155,.08), rgba(7,16,14,.88) 78%),
    var(--audio-artwork, url('/assets/webp/mmeditation.webp')) center/cover no-repeat;
  filter: blur(64px) brightness(.46) saturate(1.42);
}

.meditation-audio-player::after {
  background:
    radial-gradient(circle at 50% 8%, rgba(216,191,155,.32), transparent 32%),
    radial-gradient(circle at 50% 58%, rgba(216,191,155,.14), transparent 44%),
    linear-gradient(180deg, rgba(7,16,14,.02) 0%, rgba(7,16,14,.50) 54%, #07100E 100%);
}

.meditation-audio-player .audio-mode-progress span,
.meditation-audio-player .audio-mode-progress span::after {
  background: #D8BF9B;
}

.meditation-audio-player .audio-mode-progress span {
  box-shadow: 0 0 22px rgba(216,191,155,.34);
}

.meditation-audio-player .audio-mode-controls .audio-mode-play {
  border-color: rgba(216,191,155,.42);
  background:
    radial-gradient(ellipse 115% 95% at 45% -5%, rgba(255,255,255,.42), transparent 48%),
    radial-gradient(circle at 72% 108%, rgba(216,191,155,.28), transparent 38%),
    linear-gradient(158deg, rgba(216,191,155,.36), rgba(216,191,155,.12)),
    rgba(216,191,155,.10);
  box-shadow:
    0 22px 52px rgba(0,0,0,.46),
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 -18px 34px rgba(67,93,86,.14),
    0 0 0 7px rgba(216,191,155,.055);
}

.system-intro-screen,
.auth-gateway-shell {
  background: #07100E;
}

.auth-gateway-shell {
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) clamp(20px, 5vw, 72px) max(34px, env(safe-area-inset-bottom));
  background:
    linear-gradient(to bottom,
      rgba(7,16,14,0) 0%,
      rgba(7,16,14,.00) 58%,
      rgba(7,16,14,.18) 76%,
      rgba(7,16,14,.62) 92%,
      #07100E 100%),
    url('/assets/webp/aut.webp') center top / cover no-repeat,
    #07100E;
}

.auth-gateway-shell::before,
.auth-gateway-shell::after {
  display: none !important;
}

.auth-gateway-panel {
  transform: none;
  padding-block: 0;
}

@media (max-width: 768px) {
  .auth-gateway-shell {
    padding: max(10px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom));
    background:
      linear-gradient(to bottom,
        rgba(7,16,14,0) 0%,
        rgba(7,16,14,.00) 56%,
        rgba(7,16,14,.18) 76%,
        rgba(7,16,14,.62) 92%,
        #07100E 100%),
      url('/assets/webp/aut.webp') center top / cover no-repeat,
      #07100E;
  }

  .auth-gateway-panel {
    transform: none;
    padding-block: 0;
  }
}

.u-inline-flex {
  display: inline-flex;
}

.u-inline-block {
  display: inline-block;
}

.u-w-full {
  width: 100%;
}

.u-error-muted {
  color: rgba(255,255,255,.5);
  padding: 40px 0;
}

.u-error-list {
  padding: 20px;
  color: rgba(255,255,255,.4);
  font-size: 14px;
}

.u-flex-center-gap {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Сообщество: только десктоп — вводный абзац и более «живые» карточки */
.community-desktop-lead {
  display: none;
}

@media (min-width: 769px) {
  body.community-page .community-after-hero {
    position: relative;
    padding-top: clamp(6px, 1vw, 14px);
  }

  body.community-page .community-after-hero::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -32px;
    transform: translateX(-50%);
    width: min(96%, 820px);
    height: 200px;
    pointer-events: none;
    background: radial-gradient(ellipse 72% 95% at 50% 0%, rgba(120, 112, 255, .13), transparent 68%);
    z-index: 0;
  }

  body.community-page .community-desktop-lead {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0 0 clamp(24px, 3.2vw, 40px);
    max-width: 58ch;
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.65;
    color: rgba(255, 255, 255, .56);
    letter-spacing: -0.012em;
  }

  body.community-page .ux-community-grid {
    position: relative;
    z-index: 1;
    gap: clamp(18px, 2.1vw, 30px);
  }

  body.community-page .ux-community-card {
    min-height: clamp(232px, 27vh, 318px);
    padding: clamp(26px, 3vw, 36px);
  }

  body.community-page a.ux-community-card {
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  }

  body.community-page a.ux-community-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, .2);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .2),
      0 28px 76px rgba(0, 0, 0, .38);
  }

  body.community-page .ux-community-card strong {
    font-size: clamp(22px, 1.9vw, 30px);
    letter-spacing: -0.04em;
  }

  body.community-page .ux-community-card p {
    font-size: clamp(14px, 1.05vw, 16px);
    line-height: 1.58;
    max-width: 46ch;
  }
}

html:has(body.chat-page) {
  background-color: #030605 !important;
  color-scheme: dark !important;
}

html:has(body.chat-page) body.chat-page {
  color-scheme: dark !important;
}

html:has(body.chat-page) {
  height: 100% !important;
  overflow: hidden !important;
}

body.chat-page {
  height: 100% !important;
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  touch-action: manipulation !important;
}

html:has(body.chat-page) *,
body.chat-page *,
.chat-panel,
.chat-message,
.chat-composer,
.chat-composer button,
.chat-media-trigger,
.voice-player {
  touch-action: manipulation !important;
}

.chat-page {
  --chat-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='30' viewBox='0 0 52 30'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Cpath d='M10 0L30 15 10 30 0 15z'/%3E%3Cpath d='M36 0L56 15 36 30 26 15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --chat-pattern-size: 52px 30px;
  --chat-pattern-repeat: repeat;
  --chat-viewport-height: 100dvh;
  --chat-keyboard-height: 0px;
  --chat-system-bottom: 0px;
  background-color: #030605 !important;
  background-image: var(--chat-pattern) !important;
  background-size: var(--chat-pattern-size) !important;
  background-repeat: var(--chat-pattern-repeat) !important;
}

.chat-bg-zigzag-blue {
  --chat-pattern: linear-gradient(135deg, rgba(83,148,253,.28) 25%, transparent 25%), linear-gradient(225deg, rgba(83,148,253,.28) 25%, transparent 25%), linear-gradient(45deg, rgba(83,148,253,.28) 25%, transparent 25%), linear-gradient(315deg, rgba(83,148,253,.28) 25%, rgba(255,255,255,.025) 25%);
  --chat-pattern-size: 48px 48px;
  --chat-pattern-repeat: repeat;
}

.chat-bg-stripes-green {
  --chat-pattern: linear-gradient(to right, rgba(104, 205, 161, .22), rgba(104, 205, 161, .22) 9px, rgba(255,255,255,.025) 9px, rgba(255,255,255,.025) 20px);
  --chat-pattern-size: 24px 100%;
  --chat-pattern-repeat: repeat;
}

.chat-bg-sublime {
  --chat-pattern: linear-gradient(115deg, rgba(255, 92, 125, .22), rgba(106, 130, 251, .22));
  --chat-pattern-size: cover;
  --chat-pattern-repeat: no-repeat;
}

.chat-bg-argon {
  --chat-pattern: linear-gradient(110deg, rgba(3, 0, 30, .52), rgba(115, 3, 192, .28), rgba(236, 56, 188, .18), rgba(253,239,249,.06));
  --chat-pattern-size: cover;
  --chat-pattern-repeat: no-repeat;
}

.chat-bg-radial-dots {
  --chat-pattern: repeating-radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,.16) 1px, transparent 2px, transparent 6px);
  --chat-pattern-size: 20px 20px;
  --chat-pattern-repeat: repeat;
}

.chat-page .app-tabbar,
.chat-page .app-sidebar,
.chat-page .footer,
.chat-page .navbar {
  display: none !important;
}

.chat-page #app-mobile-header .mobile-header-actions > :not([data-chat-settings-open]) {
  display: none !important;
}

body.chat-page .app-mobile-header.mobile-header-hidden {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) !important;
}

.chat-page.no-app-hero {
  padding-top: 0;
}

.chat-page-shell {
  min-height: var(--chat-viewport-height, 100dvh);
  display: flex;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}

.chat-panel {
  width: min(760px, 100%);
  height: calc(var(--chat-viewport-height, 100dvh) - max(28px, env(safe-area-inset-top)) - max(14px, env(safe-area-inset-bottom)) - var(--chat-keyboard-height, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)),
    var(--chat-pattern),
    rgba(5, 10, 9, .88);
  background-size: auto, var(--chat-pattern-size), auto;
  background-repeat: no-repeat, var(--chat-pattern-repeat), no-repeat;
  box-shadow: 0 28px 90px rgba(0,0,0,.52);
  backdrop-filter: blur(22px);
}

.chat-panel-header {
  display: grid;
  grid-template-columns: 44px 1fr 28px;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 12px;
}

.chat-back-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

.chat-back-button svg {
  width: 18px;
  height: 18px;
}

.chat-kicker {
  margin: 0 0 4px;
  color: rgba(216,191,155,.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.1px;
  text-transform: uppercase;
}

.chat-panel-header h1 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  letter-spacing: -.6px;
}

.chat-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9FE7B1;
  box-shadow: 0 0 0 7px rgba(159,231,177,.1);
}

.chat-settings-header-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 24px rgba(0,0,0,.24);
}

.chat-settings-header-btn svg {
  width: 18px;
  height: 18px;
}

.chat-settings-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.chat-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.58);
  opacity: 0;
  transition: opacity .24s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.chat-settings-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78dvh, 680px);
  overflow-y: auto;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 30px 30px 0 0;
  border: 1px solid rgba(255,255,255,.14);
  border-bottom: 0;
  color: #fff;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.16), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.035)),
    rgba(8, 14, 13, .92);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 -24px 80px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.18);
  transform: translateY(104%);
  transition: transform .28s cubic-bezier(.2,.9,.2,1);
}

.chat-settings-sheet.active {
  pointer-events: auto;
}

.chat-settings-sheet.active .chat-settings-backdrop {
  opacity: 1;
}

.chat-settings-sheet.active .chat-settings-panel {
  transform: translateY(0);
}

.chat-settings-grabber {
  width: 42px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
}

.chat-settings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.chat-settings-head span,
.chat-settings-block h3 {
  margin: 0;
  color: rgba(255,255,255,.48);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.chat-settings-head h2 {
  margin: 3px 0 0;
  font-size: 26px;
  letter-spacing: -.04em;
}

.chat-settings-head button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.07);
  font-size: 24px;
  line-height: 1;
}

.chat-settings-block {
  margin-top: 14px;
}

.chat-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.075);
}

.chat-setting-row.disabled {
  opacity: .62;
}

.chat-setting-row strong,
.chat-setting-row span {
  display: block;
}

.chat-setting-row strong {
  font-size: 14px;
}

.chat-setting-row span {
  margin-top: 3px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
  line-height: 1.35;
}

.chat-liquid-toggle {
  width: 58px;
  height: 34px;
  flex: 0 0 58px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  transition: background .2s ease, border-color .2s ease;
}

.chat-liquid-toggle i {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 18px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.8);
  transform: translateX(0);
  transition: transform .22s cubic-bezier(.2,.9,.2,1), background .2s ease;
}

.chat-liquid-toggle.active {
  border-color: rgba(159,231,177,.44);
  background: linear-gradient(90deg, rgba(87,201,155,.42), rgba(159,231,177,.24));
}

.chat-liquid-toggle.active i {
  transform: translateX(24px);
  background: #fff;
}

.chat-bg-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.chat-bg-option {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.045);
  text-align: left;
}

.chat-bg-option.active {
  border-color: rgba(255,255,255,.34);
  color: #fff;
  background: rgba(255,255,255,.10);
}

.chat-bg-option span {
  display: block;
  height: 54px;
  border-radius: 12px;
  margin-bottom: 8px;
  background-size: 34px 34px !important;
}

.chat-bg-option strong {
  display: block;
  padding: 0 2px 2px;
  font-size: 12px;
}

.chat-status {
  display: none !important;
}

.chat-desktop-topbar {
  display: none;
}

.chat-messages-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.chat-messages {
  height: 100%;
  overflow-y: auto;
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.chat-messages::-webkit-scrollbar {
  display: none;
}

.chat-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  color: rgba(255,255,255,.52);
  pointer-events: none;
}

.chat-empty strong {
  color: #fff;
  font-size: 20px;
}

.chat-empty.hidden {
  display: none;
}

.chat-message {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 12px;
  position: relative;
}

.chat-message::before {
  content: "↩";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.12);
  opacity: 0;
  transform: translateY(-50%) scale(.82);
  transition: opacity .14s ease, transform .14s ease;
  pointer-events: none;
}

.chat-message-swiping .chat-message-bubble {
  transform: translateX(var(--chat-swipe-x, 0));
  transition: none;
}

.chat-message-reply-armed::before {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.chat-message.pending {
  opacity: 0.65;
}

.chat-message.error .chat-message-bubble {
  border: 1px solid rgba(255, 85, 85, 0.4) !important;
  background: rgba(255, 85, 85, 0.05) !important;
}

.chat-message-own {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255,255,255,.84);
  background: linear-gradient(135deg, rgba(216,191,155,.32), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  font-weight: 800;
}

/* Premium Liquid Glass Chat Bubbles */
.chat-message-bubble {
  max-width: min(82%, 520px);
  padding: 11px 15px 12px;
  border-radius: 20px 20px 20px 6px;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 20px rgba(0, 0, 0, 0.15) !important;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.chat-message-own .chat-message-bubble {
  border-radius: 20px 20px 6px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.26) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.chat-message-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 5px;
  color: rgba(255,255,255,.52);
  font-size: 11px;
  font-weight: 700;
}

.chat-message-meta time {
  color: rgba(255,255,255,.32);
  font-weight: 500;
}

.chat-message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.45;
}

.chat-reply-preview {
  width: 100%;
  margin: 2px 0 8px;
  padding: 8px 10px;
  text-align: left;
  border: 0;
  border-left: 3px solid rgba(255,255,255,.58);
  border-radius: 12px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.075);
  cursor: pointer;
}

.chat-reply-preview strong,
.chat-reply-preview span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-preview strong {
  font-size: 12px;
  color: rgba(255,255,255,.96);
}

.chat-reply-preview span {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255,255,255,.58);
}

.chat-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.chat-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.07);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.chat-reaction-chip.active {
  border-color: rgba(255,255,255,.34);
  background: rgba(255,255,255,.16);
  color: #fff;
}

.chat-message-highlight .chat-message-bubble {
  animation: chatMessageHighlight 1.1s ease;
}

@keyframes chatMessageHighlight {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 6px 20px rgba(0,0,0,.15) !important; }
  35% { box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 0 0 2px rgba(255,255,255,.28), 0 12px 32px rgba(255,255,255,.12) !important; }
}

.chat-zoom-card {
  margin-top: 8px;
  width: min(100%, 320px);
  padding: 12px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 0%, rgba(45, 140, 255, .32), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 12px 28px rgba(0,0,0,.20);
}

.chat-message-text + .chat-zoom-card {
  margin-top: 10px;
}

.chat-zoom-card-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.chat-zoom-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  color: #2d8cff;
  filter: drop-shadow(0 8px 16px rgba(45,140,255,.24));
}

.chat-zoom-logo svg {
  width: 38px;
  height: 38px;
  display: block;
}

.chat-zoom-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.chat-zoom-copy strong {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.chat-zoom-copy span {
  color: rgba(255,255,255,.58);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-zoom-join {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 12px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  background:
    linear-gradient(180deg, rgba(45,140,255,1), rgba(24,104,220,1));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 10px 24px rgba(45,140,255,.24);
  -webkit-tap-highlight-color: transparent;
}

.chat-zoom-join:active {
  transform: scale(.98);
}

/* Edit / Delete action buttons in message bubbles */
.chat-message-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.chat-message-bubble:hover .chat-message-actions,
.chat-message-bubble:focus-within .chat-message-actions {
  opacity: 1;
  pointer-events: auto;
}

.chat-action-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.chat-action-btn svg {
  width: 13px;
  height: 13px;
}

.chat-action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.chat-action-btn.btn-delete:hover {
  color: rgba(255, 120, 120, 0.95);
  background: rgba(255, 80, 80, 0.12);
}

/* Realtime Edit Mode Banner */
.chat-edit-banner,
.chat-reply-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
  font-size: 13.5px;
  color: #fff;
  transition: all 0.25s ease;
}

.chat-edit-banner.hidden,
.chat-reply-banner.hidden {
  display: none !important;
}

.edit-banner-content,
.reply-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.edit-banner-icon {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.65);
}

.edit-banner-close {
  appearance: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.2s;
}

.edit-banner-close:hover {
  color: #ffffff;
}

.reply-banner-content {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 2px;
  min-width: 0;
}

.reply-banner-label {
  grid-row: span 2;
  align-self: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.64);
  font-size: 11px;
}

.reply-banner-content strong,
.reply-banner-content small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-banner-content strong {
  font-size: 13px;
}

.reply-banner-content small {
  color: rgba(255,255,255,.52);
  font-size: 12px;
}

.reply-banner-close {
  appearance: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.chat-composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 16px calc(max(14px, env(safe-area-inset-bottom)) + var(--chat-system-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.22), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.055)),
    rgba(7, 16, 14, 0.52);
  backdrop-filter: blur(24px) saturate(160%) brightness(1.05);
  -webkit-backdrop-filter: blur(24px) saturate(160%) brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 -18px 44px rgba(0,0,0,.22);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

@media all and (display-mode: standalone) {
  .chat-composer {
    padding-bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--chat-system-bottom, 0px) + 16px) !important;
  }
}

.chat-composer textarea {
  min-width: 0;
  flex: 1;
  height: 42px;
  min-height: 42px;
  max-height: 120px;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 20px !important;
  padding: 10px 16px;
  color: #fff;
  background-color: rgba(255,255,255,.075) !important;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.18), transparent 45%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.035) 100%) !important;
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 8px rgba(255, 255, 255, 0.08);
  outline: none;
  font-family: inherit;
  font-size: 16px !important;
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
  scrollbar-width: none;
  transition: border-color 0.25s, background 0.25s;
  touch-action: manipulation;
}

.chat-composer textarea::-webkit-scrollbar {
  display: none;
}

.chat-composer textarea:focus {
  border-color: rgba(255,255,255,.28) !important;
  background-color: rgba(255,255,255,.11) !important;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
}

.chat-composer textarea::placeholder {
  color: rgba(255,255,255,.34);
}

.chat-media-trigger {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 35% 18%, rgba(255,255,255,.32), transparent 45%),
    rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.22),
    0 8px 20px rgba(0,0,0,.24);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  margin-bottom: 1px;
  outline: none;
}

.chat-media-trigger.hidden {
  display: none !important;
}

.chat-media-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: scale(1.05);
}

.chat-media-trigger:active {
  transform: scale(0.95);
}

.chat-media-trigger svg {
  width: 18px;
  height: 18px;
}

/* ─── Media Recording Overlay ───────────────────── */
.chat-rec-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 14, 0.95);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.chat-rec-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.rec-overlay-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 320px;
}

.rec-circular-preview-container {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #30d158;
  box-shadow: 0 0 30px rgba(48, 209, 88, 0.3);
  background: #000;
  aspect-ratio: 1/1;
}

#rec-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.rec-status-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 12px #ff3b30;
  animation: recPulse 1s infinite alternate;
}

@keyframes recPulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

#rec-timer {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  font-family: monospace;
}

.rec-actions {
  display: flex;
  gap: 16px;
  width: 100%;
}

.rec-btn {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform 0.2s, opacity 0.2s;
}

.rec-cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ff3b30;
}

.rec-stop-btn {
  background: #30d158;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(48, 209, 88, 0.25);
}

.rec-btn:active {
  transform: scale(0.97);
}

/* ─── Media Players inside chat ─────────────────── */
.chat-audio-player {
  display: block;
  margin-top: 6px;
  width: 100%;
  max-width: 240px;
  height: 36px;
  border-radius: 18px;
  outline: none;
}

.chat-video-circle-wrap {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: #000;
  position: relative;
  margin-top: 6px;
  aspect-ratio: 1/1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.chat-video-circle {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-attachment {
  display: block;
  overflow: hidden;
  max-width: min(68vw, 360px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 14px 34px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.10);
}

.chat-attachment img,
.chat-attachment video {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #050506;
}

.chat-image-attachment img {
  object-fit: cover;
}

/* ─── Sistema Bars Loader ───────────────────────── */
.sistema-loader-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 180px;
  padding: 30px 18px;
  color: rgba(255,255,255,.54);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}

.sistema-loader-state.is-small {
  min-height: 100px;
  padding: 15px 10px;
  gap: 10px;
}

.sistema-loader-state.is-small .sistema-loader {
  min-width: 44px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 12px;
}

.sistema-loader-state.is-small .sistema-loader-bar {
  width: 2px;
  height: 12px;
}

.sistema-loader-state.is-small .sistema-loader-bar:nth-child(2) {
  height: 22px;
  margin: 0 4px;
}

.sistema-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.12), transparent 60%),
    rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 42px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.10);
}

.sistema-loader-bar {
  display: inline-block;
  width: 3px;
  height: 20px;
  background-color: rgba(255, 255, 255, .5);
  border-radius: 10px;
  animation: sistema-loader-scale 1s linear infinite;
}

.sistema-loader-bar:nth-child(2) {
  height: 35px;
  margin: 0 5px;
  animation-delay: .25s;
}

.sistema-loader-bar:nth-child(3) {
  animation-delay: .5s;
}

@keyframes sistema-loader-scale {
  20% {
    background-color: #fff;
    transform: scaleY(1.5);
  }

  40% {
    transform: scaleY(1);
  }
}

.chat-composer button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #050506;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  margin-bottom: 1px; /* Align perfectly with textarea line heights */
}

.chat-composer button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.chat-composer button:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.chat-composer button svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .chat-page-shell {
    padding: 0;
  }

  .chat-panel {
    width: 100%;
    position: fixed !important; top: 0 !important; bottom: var(--chat-keyboard-height, 0px) !important; left: 0 !important; right: 0 !important; height: auto !important;
    border-radius: 0 !important; border: 0 !important;
    padding-top: calc(54px + max(8px, env(safe-area-inset-top))); /* Reserve space for the app-mobile-header! */
  }

  .chat-messages {
    padding-top: 34px;
  }

  /* Style mobile header identically to the AI chat header */
  body.chat-page .app-mobile-header {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13) !important;
    display: grid !important;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
  }

  body.chat-page .mobile-header-brand {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  body.chat-page .mobile-header-actions {
    grid-column: 3;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
}

/* ── iOS-style Section Headers & Compact Plates ─────────── */
.ios-section-header {
  width: min(calc(100% - clamp(32px, 6vw, 112px)), 1100px);
  margin: 52px auto 18px;
  padding: 0 4px;
}

.ios-section-kicker {
  margin: 0 0 4px 0 !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.14em;
}

.ios-section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 760;
  color: #ffffff;
  letter-spacing: -0.03em;
}

@media (max-width: 768px) {
  .ios-section-header {
    width: min(calc(100% - clamp(16px, 4vw, 56px)), 1100px);
    margin: 38px auto 12px;
  }
  
  .ios-section-title {
    font-size: 19px;
  }

  /* Make today program & support cards significantly more compact */
  body .today-main-card,
  body .today-support-card {
    min-height: 155px !important;
    padding: 20px 22px !important;
    border-radius: 20px !important;
  }

  body .today-main-card h2,
  body .today-support-card h3 {
    font-size: 18px !important;
    margin: 2px 0 6px !important;
    letter-spacing: -0.02em;
  }

  body .today-main-card p,
  body .today-support-card p {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: rgba(255, 255, 255, 0.65) !important;
  }

  /* Compact button styles inside plates */
  body .today-program-button,
  body .today-support-button {
    padding: 8px 18px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
  }
}

/* ── Premium Liquid Glass Onboarding Elements ──────────── */
.onboarding-options button,
.onboarding-name-input {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  backdrop-filter: blur(28px) saturate(220%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(220%) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -10px 20px rgba(0, 0, 0, 0.12),
    0 12px 36px rgba(0, 0, 0, 0.3) !important;
  transition: background 0.3s, border-color 0.3s, transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.1) !important;
}

.onboarding-options button:hover,
.onboarding-name-input:focus {
  border-color: rgba(255, 255, 255, 0.38) !important;
  transform: translateY(-1.5px);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -10px 20px rgba(0, 0, 0, 0.14),
    0 16px 44px rgba(0, 0, 0, 0.4) !important;
}

.onboarding-options button.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
  border-color: rgba(255, 255, 255, 0.48) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 0 24px rgba(255, 255, 255, 0.08),
    0 14px 40px rgba(0, 0, 0, 0.35) !important;
  transform: scale(0.99) !important;
}

.onboarding-options button.active i {
  background: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

.onboarding-inline-next {
  display: block !important;
  width: min(100%, 420px) !important;
  margin: 16px auto 0 !important;
  min-height: 52px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: blur(28px) saturate(220%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(220%) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 30px rgba(0, 0, 0, 0.35) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  color: #ffffff !important;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s, border-color 0.3s !important;
}

.onboarding-inline-next.hidden {
  display: none !important;
}

.onboarding-inline-next:hover,
.onboarding-inline-next:focus {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.10) 100%) !important;
  border-color: rgba(255, 255, 255, 0.42) !important;
  transform: translateY(-1.5px) !important;
}

.onboarding-inline-next:active {
  transform: scale(0.96) !important;
}

/* ─── iOS Action Sheet ─────────────────────────── */
.ios-action-sheet {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.action-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ios-action-sheet.active {
  pointer-events: auto;
}

.ios-action-sheet.active .action-sheet-overlay {
  opacity: 1;
  pointer-events: auto;
}

.action-sheet-body {
  position: relative;
  width: calc(100% - 24px);
  max-width: 440px;
  margin: 0 auto calc(16px + env(safe-area-inset-bottom, 16px));
  padding: 14px;
  background: rgba(10, 18, 15, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

.ios-action-sheet.active .action-sheet-body {
  transform: translateY(0);
}

.action-sheet-header {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  padding: 12px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.action-sheet-reactions {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-bottom: 10px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.action-sheet-reactions button {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  font-size: 22px;
  cursor: pointer;
}

.action-sheet-reactions button:active {
  transform: scale(.94);
  background: rgba(255,255,255,.12);
}

.action-sheet-group {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.action-sheet-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, opacity 0.2s;
  outline: none;
  font-family: inherit;
}

.action-sheet-btn:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.action-sheet-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.action-sheet-btn.text-danger {
  color: #ff5555 !important;
}

.action-sheet-btn.action-cancel {
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* ─── Premium Custom Voice Player ───────────────── */
.voice-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 8px 14px;
  min-width: 220px;
  max-width: 280px;
  user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  padding: 0;
}

.voice-play-btn:active {
  transform: scale(0.92);
}

.voice-play-btn svg {
  width: 15px;
  height: 15px;
}

.voice-play-btn .play-icon {
  margin-left: 1px; /* visually center the triangle */
}

.voice-waveform-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.voice-timeline {
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  padding: 2px 0; /* padding for easier finger/cursor tap target */
  background-clip: content-box;
}

.voice-progress {
  height: 4px;
  background: #ffffff;
  border-radius: 2px;
  width: 0%;
  position: absolute;
  left: 0;
  top: 2px;
}

.voice-duration {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: -0.1px;
}

/* ─── Telegram Style Video Modal ────────────────── */
.telegram-video-modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.telegram-video-modal.active {
  opacity: 1;
  visibility: visible;
}

.video-modal-backdrop {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.video-modal-content {
  position: relative;
  width: min(440px, 90%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.telegram-video-modal.active .video-modal-content {
  transform: scale(1);
}

.video-modal-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.video-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
}

.video-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.video-modal-close:active {
  transform: scale(0.9);
}

/* Notification Prompt Banner */
.notification-prompt-banner {
  background: rgba(30, 30, 30, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  position: relative;
  z-index: 10;
  animation: slideDown 0.3s ease-out;
}

body.chat-page .notification-prompt-banner {
  margin-top: 12px;
}

@media (max-width: 768px) {
  body.chat-page .notification-prompt-banner {
    margin-top: calc(10px + env(safe-area-inset-top, 0px));
    border-radius: 0 0 18px 18px;
  }
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.notification-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.notification-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notification-banner-text strong {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}
.notification-banner-text span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}
.notification-banner-buttons {
  display: flex;
  gap: 8px;
}
.notification-banner-buttons button {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.banner-btn-decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
}
.banner-btn-decline:hover {
  background: rgba(255, 255, 255, 0.05);
}
.banner-btn-accept {
  background: #ffffff;
  color: #000000;
  font-weight: 600 !important;
}
.banner-btn-accept:hover {
  background: rgba(255, 255, 255, 0.9);
}

.video-modal-close svg {
  width: 16px;
  height: 16px;
}

/* Onboarding PWA Install Card */
.onboarding-install-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, 420px);
  padding: 28px 18px 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.12), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.028));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  margin: 16px auto 0;
  gap: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 18px 50px rgba(0,0,0,.30);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.install-card-graphic {
  position: relative;
  width: 86px;
  height: 86px;
  margin-bottom: 2px;
}
.install-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(0,0,0,.34);
}
.install-app-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #ffffff;
  color: #000000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.onboarding-install-card strong {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}
.onboarding-install-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
}
.install-primary-btn {
  background:
    radial-gradient(circle at 36% 0%, rgba(255,255,255,.42), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(232,230,224,.94));
  color: #050607;
  font-weight: 800;
  font-size: 16px;
  border: 1px solid rgba(255,255,255,.45);
  padding: 15px 24px;
  border-radius: 18px;
  width: 100%;
  max-width: none;
  min-height: 54px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  margin-top: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 14px 30px rgba(0,0,0,.28);
}
.install-primary-btn:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

.install-skip-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.04)),
    rgba(255,255,255,.035);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 18px;
  width: 100%;
  max-width: none;
  min-height: 52px;
  cursor: pointer;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  margin-top: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.install-skip-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.onboarding-final-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  margin: 16px 0;
  width: 100%;
}
.final-card-graphic {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(87, 181, 154, 0.1);
  border: 1px solid rgba(87, 181, 154, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(87, 181, 154, 0.15);
}
.final-card-graphic svg {
  width: 32px;
  height: 32px;
}
.final-app-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #57b59a;
  color: #000000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.onboarding-final-card strong {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}
.onboarding-final-card p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.55;
  margin: 0;
}

/* iOS Guide Modal */
.pwa-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pwa-guide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pwa-guide-sheet {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: #121212;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px 24px 0 0;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 10;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  animation: slideUpSheet 0.35s cubic-bezier(0.15, 0.85, 0.35, 1);
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.pwa-guide-indicator {
  width: 36px;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  margin: 0 auto 16px auto;
}
.pwa-guide-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-guide-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
  gap: 8px;
}
.pwa-guide-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: contain;
}
.pwa-guide-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.pwa-guide-header p {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin: 0;
  line-height: 1.4;
  max-width: 320px;
}
.pwa-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.pwa-step-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 16px;
}
.pwa-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.pwa-step-row p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}
.pwa-guide-confirm-btn {
  width: 100%;
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.pwa-guide-confirm-btn:hover {
  background: rgba(255,255,255,0.9);
}

/* ─── Premium Physical Photo Cards Stack ────────────────── */
.insight-stack-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: 16px auto 32px auto;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .insight-stack-container {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 0 16px;
  }
}

.insight-cards-stack {
  position: relative;
  width: 230px;
  height: 230px; /* Perfect premium rounded square */
  perspective: 1000px;
  cursor: pointer;
  flex-shrink: 0;
}

.insight-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 28px; /* Heavily rounded corners like the reference */
  background-size: cover;
  background-position: center;
  box-sizing: border-box;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.3, 1), opacity 0.5s ease, z-index 0.6s;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

/* Quote details on the side/below */
.insight-details {
  flex: 1;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 600px) {
  .insight-details {
    align-items: flex-start;
    text-align: left;
  }
}

.insight-counter {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.insight-quote {
  font-size: 17px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 8px 0;
  font-style: italic;
  font-weight: 500;
}

.insight-author {
  font-size: 12px;
  font-weight: 700;
  color: #e0984f; /* Accent color */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 20px 0;
}

/* Nav controls */
.insight-nav-controls {
  display: flex;
  gap: 12px;
}

.insight-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  padding: 0;
}

.insight-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.insight-nav-btn:active {
  transform: scale(0.92);
}

.insight-nav-btn svg {
  width: 16px;
  height: 16px;
}

/* ─── Premium 3D Coverflow Feed Carousel ────────── */
.carousel-3d-container {
  width: 100%;
  margin: 12px auto 36px auto;
  perspective: 1200px;
  display: flex;
  justify-content: center;
  overflow: hidden; /* Prevent horizontal page scroll on mobile */
  padding: 10px 0 24px 0;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-3d-stage {
  position: relative;
  width: min(72vw, 196px);
  height: min(104vw, 280px);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.3, 1);
}

.carousel-3d-card {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.3, 1), opacity 0.5s ease, z-index 0.6s;
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  overflow: hidden;
}

.carousel-3d-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 35%);
  z-index: 1;
  pointer-events: none;
}

.carousel-3d-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 14px;
  z-index: 2;
  color: #ffffff;
  pointer-events: none;
  text-align: left;
}

.carousel-3d-card-tag {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #e0984f;
  margin-bottom: 4px;
}

.carousel-3d-card-title {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 3px 0;
  line-height: 1.25;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.carousel-3d-card-desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.feed-view-all-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  color: rgba(255, 255, 255, .85);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.feed-view-all-link:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}

.feed-view-all-link:active {
  transform: scale(0.96);
}

.today-feed-list,
.today-bento-progress,
.today-bento-event,
.today-bento-quote {
  display: none;
}

/* ─────────────────────────────────────────────
   Desktop Layout Polish
   Clean desktop grids without affecting mobile.
───────────────────────────────────────────── */
@media (min-width: 1024px) {
  :root {
    --desktop-sidebar: 150px;
    --desktop-gutter: clamp(36px, 4vw, 56px);
    --desktop-rail-width: calc(100vw - var(--desktop-sidebar) - var(--desktop-gutter) * 2);
    --desktop-content: calc(100vw - var(--desktop-left));
    --desktop-left: calc(var(--desktop-sidebar) + var(--desktop-gutter));
  }

  body.home-today-active .main-content {
    display: block;
  }

  body.home-today-active .today-screen {
    --today-pad: clamp(28px, calc((100vw - 232px - 1180px) / 2), 50vw);
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: auto;
    /* Убираем боковой паддинг отсюда, чтобы герой мог быть на всю ширину рабочей области */
    padding: 0 0 96px;
    box-sizing: border-box;
  }

  body.home-today-active .today-screen > * {
    max-width: none;
  }

  /* Полноэкранный Hero на всю ширину контентной области ( calc(100vw - 232px) )
     Рядом с сайдбаром, без залезания под навигацию/сайдбар */
  body.home-today-active .today-hero-card {
    width: 100% !important;
    max-width: none !important;
    min-height: clamp(380px, 54vh, 580px) !important;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: flex-end !important;
    position: relative !important;
    left: 0 !important;
    margin: -80px 0 44px 0 !important;
    padding: clamp(140px, 18vh, 190px) var(--today-pad, 48px) clamp(48px, 7vh, 84px) !important;
    background-image: var(--ux-bg, url('/assets/webp/new_main.webp')) !important;
    background-size: cover !important;
    background-position: var(--ux-bg-pos, center 35%) !important;
    overflow: hidden !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  body.home-today-active .today-hero-card::before {
    display: none !important;
  }

  /* Красивый плавный градиент-затемнение на всю высоту картинки,
     без резкой горизонтальной черной плашки в пол-экрана */
  body.home-today-active .today-hero-card::after {
    display: block !important;
    content: "" !important;
    position: absolute !important;
    inset: 0 0 -4px 0 !important;
    height: calc(100% + 4px) !important;
    width: 100% !important;
    background:
      linear-gradient(to bottom,
        rgba(0,0,0,.22) 0%,
        rgba(0,0,0,.36) 44%,
        rgba(4,6,10,.72) 78%,
        var(--bg-main) 100%) !important;
    z-index: 1 !important;
  }

  body.home-today-active .today-hero-card > * {
    position: relative !important;
    z-index: 2 !important;
  }

  body.home-today-active .today-hero-copy {
    width: min(720px, 100%) !important;
  }

  body.home-today-active .today-hero-card .hub-kicker {
    display: block !important;
    width: fit-content !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: rgba(255,255,255,.62) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .2em !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 10px rgba(0,0,0,.55);
  }

  body.home-today-active .today-hero-card h1 {
    max-width: 760px !important;
    font-size: clamp(2.05rem, 4.4vw, 3.35rem) !important;
    line-height: .98 !important;
    margin-bottom: 16px !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em !important;
    color: #fff !important;
    text-shadow: 0 2px 18px rgba(0,0,0,.45);
  }

  body.home-today-active .today-hero-card p {
    max-width: 560px !important;
    font-size: clamp(1rem, 1.55vw, 1.18rem) !important;
    color: rgba(255,255,255,0.78) !important;
    line-height: 1.55 !important;
    text-shadow: 0 1px 12px rgba(0,0,0,.55);
  }

  body.home-today-active .today-carousel-controls {
    display: flex !important;
    position: absolute !important;
    right: var(--today-pad, 48px) !important;
    bottom: clamp(44px, 7vh, 80px) !important;
    gap: 10px !important;
    z-index: 10 !important;
  }

  body.home-today-active .today-carousel-controls button {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.09) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 26px rgba(0,0,0,.26) !important;
    transition: background 0.2s, border-color 0.2s, transform 0.2s !important;
  }

  body.home-today-active .today-carousel-controls button:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.32) !important;
    transform: translateY(-2px) !important;
  }

  body.home-today-active .today-carousel-controls button:active {
    transform: scale(0.95) !important;
  }

  body.home-today-active .today-hero-dots {
    display: flex !important;
    position: absolute !important;
    left: 50% !important;
    bottom: 24px !important;
    transform: translateX(-50%) !important;
    gap: 8px !important;
    z-index: 10 !important;
  }

  body.home-today-active .today-hero-dots span {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.25) !important;
    transition: width 0.2s, background 0.2s !important;
  }

  body.home-today-active .today-hero-dots span.active {
    width: 20px !important;
    border-radius: 99px !important;
    background: #fff !important;
  }

  body.home-today-active .ios-section-header {
    width: 100%;
    margin: 0 0 14px;
  }

  body.home-today-active .ios-section-header .ios-section-kicker {
    margin-bottom: 4px;
    color: rgba(255,255,255,.4);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  body.home-today-active .ios-section-header .ios-section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
  }

  body.home-today-active .today-bento-board {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 24px;
    align-items: stretch;
    margin: 0;
    padding-left: var(--today-pad, 48px) !important;
    padding-right: var(--today-pad, 48px) !important;
    box-sizing: border-box !important;
  }

  body.home-today-active .today-bento-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  body.home-today-active .today-bento-panel .ios-section-header {
    margin: 0 0 14px;
  }

  /* 1024–1279: лента под основной программой, во всю ширину */
  body.home-today-active .today-bento-primary {
    grid-column: 1 / 13;
    grid-row: 1;
  }

  body.home-today-active .today-bento-feed {
    grid-column: 1 / 13;
    grid-row: 2;
    align-self: stretch;
  }

  body.home-today-active .today-psychologists-panel {
    grid-column: 1 / 13;
    grid-row: 3;
    margin-top: 0;
  }

  body.home-today-active .today-event-yoga-panel {
    grid-column: 1 / 13;
    grid-row: 4;
    margin-top: 0;
  }

  body.home-today-active .today-bento-secondary {
    grid-column: 1 / 5;
    grid-row: 5;
  }

  body.home-today-active .today-bento-tools {
    grid-column: 5 / 13;
    grid-row: 5;
  }

  body.home-today-active .today-grid {
    width: 100%;
    max-width: none;
    margin: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body.home-today-active .today-bento-primary .today-grid,
  body.home-today-active .today-bento-secondary .today-grid,
  body.home-today-active .today-bento-tools .today-grid {
    flex: 1;
  }

  body.home-today-active .today-bento-tools .today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Единая пластика карточек: подъём + мягкий зум фона */
  body.home-today-active .today-main-card,
  body.home-today-active .today-support-card {
    grid-column: 1 / -1;
    min-height: 100%;
    border-radius: 24px;
    transition: transform .32s cubic-bezier(.2,.7,.2,1), box-shadow .32s ease, border-color .32s ease;
  }

  body.home-today-active .today-bento-tools .today-support-card {
    grid-column: span 1;
  }

  body.home-today-active .today-main-card::before,
  body.home-today-active .today-support-card::before {
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
  }

  body.home-today-active .today-main-card:hover,
  body.home-today-active .today-support-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 30px 72px rgba(0,0,0,.46);
  }

  body.home-today-active .today-main-card:hover::before,
  body.home-today-active .today-support-card:hover::before {
    transform: scale(1.045);
  }

  body.home-today-active .today-bento-primary .today-main-card {
    min-height: 380px !important;
    padding: 34px 38px 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  body.home-today-active .today-bento-primary .today-main-card h2 {
    font-size: clamp(36px, 3.4vw, 52px) !important;
    line-height: 1.06 !important;
    margin: 10px 0 12px !important;
    letter-spacing: -0.035em !important;
  }

  body.home-today-active .today-bento-primary .today-main-card p {
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.68) !important;
    max-width: 52ch !important;
  }

  body.home-today-active .today-bento-secondary .ios-section-header,
  body.home-today-active .today-bento-tools .ios-section-header {
    display: none;
  }

  .feed-carousel-section {
    width: 100%;
    margin: 0;
  }

  .feed-carousel {
    width: 100%;
  }

  body.home-today-active .carousel-3d-container {
    display: none;
  }

  body.home-today-active .today-feed-list {
    flex: 1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-radius: 24px;
    background:
      radial-gradient(circle at 18% 0%, rgba(255,255,255,.08), transparent 36%),
      linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.09);
    box-shadow: 0 22px 56px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.1);
  }

  body.home-today-active .today-feed-item {
    position: relative;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 14px;
    min-height: 0;
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    padding: 10px 12px;
    transition: background .2s ease, transform .2s ease;
  }

  body.home-today-active .today-feed-item:hover {
    background: rgba(255,255,255,.06);
    transform: translateY(-1px);
  }

  body.home-today-active .today-feed-item img {
    width: 86px;
    height: 66px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    transition: transform .35s cubic-bezier(.2,.7,.2,1);
  }

  body.home-today-active .today-feed-item:hover img {
    transform: scale(1.05);
  }

  body.home-today-active .today-feed-item span {
    min-width: 0;
  }

  body.home-today-active .today-feed-item small,
  body.home-today-active .today-feed-item em {
    display: block;
    color: rgba(255,255,255,.46);
    font-size: 11.5px;
    font-style: normal;
    line-height: 1.4;
  }

  body.home-today-active .today-feed-item small {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.38);
  }

  body.home-today-active .today-feed-item em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.home-today-active .today-feed-item strong {
    display: block;
    margin: 4px 0 3px;
    color: rgba(255,255,255,.92);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
  }

  body.home-today-active .today-feed-item b {
    color: rgba(255,255,255,.35);
    font-size: 20px;
    font-weight: 400;
    transition: color .2s ease, transform .2s ease;
  }

  body.home-today-active .today-feed-item:hover b {
    color: rgba(255,255,255,.7);
    transform: translateX(3px);
  }

  body.home-today-active .today-psychologists-card {
    width: 100%;
    margin: 0;
    min-height: 236px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 36%);
  }

  body.home-today-active .today-event-yoga-card {
    width: 100%;
    min-height: 236px;
    margin: 0;
    padding: 18px 22px 18px 18px;
    grid-template-columns: minmax(280px, 36%) minmax(0, 1fr) auto;
    gap: clamp(22px, 3vw, 38px);
    border-radius: 30px;
    background:
      linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.42)),
      radial-gradient(circle at 14% 0%, rgba(216,191,155,.22), transparent 36%),
      radial-gradient(circle at 84% 12%, rgba(123,158,142,.2), transparent 42%),
      linear-gradient(135deg, rgba(255,255,255,.095), rgba(255,255,255,.025)),
      rgba(7,16,14,.72);
  }

  body.home-today-active .today-event-yoga-card img {
    width: 100%;
    height: 200px;
    min-width: 0;
    border-radius: 22px;
  }

  body.home-today-active .today-event-yoga-card span {
    align-content: center;
    gap: 8px;
  }

  body.home-today-active .today-event-yoga-card strong {
    max-width: 18ch;
    font-size: clamp(32px, 3.3vw, 48px);
  }

  body.home-today-active .today-event-yoga-card em {
    max-width: 56ch;
    font-size: 15px;
    color: rgba(255,255,255,.68);
  }

  body.home-today-active .today-bento-secondary .today-main-card,
  body.home-today-active .today-support-card {
    min-height: 264px !important;
    max-height: none;
    padding: 26px !important;
    border-radius: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  body.home-today-active .today-bento-secondary .today-main-card h2,
  body.home-today-active .today-support-card h3 {
    font-size: clamp(21px, 1.9vw, 26px) !important;
    line-height: 1.16 !important;
    margin: 8px 0 8px !important;
    letter-spacing: -0.025em !important;
  }

  body.home-today-active .today-bento-secondary .today-main-card p,
  body.home-today-active .today-support-card p {
    font-size: 13.5px !important;
    line-height: 1.48 !important;
    color: rgba(255, 255, 255, 0.64) !important;
    margin-bottom: 14px !important;
    max-width: 44ch;
  }

  body.home-today-active .today-program-button,
  body.home-today-active .today-support-button {
    align-self: flex-end !important;
    margin-top: auto !important;
    min-height: 40px !important;
    padding: 0 20px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    transition: border-color .2s ease, filter .2s ease, transform .2s ease;
  }

  body.home-today-active .today-program-button:hover,
  body.home-today-active .today-support-button:hover {
    border-color: rgba(255,255,255,.5) !important;
    filter: brightness(1.22);
  }

  body.home-today-active .today-day-pill {
    display: inline-flex !important;
    margin-bottom: 10px !important;
    padding: 5px 11px !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    border-radius: 20px !important;
  }

  body.home-today-active .today-pro-badge {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 4px 11px !important;
    min-height: auto !important;
    border-radius: 20px !important;
  }

  body.home-today-active .home-marathon-header {
    margin-top: 48px;
    padding-left: var(--today-pad, 48px) !important;
    padding-right: var(--today-pad, 48px) !important;
    box-sizing: border-box !important;
  }

  body.home-today-active .home-marathon-orbit {
    margin: 0 auto 40px !important;
    padding-left: var(--today-pad, 48px) !important;
    padding-right: var(--today-pad, 48px) !important;
    box-sizing: border-box !important;
  }

  body.home-today-active .home-marathon-orbit-stage {
    gap: 24px;
    padding: 8px 2px 22px;
  }

  /* Компактные, благородные карточки марафонов ровно в 3 колонки сетки */
  body.home-today-active .home-marathon-card {
    flex: 0 0 calc((100% - 48px) / 3);
    height: 250px;
    padding: 22px !important;
    border-radius: 24px !important;
    scroll-snap-align: start;
    background: #101010;
  }

  body.home-today-active .home-marathon-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--card-bg) center/cover no-repeat;
    z-index: -2;
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
  }

  body.home-today-active .home-marathon-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.84));
    z-index: -1;
  }

  body.home-today-active .home-marathon-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,.3);
    box-shadow: 0 24px 56px rgba(0,0,0,.45);
  }

  body.home-today-active .home-marathon-card:hover::after {
    transform: scale(1.05);
  }

  body.home-today-active .home-marathon-card span {
    font-size: 9px !important;
    letter-spacing: .12em;
    margin-bottom: 5px;
  }

  body.home-today-active .home-marathon-card strong {
    font-size: 22px !important;
    letter-spacing: -.03em;
    line-height: 1.1;
  }

  body.home-today-active .home-marathon-card small {
    font-size: 12px !important;
    margin-top: 6px !important;
    max-width: 28ch;
    color: rgba(255,255,255,.68);
    line-height: 1.35;
  }

  body.feed-page .feed-container {
    width: min(760px, var(--desktop-rail-width));
    max-width: 760px;
    margin-left: var(--desktop-left);
    margin-right: auto;
    padding-top: 36px;
  }

  body.chat-page {
    min-height: 100dvh;
    overflow: hidden;
  }

  body.chat-page .app-sidebar {
    display: flex !important;
  }

  body.chat-page .chat-page-shell {
    min-height: 100dvh;
    margin-left: 232px !important;
    width: calc(100vw - 232px) !important;
    justify-content: center;
    padding: 20px var(--desktop-gutter);
    box-sizing: border-box;
    background:
      radial-gradient(circle at 50% -10%, rgba(216,191,155,.08), transparent 38%),
      linear-gradient(90deg, rgba(3,6,5,.96), rgba(7,12,10,.98));
  }

  body.chat-page .chat-panel {
    width: min(920px, calc(100vw - 232px - var(--desktop-gutter) * 2)) !important;
    height: calc(100dvh - 40px);
    border-radius: 30px;
    background:
      radial-gradient(circle at 18% 0%, rgba(255,255,255,.08), transparent 30%),
      linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.024)),
      var(--chat-pattern),
      rgba(5, 10, 9, .88);
    background-size: auto, auto, var(--chat-pattern-size), auto;
    box-shadow: 0 28px 92px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.14);
    overflow: hidden;
  }

  .chat-desktop-topbar {
    display: grid;
    grid-template-columns: 104px 1fr 104px;
    align-items: center;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(4, 8, 7, .44);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .chat-desktop-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    border-radius: 999px;
    color: rgba(255,255,255,.86);
    text-decoration: none;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
  }

  .chat-desktop-back svg {
    width: 18px;
    height: 18px;
  }

  .chat-desktop-topbar > div {
    text-align: center;
  }

  .chat-desktop-topbar strong,
  .chat-desktop-topbar span {
    display: block;
  }

  .chat-desktop-topbar strong {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
  }

  .chat-desktop-topbar span {
    margin-top: 3px;
    color: rgba(255,255,255,.50);
    font-size: 11px;
    font-weight: 600;
  }

  .chat-desktop-back span {
    margin: 0;
    color: inherit;
    font-size: 12px;
    font-weight: 800;
  }

  body.chat-page .notification-prompt-banner {
    margin: 14px 16px 0;
    border-radius: 24px;
  }

  body.chat-page .chat-messages {
    padding: 26px clamp(28px, 5vw, 72px) 22px;
    gap: 14px;
  }

  body.chat-page .chat-message-bubble {
    max-width: min(66%, 560px);
    padding: 13px 17px 14px;
  }

  body.chat-page .chat-message-text {
    font-size: 15px;
    line-height: 1.52;
  }

  body.chat-page .chat-composer {
    margin: 0 clamp(24px, 5vw, 64px) 18px;
    border-radius: 28px;
    padding: 12px;
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: 0 18px 48px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.14);
  }

  body.chat-page .chat-composer textarea {
    min-height: 48px;
    font-size: 15px;
  }
}

@media (min-width: 1440px) {
  body.home-today-active .today-screen,
  body.chat-page .chat-page-shell {
    --desktop-gutter: clamp(48px, 4.2vw, 72px);
  }

  body.chat-page .chat-panel {
    width: min(960px, var(--desktop-rail-width));
  }
}

/* ≥1280: лента справа от основной программы */
@media (min-width: 1280px) {
  body.home-today-active .today-bento-primary {
    grid-column: 1 / 9;
    grid-row: 1;
  }

  body.home-today-active .today-bento-feed {
    grid-column: 9 / 13;
    grid-row: 1;
  }

  body.home-today-active .today-bento-secondary {
    grid-column: 1 / 5;
    grid-row: 2;
  }

  body.home-today-active .today-bento-tools {
    grid-column: 5 / 13;
    grid-row: 2;
  }

  body.home-today-active .today-feed-list {
    min-height: 380px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  body.home-today-active .today-feed-item:not(:first-child)::after {
    content: '';
    position: absolute;
    top: -4.5px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: rgba(255,255,255,.07);
    pointer-events: none;
  }
}

/* ─── Home Marathons Classic Scroll ────────── */
.home-marathon-header {
  margin-top: 34px;
  margin-bottom: 8px;
}

.home-marathon-orbit {
  width: 100%;
  margin: 4px auto 30px;
  overflow: visible;
}

.home-marathon-orbit-stage {
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 8px 2px 16px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.home-marathon-orbit-stage::-webkit-scrollbar {
  display: none;
}

.home-marathon-orbit-stage.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
}

.home-marathon-card {
  position: relative;
  flex: 0 0 min(58vw, 238px);
  height: min(72vw, 308px);
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  scroll-snap-align: center;
  border: 1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.74)),
    var(--card-bg) center/cover no-repeat;
  background-color: #101010;
  box-shadow: 0 20px 48px rgba(0,0,0,.42);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.home-marathon-card span {
  margin-bottom: 7px;
  color: rgba(255,255,255,.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-marathon-card strong {
  color: #fff;
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.home-marathon-card small {
  margin-top: 8px;
  color: rgba(255,255,255,.66);
  font-size: 12px;
  line-height: 1.35;
}

.home-marathon-card.is-active {
  pointer-events: auto;
}

@media (max-width: 520px) {
  .home-marathon-orbit {
    margin-top: 8px;
    margin-bottom: 34px;
  }
  .home-marathon-orbit-stage {
    width: calc(100vw - 24px);
    margin: 0 auto;
    padding: 8px 12px 10px;
    cursor: default;
  }
  .home-marathon-card {
    flex: 0 0 min(58vw, 210px);
    height: 270px;
    border-radius: 22px;
    padding: 16px;
  }
  .home-marathon-card strong {
    font-size: 20px;
  }
  .home-marathon-card small {
    font-size: 11px;
  }
}
