:root {
  --mint: #7ed6c1;
  --mint-deep: #3fc58f;
  --yellow: #ffd600;
  --pink: #ff69b4;
  --blue: #00cfff;
  --cream: #fff7ee;
  --gray: #e8ecef;
  --charcoal: #1e2329;
  --muted: #6f7882;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(31, 48, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--charcoal);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 85%, rgba(0, 207, 255, 0.18), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(255, 105, 180, 0.18), transparent 22%),
    linear-gradient(135deg, #fffdf8, #f4fffb 55%, #fff6fb);
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  border-right: 1px solid rgba(63, 197, 143, 0.18);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

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

.brand img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand strong {
  display: block;
  font-size: 24px;
}

.brand span {
  color: var(--mint-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  color: var(--muted);
  text-align: left;
  background: transparent;
}

.nav-item.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--mint-deep), var(--mint));
  box-shadow: 0 12px 26px rgba(63, 197, 143, 0.3);
}

.mobile-tabbar {
  display: none;
}

.bear-note {
  margin-top: auto;
  padding: 18px;
  border-radius: 24px;
  background: var(--cream);
}

.bear-note img {
  display: block;
  width: 118px;
  height: 118px;
  margin: 0 auto 12px;
  object-fit: contain;
}

.bear-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.main {
  padding: 32px;
  overflow: hidden;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 24px;
}

.app-hero {
  display: none;
}

.hero-copy,
.panel,
.create-form,
.review-form,
.bear-room,
.today-focus-card {
  border: 1px solid rgba(63, 197, 143, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero-copy {
  padding: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mint-deep);
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 520px;
  font-size: 50px;
  line-height: 1.05;
}

h2 {
  font-size: 38px;
}

h3 {
  font-size: 24px;
}

.hero-text,
.section-title p,
.panel p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-text {
  max-width: 500px;
  margin: 18px 0 26px;
}

.today-focus-card {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  min-height: 48px;
  border-radius: 18px;
  padding: 0 22px;
  border: 0;
  font-weight: 800;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--mint-deep), var(--mint));
  box-shadow: 0 12px 24px rgba(63, 197, 143, 0.25);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.ghost-btn {
  color: var(--mint-deep);
  background: rgba(126, 214, 193, 0.16);
}

.danger-btn {
  min-height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  color: #c9415d;
  font-weight: 800;
  background: rgba(255, 105, 180, 0.12);
}

.wide {
  width: 100%;
}

.hero-art {
  min-height: 330px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dashboard-grid,
.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(63, 197, 143, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.stat-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.stat-card strong {
  color: var(--charcoal);
  font-size: 24px;
}

.panel {
  padding: 22px;
}

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

.panel-head span {
  color: var(--muted);
}

.panel-head strong {
  color: var(--mint-deep);
}

.goal-list,
.history-list {
  display: grid;
  gap: 12px;
}

.goal-card,
.history-item {
  border: 1px solid rgba(126, 214, 193, 0.24);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.goal-card.active {
  background: linear-gradient(135deg, rgba(126, 214, 193, 0.28), rgba(255, 247, 238, 0.88));
}

.goal-card button {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.goal-card strong,
.history-item strong {
  display: block;
  margin-bottom: 6px;
}

.goal-card small,
.history-item small {
  color: var(--muted);
}

.growth-plant {
  position: relative;
  height: 132px;
  margin: 10px 0 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(126, 214, 193, 0.12), rgba(255, 247, 238, 0.8));
  overflow: hidden;
}

.growth-plant span {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: var(--mint);
}

.growth-plant span {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: var(--mint);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.growth-plant span:nth-child(1) {
  width: 20px;
  height: 78px;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
}

.growth-plant span:nth-child(2),
.growth-plant span:nth-child(3) {
  width: 58px;
  height: 34px;
  bottom: 68px;
}

.growth-plant span:nth-child(2) {
  left: calc(50% - 56px);
  transform: rotate(-28deg);
}

.growth-plant span:nth-child(3) {
  right: calc(50% - 56px);
  transform: rotate(28deg);
}

/* 发芽: stem + left leaf */
.growth-plant.level-2 span:nth-child(1),
.growth-plant.level-2 span:nth-child(2) { opacity: 1; }

/* 长叶: stem + both leaves */
.growth-plant.level-3 span { opacity: 1; }

/* 开花/结果: full plant */
.growth-plant.level-4 span { opacity: 1; }

/* 完成: full plant + gold tint */
.growth-plant.level-5 span {
  opacity: 1;
  background: linear-gradient(135deg, var(--mint-deep), var(--yellow));
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(126, 214, 193, 0.18);
  overflow: hidden;
}

.progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-deep), var(--yellow), var(--pink));
  transition: width 0.25s ease;
}

.large-message {
  min-height: 116px;
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.section-title {
  margin-bottom: 22px;
}

.create-form,
.review-form {
  display: grid;
  gap: 18px;
  max-width: 760px;
  padding: 28px;
}

.create-steps {
  display: flex;
  gap: 10px;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  background: rgba(126, 214, 193, 0.14);
}

.step-dot.active {
  color: var(--white);
  background: var(--mint-deep);
}

.create-step {
  display: none;
  gap: 14px;
}

.create-step.active {
  display: grid;
}

.create-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.seed-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: var(--cream);
}

.seed-preview img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.seed-preview strong,
.seed-preview span {
  display: block;
}

.seed-preview span {
  margin-top: 6px;
  color: var(--muted);
}

.create-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#submitGoal {
  display: none;
}

.create-form.final-step #nextCreateStep {
  display: none;
}

.create-form.final-step #submitGoal {
  display: block;
}

.create-form.first-step #prevCreateStep {
  visibility: hidden;
}

label {
  display: grid;
  gap: 8px;
  color: var(--charcoal);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(126, 214, 193, 0.35);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--charcoal);
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 4px rgba(63, 197, 143, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.template-row button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--mint-deep);
  font-weight: 800;
  background: rgba(126, 214, 193, 0.16);
}

.big-growth {
  text-align: center;
}

.plant-stage {
  display: grid;
  place-items: center;
  height: 180px;
  font-size: 92px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 214, 0, 0.16), rgba(126, 214, 193, 0.18));
}

.task-copy {
  min-height: 80px;
  font-size: 22px;
  font-weight: 800;
}

.plan-panel {
  grid-column: 1 / -1;
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.plan-day {
  min-height: 94px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(126, 214, 193, 0.1);
}

.plan-day strong,
.plan-day span {
  display: block;
}

.plan-day span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.plan-day.done {
  background: linear-gradient(145deg, rgba(126, 214, 193, 0.28), rgba(255, 214, 0, 0.18));
}

.complete-card {
  display: grid;
  justify-items: center;
  max-width: 720px;
  margin: 42px auto 0;
  padding: 42px;
  border: 1px solid rgba(63, 197, 143, 0.16);
  border-radius: 32px;
  text-align: center;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.complete-card img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.complete-card p:not(.eyebrow) {
  max-width: 480px;
  color: var(--muted);
  line-height: 1.8;
}

.complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.review-list-panel {
  max-width: 760px;
  margin-top: 18px;
}

.bear-room {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
  align-items: center;
  max-width: 860px;
  padding: 28px;
}

.bear-room img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.speech {
  position: relative;
  padding: 28px;
  border-radius: 26px;
  color: var(--charcoal);
  background: var(--cream);
}

.speech strong {
  color: var(--mint-deep);
}

.speech p {
  margin: 10px 0 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.35;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 860px;
  margin-top: 18px;
}

.badge-grid div {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 112px;
  border-radius: 24px;
  font-size: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  opacity: 0.46;
}

.badge-grid span {
  font-size: 14px;
  font-weight: 800;
}

.badge-grid div.unlocked {
  opacity: 1;
  background: linear-gradient(145deg, rgba(126, 214, 193, 0.22), rgba(255, 247, 238, 0.9));
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 320px;
  padding: 14px 18px;
  border-radius: 18px;
  color: var(--white);
  background: var(--charcoal);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
  }

  .nav {
    grid-template-columns: repeat(5, 1fr);
  }

  .nav-item {
    padding: 12px 8px;
    text-align: center;
  }

  .bear-note {
    display: none;
  }

  .main {
    padding: 18px;
  }

  .hero,
  .dashboard-grid,
  .detail-layout,
  .bear-room,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }
}

@media (max-width: 620px) {
  body {
    background:
      radial-gradient(circle at 12% 8%, rgba(126, 214, 193, 0.2), transparent 30%),
      linear-gradient(180deg, #fffdf8, #f4fffb 68%, #fff6fb);
  }

  .app-shell {
    min-height: 100dvh;
    max-width: 100vw;
    overflow-x: hidden;
    grid-template-columns: 1fr;
  }

  /* === Top App Bar === */
  .sidebar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    min-height: 50px;
    border-right: 0;
    border-bottom: 1px solid rgba(63, 197, 143, 0.16);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0; }
  .brand img { display: none; }
  .brand .brand-text strong { font-size: 18px; }
  .brand .brand-text span { display: none; }

  .sidebar .nav { display: none; }
  .sidebar .bear-note { display: none; }

  /* === User pill in top bar === */
  .user-area { margin-left: 0; }
  .user-pill { padding: 4px 10px 4px 4px; gap: 5px; border-radius: 99px; }
  .user-avatar { width: 24px; height: 24px; font-size: 11px; }
  .user-name { font-size: 11px; max-width: 56px; }
  .user-arrow { font-size: 9px; }
  .user-dropdown { right: 0; left: auto; min-width: 120px; }

  /* === Bottom Tabbar (5 items) === */
  .mobile-tabbar {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    width: 100%;
    gap: 2px;
    padding: 0 8px calc(4px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(63, 197, 143, 0.12);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -4px 20px rgba(31, 48, 55, 0.06);
    backdrop-filter: blur(18px);
    max-width: 100%;
    transform: none;
  }

  .mobile-tabbar .nav-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 52px;
    padding: 8px 0 4px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    color: var(--muted);
    background: transparent;
    white-space: nowrap;
    overflow: visible;
    transition: color 0.2s, transform 0.15s;
  }

  .mobile-tabbar .nav-item:active {
    transform: scale(0.94);
  }

  .mobile-tabbar .nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--mint-deep);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-tabbar .nav-item.active {
    color: var(--mint-deep);
    background: transparent;
    box-shadow: none;
    font-weight: 800;
  }

  .mobile-tabbar .nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
  }

  /* Badge dot */
  .tab-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    margin-right: -22px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff4757;
    animation: pulse-dot 2s ease-in-out infinite;
  }

  @keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
  }

  /* === Main content === */
  .main {
    padding: 14px 14px 120px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* === Home Mobile === */
  .hero { display: none; }

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

  .home-greeting .eyebrow { margin-bottom: 4px; font-size: 12px; }
  .home-greeting h1 { font-size: 26px; }

  .bear-avatar-card {
    display: grid; place-items: center;
    width: 56px; height: 56px;
    border-radius: 20px;
    background: rgba(255,255,255,0.85);
    box-shadow: var(--shadow);
  }
  .bear-avatar-card img { width: 46px; height: 46px; object-fit: contain; }

  .today-focus-card {
    display: grid; gap: 14px;
    margin-bottom: 14px;
    padding: 20px;
    border-radius: 22px;
    border: 2px solid rgba(63,197,143,0.2);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(126,214,193,0.06));
  }
  .today-focus-card .eyebrow { font-size: 13px; }
  .today-focus-card h2 { font-size: 24px; line-height: 1.25; }

  /* Bigger check-in button */
  .today-focus-card .primary-btn,
  .hero-actions .primary-btn {
    min-height: 54px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 18px;
  }

  /* === Cards & Panels === */
  .hero-copy, .panel, .create-form, .review-form,
  .bear-room, .complete-card, .today-focus-card {
    border-radius: 20px;
    padding: 16px;
  }

  h1 { font-size: 28px; line-height: 1.15; }
  h2 { font-size: 24px; line-height: 1.2; }
  h3 { font-size: 20px; }

  .hero-text { margin: 10px 0 14px; font-size: 14px; line-height: 1.7; }

  .hero-actions, .complete-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-actions > *, .complete-actions > * { width: 100%; min-width: 0; }

  .primary-btn, .ghost-btn {
    min-height: 50px;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 15px;
  }

  /* === Stats Grid === */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
  .stat-card {
    min-height: 70px;
    padding: 14px;
    border-radius: 16px;
  }
  .stat-card span { font-size: 11px; margin-bottom: 6px; }
  .stat-card strong { font-size: 20px; }

  /* === Dashboard === */
  .dashboard-grid, .detail-layout { gap: 12px; }
  .panel-head { margin-bottom: 10px; }
  .panel-head span, .panel-head strong { font-size: 13px; }

  .goal-card-v2, .history-item { padding: 14px; border-radius: 16px; }
  .goal-card-v2 { grid-template-columns: 36px 1fr auto; gap: 10px; }
  .goal-card-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 12px; }
  .goal-card-body strong { font-size: 13px; }
  .goal-card-body small { font-size: 11px; }
  .goal-card-stats strong { font-size: 16px; }

  .large-message { min-height: auto; font-size: 19px; line-height: 1.5; }
  .growth-plant { height: 80px; border-radius: 18px; }
  .plant-stage { height: 120px; font-size: 64px; border-radius: 20px; }
  .task-copy { min-height: auto; font-size: 18px; line-height: 1.55; }

  /* === Forms === */
  label { font-size: 14px; }
  input, select, textarea { min-height: 48px; border-radius: 14px; font-size: 16px; }
  .form-row, .badge-grid, .plan-list { grid-template-columns: 1fr; }

  .create-form { gap: 14px; }
  .create-step h3 { font-size: 21px; }
  .create-actions {
    position: sticky; bottom: 90px; z-index: 3;
    padding: 8px 0 0;
    background: linear-gradient(180deg, rgba(255,253,248,0), rgba(255,253,248,0.95) 35%);
  }

  .template-categories { gap: 4px; }
  .template-cat-btn { padding: 5px 10px; font-size: 11px; }
  .template-grid { gap: 6px; }
  .template-card { padding: 12px; border-radius: 14px; }
  .template-icon { font-size: 22px; }
  .template-name { font-size: 12px; }

  .seed-preview { border-radius: 16px; padding: 12px; }
  .seed-preview img { width: 52px; height: 52px; }

  /* === Review Mobile === */
  .review-bear-icon { width: 36px; height: 36px; margin-bottom: 2px; }
  .review-question { font-size: 16px; }
  .review-step { padding: 16px; border-radius: 16px; }
  .review-actions { position: sticky; bottom: 90px; z-index: 3; padding: 6px 0; background: linear-gradient(180deg, rgba(255,253,248,0), rgba(255,253,248,0.95) 30%); }
  .review-extra-actions { width: 100%; }
  .review-extra-actions .ghost-btn,
  .review-extra-actions .primary-btn { flex: 1; min-width: 0; }

  /* === Detail === */
  .plan-day { min-height: 60px; border-radius: 14px; padding: 10px; }

  /* === Complete === */
  .complete-card { margin: 20px auto 0; }
  .complete-animation { width: 120px; height: 120px; }

  /* === Bear Room === */
  .bear-room { gap: 10px; grid-template-columns: 1fr; text-align: center; }
  .bear-room img { max-height: 180px; margin: 0 auto; }
  .speech { padding: 18px; border-radius: 20px; }
  .speech p { font-size: 22px; }
  .badge-grid div { min-height: 80px; border-radius: 18px; }

  /* === Calendar === */
  .calendar-grid { gap: 2px; }
  .cal-cell { font-size: 11px; border-radius: 6px; }
  .cal-header { font-size: 10px; }

  /* === Toast === */
  .toast { right: 14px; bottom: 100px; left: 14px; max-width: none; }

  /* === User picker === */
  .user-picker-card { width: 300px; padding: 28px 24px; }
  .user-picker-card h2 { font-size: 20px; }
}

@media (max-width: 430px) {
  .hero-copy, .panel, .create-form, .review-form, .bear-room, .complete-card { padding: 14px; }
  .hero-art { height: 150px; }
  .mobile-tabbar .nav-item { font-size: 11px; min-height: 46px; }
  .today-focus-card { padding: 16px; }
  .today-focus-card h2 { font-size: 22px; }
}

/* ===== Conversational Review ===== */
.review-form {
  max-width: 680px;
}

.review-dialogue {
  display: grid;
  gap: 14px;
}

.review-bear-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(126,214,193,0.2), rgba(255,247,238,0.8));
}

.review-step {
  display: none;
  padding: 20px;
  border: 1px solid rgba(63,197,143,0.14);
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  gap: 10px;
}

.review-step.active {
  display: grid;
  animation: fadeSlideIn 0.3s ease;
}

.review-question {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--charcoal);
  text-align: center;
}

.review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
}

.review-progress {
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.review-extra-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.review-extra-actions .ghost-btn,
.review-extra-actions .primary-btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

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

/* ===== Task 9: Check-in Completion Animation ===== */
.complete-animation {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
}

.sprout-stage {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}

.stage-seed {
  width: 24px;
  height: 24px;
  bottom: 10px;
  border-radius: 50%;
  background: var(--mint-deep);
  animation: seedAppear 2s ease forwards;
}

.stage-sprout {
  width: 6px;
  height: 0;
  bottom: 34px;
  border-radius: 99px;
  background: var(--mint);
  animation: sproutGrow 0.8s ease 0.6s forwards;
}

.stage-leaf {
  width: 0;
  height: 0;
  bottom: 74px;
  border-radius: 50%;
  background: var(--mint-deep);
  animation: leafUnfold 0.8s ease 1.4s forwards;
}

@keyframes seedAppear {
  0% { opacity: 0; transform: translateX(-50%) scale(0); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.3); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes sproutGrow {
  from { height: 0; opacity: 0; }
  to { height: 40px; opacity: 1; }
}

@keyframes leafUnfold {
  from { width: 0; height: 0; opacity: 0; }
  to { width: 36px; height: 20px; opacity: 1; }
}

/* ===== Task 10: Calendar Heatmap ===== */
.calendar-panel { margin-top: 18px; }

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-arrow {
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(126,214,193,0.16);
  color: var(--mint-deep);
  font-weight: 800;
  cursor: pointer;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-header {
  padding: 6px 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.cal-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(126,214,193,0.06);
}

.cal-cell.empty { background: transparent; }

.cal-cell.level-1 { background: rgba(63,197,143,0.2); }
.cal-cell.level-2 { background: rgba(63,197,143,0.4); }
.cal-cell.level-3 { background: rgba(63,197,143,0.65); color: #fff; }
.cal-cell.level-4 { background: #3fc58f; color: #fff; }

.cal-cell.today {
  box-shadow: inset 0 0 0 2px var(--mint-deep);
}

.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}

.cal-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.cal-dot.level-1 { background: rgba(63,197,143,0.2); }
.cal-dot.level-2 { background: rgba(63,197,143,0.4); }
.cal-dot.level-3 { background: rgba(63,197,143,0.65); }
.cal-dot.level-4 { background: #3fc58f; }

/* ===== Task 11: Goal Editing ===== */
.edit-form {
  display: grid;
  gap: 14px;
}

.edit-actions {
  display: flex;
  gap: 10px;
}

/* ===== Task 12: Empty State + Goal Card V2 ===== */
.empty-state {
  text-align: center;
  padding: 20px 0;
}

.empty-bear {
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(126,214,193,0.2), rgba(255,247,238,0.8));
}

.empty-speech {
  display: inline-block;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--cream);
}

.empty-speech strong { display: block; margin-bottom: 4px; }
.empty-speech p { margin: 0; color: var(--muted); font-size: 13px; }

.empty-templates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

.empty-template-card {
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 16px 8px;
  border: 2px dashed rgba(63,197,143,0.3);
  border-radius: 16px;
  background: rgba(126,214,193,0.06);
  cursor: pointer;
}

.empty-template-icon { font-size: 28px; }
.empty-template-label { font-weight: 800; font-size: 13px; }
.empty-template-hint { color: var(--muted); font-size: 11px; }

.goal-card-v2 {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(126,214,193,0.24);
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  cursor: pointer;
  transition: background 0.2s;
}

.goal-card-v2:hover { background: rgba(126,214,193,0.08); }
.goal-card-v2.active { background: linear-gradient(135deg, rgba(126,214,193,0.2), rgba(255,247,238,0.8)); }
.goal-card-v2.dormant { opacity: 0.55; }

.goal-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(126,214,193,0.2), rgba(255,247,238,0.8));
}

.goal-card-body strong { display: block; font-size: 14px; margin-bottom: 2px; }
.goal-card-body small { color: var(--muted); font-size: 12px; }

.goal-card-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 99px;
  background: rgba(126,214,193,0.15);
  overflow: hidden;
}

.goal-card-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-deep), var(--yellow), var(--pink));
  transition: width 0.3s ease;
}

.goal-card-stats { text-align: right; }
.goal-card-stats strong { font-size: 18px; color: var(--mint-deep); }
.goal-card-stats strong small { font-size: 12px; color: var(--muted); font-weight: normal; }
.goal-card-streak { display: block; color: #ff9500; font-weight: 800; font-size: 10px; margin-top: 2px; }
.goal-card-hint { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }

.template-categories {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.template-cat-btn {
  border: 0;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(126,214,193,0.12);
  cursor: pointer;
}

.template-cat-btn.active {
  color: #fff;
  background: var(--mint-deep);
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.template-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(63,197,143,0.2);
  border-radius: 16px;
  background: rgba(255,255,255,0.7);
  text-align: left;
  cursor: pointer;
}

.template-icon { font-size: 24px; }
.template-name { font-weight: 800; font-size: 13px; }
.template-desc { color: var(--muted); font-size: 11px; line-height: 1.4; }

.template-or-divider {
  text-align: center;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
}

/* ===== Task 7: Frontend AI buttons ===== */
.ai-result-card {
  margin-top: 10px;
  padding: 16px;
  border: 2px solid var(--mint-deep);
  border-radius: 18px;
  background: rgba(63,197,143,0.06);
}

.ai-result-content strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.ai-result-content p {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
}

.ai-result-content small {
  display: block;
  color: var(--mint-deep);
  font-weight: 800;
  margin-bottom: 12px;
}

.ai-result-actions {
  display: flex;
  gap: 8px;
}

.ai-result-actions .primary-btn,
.ai-result-actions .ghost-btn {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

/* ===== User System ===== */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { flex: 1; min-width: 0; }

.user-area { position: relative; margin-left: auto; }
.user-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border: 1px solid rgba(63,197,143,0.25); border-radius: 99px; background: rgba(255,255,255,0.85); cursor: pointer; white-space: nowrap; }
.user-pill:hover { background: rgba(63,197,143,0.08); }
.user-avatar { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--mint-deep), var(--mint)); color: #fff; font-size: 12px; font-weight: 800; }
.user-name { font-size: 12px; font-weight: 800; max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.user-arrow { font-size: 10px; color: var(--muted); }

.user-dropdown { position: absolute; top: 100%; right: 0; z-index: 10; margin-top: 4px; min-width: 130px; border: 1px solid rgba(63,197,143,0.2); border-radius: 14px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.user-dropdown-item { display: block; width: 100%; padding: 10px 14px; border: 0; text-align: left; background: transparent; cursor: pointer; font-size: 13px; }
.user-dropdown-item:hover { background: rgba(63,197,143,0.08); }

.user-picker-overlay { display: none; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); }
.user-picker-card { width: 340px; max-width: 90vw; padding: 32px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.user-picker-card h2 { font-size: 22px; margin-bottom: 4px; }
.user-picker-card input { margin-bottom: 12px; }
.existing-users { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.existing-user-btn { border: 1px solid rgba(63,197,143,0.3); border-radius: 99px; padding: 6px 14px; background: rgba(126,214,193,0.08); cursor: pointer; font-size: 13px; font-weight: 800; }

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --charcoal: #e8ecef;
  --muted: #9aa0a8;
  --cream: #2a2d32;
  --white: #1a1d22;
  --gray: #2d3036;
  --shadow: 0 4px 16px rgba(0,0,0,0.3);
}

[data-theme="dark"] body {
  background: #0f1115;
  color: #e8ecef;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .hero-copy,
[data-theme="dark"] .panel,
[data-theme="dark"] .create-form,
[data-theme="dark"] .review-form,
[data-theme="dark"] .bear-room,
[data-theme="dark"] .complete-card,
[data-theme="dark"] .today-focus-card,
[data-theme="dark"] .stat-card {
  background: #1a1d22;
  border-color: rgba(63,197,143,0.1);
}

[data-theme="dark"] .goal-card-v2,
[data-theme="dark"] .history-item,
[data-theme="dark"] .template-card,
[data-theme="dark"] .garden-plant,
[data-theme="dark"] .review-step {
  background: rgba(255,255,255,0.04);
  border-color: rgba(63,197,143,0.08);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1a1d22;
  color: #e8ecef;
  border-color: rgba(126,214,193,0.2);
}

[data-theme="dark"] .user-dropdown,
[data-theme="dark"] .user-picker-card {
  background: #22252a;
  border-color: rgba(63,197,143,0.15);
}

[data-theme="dark"] .mobile-tabbar,
[data-theme="dark"] .sidebar {
  background: rgba(15,17,21,0.94);
  border-color: rgba(63,197,143,0.08);
}

[data-theme="dark"] .speech {
  background: #2a2d32;
}

[data-theme="dark"] .stat-card strong {
  color: #e8ecef;
}

[data-theme="dark"] .goal-card-v2.active {
  background: rgba(63,197,143,0.1);
}

[data-theme="dark"] .cal-cell {
  background: rgba(126,214,193,0.04);
}

[data-theme="dark"] .template-cat-btn {
  background: rgba(126,214,193,0.06);
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(63,197,143,0.2);
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.3s;
}
.theme-toggle:active { transform: scale(0.9); }

/* ===== Bear Animations ===== */
.bear-avatar-card img,
.bear-note img,
.bear-room img {
  animation: bear-breathe 4s ease-in-out infinite;
}

@keyframes bear-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-3px) scale(1.03); }
  75% { transform: translateY(2px) scale(0.98); }
}

/* Happy bounce on completion */
.complete-card .bear-avatar-card img,
.complete-animation {
  animation: bear-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bear-bounce {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-18px) scale(1.15); }
  50% { transform: translateY(0) scale(0.95); }
  70% { transform: translateY(-6px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

/* Mood tints */
.bear-mood-happy { filter: brightness(1.1) saturate(1.2); }
.bear-mood-calm { filter: brightness(1) saturate(0.9); }
.bear-mood-curious { animation: bear-tilt 2s ease-in-out infinite; }

@keyframes bear-tilt {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

/* Bear wave on hover */
.bear-room img:hover,
.bear-avatar-card img:hover {
  animation: bear-wave 0.5s ease-in-out;
  cursor: pointer;
}

@keyframes bear-wave {
  0%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-8deg) scale(1.08); }
  60% { transform: rotate(8deg) scale(1.08); }
}

/* Bear speech bubble pop */
.speech {
  animation: speech-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes speech-pop {
  from { opacity: 0; transform: scale(0.9) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== Loading Bar ===== */
.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  z-index: 999;
  background: linear-gradient(90deg, var(--mint-deep), var(--yellow));
  transition: width 0.3s ease;
  pointer-events: none;
}

.loading-bar.running {
  width: 70%;
  animation: loading-pulse 1.5s ease-in-out infinite;
}

.loading-bar.done {
  width: 100%;
  transition: width 0.3s ease;
  background: var(--mint-deep);
}

@keyframes loading-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Button spinner */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

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

.primary-btn.loading,
.ghost-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ===== View Transitions ===== */
.view {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ===== Scroll Shadow on Top Bar ===== */
@media (max-width: 620px) {
  .sidebar.scrolled {
    box-shadow: 0 2px 16px rgba(31, 48, 55, 0.1);
  }
}

/* ===== Check-in Button Pulse ===== */
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 12px 24px rgba(63, 197, 143, 0.25); }
  50% { box-shadow: 0 12px 32px rgba(63, 197, 143, 0.45), 0 0 0 8px rgba(63, 197, 143, 0.08); }
}

.primary-btn.pulse {
  animation: btn-pulse 2.5s ease-in-out infinite;
}

/* ===== Empty State Bear Animation ===== */
.empty-state {
  text-align: center;
  padding: 30px 0;
}

.empty-bear {
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(126,214,193,0.2), rgba(255,247,238,0.8));
  animation: bear-float 3s ease-in-out infinite;
}

@keyframes bear-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 620px) {
  .empty-bear { width: 90px; height: 90px; }
  .empty-state { padding: 20px 0; }
}

/* ===== Goal Completion Celebration ===== */
.complete-celebration {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,214,0,0.12), rgba(63,197,143,0.08)) !important;
  border: 2px solid var(--yellow) !important;
  animation: celebration-glow 2s ease-in-out infinite;
}

@keyframes celebration-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255,214,0,0.3); }
  50% { box-shadow: 0 0 40px rgba(255,214,0,0.5), 0 0 60px rgba(255,105,180,0.2); }
}

.complete-celebration::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,214,0,0.3) 0%, transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255,105,180,0.25) 0%, transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(63,197,143,0.2) 0%, transparent 40%);
  pointer-events: none;
}

.complete-tomorrow {
  margin: 8px 0 0;
  color: var(--mint-deep);
  font-weight: 800;
  font-size: 14px;
  text-align: center;
}

.complete-review-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  animation: fadeSlideIn 0.3s ease;
}

/* ===== Home Review Reminder ===== */
.home-review-reminder {
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255,214,0,0.1);
  border: 1px solid rgba(255,214,0,0.3);
  font-size: 13px;
  color: var(--charcoal);
  animation: fadeSlideIn 0.3s ease;
}

.reminder-link {
  color: var(--mint-deep);
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

/* ===== Garden View ===== */
.garden-section {
  margin-top: 24px;
}

.garden-section h3 {
  margin-bottom: 14px;
  font-size: 20px;
}

.garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.garden-plant {
  position: relative;
  padding: 18px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(63,197,143,0.16);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.garden-plant:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.garden-plant.watered {
  border-color: rgba(63,197,143,0.35);
  background: linear-gradient(145deg, rgba(126,214,193,0.12), rgba(255,255,255,0.85));
}

.garden-plant.complete {
  border-color: var(--yellow);
  background: linear-gradient(145deg, rgba(255,214,0,0.1), rgba(255,255,255,0.9));
}

.garden-plant-icon {
  display: block;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.garden-plant:hover .garden-plant-icon {
  transform: scale(1.15);
}

.garden-plant-name {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 4px;
}

.garden-plant-stage {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.garden-plant-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(126,214,193,0.15);
  overflow: hidden;
}

.garden-plant-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-deep), var(--yellow));
  transition: width 0.3s ease;
}

.garden-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 22px;
  animation: bear-bounce 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

.garden-watered-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 14px;
}

.garden-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
  font-size: 15px;
}

@media (max-width: 620px) {
  .garden-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .garden-plant { padding: 14px 10px; }
  .garden-section h3 { font-size: 18px; }
}

.goal-card-note { display: block; color: var(--mint-deep); font-size: 11px; margin-top: 4px; }
.goal-card-actions { display: flex; gap: 4px; margin-top: 4px; }
.goal-card-action { width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(126,214,193,0.1); cursor: pointer; font-size: 14px; display: grid; place-items: center; }
.goal-search-bar { margin-bottom: 12px; }
.goal-search-bar input { width: 100%; }
.archived-toggle { text-align: center; margin: 12px 0; }
.archived-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); }
.archived-modal-card { width: 90%; max-width: 400px; max-height: 70vh; overflow-y: auto; padding: 24px; border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.archived-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(126,214,193,0.1); }
.archived-item .ghost-btn { min-height: 32px; padding: 0 12px; font-size: 12px; }

/* Stats page */
.stats-hero { display: flex; gap: 12px; margin-bottom: 24px; }
.stats-big-num { flex: 1; text-align: center; padding: 16px; border-radius: 16px; background: rgba(255,255,255,0.7); border: 1px solid rgba(63,197,143,0.15); font-size: 28px; font-weight: 800; }
.stats-big-num span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.stats-bars { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 0 4px; }
.stats-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.stats-bar-fill { width: 100%; max-width: 40px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--mint-deep), var(--mint)); min-height: 2px; transition: height 0.5s ease; }
.stats-bar-item span { margin-top: 6px; font-size: 11px; color: var(--muted); }
.stats-bar-item small { font-size: 10px; color: var(--muted); }

@media (max-width: 620px) {
  .stats-hero { flex-direction: column; gap: 8px; }
  .stats-big-num { font-size: 24px; padding: 12px; }
  .stats-bars { height: 140px; }
}
