:root {
  color-scheme: light;
  --ink: #07120f;
  --ink-soft: #40514a;
  --muted: #6f7e78;
  --surface: #ffffff;
  --surface-2: #f2f6f3;
  --surface-3: #e8eeea;
  --line: #dce5df;
  --lime: #c9ff5a;
  --lime-strong: #9ce62b;
  --aqua: #5dd8ce;
  --orange: #ff835c;
  --shadow: 0 14px 40px rgba(7, 18, 15, 0.1);
  --shadow-soft: 0 7px 22px rgba(7, 18, 15, 0.07);
  --radius: 24px;
  --nav-height: 74px;
  font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--surface-2); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--surface-2); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center; gap: 8px; height: 68px;
  padding: max(8px, env(safe-area-inset-top)) 16px 8px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
}
.brand { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.brand-mark { display: grid; place-items: center; width: 34px; aspect-ratio: 1; border-radius: 12px; background: var(--ink); color: var(--lime); font-weight: 900; font-size: 19px; transform: rotate(-4deg); }
.brand strong { display: block; letter-spacing: .075em; font-size: 14px; line-height: 1; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.topbar-title { grid-column: 2; display: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 800; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 15px; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--surface-3); }
.back-button { grid-column: 1; }
#header-action { grid-column: 3; }
.topbar.detail .brand { display: none; }
.topbar.detail .topbar-title { display: block; }

#app { width: min(100%, 1260px); min-height: calc(100dvh - 68px); margin: 0 auto; padding: 20px 16px calc(var(--nav-height) + 34px + env(safe-area-inset-bottom)); outline: none; }
.page { animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } }

body.auth-mode { min-height: 100dvh; background: #07120f; }
body.auth-mode .topbar, body.auth-mode .bottom-nav { display: none; }
body.auth-mode #app { width: 100%; min-height: 100dvh; padding: 0; }
.login-page { min-height: 100dvh; padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 12% 10%, rgba(156,230,43,.15), transparent 28%), #07120f; color: white; }
.login-brand { display: inline-flex; align-items: center; gap: 11px; width: min(100%, 1080px); margin: 0 auto 22px; }
.login-brand .brand-mark { background: var(--lime); color: var(--ink); }
.login-brand strong { display: block; font-size: 15px; line-height: 1; letter-spacing: .08em; }
.login-brand small { display: block; margin-top: 4px; color: #9dafaa; font-size: 8px; font-weight: 850; letter-spacing: .24em; }
.login-layout { display: grid; width: min(100%, 1080px); min-height: calc(100dvh - 104px); margin: 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 30px; background: #f7faf7; box-shadow: 0 28px 70px rgba(0,0,0,.3); }
.login-pitch { position: relative; display: none; min-height: 620px; overflow: hidden; isolation: isolate; background: linear-gradient(150deg, #163f2b 0%, #0a2119 72%); }
.login-pitch::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .3; background: repeating-linear-gradient(90deg, transparent 0 68px, rgba(255,255,255,.055) 68px 136px); }
.pitch-lines { position: absolute; inset: 42px; border: 2px solid rgba(255,255,255,.2); }
.pitch-lines::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid rgba(255,255,255,.2); }
.pitch-lines::after { content: ""; position: absolute; left: 50%; top: 50%; width: 120px; aspect-ratio: 1; transform: translate(-50%,-50%); border: 2px solid rgba(255,255,255,.2); border-radius: 50%; }
.pitch-lines span { position: absolute; left: -2px; top: 50%; width: 100px; height: 190px; transform: translateY(-50%); border: 2px solid rgba(255,255,255,.2); border-left: 0; }
.login-ball { position: absolute; right: 14%; top: 21%; display: grid; place-items: center; width: 122px; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 78px; filter: drop-shadow(0 18px 18px rgba(0,0,0,.28)); transform: rotate(-12deg); }
.login-pitch-copy { position: absolute; left: 44px; right: 44px; bottom: 46px; display: grid; gap: 8px; }
.login-pitch-copy small { color: var(--lime); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.login-pitch-copy strong { max-width: 390px; font-size: 48px; line-height: .96; letter-spacing: -.05em; }
.login-card { display: grid; align-content: center; padding: 34px 24px; color: var(--ink); }
.login-card h1 { max-width: 540px; margin-bottom: 17px; font-size: clamp(39px, 10vw, 58px); }
.login-lead { max-width: 520px; margin-bottom: 28px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.login-form { display: grid; gap: 9px; }
.login-form > label { color: var(--ink-soft); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.login-input-wrap { position: relative; }
.login-input-wrap svg { position: absolute; left: 16px; top: 50%; width: 20px; transform: translateY(-50%); color: #6b7c75; }
.login-input-wrap input { width: 100%; height: 56px; padding: 0 16px 0 48px; border: 1px solid #cfdad4; border-radius: 16px; outline: none; background: white; color: var(--ink); }
.login-input-wrap input:focus { border-color: #75c9bd; box-shadow: 0 0 0 4px rgba(93,216,206,.14); }
.login-error { margin: 2px 0; padding: 11px 13px; border-radius: 12px; background: #fff0eb; color: #9a3c24; font-size: 12px; font-weight: 750; line-height: 1.45; }
.login-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; margin-top: 5px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--lime); color: var(--ink); font-weight: 900; cursor: pointer; box-shadow: 0 12px 25px rgba(156,230,43,.24); }
.login-submit b { display: grid; place-items: center; width: 32px; aspect-ratio: 1; border-radius: 10px; background: var(--ink); color: white; }
.login-submit:disabled { cursor: wait; opacity: .68; }
.login-benefits { display: grid; gap: 10px; margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.login-benefits span { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.login-benefits b { display: grid; place-items: center; width: 22px; aspect-ratio: 1; border-radius: 50%; background: #e9fbc8; color: #4d7212; }
.login-support { margin: 22px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.account-email { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; padding: 12px 14px; border-radius: 14px; background: #effcf9; color: #276e66; }
.account-email span { font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.account-email strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.logout-button { margin-top: -4px; }

.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: #347068; font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 4px; background: var(--lime-strong); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(32px, 8vw, 62px); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 8px; font-size: clamp(25px, 5vw, 38px); line-height: 1.05; letter-spacing: -.035em; }
h3 { margin-bottom: 5px; font-size: 19px; letter-spacing: -.02em; }
.lead { max-width: 680px; margin-bottom: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }
.muted { color: var(--muted); }
.section-heading { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 18px; margin: 30px 0 16px; }
.section-heading p { margin: 0; color: var(--muted); }

.train-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 28px 24px 26px; border-radius: 32px;
  background: var(--ink); color: white; box-shadow: var(--shadow);
}
.train-hero::after { content: ""; position: absolute; z-index: -1; width: 230px; height: 230px; right: -60px; top: -80px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--lime), rgba(201,255,90,.05) 65%); opacity: .8; filter: blur(3px); }
.train-hero .eyebrow { color: var(--lime); }
.train-hero .lead { color: #bfcdc7; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.stat-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.075); font-size: 13px; font-weight: 750; }
.stat-pill b { color: var(--lime); }

.search-wrap { position: relative; min-width: min(100%, 310px); }
.search-wrap svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; color: var(--muted); }
.search-input { width: 100%; height: 48px; padding: 0 16px 0 46px; border: 1px solid var(--line); border-radius: 16px; outline: none; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft); }
.search-input:focus { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(93,216,206,.15); }

.module-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.module-card, .session-card { position: relative; overflow: hidden; border: 0; background: var(--ink); color: white; box-shadow: var(--shadow-soft); cursor: pointer; text-align: left; }
.module-card { min-height: 220px; border-radius: 25px; }
.module-card:hover .media-thumb, .session-card:hover .media-thumb { transform: scale(1.035); }
.media-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #14241f; transition: transform .45s ease; }
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #102a24, #2d5143); font-size: 62px; }
.card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 22%, rgba(7,18,15,.18) 48%, rgba(7,18,15,.94) 100%); }
.module-card-content { position: absolute; inset: auto 0 0; z-index: 2; padding: 24px 20px 18px; }
.module-card .tag { margin-bottom: 8px; }
.module-card h3 { margin: 0 0 5px; font-size: 24px; color: white; }
.module-card p { margin: 0; color: rgba(255,255,255,.76); font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 6px 9px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.progress-line { height: 5px; margin-top: 15px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.18); }
.progress-line i { display: block; width: var(--progress, 0%); height: 100%; border-radius: inherit; background: var(--lime); }

.module-hero { display: grid; gap: 16px; margin-bottom: 22px; }
.module-hero-copy { padding: 5px 2px; }
.module-hero-media { position: relative; min-height: 230px; overflow: hidden; border-radius: 28px; background: var(--ink); box-shadow: var(--shadow); }
.module-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,18,15,.1), rgba(7,18,15,.5)); }
.session-list { display: grid; gap: 12px; }
.session-card { display: grid; grid-template-columns: 118px 1fr; min-height: 130px; border-radius: 22px; background: var(--surface); color: var(--ink); }
.session-card .session-media { position: relative; overflow: hidden; min-height: 130px; background: var(--ink); }
.session-card .session-copy { align-self: center; min-width: 0; padding: 17px 18px; }
.session-card h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.session-meta span { display: inline-flex; align-items: center; gap: 5px; }
.session-meta svg { width: 15px; height: 15px; }

.session-header { display: grid; gap: 14px; margin-bottom: 18px; }
.session-cover { position: relative; min-height: 260px; overflow: hidden; border-radius: 28px; background: var(--ink); box-shadow: var(--shadow); }
.session-cover-content { position: absolute; inset: auto 0 0; z-index: 2; padding: 56px 22px 20px; color: white; background: linear-gradient(transparent, rgba(7,18,15,.94)); }
.session-cover-content h1 { margin-bottom: 7px; font-size: clamp(34px, 9vw, 54px); }
.session-overview { display: grid; gap: 12px; }
.info-panel { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-soft); }
.info-panel h3 { margin-bottom: 12px; }
.equipment-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.equipment-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 15px; background: var(--surface-2); font-size: 13px; font-weight: 750; }
.equipment-chip b { display: grid; place-items: center; min-width: 29px; height: 29px; border-radius: 10px; background: var(--lime); font-size: 17px; }
.lesson-section { margin-top: 26px; }
.lesson-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lesson-section-title span { color: var(--muted); font-size: 12px; font-weight: 800; }
.lesson-list { display: grid; gap: 9px; }
.lesson-row { display: grid; grid-template-columns: 84px minmax(0,1fr) 34px; align-items: center; gap: 12px; min-height: 84px; padding: 7px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 4px 12px rgba(7,18,15,.04); cursor: pointer; text-align: left; }
.lesson-row:hover { border-color: #adc7bc; transform: translateY(-1px); }
.lesson-thumb { position: relative; width: 84px; height: 68px; overflow: hidden; border-radius: 13px; background: var(--ink); }
.lesson-row h3 { margin: 0 0 5px; font-size: 15px; }
.lesson-row p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.lesson-row .chevron { color: var(--muted); }
.lesson-row.completed { border-color: rgba(156,230,43,.65); background: #f9fff0; }
.complete-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--lime-strong); }

.lesson-page { max-width: 1180px; margin: 0 auto; }
.lesson-stage { display: grid; gap: 17px; }
.player-wrap { position: relative; overflow: hidden; border-radius: 26px; background: var(--ink); box-shadow: var(--shadow); }
.player-wrap video { display: block; width: 100%; height: auto; object-fit: contain; background: transparent; }
.audio-stage { display: grid; place-items: center; min-height: 100%; padding: 30px; text-align: center; color: white; background: radial-gradient(circle at 60% 20%, #3d6d5d, var(--ink) 65%); }
.audio-orb { display: grid; place-items: center; width: 110px; aspect-ratio: 1; margin-bottom: 20px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 45px; box-shadow: 0 0 0 18px rgba(201,255,90,.08), 0 0 0 36px rgba(201,255,90,.04); }
.audio-stage audio { width: min(100%, 480px); margin-top: 18px; }
.lesson-copy { display: grid; align-content: start; gap: 14px; }
.lesson-copy-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.lesson-copy h1 { margin-bottom: 8px; font-size: clamp(30px, 7vw, 48px); }
.description-card { padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); line-height: 1.6; color: var(--ink-soft); }
.voice-note { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border: 1px solid #bce5df; border-radius: 15px; background: #effcf9; color: #276e66; font-size: 13px; font-weight: 800; }
.voice-note::before { content: "◖"; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--aqua); color: var(--ink); font-size: 16px; }

.progress-page, .profile-page { display: grid; gap: 22px; }
.progress-hero, .profile-hero {
  display: flex; align-items: center; gap: 20px; overflow: hidden;
  padding: 25px 22px; border-radius: 30px; background: var(--ink); color: white; box-shadow: var(--shadow);
}
.progress-hero h1, .profile-hero h1 { margin-bottom: 7px; }
.progress-hero p:last-child, .profile-hero p:last-child { margin: 0; color: #bdcbc5; line-height: 1.5; }
.progress-hero .eyebrow, .profile-hero .eyebrow { color: var(--lime); }
.progress-ring {
  display: grid; place-items: center; width: 116px; aspect-ratio: 1; flex: 0 0 auto; border-radius: 50%;
  background: conic-gradient(var(--lime) var(--progress), rgba(255,255,255,.12) 0);
  transform: rotate(-90deg);
}
.progress-ring::before { content: ""; grid-area: 1/1; width: 86px; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.progress-ring span { position: relative; grid-area: 1/1; display: grid; text-align: center; transform: rotate(90deg); }
.progress-ring b { color: white; font-size: 25px; line-height: 1; }
.progress-ring small { margin-top: 5px; color: #9fb0a9; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.metric-card { display: grid; align-content: start; min-height: 136px; padding: 15px 13px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-soft); }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 15px; border-radius: 11px; background: #eaffc7; color: #4d7212; }
.metric-icon svg { width: 18px; height: 18px; }
.metric-card strong { font-size: 26px; line-height: 1; }
.metric-card small { margin-top: 7px; color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.25; }
.dashboard-panel { padding: 20px; border: 1px solid var(--line); border-radius: 25px; background: var(--surface); box-shadow: var(--shadow-soft); }
.dashboard-section { display: grid; gap: 12px; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.panel-heading h2 { margin: 0; font-size: 26px; }
.goal-badge { display: grid; place-items: center; min-width: 46px; height: 34px; padding: 0 10px; border-radius: 999px; background: #eaffc7; color: #4d7212; font-size: 12px; font-weight: 900; }
.goal-track, .module-progress-track { display: block; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.goal-track { height: 10px; margin: 18px 0; }
.goal-track i, .module-progress-track i { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime-strong), var(--aqua)); }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-day { display: grid; justify-items: center; gap: 6px; color: var(--muted); }
.week-day span { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 42px; border-radius: 13px; background: var(--surface-2); font-size: 13px; font-weight: 900; }
.week-day.active span { background: var(--lime); color: var(--ink); }
.week-day.today span { outline: 2px solid var(--aqua); outline-offset: 2px; }
.week-day small { font-size: 9px; font-weight: 850; text-transform: uppercase; }
.module-progress-list { display: grid; gap: 9px; }
.module-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); cursor: pointer; text-align: left; }
.module-progress-row:hover { border-color: #a9cfc6; transform: translateY(-1px); }
.module-progress-copy { display: grid; min-width: 0; }
.module-progress-copy strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.module-progress-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 750; }
.module-progress-value { align-self: center; color: #347068; font-size: 12px; font-weight: 900; }
.module-progress-track { grid-column: 1/-1; height: 6px; }
.achievement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.achievement { display: flex; align-items: center; gap: 11px; min-height: 82px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); opacity: .48; }
.achievement > span { display: grid; place-items: center; width: 38px; aspect-ratio: 1; flex: 0 0 auto; border-radius: 12px; background: var(--surface-3); font-weight: 900; }
.achievement div { display: grid; min-width: 0; }
.achievement strong { font-size: 13px; }
.achievement small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.achievement.unlocked { border-color: #c6e995; background: #fbfff5; opacity: 1; }
.achievement.unlocked > span { background: var(--lime); }
.next-list, .favorite-list { display: grid; gap: 9px; }
.next-card { display: grid; grid-template-columns: 70px minmax(0, 1fr) 24px; align-items: center; gap: 12px; min-height: 82px; padding: 7px 10px 7px 7px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); cursor: pointer; text-align: left; }
.next-card > span:nth-child(2), .favorite-main > span:nth-child(2) { display: grid; min-width: 0; }
.next-card small, .favorite-main small { color: #347068; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.next-card strong, .favorite-main strong { overflow: hidden; margin-top: 3px; white-space: nowrap; text-overflow: ellipsis; }
.next-card em, .favorite-main em { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.next-thumb, .favorite-thumb { position: relative; display: block; width: 70px; height: 66px; overflow: hidden; border-radius: 13px; background: var(--ink); }
.next-card > svg { width: 19px; color: var(--muted); }
.all-done, .favorites-empty { padding: 28px 20px; border: 1px dashed #b9cac3; border-radius: 20px; background: var(--surface); text-align: center; }
.all-done > span { font-size: 34px; }
.all-done h3, .favorites-empty h3 { margin: 9px 0 5px; }
.all-done p, .favorites-empty p { margin: 0; color: var(--muted); font-size: 13px; }

.profile-hero { position: relative; }
.profile-avatar { display: grid; place-items: center; width: 82px; aspect-ratio: 1; flex: 0 0 auto; border-radius: 27px; background: var(--lime); color: var(--ink); font-size: 35px; font-weight: 950; transform: rotate(-3deg); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.profile-stats span { display: grid; justify-items: center; gap: 3px; padding: 14px 7px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.profile-stats b { font-size: 21px; }
.profile-stats small { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.profile-settings { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 12px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid label > span { color: var(--ink-soft); font-size: 11px; font-weight: 850; }
.form-grid input, .form-grid select { width: 100%; height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; outline: none; background: var(--surface-2); color: var(--ink); }
.form-grid input:focus, .form-grid select:focus { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(93,216,206,.14); }
.profile-settings .primary-button { margin: 0; }
.privacy-note { margin: -4px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.favorite-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.favorite-main { display: grid; grid-template-columns: 70px minmax(0,1fr); align-items: center; gap: 12px; min-width: 0; padding: 7px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.favorite-remove { width: 36px; height: 36px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 23px; cursor: pointer; }
.favorite-remove:hover { background: #fff0e9; color: #a4462d; }
.favorites-empty > svg { width: 35px; height: 35px; color: #347068; }
.favorites-empty .secondary-button { width: auto; margin-top: 16px; padding: 0 20px; }

@media (max-width: 420px) {
  .progress-hero, .profile-hero { gap: 14px; padding: 21px 16px; }
  .progress-hero h1, .profile-hero h1 { font-size: 34px; }
  .progress-ring { width: 90px; }
  .progress-ring::before { width: 67px; }
  .progress-ring b { font-size: 21px; }
  .profile-avatar { width: 68px; border-radius: 22px; font-size: 29px; }
  .metric-card { min-height: 126px; padding: 12px 10px; }
  .metric-card strong { font-size: 23px; }
  .metric-icon { margin-bottom: 12px; }
  .achievement-grid { grid-template-columns: 1fr; }
}
.action-row { display: flex; gap: 9px; }
.circle-action { display: grid; place-items: center; width: 44px; aspect-ratio: 1; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.circle-action.active { border-color: var(--orange); color: var(--orange); background: #fff4ef; }
.difficulty { padding: 17px; border: 1px solid #bce5df; border-radius: 20px; background: linear-gradient(135deg, #effcf9, #fff); }
.difficulty-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.difficulty-head small { display: block; color: #277a71; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.difficulty-head strong { font-size: 20px; }
.difficulty-count { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #dff5f1; color: #277a71; font-size: 11px; font-weight: 850; }
.difficulty-guidance { margin: -2px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.difficulty-options { display: grid; gap: 8px; }
.difficulty-option { display: grid; grid-template-columns: 5px minmax(0, 1fr) auto; align-items: stretch; gap: 11px; width: 100%; min-height: 67px; padding: 10px 12px 10px 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; }
.difficulty-option:hover { border-color: #98d8ce; transform: translateY(-1px); }
.difficulty-option.active { border-color: var(--aqua); background: #eefbfc; box-shadow: 0 8px 18px rgba(15, 118, 110, .08); }
.difficulty-marker { width: 5px; height: 100%; min-height: 45px; border-radius: 999px; background: #a7b2b7; }
.difficulty-marker.current { background: var(--aqua); }
.difficulty-marker.easier { background: #75bfea; }
.difficulty-marker.harder { background: #d9a323; }
.difficulty-option-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.difficulty-option-copy small { color: #277a71; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.difficulty-option-copy strong { overflow: hidden; margin-top: 2px; color: var(--ink); font-size: 14px; line-height: 1.25; text-overflow: ellipsis; }
.difficulty-option-copy em { margin-top: 2px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 700; }
.difficulty-arrow { align-self: center; color: #6b7a80; font-size: 20px; font-weight: 900; }
.difficulty-option.active .difficulty-arrow { color: #0c7d72; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lesson-nav button { min-height: 49px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); font-weight: 800; cursor: pointer; }
.lesson-nav button:disabled { opacity: .35; }

.primary-button { width: 100%; min-height: 49px; margin-top: 9px; border: 0; border-radius: 15px; background: var(--lime); color: var(--ink); font-weight: 900; cursor: pointer; box-shadow: 0 8px 18px rgba(156,230,43,.22); }
.primary-button:hover { background: var(--lime-strong); }
.secondary-button { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 850; cursor: pointer; }

.empty-page { min-height: calc(100dvh - 200px); display: grid; place-items: center; text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 108px; aspect-ratio: 1; margin: 0 auto 22px; border-radius: 34px; background: var(--ink); color: var(--lime); transform: rotate(-3deg); }
.empty-illustration svg { width: 49px; height: 49px; }
.empty-page p { max-width: 380px; color: var(--muted); }

.bottom-nav {
  position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 50;
  display: grid; grid-template-columns: repeat(3, 1fr); width: min(calc(100% - 20px), 560px); height: var(--nav-height);
  padding: 7px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.1); border-radius: 24px;
  background: rgba(7,18,15,.96); box-shadow: 0 18px 50px rgba(7,18,15,.28); backdrop-filter: blur(16px);
}
.nav-item { display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-radius: 17px; background: transparent; color: #819089; font-size: 10px; font-weight: 800; cursor: pointer; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { background: rgba(255,255,255,.1); color: white; }
.nav-item.active svg { color: var(--lime); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-height) + 26px + env(safe-area-inset-bottom)); z-index: 100; max-width: calc(100% - 40px); padding: 11px 16px; transform: translate(-50%, 15px); border-radius: 999px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s ease; font-size: 13px; font-weight: 750; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
  #app { padding-inline: 24px; }
  .section-heading { flex-direction: row; align-items: end; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-card { min-height: 260px; }
  .module-hero { grid-template-columns: 1fr 1.2fr; align-items: stretch; }
  .module-hero-copy { align-self: center; padding: 30px 12px; }
  .session-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-card { grid-template-columns: 155px 1fr; }
  .session-header { grid-template-columns: 1.45fr .75fr; }
  .session-overview { align-content: stretch; }
  .lesson-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-page, .profile-page { max-width: 960px; margin: 0 auto; }
  .progress-hero, .profile-hero { padding: 34px; }
  .metric-card { min-height: 150px; padding: 20px; }
  .module-progress-list, .next-list, .favorite-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .login-page { padding: 28px; }
  .login-card { padding: 52px; }
}

@media (min-width: 960px) {
  .topbar { padding-inline: 30px; }
  #app { padding-top: 30px; }
  .train-hero { padding: 48px; }
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .module-card { min-height: 280px; }
  .lesson-stage { grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); align-items: start; }
  .player-wrap { position: sticky; top: 92px; }
  .login-layout { grid-template-columns: .92fr 1.08fr; }
  .login-pitch { display: block; }
  .login-card { padding: 62px; }
}

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