/* ============================================================
   Lumi · 英语冒险乐园 — 演示站点样式
   设计令牌通过 --site-* 变量接入 Nudge（外观/圆角/间距/字体/动效）
   ============================================================ */

:root {
  /* —— Nudge 外观令牌 —— */
  --site-bg: #FFF3DF;
  --site-fg: #3B2A20;
  --site-accent: #FF9F1C;
  --site-on-accent: #3A2410;
  --site-surface: #FFFDF8;
  --site-muted: #8A7364;
  --site-border: #F0E0C8;
  --site-font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Yuanti SC", "YouYuan", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;

  /* —— Nudge 形态令牌 —— */
  --site-radius: 26px;
  --site-space: 1;
  --site-type: 1;
  --site-motion: 1;

  /* —— Lumi 品牌色板 —— */
  --lumi-orange: #FF9F1C;
  --lumi-amber: #FFC93C;
  --lumi-tangerine: #FF8A3D;
  --lumi-plum: #372A4D;
  --lumi-plum-deep: #241B38;
  --lumi-teal: #2FA3B8;
  --lumi-teal-deep: #1B7A8F;
  --lumi-grape: #8F6BE0;
  --lumi-grape-deep: #6A48C0;
  --lumi-berry: #E8639C;
  --lumi-berry-deep: #C23A78;
  --lumi-leaf: #3DA465;
  --lumi-leaf-deep: #277A47;
  --lumi-sky: #5BC8D8;
  --lumi-rose: #F79BB0;
  --lumi-gold: #FFD166;
  --lumi-success: #2E8B52;
  --lumi-danger: #D64545;
  --lumi-info: #2FA3B8;

  --shadow-card: 0 10px 30px rgba(122, 74, 22, .10), 0 2px 6px rgba(122, 74, 22, .06);
  --shadow-pop: 0 18px 50px rgba(55, 42, 77, .28);
  --ring: 0 0 0 3px rgba(143, 107, 224, .55);

  --sp: calc(24px * var(--site-space, 1));
  --dur: calc(180ms * var(--site-motion, 1));
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--lumi-orange) #F7E8CF;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--site-font);
  font-size: calc(16px * var(--site-type, 1));
  line-height: 1.55;
  color: var(--site-fg);
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(255, 201, 60, .35), transparent 62%),
    radial-gradient(900px 600px at -10% 108%, rgba(91, 200, 216, .20), transparent 60%),
    radial-gradient(700px 420px at 108% 82%, rgba(247, 155, 176, .18), transparent 60%),
    var(--site-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* —— 滚动条：奶油轨道 + 橙色滑块 —— */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #F7E8CF; border-radius: 8px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--lumi-amber), var(--lumi-orange));
  border-radius: 8px;
  border: 3px solid #F7E8CF;
}
::-webkit-scrollbar-thumb:hover { background: var(--lumi-tangerine); }

::selection { background: rgba(255, 159, 28, .35); }

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: .2px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }

:focus-visible {
  outline: 3px solid var(--lumi-grape-deep);
  outline-offset: 3px;
  border-radius: 10px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  padding: 10px 18px; border-radius: 999px;
  background: var(--lumi-plum); color: #FFF6E8;
  text-decoration: none; font-weight: 700;
  transition: top var(--dur) ease;
}
.skip-link:focus-visible { top: 14px; }

/* ============ 应用骨架 ============ */
.app {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--sp);
  max-width: 1480px;
  margin: 0 auto;
  padding: var(--sp);
  align-items: start;
}

.page { min-width: 0; display: flex; flex-direction: column; gap: var(--sp); }

/* ============ 侧栏 ============ */
.sidebar {
  position: sticky;
  top: var(--sp);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(18px * var(--site-space, 1));
  padding: calc(18px * var(--site-space, 1)) 10px;
  min-height: calc(100vh - var(--sp) * 2);
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: calc(var(--site-radius) + 6px);
  box-shadow: var(--shadow-card);
}

.logo { text-decoration: none; }
.logo-mark {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--lumi-amber), var(--lumi-tangerine));
  color: #fff; font-size: 30px; font-weight: 900;
  box-shadow: 0 6px 16px rgba(255, 138, 61, .45), inset 0 -3px 0 rgba(0,0,0,.12);
  transform: rotate(-4deg);
  transition: transform var(--dur) ease;
}
.logo:hover .logo-mark { transform: rotate(4deg) scale(1.06); }

.side-nav { flex: 1; }
.side-nav ul { display: flex; flex-direction: column; gap: 12px; }
.side-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 64px; padding: 9px 4px;
  border-radius: 18px;
  text-decoration: none; color: var(--site-muted);
  border: 1px solid transparent;
  transition: background var(--dur) ease, color var(--dur) ease, transform var(--dur) ease;
}
.side-nav a:hover { background: #FFF1D6; color: var(--site-fg); transform: translateY(-2px); }
.side-nav a[aria-current="true"] {
  background: linear-gradient(150deg, var(--lumi-sky), var(--lumi-teal-deep));
  color: #fff;
  box-shadow: 0 6px 14px rgba(27, 122, 143, .35);
}
.nav-ico { font-size: 22px; line-height: 1; }
.nav-label { font-size: 11px; font-weight: 700; }

.coins {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 8px;
  border-radius: 18px;
  background: linear-gradient(160deg, #FFF1C9, #FFE29A);
  border: 1px solid #F2D38A;
  min-width: 64px;
}
.coins-count { font-size: 20px; font-weight: 900; color: #8A5A00; }
.coins-label { font-size: 11px; font-weight: 700; color: #A06E12; }

/* ============ 顶栏 ============ */
.topbar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: calc(14px * var(--site-space, 1)) calc(18px * var(--site-space, 1));
  padding: calc(14px * var(--site-space, 1)) calc(20px * var(--site-space, 1));
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: calc(var(--site-radius) + 2px);
  box-shadow: var(--shadow-card);
}

.profile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  display: grid; place-items: center;
  width: 52px; height: 52px; flex: none;
  font-size: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FFE0B8, #FFB877);
  border: 3px solid #FFD9A0;
  box-shadow: 0 4px 10px rgba(255, 159, 28, .3);
}
.profile-text h1 { font-size: calc(20px * var(--site-type, 1)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-text p { font-size: calc(13px * var(--site-type, 1)); color: var(--site-muted); }
.demo-tag {
  font-size: 11px; font-weight: 800;
  padding: 2px 9px; border-radius: 999px;
  background: #EFE7FF; color: var(--lumi-grape-deep);
  border: 1px solid #D9C8F7;
}

.status-chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: calc(13.5px * var(--site-type, 1)); font-weight: 700;
  border: 1px solid var(--site-border);
  background: #FFF8EC;
  white-space: nowrap;
}
.chip-level { background: #FFF1D6; border-color: #F5DCA8; color: #7A5200; }
.chip-streak { background: #FFE9D2; border-color: #F8CFA0; color: #93400F; }
.chip-hearts { background: #FFEDF2; border-color: #F8CBD9; letter-spacing: 2px; font-size: 12px; }
.heart-empty { opacity: .3; filter: grayscale(1); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-orange { background: var(--lumi-orange); box-shadow: 0 0 0 3px rgba(255,159,28,.25); }
.dot-flame { width: auto; height: auto; background: none; box-shadow: none; font-size: 14px; }

.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 14px;
  border: 1px solid var(--site-border);
  background: #FFF8EC;
  font-size: 19px;
  transition: transform var(--dur) ease, background var(--dur) ease;
}
.icon-btn:hover { background: #FFEFD2; transform: translateY(-2px); }
.icon-btn:active { transform: scale(.94); }
.sound-toggle[aria-pressed="false"] { background: #F1EAE0; opacity: .75; }

.search {
  position: relative;
  display: flex; align-items: center;
  margin-left: auto;
  min-width: 220px; flex: 0 1 300px;
}
.search-ico { position: absolute; left: 14px; font-size: 14px; opacity: .65; pointer-events: none; }
.search input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  border-radius: 999px;
  border: 1.5px solid var(--site-border);
  background: #FFF8EC;
  color: var(--site-fg);
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}
.search input::placeholder { color: #B09A87; }
.search input:focus { outline: none; border-color: var(--lumi-grape); box-shadow: var(--ring); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 8px;
  width: 28px; height: 28px;
  border: none; border-radius: 50%;
  background: #F0E0C8; color: #7A6250;
  font-size: 12px; font-weight: 800;
}
.search-clear:hover { background: #E5CFA9; }

/* ============ 主布局 ============ */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: var(--sp);
  align-items: start;
}
.col-main, .col-side { display: flex; flex-direction: column; gap: var(--sp); min-width: 0; }

section { scroll-margin-top: calc(var(--sp) + 12px); }

.eyebrow {
  font-size: calc(12px * var(--site-type, 1));
  font-weight: 900; letter-spacing: 2.2px; text-transform: uppercase;
  color: #9A5B00;
  margin-bottom: 8px;
}
.eyebrow-light { color: #C9B8E8; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: calc(14px * var(--site-space, 1));
}
.section-head h2 { font-size: calc(23px * var(--site-type, 1)); }

.link-btn {
  border: none; background: none; padding: 4px 2px;
  font-weight: 800; font-size: calc(14px * var(--site-type, 1));
  color: #B26A00;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
  border-radius: 8px;
}
.link-btn:hover { color: #8A5200; }
.link-light { color: var(--lumi-gold); margin-top: 10px; }
.link-light:hover { color: #FFE29A; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  border: none;
  font-weight: 800; font-size: calc(15.5px * var(--site-type, 1));
  text-decoration: none;
  transition: transform var(--dur) ease, box-shadow var(--dur) ease, filter var(--dur) ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(.97); }

.btn-plum {
  background: linear-gradient(150deg, #463663, var(--lumi-plum-deep));
  color: #FFF6E8;
  box-shadow: 0 8px 20px rgba(36, 27, 56, .35), inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-yellow {
  background: linear-gradient(150deg, #FFE08A, var(--lumi-gold));
  color: #5C3A00;
  box-shadow: 0 6px 16px rgba(255, 209, 102, .5), inset 0 -2px 0 rgba(160, 110, 18, .25);
}
.btn-ghost {
  background: transparent;
  border: 2px solid var(--site-border);
  color: var(--site-fg);
}
.btn-ghost:hover { background: #FFF1D6; }
.btn-ghost-light {
  background: rgba(255, 255, 255, .12);
  border: 1.5px solid rgba(255, 255, 255, .35);
  color: #FFF6E8;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .22); }
.btn-danger { background: linear-gradient(150deg, #E86A6A, var(--lumi-danger)); color: #fff; box-shadow: 0 6px 16px rgba(214,69,69,.35); }
.btn-reset {
  background: transparent; border: 2px dashed #D9BFA0; color: #8A6A4A;
  padding: 9px 18px; font-size: calc(13.5px * var(--site-type, 1));
}
.btn-reset:hover { background: #FFF1D6; border-color: #C9A87F; }
.btn-play {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-size: 11px;
}

/* ============ 冒险横幅 ============ */
.banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr);
  gap: calc(16px * var(--site-space, 1));
  padding: calc(30px * var(--site-space, 1)) calc(32px * var(--site-space, 1));
  border-radius: calc(var(--site-radius) + 4px);
  background:
    radial-gradient(420px 260px at 82% 18%, rgba(255, 246, 206, .55), transparent 65%),
    radial-gradient(300px 300px at 108% 108%, rgba(255, 138, 61, .55), transparent 70%),
    linear-gradient(120deg, var(--lumi-amber) 0%, var(--lumi-orange) 55%, var(--lumi-tangerine) 100%);
  box-shadow: 0 14px 34px rgba(255, 138, 61, .35), inset 0 2px 0 rgba(255,255,255,.4);
  overflow: hidden;
}
.banner::before, .banner::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 246, 206, .28);
  pointer-events: none;
}
.banner::before { width: 220px; height: 220px; right: -60px; top: -80px; }
.banner::after { width: 140px; height: 140px; left: 38%; bottom: -70px; }

.banner-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.banner .eyebrow { color: #7A4A00; margin-bottom: 0; }
.banner h2 {
  font-size: calc(42px * var(--site-type, 1));
  font-weight: 900;
  color: #42280A;
  letter-spacing: .3px;
  text-shadow: 0 2px 0 rgba(255, 246, 206, .5);
}
.banner h2 em {
  font-style: normal;
  color: #FFFDF4;
  text-shadow: 0 3px 0 rgba(160, 90, 0, .35);
  display: inline-block;
  transform: rotate(-2deg);
}
.banner-sub { max-width: 46ch; color: #5C3A17; font-weight: 600; font-size: calc(15.5px * var(--site-type, 1)); }
.banner .btn { margin-top: 6px; }

.banner-art { position: relative; display: grid; place-items: center; min-height: 190px; }
.mascot {
  width: min(230px, 100%); height: auto;
  filter: drop-shadow(0 14px 22px rgba(160, 90, 0, .3));
  animation: float 4.5s ease-in-out infinite;
}
.sparkle { position: absolute; color: #FFFDF4; text-shadow: 0 0 12px rgba(255,255,255,.8); animation: twinkle 2.6s ease-in-out infinite; }
.s1 { top: 12%; left: 6%; font-size: 22px; }
.s2 { top: 48%; right: 2%; font-size: 18px; animation-delay: .8s; }
.s3 { bottom: 8%; left: 18%; font-size: 15px; animation-delay: 1.5s; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }
@keyframes twinkle { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* ============ 课程卡片 ============ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(16px * var(--site-space, 1));
}
.course-grid > li { min-width: 0; }
.course-grid > li[hidden] { display: none; }

.course-card {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; gap: 7px;
  width: 100%; min-height: 172px;
  padding: calc(18px * var(--site-space, 1)) calc(20px * var(--site-space, 1));
  border: none;
  border-radius: var(--site-radius);
  text-align: left;
  color: #fff;
  box-shadow: var(--shadow-card), inset 0 2px 0 rgba(255,255,255,.28), inset 0 -3px 0 rgba(0,0,0,.12);
  transition: transform var(--dur) ease, box-shadow var(--dur) ease;
  overflow: hidden;
}
.course-card::after {
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  pointer-events: none;
}
.course-card:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 16px 34px rgba(122,74,22,.2), inset 0 2px 0 rgba(255,255,255,.28); }
.course-card:active { transform: translateY(-1px) scale(.99); }

.card-teal   { background: linear-gradient(140deg, #2B98AD 0%, var(--lumi-teal-deep) 100%); }
.card-purple { background: linear-gradient(140deg, var(--lumi-grape) 0%, var(--lumi-grape-deep) 100%); }
.card-pink   { background: linear-gradient(140deg, #E05590 0%, var(--lumi-berry-deep) 100%); }
.card-green  { background: linear-gradient(140deg, var(--lumi-leaf) 0%, var(--lumi-leaf-deep) 100%); }

.course-ico {
  position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  font-size: 24px;
  border-radius: 14px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.course-title { font-size: calc(19px * var(--site-type, 1)); font-weight: 900; padding-right: 54px; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.course-zh { font-size: calc(12.5px * var(--site-type, 1)); font-weight: 700; opacity: .92; margin-top: -4px; }
.course-meta { font-size: calc(12.5px * var(--site-type, 1)); font-weight: 600; opacity: .95; margin-top: 4px; }

.progress {
  display: block; height: 9px; width: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,.32);
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  display: block; height: 100%; width: 0%;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,.6);
  transition: width calc(500ms * var(--site-motion, 1)) cubic-bezier(.22,1,.36,1);
}
.progress-dark { background: rgba(255,255,255,.16); }
.fill-orange { background: linear-gradient(90deg, var(--lumi-amber), var(--lumi-tangerine)); box-shadow: 0 0 10px rgba(255,159,28,.55); }

.course-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: calc(12.5px * var(--site-type, 1)); font-weight: 700;
  margin-top: 2px;
}
.course-stars {
  padding: 2px 10px; border-radius: 999px;
  background: rgba(0,0,0,.18);
  font-weight: 800;
}
.course-card.is-complete .course-stars { background: rgba(255,255,255,.28); }

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: calc(34px * var(--site-space, 1));
  border: 2px dashed var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  text-align: center;
  color: var(--site-muted);
}
.empty-state > span { font-size: 34px; }

/* ============ 每日单词 ============ */
.word-panel {
  padding: calc(26px * var(--site-space, 1));
  border-radius: calc(var(--site-radius) + 4px);
  background:
    radial-gradient(360px 200px at 100% 0%, rgba(143, 107, 224, .35), transparent 65%),
    linear-gradient(160deg, #3D2F57 0%, var(--lumi-plum-deep) 100%);
  color: #FFF6E8;
  box-shadow: 0 16px 38px rgba(36, 27, 56, .35), inset 0 1px 0 rgba(255,255,255,.1);
}
.word-title {
  font-size: calc(46px * var(--site-type, 1));
  font-weight: 900; letter-spacing: .5px;
  color: #FFFDF4;
  text-shadow: 0 3px 0 rgba(0,0,0,.22);
}
.word-phonetic { color: #C9B8E8; font-size: calc(14px * var(--site-type, 1)); font-style: italic; margin-top: 2px; }

.word-scene {
  display: grid; place-items: center;
  margin: calc(16px * var(--site-space, 1)) 0;
  padding: 14px;
  border-radius: calc(var(--site-radius) - 6px);
  background: linear-gradient(140deg, #58B878, #2E8B52);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.3), inset 0 -4px 0 rgba(0,0,0,.14);
  min-height: 128px;
}
.word-art { width: 104px; height: 104px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); animation: float 5s ease-in-out infinite; }
.word-emoji { font-size: 72px; line-height: 1; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); animation: float 5s ease-in-out infinite; }

.weekly { margin-bottom: calc(16px * var(--site-space, 1)); }
.weekly-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: calc(13px * var(--site-type, 1)); color: #C9B8E8;
  margin-bottom: 7px;
}
.weekly-row strong { color: #FFF6E8; font-size: calc(14px * var(--site-type, 1)); }

.pron-hint {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 209, 102, .14);
  border: 1px solid rgba(255, 209, 102, .4);
  color: #FFE9B8;
  font-size: calc(13.5px * var(--site-type, 1));
}
.pron-hint strong { color: var(--lumi-gold); }

.word-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.word-actions .btn { padding: 12px 10px; font-size: calc(14.5px * var(--site-type, 1)); }
#listenWord.is-speaking { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,209,102,.5); } 50% { box-shadow: 0 0 0 8px rgba(255,209,102,0); } }

/* ============ 小游戏卡 ============ */
.games-row { display: grid; grid-template-columns: 1fr 1fr; gap: calc(16px * var(--site-space, 1)); }
.mini-game {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 150px;
  padding: calc(18px * var(--site-space, 1));
  border: none;
  border-radius: var(--site-radius);
  text-align: left; color: #fff;
  box-shadow: var(--shadow-card), inset 0 2px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.12);
  transition: transform var(--dur) ease, box-shadow var(--dur) ease;
  overflow: hidden;
}
.mini-game:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(122,74,22,.22); }
.mini-game:active { transform: scale(.98); }
.mini-orange { background: linear-gradient(140deg, var(--lumi-amber), var(--lumi-tangerine)); }
.mini-teal { background: linear-gradient(140deg, var(--lumi-sky), var(--lumi-teal-deep)); }
.mini-text { display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.mini-title { font-size: calc(19px * var(--site-type, 1)); font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.mini-sub { font-size: calc(12.5px * var(--site-type, 1)); font-weight: 700; opacity: .95; }
.mini-art { position: absolute; right: 12px; top: 12px; width: 56px; height: 56px; opacity: .95; }
.mini-art svg { width: 100%; height: 100%; }
.mini-play {
  align-self: flex-end;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #FFFDF8; color: var(--lumi-plum);
  font-size: 13px;
  box-shadow: 0 5px 12px rgba(0,0,0,.22);
  transition: transform var(--dur) ease;
}
.mini-game:hover .mini-play { transform: scale(1.12); }

/* ============ 星星面板 ============ */
.stars-panel {
  padding: calc(24px * var(--site-space, 1));
  border-radius: calc(var(--site-radius) + 2px);
  background:
    radial-gradient(280px 140px at 100% 0%, rgba(255, 201, 60, .3), transparent 70%),
    var(--site-surface);
  border: 1px solid var(--site-border);
  box-shadow: var(--shadow-card);
}
.stars-count { color: #B26A00; font-size: calc(15px * var(--site-type, 1)); white-space: nowrap; }
.star-row { display: flex; gap: 10px; margin: 6px 0 14px; }
.star-slot {
  font-size: calc(38px * var(--site-type, 1));
  line-height: 1;
  color: #EBDCC3;
  text-shadow: 0 2px 0 rgba(122,74,22,.08);
  transition: color var(--dur) ease, transform var(--dur) ease;
}
.star-slot.is-earned {
  color: var(--lumi-orange);
  text-shadow: 0 3px 10px rgba(255,159,28,.5);
}
.star-slot.pop { animation: starPop calc(600ms * var(--site-motion, 1)) cubic-bezier(.22,1.6,.36,1); }
@keyframes starPop { 0% { transform: scale(.3) rotate(-30deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }

.stars-hint { font-size: calc(14px * var(--site-type, 1)); color: var(--site-muted); }
.stars-hint strong { color: #B26A00; }
.stars-total { margin-top: 12px; font-size: calc(12.5px * var(--site-type, 1)); color: var(--site-muted); }
.stars-total strong { color: var(--site-fg); }

.sticker-pack {
  margin-top: 14px; padding: 14px;
  border-radius: 18px;
  background: linear-gradient(140deg, #FFF1C9, #FFE3EE 55%, #E3F4F7);
  border: 1.5px solid #F2D38A;
}
.sticker-title { font-weight: 900; color: #8A5A00; margin-bottom: 10px; }
.sticker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sticker-row li {
  display: grid; place-items: center;
  width: 46px; height: 46px; font-size: 24px;
  border-radius: 14px;
  background: #FFFDF8;
  border: 1px solid #F0E0C8;
  box-shadow: 0 3px 8px rgba(122,74,22,.12);
  animation: starPop calc(600ms * var(--site-motion, 1)) cubic-bezier(.22,1.6,.36,1) backwards;
}
.sticker-row li:nth-child(2) { animation-delay: 80ms; }
.sticker-row li:nth-child(3) { animation-delay: 160ms; }
.sticker-row li:nth-child(4) { animation-delay: 240ms; }
.sticker-row li:nth-child(5) { animation-delay: 320ms; }
.sticker-row li:nth-child(6) { animation-delay: 400ms; }

/* ============ 页脚 ============ */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: calc(16px * var(--site-space, 1)) calc(22px * var(--site-space, 1));
  border-radius: var(--site-radius);
  background: rgba(255, 253, 248, .7);
  border: 1px dashed var(--site-border);
}
.footer p { font-size: calc(12.5px * var(--site-type, 1)); color: var(--site-muted); max-width: 72ch; }

/* ============ 弹窗 ============ */
.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  padding: calc(26px * var(--site-space, 1));
  border: none;
  border-radius: calc(var(--site-radius) + 4px);
  background: var(--site-surface);
  color: var(--site-fg);
  box-shadow: var(--shadow-pop);
  overflow-y: auto;
  scrollbar-color: var(--lumi-orange) #F7E8CF;
}
.modal::backdrop { background: rgba(36, 27, 56, .5); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn calc(260ms * var(--site-motion, 1)) cubic-bezier(.22,1.4,.36,1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.96); } to { opacity: 1; transform: none; } }

.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.modal-mascot {
  display: grid; place-items: center;
  width: 54px; height: 54px; flex: none;
  border-radius: 18px;
  background: linear-gradient(140deg, #FFF1C9, #FFE29A);
  font-size: 26px;
}
.modal-mascot svg { width: 44px; height: 44px; }
.modal-mascot-teal { background: linear-gradient(140deg, #D8F2F6, #A8E0E9); }
.modal-heading { flex: 1; min-width: 0; }
.modal-heading .eyebrow { margin-bottom: 2px; }
.modal-heading h2 { font-size: calc(24px * var(--site-type, 1)); }
.modal-close { margin-left: auto; }

.quiz-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.quiz-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #EBDCC3;
  transition: background var(--dur) ease, transform var(--dur) ease;
}
.quiz-dot.is-current { background: var(--lumi-grape); transform: scale(1.25); box-shadow: 0 0 0 4px rgba(143,107,224,.2); }
.quiz-dot.is-done { background: var(--lumi-success); }

.quiz-body { display: flex; flex-direction: column; gap: 16px; }
.quiz-prompt { font-size: calc(19px * var(--site-type, 1)); font-weight: 800; text-align: center; }
.quiz-prompt small { display: block; font-size: calc(13.5px * var(--site-type, 1)); font-weight: 600; color: var(--site-muted); margin-top: 3px; }

.quiz-visual { display: grid; place-items: center; min-height: 96px; }
.color-swatch {
  width: 108px; height: 108px;
  border-radius: 32px;
  border: 4px solid #FFFDF8;
  box-shadow: 0 10px 24px rgba(55,42,77,.22), inset 0 -6px 0 rgba(0,0,0,.12);
  animation: modalIn calc(300ms * var(--site-motion, 1)) ease;
}
.quiz-emoji { font-size: 76px; line-height: 1; filter: drop-shadow(0 8px 12px rgba(55,42,77,.2)); animation: modalIn calc(300ms * var(--site-motion, 1)) ease; }
.letter-target {
  display: grid; place-items: center;
  width: 108px; height: 108px;
  border-radius: 30px;
  background: linear-gradient(140deg, var(--lumi-amber), var(--lumi-tangerine));
  color: #fff; font-size: 62px; font-weight: 900;
  text-shadow: 0 3px 0 rgba(160,90,0,.35);
  box-shadow: 0 10px 24px rgba(255,138,61,.4), inset 0 -5px 0 rgba(0,0,0,.12);
}

.quiz-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quiz-options.options-2 { grid-template-columns: repeat(2, 1fr); }
.quiz-options.options-letters { grid-template-columns: repeat(3, 1fr); }
.quiz-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 64px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 2.5px solid var(--site-border);
  background: #FFF8EC;
  font-weight: 800; font-size: calc(17px * var(--site-type, 1));
  transition: transform var(--dur) ease, border-color var(--dur) ease, background var(--dur) ease;
}
.quiz-opt:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--lumi-grape); background: #F6F0FF; }
.quiz-opt:disabled { cursor: default; opacity: .85; }
.quiz-opt .opt-sub { font-size: 12px; font-weight: 600; color: var(--site-muted); }
.quiz-opt .opt-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); }
.quiz-opt.is-correct { background: #E4F5E9; border-color: var(--lumi-success); color: #1D6B3C; animation: starPop calc(450ms * var(--site-motion, 1)) ease; }
.quiz-opt.is-wrong { background: #FBE7E7; border-color: var(--lumi-danger); color: #A33030; animation: shake calc(360ms * var(--site-motion, 1)) ease; }
.quiz-opt.is-letter { font-size: calc(30px * var(--site-type, 1)); min-height: 72px; }
.options-emoji .quiz-opt { font-size: calc(42px * var(--site-type, 1)); min-height: 84px; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }

.quiz-feedback {
  min-height: 28px;
  text-align: center;
  font-weight: 800; font-size: calc(16px * var(--site-type, 1));
}
.quiz-feedback.good { color: var(--lumi-success); }
.quiz-feedback.bad { color: var(--lumi-danger); }

.quiz-result { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 12px 0 4px; }
.result-star { font-size: 72px; animation: starPop calc(700ms * var(--site-motion, 1)) cubic-bezier(.22,1.6,.36,1); filter: drop-shadow(0 8px 16px rgba(255,159,28,.5)); }
.quiz-result h3 { font-size: calc(26px * var(--site-type, 1)); }
.quiz-result p { color: var(--site-muted); font-size: calc(15px * var(--site-type, 1)); }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* —— 儿歌 —— */
.song-tabs { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.song-tab {
  padding: 9px 18px;
  border-radius: 999px;
  border: 2px solid var(--site-border);
  background: #FFF8EC;
  font-weight: 800; font-size: calc(14px * var(--site-type, 1));
  transition: all var(--dur) ease;
}
.song-tab[aria-selected="true"] {
  background: linear-gradient(140deg, var(--lumi-sky), var(--lumi-teal-deep));
  border-color: transparent; color: #fff;
  box-shadow: 0 5px 12px rgba(27,122,143,.35);
}
.song-lyrics {
  display: flex; flex-direction: column; gap: 8px;
  counter-reset: line;
  padding: 16px;
  border-radius: 18px;
  background: #FFF8EC;
  border: 1.5px solid var(--site-border);
  margin-bottom: 14px;
}
.song-lyrics li {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: calc(16.5px * var(--site-type, 1)); font-weight: 700;
  color: #6B5847;
  transition: background var(--dur) ease, color var(--dur) ease, transform var(--dur) ease;
}
.song-lyrics li.is-active {
  background: linear-gradient(140deg, #FFE9B8, #FFD98A);
  color: #5C3A00;
  transform: scale(1.02);
  box-shadow: 0 4px 10px rgba(255,159,28,.25);
}
.song-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.song-note { margin-top: 12px; font-size: calc(12px * var(--site-type, 1)); color: var(--site-muted); }

.modal-confirm { width: min(440px, calc(100vw - 32px)); }
.modal-confirm h2 { font-size: calc(22px * var(--site-type, 1)); margin-bottom: 10px; }
.modal-confirm p { color: var(--site-muted); font-size: calc(14.5px * var(--site-type, 1)); }
.modal-confirm .result-actions { justify-content: flex-end; }

/* ============ Toast & 彩纸 ============ */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 150;
  transform: translateX(-50%);
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--lumi-plum);
  color: #FFF6E8;
  font-weight: 800; font-size: calc(14.5px * var(--site-type, 1));
  box-shadow: var(--shadow-pop);
  animation: toastIn calc(260ms * var(--site-motion, 1)) cubic-bezier(.22,1.4,.36,1);
  max-width: calc(100vw - 40px);
  text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

.confetti-layer { position: fixed; inset: 0; z-index: 140; pointer-events: none; overflow: hidden; }
.confetti {
  position: absolute; top: -20px;
  width: 12px; height: 12px;
  border-radius: 3px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-4vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(108vh) rotate(720deg); opacity: .7; }
}

.star-fly {
  position: fixed; z-index: 160;
  font-size: 30px; pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(255,159,28,.6));
  transition: transform calc(700ms * var(--site-motion, 1)) cubic-bezier(.3,.7,.4,1), opacity calc(700ms * var(--site-motion, 1)) ease;
}

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .col-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .word-panel { grid-row: span 2; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .sidebar {
    position: fixed; left: 10px; right: 10px; bottom: 10px; top: auto; z-index: 100;
    flex-direction: row; justify-content: space-between;
    min-height: 0; padding: 8px 12px;
    border-radius: 22px;
    box-shadow: 0 -6px 30px rgba(55,42,77,.18), var(--shadow-card);
  }
  .logo-mark { width: 42px; height: 42px; font-size: 22px; border-radius: 14px; }
  .side-nav { flex: 1; }
  .side-nav ul { flex-direction: row; justify-content: space-around; gap: 4px; }
  .side-nav a { width: auto; min-width: 52px; padding: 6px 8px; }
  .nav-ico { font-size: 19px; }
  .nav-label { font-size: 10px; }
  .coins { flex-direction: row; gap: 5px; min-width: 0; padding: 8px 12px; }
  .coins-count { font-size: 16px; }
  .page { padding-bottom: 84px; }
  .banner { grid-template-columns: 1fr; }
  .banner-art { min-height: 150px; }
  .mascot { width: 170px; }
  .banner h2 { font-size: calc(34px * var(--site-type, 1)); }
  .search { margin-left: 0; flex: 1 1 100%; order: 5; }
  .col-side { grid-template-columns: 1fr; }
  .word-panel { grid-row: auto; }
  .toast { bottom: 92px; }
}

@media (max-width: 560px) {
  .course-grid { grid-template-columns: 1fr; }
  .games-row { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: repeat(2, 1fr); }
  .quiz-options.options-letters { grid-template-columns: repeat(3, 1fr); }
  .word-actions { grid-template-columns: 1fr; }
  .profile-text p { display: none; }
  .chip-hearts { display: none; }
  .banner { padding: 24px 20px; }
  .modal { padding: 20px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

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