:root {
  --font-sans: Inter, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  --page-bg: #e7ece8;
  --app-bg: #f5f7f4;
  --surface: #ffffff;
  --surface-soft: #eef4f0;
  --surface-warm: #fbf4e5;
  --surface-dark: #15372d;
  --text: #17241f;
  --text-2: #53625c;
  --text-3: #87938e;
  --line: #e3e9e5;
  --line-strong: #d2dcd6;
  --primary: #0f5c45;
  --primary-2: #157a5a;
  --primary-soft: #ddf0e7;
  --primary-softer: #edf8f3;
  --accent: #f2bd4f;
  --accent-2: #d99b24;
  --accent-soft: #fff1c8;
  --danger: #c84d50;
  --danger-soft: #fdebec;
  --info: #4678c8;
  --info-soft: #eaf1fc;
  --success: #27835f;
  --shadow-xs: 0 2px 8px rgba(20, 55, 44, 0.05);
  --shadow-sm: 0 8px 24px rgba(20, 55, 44, 0.08);
  --shadow-md: 0 18px 45px rgba(20, 55, 44, 0.13);
  --shadow-lg: 0 30px 80px rgba(18, 43, 35, 0.22);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --page-bg: #0d1714;
  --app-bg: #111c18;
  --surface: #17251f;
  --surface-soft: #1b2c25;
  --surface-warm: #2a271d;
  --surface-dark: #0b3225;
  --text: #edf5f1;
  --text-2: #b4c2bc;
  --text-3: #7f928a;
  --line: #283b33;
  --line-strong: #344b41;
  --primary: #46b98c;
  --primary-2: #66cea7;
  --primary-soft: #1d4938;
  --primary-softer: #183528;
  --accent: #f3c668;
  --accent-2: #e3ae43;
  --accent-soft: #42371f;
  --danger-soft: #422629;
  --info-soft: #20334e;
  --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

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

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(70, 185, 140, 0.16), transparent 26%),
    radial-gradient(circle at 85% 85%, rgba(242, 189, 79, 0.18), transparent 28%),
    var(--page-bg);
  transition: background-color 180ms ease, color 180ms ease;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

button,
a,
[role="button"] {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
  outline-offset: 2px;
}

img,
svg {
  display: block;
}

svg {
  flex: none;
}

p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 17px;
  height: 17px;
}

.icon--xs {
  width: 14px;
  height: 14px;
}

.icon--lg {
  width: 28px;
  height: 28px;
}

.app-frame {
  position: relative;
  width: min(100%, 430px);
  height: min(932px, calc(100dvh - 36px));
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 34px;
  background: var(--app-bg);
  box-shadow: var(--shadow-lg);
}

.app-frame::before {
  content: "";
  position: absolute;
  z-index: 200;
  top: 9px;
  left: 50%;
  width: 104px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(12, 25, 20, 0.88);
  opacity: 0.94;
  pointer-events: none;
}

.app-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--app-bg);
  animation: page-in 220ms ease both;
}

.page-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.page-scroll::-webkit-scrollbar {
  display: none;
}

.page-content {
  padding: 16px 18px calc(30px + var(--safe-bottom));
}

.page-content--nav {
  padding-bottom: calc(112px + var(--safe-bottom));
}

.page-content--flush {
  padding: 0 0 calc(104px + var(--safe-bottom));
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: .86; }
}

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

.boot-screen {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 36%, rgba(242, 189, 79, .22), transparent 28%),
    linear-gradient(160deg, #0e654a, #0b4d3a 65%, #15372d);
  color: #fff;
}

.boot-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.boot-loader {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 70% 25%, rgba(255,255,255,.32), transparent 28%),
    linear-gradient(145deg, var(--primary-2), var(--primary));
  box-shadow: 0 10px 24px rgba(9, 74, 53, .24);
}

.brand-mark span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}

.brand-mark--large {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.23), 0 18px 36px rgba(0,0,0,.16);
  backdrop-filter: blur(10px);
}

.brand-mark--large span {
  font-size: 22px;
}

.status-bar {
  flex: none;
  height: calc(38px + var(--safe-top));
  padding: calc(13px + var(--safe-top)) 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
}

.status-bar--light {
  color: #fff;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-signal {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 10px;
}

.status-signal i {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: currentColor;
}

.status-signal i:nth-child(1) { height: 3px; }
.status-signal i:nth-child(2) { height: 5px; }
.status-signal i:nth-child(3) { height: 7px; }
.status-signal i:nth-child(4) { height: 9px; }

.status-battery {
  width: 17px;
  height: 8px;
  padding: 1px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: .9;
}

.status-battery::after {
  content: "";
  display: block;
  width: 78%;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
}

.app-header {
  flex: none;
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 5px 16px 10px;
  background: color-mix(in srgb, var(--app-bg) 92%, transparent);
  backdrop-filter: blur(18px);
  z-index: 5;
}

.app-header__side {
  width: 44px;
  display: flex;
  align-items: center;
}

.app-header__side--right {
  justify-content: flex-end;
}

.app-header__title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.app-header__subtitle {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
}

.header-action,
.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.header-action:hover,
.icon-button:hover {
  background: var(--surface-soft);
}

.header-action:active,
.icon-button:active {
  transform: scale(.95);
}

.icon-button--surface {
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.icon-button--primary {
  color: #fff;
  background: var(--primary);
}

.icon-button--small {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--app-bg);
  border-radius: 50%;
  background: var(--danger);
}

.bottom-nav {
  position: absolute;
  z-index: 30;
  left: 12px;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  height: 72px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 7px 6px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 16px 40px rgba(19, 49, 39, .16);
  backdrop-filter: blur(22px);
}

.nav-item {
  position: relative;
  height: 56px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 18px;
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nav-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-item .icon {
  width: 22px;
  height: 22px;
}

.nav-item.is-active {
  color: var(--primary);
  background: var(--primary-softer);
}

.nav-item:active {
  transform: scale(.96);
}

.badge-count {
  position: absolute;
  top: 4px;
  right: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 8px;
  font-weight: 800;
}

.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, opacity 150ms ease;
}

.btn:active {
  transform: translateY(1px) scale(.99);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 27%, transparent);
}

.btn--primary:hover {
  box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 34%, transparent);
}

.btn--secondary {
  color: var(--primary);
  background: var(--primary-softer);
}

.btn--surface {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.btn--outline {
  color: var(--primary);
  border: 1px solid var(--primary);
  background: transparent;
}

.btn--danger-soft {
  color: var(--danger);
  background: var(--danger-soft);
}

.btn--text {
  min-height: 38px;
  padding: 0 6px;
  color: var(--primary);
  background: transparent;
}

.btn--small {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  font-size: 12px;
}

.btn--block {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-group > * {
  flex: 1;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.card--flat {
  box-shadow: none;
}

.card--soft {
  border-color: transparent;
  background: var(--surface-soft);
}

.card--accent {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--surface-warm);
}

.section {
  margin-top: 22px;
}

.section:first-child {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.015em;
}

.section-heading__action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--primary);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--primary-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.muted {
  color: var(--text-2);
}

.subtle {
  color: var(--text-3);
}

.text-sm {
  font-size: 12px;
}

.text-xs {
  font-size: 10px;
}

.fw-700 {
  font-weight: 700;
}

.stack-8 > * + * { margin-top: 8px; }
.stack-10 > * + * { margin-top: 10px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-14 > * + * { margin-top: 14px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-20 > * + * { margin-top: 20px; }

.row {
  display: flex;
  align-items: center;
}

.row--between {
  justify-content: space-between;
}

.row--start {
  align-items: flex-start;
}

.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }

.divider {
  height: 1px;
  background: var(--line);
}

.chip,
.status-chip {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text-2);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.chip--primary {
  color: var(--primary);
  background: var(--primary-soft);
}

.chip--accent {
  color: #7d5611;
  background: var(--accent-soft);
}

.chip--success {
  color: var(--success);
  background: var(--primary-softer);
}

.chip--danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.chip-button {
  cursor: pointer;
  border: 1px solid transparent;
}

.chip-button.is-active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.avatar {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  border-radius: 14px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255,255,255,.15), transparent),
    var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.avatar--sm {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 10px;
}

.avatar--lg {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  font-size: 20px;
}

.avatar--xl {
  width: 92px;
  height: 92px;
  border-radius: 30px;
  font-size: 24px;
}

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

.avatar__online {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #45bf83;
}

/* Welcome and authentication */
.welcome-page {
  background:
    radial-gradient(circle at 78% 23%, rgba(242,189,79,.28), transparent 25%),
    radial-gradient(circle at 15% 66%, rgba(91,199,156,.2), transparent 26%),
    linear-gradient(160deg, #0e674b 0%, #0e513e 54%, #12392f 100%);
  color: #fff;
}

.welcome-page::after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -145px;
  bottom: 116px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(255,255,255,.04),
    0 0 0 68px rgba(255,255,255,.025);
}

.welcome-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 36px 24px calc(24px + var(--safe-bottom));
}

.welcome-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-brand__text strong {
  display: block;
  font-size: 16px;
  letter-spacing: -.02em;
}

.welcome-brand__text span {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.66);
  font-size: 10px;
}

.welcome-visual {
  position: relative;
  height: 282px;
  margin: 36px 0 28px;
}

.orbit {
  position: absolute;
  inset: 8px 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  transform: rotate(-9deg);
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
}

.orbit::before { inset: 26px -20px; transform: rotate(32deg); }
.orbit::after { inset: 58px -36px; transform: rotate(-45deg); }

.welcome-compass {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 164px;
  height: 164px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 12px rgba(255,255,255,.025), 0 26px 50px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}

.welcome-compass::before,
.welcome-compass::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,.16);
}

.welcome-compass::before { width: 1px; height: 122px; }
.welcome-compass::after { width: 122px; height: 1px; }

.compass-core {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #17382e;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(0,0,0,.2);
}

.compass-core .icon {
  width: 34px;
  height: 34px;
}

.orbit-chip {
  position: absolute;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(17,52,42,.64);
  box-shadow: 0 12px 28px rgba(0,0,0,.13);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 700;
}

.orbit-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.orbit-chip--one { top: 10px; left: 28px; }
.orbit-chip--two { top: 64px; right: 2px; }
.orbit-chip--three { bottom: 34px; right: 22px; }
.orbit-chip--four { bottom: 10px; left: 10px; }

.welcome-copy {
  margin-top: auto;
}

.welcome-copy h1 {
  max-width: 330px;
  margin-bottom: 12px;
  font-size: clamp(32px, 8vw, 40px);
  line-height: 1.06;
  letter-spacing: -.045em;
}

.welcome-copy p {
  max-width: 340px;
  margin-bottom: 24px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.65;
}

.welcome-actions {
  display: grid;
  gap: 10px;
}

.welcome-actions .btn--primary {
  color: #17382e;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}

.welcome-actions .btn--surface {
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.auth-page {
  background:
    radial-gradient(circle at 82% 0%, rgba(242,189,79,.19), transparent 27%),
    var(--app-bg);
}

.auth-content {
  padding: 22px 24px calc(30px + var(--safe-bottom));
}

.auth-brand {
  margin: 18px 0 30px;
}

.auth-brand h1 {
  margin: 18px 0 8px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -.04em;
}

.auth-brand p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.auth-footer {
  margin-top: 22px;
  text-align: center;
  color: var(--text-2);
  font-size: 12px;
}

.auth-footer button {
  color: var(--primary);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 14px;
  color: var(--text-2);
  background: var(--surface-soft);
  font-size: 10px;
  line-height: 1.5;
}

.onboarding-page {
  background: var(--app-bg);
}

.onboarding-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 26px 24px calc(24px + var(--safe-bottom));
}

.onboarding-skip {
  align-self: flex-end;
  color: var(--text-2);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.onboarding-visual {
  position: relative;
  flex: 1;
  min-height: 330px;
  display: grid;
  place-items: center;
}

.onboarding-card {
  width: 244px;
  min-height: 300px;
  padding: 20px;
  border-radius: 34px;
  background: linear-gradient(155deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow-md);
  transform: rotate(-3deg);
}

.onboarding-card::before,
.onboarding-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 20px -22px -16px 24px;
  border-radius: 32px;
  background: var(--primary-soft);
  transform: rotate(7deg);
}

.onboarding-card::after {
  inset: 38px 20px -29px -32px;
  background: var(--accent-soft);
  transform: rotate(-5deg);
}

.onboarding-illustration {
  height: 184px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: var(--primary);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.9), transparent 40%),
    var(--primary-softer);
}

.onboarding-illustration .icon {
  width: 72px;
  height: 72px;
  stroke-width: 1.3;
}

.onboarding-mini-row {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.onboarding-mini-row i {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.onboarding-mini-row i:nth-child(1) { width: 54%; background: var(--primary); }
.onboarding-mini-row i:nth-child(2) { flex: 1; }

.onboarding-copy h1 {
  margin-bottom: 11px;
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -.035em;
}

.onboarding-copy p {
  margin-bottom: 22px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.65;
}

.onboarding-footer {
  display: flex;
  align-items: center;
  gap: 18px;
}

.onboarding-dots {
  flex: 1;
  display: flex;
  gap: 7px;
}

.onboarding-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width 180ms ease, background 180ms ease;
}

.onboarding-dots i.is-active {
  width: 24px;
  background: var(--primary);
}

.onboarding-next {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 26px color-mix(in srgb, var(--primary) 28%, transparent);
  cursor: pointer;
}

/* Forms */
.form-group {
  display: grid;
  gap: 7px;
}

.form-label {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface);
  transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.form-control,
.form-select {
  height: 50px;
  padding: 0 14px;
}

.form-textarea {
  min-height: 122px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.55;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 10%, transparent);
}

.input-wrap {
  position: relative;
}

.input-wrap .form-control {
  padding-left: 43px;
}

.input-wrap__icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--text-3);
}

.input-wrap__action {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
}

.form-hint {
  margin: 0;
  color: var(--text-3);
  font-size: 9px;
  line-height: 1.45;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 10px;
  font-weight: 600;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.45;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 15px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 38px;
  border-radius: 12px;
  color: var(--text-2);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.segmented button.is-active {
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.switch {
  position: relative;
  width: 46px;
  height: 27px;
  flex: none;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 180ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
  transition: transform 180ms ease;
}

.switch.is-on {
  background: var(--primary);
}

.switch.is-on::after {
  transform: translateX(19px);
}

.range-wrap {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 12px;
}

.range-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.range-value {
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-softer);
  font-size: 12px;
  font-weight: 800;
}

/* Home */
.home-top {
  position: relative;
  padding: 2px 18px 18px;
}

.home-top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-greeting {
  display: flex;
  align-items: center;
  gap: 11px;
}

.home-greeting__copy small {
  display: block;
  margin-bottom: 2px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
}

.home-greeting__copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.home-hero {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 20px;
  border-radius: 25px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(242,189,79,.6), transparent 23%),
    linear-gradient(145deg, #187354, #0e563f 64%, #133c31);
  box-shadow: 0 18px 38px rgba(10, 80, 57, .22);
}

.home-hero::after {
  content: "";
  position: absolute;
  width: 166px;
  height: 166px;
  right: -52px;
  bottom: -78px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgba(255,255,255,.04), 0 0 0 42px rgba(255,255,255,.025);
}

.home-hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.home-hero__copy {
  min-width: 0;
}

.home-hero__copy .eyebrow {
  color: rgba(255,255,255,.67);
}

.home-hero__copy h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.035em;
}

.home-hero__copy p {
  margin: 9px 0 0;
  color: rgba(255,255,255,.68);
  font-size: 11px;
  line-height: 1.5;
}

.progress-ring {
  --value: 27;
  position: relative;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255,255,255,.14) 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: #12543f;
}

.progress-ring__value {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.progress-ring__value small {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.62);
  font-size: 7px;
  font-weight: 700;
}

.home-hero__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 18px;
}

.hero-stat {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

.hero-stat strong {
  display: block;
  font-size: 15px;
}

.hero-stat span {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.62);
  font-size: 8px;
}

.today-card {
  overflow: hidden;
}

.today-media {
  position: relative;
  height: 150px;
  display: flex;
  align-items: flex-end;
  padding: 15px;
  color: #fff;
  background:
    linear-gradient(0deg, rgba(10,38,29,.85), rgba(10,38,29,.02) 72%),
    radial-gradient(circle at 72% 25%, rgba(242,189,79,.74), transparent 25%),
    linear-gradient(140deg, #2c8b68, #0e543e);
}

.today-media::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -32px;
  top: -56px;
  border: 24px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.today-media__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 18px;
  color: #19372e;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  cursor: pointer;
}

.today-media__badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 700;
}

.today-body {
  padding: 15px;
}

.today-body h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.today-body p {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.55;
}

.today-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border 150ms ease, transform 150ms ease, background 150ms ease;
}

.task-item:hover {
  border-color: var(--line-strong);
}

.task-item:active {
  transform: scale(.992);
}

.task-check {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  color: transparent;
  background: var(--surface);
}

.task-item.is-complete .task-check {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.task-item__copy {
  min-width: 0;
  flex: 1;
}

.task-item__copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

.task-item__copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 9px;
}

.task-item.is-complete .task-item__copy strong {
  color: var(--text-3);
  text-decoration: line-through;
}

.streak-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  padding: 15px;
  border-color: transparent;
  background: var(--surface-warm);
}

.streak-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #956414;
  background: var(--accent-soft);
}

.streak-copy strong {
  display: block;
  font-size: 13px;
}

.streak-copy p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 9px;
  line-height: 1.45;
}

.week-dots {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 2px;
}

.week-day {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--text-3);
  font-size: 8px;
  font-weight: 700;
}

.week-day i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--text-3);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-style: normal;
}

.week-day.is-done i {
  color: #fff;
  background: var(--primary);
}

.week-day.is-today i {
  color: #6e4b0e;
  background: var(--accent);
}

.compass-mini {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.compass-chart {
  position: relative;
  width: 112px;
  height: 112px;
}

.compass-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.compass-list {
  display: grid;
  gap: 8px;
}

.compass-list__item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 7px;
  font-size: 9px;
}

.compass-list__item i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.compass-list__item:nth-child(2) i { background: var(--accent-2); }
.compass-list__item:nth-child(3) i { background: var(--info); }
.compass-list__item:nth-child(4) i { background: #aa69b8; }

.compass-list__item span {
  color: var(--text-2);
}

.compass-list__item strong {
  font-size: 10px;
}

.quote-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 18px 48px;
  border: 0;
  color: #fff;
  background: var(--surface-dark);
}

.quote-card::before {
  content: "“";
  position: absolute;
  left: 15px;
  top: 6px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 52px;
  line-height: 1;
}

.quote-card p {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
}

.quote-card span {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.56);
  font-family: var(--font-sans);
  font-size: 9px;
}

/* Course */
.search-bar {
  position: relative;
}

.search-bar .form-control {
  padding-left: 42px;
  padding-right: 42px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.search-bar__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
}

.search-bar__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
}

.filter-row {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.course-summary {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(242,189,79,.4), transparent 24%),
    linear-gradient(140deg, #1c7456, #104b39);
}

.course-summary::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -46px;
  bottom: -52px;
  border: 16px solid rgba(255,255,255,.06);
  border-radius: 50%;
}

.course-summary__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.course-summary h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}

.course-summary p {
  margin: 5px 0 0;
  color: rgba(255,255,255,.63);
  font-size: 9px;
  line-height: 1.5;
}

.course-summary__percent {
  min-width: 52px;
  padding: 8px;
  border-radius: 13px;
  text-align: center;
  background: rgba(255,255,255,.1);
}

.course-summary__percent strong {
  display: block;
  font-size: 17px;
}

.course-summary__percent span {
  display: block;
  margin-top: 1px;
  color: rgba(255,255,255,.58);
  font-size: 7px;
}

.progress-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-2), var(--primary));
  transition: width 300ms ease;
}

.course-summary .progress-bar {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  background: rgba(255,255,255,.14);
}

.course-summary .progress-bar > i {
  background: var(--accent);
}

.view-toggle {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.view-toggle button {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
}

.view-toggle button.is-active {
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.module-list {
  display: grid;
  gap: 11px;
}

.module-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.module-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.module-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-softer);
}

.module-card:nth-child(2n) .module-icon {
  color: #896018;
  background: var(--accent-soft);
}

.module-head__copy {
  min-width: 0;
}

.module-head__copy small {
  display: block;
  margin-bottom: 3px;
  color: var(--text-3);
  font-size: 8px;
  font-weight: 700;
}

.module-head__copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

.module-head__meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.module-head__meta span {
  color: var(--text-3);
  font-size: 8px;
  font-weight: 700;
}

.module-head__meta .icon {
  transition: transform 180ms ease;
}

.module-card.is-open .module-head__meta .icon {
  transform: rotate(180deg);
}

.module-progress {
  grid-column: 2 / -1;
  height: 4px;
}

.module-lessons {
  display: none;
  padding: 0 12px 12px;
}

.module-card.is-open .module-lessons {
  display: grid;
  gap: 6px;
  animation: float-up 180ms ease both;
}

.lesson-row {
  width: 100%;
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 13px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
}

.lesson-row.is-current {
  color: var(--primary);
  background: var(--primary-softer);
  box-shadow: inset 0 0 0 1px var(--primary-soft);
}

.lesson-row.is-locked {
  opacity: .62;
}

.lesson-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--text-2);
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.lesson-row.is-complete .lesson-number {
  color: #fff;
  background: var(--primary);
}

.lesson-row__copy {
  min-width: 0;
}

.lesson-row__copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
}

.lesson-row__copy span {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 8px;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.lesson-tile {
  position: relative;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.lesson-tile.is-complete {
  border-color: var(--primary-soft);
  background: var(--primary-softer);
}

.lesson-tile.is-current {
  color: #fff;
  border-color: transparent;
  background: var(--primary);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--primary) 22%, transparent);
}

.lesson-tile.is-locked {
  opacity: .55;
}

.lesson-tile__day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
}

.lesson-tile__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-state {
  padding: 38px 22px;
  text-align: center;
}

.empty-state__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 20px;
  color: var(--primary);
  background: var(--primary-softer);
}

.empty-state h3 {
  margin-bottom: 7px;
  font-size: 15px;
}

.empty-state p {
  margin-bottom: 15px;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.55;
}

/* Lesson details */
.lesson-page .page-scroll {
  background: var(--app-bg);
}

.lesson-hero {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 76px 20px 20px;
  color: #fff;
  background:
    linear-gradient(0deg, rgba(8,40,29,.93), rgba(8,40,29,.05) 78%),
    radial-gradient(circle at 80% 14%, rgba(242,189,79,.72), transparent 24%),
    linear-gradient(145deg, #2b8c68, #0c4b38);
}

.lesson-hero::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -66px;
  top: -65px;
  border: 24px solid rgba(255,255,255,.07);
  border-radius: 50%;
}

.lesson-hero__nav {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  top: calc(42px + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lesson-hero__nav .icon-button {
  color: #fff;
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}

.lesson-hero__content {
  position: relative;
  z-index: 1;
}

.lesson-hero__content .chip {
  color: #fff;
  background: rgba(255,255,255,.13);
}

.lesson-hero__content h1 {
  margin: 12px 0 9px;
  font-size: 23px;
  line-height: 1.24;
  letter-spacing: -.035em;
}

.lesson-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: rgba(255,255,255,.66);
  font-size: 9px;
}

.lesson-player {
  position: relative;
  overflow: hidden;
  min-height: 196px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 65% 30%, rgba(242,189,79,.48), transparent 24%),
    linear-gradient(145deg, #1f7658, #103e31);
  box-shadow: var(--shadow-sm);
}

.lesson-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lesson-player__start {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.lesson-player__play {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 22px;
  color: #16392e;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 32px rgba(0,0,0,.22);
}

.lesson-player__start span {
  font-size: 10px;
  font-weight: 700;
}

.audio-player {
  padding: 18px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 0%, rgba(242,189,79,.46), transparent 27%),
    linear-gradient(145deg, #226d53, #113e31);
  box-shadow: var(--shadow-sm);
}

.audio-player__top {
  display: flex;
  align-items: center;
  gap: 13px;
}

.audio-cover {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background: rgba(255,255,255,.09);
}

.audio-cover .icon {
  width: 34px;
  height: 34px;
}

.audio-copy {
  min-width: 0;
  flex: 1;
}

.audio-copy small {
  display: block;
  color: rgba(255,255,255,.6);
  font-size: 8px;
}

.audio-copy strong {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.audio-progress {
  margin-top: 16px;
}

.audio-progress__bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.audio-progress__bar i {
  display: block;
  width: 34%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.audio-progress__time {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: rgba(255,255,255,.5);
  font-size: 8px;
}

.audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 10px;
}

.audio-control {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.audio-control--main {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  color: #16392e;
  background: var(--accent);
}

.lesson-section-card {
  padding: 15px;
}

.lesson-section-card__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.lesson-section-card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-softer);
}

.lesson-section-card__copy {
  min-width: 0;
  flex: 1;
}

.lesson-section-card__copy strong {
  display: block;
  font-size: 12px;
}

.lesson-section-card__copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 9px;
}

.lesson-section-card__header > .icon {
  color: var(--text-3);
  transition: transform 180ms ease;
}

.lesson-section-card.is-open .lesson-section-card__header > .icon {
  transform: rotate(180deg);
}

.lesson-section-card__body {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.65;
}

.lesson-section-card.is-open .lesson-section-card__body {
  display: block;
  animation: float-up 180ms ease both;
}

.lesson-section-card__body p {
  margin: 0 0 10px;
}

.lesson-section-card__body p:last-child {
  margin-bottom: 0;
}

.content-heading {
  margin-top: 12px !important;
  margin-bottom: 4px !important;
  color: var(--text);
  font-weight: 800;
}

.assignment-preview {
  padding: 15px;
}

.assignment-preview__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.assignment-preview__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #7c5514;
  background: var(--accent-soft);
}

.assignment-preview__copy {
  min-width: 0;
  flex: 1;
}

.assignment-preview__copy h3 {
  margin: 0;
  font-size: 13px;
}

.assignment-preview__copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.practice-card {
  padding: 15px;
  border-color: transparent;
  background: var(--primary-softer);
}

.practice-card__top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.practice-card__icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
}

.practice-card__copy {
  flex: 1;
}

.practice-card__copy h3 {
  margin: 0;
  font-size: 12px;
}

.practice-card__copy p {
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}

.practice-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 11px;
  border-radius: 14px;
  background: var(--surface);
}

.practice-timer__time {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .04em;
}

.lesson-sticky {
  position: absolute;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 11px 18px calc(12px + var(--safe-bottom));
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--app-bg) 92%, transparent);
  box-shadow: 0 -12px 30px rgba(20,55,44,.08);
  backdrop-filter: blur(18px);
}

.lesson-page .page-content {
  padding-bottom: calc(94px + var(--safe-bottom));
}

/* Assignment and diary */
.assignment-head {
  padding: 15px;
  border-color: transparent;
  background: var(--surface-warm);
}

.assignment-head__number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 14px;
  color: #744e10;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
}

.assignment-prompts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.prompt-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}

.prompt-row i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 6px;
  color: var(--primary);
  background: var(--primary-softer);
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
}

.file-upload {
  position: relative;
  min-height: 116px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--text-2);
  background: var(--surface-soft);
  text-align: center;
  cursor: pointer;
}

.file-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 0 auto 7px;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-softer);
}

.file-upload strong {
  display: block;
  font-size: 10px;
}

.file-upload span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 8px;
}

.upload-preview {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-field {
  position: relative;
}

.metric-field .form-control {
  height: 64px;
  padding: 20px 10px 4px;
  text-align: center;
  font-weight: 800;
}

.metric-field label {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 0;
  right: 0;
  color: var(--text-3);
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  pointer-events: none;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.mood-btn {
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-2);
  background: var(--surface);
  cursor: pointer;
}

.mood-btn b {
  font-size: 20px;
  line-height: 1;
}

.mood-btn span {
  font-size: 7px;
  font-weight: 700;
}

.mood-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.diary-highlight {
  position: relative;
  overflow: hidden;
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 10%, rgba(242,189,79,.5), transparent 24%),
    linear-gradient(145deg, #236c53, #103e31);
}

.diary-highlight h2 {
  margin-bottom: 7px;
  font-size: 18px;
}

.diary-highlight p {
  max-width: 260px;
  margin-bottom: 14px;
  color: rgba(255,255,255,.65);
  font-size: 10px;
  line-height: 1.5;
}

.diary-highlight .btn {
  min-height: 38px;
  color: #16392e;
  background: var(--accent);
  box-shadow: none;
}

.diary-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 13px;
}

.diary-calendar__day {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-3);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.diary-calendar__day.is-entry {
  color: var(--primary);
  background: var(--primary-softer);
}

.diary-calendar__day.is-today {
  color: #fff;
  background: var(--primary);
}

.diary-entry-list {
  display: grid;
  gap: 10px;
}

.diary-entry {
  padding: 14px;
}

.diary-entry__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.diary-entry__date {
  display: flex;
  align-items: center;
  gap: 9px;
}

.diary-entry__date i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-softer);
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
}

.diary-entry__date strong {
  display: block;
  font-size: 11px;
}

.diary-entry__date span {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 8px;
}

.diary-entry__mood {
  font-size: 22px;
}

.diary-entry p {
  display: -webkit-box;
  overflow: hidden;
  margin: 11px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.diary-entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

/* Progress */
.progress-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 15%, rgba(242,189,79,.55), transparent 23%),
    linear-gradient(145deg, #1c7456, #104b39);
}

.progress-hero h2 {
  margin-bottom: 6px;
  font-size: 20px;
  letter-spacing: -.03em;
}

.progress-hero p {
  margin: 0;
  color: rgba(255,255,255,.64);
  font-size: 9px;
  line-height: 1.5;
}

.progress-hero .progress-ring {
  width: 82px;
  height: 82px;
}

.progress-hero .progress-ring::before {
  background: #14513f;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-card {
  min-width: 0;
  padding: 13px 10px;
  text-align: center;
}

.stat-card__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-softer);
}

.stat-card:nth-child(2) .stat-card__icon {
  color: #8c6118;
  background: var(--accent-soft);
}

.stat-card:nth-child(3) .stat-card__icon {
  color: var(--info);
  background: var(--info-soft);
}

.stat-card strong {
  display: block;
  font-size: 16px;
}

.stat-card span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-card {
  padding: 15px;
}

.chart-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chart-card__top h3 {
  margin: 0;
  font-size: 13px;
}

.chart-card__top p {
  margin: 3px 0 0;
  color: var(--text-3);
  font-size: 8px;
}

.week-chart {
  height: 142px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, var(--line) 36px);
}

.week-bar {
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 6px;
  height: 100%;
}

.week-bar i {
  width: 18px;
  min-height: 6px;
  border-radius: 8px 8px 3px 3px;
  background: var(--primary-soft);
}

.week-bar.is-current i {
  background: var(--primary);
  box-shadow: 0 7px 14px color-mix(in srgb, var(--primary) 20%, transparent);
}

.week-bar span {
  color: var(--text-3);
  font-size: 8px;
  font-weight: 700;
}

.module-progress-list {
  display: grid;
  gap: 14px;
}

.module-progress-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.module-progress-row__top strong {
  max-width: 78%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  white-space: nowrap;
}

.module-progress-row__top span {
  color: var(--text-3);
  font-size: 9px;
  font-weight: 700;
}

.compare-card {
  padding: 15px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.compare-metric {
  padding: 11px 8px;
  border-radius: 14px;
  background: var(--surface-soft);
  text-align: center;
}

.compare-metric small {
  display: block;
  color: var(--text-3);
  font-size: 7px;
}

.compare-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.compare-metric span {
  display: block;
  margin-top: 2px;
  color: var(--success);
  font-size: 8px;
  font-weight: 700;
}

.certificate-card {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: var(--surface-warm);
}

.certificate-card::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  right: -32px;
  top: -34px;
  border: 14px solid rgba(242,189,79,.16);
  border-radius: 50%;
}

.certificate-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 15px;
  color: #815812;
  background: var(--accent-soft);
}

/* Compass assessment */
.compass-hero {
  padding: 18px;
  text-align: center;
}

.compass-hero__visual {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
}

.compass-hero h2 {
  margin-bottom: 7px;
  font-size: 20px;
}

.compass-hero p {
  margin: 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.55;
}

.direction-card {
  padding: 14px;
}

.direction-card__top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.direction-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-softer);
}

.direction-card:nth-child(2) .direction-icon { color: #936719; background: var(--accent-soft); }
.direction-card:nth-child(3) .direction-icon { color: var(--info); background: var(--info-soft); }
.direction-card:nth-child(4) .direction-icon { color: #9b5fa9; background: #f5eafb; }

.direction-card__copy h3 {
  margin: 0;
  font-size: 12px;
}

.direction-card__copy p {
  margin: 3px 0 0;
  color: var(--text-3);
  font-size: 8px;
}

/* Mentor and chat */
.mentor-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(242,189,79,.42), transparent 25%),
    linear-gradient(145deg, #206f54, #113e31);
}

.mentor-card .avatar {
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.mentor-card__copy {
  min-width: 0;
  flex: 1;
}

.mentor-card__copy small {
  display: block;
  color: rgba(255,255,255,.58);
  font-size: 8px;
}

.mentor-card__copy strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.mentor-card__copy span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.64);
  font-size: 9px;
}

.live-card {
  padding: 14px;
}

.live-card__date {
  width: 47px;
  height: 50px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-softer);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.live-card__date b {
  display: block;
  font-size: 18px;
}

.live-card__copy {
  min-width: 0;
  flex: 1;
}

.live-card__copy strong {
  display: block;
  font-size: 11px;
}

.live-card__copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 8px;
}

.chat-list {
  display: grid;
  gap: 10px;
}

.chat-bubble {
  max-width: 84%;
  padding: 11px 13px;
  border-radius: 17px 17px 17px 5px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.chat-bubble.is-me {
  justify-self: end;
  border-radius: 17px 17px 5px 17px;
  color: #fff;
  background: var(--primary);
}

.chat-bubble p {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}

.chat-bubble time {
  display: block;
  margin-top: 5px;
  color: var(--text-3);
  font-size: 7px;
  text-align: right;
}

.chat-bubble.is-me time {
  color: rgba(255,255,255,.55);
}

.chat-composer {
  position: absolute;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--app-bg) 94%, transparent);
  backdrop-filter: blur(18px);
}

.chat-composer textarea {
  min-height: 44px;
  max-height: 100px;
  flex: 1;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface);
  resize: none;
  outline: 0;
}

.chat-composer .icon-button {
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--primary);
}

.chat-page .page-content {
  padding-bottom: calc(86px + var(--safe-bottom));
}

/* Notifications */
.notification-list {
  display: grid;
  gap: 8px;
}

.notification-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
}

.notification-card.is-unread {
  border-color: var(--primary-soft);
  background: var(--primary-softer);
}

.notification-card__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.notification-card__copy strong {
  display: block;
  font-size: 10px;
  line-height: 1.35;
}

.notification-card__copy p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 9px;
  line-height: 1.45;
}

.notification-card__copy time {
  display: block;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 7px;
}

.unread-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Profile and settings */
.profile-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 18px 18px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(242,189,79,.48), transparent 22%),
    linear-gradient(145deg, #1e7557, #104b39);
}

.profile-hero::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  left: -60px;
  top: -70px;
  border: 20px solid rgba(255,255,255,.06);
  border-radius: 50%;
}

.profile-hero .avatar {
  margin: 0 auto;
  border: 3px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.16);
}

.profile-hero h1 {
  margin: 13px 0 4px;
  font-size: 19px;
}

.profile-hero p {
  margin: 0;
  color: rgba(255,255,255,.6);
  font-size: 9px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 17px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}

.profile-stat {
  padding: 10px 6px;
  border-right: 1px solid rgba(255,255,255,.09);
}

.profile-stat:last-child { border-right: 0; }

.profile-stat strong {
  display: block;
  font-size: 14px;
}

.profile-stat span {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.55);
  font-size: 7px;
}

.goal-card {
  padding: 15px;
}

.goal-card__top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.goal-card__icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 13px;
  color: #865d15;
  background: var(--accent-soft);
}

.goal-card h3 {
  margin: 0;
  font-size: 11px;
}

.goal-card p {
  margin: 5px 0 0;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}

.menu-list {
  overflow: hidden;
}

.menu-item {
  width: 100%;
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-item__icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-softer);
}

.menu-item__copy {
  min-width: 0;
  flex: 1;
}

.menu-item__copy strong {
  display: block;
  font-size: 10px;
}

.menu-item__copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item > .icon {
  color: var(--text-3);
}

.settings-group-title {
  margin: 18px 4px 8px;
  color: var(--text-3);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.setting-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child { border-bottom: 0; }

.setting-row__copy {
  min-width: 0;
  flex: 1;
}

.setting-row__copy strong {
  display: block;
  font-size: 10px;
}

.setting-row__copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 8px;
}

.privacy-note {
  padding: 14px;
  color: var(--text-2);
  font-size: 9px;
  line-height: 1.55;
}

/* Certificate */
.certificate-page {
  background:
    radial-gradient(circle at 20% 10%, rgba(242,189,79,.17), transparent 24%),
    var(--app-bg);
}

.certificate-sheet {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  padding: 30px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.certificate-sheet::before,
.certificate-sheet::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border: 28px solid var(--accent-soft);
  border-radius: 50%;
  opacity: .6;
}

.certificate-sheet::before { left: -100px; top: -100px; }
.certificate-sheet::after { right: -100px; bottom: -100px; }

.certificate-sheet__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.certificate-emblem {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 24px;
  color: #7e5714;
  background: var(--accent-soft);
}

.certificate-emblem .icon {
  width: 36px;
  height: 36px;
}

.certificate-sheet__eyebrow {
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.certificate-sheet h1 {
  margin: 15px 0 8px;
  font-family: Georgia, serif;
  font-size: 30px;
  line-height: 1.15;
}

.certificate-sheet__lead {
  max-width: 290px;
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.55;
}

.certificate-name {
  width: 100%;
  margin: 28px 0 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-strong);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
}

.certificate-course {
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
}

.certificate-meta {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: auto;
  padding-top: 30px;
}

.certificate-meta div {
  padding-top: 9px;
  border-top: 1px solid var(--line-strong);
}

.certificate-meta strong {
  display: block;
  font-size: 10px;
}

.certificate-meta span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 8px;
}

/* Toasts and modals */
.toast-root {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 28px;
  width: min(calc(100% - 32px), 390px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  color: #fff;
  background: rgba(20, 43, 35, .94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  animation: toast-in 220ms ease both;
  font-size: 10px;
  font-weight: 700;
}

.toast__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  color: #15372d;
  background: var(--accent);
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px) scale(.98); }
}

.modal-backdrop {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px;
  background: rgba(8, 20, 15, .54);
  backdrop-filter: blur(5px);
  animation: modal-bg-in 180ms ease both;
}

.modal-sheet {
  width: min(100%, 430px);
  max-height: min(82dvh, 720px);
  overflow-y: auto;
  padding: 9px 18px calc(18px + var(--safe-bottom));
  border-radius: 26px 26px 20px 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: sheet-in 220ms ease both;
}

.modal-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 14px;
  border-radius: 999px;
  background: var(--line-strong);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
}

.modal-celebration {
  padding: 12px 0 6px;
  text-align: center;
}

.modal-celebration__icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 26px;
  color: #7a5412;
  background: var(--accent-soft);
  animation: pulse-soft 1.8s ease infinite;
}

.modal-celebration__icon .icon {
  width: 38px;
  height: 38px;
}

.modal-celebration h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.modal-celebration p {
  margin-bottom: 18px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.55;
}

@keyframes modal-bg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Utility loaders */
.inline-loader {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hidden { display: none !important; }

@media (max-width: 520px) {
  body {
    padding: 0;
    background: var(--app-bg);
  }

  .app-frame {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-frame::before {
    display: none;
  }

  .status-bar {
    padding-top: calc(11px + var(--safe-top));
  }

  .toast-root {
    bottom: calc(18px + var(--safe-bottom));
  }
}

@media (max-height: 720px) {
  .welcome-visual {
    height: 220px;
    margin: 18px 0;
  }

  .welcome-compass {
    width: 138px;
    height: 138px;
  }

  .welcome-copy h1 {
    font-size: 29px;
  }

  .onboarding-visual {
    min-height: 270px;
  }

  .onboarding-card {
    min-height: 240px;
  }

  .onboarding-illustration {
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body {
    display: block;
    padding: 0;
    background: #fff;
  }

  .app-frame {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-frame::before,
  .status-bar,
  .app-header,
  .bottom-nav,
  .lesson-sticky,
  .btn,
  .chat-composer {
    display: none !important;
  }

  .app-page,
  .page-scroll {
    position: static;
    height: auto;
    overflow: visible;
  }

  .certificate-sheet {
    box-shadow: none;
    page-break-inside: avoid;
  }
}

.status-bar--overlay {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}
