/* === KIDS MODE v4.0.1 — Pastel Theme === */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;600;700&display=swap');

/* === PASTEL THEME VARIABLES === */
body.kids-mode {
  --kids-bg: #FFF8F0;
  --kids-surface: rgba(255,255,255,0.85);
  --kids-surface-hi: rgba(255,255,255,0.95);
  --kids-border: rgba(0,0,0,0.06);
  --kids-border-hi: rgba(0,0,0,0.10);
  --kids-t1: #2D2D2D;
  --kids-t2: #6B6B6B;
  --kids-t3: #9E9E9E;
  --kids-green: #7BC67E;
  --kids-blue: #7EB6FF;
  --kids-pink: #FFB3C6;
  --kids-yellow: #FFE066;
  --kids-purple: #C4A8FF;
  --kids-orange: #FFB87A;
  --kids-red: #FF8A8A;
  --kids-yellow-dark: #7A6200;
  --kids-green-dark: #5A9E5C;
  --kids-green-light: #A5E8A7;
  --kids-radius: 20px;
  --kids-shadow: 0 4px 20px rgba(0,0,0,0.06);
  --kids-font: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === BODY OVERRIDES === */
body.kids-mode {
  background: var(--kids-bg) !important;
  font-family: var(--kids-font) !important;
  color: var(--kids-t1) !important;
}
body.kids-mode #glow-bg { display: none !important; }

/* === TOPBAR === */
body.kids-mode .topbar {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--kids-border) !important;
}
body.kids-mode .topbar svg path[fill="#e4e4e7"] { fill: var(--kids-t1); }
body.kids-mode .topbar .logo-accent { fill: var(--kids-green); }

/* === KIDS CONTAINER (5 pages) === */
body.kids-mode #container { display: none !important; }
body.kids-mode .footer-nav { display: none !important; }

#kids-container {
  display: none;
  flex-direction: row;
  width: 500vw;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
  margin: 0; padding: 0;
  padding-top: 40px;
  position: relative;
  z-index: 1;
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
}
body.kids-mode #kids-container { display: flex; }

.kids-page {
  width: 100vw;
  flex-shrink: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  height: 100%;
  min-height: 0;
  background: var(--kids-bg);
}

/* === KIDS TAB BAR === */
#kids-footer-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--kids-border);
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
body.kids-mode #kids-footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.kids-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: none;
  padding: 8px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s;
  min-width: 56px;
}
.kids-tab-item svg {
  width: 32px;
  height: 32px;
  stroke: var(--kids-t3);
  stroke-width: 1.5;
  fill: none;
  transition: stroke 0.2s, transform 0.2s;
}
.kids-tab-item span {
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--kids-t3);
  transition: color 0.2s;
}
.kids-tab-item.active svg {
  stroke: var(--kids-green);
  transform: scale(1.1);
}
.kids-tab-item.active span {
  color: var(--kids-green);
}
.kids-tab-item:active {
  transform: scale(0.9);
}
.kids-tab-item:focus,
.kids-tab-item:focus-visible {
  outline: none;
}

/* === Garden section titles === */
.kids-garden-section-title {
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--kids-t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 18px 0 10px;
}

/* === KIDS CARDS === */
.kids-card {
  background: var(--kids-surface);
  border-radius: var(--kids-radius);
  border: 1px solid var(--kids-border);
  box-shadow: var(--kids-shadow);
  padding: 20px;
  margin-bottom: 16px;
  touch-action: manipulation;
}

/* === KIDS SETUP FLOW === */
#kids-setup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: #FFF8F0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #2D2D2D;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#kids-setup-overlay.visible { display: flex; }
body.kids-setup-active { overflow: hidden !important; }
body.kids-setup-active .footer-nav { display: none !important; }
body.kids-setup-active .topbar { display: none !important; }
body.kids-setup-active #container { display: none !important; }

.kids-setup-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  width: 100%;
  max-width: 360px;
  animation: kidsFadeIn 0.3s ease;
}
.kids-setup-screen.active { display: flex; }

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

.kids-setup-h {
  font-family: 'Quicksand', -apple-system, sans-serif !important;
  font-size: 26px;
  font-weight: 700;
  color: #2D2D2D !important;
  margin-bottom: 12px;
}
.kids-setup-p {
  font-family: 'Quicksand', -apple-system, sans-serif !important;
  font-size: 15px;
  color: #6B6B6B !important;
  margin-bottom: 24px;
  line-height: 1.5;
}
.kids-setup-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  font-family: 'Quicksand', -apple-system, sans-serif !important;
  font-size: 17px;
  font-weight: 700;
  color: #fff !important;
  background: #7BC67E !important;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  margin-bottom: 12px;
}
.kids-setup-btn:active { transform: scale(0.96); opacity: 0.9; }
.kids-setup-btn:disabled { opacity: 0.5; }

.kids-setup-btn-secondary {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 12px 24px;
  border: 2px solid rgba(0,0,0,0.10) !important;
  border-radius: 16px;
  font-family: 'Quicksand', -apple-system, sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  color: #6B6B6B !important;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s;
}
.kids-setup-btn-secondary:active { transform: scale(0.96); }

/* === KIDS NAME INPUT === */
.kids-name-input {
  width: 100%;
  max-width: 280px;
  padding: 14px 16px;
  border: 2px solid rgba(0,0,0,0.10) !important;
  border-radius: 16px;
  font-family: 'Quicksand', -apple-system, sans-serif !important;
  font-size: 18px;
  font-weight: 600;
  color: #2D2D2D !important;
  background: #fff;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 20px;
}
.kids-name-input:focus {
  border-color: #7BC67E !important;
}
.kids-name-input::placeholder {
  color: #9E9E9E !important;
  font-weight: 500;
}

/* === PIN INPUT === */
.kids-pin-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}
.kids-pin-digit {
  width: 52px;
  height: 60px;
  border: 2px solid rgba(0,0,0,0.10) !important;
  border-radius: 14px;
  font-family: 'Quicksand', -apple-system, sans-serif !important;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: #2D2D2D !important;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, transform 0.15s;
  -webkit-text-security: disc;
}
.kids-pin-digit:focus {
  border-color: #7BC67E !important;
  transform: scale(1.05);
}
.kids-pin-digit.error {
  border-color: #FF8A8A !important;
  animation: kidsShake 0.4s ease;
}
@keyframes kidsShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.kids-pin-error {
  color: #FF8A8A !important;
  font-size: 14px;
  font-weight: 600;
  margin-top: -12px;
  margin-bottom: 16px;
  min-height: 20px;
}

/* === REQUIRE PIN OVERLAY === */
#kids-pin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10500;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#kids-pin-overlay.visible { display: flex; }

.kids-pin-modal {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  width: 90%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  animation: kidsFadeIn 0.3s ease;
}
.kids-pin-modal h3 {
  font-family: 'Quicksand', -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #2D2D2D;
  margin-bottom: 8px;
}
.kids-pin-modal p {
  font-family: 'Quicksand', -apple-system, sans-serif;
  font-size: 14px;
  color: #6B6B6B;
  margin-bottom: 20px;
}
.kids-pin-cancel {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 24px;
  border: none;
  background: none;
  font-family: 'Quicksand', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #9E9E9E;
  cursor: pointer;
}

.kids-pin-forgot {
  margin-top: 10px;
  font-family: 'Quicksand', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #7EB6FF;
  cursor: pointer;
}
.kids-pin-forgot:active { opacity: 0.6; }

.kids-reset-code-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}
.kids-reset-code-digit {
  width: 44px;
  height: 52px;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  font-family: 'Quicksand', -apple-system, sans-serif;
  color: #2D2D2D;
  background: #FAFAFA;
  outline: none;
  transition: border-color 0.2s;
}
.kids-reset-code-digit:focus { border-color: #7EB6FF; background: #fff; }
.kids-reset-code-digit.error { border-color: #FF6B6B; }

/* === KIDS MY PLANT PAGE === */
.kids-greeting {
  font-family: var(--kids-font);
  font-size: 24px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 4px;
}
.kids-subtitle {
  font-family: var(--kids-font);
  font-size: 14px;
  color: var(--kids-t2);
  margin-bottom: 20px;
}
.kids-empty-plant {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.kids-empty-plant svg {
  margin-bottom: 16px;
  opacity: 0.6;
}
.kids-empty-plant p {
  font-family: var(--kids-font);
  font-size: 16px;
  color: var(--kids-t2);
  font-weight: 600;
}
.kids-choose-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 32px;
  border: none;
  border-radius: 16px;
  font-family: var(--kids-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--kids-surface-hi);
  background: var(--kids-green);
  cursor: pointer;
  transition: transform 0.15s;
}
.kids-choose-btn:active { transform: scale(0.95); }

/* === KIDS STUB PAGES === */
.kids-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  min-height: 50vh;
}
.kids-stub-icon {
  margin-bottom: 20px;
  opacity: 0.5;
}
.kids-stub h2 {
  font-family: var(--kids-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 8px;
}
.kids-stub p {
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t2);
}
.kids-coming-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--kids-yellow);
  color: var(--kids-yellow-dark);
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 700;
}

/* === KIDS HELP PAGE === */
.kids-help-card {
  background: var(--kids-surface);
  border-radius: var(--kids-radius);
  border: 1px solid var(--kids-border);
  box-shadow: var(--kids-shadow);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.15s;
}
.kids-help-card:active { transform: scale(0.97); }
.kids-help-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kids-help-card-text h4 {
  font-family: var(--kids-font);
  font-size: 15px;
  font-weight: 700;
  color: var(--kids-t1);
  margin: 0 0 2px 0;
}
.kids-help-card-text p {
  font-family: var(--kids-font);
  font-size: 13px;
  color: var(--kids-t2);
  margin: 0;
}

/* === PARENT SETTINGS PANEL (inside Help) === */
.kids-parent-panel {
  background: var(--kids-surface);
  border-radius: var(--kids-radius);
  border: 1px solid var(--kids-border);
  box-shadow: var(--kids-shadow);
  padding: 20px;
  margin-top: 16px;
}
.kids-parent-panel h3 {
  font-family: var(--kids-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 16px;
}
.kids-parent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--kids-border);
}
.kids-parent-row:last-child { border-bottom: none; }
.kids-parent-row-label {
  font-family: var(--kids-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--kids-t1);
}
.kids-parent-row-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 12px;
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--kids-green);
  cursor: pointer;
  transition: transform 0.15s;
}
.kids-parent-row-btn:active { transform: scale(0.95); }
.kids-parent-row-btn.danger {
  background: var(--kids-red);
}
.kids-parent-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}
.kids-parent-toggle input { opacity: 0; width: 0; height: 0; }
.kids-parent-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--kids-border-hi);
  border-radius: 14px;
  transition: background 0.25s;
}
.kids-parent-toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}
.kids-parent-toggle input:checked + .kids-parent-toggle-slider {
  background: var(--kids-green);
}
.kids-parent-toggle input:checked + .kids-parent-toggle-slider::before {
  transform: translateX(20px);
}

/* === MY PLANT PAGE — EMPTY STATE === */
.kids-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
}
.kids-empty-title {
  font-family: var(--kids-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--kids-t1);
  margin: 16px 0 6px;
}
.kids-empty-sub {
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t2);
  margin-bottom: 24px;
}

/* === BIG BUTTONS === */
.kids-big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  max-width: 400px;
  margin: 0 auto;
  min-height: 56px;
  border: none;
  border-radius: 28px;
  font-family: var(--kids-font);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s, opacity 0.15s;
  text-align: center;
  padding: 10px 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kids-action-pair .kids-big-btn {
  font-size: 15px;
  padding: 10px 12px;
  min-height: 60px;
}
.kids-big-btn:active { transform: scale(0.96); opacity: 0.9; }
.kids-big-btn:disabled { opacity: 0.45; pointer-events: none; }
.kids-big-btn-green { background: var(--kids-green); }
.kids-big-btn-blue { background: var(--kids-blue); }
.kids-big-btn-purple { background: var(--kids-purple); }
.kids-big-btn-yellow { background: var(--kids-yellow); color: var(--kids-yellow-dark); }

/* === PLANT CARD === */
.kids-plant-card {
  background: var(--kids-surface);
  border-radius: 24px;
  border: 1px solid var(--kids-border);
  box-shadow: var(--kids-shadow);
  padding: 24px 20px;
  margin-bottom: 16px;
  text-align: center;
}
.kids-farm-svg-center {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.kids-farm-svg-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,248,240,0.5);
  padding: 8px;
}
/* Pastel recolor for farm SVG inside kids mode */
.kids-farm-svg-wrap svg rect[fill="#3f3f46"],
.kids-farm-svg-wrap svg rect[fill="#27272a"] { fill: #C8B89E !important; }
.kids-farm-svg-wrap svg rect[fill="#52525b"],
.kids-farm-svg-wrap svg rect[fill="#18181b"] { fill: #D9C8AE !important; }
.kids-farm-svg-wrap svg rect[fill="#fde047"],
.kids-farm-svg-wrap svg line[stroke="#fde047"] { fill: #FFE5A0 !important; stroke: #FFE5A0 !important; }
.kids-farm-svg-wrap svg [fill="#22c55e"],
.kids-farm-svg-wrap svg [fill="#58C45A"],
.kids-farm-svg-wrap svg [stroke="#22c55e"],
.kids-farm-svg-wrap svg [stroke="#58C45A"] { fill: #7FC97F !important; stroke: #7FC97F !important; }
.kids-farm-svg-wrap svg [fill="#3b82f6"],
.kids-farm-svg-wrap svg [fill="rgba(59,130,246,0.3)"] { fill: #A5D8E6 !important; }
.kids-farm-svg-wrap svg [fill="#71717a"],
.kids-farm-svg-wrap svg [fill="#a1a1aa"] { fill: #C9A57B !important; }
.kids-farm-svg-wrap svg [fill="#d4d4d8"] { fill: #E8DFD0 !important; }
.kids-farm-svg-wrap svg [stroke="#71717a"],
.kids-farm-svg-wrap svg [stroke="#a1a1aa"] { stroke: #C9A57B !important; }
.kids-farm-svg-wrap svg [fill="rgba(59,130,246,0.15)"] { fill: rgba(165,216,230,0.3) !important; }
.kids-farm-svg-wrap svg { background: transparent !important; }

/* Weather mood indicator */
.kids-mood-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.kids-mood-great { background: rgba(123,198,126,0.12); color: var(--kids-green-dark); }
.kids-mood-ok { background: rgba(255,224,102,0.15); color: var(--kids-yellow-dark); }
.kids-mood-help { background: rgba(255,138,138,0.12); color: var(--kids-red); }

/* Nursery info tooltip */
.kids-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  font-size: 12px;
  font-weight: 700;
  color: var(--kids-t3);
  cursor: pointer;
  margin-left: 6px;
  flex-shrink: 0;
}

/* Garden currently growing card */
.kids-growing-now {
  background: linear-gradient(135deg, rgba(123,198,126,0.08), rgba(165,216,230,0.08));
  border: 2px solid rgba(123,198,126,0.2);
}
.kids-growing-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 8px;
  background: rgba(123,198,126,0.15);
  color: var(--kids-green-dark);
  font-family: var(--kids-font);
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

/* Badge sections */
.kids-badge-section-title {
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--kids-t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px;
}
.kids-badge-progress {
  font-family: var(--kids-font);
  font-size: 12px;
  color: var(--kids-t3);
  margin-top: 2px;
}

/* Diary emoji grid */
.kids-diary-emoji-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.kids-diary-emoji-grid .kids-diary-emoji-btn { width: 100%; }

/* Diary prompt chips */
.kids-diary-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.kids-diary-prompt-chip {
  padding: 6px 12px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  font-family: var(--kids-font);
  font-size: 13px;
  color: var(--kids-t2);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.kids-diary-prompt-chip:active {
  background: rgba(123,198,126,0.1);
  border-color: rgba(123,198,126,0.3);
}

/* Help content page */
.kids-help-content {
  padding: 24px 20px;
  text-align: left;
}
.kids-help-content h2 {
  font-family: var(--kids-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 16px;
}
.kids-help-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.kids-help-step:last-child { border-bottom: none; }
.kids-help-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--kids-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.kids-help-step-text {
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t1);
  line-height: 1.5;
}
.kids-help-fact {
  background: rgba(255,224,102,0.1);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 12px 0;
  font-family: var(--kids-font);
  font-size: 14px;
  color: var(--kids-t1);
  line-height: 1.5;
}

/* Help bottom sheet sections */
.kids-help-section {
  margin-bottom: 20px;
}
.kids-help-section:last-child { margin-bottom: 0; }
.kids-help-emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}
.kids-help-section h4 {
  font-family: var(--kids-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--kids-t1);
  margin: 0 0 4px 0;
}
.kids-help-section p {
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t2);
  line-height: 1.5;
  margin: 0;
}

/* Settings Family section */
.kids-settings-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.kids-settings-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(196,168,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kids-plant-name {
  font-family: var(--kids-font);
  font-size: 28px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 2px;
}
.kids-plant-type {
  font-family: var(--kids-font);
  font-size: 14px;
  color: var(--kids-t2);
  margin-bottom: 4px;
}

/* === EMOTION BUBBLE === */
.kids-emotion-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(123,198,126,0.08);
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 12px;
}
.kids-emotion-emoji { font-size: 28px; line-height: 1; }
.kids-emotion-text {
  font-family: var(--kids-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--kids-t1);
}

/* === 5-PHASE PROGRESS BAR (kids) === */
.kids-progress-section {
  margin-bottom: 20px;
  padding: 0 4px;
}
.kids-phase-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
  padding: 0 4px;
}
.kids-phase-step {
  display: flex; flex-direction: column; align-items: center;
  flex: 0 0 auto;
  width: 48px;
}
.kids-phase-ring {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.kids-phase-circle {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  z-index: 1;
  position: relative;
}
.kids-phase-check {
  position: absolute; right: -2px; top: -2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--kids-green);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
/* Past: filled green circle */
.kids-phase-step-past .kids-phase-circle {
  background: rgba(123,198,126,0.35);
}
.kids-phase-step-past .kids-phase-name {
  color: var(--kids-green);
  font-weight: 700;
}
/* Current: conic-gradient ring + inner circle on top + pulse */
.kids-phase-step-current .kids-phase-ring {
  background: conic-gradient(var(--kids-green) calc(var(--phase-pct, 0%) * 1), rgba(0,0,0,0.08) 0);
  animation: kidsPhaseCurrentPulse 1.5s ease-in-out infinite;
}
.kids-phase-step-current .kids-phase-circle {
  width: 38px; height: 38px;
  background: #FFFBEA;
}
.kids-phase-step-current .kids-phase-name {
  color: var(--kids-green);
  font-weight: 700;
}
@keyframes kidsPhaseCurrentPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
/* Future: dimmed */
.kids-phase-step-future .kids-phase-circle { opacity: 0.45; }
.kids-phase-step-future .kids-phase-name { opacity: 0.5; }
.kids-phase-name {
  font-family: var(--kids-font);
  font-size: 10px;
  font-weight: 600;
  color: var(--kids-t2);
  margin-top: 4px;
  text-align: center;
  line-height: 1.1;
}
/* Connector between phases */
.kids-phase-link, .kids-phase-link-done {
  height: 2px; width: 10px;
  background: rgba(0,0,0,0.12);
  border-radius: 1px;
  margin-top: 23px;
  flex: 0 0 auto;
}
.kids-phase-link-done { background: var(--kids-green); }

.kids-progress-label {
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--kids-t2);
  text-align: center;
}
/* Legacy (kept so nothing breaks if lingering markup) */
.kids-progress-bar { display: none; }
.kids-progress-fill { display: none; }
.kids-phase-progress { display: none; }
.kids-phase-dot { display: none; }

/* === CHECK SHEET === */
.kids-check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kids-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
}
.kids-check-icon { font-size: 24px; flex-shrink: 0; }
.kids-check-label {
  font-family: var(--kids-font);
  font-size: 14px;
  color: var(--kids-t2);
  flex: 1;
}
.kids-check-val {
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

/* === SPECIAL CARDS (movie, pause, harvest) === */
.kids-special-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  position: relative;
}
.kids-special-h {
  font-family: var(--kids-font);
  font-size: 24px;
  font-weight: 700;
  color: var(--kids-t1);
  margin: 16px 0 8px;
}
.kids-special-p {
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t2);
  margin-bottom: 24px;
}
.kids-special-harvest { position: relative; overflow: hidden; }
.kids-confetti-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,224,102,0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 60%, rgba(255,179,198,0.15) 0%, transparent 50%),
              radial-gradient(circle at 50% 10%, rgba(123,198,126,0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* === HARVEST STEPS === */
.kids-harvest-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kids-harvest-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.8);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.04);
}
.kids-harvest-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--kids-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.kids-harvest-step-icon { font-size: 22px; flex-shrink: 0; }
.kids-harvest-step-text {
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t1);
  font-weight: 600;
}

/* === GARDEN GRID === */
.kids-garden-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.kids-garden-card, .kids-plant-pick-card {
  background: var(--kids-surface);
  border-radius: var(--kids-radius);
  border: 1px solid var(--kids-border);
  box-shadow: var(--kids-shadow);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
}
.kids-garden-card:active, .kids-plant-pick-card:active { transform: scale(0.96); }

/* Grown marker badge (top-right ✓) */
.kids-grown-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7BC67E 0%, #5A9E5C 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(90,158,92,0.35);
  z-index: 2;
  pointer-events: none;
}

/* "Grown X times" label under plant name */
.kids-pick-grown {
  font-family: var(--kids-font);
  font-size: 11px;
  color: var(--kids-green-dark);
  font-weight: 700;
  margin-top: 4px;
}

/* Story button (bottom-left 📖) */
.kids-pick-story-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--kids-yellow);
  border: 2px solid rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  z-index: 3;
  transition: transform 0.15s;
}
.kids-pick-story-btn:active { transform: scale(0.88); }
.kids-garden-card-icon, .kids-pick-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.kids-garden-card-icon svg, .kids-pick-icon svg { width: 56px; height: 56px; }
.kids-garden-card-name, .kids-pick-name {
  font-family: var(--kids-font);
  font-size: 15px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 2px;
}
.kids-garden-card-type, .kids-pick-time {
  font-family: var(--kids-font);
  font-size: 12px;
  color: var(--kids-t2);
}
.kids-garden-card-date {
  font-family: var(--kids-font);
  font-size: 12px;
  color: var(--kids-t3);
  margin-top: 4px;
}
.kids-harvest-detail-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--kids-surface);
  border: 1px solid var(--kids-border);
  font-family: var(--kids-font);
  font-size: 13px;
  color: var(--kids-t2);
}
.kids-pick-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(123,198,126,0.12);
  color: var(--kids-green-dark);
  font-family: var(--kids-font);
  font-size: 12px;
  font-weight: 700;
}
.kids-choose-header {
  text-align: center;
  margin-bottom: 16px;
}
.kids-choose-title {
  font-family: var(--kids-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 4px;
}
.kids-choose-sub {
  font-family: var(--kids-font);
  font-size: 14px;
  color: var(--kids-t2);
}

/* === PLANT DETAIL === */
.kids-detail-wrap {
  text-align: center;
  padding-bottom: 16px;
}
.kids-detail-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.kids-detail-icon svg { width: 100px; height: 100px; }
.kids-detail-name {
  font-family: var(--kids-font);
  font-size: 26px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 16px;
}
.kids-detail-section-title {
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 700;
  color: var(--kids-t1);
  margin-bottom: 8px;
}
.kids-detail-p {
  font-family: var(--kids-font);
  font-size: 14px;
  color: var(--kids-t2);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* === NAME YOUR PLANT === */
.kids-name-flow {
  text-align: center;
  padding-bottom: 8px;
}
.kids-name-prompt {
  font-family: var(--kids-font);
  font-size: 16px;
  color: var(--kids-t2);
  margin-bottom: 16px;
}
.kids-name-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.kids-name-chip {
  padding: 8px 16px;
  border: 2px solid var(--kids-border-hi);
  border-radius: 20px;
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--kids-t2);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.kids-name-chip:active {
  background: var(--kids-green);
  color: #fff;
  border-color: var(--kids-green);
}

/* === PRE-FLIGHT CHECKLIST === */
.kids-preflight {
  padding-bottom: 8px;
}
.kids-preflight-sub {
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t2);
  margin-bottom: 20px;
  text-align: center;
}
.kids-check-label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--kids-surface);
  border-radius: 16px;
  border: 1px solid var(--kids-border);
  margin-bottom: 10px;
  cursor: pointer;
  font-family: var(--kids-font);
  font-size: 16px;
  font-weight: 600;
  color: var(--kids-t1);
}
.kids-preflight-check {
  width: 22px;
  height: 22px;
  accent-color: var(--kids-green);
  flex-shrink: 0;
}
.kids-preflight-emoji {
  font-size: 22px;
  flex-shrink: 0;
}

/* === DIARY === */
.kids-diary-preview {
  margin-top: 16px;
  cursor: pointer;
}
.kids-diary-header {
  font-family: var(--kids-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--kids-t3);
  margin-bottom: 8px;
}
.kids-diary-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.kids-diary-emoji { font-size: 28px; line-height: 1; }
.kids-diary-text {
  font-family: var(--kids-font);
  font-size: 14px;
  color: var(--kids-t1);
  line-height: 1.4;
}
.kids-diary-tap {
  font-family: var(--kids-font);
  font-size: 12px;
  color: var(--kids-t3);
  margin-top: 6px;
}
.kids-diary-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--kids-t3);
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 600;
}
.kids-diary-card-entry {
  margin-bottom: 10px;
}
.kids-diary-tappable {
  cursor: pointer;
  transition: transform 0.15s;
}
.kids-diary-tappable:active { transform: scale(0.97); }
.kids-diary-date {
  font-family: var(--kids-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--kids-t3);
  margin-bottom: 6px;
}
.kids-diary-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.kids-diary-emoji-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.kids-diary-emoji-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--kids-border-hi);
  border-radius: 12px;
  font-size: 24px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kids-diary-emoji-btn.selected {
  border-color: var(--kids-green);
  background: rgba(123,198,126,0.08);
}
.kids-diary-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border: 2px solid var(--kids-border-hi);
  border-radius: 16px;
  font-family: var(--kids-font);
  font-size: 15px;
  color: var(--kids-t1);
  background: #fff;
  resize: none;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.kids-diary-textarea:focus { border-color: var(--kids-green); }

/* === BADGES === */
.kids-badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.kids-badge-tile {
  background: var(--kids-surface);
  border: 1px solid var(--kids-border);
  border-radius: 16px;
  padding: 14px 8px 12px;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s;
}
.kids-badge-tile:active { transform: scale(0.96); }
.kids-badge-tile.earned {
  background: rgba(123,198,126,0.08);
  border-color: rgba(123,198,126,0.25);
}
.kids-badge-icon { font-size: 40px; display: block; margin-bottom: 6px; }
.kids-badge-title {
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 700;
  color: var(--kids-t1);
  line-height: 1.2;
}
.kids-badge-desc {
  font-family: var(--kids-font);
  font-size: 12px;
  color: var(--kids-t2);
  margin-top: 2px;
}
.kids-badge-date {
  font-family: var(--kids-font);
  font-size: 12px;
  color: var(--kids-green);
  margin-top: 4px;
}
.kids-badge-check, .kids-badge-lock { font-size: 20px; flex-shrink: 0; }

/* === DEV DEBUG === */
.kids-debug-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding: 12px;
  background: rgba(200,184,158,0.08);
  border: 1px dashed rgba(200,184,158,0.3);
  border-radius: 14px;
}
.kids-debug-label {
  font-family: var(--kids-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--kids-t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.kids-debug-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1px solid var(--kids-border);
  background: var(--kids-surface);
  color: var(--kids-t1);
  font-family: var(--kids-font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kids-debug-btn:active {
  background: rgba(123,198,126,0.15);
}
.kids-sim-toggle.active {
  background: rgba(255,138,138,0.2);
  border-color: #FF8A8A;
  color: #D32F2F;
  font-weight: 700;
}

/* === BADGE TOAST === */
.kids-badge-toast {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(123,198,126,0.95), rgba(126,182,255,0.95));
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: top 0.4s cubic-bezier(0.4,0,0.2,1);
  max-width: calc(100vw - 32px);
}
.kids-badge-toast.show { top: 52px; }
.kids-badge-toast-emoji { font-size: 36px; flex-shrink: 0; }
.kids-badge-toast-text {
  display: flex;
  flex-direction: column;
}
.kids-badge-toast-text strong {
  font-family: var(--kids-font);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kids-badge-toast-text span {
  font-family: var(--kids-font);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.kids-badge-toast-tap {
  font-family: var(--kids-font);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-left: auto;
  flex-shrink: 0;
}

/* === ANIMATIONS === */
.kids-bounce-in {
  animation: kidsBounce 0.5s cubic-bezier(0.36, 1.5, 0.5, 1);
}
@keyframes kidsBounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* === BOTTOM SHEET OVERRIDES FOR KIDS === */
body.kids-mode .bs-sheet {
  background: #fff;
  font-family: var(--kids-font);
}
body.kids-mode .bs-title {
  font-family: var(--kids-font);
  color: var(--kids-t1);
}
body.kids-mode .bs-subtitle {
  font-family: var(--kids-font);
  color: var(--kids-t2);
}

/* === DIARY TEMPLATES & EMOJI INSERT === */
.kids-diary-templates {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.kids-diary-template-chip {
  background: rgba(126,182,255,0.12); border: 1.5px solid transparent;
  border-radius: 16px; padding: 7px 14px; font-size: 14px; font-family: var(--kids-font);
  color: #2D2D2D; cursor: pointer; transition: border-color .2s, background .2s;
}
.kids-diary-template-chip.active {
  border-color: #7EB6FF; background: rgba(126,182,255,0.22);
}
.kids-diary-insert-grid {
  margin-bottom: 14px; padding: 10px; background: rgba(255,224,102,0.08);
  border-radius: 14px;
}
.kids-diary-insert-emoji {
  width: 40px; height: 40px; font-size: 22px; background: #fff;
  border: 1.5px solid #e8e8e8; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, border-color .15s;
}
.kids-diary-insert-emoji:active { transform: scale(1.2); border-color: #7EB6FF; }

/* === BADGE ROW ON HOME SCREEN === */
.kids-badge-row {
  display: flex; gap: 6px; align-items: center; margin-bottom: 12px;
  overflow-x: auto; padding: 4px 0; -webkit-overflow-scrolling: touch;
}
.kids-badge-row::-webkit-scrollbar { display: none; }
.kids-badge-row-item {
  width: 40px; height: 40px; min-width: 40px; border-radius: 50%;
  background: rgba(123,198,126,0.12); display: flex; align-items: center;
  justify-content: center; font-size: 20px;
}
.kids-medal-chip {
  display: flex; align-items: center; gap: 4px; padding: 6px 12px;
  border-radius: 20px; font-size: 13px; font-weight: 600;
  font-family: var(--kids-font); cursor: pointer; white-space: nowrap;
  transition: transform .15s;
}
.kids-medal-chip:active { transform: scale(1.05); }
.kids-medal-chip-bronze { background: rgba(196,168,255,0.15); color: #7B61C4; }
.kids-medal-chip-silver { background: rgba(126,182,255,0.15); color: #4A90D9; }
.kids-medal-chip-gold { background: rgba(255,224,102,0.2); color: #B8860B; }

/* === FOG (KIDS) — small dots: drift up + fade in/out === */
@keyframes kidsFogDot {
  0%   { opacity: 0; transform: translateY(0) translateX(0); }
  15%  { opacity: 0.6; }
  40%  { opacity: 0.5; transform: translateY(-3px) translateX(1px); }
  65%  { opacity: 0.55; transform: translateY(-5px) translateX(-0.5px); }
  85%  { opacity: 0.3; transform: translateY(-7px) translateX(0.5px); }
  100% { opacity: 0; transform: translateY(-9px) translateX(0); }
}
.fog-dot-kids {
  animation: kidsFogDot 4s ease-in-out infinite !important;
}

/* === LED BAR + LIGHT RAYS + SPARKLES (KIDS) === */
@keyframes kidsLightRay {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.55; }
}
.kids-light-ray {
  animation: kidsLightRay 2.5s ease-in-out infinite;
}
@keyframes kidsLedSparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}
.kids-led-sparkle {
  animation: kidsLedSparkle 1.8s ease-in-out infinite;
  transform-origin: center;
}
@keyframes kidsLedPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
.kids-led-bar {
  animation: kidsLedPulse 3s ease-in-out infinite;
}

/* === BIG EMOJI CATEGORIES (DIARY) === */
.kids-diary-emoji-cat-title {
  font-size: 12px; color: #9E9E9E; font-weight: 600;
  margin: 10px 0 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.kids-diary-emoji-cat {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: 4px;
}
.kids-diary-insert-emoji.wide {
  width: 100%; height: 38px; font-size: 20px;
}

/* === EDUCATION CARD (FULL CONTENT) === */
.kids-edu-illustration {
  font-size: 72px; text-align: center; margin-bottom: 12px;
  animation: kidsFloat 3s ease-in-out infinite;
}
@keyframes kidsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.kids-edu-title {
  font-family: var(--kids-font); font-size: 22px; font-weight: 700;
  color: #2D2D2D; text-align: center; margin-bottom: 14px; line-height: 1.3;
}
.kids-edu-body p {
  font-size: 16px; color: #2D2D2D; line-height: 1.6; margin: 8px 0;
}
.kids-edu-didyouknow {
  background: rgba(255,224,102,0.2); border-radius: 14px;
  padding: 12px 14px; margin-top: 14px; font-size: 14px;
  color: #6B5A1F; display: flex; gap: 8px; align-items: flex-start;
}
.kids-edu-didyouknow-icon { font-size: 18px; flex-shrink: 0; }

/* === NAME RANDOMIZER === */
.kids-name-randomize {
  background: rgba(196,168,255,0.15); color: #7B61C4;
  border: none; border-radius: 14px; padding: 10px 16px;
  font-size: 14px; font-family: var(--kids-font); font-weight: 600;
  cursor: pointer; margin-top: 4px; margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}

/* === BADGE ROW MEDAL (ORDEN) === */
.kids-badge-medal {
  width: 56px; height: 56px; min-width: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #FFE066 0%, #FFC940 100%);
  box-shadow: 0 3px 10px rgba(255,201,64,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; cursor: pointer;
  animation: kidsMedalAppear 0.8s ease-out;
}
@keyframes kidsMedalAppear {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.kids-badge-plus-n {
  width: 40px; height: 40px; min-width: 40px; border-radius: 50%;
  background: rgba(126,182,255,0.2); color: #4A90D9;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; font-family: var(--kids-font);
}

/* === CHECK DETAIL MINI-CHART === */
.kids-check-chart {
  background: rgba(126,182,255,0.08); border-radius: 14px;
  padding: 14px; margin-top: 12px;
}
.kids-check-chart-bar {
  display: flex; align-items: flex-end; gap: 4px; height: 80px;
  padding: 6px 0;
}
.kids-check-chart-col {
  flex: 1; background: linear-gradient(180deg, #7EB6FF 0%, #A8D0FF 100%);
  border-radius: 4px 4px 0 0; min-height: 4px;
}

/* === TRANSPLANT TWO-BUTTON LAYOUT === */
.kids-action-pair {
  display: flex; gap: 8px; margin-top: 4px;
}
.kids-action-pair .kids-big-btn { flex: 1; }
@keyframes kids-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.kids-btn-pulse { animation: kids-pulse 1.8s ease-in-out infinite; }

/* Attention-grabbing action button (transplant, open dome) */
.kids-big-btn-orange {
  background: linear-gradient(135deg, #FFB87A 0%, #FF9800 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  min-height: 64px !important;
}
@keyframes kids-attention {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(255,152,0,0.35), 0 0 0 0 rgba(255,152,0,0.6); }
  50%      { transform: scale(1.08); box-shadow: 0 8px 28px rgba(255,152,0,0.6), 0 0 0 16px rgba(255,152,0,0), 0 0 24px rgba(255,152,0,0.3); }
}
.kids-btn-attention {
  animation: kids-attention 1s ease-in-out infinite;
  border: 2px solid #fff !important;
}

/* Helper / "Ask a grown-up" secondary button — calm, friendly */
.kids-big-btn-helper {
  background: rgba(126,182,255,0.15) !important;
  color: #4A90D9 !important;
  border: 1.5px dashed rgba(74,144,217,0.4) !important;
  font-size: 14px !important;
  min-height: 48px !important;
  font-weight: 700 !important;
}
.kids-big-btn-helper:active {
  background: rgba(126,182,255,0.25) !important;
}

/* === CLOUD ASSISTANT === */
.kids-cloud-assistant {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  margin: 0 auto 12px; max-width: 300px;
  animation: kidsCloudFloatY 5s ease-in-out infinite, kidsCloudFloatX 7s ease-in-out infinite;
}
.kids-cloud-assistant.kids-cloud-sad {
  animation-duration: 6s, 8s;
}
.kids-cloud-svg {
  display: block;
  overflow: visible;
}
.kids-cloud-text {
  margin-top: -8px;
  font-family: var(--kids-font);
  font-size: 14px;
  font-weight: 600;
  color: #2D2D2D;
  text-align: center;
  padding: 8px 14px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  max-width: 260px;
}
.kids-cloud-sad .kids-cloud-text {
  background: #F5F5F5;
  color: #5A5A5A;
}
@keyframes kidsCloudFloatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-15px); }
}
@keyframes kidsCloudFloatX {
  0%, 100% { margin-left: 0; margin-right: 0; }
  50%      { margin-left: -4px; margin-right: 4px; }
}
/* Blink — eyes squash vertically for ~160ms */
.kids-cloud-eye {
  transform-origin: center;
  transform-box: fill-box;
  transition: transform 0.08s ease-in-out;
}
.kids-cloud-blink .kids-cloud-eye {
  transform: scaleY(0.1);
}
/* Sun rays — pulsing opacity + slow rotation.
   The rays group sits inside <g transform="translate(58,-28)">; its own origin is the sun center. */
.kids-cloud-sun-rays {
  transform-origin: 0 0;
  transform-box: fill-box;
  animation: kidsSunRaysPulse 2s ease-in-out infinite, kidsSunRaysSpin 20s linear infinite;
}
@keyframes kidsSunRaysPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
@keyframes kidsSunRaysSpin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}
/* Moon — floating z-z-z sleep letters */
.kids-cloud-z {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  animation: kidsCloudZ 3s ease-in-out infinite;
}
.kids-cloud-z2 { animation-delay: 0.8s; }
.kids-cloud-z3 { animation-delay: 1.6s; }
@keyframes kidsCloudZ {
  0%   { opacity: 0; transform: translateY(0); }
  20%  { opacity: 1; }
  80%  { opacity: 0.8; transform: translateY(-15px); }
  100% { opacity: 0; transform: translateY(-22px); }
}

/* === MEDAL (badges) === */
.kids-medal {
  display: block;
  transition: transform 0.2s;
}
.kids-medal-earned {
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.18));
}
.kids-medal-locked {
  filter: grayscale(1) opacity(0.4);
}
.kids-medal-earned:active { transform: scale(1.08); }
.kids-medal-new {
  animation: kidsMedalBounce 0.8s cubic-bezier(0.68,-0.55,0.27,1.55),
             kidsMedalGlow 2s ease-in-out 0.6s;
}
@keyframes kidsMedalBounce {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes kidsMedalGlow {
  0%, 100% { filter: drop-shadow(0 2px 5px rgba(0,0,0,0.18)); }
  50%      { filter: drop-shadow(0 0 12px rgba(255,215,0,0.8)); }
}
.kids-badge-row-medal {
  cursor: pointer;
  min-width: 48px;
  display: flex; align-items: flex-start;
}
.kids-badge-medal-wrap {
  display: flex; justify-content: center; margin-bottom: 6px;
}

/* =====================================================================
   === ACADEMY ===
   Phase 1 styles for the new Academy tab (replaces Badges).
   Paper-texture background + Dr. Sprout speech bubble + mission cards.
   Fredoka for headings, Caveat for handwritten accents, Quicksand body.
===================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;700&family=Caveat:wght@600&display=swap");

.academy-container {
  background-color: #FAF5E8;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' seed='4'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.78  0 0 0 0 0.62  0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  min-height: 100%;
  font-family: "Quicksand", -apple-system, sans-serif;
  color: #2d2d2d;
}

.academy-header {
  text-align: center;
  margin-bottom: 18px;
  padding-top: 6px;
}
.academy-hi {
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #4a7c4a;
  line-height: 1.1;
}
.academy-hi-name {
  font-family: "Caveat", "Quicksand", cursive;
  font-size: 32px;
  color: #b8860b;
  font-weight: 700;
}
.academy-sub {
  font-size: 13px;
  color: #6b6b6b;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.academy-section-title {
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #4a7c4a;
  margin: 20px 4px 10px;
}

/* ----- Dr. Sprout speech bubble ----- */
.sprout-speech {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(74, 124, 74, 0.18);
  border-radius: 18px;
  padding: 14px;
  margin: 0 0 18px;
  box-shadow: 0 3px 10px rgba(74, 124, 74, 0.08);
}
.sprout-avatar-wrap {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  animation: sproutFloat 4s ease-in-out infinite;
}
.sprout-avatar { display: block; width: 100%; height: 100%; }
@keyframes sproutFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.sprout-bubble {
  flex: 1;
  position: relative;
  background: #ffffff;
  border: 1.5px solid #e6dfc7;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #2d2d2d;
}
.sprout-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 18px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 7px solid #ffffff;
}
.sprout-bubble::after {
  content: "";
  position: absolute;
  left: -9px;
  top: 17px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 8px solid #e6dfc7;
  z-index: -1;
}
.sprout-bubble-text {
  font-weight: 500;
}

/* ----- Mission cards ----- */
.mission-card {
  background: #ffffff;
  border: 2px solid #e6dfc7;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(74, 124, 74, 0.06);
  transition: transform 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}
.mission-card-available {
  cursor: pointer;
  border-color: #4a7c4a;
}
.mission-card-available:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(74, 124, 74, 0.18);
}
.mission-card-in-progress {
  border-color: #b8860b;
  background: linear-gradient(135deg, #ffffff 0%, #fdf6e3 100%);
  cursor: pointer;
}
.mission-card-completed {
  border-color: #7bc67e;
  background: rgba(123, 198, 126, 0.1);
}
.mission-card-locked {
  opacity: 0.55;
  filter: grayscale(0.3);
}
.mission-card-coming-soon {
  opacity: 0.7;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.6);
}

.mission-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.mission-emoji {
  font-size: 28px;
  flex: 0 0 auto;
  width: 40px;
  text-align: center;
}
.mission-card-title-wrap { flex: 1; min-width: 0; }
.mission-card-name {
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #2d2d2d;
  line-height: 1.2;
}
.mission-card-meta {
  font-size: 11px;
  color: #8e8e8e;
  margin-top: 2px;
  text-transform: capitalize;
}
.mission-card-desc {
  font-size: 13px;
  color: #555555;
  line-height: 1.4;
  margin-left: 50px;
}
.mission-status {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.mission-status-available    { background: rgba(74, 124, 74, 0.14);  color: #4a7c4a; }
.mission-status-in-progress  { background: rgba(184, 134, 11, 0.18); color: #8f6a08; }
.mission-status-completed    { background: rgba(123, 198, 126, 0.22); color: #3a8a3d; }
.mission-status-locked       { background: rgba(150, 150, 150, 0.18); color: #888888; }
.mission-status-soon         { background: rgba(150, 150, 150, 0.18); color: #888888; }

.academy-plant-cards-stub {
  text-align: center;
  font-size: 13px;
  color: #8e8e8e;
  padding: 20px;
  border: 1.5px dashed #d4c9a5;
  border-radius: 14px;
  margin-top: 20px;
}

/* =====================================================================
   === ACADEMY MISSION SCREENS (Phase 2 — E4) ===
===================================================================== */
.academy-back-btn {
  background: none; border: none;
  color: #4a7c4a; font-family: "Quicksand", sans-serif;
  font-size: 14px; font-weight: 600;
  padding: 6px 0; margin-bottom: 10px;
  cursor: pointer; touch-action: manipulation;
}
.screen-title {
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-size: 22px; font-weight: 700; color: #4a7c4a;
  text-align: center; margin: 12px 0 14px;
  line-height: 1.2;
}
.academy-streak {
  display: inline-block;
  background: #fff9d6; color: #8f6a08;
  font-size: 13px; font-weight: 700;
  padding: 4px 12px; border-radius: 12px;
  border: 1.5px solid #f0d56b;
  margin: 0 auto 10px; text-align: center;
}

/* --- Briefing --- */
.mission-briefing .briefing-emoji {
  font-size: 84px; text-align: center; margin: 10px 0 4px;
}
.mission-briefing .briefing-title {
  font-family: "Fredoka", sans-serif;
  font-size: 28px; font-weight: 700; color: #4a7c4a;
  text-align: center; margin-bottom: 4px;
}
.mission-briefing .briefing-meta {
  text-align: center; font-size: 13px; color: #6b6b6b;
  margin-bottom: 14px; text-transform: capitalize;
}
.mission-briefing .briefing-list {
  background: #ffffff; border: 1.5px solid #e6dfc7;
  border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
}
.mission-briefing .briefing-item {
  font-size: 14px; color: #2d2d2d; margin: 6px 0;
  line-height: 1.4;
}

/* --- Plant selection --- */
.plant-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.plant-select-card {
  background: #ffffff; border: 2px solid #e6dfc7;
  border-radius: 14px; padding: 12px 8px;
  text-align: center; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  touch-action: manipulation;
}
.plant-select-card:active { transform: scale(0.97); }
.plant-select-card.selected {
  border-color: #4a7c4a; background: #eafbe3;
  box-shadow: 0 2px 8px rgba(74, 124, 74, 0.2);
}
.plant-select-emoji { font-size: 36px; }
.plant-select-name {
  font-family: "Fredoka", sans-serif;
  font-size: 14px; font-weight: 700; color: #2d2d2d;
  margin-top: 6px; line-height: 1.2;
}
.plant-select-meta { font-size: 11px; color: #8e8e8e; margin-top: 2px; }

/* --- Prediction --- */
.prediction-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 16px;
}
.prediction-card {
  background: #ffffff; border: 2px solid #e6dfc7;
  border-radius: 18px; padding: 18px 10px;
  text-align: center; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  touch-action: manipulation;
}
.prediction-card:active { transform: scale(0.97); }
.prediction-card.selected {
  border-color: #b8860b; background: #fdf6e3;
  transform: scale(1.02);
}
.prediction-emoji { font-size: 48px; }
.prediction-name {
  font-family: "Fredoka", sans-serif;
  font-size: 15px; font-weight: 700; color: #2d2d2d;
  margin-top: 8px;
}

/* --- In progress / progress bar --- */
.progress-days {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; margin: 14px 0 18px;
}
.progress-day {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  border-radius: 50%; background: #e0e0e0; color: #999;
}
.progress-day-past { background: #c8e6c9; color: #4a7c4a; }
.progress-day-current {
  background: #4a7c4a; color: #fff;
  box-shadow: 0 0 0 3px rgba(74, 124, 74, 0.3);
  transform: scale(1.1);
}
.progress-day-future { background: #f0e9d0; color: #a89661; }
.progress-day.is-checkpoint { outline: 2px solid #b8860b; }
.academy-debug {
  background: #fff8e1; border: 1.5px dashed #f0c36b;
  border-radius: 12px; padding: 10px; margin: 12px 0;
  text-align: center;
}
.academy-debug-label {
  font-size: 10px; font-weight: 700; color: #8f6a08;
  letter-spacing: 1px; margin-bottom: 6px;
}
.academy-debug-btn {
  display: inline-block; margin: 4px;
  background: #fff; border: 1.5px solid #f0c36b;
  color: #8f6a08; font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 10px; cursor: pointer;
  touch-action: manipulation;
}

/* --- Check-in --- */
.checkin-screen .checkin-header { text-align: center; margin-bottom: 12px; }
.checkin-day-chip {
  display: inline-block; background: #4a7c4a; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 12px;
  letter-spacing: 1px; margin-bottom: 6px;
}
.surprise-box {
  border-radius: 14px; padding: 12px 14px; margin-bottom: 14px;
  border: 2px solid transparent;
}
.surprise-box.sm-science  { background: #fff4e6; border-color: #f59e0b; }
.surprise-box.sm-edu      { background: #f3e8ff; border-color: #a855f7; }
.surprise-box.sm-char     { background: #e8f5e9; border-color: #7bc67e; }
.surprise-icon { font-size: 24px; }
.surprise-title {
  font-family: "Fredoka", sans-serif;
  font-size: 15px; font-weight: 700; color: #2d2d2d;
  margin-top: 4px;
}
.surprise-body { font-size: 13px; color: #555; line-height: 1.4; margin-top: 4px; }

.photo-capture {
  background: #fff; border: 2px dashed #d4c9a5;
  border-radius: 14px; padding: 20px 14px; margin-bottom: 14px;
  text-align: center;
}
.photo-capture-placeholder { font-size: 48px; margin-bottom: 8px; opacity: 0.6; }
.photo-capture-img {
  max-width: 100%; max-height: 280px; border-radius: 10px;
  display: block; margin: 0 auto;
}

.obs-section { margin: 12px 0 14px; }
.obs-title {
  font-family: "Fredoka", sans-serif;
  font-size: 15px; font-weight: 700; color: #4a7c4a;
  margin-bottom: 8px;
}
.obs-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.obs-pill {
  background: #fff; border: 1.5px solid #e6dfc7;
  color: #2d2d2d; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 14px; cursor: pointer;
  font-family: "Quicksand", sans-serif;
  touch-action: manipulation;
}
.obs-pill.selected { background: #eafbe3; border-color: #4a7c4a; color: #4a7c4a; }

/* --- Sketch canvas (in bottom sheet) --- */
.sketch-canvas-wrap { padding: 4px 0; }
.sketch-colors { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; }
.sketch-color {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #fff; cursor: pointer;
  box-shadow: 0 0 0 1px #ccc;
}
.sketch-color.selected { box-shadow: 0 0 0 3px #4a7c4a; }

/* --- Measurement --- */
.measurement-cards { margin: 10px 0 16px; }
.plant-measure {
  background: #fff; border: 2px solid #e6dfc7;
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
}
.plant-measure-name {
  font-family: "Fredoka", sans-serif;
  font-size: 15px; font-weight: 700; color: #2d2d2d;
  margin-bottom: 8px;
}
.ruler-slider-wrap {
  display: flex; align-items: center; gap: 10px;
}
.ruler-slider {
  flex: 1; height: 28px;
  -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, #7bc67e 0%, #4a7c4a 100%);
  border-radius: 14px; outline: none;
}
.ruler-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 3px solid #4a7c4a;
  cursor: pointer;
}
.ruler-slider::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 3px solid #4a7c4a;
  cursor: pointer;
}
.ruler-value {
  flex: 0 0 60px; text-align: right;
  font-family: "Fredoka", sans-serif;
  font-size: 16px; font-weight: 700; color: #4a7c4a;
}

/* --- Results / race --- */
.results-screen { position: relative; overflow: hidden; }
.race-result { margin: 14px 0 16px; }
.race-bar-wrap { margin-bottom: 12px; }
.race-bar-label {
  font-family: "Fredoka", sans-serif;
  font-size: 14px; font-weight: 700; color: #2d2d2d;
  margin-bottom: 4px;
}
.race-bar-track {
  width: 100%; height: 28px;
  background: rgba(74, 124, 74, 0.1); border-radius: 14px;
  overflow: hidden;
}
.race-bar-fill {
  height: 100%; background: linear-gradient(90deg, #7bc67e, #4a7c4a);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 10px; box-sizing: border-box;
  transition: width 0.8s ease-out;
}

/* Confetti */
.confetti-layer {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}
.confetti-bit {
  position: absolute; top: -30px; font-size: 18px;
  animation: confettiFall 2s linear forwards;
  will-change: transform, opacity;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(500px) rotate(540deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-bit { animation: none; display: none; }
}

/* --- Award ceremony / Plant Card preview (inline HTML) --- */
.award-ceremony .plant-card-preview {
  margin: 16px 0;
  display: flex; justify-content: center;
}
.pc-card {
  width: 100%; max-width: 320px;
  background: linear-gradient(180deg, #FAF5E8 0%, #f1e8d0 100%);
  border: 6px solid #4a7c4a; border-radius: 20px;
  padding: 20px 16px; text-align: center;
  box-shadow: 0 6px 20px rgba(74, 124, 74, 0.2);
  position: relative;
}
.pc-card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: #4a7c4a;
  letter-spacing: 1px; margin-bottom: 12px;
}
.pc-card-academy { color: #b8860b; letter-spacing: 2px; }
.pc-card-emoji { font-size: 56px; margin: 4px 0; }
.pc-card-title {
  font-family: "Fredoka", sans-serif;
  font-size: 22px; font-weight: 700; color: #4a7c4a;
  margin-top: 4px;
}
.pc-card-role {
  font-size: 12px; color: #8f6a08; letter-spacing: 1.5px;
  margin-top: 2px;
}
.pc-card-winner {
  margin: 14px auto; padding: 10px 12px;
  background: rgba(123, 198, 126, 0.2);
  border: 1.5px dashed #4a7c4a; border-radius: 10px;
  font-size: 14px; color: #2d2d2d;
}
.pc-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; border-top: 1.5px dashed #d4c9a5;
  padding-top: 10px;
  font-size: 12px; color: #6b6b6b;
}
.pc-card-name {
  font-family: "Caveat", cursive;
  font-size: 20px; color: #b8860b; font-weight: 700;
}

.award-png-slot { margin-top: 14px; text-align: center; }
.award-png-img { max-width: 100%; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,0.14); }
.award-png-link {
  display: inline-block; margin-top: 8px;
  color: #4a7c4a; font-size: 13px; font-weight: 600;
  text-decoration: underline;
}

/* --- Plant card mini (Academy home list) --- */
.pc-mini {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid #e6dfc7;
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
  cursor: pointer; touch-action: manipulation;
}
.pc-mini-emoji { font-size: 28px; }
.pc-mini-info { flex: 1; }
.pc-mini-title {
  font-family: "Fredoka", sans-serif;
  font-size: 14px; font-weight: 700; color: #2d2d2d;
}
.pc-mini-date { font-size: 11px; color: #8e8e8e; margin-top: 2px; }

/* =====================================================================
   === ACADEMY PHASE 3 — delivery status, collection grid, role progress ===
===================================================================== */

/* --- Delivery status panel --- */
.delivery-status {
  margin: 14px 0;
  background: #ffffff; border: 1.5px solid #e6dfc7;
  border-radius: 14px; padding: 10px 12px;
}
.delivery-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; font-size: 14px; color: #2d2d2d;
  border-bottom: 1px solid #f2ead0;
}
.delivery-row:last-child { border-bottom: none; }
.delivery-row-muted { color: #8e8e8e; }
.delivery-icon { font-size: 20px; width: 28px; text-align: center; }
.delivery-label { flex: 1; font-weight: 600; }
.delivery-state { flex: 0 0 auto; font-size: 13px; font-weight: 700; }
.delivery-row.delivery-ok .delivery-state     { color: #3a8a3d; }
.delivery-row.delivery-failed .delivery-state { color: #c43636; }
.delivery-row.delivery-queued .delivery-state { color: #8f6a08; }
.delivery-row.delivery-pending .delivery-state { color: #8e8e8e; }

/* --- Role progress rows --- */
.role-progress-row {
  background: #ffffff; border: 1.5px solid #e6dfc7;
  border-radius: 14px; padding: 10px 12px; margin-bottom: 8px;
}
.role-progress-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.role-progress-icon { font-size: 20px; }
.role-progress-name {
  flex: 1;
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-weight: 700; color: #2d2d2d; font-size: 15px;
}
.role-progress-count {
  font-size: 12px; font-weight: 700; color: #6b6b6b;
  background: #f2ead0; padding: 2px 8px; border-radius: 10px;
}
.role-progress-bar {
  width: 100%; height: 8px;
  background: rgba(0,0,0,0.06); border-radius: 4px; overflow: hidden;
}
.role-progress-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.6s ease-out;
  background: #4a7c4a;
}
.role-progress-next {
  margin-top: 6px;
  font-size: 12px; color: #8e8e8e;
}

/* --- Collection grid (Plant Cards) --- */
.collection-empty {
  background: #ffffff; border: 1.5px dashed #d4c9a5;
  border-radius: 14px; padding: 24px 16px;
  text-align: center;
}
.collection-empty-icon { font-size: 44px; margin-bottom: 6px; opacity: 0.7; }
.collection-empty-text { font-size: 13px; color: #8e8e8e; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.collection-card {
  background: #ffffff; border: 2px solid #4a7c4a;
  border-radius: 14px; overflow: hidden;
  cursor: pointer; touch-action: manipulation;
  transition: transform 0.2s;
  text-align: center;
}
.collection-card:active { transform: scale(0.97); }
.collection-card-png {
  border-color: #b8860b;
  padding: 6px;
  background: linear-gradient(180deg, #FAF5E8 0%, #f1e8d0 100%);
}
.collection-card-img {
  display: block; width: 100%; height: auto;
  border-radius: 10px;
}
.collection-card-label {
  font-family: "Fredoka", sans-serif;
  font-size: 12px; font-weight: 700; color: #4a7c4a;
  padding: 6px 4px 2px; line-height: 1.2;
}
.collection-card-emoji { font-size: 40px; margin: 14px 0 4px; }
.collection-card-title {
  font-family: "Fredoka", sans-serif;
  font-size: 13px; font-weight: 700; color: #2d2d2d;
  padding: 0 6px; line-height: 1.2;
}
.collection-card-date {
  font-size: 11px; color: #8e8e8e; padding: 2px 6px 10px;
}

/* --- Academy settings bottom sheet --- */
.academy-setting-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 10px 0 4px; font-size: 14px; color: #2d2d2d;
}

/* === PHASE 4 UX hints (v4.1.2.5) === */

/* Virtual-mission hint on briefing screen */
.academy-virtual-hint {
  background: rgba(184, 134, 11, 0.10);
  border: 1.5px dashed #b8860b;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: #8f6a08;
  text-align: center;
  line-height: 1.4;
}

/* "Your race" chips on in-progress screen */
.race-chip-row {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin: 8px 0 10px;
}
.race-chip {
  display: flex; align-items: center; gap: 6px;
  background: #ffffff; border: 1.5px solid #e6dfc7;
  border-radius: 14px; padding: 8px 12px;
  cursor: pointer; touch-action: manipulation;
  font-size: 14px;
  transition: transform 0.15s, border-color 0.15s;
}
.race-chip:active { transform: scale(0.96); }
.race-chip-picked {
  border-color: #b8860b;
  background: #fdf6e3;
}
.race-chip-emoji { font-size: 20px; }
.race-chip-name {
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-weight: 700; color: #2d2d2d;
}
.race-chip-star { font-size: 14px; margin-left: 2px; }

/* Prediction line — Caveat (handwritten) */
.prediction-line {
  text-align: center;
  font-family: "Caveat", "Quicksand", cursive;
  font-size: 20px;
  color: #4a7c4a;
  margin: 6px 0 14px;
  font-weight: 600;
}
.prediction-line-name { color: #b8860b; font-weight: 700; }

/* Premium plant icons — pastel tint in Kids mode */
.kids-mode .pf-farm-icon { filter: hue-rotate(-15deg) saturate(0.85) brightness(1.1); }

/* Pilot photo imagery for Kids garden tab card. */
.plant-kids-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

