:root {
  color-scheme: light;
  --ink: #24322e;
  --ink-soft: #63716c;
  --plum: #245d50;
  --plum-dark: #12372f;
  --berry: #d35f7e;
  --rose: #f08da1;
  --blush: #fff0f2;
  --cream: #fffaf5;
  --paper: #fffdf9;
  --sage: #789276;
  --sage-light: #e8efe4;
  --gold: #d7ad54;
  --blue: #4d7897;
  --line: #dce7e1;
  --success: #2f7a5a;
  --danger: #b84655;
  --shadow: 0 14px 36px rgba(24, 75, 63, .13);
  --soft-shadow: 0 7px 20px rgba(24, 75, 63, .09);
  --radius-xl: 30px;
  --radius-lg: 23px;
  --radius-md: 17px;
  --tap: 48px;
  --bottom-nav: 80px;
  --app-height: 100dvh;
  --page-gutter: clamp(12px, 4.4vw, 22px);
  font-family: "Avenir Next", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html[data-theme="polder-dawn"] { --plum:#315d72; --plum-dark:#173b4d; --berry:#4e8aa2; --rose:#e99867; --blush:#edf7f8; --cream:#f7fbfa; --paper:#fbfefd; --sage:#6f927d; --sage-light:#e6f0ea; --gold:#e1ae5e; --blue:#3e7d99; --line:#d9e7e8; }
html[data-theme="circular-city"] { --plum:#2c564d; --plum-dark:#173832; --berry:#4d856e; --rose:#75ba8e; --blush:#e9f6ef; --cream:#f6f9f5; --paper:#fbfdf9; --sage:#45a36e; --sage-light:#e1f3e7; --gold:#d6bd59; --blue:#457d82; --line:#d9e5df; }
html[data-theme="north-sea"] { --plum:#254c6b; --plum-dark:#12314d; --berry:#3d7792; --rose:#78aab7; --blush:#eaf4f5; --cream:#f8fbf8; --paper:#fffefa; --sage:#829777; --sage-light:#edf1e8; --gold:#d5b56a; --blue:#316d91; --line:#d9e5e7; }
html[data-theme="tulip-twilight"] { --plum:#512350; --plum-dark:#29142f; --berry:#a24872; --rose:#f07d79; --blush:#fff0f2; --cream:#fff9f4; --paper:#fffdf9; --sage:#6f9077; --sage-light:#e7f0e8; --gold:#e2ad57; --blue:#526f9b; --line:#ebdce3; }
html[data-theme="solar-bloom"] { --plum:#586029; --plum-dark:#303917; --berry:#8a7b25; --rose:#e59a53; --blush:#fff5df; --cream:#fffdf4; --paper:#fffef9; --sage:#72985f; --sage-light:#e8f2df; --gold:#e5ad35; --blue:#3c7b80; --line:#e8e1c8; }

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #f4eae9;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 280px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 7%, rgba(239, 127, 157, .2), transparent 23rem),
    radial-gradient(circle at 91% 85%, rgba(124, 155, 120, .18), transparent 26rem),
    #f4eae9;
  overscroll-behavior-y: none;
}
body.auth-locked { overflow:hidden; }

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; border:0; }
a { color: inherit; }

.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; }

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  background: var(--plum);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  min-height: var(--app-height);
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(232,121,149,.06), transparent 18rem),
    var(--cream);
  box-shadow: 0 0 60px rgba(70, 32, 57, .15);
}

.desktop-garden { display: none; }

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(66px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) var(--page-gutter) 9px;
  border-bottom: 1px solid rgba(111, 49, 89, .06);
  background: rgba(255, 250, 244, .9);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand-button,
.stat-pill,
.avatar-button,
.text-button,
.quick-card,
.nav-item,
.icon-button,
.close-button,
.welcome-skip,
.composer-action,
.send-button,
.scenario-chip,
.chapter-tab,
.toggle,
.text-danger {
  border: 0;
  cursor: pointer;
  background: none;
}

.pressable {
  position: relative;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, filter .18s ease, background-color .18s ease;
}

.pressable:active { transform: scale(.965); }
.pressable:focus-visible { outline: 3px solid rgba(77, 120, 151, .45); outline-offset: 3px; }

.brand-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  text-align: left;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 13px;
  box-shadow: 0 7px 17px rgba(55,26,52,.22);
}
.brand-mark img { display:block; width:100%; height:100%; }

.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { color:#245d50; font-family:"Segoe UI Variable","Avenir Next",system-ui,sans-serif; font-size:18px; font-weight:900; letter-spacing:-.7px; }
.brand-copy strong span { color:var(--berry); }
.brand-copy small { margin-top: 4px; color: var(--ink-soft); font-size: 9px; font-weight:700; letter-spacing: 1.15px; text-transform: uppercase; }

.top-stats { display: flex; gap: 7px; }

.stat-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 36px;
  padding: 6px 10px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 3px 10px rgba(62, 38, 54, .05);
}

.stat-pill strong { font-size: 13px; }
.ui-icon-sprite { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none; }
.stat-icon,
.currency-icon,
.profile-stat-icon { width:15px; height:15px; flex:0 0 auto; fill:currentColor; }
.stat-icon.streak { color:#e6764d; }
.stat-icon.petal,
.currency-icon.petal,
.profile-stat-icon.petal { color:var(--berry); }
.stat-icon.sundrop,
.currency-icon.sundrop { color:#d39b35; }
.icon-cutout { fill:var(--cream); }
.stat-pill .icon-cutout { fill:#fff; }
.currency-icon { vertical-align:-3px; }
.profile-stat-icon { width:17px; height:17px; }

main { padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 22px); }
main:focus { outline:none; }

.page {
  display: none;
  min-height: calc(100dvh - 66px - var(--bottom-nav));
  padding: 18px var(--page-gutter) 28px;
}

.page.active { display: block; animation: page-in .36s cubic-bezier(.2,.8,.2,1); }

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

.reveal { animation: reveal .58s both cubic-bezier(.2,.8,.2,1); }
.reveal:nth-child(2) { animation-delay: .05s; }
.reveal:nth-child(3) { animation-delay: .1s; }
.reveal:nth-child(4) { animation-delay: .15s; }
.reveal:nth-child(5) { animation-delay: .2s; }

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

.home-heading,
.page-heading { padding: 5px 3px 16px; }
.home-heading { display: flex; align-items: center; justify-content: space-between; }

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--berry);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin-top: 0; color: var(--plum-dark); }
h1 { margin-bottom: 5px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(29px, 8.6vw, 42px); font-weight: 600; letter-spacing: -1px; line-height: 1.02; text-wrap:balance; }
h2 { margin-bottom: 6px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 600; line-height: 1.12; }
h3 { margin-bottom: 5px; font-size: 16px; line-height: 1.2; }
p { line-height: 1.48; }

.avatar-button {
  width: 50px;
  height: 50px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #f9d9e2, #fff5ee);
  box-shadow: var(--soft-shadow);
  font-size: 24px;
}
#top-avatar-visual { display:grid; width:100%; height:100%; place-items:center; overflow:hidden; border-radius:50%; }

.avatar-button i,
.profile-avatar i {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid var(--cream);
  border-radius: 50%;
  color: #fff;
  background: var(--plum);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.hero-card {
  position: relative;
  min-height: clamp(390px, 64svh, 510px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 40px rgba(76, 39, 62, .19);
  isolation: isolate;
}

.hero-card img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 49% 50%;
  transition: transform 7s ease;
}

.hero-card:hover img { transform: none; }

.hero-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(43,31,31,.02) 23%, rgba(44,25,36,.14) 52%, rgba(48,24,40,.86) 100%);
}

.hero-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px 23px 23px;
  color: #fff;
}

.hero-content h2 { margin: 9px 0 5px; color: #fff; font-size: clamp(28px, 8vw, 38px); text-shadow: 0 2px 14px rgba(0,0,0,.16); }
.hero-content p { margin: 0 0 16px; color: rgba(255,255,255,.88); font-size: 14px; }

.soft-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.soft-badge i { width: 6px; height: 6px; border-radius: 50%; background: #ffd86f; box-shadow: 0 0 0 4px rgba(255,216,111,.15); }

.primary-button,
.lesson-check,
.outline-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 13px 17px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--berry), var(--plum));
  box-shadow: 0 10px 22px rgba(81, 32, 63, .26), inset 0 1px rgba(255,255,255,.2);
  cursor: pointer;
  font-weight: 750;
}

.primary-button:hover,
.lesson-check:hover { filter: none; }
.button-arrow { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: var(--plum); background: #fff; font-size: 18px; }

.daily-card {
  position: relative;
  display: flex;
  align-items: center;
  margin: 17px 0 25px;
  padding: 15px;
  gap: 14px;
  overflow: hidden;
  border: 1px solid #e4ddd0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fffef9, #f8f1e4);
  box-shadow: var(--soft-shadow);
}

.daily-ring {
  --value: calc(var(--progress) * 1%);
  position: relative;
  display: grid;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--sage) var(--value), #e8e4da 0);
  font-weight: 800;
}
.daily-ring::before { position: absolute; width: 50px; height: 50px; border-radius: 50%; background: #fffdf8; content: ""; }
.daily-ring span, .daily-ring small { position: relative; z-index: 1; }
.daily-ring span { margin-right: 17px; font-size: 17px; }
.daily-copy { min-width: 0; }
.daily-play { min-height: 34px; margin-top: 7px; padding: 6px 10px; border-radius: 11px; color: #fff; background: var(--sage-dark,#567760); font-size: 9px; font-weight: 850; }
.review-card { display: grid; width: 100%; min-height: 78px; margin: -13px 0 25px; padding: 12px 13px; grid-template-columns: 45px 1fr 34px; align-items: center; gap: 10px; border: 1px solid #dacfe7; border-radius: 20px; background: linear-gradient(135deg,#fff,#f4effb); box-shadow: var(--soft-shadow); text-align: left; }
.review-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg,#8c6dab,#614b82); font-size: 20px; }
.review-card > span:nth-child(2) { display: grid; min-width: 0; }
.review-card small { color: #70568e; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: 1px; }
.review-card strong { margin: 3px 0; color: var(--plum-dark); font-size: 12px; }
.review-card em { overflow: hidden; color: var(--ink-soft); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.review-card b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #fff; background: #70568e; font-size: 11px; }
.home-mission { display:grid; min-height:102px; margin:12px 0 25px; padding:14px; grid-template-columns:43px minmax(0,1fr) auto; align-items:center; gap:10px; border:1px solid #cfe0d5; border-radius:21px; background:linear-gradient(135deg,#f3f9f3,#e8f2ea); box-shadow:var(--soft-shadow); }
.home-mission > span { display:grid; width:43px; height:43px; place-items:center; border-radius:14px; background:#fff; font-size:23px; }
.home-mission div { display:grid; min-width:0; }
.home-mission small { color:var(--success); font-size:8px; font-weight:900; letter-spacing:.8px; }
.home-mission strong { margin-top:2px; color:var(--plum-dark); font-size:12px; }
.home-mission p { margin:3px 0 0; color:var(--ink-soft); font-size:9px; }
.home-mission button { min-height:38px; padding:7px 9px; border-radius:11px; color:#fff; background:var(--success); font-size:9px; font-weight:850; }
.daily-ring small { position: absolute; right: 8px; bottom: 20px; color: var(--ink-soft); font-size: 9px; }
.daily-copy { min-width: 0; }
.daily-copy h2 { margin: 0 0 2px; font-family: inherit; font-size: 16px; font-weight: 800; }
.daily-copy p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.tiny-sprout { position: absolute; right: -5px; bottom: -15px; color: rgba(124,155,120,.14); font-size: 72px; transform: rotate(-20deg); }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 3px 12px; gap: 12px; }
.section-heading h2 { margin: 0; }
.section-heading.compact { margin: 0 0 12px; }
.text-button { min-height: 42px; padding: 8px 0 8px 10px; color: var(--berry); font-size: 12px; font-weight: 800; }

.chapter-stack { display: grid; gap: 12px; }
.chapter-card {
  position: relative;
  display: grid;
  min-height: 151px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  text-align: left;
}
.chapter-card.chapter-one { background: linear-gradient(135deg, #fff9f5, #fff0f3); }
.chapter-card.chapter-two { background: linear-gradient(135deg, #f7fbf5, #e8f1e7); }
.chapter-number { color: var(--berry); font-size: 9px; font-weight: 900; letter-spacing: 1.4px; }
.chapter-card h3 { max-width: 70%; margin: 8px 0 5px; font-family: Georgia,serif; font-size: 22px; }
.chapter-card p { max-width: 70%; margin: 0; color: var(--ink-soft); font-size: 12px; }
.chapter-progress { align-self: end; display: flex; max-width: 66%; align-items: center; margin-top: 13px; gap: 8px; }
.chapter-progress span { flex: 1; height: 6px; overflow: hidden; border-radius: 10px; background: rgba(111,49,89,.1); }
.chapter-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--rose),var(--berry)); }
.chapter-progress small { min-width: 31px; font-size: 10px; font-weight: 800; }
.chapter-art { position: absolute; right: -4px; bottom: -4px; display: grid; width: 116px; height: 142px; place-items: end center; }
.chapter-art .stem { position: absolute; bottom: 3px; left: 56px; width: 5px; height: 95px; border-radius: 9px; background: var(--sage); transform: rotate(7deg); }
.chapter-art .leaf { position: absolute; bottom: 31px; left: 30px; width: 42px; height: 20px; border-radius: 100% 0 100% 0; background: #86a680; transform: rotate(20deg); }
.chapter-art .leaf.two { right: 15px; bottom: 47px; left: auto; transform: scaleX(-1) rotate(10deg); }
.chapter-art .bloom { position: absolute; top: 19px; left: 30px; width: 59px; height: 63px; border-radius: 50% 50% 47% 47%; background: linear-gradient(145deg,#f3a1b4,#b94774); clip-path: polygon(50% 18%,75% 0,80% 26%,100% 18%,91% 72%,70% 100%,30% 100%,9% 72%,0 18%,21% 26%,25% 0); filter: drop-shadow(0 8px 8px rgba(111,49,89,.13)); }
.chapter-two .chapter-art .bloom { background: linear-gradient(145deg,#cba8c6,#6f5f92); }

.quick-practice { margin-top: 28px; }
.quick-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.quick-card {
  display: grid;
  min-width: 0;
  min-height: 118px;
  padding: 12px 6px 10px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(66,38,56,.06);
}
.quick-card strong { margin-top: 7px; color: var(--plum-dark); font-size: 12px; }
.quick-card small { margin-top: 2px; color: var(--ink-soft); font-size: 10px; }
.quick-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; font-weight: 800; }
.listen-icon { color: #6b6497; background: #efebfb; }
.words-icon { color: #a44f70; background: #faeaf0; font-family: Georgia,serif; }
.speak-icon { color: #4a7f68; background: #e5f2ea; font-size: 24px; }

.page-heading > p:last-child { margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; }

.chapter-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  gap: 4px;
  border-radius: 20px;
  background: #eee6e4;
}
.chapter-tab {
  display: grid;
  grid-template-columns: 29px 1fr;
  min-width: 0;
  min-height: 62px;
  padding: 9px;
  align-items: center;
  border-radius: 16px;
  color: var(--ink-soft);
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}
.chapter-tab span { grid-row: 1 / 3; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 9px; background: rgba(111,49,89,.08); }
.chapter-tab small { font-size: 9px; font-weight: 600; opacity: .75; }
.chapter-tab.active { color: var(--plum-dark); background: #fff; box-shadow: 0 4px 14px rgba(75,40,60,.09); }
.chapter-tab.active span { color: #fff; background: var(--plum); }

.chapter-banner {
  position: relative;
  margin: 16px 0 20px;
  padding: 18px 76px 18px 18px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(135deg,var(--plum),#965677);
  box-shadow: var(--soft-shadow);
}
.chapter-banner.care { background: linear-gradient(135deg,#436f63,#729881); }
.chapter-banner::after { position: absolute; right: -12px; bottom: -30px; color: rgba(255,255,255,.15); content: "❀"; font-size: 120px; }
.chapter-banner .chapter-level { font-size: 9px; font-weight: 900; letter-spacing: 1.4px; opacity: .8; }
.chapter-banner h2 { margin: 7px 0 5px; color: #fff; font-size: 23px; }
.chapter-banner p { margin: 0; color: rgba(255,255,255,.83); font-size: 12px; }
.vocabulary-goal { display: grid; min-height: 66px; margin: -7px 0 13px; padding: 10px 11px; grid-template-columns: 70px 1fr auto; align-items: center; gap: 8px; border: 1px solid #dfe7d9; border-radius: 17px; background: #f7fbf4; }
.vocabulary-goal > span { color: #4d765f; font-family: Georgia,serif; font-size: 18px; font-weight: 800; white-space: nowrap; }
.vocabulary-goal > div { display: grid; }
.vocabulary-goal strong { color: var(--plum-dark); font-size: 10px; }
.vocabulary-goal small { margin-top: 2px; color: var(--ink-soft); font-size: 8px; }
.vocabulary-goal button { min-height: 34px; padding: 6px 9px; border-radius: 10px; color: #fff; background: #5d826b; font-size: 8px; font-weight: 850; }
.care-track-filter { display: flex; margin: 0 -17px 11px; padding: 0 17px 4px; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.care-track-filter::-webkit-scrollbar { display: none; }
.care-track-filter button { flex: 0 0 auto; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: #fff; font-size: 9px; font-weight: 800; }
.care-track-filter button.active { border-color: #5b7f70; color: #fff; background: #5b7f70; }

.lesson-path { position: relative; display: grid; gap: 2px; padding: 0 0 20px; }
.lesson-path::before { position: absolute; z-index: 0; top: 20px; bottom: 34px; left: 38px; width: 3px; border-radius: 9px; background: repeating-linear-gradient(to bottom,#dbcbd2 0 10px,transparent 10px 16px); content: ""; }
.lesson-unit {
  position: relative;
  z-index: 2;
  display: flex;
  margin: 15px 0 4px;
  padding: 10px 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 4px 13px rgba(70,38,55,.05);
}
.lesson-unit strong { color: var(--plum); font-size: 10px; letter-spacing: 1.1px; }
.lesson-unit small { color: var(--ink-soft); font-size: 9px; }
.lesson-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 77px minmax(0,1fr);
  min-height: 103px;
  align-items: center;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}
.lesson-node {
  position: relative;
  display: grid;
  width: 61px;
  height: 61px;
  place-items: center;
  border: 5px solid var(--cream);
  border-radius: 22px 22px 22px 8px;
  color: #fff;
  background: linear-gradient(145deg,#c56084,var(--plum));
  box-shadow: 0 7px 16px rgba(111,49,89,.22);
  font-size: 23px;
  font-weight: 800;
}
.care-path .lesson-node { background: linear-gradient(145deg,#7da18a,#426c61); box-shadow: 0 7px 16px rgba(66,108,97,.23); }
.lesson-row.completed .lesson-node::after { position: absolute; right: -8px; bottom: -6px; display: grid; width: 24px; height: 24px; place-items: center; border: 3px solid var(--cream); border-radius: 50%; color: #fff; background: var(--success); content: "✓"; font-size: 11px; }
.lesson-row.current .lesson-node { animation: node-pulse 2.2s infinite; }
@keyframes node-pulse { 0%,100%{ box-shadow:0 7px 16px rgba(111,49,89,.22),0 0 0 0 rgba(239,127,157,.25)} 50%{box-shadow:0 7px 16px rgba(111,49,89,.22),0 0 0 10px rgba(239,127,157,0)} }
.lesson-copy { padding: 13px 13px 13px 0; border-bottom: 1px solid var(--line); }
.lesson-copy small { color: var(--berry); font-size: 9px; font-weight: 900; letter-spacing: 1.1px; }
.lesson-copy h3 { margin: 4px 0; font-size: 15px; }
.lesson-copy p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.lesson-meta { display: flex; margin-top: 6px; gap: 8px; color: var(--ink-soft); font-size: 9px; }

.coach-page { padding-right: 0; padding-left: 0; }
.coach-header { display: grid; grid-template-columns: 54px 1fr 44px; align-items: center; padding: 4px 17px 14px; gap: 10px; }
.coach-avatar { display: grid; width: 53px; height: 53px; place-items: center; border: 2px solid #fff; border-radius: 50% 50% 48% 44%; color: #fff; background: radial-gradient(circle at 60% 40%,#f59a70 0 15%,#c65a5e 16% 37%,#6d4652 38% 100%); box-shadow: var(--soft-shadow); }
.coach-avatar span { margin-top: -3px; margin-left: 17px; font-weight: 900; }
.coach-header h1 { margin: 0; font-size: 25px; }
.coach-header p:last-child { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; }
.online-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #52a270; }
.online-dot.ai-online { background: #8264a1; box-shadow: 0 0 0 4px rgba(112,86,142,.12); }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: #fff; font-size: 19px; }

.language-switch { display: grid; grid-template-columns: 1fr 1fr; margin: 0 17px 11px; padding: 4px; border-radius: 14px; background: #ede5e5; }
.language-switch button { min-height: 38px; border: 0; border-radius: 11px; color: var(--ink-soft); background: none; cursor: pointer; font-size: 12px; font-weight: 800; }
.language-switch button.active { color: var(--plum); background: #fff; box-shadow: 0 3px 10px rgba(74,38,59,.08); }
.language-select-wrap { grid-template-columns:auto minmax(0,1fr); min-height:48px; padding:6px 7px 6px 12px; align-items:center; gap:10px; background:#f0e9e9; }
.language-select-wrap label { color:var(--plum-dark); font-size:10px; font-weight:850; }
.language-select-wrap select { width:100%; min-height:36px; padding:5px 28px 5px 9px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:#fff; font-size:11px; }
.coach-mode { display: grid; width: calc(100% - 34px); min-height: 48px; margin: 0 17px 10px; padding: 8px 11px; grid-template-columns: 31px 1fr; align-items: center; border: 1px solid #d9cbea; border-radius: 15px; color: #6a4d85; background: #f8f4fc; text-align: left; }
.coach-mode > span { grid-row: 1 / 3; display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: #fff; background: #70568e; }
.coach-mode strong { font-size: 10px; }
.coach-mode small { color: var(--ink-soft); font-size: 8px; }
.coach-mode.off { filter: grayscale(.7); opacity: .75; }

.scenario-row { display: flex; padding: 0 17px 10px; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.scenario-row::-webkit-scrollbar { display:none; }
.scenario-chip { flex: 0 0 auto; min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 11px; font-weight: 750; }

.chat-window {
  display: flex;
  height: calc(100dvh - 330px - env(safe-area-inset-bottom));
  min-height: 315px;
  max-height: 600px;
  flex-direction: column;
  padding: 12px 17px 20px;
  gap: 12px;
  overflow-y: auto;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 20% 15%,rgba(239,127,157,.07),transparent 11rem),
    linear-gradient(#fffaf4,#fffdf9);
}
.message { display: flex; max-width: 88%; align-items: flex-end; gap: 7px; animation: message-in .28s both ease-out; }
@keyframes message-in { from{opacity:0;transform:translateY(7px) scale(.98)} to{opacity:1;transform:none} }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message-dot { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #fff; background: var(--berry); font-size: 10px; }
.message-bubble { padding: 12px 13px; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; background: #fff; box-shadow: 0 4px 14px rgba(70,38,55,.05); }
.message.user .message-bubble { border-color: var(--plum); border-radius: 18px 18px 6px 18px; color: #fff; background: var(--plum); }
.message-bubble p { margin: 0; font-size: 13px; line-height: 1.42; white-space: pre-wrap; }
.message-bubble .translation { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.message.user .translation { border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.78); }
.bubble-actions { display: flex; margin-top: 7px; gap: 5px; }
.bubble-actions button { min-height: 32px; padding: 5px 9px; border: 0; border-radius: 10px; color: var(--berry); background: var(--blush); cursor: pointer; font-size: 10px; font-weight: 800; }
.coach-feedback { margin-top: 8px; padding: 8px 9px; border-radius: 10px; color: #455d50; background: #edf6f0; }
.coach-feedback.correction { color: #6e4960; background: #faedf2; }
.coach-feedback.pronunciation { color: #5b4b78; background: #f1edfa; }
.coach-feedback strong { display: block; margin-bottom: 2px; font-size: 8px; text-transform: uppercase; letter-spacing: .7px; }
.coach-feedback p { font-size: 10px; }
.coach-feedback p + p { margin-top:5px; padding-top:5px; border-top:1px solid rgba(70,70,70,.18); }
.coach-feedback p b { margin-right:4px; font-size:8px; }
.next-prompt { margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 750; }
.next-prompt p { font-weight:800; }
.next-prompt small { display:block; margin-top:4px; color:var(--ink-soft); font-size:10px; font-weight:500; }

.chat-composer {
  position: sticky;
  bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 43px 1fr 44px;
  align-items: end;
  margin: 0 12px;
  padding: 8px;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(74,38,59,.12);
  backdrop-filter: blur(15px);
}
.composer-action,.send-button { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 15px; }
.composer-action { color: var(--berry); background: var(--blush); }
.composer-action.listening { color: #fff; background: var(--danger); animation: mic-pulse 1s infinite; }
@keyframes mic-pulse {50%{box-shadow:0 0 0 7px rgba(184,70,85,.13)}}
.send-button { color: #fff; background: var(--plum); font-size: 17px; }
.chat-composer textarea { width: 100%; max-height: 95px; min-height: 42px; padding: 11px 7px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; line-height: 1.35; }
.coach-note { margin: 10px 18px 0; color: var(--ink-soft); font-size: 9px; text-align: center; }

.world-heading { padding-bottom:12px; }
.world-dashboard { display:grid; min-height:132px; margin-bottom:13px; padding:14px; grid-template-columns:78px 1fr; align-items:center; gap:11px; overflow:hidden; border-radius:25px; color:#fff; background:linear-gradient(145deg,#244c43,#5b8469); box-shadow:var(--shadow); }
.world-dashboard > div:nth-child(2) { display:grid; }
.world-dashboard small { color:#cfe5d6; font-size:8px; font-weight:900; letter-spacing:1px; }
.world-dashboard strong { margin:2px 0; color:#fff; font-family:Georgia,serif; font-size:20px; }
.world-dashboard p { margin:0; color:#e6f2e9; font-size:9px; }
.world-dashboard > span { grid-column:1 / -1; display:flex; gap:7px; }
.world-dashboard > span b { padding:6px 9px; border-radius:999px; color:#25483e; background:#f5f5dc; font-size:9px; }
.world-dashboard > span i { font-style:normal; }
.world-tabs { position:sticky; z-index:8; top:calc(65px + env(safe-area-inset-top)); display:grid; margin-bottom:13px; padding:4px; grid-template-columns:repeat(4,1fr); border:1px solid var(--line); border-radius:15px; background:rgba(255,253,249,.94); backdrop-filter:blur(12px); }
.world-tabs button { min-height:39px; border-radius:11px; color:var(--ink-soft); font-size:9px; font-weight:850; }
.world-tabs button.active { color:#fff; background:var(--plum); box-shadow:0 5px 12px rgba(56,44,40,.14); }
.world-panel { display:none; }
.world-panel.active { display:block; animation:page-in .28s ease-out; }
.world-card { margin-bottom:13px; padding:16px; border:1px solid var(--line); border-radius:22px; background:#fff; box-shadow:var(--soft-shadow); }
.world-card h2 { margin:3px 0 7px; }
.world-intro,.shop-explainer > p:last-child,.community-hero > p { margin:0 0 13px; color:var(--ink-soft); font-size:10px; }
.interest-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.interest-chip { display:flex; min-height:53px; padding:9px; align-items:center; gap:8px; border:1px solid var(--line); border-radius:14px; background:#fffdf9; text-align:left; }
.interest-chip span { font-size:20px; }
.interest-chip strong { color:var(--ink-soft); font-size:10px; }
.interest-chip.active { border-color:var(--success); background:#eaf5ed; box-shadow:0 4px 11px rgba(47,122,90,.09); }
.interest-chip.active strong { color:#245d43; }
.mission-grid { display:grid; gap:10px; }
.world-mission { display:grid; padding:14px; grid-template-columns:43px 1fr; gap:10px; border:1px solid #d6e3d8; border-radius:19px; background:linear-gradient(135deg,#fbfdf9,#eff7f0); }
.world-mission > span { display:grid; width:43px; height:43px; place-items:center; border-radius:14px; background:#fff; font-size:22px; }
.world-mission div { display:grid; }
.world-mission small { color:var(--success); font-size:8px; font-weight:900; text-transform:uppercase; }
.world-mission strong { margin-top:3px; color:var(--plum-dark); font-size:11px; line-height:1.4; }
.world-mission p { margin:5px 0 0; color:var(--ink-soft); font-size:9px; }
.safety-badge { display:inline-block; padding:5px 8px; border-radius:999px; color:#7b5c1b; background:#fff2c7; font-size:8px; font-weight:900; letter-spacing:.7px; }
.safety-badge.live { color:#225f48; background:#dff2e7; }
.community-consent-row { min-height:60px; margin-top:12px; padding:10px 0 0; border-top:1px solid var(--line); border-bottom:0; }
.community-name,.community-composer label { display:grid; margin-top:10px; color:var(--plum-dark); font-size:9px; font-weight:850; gap:5px; text-align:left; }
.community-name input,.community-composer select,.ai-avatar-studio textarea { width:100%; min-height:43px; padding:9px 11px; border:1px solid var(--line); border-radius:12px; outline:0; color:var(--ink); background:#fffdf9; font:inherit; }
.community-name input:focus,.community-composer select:focus,.ai-avatar-studio textarea:focus { border-color:var(--rose); box-shadow:0 0 0 3px rgba(239,127,157,.12); }
.community-composer h2 { margin:3px 0; }
.community-composer .primary-button { width:100%; justify-content:center; margin-top:12px; }
.community-composer > small { display:block; margin-top:8px; color:var(--ink-soft); font-size:8px; line-height:1.45; }
.community-state { padding:13px; border-radius:15px; color:var(--ink-soft); background:#f1f6f2; font-size:9px; text-align:center; }
.community-feed { display:grid; margin-top:10px; gap:10px; }
.community-post { display:grid; padding:14px; grid-template-columns:43px 1fr; gap:10px; border:1px solid #d6e3d8; border-radius:19px; background:#fff; box-shadow:var(--soft-shadow); }
.community-post-avatar { display:grid; width:43px; height:43px; place-items:center; border-radius:14px; background:linear-gradient(145deg,#e0f0df,#ffe7ed); font-size:20px; }
.community-post header { display:flex; align-items:center; justify-content:space-between; gap:7px; }
.community-post header strong { overflow:hidden; color:var(--plum-dark); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.community-post header time { color:var(--ink-soft); font-size:7px; }
.community-post .milestone { margin:4px 0 2px; color:var(--success); font-size:8px; font-weight:900; text-transform:uppercase; }
.community-post p { margin:3px 0 0; color:var(--ink); font-size:11px; line-height:1.45; }
.community-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:5px; }
.community-actions button { min-height:34px; padding:6px 9px; border:1px solid var(--line); border-radius:10px; color:var(--ink-soft); background:#fffaf7; font-size:8px; font-weight:800; }
.community-actions button.reacted { color:#8a345a; border-color:#e8a9bb; background:#fff0f4; }
.community-preview { margin-bottom:10px; padding:15px; border:1px dashed #b9cfc0; border-radius:19px; background:#f3f8f4; }
.community-preview small { color:var(--success); font-size:8px; font-weight:900; letter-spacing:.7px; }
.community-preview strong { display:block; margin-top:6px; color:var(--plum-dark); font-size:12px; }
.community-preview p { margin:5px 0; color:var(--ink-soft); font-size:9px; }
.community-preview button { min-height:38px; margin-top:5px; padding:7px 10px; border-radius:11px; color:#fff; background:var(--success); font-size:9px; font-weight:850; }
.theme-grid,.shop-grid { display:grid; gap:9px; }
.theme-card { display:grid; min-height:98px; padding:12px; grid-template-columns:43px minmax(0,1fr) auto; align-items:center; gap:10px; border:1px solid var(--line); border-radius:18px; background:#fff; }
.theme-card > span { display:grid; width:43px; height:43px; place-items:center; border-radius:14px; background:var(--sage-light); font-size:22px; }
.theme-card div { display:grid; }
.theme-card strong { color:var(--plum-dark); font-size:12px; }
.theme-card p { margin:3px 0; color:var(--ink-soft); font-size:9px; }
.theme-card small { color:var(--success); font-size:8px; font-weight:850; }
.theme-card button { min-height:38px; max-width:88px; padding:7px 9px; border-radius:11px; color:#fff; background:var(--plum); font-size:8px; font-weight:850; }
.theme-card button:disabled { color:var(--success); background:#e6f2e9; }
.theme-card.equipped { border-color:var(--success); box-shadow:0 5px 14px rgba(47,122,90,.09); }
.shop-policy { padding:11px; border-radius:14px; color:#745b25; background:#fff6df; font-size:9px; line-height:1.5; }
.shop-balances { display:flex; margin-top:11px; gap:7px; }
.shop-balances span { padding:7px 9px; border-radius:999px; color:#25483e; background:#edf5e9; font-size:9px; }
.shop-stage { position:relative; display:grid; min-height:190px; margin-bottom:10px; place-items:center; overflow:hidden; border:1px solid #d4e4db; border-radius:24px; background:radial-gradient(circle at 50% 25%,#fff 0 15%,transparent 16%),linear-gradient(160deg,#edf7ef,#fef2e5); box-shadow:var(--soft-shadow); }
.shop-stage::before,.shop-stage::after { position:absolute; bottom:-15px; width:90px; height:55px; border-radius:50%; background:#b7d5ac; content:""; filter:blur(1px); }
.shop-stage::before { left:-22px; }.shop-stage::after { right:-18px; }
.shop-categories { display:flex; margin:0 -18px 10px; padding:0 18px 5px; gap:6px; overflow:auto; scrollbar-width:none; }
.shop-categories::-webkit-scrollbar { display:none; }
.shop-categories button { flex:0 0 auto; min-height:36px; padding:6px 10px; border:1px solid var(--line); border-radius:999px; color:var(--ink-soft); background:#fff; font-size:8px; font-weight:850; }
.shop-categories button.active { color:#fff; border-color:var(--success); background:var(--success); }
.shop-card { display:grid; min-height:94px; padding:11px; grid-template-columns:48px 1fr auto; align-items:center; gap:9px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 4px 13px rgba(70,38,55,.04); }
.shop-card.previewing { border-color:var(--rose); box-shadow:0 0 0 3px rgba(239,127,157,.1); }
.shop-card > button:first-child { display:grid; width:48px; height:48px; place-items:center; border-radius:15px; background:linear-gradient(145deg,#e8f3e8,#fff0f4); font-size:22px; }
.shop-card div { display:grid; min-width:0; }
.shop-card strong { color:var(--plum-dark); font-size:11px; }
.shop-card p { margin:3px 0; color:var(--ink-soft); font-size:8px; }
.shop-card small { color:var(--success); font-size:8px; font-weight:850; }
.shop-card .shop-action { min-height:38px; max-width:88px; padding:7px 9px; border-radius:11px; color:#fff; background:var(--plum); font-size:8px; font-weight:850; }
.shop-card .shop-action:disabled { color:var(--success); background:#e6f2e9; }
.sundrop-market { margin-top:12px; }
.sundrop-products { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.sundrop-products button { display:grid; min-height:70px; padding:8px 5px; place-items:center; border:1px solid #ead8ae; border-radius:14px; color:#765a1d; background:linear-gradient(145deg,#fffaf0,#fff0bd); font-size:8px; font-weight:850; }
.sundrop-products button b { color:#684c0a; font-size:14px; }
#billing-status { margin:8px 0 0; color:var(--ink-soft); font-size:8px; line-height:1.4; }
.avatar-studio { text-align:center; }
.avatar-portrait-frame { position:relative; display:grid; min-height:176px; place-items:center; overflow:hidden; border-radius:19px; background:linear-gradient(155deg,#eef7ee,#fff1ed); }
.avatar-portrait-frame > img { width:100%; max-width:220px; aspect-ratio:1; object-fit:cover; border-radius:18px; }
.avatar-controls { display:grid; margin-top:10px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; text-align:left; }
.avatar-controls label { display:grid; color:var(--plum-dark); font-size:9px; font-weight:850; gap:4px; }
.avatar-controls select { width:100%; min-height:43px; padding:6px 8px; border:1px solid var(--line); border-radius:11px; color:var(--ink); background:#fff; }
.avatar-studio .outline-button { width:100%; }
.avatar-studio > small { display:block; margin-top:8px; color:var(--ink-soft); font-size:8px; line-height:1.45; }
.ai-avatar-studio { display:grid; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); gap:8px; text-align:left; }
.ai-avatar-studio > label { display:grid; color:var(--plum-dark); font-size:10px; font-weight:850; gap:3px; }
.ai-avatar-studio label small { color:var(--ink-soft); font-size:8px; font-weight:500; }
.ai-avatar-studio textarea { min-height:72px; resize:vertical; line-height:1.4; }
.ai-avatar-actions { display:grid; grid-template-columns:1fr 1fr 1fr; gap:5px; }
.ai-avatar-actions button { min-height:36px; padding:6px; border:1px solid var(--line); border-radius:10px; color:var(--success); background:#f1f7f2; font-size:8px; font-weight:850; }

.eco-avatar { position:relative; z-index:2; width:72px; height:96px; margin:auto; --skin:#c98b65; --avatar-accent:#a34269; }
.eco-avatar[data-skin="light"] { --skin:#f2c5a7; } .eco-avatar[data-skin="warm"] { --skin:#d99b73; } .eco-avatar[data-skin="tan"] { --skin:#b9764e; } .eco-avatar[data-skin="brown"] { --skin:#8a543b; } .eco-avatar[data-skin="deep"] { --skin:#593626; }
.eco-avatar[data-accent="sage"] { --avatar-accent:#60866a; } .eco-avatar[data-accent="ocean"] { --avatar-accent:#407899; } .eco-avatar[data-accent="sun"] { --avatar-accent:#d69b31; } .eco-avatar[data-accent="coral"] { --avatar-accent:#d86f65; }
.avatar-head { position:absolute; z-index:3; top:20%; left:50%; width:34%; height:29%; border-radius:46% 46% 50% 50%; background:var(--skin); transform:translateX(-50%); }
.avatar-head b::before,.avatar-head b::after { position:absolute; top:46%; width:3px; height:3px; border-radius:50%; background:#312a2a; content:""; }
.avatar-head b::before { left:28%; } .avatar-head b::after { right:28%; }
.avatar-hair { position:absolute; z-index:4; top:15%; left:50%; width:42%; height:23%; border-radius:50% 50% 35% 35%; background:#443028; transform:translateX(-50%); }
.eco-avatar[data-hair="curls"] .avatar-hair { border-radius:44%; box-shadow:-7px 5px #443028,7px 5px #443028; }
.eco-avatar[data-hair="waves"] .avatar-hair { height:36%; border-radius:50% 50% 38% 38%; }
.eco-avatar[data-hair="short"] .avatar-hair { height:17%; }
.eco-avatar[data-hair="covered"] .avatar-hair { width:48%; height:37%; border-radius:50% 50% 42% 42%; background:var(--avatar-accent); }
.eco-avatar[data-hair="braid"] .avatar-hair { height:34%; border-radius:50% 50% 30% 30%; box-shadow:16px 16px 0 -11px #443028,18px 25px 0 -12px #443028; }
.eco-avatar[data-hair="afro"] .avatar-hair { top:11%; width:55%; height:31%; border-radius:50%; box-shadow:-7px 2px #443028,7px 2px #443028; }
.eco-avatar[data-hair="bun"] .avatar-hair { top:14%; height:23%; }.eco-avatar[data-hair="bun"] .avatar-hair::before { position:absolute; top:-10px; left:50%; width:16px; height:16px; border-radius:50%; background:#443028; content:""; transform:translateX(-50%); }
.eco-avatar[data-hair="locs"] .avatar-hair { height:39%; border-radius:48% 48% 30% 30%; background:repeating-linear-gradient(90deg,#443028 0 3px,#2f221e 3px 5px); }
.avatar-body { position:absolute; z-index:2; top:44%; left:50%; display:grid; width:54%; height:39%; place-items:center; border-radius:45% 45% 24% 24%; color:#fff; background:var(--avatar-accent); transform:translateX(-50%); }
.avatar-body b { font-size:15px; font-style:normal; }
.avatar-legs { position:absolute; top:78%; left:50%; width:30%; height:18%; border-right:8px solid #324c48; border-left:8px solid #324c48; transform:translateX(-50%); }
.avatar-headwear,.avatar-accessory,.avatar-companion { position:absolute; z-index:7; display:grid; place-items:center; font-style:normal; filter:drop-shadow(0 2px 2px rgba(30,42,36,.15)); }
.avatar-headwear { top:7%; left:50%; font-size:20px; transform:translateX(-50%); }
.avatar-accessory { top:50%; left:69%; font-size:17px; }
.avatar-companion { right:-2%; bottom:2%; font-size:21px; }
.eco-avatar.tiny .avatar-headwear,.eco-avatar.tiny .avatar-accessory,.eco-avatar.tiny .avatar-companion { font-size:8px; }
.ai-avatar-small { display:block; border-radius:50%; object-fit:cover; }.ai-avatar-small.large { width:72px; height:72px; }.ai-avatar-small.small { width:76px; height:76px; }.ai-avatar-small.tiny { width:40px; height:40px; }
.shop-stage-label { position:absolute; z-index:3; right:10px; bottom:9px; left:10px; padding:5px 8px; border-radius:999px; color:#315b4b; background:rgba(255,255,255,.84); font-size:8px; font-weight:850; text-align:center; backdrop-filter:blur(5px); }
.eco-avatar[data-body="compact"] { transform:scale(.9,.86); transform-origin:bottom; } .eco-avatar[data-body="tall"] { transform:scale(.9,1.08); transform-origin:bottom; } .eco-avatar[data-body="broad"] .avatar-body { width:66%; }
.eco-avatar.studio { width:112px; height:148px; }
.eco-avatar.studio .avatar-body b { font-size:24px; }
.eco-avatar.small { width:70px; height:82px; }
.eco-avatar.tiny { width:42px; height:47px; }
.eco-avatar.tiny .avatar-body b,.eco-avatar.small .avatar-body b { font-size:9px; }
.eco-avatar.tiny .avatar-legs { display:none; }

.profile-hero { display: grid; padding: 9px 12px 22px; place-items: center; text-align: center; }
.profile-avatar { position: relative; display: grid; width: 88px; height: 88px; margin-bottom: 13px; place-items: center; border: 5px solid #fff; border-radius: 50%; background: linear-gradient(145deg,#f9d5e0,#fff1d9); box-shadow: 0 10px 25px rgba(80,39,63,.15); font-size: 43px; }
.profile-avatar > span { display:grid; width:100%; height:100%; place-items:center; overflow:hidden; border-radius:50%; }
.profile-avatar i { right: 0; bottom: -2px; width: 28px; height: 28px; font-size: 11px; }
.profile-hero h1 { margin-bottom: 3px; font-size: 30px; }
.profile-hero > p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 12px; }
.level-track { width: min(290px,90%); height: 8px; margin: 14px 0 6px; overflow: hidden; border-radius: 999px; background: #ebdfe3; }
.level-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--rose),var(--plum)); transition: width .5s ease; }
.profile-hero > small { color: var(--ink-soft); font-size: 10px; }

.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-bottom: 27px; gap: 8px; }
.profile-stats article { display: grid; min-width: 0; padding: 13px 5px; place-items: center; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 13px rgba(70,38,55,.05); }
.profile-stats article span { color: var(--berry); font-size: 16px; }
.profile-stats strong { margin: 4px 0 1px; color: var(--plum-dark); font-size: 18px; }
.profile-stats small { color: var(--ink-soft); font-size: 8px; text-align: center; }

.sync-badge { padding: 5px 9px; border-radius: 999px; color: var(--ink-soft); background: #eee8e8; font-size: 9px; font-weight: 850; }
.sync-badge.online { color: #35664f; background: #e2f1e7; }
.account-card { padding: 15px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 4px 13px rgba(70,38,55,.05); }
.account-intro { margin: 0 0 12px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; padding: 3px; gap: 3px; border-radius: 13px; background: #eee7e7; }
.account-tabs button { min-height: 38px; border-radius: 10px; color: var(--ink-soft); font-size: 10px; font-weight: 850; }
.account-tabs button.active { color: var(--plum); background: #fff; box-shadow: 0 3px 9px rgba(70,38,55,.08); }
#account-form { display: grid; gap: 7px; }
#account-form label { color: var(--plum-dark); font-size: 10px; font-weight: 800; }
#account-form input { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--ink); background: #fffcfa; font-size: 13px; }
#account-form input:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(239,127,157,.12); }
.account-submit { justify-content: center; margin-top: 5px; }
.form-message { min-height: 15px; margin: 2px 0 0; color: var(--danger); font-size: 10px; text-align: center; }
.privacy-copy { display: block; margin-top: 9px; color: var(--ink-soft); font-size: 8px; line-height: 1.45; text-align: center; }
.forgot-link { min-height: 34px; color: var(--berry); font-size: 9px; font-weight: 800; }
#account-signed-in { display: grid; grid-template-columns: 45px 1fr; align-items: center; gap: 10px; }
.account-flower { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 15px; background: var(--blush); font-size: 24px; }
#account-signed-in > div { display: grid; min-width: 0; }
#account-signed-in strong { overflow: hidden; color: var(--plum-dark); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
#account-signed-in small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
#account-signed-in .outline-button, #account-signed-in .text-danger { grid-column: 1 / -1; width: 100%; margin: 3px 0 0; }
.verification-note { grid-column: 1 / -1; display: grid; padding: 11px; gap: 3px; border: 1px solid #e8d199; border-radius: 13px; background: #fff9e8; }
.verification-note strong { color: #79551b !important; }
.verification-note button { min-height: 34px; margin-top: 5px; border-radius: 10px; color: #fff; background: #9a702d; font-size: 9px; font-weight: 850; }

.tool-section { margin-bottom: 28px; }
.material-card { display: grid; grid-template-columns: 49px 1fr auto; min-height: 70px; margin-bottom: 9px; padding: 10px 11px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 13px rgba(70,38,55,.05); text-decoration: none; }
.material-icon { display: grid; width: 47px; height: 47px; place-items: center; border-radius: 15px; font-family: Georgia,serif; font-weight: 700; }
.material-icon.notes { color: #9a4d6d; background: #fae7ed; }
.material-icon.exam { color: #4e7393; background: #e6eff5; }
.material-icon.care { color: #467563; background: #e5f0e8; font-size: 21px; }
.material-icon.workbook { color: #765391; background: #f0e8f7; }
.material-card > span:nth-child(2) { display:grid; min-width:0; }
.material-card strong { color: var(--plum-dark); font-size: 13px; }
.material-card small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.material-action { padding: 6px 8px; border-radius: 9px; color: var(--berry); background: var(--blush); font-size: 9px; font-weight: 900; }

.settings-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 4px 13px rgba(70,38,55,.05); }
.language-pack-status { margin:0; padding:9px 13px 11px; color:var(--ink-soft); background:#fbf7f1; font-size:8px; line-height:1.45; }
.device-ready { flex:0 0 auto; padding:6px 9px; border-radius:999px; color:#3e6e55; background:#e8f2ea; font-size:9px; font-weight:850; }
.setting-row { display: flex; min-height: 68px; padding: 12px 14px; align-items: center; justify-content: space-between; gap: 13px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border: 0; }
.setting-row > span { display: grid; }
.setting-row strong { color: var(--plum-dark); font-size: 12px; }
.setting-row small { margin-top: 2px; color: var(--ink-soft); font-size: 9px; }
.setting-row select, #welcome-language { min-height: 39px; max-width: 132px; padding: 6px 28px 6px 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; font-size: 11px; }
.voice-row select { width: 132px; }
.voice-preview { min-height: 38px; padding: 7px 10px; border: 1px solid #e8c9d4; border-radius: 11px; color: var(--berry); background: var(--blush); font-size: 10px; font-weight: 850; }
.voice-help { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; background: #fffaf4; }
.voice-help summary { padding: 13px 14px; color: var(--plum); cursor: pointer; font-size: 10px; font-weight: 850; }
.voice-help div { padding: 0 14px 12px; }
.voice-help p { margin: 0 0 8px; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.toggle { position: relative; width: 46px; height: 28px; border-radius: 999px; background: #cfc5c9; }
.toggle i { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.16); transition: transform .2s ease; }
.toggle.active { background: var(--sage); }
.toggle.active i { transform: translateX(18px); }
.outline-button { justify-content: center; margin-top: 11px; border: 2px solid var(--plum); color: var(--plum); background: #fff; box-shadow: none; }
.text-danger { display: block; min-height: 44px; margin: 9px auto 0; padding: 8px 12px; color: var(--danger); font-size: 10px; font-weight: 800; }
.official-note { margin-bottom: 15px; padding: 16px; border: 1px solid #dfd8c8; border-radius: 19px; background: #fbf7eb; }
.official-note strong { color: var(--plum-dark); font-size: 12px; }
.official-note p { margin: 5px 0 10px; color: var(--ink-soft); font-size: 10px; }
.official-note div { display: flex; flex-wrap: wrap; gap: 10px; }
.official-note a { color: var(--blue); font-size: 10px; font-weight: 800; }

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: max(0px,calc((100vw - 560px)/2));
  bottom: 0;
  left: max(0px,calc((100vw - 560px)/2));
  display: grid;
  grid-template-columns: repeat(5,1fr);
  min-height: calc(var(--bottom-nav) + env(safe-area-inset-bottom));
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(111,49,89,.08);
  background: rgba(255,253,249,.94);
  box-shadow: 0 -8px 24px rgba(70,38,55,.07);
  backdrop-filter: blur(20px) saturate(1.2);
}
.nav-item { display: grid; min-height: 58px; padding: 5px; place-items: center; align-content: center; gap: 2px; border-radius: 16px; color: #8b7f85; }
.nav-icon { display: grid; width: 31px; height: 29px; place-items: center; border-radius: 11px; font-size: 20px; line-height: 1; }
.nav-item small { font-size: 9px; font-weight: 750; }
.nav-item.active { color: var(--plum); }
.nav-item.active .nav-icon { color: #fff; background: linear-gradient(135deg,var(--berry),var(--plum)); box-shadow: 0 5px 12px rgba(111,49,89,.22); }
.coach-nav .nav-icon { font-size: 17px; }

.auth-gate { position:fixed; z-index:1000; inset:0; display:grid; padding:max(18px,env(safe-area-inset-top)) 16px max(18px,env(safe-area-inset-bottom)); place-items:center; overflow-y:auto; background:radial-gradient(circle at 20% 10%,rgba(110,160,124,.28),transparent 22rem),linear-gradient(145deg,#173d35,#3e715d); }
.auth-gate.hidden { display:none !important; }
.auth-gate-card { display:grid; width:min(100%,420px); padding:25px 21px 20px; gap:7px; border:1px solid rgba(255,255,255,.8); border-radius:27px; background:#fffdf9; box-shadow:0 24px 70px rgba(12,37,30,.34); }
.auth-gate-card > img { margin:0 auto 2px; border-radius:22px; box-shadow:var(--soft-shadow); }
.auth-gate-card > .eyebrow,.auth-gate-card > h2,.auth-gate-card > p { text-align:center; }
.auth-gate-card h2 { margin:0; font-size:28px; }
.auth-gate-card > p:not(.eyebrow) { margin:0 0 8px; color:var(--ink-soft); font-size:10px; }
.auth-gate-card > label { color:var(--plum-dark); font-size:10px; font-weight:850; }
.auth-gate-card > input { width:100%; min-height:48px; padding:10px 12px; border:1px solid var(--line); border-radius:13px; outline:0; color:var(--ink); background:#fff; font-size:13px; }
.auth-gate-card > input:focus { border-color:var(--success); box-shadow:0 0 0 4px rgba(47,122,90,.1); }
.auth-gate-card .primary-button { justify-content:center; margin-top:5px; }
.auth-gate-card > small { color:var(--ink-soft); font-size:8px; line-height:1.5; text-align:center; }
.auth-gate-card > small a { color:var(--blue); font-weight:800; }

dialog { padding: 0; border: 0; }
dialog::backdrop { background: rgba(39,24,34,.48); backdrop-filter: blur(5px); }
.account-dialog { width: min(92vw,430px); overflow: visible; border-radius: 24px; background: transparent; }
.account-dialog-card { position: relative; display: grid; padding: 23px 19px 20px; gap: 9px; border-radius: 24px; background: #fffdf9; box-shadow: 0 24px 60px rgba(45,22,36,.27); }
.account-dialog-card h2 { margin: 0; text-align: center; }
.account-dialog-card > p { margin: 0 0 5px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; text-align: center; }
.account-dialog-card label { color: var(--plum-dark); font-size: 10px; font-weight: 850; }
.account-dialog-card input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.account-dialog-card .primary-button { justify-content: center; margin-top: 4px; }
.account-dialog-card > small { min-height: 15px; color: var(--danger); font-size: 9px; text-align: center; }
.dialog-x { position: absolute; top: 11px; right: 11px; width: 35px; height: 35px; border-radius: 11px; color: var(--ink-soft); background: #f2ebeb; font-size: 18px; }
.dialog-flower { margin: 0 auto; font-size: 34px; }
.danger-button { min-height: 48px; margin-top: 5px; border-radius: 14px; color: #fff; background: var(--danger); font-size: 11px; font-weight: 850; }

.lesson-dialog {
  width: 100%;
  max-width: 560px;
  height: 100%;
  max-height: 100dvh;
  margin: auto;
  color: var(--ink);
  background: var(--cream);
}
.lesson-dialog[open] { animation: dialog-up .34s cubic-bezier(.2,.8,.2,1); }
@keyframes dialog-up { from{opacity:0;transform:translateY(35px)} to{opacity:1;transform:none} }
.dialog-shell { display: grid; min-height: var(--app-height); grid-template-rows: auto minmax(0,1fr) auto; }
.lesson-topbar { display: grid; grid-template-columns: 44px 1fr 54px; min-height: calc(67px + env(safe-area-inset-top)); padding: calc(12px + env(safe-area-inset-top)) 14px 10px; align-items: center; gap: 9px; }
.close-button { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: var(--ink-soft); font-size: 27px; }
.lesson-progress { height: 9px; overflow: hidden; border-radius: 999px; background: #eadfe3; }
.lesson-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--rose),var(--plum)); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.heart-counter { display: flex; min-width: 50px; justify-content: center; gap: 5px; color: var(--danger); }
.heart-counter strong { color: var(--ink); font-size: 13px; }
.lesson-stage { display: flex; min-height: 0; flex-direction: column; padding: 12px 19px 25px; overflow-y: auto; }
.lesson-label { margin: 6px 0; color: var(--berry); font-size: 10px; font-weight: 900; letter-spacing: 1.5px; }
.lesson-stage h2 { margin: 5px 0 10px; font-size: clamp(26px,8vw,36px); }
.lesson-prompt { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }
.speak-card { display: grid; margin: 10px 0 22px; padding: 24px 17px; place-items: center; border: 1px solid #e4d6dd; border-radius: 25px; background: linear-gradient(145deg,#fff,#fff1f4); text-align: center; box-shadow: var(--soft-shadow); }
.speak-card strong { color: var(--plum-dark); font-family: Georgia,serif; font-size: 28px; line-height: 1.2; }
.speak-card p { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; }
.lesson-mission { display:grid; margin:0 0 14px; padding:12px; gap:4px; border:1px solid #cfdfd2; border-radius:16px; background:#eef7f0; }
.lesson-mission small { color:var(--success); font-size:8px; font-weight:900; letter-spacing:.7px; }
.lesson-mission strong { color:#284f3e; font-size:11px; line-height:1.4; }
.lesson-mission p { margin:0; color:var(--ink-soft); font-size:9px; }
.adaptive-pronunciation { display:grid; width:100%; margin-top:13px; padding:10px; gap:3px; border-radius:13px; background:#f1edfa; }
.adaptive-pronunciation small { color:#6b5384; font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.7px; }
.adaptive-pronunciation bdi { color:#49365d; font-size:13px; font-weight:850; }
.adaptive-pronunciation em { color:var(--ink-soft); font-size:8px; font-style:normal; }
.speech-button { display: grid; width: 58px; height: 58px; margin-bottom: 16px; place-items: center; border: 0; border-radius: 20px; color: #fff; background: linear-gradient(145deg,var(--rose),var(--plum)); box-shadow: 0 9px 19px rgba(111,49,89,.24); cursor: pointer; font-size: 23px; }
.speech-button.playing { animation: sound-wave .8s infinite alternate; }
@keyframes sound-wave { to{transform:scale(1.08);box-shadow:0 9px 19px rgba(111,49,89,.24),0 0 0 9px rgba(239,127,157,.12)} }
.answer-grid { display: grid; gap: 10px; }
.answer-option { display: flex; width: 100%; min-height: 59px; padding: 13px 15px; align-items: center; gap: 11px; border: 2px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; }
.answer-option .option-letter { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: var(--ink-soft); background: #f1ebed; font-size: 10px; }
.answer-option.selected { border-color: var(--berry); color: var(--plum); background: var(--blush); box-shadow: 0 5px 14px rgba(111,49,89,.09); }
.answer-option.correct { border-color: var(--success); background: #e8f5ed; }
.answer-option.wrong { border-color: var(--danger); background: #fcebed; }
.answer-option:disabled { cursor: default; }
.word-bank { display: flex; flex-wrap: wrap; min-height: 60px; padding: 12px; gap: 8px; border: 2px dashed #d9ccd1; border-radius: 17px; }
.word-chip { min-height: 40px; padding: 8px 12px; border: 1px solid #d8cbd1; border-bottom-width: 3px; border-radius: 12px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 750; }
.word-chip.used { opacity: .3; transform: scale(.94); pointer-events: none; }
.sentence-zone { display: flex; flex-wrap: wrap; min-height: 67px; margin: 0 0 13px; padding: 11px; align-items: flex-start; gap: 7px; border-bottom: 2px solid var(--line); }
.type-answer { width: 100%; min-height: 55px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; outline: 0; background: #fff; font-size: 15px; }
.type-answer:focus { border-color: var(--berry); box-shadow: 0 0 0 4px rgba(169,67,112,.08); }
.vocab-preview { display: grid; margin-top: 8px; gap: 9px; }
.vocab-row { display: grid; grid-template-columns: minmax(0,1fr) 43px; padding: 12px 12px 12px 14px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 16px; background:#fff; }
.vocab-row span { display:grid; }
.vocab-row strong { color:var(--plum-dark); font-size:14px; }
.vocab-row small { margin-top:3px; color:var(--ink-soft); font-size:10px; }
.vocab-row .sound-bridge { color:#68517e; font-size:8px; font-weight:700; }
.mini-speak { display:grid; width:42px; height:42px; place-items:center; border:0; border-radius:13px; color:var(--berry); background:var(--blush); cursor:pointer; }
.exam-readiness { display:grid; margin: 8px 0 20px; padding: 20px; place-items:center; border-radius:24px; color:#fff; background:linear-gradient(145deg,var(--plum),#9a5577); text-align:center; }
.exam-readiness strong { font-family:Georgia,serif; font-size:28px; }
.exam-readiness p { margin:7px 0 0; color:rgba(255,255,255,.85); font-size:12px; }
.lesson-footer { padding: 10px 17px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,249,.96); }
.feedback-panel { display: none; margin-bottom: 9px; padding: 11px 12px; border-radius: 14px; font-size: 12px; }
.feedback-panel.show { display: block; animation: feedback-in .25s ease-out; }
.feedback-panel.correct { color: #235a43; background: #e5f3ea; }
.feedback-panel.wrong { color: #8e3340; background: #fbe7ea; }
@keyframes feedback-in {from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.lesson-check { justify-content: center; }
.lesson-check:disabled { color: #9c9297; background: #e9e2e5; box-shadow: none; cursor: not-allowed; }

.welcome-dialog { width: calc(100% - 28px); max-width: 430px; margin: auto; overflow: visible; border-radius: 31px; color: var(--ink); background: transparent; }
.welcome-dialog[open] { animation: welcome-in .46s cubic-bezier(.2,.8,.2,1); }
@keyframes welcome-in {from{opacity:0;transform:translateY(18px) scale(.96)}to{opacity:1;transform:none}}
.welcome-card { position: relative; display: grid; padding: 30px 23px 23px; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 31px; background: linear-gradient(155deg,#fffdf9,#ffeff3); box-shadow: 0 24px 70px rgba(57,28,47,.24); text-align: center; }
.welcome-skip { position: absolute; top: 12px; right: 14px; min-height: 39px; padding: 8px; color: var(--ink-soft); font-size: 10px; }
.welcome-flower { display:grid; width:90px; height:90px; margin-bottom:16px; place-items:center; border-radius:50%; background:radial-gradient(circle,#fff 0 39%,#f7d2dc 40% 58%,#faeaee 59% 100%); font-size:45px; box-shadow:0 9px 23px rgba(111,49,89,.12); }
.welcome-card h2 { margin: 6px 0 8px; font-size: 30px; }
.welcome-lead { margin:0 0 18px; color:var(--ink-soft); font-size:13px; }
.welcome-features { display:grid; width:100%; margin-bottom:18px; gap:8px; text-align:left; }
.welcome-features span { display:flex; align-items:center; gap:9px; color:var(--ink-soft); font-size:11px; }
.welcome-features i { display:grid; width:28px; height:28px; place-items:center; border-radius:9px; color:var(--berry); background:var(--blush); font-style:normal; font-weight:800; }
.welcome-card label { width:100%; margin:0 0 5px 3px; color:var(--plum-dark); font-size:10px; font-weight:800; text-align:left; }
.welcome-card select { width:100%; max-width:none; margin-bottom:13px; }
.welcome-interests { width:100%; margin:0 0 13px; padding:0; border:0; text-align:left; }
.welcome-interests legend { margin-bottom:6px; color:var(--plum-dark); font-size:10px; font-weight:800; }
.welcome-interests div { display:flex; max-height:86px; flex-wrap:wrap; gap:5px; overflow-y:auto; }
.welcome-interests button { min-height:34px; padding:6px 8px; border:1px solid var(--line); border-radius:10px; color:var(--ink-soft); background:#fff; font-size:9px; font-weight:800; }
.welcome-interests button.active { border-color:var(--success); color:var(--success); background:#eaf5ed; }
.welcome-card .primary-button { justify-content:space-between; }

.toast { position: fixed; z-index: 200; right: 50%; bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom) + 14px); max-width: min(360px,calc(100% - 32px)); padding: 11px 16px; border-radius: 14px; color:#fff; background:var(--plum-dark); box-shadow:0 12px 30px rgba(40,20,32,.25); opacity:0; pointer-events:none; transform:translate(50%,12px); transition:.25s ease; font-size:11px; font-weight:700; text-align:center; }
.toast.show { opacity:1; transform:translate(50%,0); }
.confetti-layer { position:fixed; z-index:300; inset:0; overflow:hidden; pointer-events:none; }
.confetti { position:absolute; top:-20px; width:10px; height:16px; border-radius:10px 2px 10px 2px; animation:confetti-fall 1.6s forwards cubic-bezier(.2,.6,.4,1); }
@keyframes confetti-fall { to{transform:translate(var(--drift),105vh) rotate(720deg);opacity:.15} }

@media (min-width: 700px) {
  .app-shell { border-right:1px solid rgba(111,49,89,.08); border-left:1px solid rgba(111,49,89,.08); }
  .desktop-garden { position:fixed; display:block; inset:0; overflow:hidden; pointer-events:none; }
  .desktop-flower { position:absolute; bottom:-80px; width:150px; height:250px; border-radius:55% 45% 50% 50%; opacity:.2; filter:blur(1px); background:linear-gradient(160deg,var(--rose),var(--plum)); }
  .flower-one { left:4%; transform:rotate(-24deg); }
  .flower-two { right:5%; bottom:-35px; height:320px; transform:rotate(21deg); background:linear-gradient(160deg,#9ab491,#416d5f); }
  .flower-three { right:16%; bottom:-170px; transform:scale(.7) rotate(-14deg); }
}

@media (hover: hover) and (pointer: fine) {
  .pressable:hover { transform:translateY(-1px); }
  .hero-card:hover img { transform:scale(1.035); }
  .primary-button:hover,
  .lesson-check:hover { filter:brightness(1.06); box-shadow:0 12px 26px rgba(81,32,63,.31); }
}

@media (pointer: coarse) {
  .care-track-filter button,
  .scenario-chip,
  .language-switch button,
  .account-tabs button,
  .daily-play,
  .forgot-link { min-height:44px; }
  .bubble-actions button { min-height:40px; }
}

@media (min-width: 430px) and (max-width: 699px) {
  :root { --page-gutter:22px; }
  .hero-content { padding:32px 27px 27px; }
  .chapter-card { min-height:165px; padding:21px; }
  .quick-card { min-height:126px; }
}

@media (min-width: 560px) and (max-width: 699px) and (orientation: portrait) {
  .app-shell { max-width:none; }
  .bottom-nav { right:0; left:0; }
}

@media (max-width: 350px) {
  :root { --radius-xl:25px; --radius-lg:20px; }
  .brand-copy small { display:none; }
  .brand-copy strong { font-size:15px; }
  .brand-mark { width:39px; height:39px; }
  .brand-button { gap:6px; }
  .top-stats { gap:4px; }
  .stat-pill { min-width:39px; padding:5px 6px; gap:4px; }
  .stat-icon { width:13px; height:13px; }
  .hero-card { min-height:clamp(370px,64svh,430px); }
  .hero-content { padding-right:18px; padding-left:18px; }
  .chapter-tab { grid-template-columns:25px 1fr; padding:7px 5px; font-size:10px; }
  .quick-card { min-height:108px; }
  .profile-stats { gap:5px; }
  .profile-stats article { padding-right:2px; padding-left:2px; }
  .setting-row { padding-right:11px; padding-left:11px; }
  .setting-row select { max-width:120px; }
  .vocabulary-goal { grid-template-columns:61px 1fr auto; }
}

@media (max-width: 699px) {
  input,
  textarea,
  select { font-size:16px !important; }
  .setting-row select,
  #welcome-language { max-width:145px; }
  .voice-row { align-items:flex-start; flex-direction:column; }
  .voice-row select { width:100%; max-width:none; }
}

@media (orientation: landscape) and (max-height: 560px) and (min-width: 560px) {
  :root { --bottom-nav:0px; --page-gutter:clamp(18px,3vw,32px); }
  body { overscroll-behavior-y:auto; }
  .app-shell { max-width:none; min-height:var(--app-height); padding-left:82px; overflow:visible; }
  .topbar { min-height:58px; padding-top:max(8px,env(safe-area-inset-top)); padding-right:max(var(--page-gutter),env(safe-area-inset-right)); }
  main { padding-bottom:12px; }
  .page { min-height:calc(var(--app-height) - 58px); padding-top:12px; }
  .bottom-nav {
    top:0;
    right:auto;
    bottom:0;
    left:0;
    width:82px;
    min-height:var(--app-height);
    padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    grid-template-columns:1fr;
    grid-template-rows:repeat(5,1fr);
    border-top:0;
    border-right:1px solid rgba(111,49,89,.08);
    box-shadow:8px 0 24px rgba(70,38,55,.07);
  }
  .nav-item { min-height:0; }
  .hero-card { min-height:min(440px,calc(var(--app-height) - 94px)); }
  .home-heading { padding-bottom:10px; }
  .chat-window { height:calc(var(--app-height) - 258px); min-height:180px; max-height:none; }
  .chat-composer { bottom:8px; }
  .lesson-dialog { max-width:none; max-height:var(--app-height); }
  .dialog-shell { min-height:var(--app-height); }
  .lesson-stage { padding-right:max(25px,env(safe-area-inset-right)); padding-left:max(25px,env(safe-area-inset-left)); }
  .lesson-topbar { min-height:58px; padding-top:max(8px,env(safe-area-inset-top)); }
  .speak-card { margin:5px 0 13px; padding:15px; }
  .speech-button { width:50px; height:50px; margin-bottom:10px; }
  .answer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (display-mode: standalone) {
  .app-shell { box-shadow:none; }
}

@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 (prefers-contrast: more) {
  :root { --line:#9a8490; --ink-soft:#4d4349; }
  .answer-option,.material-card,.settings-card,.chapter-card { border-width:2px; }
}
