:root {
  --green-950: #173f2b;
  --green-800: #2f6845;
  --green-700: #3f7d52;
  --green-500: #69a969;
  --green-200: #cce7c8;
  --green-100: #e9f4e6;
  --cream: #fbf8ef;
  --paper: #fffdf8;
  --ink: #28342d;
  --muted: #718078;
  --yellow: #f5c960;
  --orange: #e9965a;
  --blue: #77b9cf;
  --pink: #e8a2a6;
  --red: #c85b5b;
  --line: #e5e9df;
  --shadow: 0 18px 45px rgba(44, 78, 54, 0.09);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 6%, rgba(245, 201, 96, 0.18), transparent 24rem),
    linear-gradient(180deg, #fbfaf4 0%, #f4f7ef 100%);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(63, 125, 82, 0.24);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 253, 248, 0.9);
  border-right: 1px solid rgba(47, 104, 69, 0.1);
  backdrop-filter: blur(18px);
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: var(--green-100); font-size: 27px; box-shadow: inset 0 0 0 1px rgba(63, 125, 82, 0.08);
}
.brand strong { display: block; font-size: 19px; color: var(--green-950); }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; letter-spacing: .08em; }

.nav-list { display: grid; gap: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px;
  border: 0; border-radius: 14px; color: #5e6b63; background: transparent; text-align: left; font-weight: 650;
  transition: .2s ease;
}
.nav-item span { font-size: 19px; }
.nav-item:hover { background: #f1f6ee; transform: translateX(2px); }
.nav-item.active { color: #fff; background: var(--green-700); box-shadow: 0 10px 24px rgba(63, 125, 82, .23); }

.sidebar-note {
  margin-top: auto; padding: 18px; border-radius: 18px; color: var(--green-950);
  background: linear-gradient(145deg, #e8f4e5, #f8f1d5); border: 1px solid rgba(63, 125, 82, .08);
}
.sidebar-note span, .sidebar-note small { display: block; color: var(--muted); font-size: 12px; }
.sidebar-note strong { display: block; margin: 5px 0; font-size: 23px; }

.main-area { min-width: 0; }
.topbar {
  height: 92px; padding: 20px 38px 12px; display: flex; align-items: center; justify-content: space-between;
}
.eyebrow, .section-kicker { margin: 0; color: var(--green-700); font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.topbar h1 { margin: 4px 0 0; color: var(--green-950); font-size: 26px; line-height: 1.1; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.offline-status { min-height: 38px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; color: #6d755f; background: rgba(255,255,255,.82); font-size: 11px; font-weight: 800; white-space: nowrap; }
.offline-status.ready { color: #2f6845; border-color: #bed8b8; background: #edf7e9; }
.offline-status.offline { color: #24677e; border-color: #b6dbe7; background: #edf8fb; }
.offline-status.error { color: #934646; border-color: #efd0cd; background: #fff3f1; }
.offline-status span { font-size: 14px; }
.sound-toggle { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green-800); background: rgba(255,255,255,.82); font-size: 19px; box-shadow: 0 5px 15px rgba(45,79,54,.06); transition: transform .16s ease, background .16s ease; }
.sound-toggle:hover { transform: translateY(-1px); background: #fff; }
.sound-toggle:focus-visible { outline: 3px solid rgba(63,125,82,.22); outline-offset: 2px; }
.child-chip { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid var(--line); }

main { padding: 14px 38px 48px; max-width: 1480px; margin: 0 auto; }
.view { display: none; animation: viewIn .28s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel { background: rgba(255, 253, 248, .92); border: 1px solid rgba(47, 104, 69, .09); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading.compact { align-items: flex-start; }
.panel-heading h3 { margin: 5px 0 0; font-size: 21px; color: var(--green-950); }
.progress-text { color: var(--green-700); font-size: 14px; font-weight: 800; }

.hero-card {
  position: relative; overflow: hidden; min-height: 218px; padding: 34px 38px; display: flex; align-items: center;
  border-radius: 32px; color: #fff;
  background: linear-gradient(120deg, #386f4b 0%, #5d9e62 62%, #9ec77c 100%);
  box-shadow: 0 22px 48px rgba(47, 104, 69, .18);
}
.hero-card::before, .hero-card::after { content:""; position:absolute; border-radius:50%; background:rgba(255,255,255,.08); }
.hero-card::before { width: 260px; height: 260px; right: 80px; bottom: -170px; }
.hero-card::after { width: 170px; height: 170px; right: -55px; top: -70px; }
.hero-copy { position: relative; z-index: 1; max-width: 670px; }
.hero-copy h2 { margin: 14px 0 10px; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.22; }
.hero-copy p { margin: 0 0 22px; color: rgba(255,255,255,.84); font-size: 15px; }
.hero-sun { position: absolute; right: 8%; top: 36px; font-size: 76px; filter: drop-shadow(0 12px 18px rgba(85,77,16,.18)); }

.soft-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 11px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: 12px; font-weight: 800; }
.hero-card .soft-badge { color: #fff; background: rgba(255,255,255,.16); }

.primary-button, .secondary-button, .ghost-button, .danger-button, .file-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 17px;
  border-radius: 13px; border: 0; font-weight: 750; transition: .18s ease; text-decoration: none;
}
.primary-button { color: #fff; background: var(--green-700); box-shadow: 0 8px 18px rgba(63,125,82,.2); }
.hero-card .primary-button { color: var(--green-950); background: #fff; box-shadow: none; }
.secondary-button { color: var(--green-800); background: var(--green-100); }
.ghost-button, .file-button { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.danger-button { color: #fff; background: var(--red); }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover, .danger-button:hover, .file-button:hover { transform: translateY(-2px); filter: brightness(.98); }
.text-button { padding: 4px; border: 0; color: var(--green-700); background: transparent; font-weight: 750; }
.round-button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--green-800); font-size: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stat-card { padding: 18px 20px; display: flex; align-items: center; gap: 13px; border-radius: 20px; border: 1px solid rgba(0,0,0,.04); background: rgba(255,255,255,.78); }
button.stat-card { color: var(--ink); text-align: left; cursor: pointer; }
button.stat-card:hover { border-color: #bfd5ba; background: #fff; }
.stat-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; font-size: 24px; }
.stat-card strong { display: block; font-size: 25px; line-height: 1; }
.stat-card small { display: block; margin-top: 5px; color: var(--muted); }
.stat-card.water .stat-icon { background: #e4f4fa; }
.stat-card.star .stat-icon { background: #fff3ce; }
.stat-card.english .stat-icon { background: #e7efff; }
.stat-card.work .stat-icon { background: #ece8fb; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .75fr); gap: 18px; }
.home-grid > *, .stack-panels, .tree-panel, .tree-wrap { min-width: 0; }
.tree-panel { padding: 24px; min-height: 590px; }
.tree-panel-status { display: grid; justify-items: end; gap: 3px; }
.tree-panel-status strong { color: var(--green-800); font-size: 13px; }
.tree-wrap { min-height: 410px; display: grid; place-items: center; }
.tree-svg { width: min(100%, 650px); height: auto; overflow: visible; }
.tree-branch { fill: none; stroke: #7d563b; stroke-width: 13; stroke-linecap: round; }
.tree-trunk { filter: drop-shadow(0 8px 5px rgba(76,55,35,.14)); }
.canopy-cloud { filter: drop-shadow(0 8px 8px rgba(43,99,54,.12)); transform-box: fill-box; transform-origin: center; animation: canopyIn .5s both; }
.tree-grown { transform-box: fill-box; transform-origin: center bottom; }
.tree-grown.mature { filter: drop-shadow(0 9px 10px rgba(35,88,47,.08)); }
.tree-flower, .tree-fruit { transform-box: fill-box; transform-origin: center; animation: bloomIn .45s both; }
.tree-sparkles { animation: sparkle 1s ease-in-out infinite alternate; }
.tree-water-count text { fill: var(--green-950); font-size: 17px; font-weight: 850; }
.tree-water-count text:first-of-type { font-size: 18px; }
.tree-svg.celebrating .tree-grown, .tree-svg.celebrating .sprout-stage { transform-box: fill-box; transform-origin: center bottom; animation: treeGrow .72s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes canopyIn { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
@keyframes bloomIn { from { opacity: 0; transform: scale(.1) rotate(-25deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes sparkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes treeGrow { from { opacity: .55; transform: scale(.78); } to { opacity: 1; transform: scale(1); } }
.branch-legend { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.tree-chapter { min-width: 0; padding: 9px; border: 1px solid #dce6d7; border-radius: 12px; background: #f8faf5; }
.tree-chapter.active { border-color: #8fbd8b; box-shadow: 0 0 0 2px rgba(91,151,96,.12); }
.tree-chapter.done { background: #eaf5e6; }
.tree-chapter > div:first-child { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; color: var(--green-800); font-size: 11px; }
.tree-chapter > div:first-child > span { width: 18px; flex: 0 0 18px; display: grid; place-items: center; font-size: 14px; }
.tree-day-dots { min-width: 127px; display: grid; grid-template-columns: repeat(5, 23px); gap: 3px; justify-content: space-between; }
.tree-day-dots button { width: 23px; min-width: 23px; height: 23px; min-height: 23px; padding: 0; border: 1px solid #d6dfd2; border-radius: 50%; color: #8a958c; background: #fff; font-size: 9px; font-weight: 800; line-height: 1; }
.tree-day-dots button.ready { color: #7b5d12; border-color: #e5c76e; background: #fff4c9; }
.tree-day-dots button.watered { color: #fff; border-color: #68aeca; background: #68aeca; }
.tree-day-dots button.current { box-shadow: 0 0 0 3px rgba(244,193,75,.34); }
.tree-day-dots button.locked { color: #9da59f; border-color: #e1e4de; background: #f1f2ee; font-size: 10px; cursor: not-allowed; }

.stack-panels { display: grid; gap: 18px; align-content: start; }
.today-preview, .project-preview { padding: 22px; }
.mini-task-list { display: grid; gap: 9px; margin-top: 18px; }
.mini-task { display: flex; gap: 10px; align-items: flex-start; padding: 11px; border-radius: 13px; background: #f7f7f1; }
.mini-task.done { opacity: .62; text-decoration: line-through; }
.mini-task span { font-size: 18px; }
.mini-task p { margin: 0; font-size: 13px; line-height: 1.5; }
.project-progress-card { margin-top: 16px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #f2ecff, #e9f5eb); }
.project-progress-card strong, .project-progress-card small { display: block; }
.project-progress-card small { margin-top: 5px; color: var(--muted); }
.tiny-track { height: 8px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.9); }
.tiny-track span { display: block; height: 100%; border-radius: inherit; background: var(--green-500); }

.day-toolbar { padding: 22px 26px; display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; text-align: center; }
.practice-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.shortcut-card { display: grid; grid-template-columns: 42px 1fr 20px; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: rgba(255,255,255,.8); text-align: left; }
.shortcut-card > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--green-100); font-size: 22px; }
.shortcut-card strong, .shortcut-card small { display: block; }
.shortcut-card small { margin-top: 3px; color: var(--muted); }
.shortcut-card b { color: var(--green-700); font-size: 18px; }
.day-toolbar h2 { margin: 3px 0; font-size: 26px; }
.day-toolbar p { margin: 0; color: var(--muted); }
.day-progress { margin: 16px 0; padding: 17px 22px; display: flex; align-items: center; gap: 24px; }
.day-progress-copy { min-width: 190px; }
.day-progress-copy strong, .day-progress-copy span { display: block; }
.day-progress-copy span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.progress-track { flex: 1; height: 12px; overflow: hidden; border-radius: 999px; background: #edf0e8; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-500), var(--yellow)); transition: width .3s ease; }
.day-progress .progress-track { order: 2; }
.claim-all-button { order: 3; min-height: 40px; padding: 9px 13px; border: 1px solid #9fcfe0; border-radius: 12px; color: #24677e; background: #e8f7fc; font-size: 12px; font-weight: 850; white-space: nowrap; }

.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.task-card { position: relative; min-height: 160px; padding: 22px; border-radius: 22px; background: rgba(255,255,255,.86); border: 1px solid var(--line); transition: .2s ease; }
.task-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(45,79,54,.08); }
.task-card.checked { background: #f0f7ed; border-color: #bcd8b8; }
.task-card.locked { min-height: 160px; border-style: dashed; background: #f4f4ef; box-shadow: none; }
.task-card.locked:hover { transform: none; box-shadow: none; }
.task-card.locked .task-type, .task-card.locked p { color: #8b948e; }
.task-card.locked .task-type span { filter: grayscale(1); opacity: .62; }
.task-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-type { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 800; color: var(--green-800); }
.task-type span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--green-100); font-size: 19px; }
.task-card p { margin: 15px 0 0; color: #48564d; line-height: 1.65; }
.task-card.has-practice p { padding-right: 96px; }
.task-launch-button {
  position: absolute; right: 20px; bottom: 18px; min-height: 34px; padding: 7px 11px; border: 0; border-radius: 11px;
  color: #fff; background: var(--green-700); font-size: 12px; font-weight: 800; box-shadow: 0 7px 15px rgba(63,125,82,.17);
}
.task-launch-button:disabled { color: #818a84; background: #e1e4df; box-shadow: none; cursor: not-allowed; }
.task-result { position: absolute; left: 22px; bottom: 20px; color: var(--green-700); font-size: 11px; font-weight: 800; }
.evidence-task-status { display: inline-flex; margin-top: 10px; padding: 5px 8px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.evidence-task-status.pending { color: #755a13; background: #fff2c8; }
.evidence-task-status.approved { color: #2f6d40; background: #e1f1dd; }
.evidence-task-status.redo { color: #904545; background: #fae5e2; }
.check-button { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #cdd5cb; color: transparent; background: #fff; font-size: 20px; font-weight: 900; }
.check-button:disabled { border-color: #dfe2dd; color: #9ba39e; background: #eceeea; cursor: not-allowed; font-size: 13px; }
.task-card.checked .check-button { color: #fff; border-color: var(--green-700); background: var(--green-700); }
.task-card.habit { grid-column: span 2; min-height: auto; }
.checklist-section-title { margin: 22px 2px 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.checklist-section-title h3 { margin: 5px 0 0; color: var(--green-950); font-size: 20px; }
.checklist-section-title > span { color: var(--muted); font-size: 12px; }
.task-reward-line { min-height: 31px; margin-top: 12px; display: flex; align-items: center; }
.claim-drop-button { min-height: 31px; padding: 6px 10px; border: 1px solid #9fcfe0; border-radius: 10px; color: #24677e; background: #e8f7fc; font-size: 11px; font-weight: 850; }
.reward-claimed, .reward-waiting { display: inline-flex; align-items: center; min-height: 28px; color: #33708a; font-size: 11px; font-weight: 800; }
.reward-waiting { color: var(--muted); font-weight: 650; }
.personal-checklist { margin-top: 18px; padding: 23px; }
.personal-checklist .panel-heading small { display: block; margin-top: 5px; color: var(--muted); }
.personal-heading-actions { display: flex; align-items: center; gap: 10px; }
.personal-heading-actions .secondary-button { min-height: 38px; padding: 8px 12px; }
.personal-task-list { display: grid; gap: 9px; margin-top: 15px; }
.personal-task-row { min-height: 58px; padding: 9px 10px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto 32px; gap: 10px; align-items: center; border: 1px solid #e1e6dc; border-radius: 13px; background: #fff; }
.personal-task-row.done { border-color: #bed8b8; background: #f0f7ed; }
.personal-task-row.claimed { opacity: .78; }
.personal-check-button { width: 36px; height: 36px; border: 2px solid #cbd5c8; border-radius: 50%; color: transparent; background: #fff; font-size: 19px; font-weight: 900; }
.personal-task-row.done .personal-check-button { color: #fff; border-color: var(--green-700); background: var(--green-700); }
.personal-task-title { min-width: 0; padding: 4px 0; display: flex; align-items: center; gap: 2px; overflow-wrap: anywhere; border: 0; color: var(--ink); background: transparent; text-align: left; font-weight: 750; }
.personal-task-icon { display: inline-block; margin-right: 7px; font-size: 18px; vertical-align: -1px; }
.personal-task-audio { margin-left: 5px; color: #4e8194; font-size: 12px; opacity: .72; }
.personal-task-title.speaking { color: #356f86; }
.personal-task-row.done .personal-task-title { color: var(--green-800); }
.personal-task-reward { color: #33708a; font-size: 12px; font-weight: 850; }
.personal-delete-button, .reward-delete-button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: #8b9690; background: #f1f3ef; font-size: 19px; }
.personal-delete-button:disabled { opacity: .3; cursor: not-allowed; }
.personal-empty { padding: 18px; color: var(--muted); border: 1px dashed #d8dfd4; border-radius: 13px; text-align: center; font-size: 13px; }
.personal-empty strong, .personal-empty span { display: block; }
.personal-empty strong { margin-bottom: 5px; color: var(--green-800); }
.task-lock-note { display: inline-flex; align-items: center; margin-top: 13px; color: #7d8780; font-size: 12px; font-weight: 750; }
.day-locked-state { grid-column: 1 / -1; min-height: 330px; padding: 46px 24px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; border: 2px dashed #d5dbd1; border-radius: 22px; background: rgba(255,255,255,.68); }
.day-locked-state > span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: #ecefe9; font-size: 28px; }
.day-locked-state strong { margin-top: 16px; color: var(--green-950); font-size: 21px; }
.day-locked-state p { max-width: 520px; margin: 8px 0 20px; color: var(--muted); line-height: 1.65; }

.day-finish { margin-top: 16px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.day-finish h3 { margin: 5px 0 4px; }
.day-finish p { margin: 0; color: var(--muted); }
.finish-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.star-button { min-height: 42px; padding: 10px 16px; border-radius: 13px; border: 1px solid #e8cf88; color: #9b7420; background: #fff8dd; font-weight: 750; }
.star-button.active { color: #6c4d00; background: var(--yellow); }

.reward-hero { min-height: 170px; padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 22px; background: #fff9e8; }
.reward-hero h2 { margin: 13px 0 7px; color: var(--green-950); font-size: 31px; }
.reward-hero p { margin: 0; color: var(--muted); line-height: 1.6; }
.reward-hero-icon { font-size: 68px; }
.reward-wallet-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin: 16px 0; }
.reward-wallet-grid article { min-height: 92px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.86); }
.reward-wallet-grid article > span { font-size: 31px; }
.reward-wallet-grid strong, .reward-wallet-grid small { display: block; }
.reward-wallet-grid strong { color: var(--green-950); font-size: 27px; }
.reward-wallet-grid small { margin-top: 4px; color: var(--muted); }
.exchange-panel { padding: 23px 25px; display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,.8fr); gap: 26px; align-items: center; }
.exchange-panel h3 { margin: 6px 0; color: var(--green-950); }
.exchange-panel p { margin: 0; color: var(--muted); }
.exchange-action { display: grid; grid-template-columns: minmax(120px,1fr) auto; gap: 14px; align-items: center; }
.exchange-action .tiny-track { margin-top: 0; background: #edf0e8; }
.exchange-action small { display: block; margin-top: 5px; color: var(--muted); text-align: right; }
.exchange-reserve-hint { color: #39724a !important; font-weight: 750; }
.reward-store-section { margin-top: 25px; }
.reward-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.reward-section-heading h2 { margin: 5px 0 13px; color: var(--green-950); font-size: 26px; }
.parent-managed-badge { margin-bottom: 13px; padding: 6px 9px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: 10px; font-weight: 800; }
.reward-add-form { margin-top: 15px; padding: 17px 18px; display: grid; grid-template-columns: 120px minmax(220px,1fr) 130px auto; gap: 12px; align-items: end; border: 1px solid var(--line); border-radius: 15px; background: #f5f7f1; }
.reward-add-form label { display: grid; gap: 6px; color: var(--green-950); font-size: 12px; font-weight: 750; }
.reward-store-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-top: 14px; }
.reward-store-card { position: relative; min-height: 205px; padding: 20px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.9); }
.reward-store-icon { font-size: 43px; }
.reward-store-card h3 { margin: 14px 0 18px; color: var(--green-950); font-size: 17px; line-height: 1.45; }
.reward-delete-button { position: absolute; top: 12px; right: 12px; }
.reward-store-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reward-store-footer strong { color: #8a6413; font-size: 17px; }
.reward-store-footer .primary-button { min-height: 36px; padding: 7px 12px; }
.reward-history { margin-top: 18px; padding: 23px; }
.reward-purchase-list { display: grid; gap: 9px; margin-top: 16px; }
.personal-history-list { display: grid; gap: 10px; margin-top: 16px; }
.personal-history-day { min-height: 66px; padding: 12px 14px; display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 15px; align-items: start; border-bottom: 1px solid #e5e9e1; }
.personal-history-day:last-child { border-bottom: 0; }
.personal-history-day strong, .personal-history-day small { display: block; }
.personal-history-day small { margin-top: 4px; color: var(--muted); }
.personal-history-tasks { display: flex; gap: 7px; flex-wrap: wrap; }
.personal-history-tasks span { padding: 6px 9px; border-radius: 9px; color: var(--muted); background: #f2f3ef; font-size: 11px; }
.personal-history-tasks span.done { color: var(--green-800); background: #eaf4e6; }
.reward-purchase-row { min-height: 66px; padding: 11px 13px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 12px; align-items: center; border: 1px solid #e2e6dd; border-radius: 13px; background: #fff; }
.reward-purchase-row > span:first-child { font-size: 27px; }
.reward-purchase-row strong, .reward-purchase-row small { display: block; }
.reward-purchase-row small { margin-top: 4px; color: var(--muted); }
.reward-purchase-row.fulfilled { opacity: .68; background: #f1f6ee; }
.purchase-status { color: var(--green-700); font-size: 12px; font-weight: 850; }
.purchase-status.pending { color: #8b6a1c; }

.studio-hero { padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, #f0f6e9, #fff7dd); }
.studio-hero h2 { margin: 14px 0 7px; font-size: 30px; }
.studio-hero p { margin: 0; color: var(--muted); }
.studio-mascots { font-size: 54px; letter-spacing: 10px; }
.project-tabs { display: flex; gap: 10px; margin: 18px 0; overflow-x: auto; }
.project-tab { min-width: 220px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.74); font-weight: 800; }
.project-tab.active { color: #fff; border-color: var(--green-700); background: var(--green-700); }
.studio-grid { display: grid; grid-template-columns: minmax(280px, .65fr) minmax(0, 1.35fr); gap: 18px; }
.phase-list-panel, .phase-detail-panel { padding: 23px; }
.phase-list { display: grid; gap: 9px; margin-top: 18px; }
.phase-item { display: grid; grid-template-columns: 34px 1fr 22px; gap: 10px; align-items: center; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 14px; text-align: left; background: #f7f7f1; color: var(--ink); }
.phase-item:hover, .phase-item.active { border-color: #b9d4b5; background: var(--green-100); }
.phase-item.done { color: var(--green-800); }
.phase-item.locked { color: #919a94; background: #f1f2ee; cursor: not-allowed; }
.phase-item.locked:hover { border-color: transparent; background: #f1f2ee; }
.phase-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--green-800); background: #fff; font-weight: 800; }
.phase-item.locked .phase-index { color: #929a95; font-size: 11px; }
.phase-item.done .phase-index { color: #fff; background: var(--green-700); }
.phase-item small { display: block; margin-top: 2px; color: var(--muted); }
.phase-check { font-weight: 900; color: var(--green-700); }
.phase-detail-header h3 { margin: 12px 0 6px; font-size: 27px; }
.phase-detail-header p { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
.field-label { display: block; margin: 17px 0 7px; color: var(--green-950); font-size: 13px; font-weight: 800; }
.prompt-box, .notes-box, input, select, textarea {
  width: 100%; border: 1px solid #dfe5da; border-radius: 13px; color: var(--ink); background: #fff; transition: .15s ease;
}
.prompt-box, .notes-box, textarea { padding: 14px; resize: vertical; line-height: 1.6; }
.prompt-box { min-height: 190px; background: #f7f7f1; }
.notes-box { min-height: 130px; }
input, select { height: 44px; padding: 0 12px; }
.inline-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.inline-actions.spread { justify-content: space-between; }
.inline-actions.wrap { flex-wrap: wrap; }
.ai-chat-panel { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.ai-chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ai-chat-heading h4 { margin: 4px 0 0; color: var(--green-950); font-size: 19px; }
.ai-chat-heading-actions { display: flex; align-items: center; gap: 10px; }
.ai-chat-heading-actions a { color: var(--muted); font-size: 11px; }
.ai-chat-state { padding: 6px 9px; border-radius: 999px; color: #795b0e; background: #fff1bd; font-size: 10px; font-weight: 850; white-space: nowrap; }
.ai-chat-state.connected { color: var(--green-800); background: var(--green-100); }
.ai-chat-state.error { color: #934646; background: #fae7e4; }
.ai-chat-messages { min-height: 210px; max-height: 430px; margin-top: 14px; padding: 15px 3px; display: grid; align-content: start; gap: 13px; overflow-y: auto; border-block: 1px solid #edf0e9; }
.ai-chat-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); text-align: center; }
.ai-chat-empty > span { font-size: 38px; }
.ai-chat-empty strong { color: var(--green-950); }
.ai-chat-empty p { margin: 0; font-size: 12px; }
.ai-chat-message { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 9px; align-items: start; }
.ai-chat-message > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green-100); }
.ai-chat-message > div { width: fit-content; max-width: min(88%, 680px); padding: 11px 13px; border-radius: 4px 14px 14px; background: #eff6eb; }
.ai-chat-message.user > div { justify-self: end; border-radius: 14px 4px 14px 14px; background: #fff2c9; }
.ai-chat-message.user { grid-template-columns: minmax(0,1fr) 34px; }
.ai-chat-message.user > span { grid-column: 2; }
.ai-chat-message.user > div { grid-column: 1; grid-row: 1; }
.ai-chat-message strong { color: var(--green-800); font-size: 11px; }
.ai-chat-message p { margin: 4px 0 0; color: #3f4e45; font-size: 14px; line-height: 1.65; }
.chat-speak-button { margin-top: 8px; padding: 5px 8px; border: 1px solid #ceddca; border-radius: 8px; color: var(--green-700); background: #fff; font-size: 10px; font-weight: 750; }
.chat-speak-button.speaking { border-color: #75a9c1; background: #e8f5fa; }
.ai-chat-compose { margin-top: 14px; }
.ai-chat-compose > label { display: block; margin-bottom: 6px; color: var(--green-950); font-size: 12px; font-weight: 800; }
.ai-chat-compose textarea { min-height: 90px; padding: 12px; resize: vertical; }
.ai-chat-compose-actions, .ai-chat-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 9px; }
.ai-chat-tools { justify-content: space-between; }

.gallery-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.gallery-header h2 { margin: 6px 0 0; font-size: 29px; }
.work-form { padding: 22px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid label, .settings-form label { display: grid; gap: 7px; color: var(--green-950); font-size: 13px; font-weight: 750; }
.form-grid .full-width { grid-column: 1 / -1; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.work-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.85); box-shadow: 0 10px 25px rgba(45,79,54,.06); }
.work-cover { height: 145px; display: grid; place-items: center; background: linear-gradient(145deg, #e6f3df, #fff0c9); font-size: 54px; }
.work-card-body { padding: 18px; }
.work-card-body h3 { margin: 6px 0; }
.work-card-body p { min-height: 42px; margin: 0 0 14px; color: var(--muted); line-height: 1.5; font-size: 13px; }
.work-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.work-actions { display: flex; gap: 8px; margin-top: 12px; }
.mini-button { padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 11px; }
.empty-state { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); border: 2px dashed #dce4d8; border-radius: 24px; }
.empty-state span { display: block; margin-bottom: 10px; font-size: 52px; }

.parent-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.settings-card { padding: 23px; }
.settings-card.full-span { grid-column: 1 / -1; }
.settings-form { display: grid; gap: 13px; margin-top: 18px; }
.task-edit-form textarea { min-height: 82px; }
.admin-card { border-color: rgba(47,104,69,.2); }
.admin-state { min-width: 64px; padding: 6px 10px; border-radius: 999px; color: #7a5a28; background: #fff0c9; text-align: center; font-size: 12px; font-weight: 800; }
.admin-state.unlocked { color: var(--green-800); background: var(--green-100); }
.admin-lock { margin-top: 18px; padding: 18px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 12px; border-radius: 16px; background: #f5f6f1; }
.admin-lock label, .admin-control-block label { display: grid; gap: 7px; color: var(--green-950); font-size: 13px; font-weight: 750; }
.admin-lock label small { color: var(--muted); font-size: 11px; font-weight: 500; }
.admin-controls { margin-top: 18px; }
.admin-unlock-bar { min-height: 48px; padding: 9px 12px 9px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 14px; color: var(--green-800); background: var(--green-100); font-size: 13px; font-weight: 700; }
.admin-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.admin-control-block { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.admin-control-block > button { margin-top: 12px; }
.admin-control-block label + label { margin-top: 10px; }
.admin-danger-zone { margin-top: 14px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #efd0cd; border-radius: 16px; background: #fff7f6; }
.admin-danger-zone strong { color: #8f3e3e; }
.admin-danger-zone p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.admin-danger-zone .danger-button { flex: 0 0 auto; }
.task-library-admin-locked { margin-top: 15px; padding: 13px 15px; border-radius: 13px; color: #755a13; background: #fff4d1; font-size: 12px; text-align: center; }
.task-library-admin-form { margin-top: 16px; display: grid; grid-template-columns: 110px 180px minmax(220px,1fr) 120px; gap: 12px; align-items: end; }
.task-library-admin-form label, .task-library-admin-toolbar label { display: grid; gap: 6px; color: var(--green-950); font-size: 12px; font-weight: 750; }
.task-library-admin-title { grid-column: span 2; }
.task-library-admin-detail { grid-column: span 3; }
.task-library-admin-form-actions { grid-column: 1 / -1; }
.task-library-admin-toolbar { margin-top: 18px; padding: 13px; display: grid; grid-template-columns: 190px minmax(220px,1fr) auto; gap: 10px; align-items: end; border-radius: 14px; background: #f3f6ee; }
.task-library-admin-list { max-height: 620px; margin-top: 12px; display: grid; gap: 8px; overflow-y: auto; padding-right: 3px; }
.task-library-admin-row { min-height: 84px; padding: 12px 13px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.task-library-admin-row.disabled { background: #f2f3ef; opacity: .68; }
.task-library-admin-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--green-100); font-size: 23px; }
.task-library-admin-copy h4 { margin: 0; color: var(--green-950); font-size: 14px; }
.task-library-admin-copy p { margin: 4px 0 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.task-library-admin-copy > div { display: flex; flex-wrap: wrap; gap: 6px; }
.task-library-admin-copy > div span { padding: 3px 6px; border-radius: 7px; color: #55705f; background: #edf4e9; font-size: 9px; font-weight: 750; }
.task-library-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.task-library-admin-actions .mini-button { min-height: 31px; }
.task-library-admin-actions .mini-button.danger { color: #a34949; border-color: #efd0cd; background: #fff7f6; }
.parent-overview-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.parent-overview-grid > div { min-height: 92px; padding: 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-content: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.parent-overview-grid > div > span { grid-row: span 2; align-self: center; font-size: 26px; }
.parent-overview-grid strong, .parent-overview-grid small { display: block; }
.parent-overview-grid strong { color: var(--green-950); font-size: 20px; }
.parent-overview-grid small { color: var(--muted); font-size: 10px; }
#view-parent.parent-locked .parent-grid > article:not(.admin-card) { display: none !important; }
#view-parent.parent-locked .admin-card { grid-column: 1 / -1; width: min(640px,100%); margin: 8vh auto 0; }
.parent-reward-section { margin-top: 18px; }
.parent-reward-section h4 { margin: 0 0 9px; color: var(--green-950); }
.parent-reward-store-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.parent-reward-manage-row { min-height: 66px; padding: 10px 12px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.parent-reward-manage-row > span { font-size: 25px; }
.parent-reward-manage-row strong, .parent-reward-manage-row small { display: block; }
.parent-reward-manage-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.parent-reward-manage-row .mini-button.danger { color: #a34949; border-color: #efd0cd; background: #fff7f6; }
.notice-box { margin-top: 15px; padding: 17px; border-radius: 15px; background: #f3f7ee; color: var(--green-950); }
.notice-box p { margin: 6px 0 0; color: var(--muted); line-height: 1.65; }
.file-button input { display: none; }
.evidence-review-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.evidence-review-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.evidence-review-photo { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: #edf0ea; }
.evidence-review-photo img { width: 100%; height: 100%; object-fit: contain; }
.evidence-review-photo span { color: var(--muted); font-size: 13px; }
.evidence-review-body { padding: 14px; }
.evidence-review-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evidence-review-meta small { color: var(--muted); }
.evidence-review-body h4 { margin: 10px 0; color: var(--green-950); font-size: 15px; line-height: 1.55; }
.evidence-status { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.evidence-status.pending { color: #755a13; background: #fff2c8; }
.evidence-status.approved { color: #2f6d40; background: #e1f1dd; }
.evidence-status.redo { color: #904545; background: #fae5e2; }
.evidence-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.evidence-review-actions button { flex: 1; min-width: 100px; }
.evidence-review-locked { grid-column: 1 / -1; padding: 13px 15px; border-radius: 13px; color: #755a13; background: #fff4d1; text-align: center; font-size: 12px; }
.evidence-ai-summary { margin-top: 12px; padding: 12px 13px; border-radius: 12px; color: #526158; background: #f3f6f0; font-size: 12px; line-height: 1.55; }
.evidence-ai-summary.pass { color: #285c37; background: #e7f5e4; }
.evidence-ai-summary.redo { color: #864242; background: #fae8e5; }
.evidence-ai-summary strong { display: block; margin-bottom: 4px; }
.evidence-ai-summary p { margin: 0; }
.evidence-ai-summary ul { margin: 7px 0 0; padding-left: 18px; }
.ai-review-settings-form { margin-top: 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.ai-review-settings-form label { display: grid; gap: 7px; color: var(--green-950); font-size: 13px; font-weight: 750; }
.ai-review-settings-form label small { color: var(--muted); font-size: 11px; font-weight: 500; }
.ai-review-settings-form .ai-key-field, .ai-review-settings-form .inline-actions { grid-column: 1 / -1; }
.ai-review-switch { grid-column: 1 / -1; display: flex !important; align-items: center; grid-template-columns: auto 1fr; padding: 12px 14px; border-radius: 13px; background: #f2f6ee; }
.ai-review-switch input { width: 20px; height: 20px; }
.ai-connection-state { padding: 6px 10px; border-radius: 999px; color: #7a5a28; background: #fff0c9; font-size: 12px; font-weight: 800; }
.ai-connection-state.connected { color: #2f6d40; background: #e1f1dd; }

.library-hero { padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, #edf6e8, #fff4d6); }
.library-hero.wrong-hero { background: linear-gradient(135deg, #f3edff, #fff3d6); }
.library-hero h2 { margin: 12px 0 6px; font-size: 30px; }
.library-hero p { margin: 0; color: var(--muted); }
.library-hero-icon { font-size: 62px; }
.library-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.library-stat { padding: 17px 19px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.82); }
.library-stat > span { font-size: 27px; }
.library-stat strong, .library-stat small { display: block; }
.library-stat strong { color: var(--green-800); font-size: 25px; }
.library-stat small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.library-toolbar { padding: 17px 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-row label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.filter-row select { min-width: 160px; }
.wrong-list, .bank-question-list { display: grid; gap: 12px; margin-top: 16px; }
.wrong-card, .bank-question-card { padding: 19px 21px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.86); }
.wrong-card.mastered { opacity: .72; background: #eff6eb; }
.wrong-card-head, .bank-question-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.wrong-card h3, .bank-question-card h3 { margin: 8px 0; color: var(--green-950); font-size: 18px; line-height: 1.55; }
.wrong-meta, .bank-question-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.tiny-badge { padding: 5px 8px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: 11px; font-weight: 800; }
.wrong-answer-box { margin: 12px 0; padding: 12px 14px; border-radius: 13px; background: #fbebea; color: #7e4141; line-height: 1.6; font-size: 13px; }
.wrong-answer-box strong { color: #356843; }
.wrong-card-actions { display: flex; gap: 9px; justify-content: flex-end; }
.bank-question-card p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.wrong-mini-visual { margin: 10px 0; padding: 10px 13px; display: flex; gap: 9px; flex-wrap: wrap; border-radius: 13px; background: linear-gradient(135deg, #edf5e8, #fff5dc); }
.wrong-mini-visual span { min-width: 35px; min-height: 35px; display: grid; place-items: center; padding: 4px; border-radius: 10px; background: rgba(255,255,255,.72); font-size: 21px; font-weight: 800; }
.wrong-mini-visual img { width: min(260px, 100%); max-height: 120px; object-fit: cover; border-radius: 10px; }
.primary-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.primary-button.watered { color: #356843; background: #dcefd8; box-shadow: none; }

.mobile-nav { display: none; }
.watering-overlay { position: fixed; inset: 0; z-index: 320; padding: 22px; display: grid; place-items: center; background: rgba(25,59,39,.64); backdrop-filter: blur(10px); }
.watering-card { width: min(760px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.45); border-radius: 26px; background: #fffdf8; box-shadow: 0 32px 90px rgba(13,43,27,.3); }
.watering-garden { position: relative; height: min(54vh, 430px); min-height: 320px; overflow: hidden; background: #e6f3ed; }
.watering-tree-preview { width: 100%; height: 100%; display: grid; place-items: center; }
.watering-tree-preview .tree-svg { width: min(100%, 650px); max-height: 100%; }
.watering-can { position: absolute; z-index: 4; top: 34px; right: 4%; width: 145px; transform: rotate(5deg); transform-origin: 78% 42%; filter: drop-shadow(0 10px 8px rgba(83,57,22,.18)); }
.watering-can svg { display: block; width: 100%; }
.watering-drops { position: absolute; z-index: 3; top: 105px; right: 22%; width: 90px; height: 170px; transform: rotate(14deg); opacity: 0; }
.watering-drops i { position: absolute; top: 0; width: 13px; height: 18px; border-radius: 60% 60% 65% 65%; background: #65b8db; transform: rotate(15deg); opacity: 0; }
.watering-drops i:nth-child(1) { left: 5px; }
.watering-drops i:nth-child(2) { left: 25px; animation-delay: .16s; }
.watering-drops i:nth-child(3) { left: 45px; animation-delay: .31s; }
.watering-drops i:nth-child(4) { left: 13px; animation-delay: .47s; }
.watering-drops i:nth-child(5) { left: 55px; animation-delay: .62s; }
.watering-overlay.pouring .watering-can { animation: canPour 1.35s ease-in-out both; }
.watering-overlay.pouring .watering-drops { opacity: 1; }
.watering-overlay.pouring .watering-drops i { animation-name: dropFall; animation-duration: .72s; animation-timing-function: ease-in; animation-iteration-count: 2; }
.watering-overlay.grown .watering-can, .watering-overlay.grown .watering-drops { opacity: 0; transition: opacity .22s ease; }
.watering-copy { padding: 22px 26px 25px; text-align: center; }
.watering-copy h2 { margin: 10px 0 6px; color: var(--green-950); font-size: 28px; }
.watering-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
@keyframes canPour { 0% { transform: rotate(5deg) translateY(0); } 24%, 76% { transform: rotate(-27deg) translate(-18px, 15px); } 100% { transform: rotate(5deg) translateY(0); } }
@keyframes dropFall { 0% { opacity: 0; transform: translateY(0) scale(.65) rotate(15deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(145px) scale(1) rotate(15deg); } }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); padding: 12px 18px;
  border-radius: 999px; color: #fff; background: rgba(23,63,43,.94); box-shadow: 0 12px 35px rgba(0,0,0,.18);
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: .24s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.quiz-overlay, .fun-overlay, .task-library-overlay {
  position: fixed; inset: 0; z-index: 200; padding: 20px; display: grid; place-items: center;
  background: rgba(20, 49, 33, .58); backdrop-filter: blur(9px);
}
.task-library-shell { width: min(900px, 100%); max-height: calc(100vh - 40px); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; border-radius: 28px; background: var(--cream); box-shadow: 0 32px 80px rgba(15,40,25,.28); }
.task-library-header { padding: 20px 24px 16px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.task-library-header h2 { margin: 4px 0 0; color: var(--green-950); font-size: 25px; }
.task-library-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: #fff0bd; font-size: 29px; }
.task-library-toolbar { padding: 13px 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; background: #f3f6ee; }
.task-library-toolbar label { min-width: 220px; display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.task-library-content { min-height: 0; overflow-y: auto; padding: 18px 24px; }
.task-library-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.task-library-card { min-height: 190px; padding: 17px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.task-library-card.added { border-color: #bcd8b8; background: #f0f7ed; }
.task-library-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-library-card-icon { font-size: 27px; }
.task-library-card-tools { display: flex; align-items: center; gap: 7px; }
.task-library-speak-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #c9dde4; border-radius: 50%; color: #386f84; background: #edf7fa; font-size: 15px; }
.task-library-speak-button.speaking { background: #d8eff7; box-shadow: 0 0 0 3px rgba(117,169,193,.14); }
.task-library-category { padding: 5px 8px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: 10px; font-weight: 800; }
.task-library-card h3 { margin: 11px 0 5px; color: var(--green-950); font-size: 17px; line-height: 1.45; }
.task-library-card p { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.task-library-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-library-card-footer > span { color: var(--muted); font-size: 11px; }
.task-library-card-footer button { min-height: 36px; padding: 7px 10px; font-size: 11px; }
.task-library-footer { min-height: 68px; padding: 13px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); background: rgba(255,253,248,.96); }
.task-library-footer span { color: var(--muted); font-size: 12px; }
.quiz-shell {
  width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-radius: 30px; background: var(--cream); box-shadow: 0 32px 80px rgba(15,40,25,.28);
}
.quiz-header { padding: 20px 24px 14px; display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; }
.quiz-heading h2 { margin: 3px 0 0; color: var(--green-950); font-size: 23px; }
.quiz-score { min-width: 62px; padding: 8px 12px; border-radius: 999px; color: #72540b; background: #fff1bd; text-align: center; font-weight: 850; }
.quiz-progress { height: 7px; background: #e7ecdf; }
.quiz-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--green-500), var(--yellow)); transition: width .25s ease; }
.quiz-content { min-height: 0; overflow-y: auto; padding: 22px 28px; }
.mission-banner { margin-bottom: 16px; padding: 14px 17px; display: grid; grid-template-columns: 52px 1fr auto; gap: 13px; align-items: center; border-radius: 18px; background: linear-gradient(135deg, #fff2c7, #e8f4e5); border: 1px solid #e8dfbd; }
.mission-emoji { font-size: 38px; }
.mission-banner h3 { margin: 3px 0; color: var(--green-950); }
.mission-banner p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mission-energy { padding: 8px 11px; border-radius: 999px; color: #795b0e; background: #fff; font-weight: 850; white-space: nowrap; }
.passage-card { margin-bottom: 16px; padding: 19px 21px; border-radius: 19px; background: #eef5e9; border: 1px solid #d8e7d2; }
.passage-card h3 { margin: 7px 0 8px; color: var(--green-950); }
.passage-card p { margin: 0; color: #47564c; line-height: 1.9; }
.question-card { padding: 25px; border-radius: 23px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(45,79,54,.06); }
.question-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.question-card h3 { margin: 20px 0; color: var(--green-950); font-size: clamp(21px, 3vw, 29px); line-height: 1.55; }
.question-visual { min-height: 112px; margin-top: 16px; padding: 18px; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 4vw, 30px); overflow: hidden; border-radius: 20px; background: linear-gradient(145deg, #eaf4e4, #fff4d8); border: 1px solid #dfe8d7; }
.question-visual span { display: inline-grid; place-items: center; min-width: 56px; min-height: 56px; padding: 7px; border-radius: 18px; background: rgba(255,255,255,.75); box-shadow: 0 8px 18px rgba(45,79,54,.08); font-size: clamp(27px, 5vw, 46px); font-weight: 850; }
.stroke-svg { display: block; width: 58px; height: 58px; color: var(--green-950); overflow: visible; }
.stroke-svg path { fill: none; stroke: currentColor; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.question-visual span.stroke-visual { min-width: 76px; min-height: 76px; padding: 8px; }
.question-visual .stroke-visual .stroke-svg { width: 68px; height: 68px; }
  .question-visual img { width: min(100%, 640px); max-height: 260px; object-fit: contain; border-radius: 16px; }
.question-visual:has(img) { display: grid; gap: 8px; padding: 10px; }
.question-visual small { color: var(--muted); text-align: center; font-size: 12px; }
.speak-button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--green-700); background: #fff; font-size: 12px; font-weight: 750; }
.speak-button.speaking, .pronounce-on-select.speaking, .replay-pronunciation-button.speaking { border-color: #75a9c1; background: #e8f5fa; box-shadow: 0 0 0 3px rgba(117,169,193,.14); }
.answer-area { display: grid; gap: 11px; }
.choice-option { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px 16px; border: 2px solid #e4e8df; border-radius: 15px; color: var(--ink); background: #fff; text-align: left; transition: .16s ease; }
.choice-option:hover { border-color: #b8d3b4; background: #f4f8f1; }
.choice-option.selected { border-color: var(--green-700); background: var(--green-100); }
.choice-option.correct { border-color: #63a06a; background: #e5f4e3; }
.choice-option.wrong { border-color: #d77b7b; background: #fae8e5; }
.choice-option.multi-selected { border-color: #8e7cc3; background: #f0ecfb; }
.choice-letter { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--green-800); background: #eff3eb; font-weight: 850; }
.choice-copy { min-width: 0; flex: 1; }
.option-audio { margin-left: auto; flex: 0 0 auto; color: #477f96; font-size: 16px; }
.answer-input, .open-answer { width: 100%; padding: 14px 16px; border: 2px solid #dfe5da; border-radius: 15px; background: #fff; font-size: 18px; }
.open-answer { min-height: 130px; font-size: 16px; }
.voice-input-button { width: fit-content; padding: 9px 12px; border: 1px solid #d7e1d3; border-radius: 11px; color: var(--green-700); background: #f4f8f1; font-size: 12px; font-weight: 750; }
.numeric-answer-shell { display: grid; gap: 12px; }
.numeric-answer-display { height: 68px; text-align: center; color: var(--green-950); background: #f9fbf7; font-size: 32px; font-weight: 850; letter-spacing: 0; }
.digit-keypad { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; }
.digit-keypad button { min-width: 0; height: 54px; border: 1px solid #ceddca; border-radius: 12px; color: var(--green-950); background: #fff; font-size: 24px; font-weight: 850; box-shadow: 0 4px 10px rgba(45,79,54,.05); }
.digit-keypad button:active { color: #fff; background: var(--green-700); transform: translateY(1px); }
.digit-keypad .keypad-tool { color: var(--green-700); background: var(--green-100); font-size: 20px; }
.order-bank, .order-result { display: flex; flex-wrap: wrap; gap: 9px; min-height: 58px; padding: 12px; border-radius: 15px; background: #f4f6f0; }
.order-result { margin-bottom: 12px; border: 2px dashed #c9d5c4; background: #fff; }
.order-chip { padding: 10px 13px; border: 1px solid #cfdbcb; border-radius: 12px; color: var(--green-950); background: #fff; font-weight: 750; }
.order-chip .option-audio { margin-left: 7px; }
.order-chip.pronounce-on-select { display: inline-flex; align-items: center; }
.order-chip.used { opacity: .28; pointer-events: none; }
.stroke-order-bank, .stroke-order-result { align-items: center; justify-content: center; gap: 20px; min-height: 92px; }
.stroke-chip { min-width: 82px; min-height: 68px; display: inline-grid; place-items: center; padding: 8px 16px; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 44px; line-height: 1; }
.stroke-chip .stroke-svg { width: 54px; height: 54px; }
.match-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.match-column { display: grid; gap: 9px; align-content: start; }
.match-column::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.match-item { min-height: 48px; padding: 10px; border: 2px solid #e0e6dc; border-radius: 13px; color: var(--ink); background: #fff; font-weight: 750; }
.match-item.pronounce-on-select { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stroke-match-item { min-height: 64px; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 36px; }
.stroke-match-item .stroke-svg { width: 50px; height: 50px; margin: auto; }
.match-item.selected { border-color: #8e7cc3; background: #f0ecfb; }
.match-item.matched { color: var(--green-800); border-color: #9bc398; background: #e7f3e4; }
.match-pairs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; min-height: 38px; }
.match-pair-chip { padding: 7px 9px; border-radius: 10px; color: var(--green-800); background: var(--green-100); font-size: 12px; }
.numberline { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; padding: 28px 8px 8px; overflow-x: auto; }
.number-tick { position: relative; min-width: 42px; padding-top: 22px; border: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.number-tick::before { content:""; position:absolute; top: 5px; left: 50%; width: 2px; height: 13px; background: #91a18f; }
.number-tick::after { content:""; position:absolute; top: 4px; left: 0; right: 0; height: 3px; background: #a8b7a5; }
.number-tick:first-child::after { left: 50%; }
.number-tick:last-child::after { right: 50%; }
.number-tick.selected { color: var(--green-800); font-size: 15px; }
.number-tick.selected::before { width: 14px; height: 14px; top: 0; margin-left: -6px; border-radius: 50%; background: var(--yellow); z-index: 1; }
.number-tick.correct { color: #2f733f; }
.number-tick.correct::before { width: 14px; height: 14px; top: 0; margin-left: -6px; border-radius: 50%; background: #70b878; z-index: 2; }
.number-tick.wrong { color: #a84848; }
.number-tick.wrong::before { background: #dc8585; }
.oral-card { padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #f7efd5, #edf5e8); text-align: center; }
.oral-card span { display: block; margin-bottom: 8px; font-size: 40px; }
.oral-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.offline-action-card { padding: 20px; display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 14px; border-radius: 18px; background: linear-gradient(135deg, #fff3d5, #edf5e8); }
.offline-action-card span { font-size: 34px; text-align: center; }
.offline-action-card p { margin: 0; color: #57665d; line-height: 1.65; }
.completion-option { margin-top: 2px; }
.evidence-upload { padding: 16px; display: grid; gap: 12px; border: 2px dashed #cbd9c6; border-radius: 18px; background: #f8faf5; }
.evidence-photo-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.evidence-upload-button { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; padding: 11px 16px; border-radius: 13px; color: #fff; background: var(--green-700); font-weight: 800; cursor: pointer; }
.evidence-upload-button.loading, .evidence-upload-button.disabled { opacity: .55; pointer-events: none; }
.evidence-preview { overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: #ecefe8; }
.evidence-preview img { display: block; width: 100%; max-height: 430px; object-fit: contain; }
.evidence-upload p, .evidence-upload small { margin: 0; text-align: center; }
.evidence-upload p { color: var(--green-800); font-size: 13px; font-weight: 750; }
.evidence-upload small { color: var(--muted); line-height: 1.5; }
.evidence-ai-review { padding: 14px 15px; border: 1px solid #dfe6da; border-radius: 14px; background: #fff; text-align: left; }
.evidence-ai-review > div { display: flex; align-items: center; gap: 8px; color: var(--green-950); }
.evidence-ai-review > div span { font-size: 21px; }
.evidence-ai-review p { margin: 7px 0 0; color: var(--muted); text-align: left; font-size: 12px; line-height: 1.55; }
.evidence-ai-review ul { margin: 8px 0 0; padding-left: 19px; color: #526158; font-size: 12px; line-height: 1.55; }
.evidence-ai-review.pass { border-color: #aed0aa; background: #edf7e9; }
.evidence-ai-review.redo { border-color: #e2b3ae; background: #fff0ed; }
.evidence-ai-review.checking { border-color: #e2cd87; background: #fff8df; }
.evidence-ai-review .ghost-button { margin-top: 10px; min-height: 34px; padding: 7px 10px; font-size: 11px; }
.replay-pronunciation-button { width: fit-content; min-height: 42px; padding: 9px 14px; border: 1px solid #bed6df; border-radius: 12px; color: #386f84; background: #edf7fa; font-weight: 800; }
.feedback-box { margin-top: 16px; padding: 15px 17px; border-radius: 15px; line-height: 1.6; }
.feedback-box.correct { color: #285c37; background: #e7f5e4; }
.feedback-box.wrong { color: #864242; background: #fae8e5; }
.quiz-footer { padding: 15px 24px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); background: rgba(255,253,248,.94); }
.quiz-footer > span { color: var(--muted); font-size: 13px; font-weight: 750; }
.quiz-footer-actions { display: flex; gap: 9px; }
.quiz-summary { padding: 40px 20px; text-align: center; }
.summary-emoji { margin-bottom: 12px; font-size: 66px; }
.quiz-summary h2 { margin: 8px 0; color: var(--green-950); font-size: 32px; }
.quiz-summary > p { margin: 0 auto 22px; max-width: 560px; color: var(--muted); line-height: 1.65; }
.summary-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; max-width: 520px; margin: 0 auto 25px; }
.summary-stats div { padding: 16px; border-radius: 16px; background: #f1f5ed; }
.summary-stats strong, .summary-stats span { display: block; }
.summary-stats strong { color: var(--green-800); font-size: 25px; }
.summary-stats span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.inline-actions.center { justify-content: center; }

.fun-shell { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr) auto; border-radius: 28px; background: var(--cream); box-shadow: 0 32px 80px rgba(15,40,25,.28); }
.fun-header { padding: 22px 24px 18px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.fun-header h2 { margin: 4px 0 0; color: var(--green-950); font-size: 25px; }
.fun-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: #fff1bd; font-size: 32px; }
.fun-content { min-height: 0; overflow-y: auto; padding: 24px; }
.fun-materials { padding: 15px 18px; display: flex; align-items: center; gap: 13px; border-radius: 16px; background: #eef5e9; }
.fun-materials > span { font-size: 30px; }
.fun-materials small, .fun-materials strong { display: block; }
.fun-materials small { margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.fun-materials strong { color: var(--green-950); }
.fun-steps { margin: 22px 0; padding: 0; display: grid; gap: 12px; counter-reset: fun-step; list-style: none; }
.fun-steps li { min-height: 66px; padding: 14px 16px; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); color: var(--ink); line-height: 1.6; }
.fun-steps li::before { counter-increment: fun-step; content: counter(fun-step); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green-700); font-weight: 850; }
.fun-finish-note { padding: 15px 17px; display: flex; align-items: center; gap: 12px; border-radius: 16px; background: #fff4cf; }
.fun-finish-note span { font-size: 28px; }
.fun-finish-note p { margin: 0; color: #665b39; line-height: 1.55; }
.fun-footer { padding: 17px 24px 21px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: rgba(255,253,248,.95); }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 210px minmax(0,1fr); }
  .home-grid, .studio-grid { grid-template-columns: 1fr; }
  .stack-panels { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .branch-legend { grid-template-columns: repeat(3, minmax(150px,1fr)); }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 78px; padding: 16px 18px 10px; }
  .topbar h1 { font-size: 22px; }
  .top-actions .ghost-button { display: none !important; }
  .top-actions { gap: 8px; }
  .offline-status { min-width: 88px; height: 40px; min-height: 40px; padding: 0 10px; justify-content: center; }
  .child-chip { display: none; }
  .sound-toggle { width: 40px; height: 40px; }
  main { padding: 10px 14px 28px; }
  .hero-card { min-height: 230px; padding: 28px 24px; align-items: flex-end; }
  .hero-copy { width: 100%; min-width: 0; }
  .hero-copy h2 { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .hero-sun { right: 24px; top: 22px; font-size: 58px; }
  .hero-copy h2 { font-size: 27px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 22px; }
  .home-grid { grid-template-columns: 1fr; }
  .stack-panels { grid-template-columns: 1fr; }
  .tree-panel { min-height: auto; padding: 18px 12px; }
  .tree-panel-status strong { max-width: 105px; text-align: right; }
  .tree-wrap { width: 100%; max-width: 100%; min-height: 260px; overflow: hidden; }
  .tree-svg { width: 100%; min-width: 0; height: auto; }
  .branch-legend { display: flex; justify-content: flex-start; overflow-x: auto; padding: 3px 2px 8px; scroll-snap-type: x mandatory; }
  .tree-chapter { min-width: 150px; scroll-snap-align: start; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card.habit { grid-column: span 1; }
  .checklist-section-title { align-items: flex-start; flex-direction: column; gap: 5px; }
  .personal-checklist { padding: 18px; }
  .personal-task-row { grid-template-columns: 36px minmax(0,1fr) auto 30px; gap: 7px; }
  .personal-task-row .claim-drop-button { padding: 6px 8px; }
  .day-progress, .day-finish { align-items: stretch; flex-direction: column; }
  .finish-actions { justify-content: stretch; }
  .finish-actions button { flex: 1; }
  .personal-checklist .panel-heading { align-items: flex-start; }
  .personal-heading-actions { align-items: flex-end; flex-direction: column; }
  .personal-heading-actions .secondary-button { min-height: 36px; padding: 7px 10px; font-size: 11px; }
  .ai-review-settings-form { grid-template-columns: 1fr; }
  .ai-review-settings-form .ai-key-field, .ai-review-settings-form .inline-actions, .ai-review-switch { grid-column: auto; }
  .reward-hero { min-height: 150px; padding: 23px 20px; }
  .reward-hero h2 { font-size: 26px; }
  .reward-hero-icon { font-size: 48px; }
  .reward-wallet-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .reward-wallet-grid article { min-height: 104px; padding: 13px 8px; align-items: flex-start; flex-direction: column; gap: 7px; }
  .reward-wallet-grid article > span { font-size: 25px; }
  .reward-wallet-grid strong { font-size: 22px; }
  .reward-wallet-grid small { font-size: 10px; }
  .exchange-panel { padding: 19px; grid-template-columns: 1fr; gap: 18px; }
  .exchange-action { grid-template-columns: 1fr; }
  .exchange-action .primary-button { width: 100%; }
  .reward-add-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reward-name-field { grid-column: 1 / -1; }
  .reward-add-form .primary-button { width: 100%; }
  .reward-store-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .reward-store-card { min-height: 195px; padding: 16px; }
  .reward-store-card h3 { margin-right: 22px; font-size: 15px; }
  .reward-store-footer { align-items: stretch; flex-direction: column; }
  .reward-store-footer .primary-button { width: 100%; }
  .reward-purchase-row { grid-template-columns: 34px minmax(0,1fr); }
  .reward-purchase-row > button, .reward-purchase-row > .purchase-status { grid-column: 1 / -1; }
  .personal-history-day { grid-template-columns: 1fr; gap: 8px; }
  .studio-mascots { display: none; }
  .studio-grid { grid-template-columns: 1fr; }
  .phase-detail-panel { padding: 18px; }
  .inline-actions.spread { align-items: stretch; flex-direction: column; }
  .ai-chat-heading { align-items: flex-start; flex-direction: column; }
  .ai-chat-heading-actions { width: 100%; justify-content: space-between; }
  .ai-chat-message > div { max-width: 100%; }
  .ai-chat-compose-actions, .ai-chat-tools { align-items: stretch; flex-direction: column; }
  .ai-chat-compose-actions button, .ai-chat-tools button { width: 100%; }
  .gallery-header { align-items: stretch; flex-direction: column; }
  .gallery-grid, .form-grid, .parent-grid { grid-template-columns: 1fr; }
  .evidence-review-list { grid-template-columns: 1fr; }
  .settings-card.full-span, .form-grid .full-width { grid-column: auto; }
  .day-locked-state { min-height: 280px; }
  .admin-lock, .admin-control-grid { grid-template-columns: 1fr; }
  .task-library-admin-form, .task-library-admin-toolbar { grid-template-columns: 1fr; }
  .task-library-admin-title, .task-library-admin-detail, .task-library-admin-form-actions { grid-column: auto; }
  .task-library-admin-row { grid-template-columns: 40px minmax(0,1fr); }
  .task-library-admin-actions { grid-column: 1 / -1; justify-content: stretch; }
  .task-library-admin-actions .mini-button { flex: 1; }
  .parent-overview-card .panel-heading { align-items: flex-start; }
  .parent-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .parent-overview-grid > div { min-height: 84px; padding: 11px; }
  .parent-reward-store-list { grid-template-columns: 1fr; }
  .parent-reward-manage-row { grid-template-columns: 34px minmax(0,1fr) auto; }
  .admin-lock .primary-button { width: 100%; }
  .admin-unlock-bar, .admin-danger-zone { align-items: stretch; flex-direction: column; }
  .admin-unlock-bar .ghost-button, .admin-danger-zone .danger-button { width: 100%; }
  .mobile-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(6,1fr);
    padding: 7px max(6px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));
    background: rgba(255,253,248,.95); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
  }
  .mobile-nav button { display: grid; gap: 2px; place-items: center; padding: 5px 2px; border: 0; color: #748078; background: transparent; font-size: 10px; }
  .mobile-nav button span { font-size: 20px; }
  .mobile-nav button.active { color: var(--green-700); font-weight: 800; }
  .practice-shortcuts { grid-template-columns: 1fr; }
  .library-hero { padding: 22px; }
  .library-hero-icon { font-size: 44px; }
  .library-stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
  .library-stat { padding: 12px 9px; }
  .library-stat strong { font-size: 21px; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .filter-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-row select { min-width: 0; }
  .wrong-card-head, .bank-question-head { align-items: flex-start; flex-direction: column; }
  .quiz-overlay { padding: 0; }
  .quiz-shell { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .quiz-header { padding: 14px 14px 10px; grid-template-columns: 42px 1fr auto; }
  .quiz-header .round-button { width: 40px; height: 40px; }
  .quiz-heading h2 { font-size: 19px; }
  .quiz-score { min-width: 52px; padding: 7px 8px; font-size: 13px; }
  .quiz-content { padding: 15px; }
  .question-card { padding: 18px; }
  .question-card h3 { margin: 16px 0; font-size: 21px; }
  .mission-banner { grid-template-columns: 42px 1fr; }
  .mission-emoji { font-size: 31px; }
  .mission-energy { grid-column: 1 / -1; justify-self: start; }
  .question-visual { min-height: 92px; gap: 10px; padding: 12px; }
  .question-visual span { min-width: 45px; min-height: 45px; border-radius: 14px; font-size: 28px; }
  .question-visual span.stroke-visual { min-width: 66px; min-height: 66px; }
  .question-visual .stroke-visual .stroke-svg { width: 58px; height: 58px; }
  .digit-keypad { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .digit-keypad button { height: 50px; }
  .stroke-chip { min-width: 70px; min-height: 62px; font-size: 39px; }
  .offline-action-card { grid-template-columns: 40px 1fr; padding: 16px; }
  .evidence-preview img { max-height: 240px; }
  .quiz-footer { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .quiz-footer-actions { flex: 1; justify-content: flex-end; }
  .fun-overlay { padding: 0; }
  .fun-shell { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .fun-header { padding: 15px 14px; grid-template-columns: 42px 1fr auto; }
  .fun-header h2 { font-size: 21px; }
  .fun-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 26px; }
  .fun-content { padding: 18px 15px; }
  .fun-steps li { padding: 12px 8px; }
  .fun-footer { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .fun-footer button { flex: 1; }
  .task-library-overlay { padding: 0; }
  .task-library-shell { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .task-library-header { padding: 14px; grid-template-columns: 42px 1fr auto; }
  .task-library-header h2 { font-size: 20px; }
  .task-library-icon { width: 43px; height: 43px; border-radius: 13px; font-size: 24px; }
  .task-library-toolbar { padding: 10px 14px; }
  .task-library-toolbar label { min-width: 0; flex: 1; }
  .task-library-content { padding: 12px 14px; }
  .task-library-grid { grid-template-columns: 1fr; gap: 9px; }
  .task-library-card { min-height: 165px; padding: 15px; }
  .task-library-footer { padding: 11px 14px calc(11px + env(safe-area-inset-bottom)); }
  .summary-stats { gap: 7px; }
  .summary-stats div { padding: 12px 7px; }
  .watering-overlay { padding: 0; }
  .watering-card { width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0,1fr) auto; border: 0; border-radius: 0; }
  .watering-garden { height: auto; min-height: 0; }
  .watering-tree-preview .tree-svg { width: 132%; max-width: none; }
  .watering-can { top: 48px; right: 0; width: 112px; }
  .watering-drops { top: 105px; right: 24%; }
  .watering-copy { padding: 22px 20px calc(28px + env(safe-area-inset-bottom)); }
  .watering-copy h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .canopy-cloud, .tree-flower, .tree-fruit, .tree-sparkles, .tree-svg.celebrating .tree-grown, .tree-svg.celebrating .sprout-stage, .watering-can, .watering-drops i { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, button, .project-tabs { display: none !important; }
  .app-shell { display: block; }
  main { padding: 0; }
  .view { display: none !important; }
  #view-gallery.active, #view-studio.active { display: block !important; }
  .panel, .work-card { box-shadow: none; break-inside: avoid; }
}
