/* =========================================================
   Memory Garden — Full Design System v3.0
   Dark + Light theme, 3D plant animations, smooth spring UI
   ========================================================= */

/* ─── DARK THEME (default) ─── */
:root {
  --bg:        #070f0b;
  --bg-2:      #0e1c14;
  --bg-3:      #162b1e;
  --bg-card:   #122019;
  --border:    rgba(74,222,128,.12);
  --border-h:  rgba(74,222,128,.35);

  --green:     #22c55e;
  --green-l:   #4ade80;
  --teal:      #38bdf8;
  --amber:     #f59e0b;
  --red:       #ef4444;
  --purple:    #a855f7;

  --thriving:  #10b981;
  --stable:    #84cc16;
  --wilting:   #f59e0b;
  --withered:  #b45309;

  --text:      #e8f5ed;
  --text-2:    #94a39b;
  --text-3:    #526158;

  --font:      'Plus Jakarta Sans', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;

  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-pill:9999px;

  --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
  --shadow-md: 0 8px 28px rgba(0,0,0,.45);
  --shadow-lg: 0 20px 56px rgba(0,0,0,.6);

  --plant-ground: rgba(34,197,94,.07);
  --glass: rgba(255,255,255,.04);
  --glass-h: rgba(255,255,255,.08);
}

/* ─── LIGHT THEME ─── */
html[data-theme="light"] {
  --bg:        #f0f7f2;
  --bg-2:      #e4f0e8;
  --bg-3:      #d6eadb;
  --bg-card:   #ffffff;
  --border:    rgba(22,101,52,.15);
  --border-h:  rgba(22,101,52,.4);

  --green:     #16a34a;
  --green-l:   #15803d;
  --teal:      #0284c7;
  --amber:     #d97706;
  --red:       #dc2626;
  --purple:    #7c3aed;

  --thriving:  #059669;
  --stable:    #65a30d;
  --wilting:   #d97706;
  --withered:  #92400e;

  --text:      #0f2d1a;
  --text-2:    #3d6b4f;
  --text-3:    #6b9e7a;

  --shadow-sm: 0 2px 10px rgba(0,0,0,.07);
  --shadow-md: 0 8px 28px rgba(0,0,0,.11);
  --shadow-lg: 0 20px 56px rgba(0,0,0,.16);

  --plant-ground: rgba(22,101,52,.06);
  --glass: rgba(0,0,0,.03);
  --glass-h: rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .45s ease, color .35s ease;
}

/* Ambient weather canvas */
#weather-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0;
  transition: opacity 2s ease;
}

/* ─── NAVBAR ─── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .75rem 2rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  transition: background .45s ease, border-color .35s ease;
}

.nav-brand { display: flex; align-items: center; gap: .9rem; flex-shrink: 0; }
.brand-logo {
  width: 44px; height: 44px;
  background: linear-gradient(135deg,#166534,#15803d);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 0 18px rgba(34,197,94,.3);
  border: 1px solid rgba(74,222,128,.35);
}
.brand-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.025em; display: flex; align-items: center; gap: .5rem; }
.brand-sub { font-size: .75rem; color: var(--text-2); }
.badge-bio {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(34,197,94,.14); color: var(--green-l);
  border: 1px solid rgba(74,222,128,.3); padding: .2rem .55rem; border-radius: var(--r-pill);
}
.nav-center { display: flex; align-items: center; gap: .75rem; flex: 1; justify-content: center; }
.streak-pill {
  display: flex; align-items: center; gap: .4rem;
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
  padding: .4rem .9rem; border-radius: var(--r-pill); font-size: .82rem;
}
.streak-fire { font-size: 1.1rem; }
.streak-label { color: var(--text-2); font-size: .75rem; }
#streak-count { font-family: var(--mono); font-weight: 700; color: var(--amber); }
.pomo-pill {
  display: flex; align-items: center; gap: .4rem;
  background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.3);
  padding: .4rem .9rem; border-radius: var(--r-pill); font-size: .82rem;
  font-family: var(--mono); color: var(--teal);
}
.nav-right { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.stat-pill {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg-3); border: 1px solid var(--border);
  padding: .45rem .9rem; border-radius: var(--r-md);
  transition: background .45s ease;
}
.stat-label { font-size: .72rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.stat-val { font-family: var(--mono); font-size: .95rem; font-weight: 700; color: var(--green-l); }
.health-bar { width: 48px; height: 5px; background: var(--glass-h); border-radius: var(--r-pill); overflow: hidden; }
.health-fill { height: 100%; background: linear-gradient(90deg, var(--amber), var(--thriving)); border-radius: var(--r-pill); transition: width .5s ease; }
.urgent-pill .stat-val { color: var(--amber); }
.nav-actions { display: flex; gap: .5rem; }

/* ─── BUTTONS ─── */
.btn {
  font-family: var(--font); font-size: .85rem; font-weight: 600;
  padding: .55rem 1rem; border-radius: var(--r-md); border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.btn-primary {
  background: linear-gradient(135deg,#10b981,#059669); color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,.3);
}
.btn-primary:hover { background: linear-gradient(135deg,#059669,#047857); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,185,129,.5); }
.btn-ghost { background: var(--glass); border: 1px solid var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--glass-h); color: var(--text); border-color: var(--border-h); }
.btn-sm { font-size: .78rem; padding: .4rem .75rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ─── CHIPS ─── */
.chip {
  font-family: var(--font); font-size: .78rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--glass-h);
  color: var(--text-2); cursor: pointer;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.chip:hover { background: var(--glass-h); color: var(--text); border-color: var(--border-h); transform: translateY(-1px); }
.chip.active { background: rgba(34,197,94,.18); border-color: var(--green); color: var(--green-l); box-shadow: 0 0 10px rgba(34,197,94,.2); }
.chip-warn { color: var(--amber); border-color: rgba(245,158,11,.3); animation: pulse-warn 3s infinite ease-in-out; }
.chip-danger { color: #f87171; border-color: rgba(239,68,68,.3); }
@keyframes pulse-warn { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 14px rgba(245,158,11,.4); } }

/* ─── TIME MACHINE BAR ─── */
.time-machine-bar {
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  border-bottom: 1px solid rgba(74,222,128,.2);
  padding: .9rem 2rem; position: relative; z-index: 100;
  transition: background .45s ease;
}
.tm-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.tm-left { display: flex; align-items: center; gap: .6rem; font-size: .88rem; flex-shrink: 0; }
.pulse-dot { color: var(--green-l); animation: blink 1.4s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }
.tm-hint { font-size: .75rem; color: var(--text-3); padding-left: .6rem; border-left: 1px solid var(--border); }
.tm-center { flex: 1; min-width: 200px; }
.slider-labels { display: flex; justify-content: space-between; font-size: .68rem; color: var(--text-3); font-family: var(--mono); margin-top: .25rem; }
.tm-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.badge-time {
  font-family: var(--mono); font-size: .82rem; font-weight: 700;
  background: rgba(56,189,248,.14); color: var(--teal);
  border: 1px solid rgba(56,189,248,.35); padding: .3rem .75rem; border-radius: var(--r-pill);
  box-shadow: 0 0 10px rgba(56,189,248,.2);
}

/* ─── RANGE INPUTS ─── */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 7px;
  background: linear-gradient(90deg, var(--thriving), var(--amber), var(--red));
  border-radius: var(--r-pill); outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--green);
  box-shadow: 0 0 10px rgba(34,197,94,.7); cursor: grab; transition: transform .15s ease;
}
input[type="range"]::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.3); }
html[data-theme="light"] input[type="range"]::-webkit-slider-thumb { background: var(--bg-card); border-color: var(--thriving); }

/* ─── MAIN LAYOUT ─── */
.main { max-width: 1400px; margin: 1.5rem auto 4rem; padding: 0 1.5rem; position: relative; z-index: 1; }

/* ─── TABS ─── */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; padding-bottom: .75rem; }
.tab {
  font-family: var(--font); font-size: .88rem; font-weight: 600;
  padding: .55rem 1.1rem; border-radius: var(--r-md);
  background: transparent; border: 1px solid transparent;
  color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; gap: .4rem;
  transition: all .25s cubic-bezier(.34,1.56,.64,1); white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--glass); transform: translateY(-1px); }
.tab.active { background: var(--bg-card); color: var(--green-l); border-color: var(--border); box-shadow: var(--shadow-sm); }
.count-badge { font-size: .7rem; font-family: var(--mono); background: rgba(34,197,94,.18); color: var(--green-l); padding: .1rem .45rem; border-radius: var(--r-pill); }
.tab-panel { display: none; animation: panelIn .4s cubic-bezier(.16,1,.3,1); }
.tab-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: background .45s ease, border-color .35s ease, box-shadow .35s ease;
}
.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: .2rem; }
.card-sub { font-size: .82rem; color: var(--text-2); margin-bottom: 0; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

/* ─── GARDEN ─── */
.garden-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem; padding: .75rem 1rem;
  background: color-mix(in srgb, var(--bg-3) 70%, transparent);
  border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 1.25rem;
  transition: background .45s ease;
}
.filter-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.toolbar-actions { display: flex; align-items: center; gap: .75rem; }
.muted { font-size: .78rem; color: var(--text-3); }

.weather-banner {
  padding: .75rem 1.25rem; border-radius: var(--r-md); margin-bottom: 1rem;
  font-size: .88rem; font-weight: 600;
  display: flex; align-items: center; gap: .75rem; border: 1px solid;
}
.weather-banner.sunshine { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.3); color: #d97706; }
.weather-banner.cloudy   { background: rgba(148,163,184,.08); border-color: rgba(148,163,184,.2); color: #64748b; }
.weather-banner.drought  { background: rgba(180,83,9,.12); border-color: rgba(180,83,9,.35); color: #c2410c; }

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

/* ─── PLANT CARDS (smooth stagger entry) ─── */
.plant-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.2rem;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1),
              box-shadow .4s ease,
              border-color .35s ease,
              background .45s ease;
  box-shadow: var(--shadow-sm);
  animation: cardEntry .55s cubic-bezier(.16,1,.3,1) both;
}
.plant-card:nth-child(1){ animation-delay:.04s }
.plant-card:nth-child(2){ animation-delay:.09s }
.plant-card:nth-child(3){ animation-delay:.14s }
.plant-card:nth-child(4){ animation-delay:.19s }
.plant-card:nth-child(5){ animation-delay:.24s }
.plant-card:nth-child(6){ animation-delay:.29s }
.plant-card:nth-child(7){ animation-delay:.34s }
.plant-card:nth-child(8){ animation-delay:.39s }

@keyframes cardEntry {
  from { opacity:0; transform:translateY(22px) scale(.96); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

.plant-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--border-h);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--border-h);
}

/* Evolution tier glow */
.plant-card.tier-seedling   { }
.plant-card.tier-sapling    { box-shadow: var(--shadow-sm), 0 0 12px rgba(16,185,129,.15); }
.plant-card.tier-blossom    { box-shadow: var(--shadow-sm), 0 0 20px rgba(16,185,129,.25); }
.plant-card.tier-ancient    {
  box-shadow: var(--shadow-sm), 0 0 30px rgba(251,191,36,.35), 0 0 60px rgba(168,85,247,.15);
  animation: cardEntry .55s cubic-bezier(.16,1,.3,1) both, golden-pulse 4s infinite ease-in-out;
}
@keyframes golden-pulse {
  0%,100% { box-shadow: var(--shadow-sm), 0 0 24px rgba(251,191,36,.3); }
  50%      { box-shadow: var(--shadow-sm), 0 0 44px rgba(251,191,36,.55), 0 0 70px rgba(168,85,247,.2); }
}

/* Stage borders */
.stage-thriving { border-top: 4px solid var(--thriving); }
.stage-stable   { border-top: 4px solid var(--stable); }
.stage-wilting  { border-top: 4px solid var(--wilting); background: linear-gradient(180deg, rgba(245,158,11,.06), transparent 55%); animation: cardEntry .55s cubic-bezier(.16,1,.3,1) both, wilt-card 2.5s infinite ease-in-out; }
.stage-withered { border-top: 4px solid var(--withered); background: linear-gradient(180deg, rgba(180,83,9,.08), transparent 55%); }
@keyframes wilt-card { 0%,100% { box-shadow: var(--shadow-sm); } 50% { box-shadow: var(--shadow-sm), 0 0 18px rgba(245,158,11,.2); } }

.plant-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .6rem; gap: .4rem; }
.plant-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.subject-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .18rem .55rem; border-radius: var(--r-pill); }
.species-badge { font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; gap: .25rem; padding: .18rem .5rem; border-radius: var(--r-pill); transition: all .2s ease; }
.species-tree      { background: rgba(34,197,94,.14); color: #4ade80; border: 1px solid rgba(34,197,94,.28); }
.species-grape     { background: rgba(168,85,247,.14); color: #c084fc; border: 1px solid rgba(168,85,247,.28); }
.species-sunflower { background: rgba(245,158,11,.14); color: #fbbf24; border: 1px solid rgba(245,158,11,.28); }
.species-cactus    { background: rgba(20,184,166,.14); color: #2dd4bf; border: 1px solid rgba(20,184,166,.28); }
.species-blossom   { background: rgba(244,63,94,.14); color: #fb7185; border: 1px solid rgba(244,63,94,.28); }
html[data-theme="light"] .species-tree      { color: #15803d; }
html[data-theme="light"] .species-grape     { color: #7e22ce; }
html[data-theme="light"] .species-sunflower { color: #b45309; }
html[data-theme="light"] .species-cactus    { color: #0f766e; }
html[data-theme="light"] .species-blossom   { color: #be123c; }
.sub-Biology    { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(52,211,153,.3); }
.sub-Mathematics{ background: rgba(56,189,248,.15); color: #38bdf8; border: 1px solid rgba(56,189,248,.3); }
.sub-Physics    { background: rgba(168,85,247,.15); color: #c084fc; border: 1px solid rgba(192,132,252,.3); }
.sub-Chemistry  { background: rgba(251,146,60,.15); color: #fb923c; border: 1px solid rgba(251,146,60,.3); }
.sub-Other      { background: rgba(148,163,184,.12); color: #cbd5e1; border: 1px solid rgba(148,163,184,.25); }
html[data-theme="light"] .sub-Biology    { color: #047857; }
html[data-theme="light"] .sub-Mathematics{ color: #0369a1; }
html[data-theme="light"] .sub-Physics    { color: #6d28d9; }
html[data-theme="light"] .sub-Chemistry  { color: #c2410c; }
html[data-theme="light"] .sub-Other      { color: #475569; }

.retention-badge {
  font-family: var(--mono); font-size: .82rem; font-weight: 700;
  padding: .22rem .6rem; border-radius: var(--r-pill);
  display: flex; align-items: center; gap: .25rem;
}
.ret-thriving { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(52,211,153,.3); }
.ret-stable   { background: rgba(132,204,22,.15); color: #a3e635; border: 1px solid rgba(163,230,53,.3); }
.ret-wilting  { background: rgba(245,158,11,.2); color: #fbbf24; border: 1px solid rgba(251,191,36,.4); animation: pulse-badge 1.8s infinite ease-in-out; }
.ret-withered { background: rgba(180,83,9,.2); color: #f97316; border: 1px solid rgba(249,115,22,.4); }
html[data-theme="light"] .ret-thriving { color: #047857; }
html[data-theme="light"] .ret-stable   { color: #3f6212; }
html[data-theme="light"] .ret-wilting  { color: #b45309; }
html[data-theme="light"] .ret-withered { color: #7c2d12; }
@keyframes pulse-badge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.plant-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: .5rem; }

.tier-badge {
  position: absolute; top: .6rem; left: 50%; transform: translateX(-50%);
  font-size: .65rem; font-weight: 700; padding: .15rem .5rem; border-radius: var(--r-pill); pointer-events: none;
}
.tier-badge.tier-ancient { background: linear-gradient(90deg, #fbbf24, #a855f7); color: #fff; box-shadow: 0 0 10px rgba(251,191,36,.4); }
.tier-badge.tier-blossom { background: rgba(16,185,129,.25); color: var(--thriving); border: 1px solid var(--thriving); }
.tier-badge.tier-sapling { background: rgba(132,204,22,.2); color: var(--stable); border: 1px solid var(--stable); }

.water-callout {
  position: absolute; top: .6rem; right: .6rem;
  background: var(--wilting); color: #fff;
  font-size: .68rem; font-weight: 700; padding: .2rem .55rem; border-radius: var(--r-pill);
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
  display: flex; align-items: center; gap: .25rem;
  animation: bounce-up 2s infinite ease-in-out; z-index: 2;
}
@keyframes bounce-up { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ─── 3D PLANT VISUAL ─── */
.plant-visual {
  width: 100%; height: 190px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 85%, var(--plant-ground), transparent 70%);
  border-radius: var(--r-md);
  margin: .5rem 0 .9rem;
  position: relative; overflow: hidden;
  perspective: 500px;
  transition: background .45s ease;
}

/* Ground shadow under pot */
.plant-visual::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 10px;
  background: rgba(0,0,0,.15);
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}
html[data-theme="light"] .plant-visual::after { background: rgba(0,0,0,.08); }

.plant-svg {
  width: 100%; height: 100%;
  transition: transform .7s cubic-bezier(.34,1.56,.64,1), filter .6s ease;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,.22));
  transform-origin: 50% 90%;
}
html[data-theme="light"] .plant-svg { filter: drop-shadow(0 4px 8px rgba(0,0,0,.1)); }
.plant-card:hover .plant-svg { transform: scale(1.06) rotateY(4deg); }

/* Plant sway animations */
.stage-thriving .plant-group { animation: sway 4s infinite ease-in-out; transform-origin: 100px 155px; }
.stage-stable   .plant-group { animation: sway-slow 5.5s infinite ease-in-out; transform-origin: 100px 155px; }
@keyframes sway      { 0%,100%{transform:rotate(0)}  35%{transform:rotate(2deg)}  70%{transform:rotate(-2deg)} }
@keyframes sway-slow { 0%,100%{transform:rotate(0)}  35%{transform:rotate(1.2deg)} 70%{transform:rotate(-1.2deg)} }

/* Wilting droop */
.stage-wilting  .plant-group { animation: droop 3s infinite ease-in-out; transform-origin: 100px 155px; }
.stage-withered .plant-group { animation: droop-heavy 2.5s infinite ease-in-out; transform-origin: 100px 155px; }
@keyframes droop       { 0%,100%{transform:rotate(0)}  50%{transform:rotate(5deg)} }
@keyframes droop-heavy { 0%,100%{transform:rotate(5deg)} 50%{transform:rotate(9deg)} }

/* Plant stats row */
.plant-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: .4rem;
  background: var(--glass); padding: .55rem .7rem;
  border-radius: var(--r-sm); margin-bottom: .9rem; font-size: .73rem;
  transition: background .45s ease;
}
.stat-item { display: flex; flex-direction: column; gap: .05rem; }
.stat-key { color: var(--text-3); font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-num { font-family: var(--mono); font-weight: 600; }

.plant-actions { display: flex; gap: .5rem; margin-top: auto; }
.btn-water {
  flex: 1; background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff; border: none; padding: .55rem .8rem;
  border-radius: var(--r-md); font-weight: 700; font-size: .82rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: .4rem; transition: all .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 4px 12px rgba(2,132,199,.3);
}
.btn-water:hover { background: linear-gradient(135deg,#0369a1,#075985); transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 20px rgba(2,132,199,.5); }
.btn-water.urgent { background: linear-gradient(135deg, var(--wilting), #d97706); box-shadow: 0 4px 14px rgba(245,158,11,.4); animation: urgent-glow 2s infinite ease-in-out; }
@keyframes urgent-glow { 0%,100% { box-shadow: 0 0 10px rgba(245,158,11,.3); } 50% { box-shadow: 0 0 22px rgba(245,158,11,.7); } }
.btn-icon {
  padding: .5rem .65rem; color: var(--text-3);
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer; font-size: 1rem;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.btn-icon:hover { color: var(--text); background: var(--glass-h); transform: scale(1.1); }
.btn-icon.del:hover { color: #f87171; background: rgba(239,68,68,.08); }

.empty-state {
  grid-column: 1/-1; text-align: center; padding: 4rem 1rem;
  background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--r-lg);
}

/* ─── ANALYTICS LAB ─── */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.span-2 { grid-column: span 2; }
.chart-controls { display: flex; align-items: center; gap: .6rem; font-size: .82rem; }
.chart-wrap { position: relative; height: 320px; width: 100%; }
.chart-wrap.tall { height: 380px; }
.chart-annotations { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .9rem; }
.annot { font-size: .75rem; display: flex; align-items: center; gap: .4rem; }
.annot-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.formula-box { background: var(--glass); border: 1px solid rgba(74,222,128,.3); padding: 1.1rem; border-radius: var(--r-md); text-align: center; margin-bottom: 1rem; }
.formula { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--green-l); margin-bottom: .3rem; }
.formula-credit { font-size: .72rem; color: var(--text-2); }
.formula-mini { font-family: var(--mono); font-size: .92rem; color: var(--teal); background: rgba(56,189,248,.08); padding: .5rem .8rem; border-radius: var(--r-sm); border: 1px solid rgba(56,189,248,.2); }
.var-list { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1rem; }
.var-row { display: flex; gap: .75rem; align-items: flex-start; font-size: .82rem; }
.var { font-family: var(--mono); font-weight: 700; color: var(--teal); background: rgba(56,189,248,.12); padding: .2rem .5rem; border-radius: var(--r-sm); min-width: 36px; text-align: center; }
.var-row p { font-size: .76rem; color: var(--text-2); margin-top: .15rem; }
.threshold-list { border-top: 1px solid var(--glass-h); padding-top: .9rem; }
.threshold-list h4 { font-size: .88rem; margin-bottom: .6rem; }
.threshold-item { display: flex; align-items: center; gap: .5rem; font-size: .79rem; margin-bottom: .4rem; }
.threshold-item span { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.thriving-t span { background: var(--thriving); }
.stable-t   span { background: var(--stable); }
.wilting-t  span { background: var(--wilting); }
.withered-t span { background: var(--withered); }
.stats-panel { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .9rem; }
.stat-box { background: var(--glass); border: 1px solid var(--border); padding: .9rem; border-radius: var(--r-md); }
.stat-box-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: .2rem; }
.stat-box-val { font-family: var(--mono); font-size: 1.5rem; font-weight: 800; }

/* ─── POMODORO ─── */
.pomo-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.4rem; }
.pomo-card { display: flex; flex-direction: column; gap: 1.25rem; }
.pomo-svg { width: 120px; height: 120px; }
.pomo-visual {
  display: flex; align-items: center; justify-content: center; gap: 2rem;
  background: radial-gradient(circle at 50% 70%, rgba(34,197,94,.08), transparent 65%);
  padding: 1.5rem; border-radius: var(--r-md); border: 1px solid var(--border);
}
.pomo-timer-ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--glass-h); stroke-width: 8; }
.ring-progress { fill: none; stroke: var(--thriving); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .9s ease, stroke .5s ease; }
.timer-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-digits { font-family: var(--mono); font-size: 1.9rem; font-weight: 800; color: var(--text); line-height: 1; }
.timer-phase { font-size: .72rem; color: var(--text-2); margin-top: .2rem; text-align: center; }
.pomo-controls { display: flex; flex-direction: column; gap: .9rem; }
.pomo-btns { display: flex; gap: .6rem; }
.pomo-sessions { font-size: .82rem; color: var(--text-2); }
.pomo-info-card { display: flex; flex-direction: column; gap: 1rem; }
.science-block { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem; background: var(--glass); border-radius: var(--r-md); border: 1px solid var(--border); }
.science-icon { font-size: 1.5rem; flex-shrink: 0; }
.science-block strong { display: block; font-size: .9rem; margin-bottom: .2rem; }
.science-block p { font-size: .78rem; color: var(--text-2); line-height: 1.4; }
.pomo-history h4 { font-size: .88rem; margin-bottom: .6rem; }
.pomo-history-list { display: flex; flex-direction: column; gap: .4rem; max-height: 180px; overflow-y: auto; }
.pomo-session-item { font-size: .78rem; padding: .4rem .7rem; background: var(--glass); border-radius: var(--r-sm); border-left: 3px solid var(--thriving); }

/* ─── COMPARE ─── */
.compare-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.student-configs { display: flex; gap: 1rem; align-items: stretch; margin: 1rem 0; }
.student-config { flex: 1; padding: 1rem; border-radius: var(--r-md); border: 1px solid; }
.student-a { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.06); }
.student-b { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.06); }
.student-header { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .9rem; }
.student-emoji { font-size: 2rem; }
.student-header strong { display: block; font-size: .92rem; }
.student-header p { font-size: .75rem; color: var(--text-2); margin-top: .15rem; }
.config-row { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; margin-bottom: .5rem; }
.vs-divider { align-self: center; padding: .6rem .8rem; font-weight: 800; font-size: 1.1rem; color: var(--text-2); background: var(--bg-3); border-radius: var(--r-md); border: 1px solid var(--border); flex-shrink: 0; }
.compare-params { border-top: 1px solid var(--border); padding-top: 1rem; display: flex; flex-direction: column; gap: .9rem; }
.param-row { font-size: .85rem; }
.compare-scoreboard { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.score-box { text-align: center; padding: 1rem .75rem; background: var(--glass); border-radius: var(--r-md); border: 1px solid var(--border); }
.score-emoji { font-size: 1.75rem; margin-bottom: .3rem; }
.score-label { font-size: .75rem; color: var(--text-2); }
.score-val { font-family: var(--mono); font-size: 1.9rem; font-weight: 800; color: var(--green-l); }
.score-bad { color: #f87171; }
html[data-theme="light"] .score-bad { color: #dc2626; }
.score-good { color: var(--green-l); }
.score-sub { font-size: .72rem; color: var(--text-3); }
.verdict { padding: 1rem 1.25rem; border-radius: var(--r-md); font-size: .88rem; border-left: 4px solid; margin-top: 1rem; }
.verdict.win { border-color: var(--thriving); background: rgba(16,185,129,.1); }

/* ─── BODY CLOCK ─── */
.chrono-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4rem; }
.quiz-progress { height: 5px; background: var(--glass-h); border-radius: var(--r-pill); margin-bottom: 1.5rem; overflow: hidden; }
.quiz-fill { height: 100%; background: linear-gradient(90deg, var(--thriving), var(--teal)); transition: width .3s ease; }
.quiz-option {
  width: 100%; text-align: left; padding: .9rem 1.1rem;
  background: var(--glass); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--r-md); cursor: pointer;
  display: flex; align-items: center; gap: .75rem;
  font-size: .88rem; font-family: var(--font);
  transition: all .25s cubic-bezier(.34,1.56,.64,1); margin-bottom: .6rem;
}
.quiz-option:hover { background: rgba(34,197,94,.1); border-color: var(--green); transform: translateX(6px); }
.quiz-result-view { text-align: center; padding: 1.5rem; }
.result-emoji { font-size: 3rem; margin-bottom: .5rem; }
.result-type { font-size: 1.4rem; font-weight: 800; color: var(--green-l); margin-bottom: .5rem; }
.result-desc { font-size: .88rem; color: var(--text-2); max-width: 440px; margin: 0 auto 1.25rem; }
.circadian-timeline { display: flex; flex-direction: column; gap: .65rem; margin-top: 1rem; }
.timeline-slot {
  display: grid; grid-template-columns: 80px 1fr;
  gap: .9rem; padding: .7rem .9rem;
  background: var(--glass); border-radius: var(--r-md); border-left: 4px solid var(--text-3);
}
.slot-time { font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--text-2); padding-top: .15rem; }
.slot-content h5 { font-size: .84rem; margin-bottom: .15rem; }
.slot-content p { font-size: .75rem; color: var(--text-2); line-height: 1.4; }
.slot-peak { border-left-color: var(--thriving); background: rgba(16,185,129,.07); }
.slot-peak .slot-time { color: #34d399; }
html[data-theme="light"] .slot-peak .slot-time { color: #047857; }
.slot-slump { border-left-color: var(--amber); }

/* ─── EXAM PLANNER ─── */
.planner-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 1.4rem; }
.form-stack { display: flex; flex-direction: column; gap: .9rem; margin-top: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label { font-size: .78rem; font-weight: 600; color: var(--text-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-input, .form-select {
  font-family: var(--font); font-size: .88rem;
  background: var(--glass); border: 1px solid var(--border); color: var(--text);
  padding: .55rem .9rem; border-radius: var(--r-sm); outline: none;
  transition: border-color .2s ease, background .45s ease, box-shadow .2s ease;
}
.form-select.sm { padding: .4rem .7rem; font-size: .8rem; }
.form-input:focus, .form-select:focus { border-color: rgba(74,222,128,.5); box-shadow: 0 0 0 3px rgba(74,222,128,.12); }
.countdown-hero { display: flex; align-items: center; gap: 1.25rem; padding: 1.1rem; background: linear-gradient(135deg, rgba(34,197,94,.1), rgba(56,189,248,.07)); border: 1px solid rgba(74,222,128,.25); border-radius: var(--r-md); margin-bottom: 1.25rem; }
.countdown-box { text-align: center; background: var(--glass); padding: .6rem 1.2rem; border-radius: var(--r-md); border: 1px solid var(--glass-h); }
.countdown-num { font-family: var(--mono); font-size: 2.4rem; font-weight: 800; color: var(--green-l); display: block; line-height: 1; }
.countdown-unit { font-size: .68rem; text-transform: uppercase; color: var(--text-3); }
.planner-calendar { margin-bottom: 1rem; }
#planner-queue { display: flex; flex-direction: column; gap: .6rem; }
.queue-row { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-md); font-size: .84rem; border-left: 4px solid; }
.queue-info h4 { font-size: .88rem; font-weight: 600; }
.queue-ret { font-family: var(--mono); font-weight: 700; }

/* ─── MATH SANDBOX ─── */
.sandbox-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.4rem; }
.sandbox-controls { display: flex; flex-direction: column; gap: 1.1rem; margin: 1rem 0; }
.sandbox-slider-group { display: flex; flex-direction: column; gap: .3rem; }
.sandbox-slider-group label { font-size: .82rem; font-weight: 600; }
.slider-hint { font-size: .73rem; color: var(--text-2); line-height: 1.4; }
.sandbox-derived { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.derived-stat { background: var(--glass); padding: .75rem; border-radius: var(--r-md); border: 1px solid var(--border); }
.derived-label { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: .2rem; }
.derived-val { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--teal); }
.sandbox-derivative-box { margin-top: 1.1rem; padding: 1rem; background: rgba(56,189,248,.07); border: 1px solid rgba(56,189,248,.2); border-radius: var(--r-md); }
.sandbox-derivative-box h4 { font-size: .88rem; margin-bottom: .4rem; }
.sandbox-derivative-box p { font-size: .82rem; color: var(--text-2); margin-bottom: .5rem; }

/* ─── MODALS ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1.5rem;
  animation: fadeIn .2s ease-out;
}
html[data-theme="light"] .modal-overlay { background: rgba(0,0,0,.38); }
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); width: 100%; max-width: 500px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn .3s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
.modal-lg { max-width: 680px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-hdr { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--glass-h); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.modal-hdr h3 { font-size: 1.1rem; font-weight: 700; }
.modal-title-row { display: flex; align-items: center; gap: .9rem; }
.modal-title-row span:first-child { font-size: 2rem; }
.modal-x { background: transparent; border: none; font-size: 1.4rem; color: var(--text-3); cursor: pointer; line-height: 1; transition: color .2s, transform .2s; }
.modal-x:hover { color: var(--text); transform: rotate(90deg); }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; max-height: 78vh; overflow-y: auto; }
.modal-ftr { padding: 1rem 1.5rem; border-top: 1px solid var(--glass-h); display: flex; justify-content: flex-end; gap: .75rem; background: var(--glass); }
.optional { font-size: .72rem; color: var(--text-3); font-weight: 400; }

/* Mode switcher */
.mode-switch { display: flex; gap: .4rem; background: var(--glass); padding: .3rem; border-radius: var(--r-md); border: 1px solid var(--border); }
.mode-btn { flex: 1; background: transparent; border: none; color: var(--text-2); font-family: var(--font); font-size: .82rem; font-weight: 600; padding: .5rem .8rem; border-radius: var(--r-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .4rem; transition: all .2s ease; }
.mode-btn.active { background: var(--bg-3); color: var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* Flashcard */
.flashcard { min-height: 155px; border-radius: var(--r-md); cursor: pointer; perspective: 1000px; position: relative; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.flashcard.flipped { transform: rotateY(180deg); }
.fc-front, .fc-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-md); padding: 1.2rem 1.4rem; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--border); }
.fc-front { background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); border-color: rgba(74,222,128,.35); }
.fc-back  { background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); border-color: rgba(56,189,248,.35); transform: rotateY(180deg); }
.fc-tag   { font-family: var(--mono); font-size: .66rem; font-weight: 700; letter-spacing: .07em; color: var(--green-l); }
.fc-tag-ans { color: var(--teal); }
.fc-text  { font-size: 1rem; font-weight: 600; color: var(--text); line-height: 1.4; flex: 1; padding: .5rem 0; }
.fc-hint  { font-size: .73rem; color: var(--text-3); }

/* Feynman */
.feynman-box { display: flex; flex-direction: column; gap: .6rem; background: var(--glass); padding: 1.1rem; border-radius: var(--r-md); border: 1px solid var(--border); }
.feynman-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--amber); letter-spacing: .05em; }
.feynman-prompt { font-size: .88rem; color: var(--text-2); font-style: italic; }
.feynman-footer { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--text-3); }
.ideal-answer { background: rgba(56,189,248,.08); border-left: 3px solid var(--teal); padding: .7rem .9rem; border-radius: var(--r-sm); font-size: .82rem; }
.ideal-answer p { color: var(--text-2); margin-top: .3rem; }

/* Recall rating */
.recall-section { display: flex; flex-direction: column; gap: .6rem; }
.recall-hdr { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.science-note { font-size: .73rem; color: var(--teal); font-family: var(--mono); }
.recall-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
.recall-btn {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .9rem .6rem; border-radius: var(--r-md); cursor: pointer;
  background: var(--glass); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font); font-size: .78rem;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.recall-btn:hover { background: var(--glass-h); transform: translateY(-2px); }
.recall-btn.selected { border-color: var(--teal); background: rgba(56,189,248,.14); box-shadow: 0 0 14px rgba(56,189,248,.3); }
.recall-btn strong { display: block; font-size: .84rem; }
.recall-btn span { color: var(--text-3); font-size: .72rem; }
.rb-emoji { font-size: 1.6rem; }
.testing-effect-note { font-size: .78rem; padding: .8rem 1rem; background: rgba(168,85,247,.1); border: 1px solid rgba(168,85,247,.25); border-radius: var(--r-md); color: #e9d5ff; line-height: 1.4; }
html[data-theme="light"] .testing-effect-note { color: #5b21b6; background: rgba(168,85,247,.08); }

/* Pitch modal */
.pitch-banner { background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(56,189,248,.12)); border: 1px solid rgba(74,222,128,.35); padding: 1.1rem 1.25rem; border-radius: var(--r-md); }
.pitch-banner h4 { color: var(--green-l); margin-bottom: .4rem; }
.pitch-banner p { font-size: .88rem; color: var(--text); line-height: 1.5; }
.pitch-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pitch-col { background: var(--glass); padding: .9rem; border-radius: var(--r-md); border: 1px solid var(--border); }
.pitch-col h5 { font-size: .9rem; color: var(--teal); margin-bottom: .4rem; }
.pitch-col p { font-size: .78rem; color: var(--text-2); line-height: 1.4; }
.demo-steps { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); padding: 1rem 1.2rem; border-radius: var(--r-md); }
.demo-steps h5 { color: var(--amber); font-size: .9rem; margin-bottom: .5rem; }
.demo-steps ol { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--text); }

/* ─── 3D WATER BUCKET & POURING SYSTEM ─── */
.water-bucket-layer {
  position: fixed; inset: 0; z-index: 1000;
  pointer-events: none;
  animation: fadeIn .3s ease-out;
}

.bucket-hud {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  z-index: 1050; pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: color-mix(in srgb, var(--bg-card) 90%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(56,189,248,.45);
  box-shadow: 0 12px 36px rgba(0,0,0,.35), 0 0 24px rgba(56,189,248,.25);
  padding: .65rem 1.25rem; border-radius: var(--r-pill);
  animation: slideDown .4s cubic-bezier(.34,1.56,.64,1);
  max-width: 90vw;
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.bucket-hud-left { display: flex; align-items: center; gap: .75rem; }
.bucket-hud-icon { font-size: 1.6rem; animation: wobble 2.5s infinite ease-in-out; }
@keyframes wobble { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-10deg)} 75%{transform:rotate(10deg)} }
.bucket-hud-text strong { display: block; font-size: .88rem; color: var(--text); }
.bucket-hud-text p { font-size: .75rem; color: var(--text-2); margin-top: .1rem; }
.bucket-hud-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }

.interactive-bucket {
  position: fixed; width: 120px; height: 100px;
  z-index: 1100; pointer-events: auto;
  cursor: grab; touch-action: none;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,.38));
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
  user-select: none; -webkit-user-select: none;
  transform: translate(-50%, -50%);
}
.interactive-bucket.grabbing { cursor: grabbing; transform: translate(-50%, -50%) scale(1.05); }

.bucket-inner { position: relative; width: 100%; height: 100%; }
.bucket-svg { width: 100%; height: 100%; overflow: visible; }

/* Tilting when pouring */
.interactive-bucket.pouring {
  transform: translate(-50%, -50%) rotate(-48deg) scale(1.08) !important;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1) !important;
}

/* Water stream container attached to spout */
.water-stream-wrap {
  position: absolute; top: 32px; left: 100px;
  width: 140px; height: 190px;
  pointer-events: none;
  transform-origin: 0 0;
  transform: rotate(48deg); /* counteract bucket tilt */
}

.water-stream-svg { width: 100%; height: 100%; overflow: visible; }

.stream-line {
  stroke-dasharray: 18 6;
  animation: flowStream .45s linear infinite;
}
.stream-1 { stroke-dasharray: 20 8; animation-duration: .4s; }
.stream-2 { stroke-dasharray: 14 6; animation-duration: .32s; }
.stream-3 { stroke-dasharray: 16 8; animation-duration: .48s; }

@keyframes flowStream {
  from { stroke-dashoffset: 28; }
  to   { stroke-dashoffset: 0; }
}

.stream-drop {
  animation: dropFall .7s infinite cubic-bezier(.25,.46,.45,.94);
}
.drop-1 { animation-delay: 0s; }
.drop-2 { animation-delay: .18s; }
.drop-3 { animation-delay: .36s; }
.drop-4 { animation-delay: .54s; }

@keyframes dropFall {
  0%   { opacity: 0; transform: translateY(-8px) scale(.7); }
  25%  { opacity: 1; transform: translateY(15px) scale(1); }
  100% { opacity: 0; transform: translateY(110px) scale(.8); }
}

/* Water splash zone at pot soil */
.water-splash-zone {
  position: absolute; bottom: -8px; left: 80px;
  width: 50px; height: 20px;
}

.splash-drop {
  position: absolute; width: 6px; height: 6px;
  border-radius: 50%; background: #38bdf8;
  animation: splashParticle .6s infinite ease-out;
}
.sd-1 { --sx: -22px; --sy: -18px; animation-delay: 0s; }
.sd-2 { --sx: 20px;  --sy: -20px; animation-delay: .12s; background: #7dd3fc; }
.sd-3 { --sx: -12px; --sy: -26px; animation-delay: .24s; width: 4px; height: 4px; }
.sd-4 { --sx: 15px;  --sy: -14px; animation-delay: .36s; width: 5px; height: 5px; }
.sd-5 { --sx: -4px;  --sy: -24px; animation-delay: .48s; background: #bae6fd; }

@keyframes splashParticle {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0); }
}

.splash-ripple {
  position: absolute; left: 0; bottom: 0;
  width: 44px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(56,189,248,.6);
  animation: splashRippleRing .7s infinite ease-out;
}
.sr-2 { animation-delay: .35s; border-color: rgba(125,211,252,.4); }

@keyframes splashRippleRing {
  0%   { transform: scale(.2); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Target card indicator during bucket mode */
.plant-card.bucket-target {
  box-shadow: 0 0 0 3px #38bdf8, 0 0 32px rgba(56,189,248,.55) !important;
  transform: translateY(-4px) scale(1.02);
}
.plant-card.bucket-target::before {
  content: "🎯 BRING BUCKET HERE 💧";
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, #0284c7, #10b981);
  color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .06em;
  padding: .25rem .8rem; border-radius: var(--r-pill);
  box-shadow: 0 4px 14px rgba(2,132,199,.5); z-index: 10;
  animation: bounce-up 1.4s infinite ease-in-out;
  pointer-events: none;
}

/* Plant Growth Burst animation */
.plant-card.plant-growing {
  animation: plantGrowthBurst 1.8s cubic-bezier(.34,1.56,.64,1) !important;
}
.plant-card.plant-growing .plant-visual {
  background: radial-gradient(circle at 50% 75%, rgba(34,197,94,.38), transparent 75%) !important;
  transition: background .4s ease;
}
.plant-card.plant-growing .plant-svg {
  animation: plantSpringGrowth 1.8s cubic-bezier(.34,1.56,.64,1) !important;
}

@keyframes plantGrowthBurst {
  0%   { transform: scale(1); box-shadow: var(--shadow-sm); }
  35%  { transform: scale(1.04); box-shadow: 0 0 44px rgba(34,197,94,.6), 0 0 80px rgba(56,189,248,.4); }
  70%  { transform: scale(1.02); }
  100% { transform: scale(1); box-shadow: var(--shadow-sm); }
}

@keyframes plantSpringGrowth {
  0%   { transform: scale(.92) translateY(8px); }
  40%  { transform: scale(1.1) translateY(-6px); }
  75%  { transform: scale(.98) translateY(2px); }
  100% { transform: scale(1) translateY(0); }
}

/* ─── CREATOR BRANDING & FOOTER ─── */
.brand-author {
  color: var(--green-l);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.brand-author strong {
  font-weight: 800;
  background: linear-gradient(135deg, var(--green-l), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-creator {
  font-size: .7rem; font-weight: 700;
  background: linear-gradient(90deg, #10b981, #0284c7);
  color: #fff;
  padding: .2rem .65rem; border-radius: var(--r-pill);
  vertical-align: middle; margin-left: .5rem;
  letter-spacing: .03em;
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}

.app-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-2) 85%, transparent);
  backdrop-filter: blur(12px);
  padding: 2.2rem 2rem;
  position: relative; z-index: 10;
  transition: background .45s ease, border-color .35s ease;
}

.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}

.footer-brand {
  display: flex; align-items: center; gap: .8rem;
}
.footer-logo { font-size: 1.8rem; }
.footer-brand strong { font-size: 1rem; color: var(--text); display: block; }
.footer-brand p { font-size: .75rem; color: var(--text-2); margin-top: .15rem; }

.footer-author-pill {
  display: flex; align-items: center; gap: .5rem;
  background: color-mix(in srgb, var(--bg-card) 95%, transparent);
  border: 1px solid rgba(74,222,128,.35);
  box-shadow: 0 4px 16px rgba(16,185,129,.15);
  padding: .5rem 1.2rem; border-radius: var(--r-pill);
  font-size: .88rem; color: var(--text);
}
.footer-author-pill strong {
  background: linear-gradient(135deg, #10b981, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800; font-size: .95rem;
}

.footer-meta {
  font-size: .75rem; color: var(--text-3); font-family: var(--mono);
}

/* ─── SEO & REGIONAL SECTION (TAMIL NADU) ─── */
.seo-regional-section {
  margin-top: 3.5rem;
  margin-bottom: 2rem;
}

.seo-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 95%, transparent), color-mix(in srgb, var(--bg-2) 90%, transparent));
  border: 1px solid rgba(74,222,128,.25);
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  padding: 2.2rem;
}

.seo-badge-row {
  display: flex; gap: .75rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1rem;
}

.badge-tn {
  font-size: .75rem; font-weight: 700;
  background: rgba(245,158,11,.14); color: var(--amber);
  border: 1px solid rgba(245,158,11,.35);
  padding: .3rem .8rem; border-radius: var(--r-pill);
}

.badge-curriculum {
  font-size: .75rem; font-weight: 600;
  background: rgba(56,189,248,.12); color: var(--teal);
  border: 1px solid rgba(56,189,248,.3);
  padding: .3rem .8rem; border-radius: var(--r-pill);
}

.seo-heading {
  font-size: 1.6rem; font-weight: 800; color: var(--text);
  margin-bottom: .8rem; letter-spacing: -.02em;
}

.seo-subtext {
  font-size: .92rem; color: var(--text-2); line-height: 1.65;
  max-width: 960px; margin-bottom: 1.8rem;
}

.seo-features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem; margin-bottom: 2rem;
}

.seo-feat-card {
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 1.2rem; border-radius: var(--r-md);
  transition: transform .25s ease, border-color .25s ease;
}
.seo-feat-card:hover { transform: translateY(-3px); border-color: var(--border-h); }
.seo-feat-icon { font-size: 1.6rem; display: block; margin-bottom: .5rem; }
.seo-feat-card h4 { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.seo-feat-card p { font-size: .8rem; color: var(--text-2); line-height: 1.45; }

.seo-faq-block {
  border-top: 1px solid var(--border);
  padding-top: 1.6rem; margin-top: 1rem;
}

.faq-title {
  font-size: 1.15rem; font-weight: 800; color: var(--text);
  margin-bottom: 1rem;
}

.faq-item {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: .75rem;
  overflow: hidden;
  transition: border-color .2s ease;
}
.faq-item[open] { border-color: rgba(74,222,128,.4); background: color-mix(in srgb, var(--bg-3) 40%, transparent); }

.faq-q {
  font-size: .92rem; font-weight: 700; color: var(--text);
  padding: .9rem 1.2rem; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "+"; font-size: 1.2rem; color: var(--green-l); transition: transform .2s ease; }
.faq-item[open] .faq-q::after { content: "−"; transform: rotate(180deg); }

.faq-a {
  padding: 0 1.2rem 1.1rem;
  font-size: .85rem; color: var(--text-2); line-height: 1.6;
}

/* ─── UTILS ─── */
.hidden { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-h); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 20%, transparent); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) { .analytics-grid { grid-template-columns: 1fr; } .span-2 { grid-column: span 1; } }
@media (max-width: 900px) {
  .navbar { flex-direction: column; align-items: stretch; gap: .75rem; padding: 1rem; }
  .nav-center, .nav-right { flex-wrap: wrap; }
  .pomo-layout, .compare-layout, .chrono-grid, .planner-grid, .sandbox-grid { grid-template-columns: 1fr; }
  .pitch-cols { grid-template-columns: 1fr; }
  .tm-inner { flex-direction: column; }
}
@media (max-width: 600px) { .garden-grid { grid-template-columns: 1fr; } .recall-grid { grid-template-columns: 1fr; } .student-configs { flex-direction: column; } .vs-divider { align-self: flex-start; } }


/* ══════════════════════════════════════════════════════════
   ADVANCED ACADEMIC & INTERACTIVE SUITE (CBSE / JEE / NEET)
══════════════════════════════════════════════════════════ */

/* ─── SOUNDSCAPE PILL & DROPDOWN ─── */
.soundscape-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.btn-sound-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .35rem .75rem;
  border-radius: var(--r-pill);
  font-size: .8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-sound-toggle:hover { border-color: var(--green-l); background: color-mix(in srgb, var(--green) 10%, var(--bg-card)); }
.btn-sound-toggle.sound-active { border-color: var(--green-l); color: var(--green-l); box-shadow: 0 0 12px rgba(16,185,129,.25); }

.sound-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: color-mix(in srgb, var(--bg-card) 95%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-h);
  border-radius: var(--r-md);
  padding: .6rem;
  min-width: 190px;
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
  z-index: 1000;
}
.sound-option {
  padding: .45rem .65rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: all .15s ease;
}
.sound-option:hover { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--text); }
.sound-option.active { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green-l); font-weight: 700; }
.sound-vol-row {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  color: var(--text-3);
}
.sound-vol-row input[type="range"] {
  flex: 1;
  accent-color: var(--green-l);
  cursor: pointer;
}

/* ─── LIVING ECOSYSTEM & POLLINATORS ─── */
.pollinator-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.pollinator {
  position: absolute;
  font-size: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
  will-change: transform;
}
.pollinator.bee {
  bottom: 55%;
  left: 20%;
  animation: beeFlight 6s infinite ease-in-out;
}
.pollinator.butterfly {
  top: 25%;
  right: 22%;
  animation: butterflyFlight 8s infinite ease-in-out;
}
.pollinator.firefly {
  bottom: 30%;
  left: 50%;
  animation: fireflyFloat 5s infinite ease-in-out;
  color: #fde047;
  font-size: .85rem;
  filter: drop-shadow(0 0 6px rgba(253,224,71,.8));
}

@keyframes beeFlight {
  0%   { transform: translate(0, 0) scaleX(1); }
  25%  { transform: translate(25px, -18px) rotate(8deg) scaleX(1); }
  50%  { transform: translate(45px, -5px) rotate(-5deg) scaleX(-1); }
  75%  { transform: translate(15px, 12px) rotate(4deg) scaleX(-1); }
  100% { transform: translate(0, 0) scaleX(1); }
}

@keyframes butterflyFlight {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  30%  { transform: translate(-30px, 20px) scale(1.08) rotate(-12deg); }
  60%  { transform: translate(-15px, -15px) scale(.95) rotate(15deg); }
  85%  { transform: translate(10px, 10px) scale(1.02) rotate(-6deg); }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
}

@keyframes fireflyFloat {
  0%, 100% { transform: translate(0, 0); opacity: .2; }
  50%      { transform: translate(18px, -22px); opacity: .95; }
}

/* ─── FORMULA SPRINT (+4 / -1) ─── */
.sprint-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.sprint-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}
.sprint-header-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #f59e0b, #10b981, #38bdf8);
}
.sprint-score-hud {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.sprint-stat-pill {
  background: var(--glass);
  border: 1px solid var(--border);
  padding: .5rem .9rem;
  border-radius: var(--r-md);
  text-align: center;
  min-width: 85px;
}
.sprint-stat-pill .val {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 800;
  display: block;
}
.sprint-stat-pill .lbl {
  font-size: .68rem;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: .05em;
}
.sprint-stat-pill.score-positive .val { color: var(--green-l); }
.sprint-stat-pill.score-negative .val { color: #f43f5e; }
.sprint-stat-pill.stat-timer .val { color: var(--amber); }

.sprint-arena {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.2rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.sprint-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.sprint-q-subject {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .25rem .75rem;
  border-radius: var(--r-pill);
  background: rgba(56,189,248,.14);
  color: var(--teal);
  border: 1px solid rgba(56,189,248,.3);
}
.sprint-q-weightage {
  font-size: .75rem;
  font-weight: 700;
  color: var(--amber);
  background: rgba(245,158,11,.12);
  padding: .25rem .75rem;
  border-radius: var(--r-pill);
}
.sprint-q-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 1rem;
}
.sprint-formula-box {
  background: color-mix(in srgb, var(--bg-3) 60%, transparent);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green-l);
  border-radius: var(--r-md);
  padding: 1.1rem 1.3rem;
  font-family: var(--mono);
  font-size: .95rem;
  line-height: 1.5;
  color: var(--text);
  margin: 1rem 0;
}
.sprint-answer-box {
  background: color-mix(in srgb, var(--bg-2) 90%, transparent);
  border: 1px dashed rgba(74,222,128,.4);
  border-radius: var(--r-md);
  padding: 1.2rem;
  margin-top: 1rem;
  animation: fadeIn .3s ease;
}
.sprint-feynman-note {
  font-size: .85rem;
  color: var(--text-2);
  margin-top: .6rem;
  font-style: italic;
}
.sprint-actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  align-items: center;
}
.btn-grade {
  flex: 1;
  min-width: 140px;
  padding: .85rem 1.2rem;
  font-size: .95rem;
  font-weight: 800;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: all .2s ease;
}
.btn-grade-plus4 {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.35);
}
.btn-grade-plus4:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,.45); }
.btn-grade-minus1 {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,.35);
}
.btn-grade-minus1:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239,68,68,.45); }
.btn-grade-skip {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-grade-skip:hover { background: var(--bg-card); color: var(--text); border-color: var(--border-h); }

/* ─── NCERT CURRICULUM BROWSER ─── */
.ncert-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ncert-header-banner {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 95%, transparent), color-mix(in srgb, var(--bg-2) 90%, transparent));
  border: 1px solid rgba(56,189,248,.3);
  border-radius: var(--r-lg);
  padding: 1.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.ncert-filter-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.ncert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}
.ncert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.ncert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(74,222,128,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.ncert-card-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .6rem;
}
.ncert-badge {
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: var(--r-pill);
}
.ncert-badge.bio { background: rgba(16,185,129,.14); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.ncert-badge.math { background: rgba(56,189,248,.14); color: #38bdf8; border: 1px solid rgba(56,189,248,.3); }
.ncert-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: .5rem;
}
.ncert-card-formula {
  background: color-mix(in srgb, var(--bg-3) 50%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .65rem .8rem;
  font-size: .78rem;
  font-family: var(--mono);
  color: var(--text-2);
  margin-bottom: .8rem;
  line-height: 1.4;
}
.ncert-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ─── TROPHIES & 365-DAY HEATMAP ─── */
.trophies-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.trophy-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}
.trophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all .25s ease;
}
.trophy-card.unlocked {
  border-color: rgba(245,158,11,.4);
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 95%, transparent), rgba(245,158,11,.08));
}
.trophy-card.locked { opacity: .45; filter: grayscale(.8); }
.trophy-icon { font-size: 2.2rem; }
.trophy-info h4 { font-size: .95rem; font-weight: 800; color: var(--text); margin-bottom: .2rem; }
.trophy-info p { font-size: .75rem; color: var(--text-2); line-height: 1.4; }

/* 365-Day Revision Heatmap */
.heatmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.8rem;
}
.heatmap-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: .8rem;
}
.heatmap-grid-wrap {
  overflow-x: auto;
  padding-bottom: .6rem;
}
.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3.5px;
}
.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2.5px;
  background: color-mix(in srgb, var(--bg-3) 90%, transparent);
  transition: transform .15s ease;
}
.heatmap-cell:hover { transform: scale(1.4); z-index: 2; }
.heatmap-cell.lvl-1 { background: rgba(16,185,129,.3); }
.heatmap-cell.lvl-2 { background: rgba(16,185,129,.55); }
.heatmap-cell.lvl-3 { background: rgba(16,185,129,.8); }
.heatmap-cell.lvl-4 { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,.6); }

/* Shareable Progress Card */
.shareable-card-frame {
  background: linear-gradient(135deg, #0f172a, #022c22, #0f172a);
  border: 2px solid rgba(74,222,128,.4);
  border-radius: var(--r-xl);
  padding: 2.2rem;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  position: relative;
  overflow: hidden;
}
.shareable-card-frame::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(16,185,129,.35), transparent 70%);
  pointer-events: none;
}


/* =============================================================================
   ACADEMIC PRO COMMAND CENTER (CBSE CLASS 11 & 12 • NEET • JEE)
   Dedicated plant-free workspace with scientific revision taskforce,
   official NCERT e-books library, worked solutions & exam prep bank
   ============================================================================= */

/* ─── EXECUTIVE MODE SWITCHER (NAVBAR) ─── */
.mode-segmented-ctrl {
  display: inline-flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg-card) 92%, #000);
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  gap: 3px;
  position: relative;
  z-index: 10;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .45rem .85rem;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.seg-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}
.seg-btn.active {
  background: #1e293b;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.35), 0 0 0 1px rgba(59,130,246,.35);
}
#btn-seg-garden.seg-btn.active {
  background: linear-gradient(135deg, #14532d, #15803d);
  color: #fff;
  box-shadow: 0 2px 12px rgba(22,101,52,.4), 0 0 0 1px rgba(74,222,128,.4);
}
#btn-seg-academic.seg-btn.active {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,.45), 0 0 0 1px rgba(96,165,250,.5);
}
.seg-icon { font-size: 1rem; }
.seg-badge {
  background: rgba(245,158,11,.2);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,.4);
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ─── ACADEMIC PRO HUB CONTAINER (100% PLANT FREE) ─── */
.academic-pro-hub {
  --hub-bg: #0b1120;
  --hub-surface: #111c33;
  --hub-card: #15223e;
  --hub-border: rgba(99,102,241,.2);
  --hub-blue: #3b82f6;
  --hub-cyan: #06b6d4;
  --hub-amber: #f59e0b;
  --hub-rose: #f43f5e;
  --hub-emerald: #10b981;
  --hub-text: #f8fafc;
  --hub-muted: #94a3b8;

  display: block;
  background: var(--hub-bg);
  color: var(--hub-text);
  border-radius: var(--r-xl);
  border: 1px solid var(--hub-border);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  padding: 2rem;
  margin-top: 1rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  font-family: var(--font);
}
html[data-theme="light"] .academic-pro-hub {
  --hub-bg: #f8fafc;
  --hub-surface: #ffffff;
  --hub-card: #f1f5f9;
  --hub-border: rgba(99,102,241,.25);
  --hub-text: #0f172a;
  --hub-muted: #64748b;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.academic-pro-hub.hidden { display: none !important; }

/* ─── ACADEMIC HERO HEADER ─── */
.acad-hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--hub-border);
  flex-wrap: wrap;
}
.acad-hero-title-area { max-width: 650px; }
.acad-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,.15);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,.35);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: .6rem;
  text-transform: uppercase;
}
.acad-hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--hub-text);
  margin: 0 0 .4rem 0;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.acad-hero-sub {
  color: var(--hub-muted);
  font-size: .92rem;
  line-height: 1.5;
  margin: 0;
}
.acad-hero-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

/* ─── LIVE DASHBOARD METRICS ─── */
.acad-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.acad-metric-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.acad-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.45);
}
.acad-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: rgba(255,255,255,.05);
  flex-shrink: 0;
}
.acad-metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--hub-text);
  line-height: 1.1;
  font-family: var(--mono);
}
.acad-metric-lbl {
  font-size: .75rem;
  color: var(--hub-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 2px;
}
.pulse-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseRadar 1.5s infinite;
  margin-left: 4px;
}
@keyframes pulseRadar {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* ─── RADAR ALERT BANNER ─── */
.acad-radar-alert {
  background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(245,158,11,.1));
  border: 1px solid rgba(239,68,68,.35);
  border-radius: var(--r-md);
  padding: .9rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.radar-alert-msg {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .88rem;
  color: #fca5a5;
  font-weight: 600;
}
.radar-alert-msg strong { color: #fff; }

/* ─── COMMAND TABS NAVIGATION ─── */
.acad-nav-tabs {
  display: flex;
  gap: .5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hub-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.acad-nav-tabs::-webkit-scrollbar { display: none; }
.acad-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.15rem;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--hub-muted);
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
}
.acad-tab-btn:hover {
  color: var(--hub-text);
  background: rgba(255,255,255,.05);
}
.acad-tab-btn.active {
  background: var(--hub-surface);
  color: #fff;
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.acad-tab-badge {
  background: rgba(59,130,246,.2);
  color: #93c5fd;
  font-size: .72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

/* ─── SUBVIEWS LAYOUT ─── */
.acad-subview {
  margin-top: 1.75rem;
}
.acad-subview.hidden { display: none !important; }

/* ─── TOOLBAR & FILTERS ─── */
.acad-filter-toolbar {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.acad-filter-group {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  flex: 1;
}
.acad-input-search {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-sm);
  padding: .5rem .85rem;
  color: var(--hub-text);
  font-family: var(--font);
  font-size: .85rem;
  min-width: 220px;
}
.acad-select {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-sm);
  padding: .5rem .75rem;
  color: var(--hub-text);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
}

/* ─── CADENCE EXPLAINER STRIP ─── */
.cadence-explainer-strip {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  background: rgba(99,102,241,.07);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--r-sm);
  margin-bottom: 1.25rem;
  font-size: .78rem;
  color: var(--hub-muted);
  flex-wrap: wrap;
}
.cadence-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.05);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 600;
  color: #cbd5e1;
}

/* ─── TASKFORCE GRID & CARDS ─── */
.taskforce-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}
.taskforce-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.taskforce-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.taskforce-card.card-overdue {
  border-left: 4px solid #ef4444;
}
.taskforce-card.card-due-today {
  border-left: 4px solid #f59e0b;
}
.taskforce-card.card-upcoming {
  border-left: 4px solid #3b82f6;
}
.taskforce-card.card-mastered {
  border-left: 4px solid #10b981;
}

.tf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .6rem;
}
.tf-meta-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tf-subject-pill {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.tf-subject-pill.bio { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.tf-subject-pill.math { background: rgba(56,189,248,.15); color: #38bdf8; border: 1px solid rgba(56,189,248,.3); }
.tf-subject-pill.phys { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.tf-subject-pill.chem { background: rgba(168,85,247,.15); color: #c084fc; border: 1px solid rgba(168,85,247,.3); }

.tf-target-pill {
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,.07);
  color: #cbd5e1;
}
.tf-status-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.tf-status-badge.overdue { background: rgba(239,68,68,.2); color: #f87171; border: 1px solid rgba(239,68,68,.4); }
.tf-status-badge.due-today { background: rgba(245,158,11,.2); color: #fbbf24; border: 1px solid rgba(245,158,11,.4); }
.tf-status-badge.upcoming { background: rgba(59,130,246,.2); color: #60a5fa; border: 1px solid rgba(59,130,246,.4); }
.tf-status-badge.mastered { background: rgba(16,185,129,.2); color: #34d399; border: 1px solid rgba(16,185,129,.4); }

.tf-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hub-text);
  margin: 0 0 .5rem 0;
  line-height: 1.35;
}
.tf-notes {
  font-size: .8rem;
  color: var(--hub-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  background: var(--hub-card);
  padding: .6rem .8rem;
  border-radius: var(--r-sm);
  border-left: 2px solid rgba(99,102,241,.5);
}

/* Cadence Progress Visualizer */
.tf-cadence-bar {
  margin-bottom: 1.1rem;
}
.tf-cadence-label-row {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--hub-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.tf-cadence-ticks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.tf-cadence-tick {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  transition: all .2s ease;
}
.tf-cadence-tick.filled {
  background: var(--hub-blue);
  box-shadow: 0 0 8px rgba(59,130,246,.5);
}
.tf-cadence-tick.filled.tick-mastered {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16,185,129,.6);
}

.tf-meta-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  color: var(--hub-muted);
  margin-bottom: 1rem;
  border-top: 1px dashed rgba(255,255,255,.08);
  padding-top: .65rem;
}

.tf-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.tf-btn {
  flex: 1;
  padding: .5rem .75rem;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all .2s ease;
  border: none;
  white-space: nowrap;
}
.tf-btn-revise {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37,99,235,.3);
}
.tf-btn-revise:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
}
.tf-btn-secondary {
  background: var(--hub-card);
  color: var(--hub-muted);
  border: 1px solid var(--hub-border);
}
.tf-btn-secondary:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

/* ─── E-BOOKS CATALOG GRID ─── */
.ebooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.ebook-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transition: transform .2s ease, border-color .2s ease;
}
.ebook-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.4);
}
.ebook-hdr {
  display: flex;
  gap: 1rem;
  margin-bottom: .85rem;
}
.ebook-book-cover {
  width: 58px;
  height: 78px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.cover-ncert-lbl {
  font-size: .52rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: .05em;
}
.cover-icon { font-size: 1.35rem; margin: 2px 0; }
.cover-code {
  font-size: .52rem;
  font-family: var(--mono);
  color: #94a3b8;
}
.ebook-info { flex: 1; }
.ebook-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hub-text);
  margin: 0 0 .3rem 0;
  line-height: 1.3;
}
.ebook-chapter-num {
  font-size: .72rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.ebook-topics {
  font-size: .78rem;
  color: var(--hub-muted);
  line-height: 1.45;
  margin: .5rem 0 .9rem 0;
}
.ebook-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ─── IN-APP E-BOOK READER MODAL ─── */
.reader-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.reader-modal-overlay.hidden { display: none !important; }
.reader-modal-window {
  background: #0f172a;
  color: #f1f5f9;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--r-xl);
  border: 1px solid rgba(99,102,241,.3);
  box-shadow: 0 25px 70px rgba(0,0,0,.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.reader-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.25);
}
.reader-info-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.reader-info-sub {
  font-size: .78rem;
  color: #94a3b8;
}
.reader-controls-grp {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.reader-btn-tool {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #cbd5e1;
  padding: .35rem .65rem;
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
}
.reader-btn-tool:hover { background: rgba(255,255,255,.15); color: #fff; }

.reader-content-scroll {
  padding: 2rem 2.5rem;
  overflow-y: auto;
  line-height: 1.7;
  font-size: 1rem;
}
.reader-content-scroll[data-theme="sepia"] {
  background: #fbf0d9;
  color: #433422;
}
.reader-content-scroll[data-theme="white"] {
  background: #ffffff;
  color: #0f172a;
}
.reader-section-tag {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-top: 1.5rem;
  margin-bottom: .4rem;
}
.ncert-golden-box {
  background: rgba(245,158,11,.1);
  border-left: 4px solid #f59e0b;
  padding: .9rem 1.15rem;
  border-radius: 6px;
  margin: 1.25rem 0;
  font-size: .92rem;
  color: #fbbf24;
}
.ncert-golden-box strong { color: #fff; }
.reader-content-scroll[data-theme="sepia"] .ncert-golden-box {
  background: #fef3c7;
  color: #92400e;
  border-left-color: #d97706;
}
.reader-content-scroll[data-theme="sepia"] .ncert-golden-box strong { color: #78350f; }

/* ─── SOLUTIONS & EXEMPLAR BANK ─── */
.solutions-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.solution-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.sol-q-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.sol-q-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hub-text);
  margin-bottom: 1rem;
  line-height: 1.45;
}
.sol-steps-block {
  background: var(--hub-card);
  border-radius: var(--r-md);
  padding: 1.2rem;
  font-size: .92rem;
  line-height: 1.65;
  border-left: 3px solid #3b82f6;
  margin-bottom: 1rem;
}
.sol-step-item {
  margin-bottom: .75rem;
}
.sol-step-item strong {
  color: #60a5fa;
}
.sol-ans-box {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.35);
  border-radius: var(--r-sm);
  padding: .75rem 1rem;
  color: #34d399;
  font-weight: 600;
  font-size: .9rem;
}

/* ─── EXAM PREP & PYQ ARCHIVE ─── */
.examprep-layout {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.weightage-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  background: var(--hub-surface);
}
.acad-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: .88rem;
}
.acad-table th {
  background: var(--hub-card);
  padding: .85rem 1rem;
  color: var(--hub-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--hub-border);
  font-size: .8rem;
  text-transform: uppercase;
}
.acad-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: var(--hub-text);
}
.acad-table tr:hover td {
  background: rgba(255,255,255,.02);
}

.pyq-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}
.pyq-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  padding: 1.35rem;
  box-shadow: 0 4px 18px rgba(0,0,0,.2);
}

/* ─── FORMULA VAULT ─── */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}
.vault-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  padding: 1.25rem;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.vault-formula-box {
  background: var(--hub-card);
  border-radius: var(--r-sm);
  padding: .9rem 1rem;
  margin: .75rem 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 1.05rem;
  color: #38bdf8;
  border: 1px solid rgba(56,189,248,.2);
}
.vault-notes {
  font-size: .8rem;
  color: var(--hub-muted);
  line-height: 1.4;
}

/* ─── DEEP WORK FOCUS STATION ─── */
.deep-work-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .deep-work-layout { grid-template-columns: 1fr; }
}
.deep-station-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.deep-clock-display {
  font-size: 4.5rem;
  font-weight: 800;
  font-family: var(--mono);
  color: #fff;
  letter-spacing: .05em;
  margin: 1rem 0;
  text-shadow: 0 0 30px rgba(59,130,246,.5);
}
.deep-presets-row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.deep-btn-preset {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  color: var(--hub-muted);
  padding: .45rem .85rem;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.deep-btn-preset.active {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
}
.deep-controls-row {
  display: flex;
  gap: 1rem;
}
.btn-deep-action {
  padding: .75rem 2rem;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
}
.btn-deep-start {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 18px rgba(16,185,129,.4);
}
.btn-deep-pause {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.btn-deep-reset {
  background: var(--hub-card);
  color: var(--hub-muted);
  border: 1px solid var(--hub-border);
}

.deep-sidebar-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
}
.deep-side-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--hub-text);
}
.deep-log-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-height: 250px;
  overflow-y: auto;
}
.deep-log-item {
  background: var(--hub-card);
  border-radius: var(--r-sm);
  padding: .65rem .85rem;
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* =============================================================================
   MASTER ACADEMIC CALENDAR, TIME ALLOTMENT & HANDWRITTEN STUDY NOTES
   ============================================================================= */

/* ─── EXAM COUNTDOWN BAR ─── */
.exam-countdown-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.countdown-card {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.countdown-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.5);
}
.countdown-card.board-cbse { border-left: 4px solid #3b82f6; }
.countdown-card.exam-neet { border-left: 4px solid #10b981; }
.countdown-card.exam-jee { border-left: 4px solid #f59e0b; }

.countdown-info h4 {
  margin: 0 0 2px 0;
  font-size: .92rem;
  color: var(--hub-text);
  font-weight: 700;
}
.countdown-info span {
  font-size: .75rem;
  color: var(--hub-muted);
}
.countdown-timer-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--mono);
  color: #fff;
  text-align: right;
  line-height: 1;
}
.countdown-timer-lbl {
  font-size: .65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}

/* ─── CALENDAR CONTAINER & CONTROLS ─── */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}
@media (max-width: 950px) {
  .calendar-layout { grid-template-columns: 1fr; }
}

.calendar-main-panel {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.calendar-nav-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.cal-month-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--hub-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-nav-btn-grp {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.btn-cal-nav {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  color: var(--hub-text);
  padding: .4rem .8rem;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-cal-nav:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* Calendar 7-Day Grid */
.calendar-week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  text-align: center;
}
.cal-day-header {
  font-size: .75rem;
  font-weight: 700;
  color: var(--hub-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .4rem 0;
}
.cal-day-header.weekend { color: #f87171; }

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day-cell {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-sm);
  min-height: 82px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  position: relative;
  overflow: hidden;
}
.cal-day-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.5);
  background: rgba(99,102,241,.08);
}
.cal-day-cell.cal-today {
  border: 2px solid #3b82f6;
  background: rgba(59,130,246,.12);
  box-shadow: 0 0 12px rgba(59,130,246,.35);
}
.cal-day-cell.cal-selected {
  border-color: #f59e0b;
  background: rgba(245,158,11,.1);
}
.cal-day-cell.cal-other-month {
  opacity: .35;
}

.cal-day-num {
  font-size: .85rem;
  font-weight: 700;
  color: var(--hub-text);
  font-family: var(--mono);
}
.cal-today .cal-day-num {
  color: #60a5fa;
  font-weight: 800;
}

.cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}
.cal-event-pill {
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.cal-event-pill.exam {
  background: rgba(239,68,68,.25);
  color: #fca5a5;
  border-left: 2px solid #ef4444;
}
.cal-event-pill.timelimit {
  background: rgba(59,130,246,.25);
  color: #93c5fd;
  border-left: 2px solid #3b82f6;
}
.cal-event-pill.revision {
  background: rgba(245,158,11,.25);
  color: #fcd34d;
  border-left: 2px solid #f59e0b;
}

/* Calendar Sidebar (Agenda) */
.calendar-side-panel {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.agenda-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--hub-border);
}
.agenda-date-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.agenda-total-hours {
  font-size: .75rem;
  color: #38bdf8;
  font-weight: 700;
  background: rgba(56,189,248,.12);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  overflow-y: auto;
  max-height: 400px;
}
.agenda-item {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-sm);
  padding: .75rem .9rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  transition: border-color .2s ease;
}
.agenda-item:hover {
  border-color: rgba(99,102,241,.4);
}
.agenda-item-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--hub-text);
  margin: 0 0 3px 0;
}
.agenda-item-meta {
  font-size: .72rem;
  color: var(--hub-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── DATE ALLOTMENT MODAL ─── */
.allotment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}
@media (max-width: 600px) {
  .allotment-form-grid { grid-template-columns: 1fr; }
}

/* ─── TOLL-GRADE TOPPER'S HANDWRITTEN STUDY NOTES ─── */
.handwritten-hub-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.handwritten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

/* Authentic Ruled Notebook Paper */
.notebook-sheet {
  background-color: #fdfbf7;
  background-image: 
    linear-gradient(90deg, transparent 48px, #fca5a5 49px, #fca5a5 50px, transparent 51px),
    repeating-linear-gradient(to bottom, transparent, transparent 27px, #e2e8f0 28px);
  border-radius: var(--r-lg);
  border: 1px solid #cbd5e1;
  padding: 1.75rem 1.75rem 1.75rem 4rem;
  color: #1e293b;
  box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.05);
  font-family: 'Caveat', 'Kalam', cursive, sans-serif;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.notebook-sheet:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}

/* Spiral binding holes representation */
.notebook-sheet::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 14px;
  bottom: 15px;
  width: 14px;
  background-image: radial-gradient(circle, #94a3b8 4px, transparent 5px);
  background-size: 14px 28px;
}

.note-meta-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .85rem;
  font-family: var(--font);
}
.note-subject-tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: 4px;
}
.note-subject-tag.bio { background: #dcfce7; color: #15803d; }
.note-subject-tag.math { background: #e0f2fe; color: #0369a1; }
.note-subject-tag.phys { background: #fef3c7; color: #b45309; }
.note-subject-tag.chem { background: #f3e8ff; color: #7e22ce; }
.note-subject-tag.eng { background: #fee2e2; color: #b91c1c; }

.note-title-hand {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  margin: 0 0 .5rem 0;
}

/* Highlighter styles */
.hl-yellow {
  background: rgba(254,240,138,.85);
  padding: 1px 6px;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hl-cyan {
  background: rgba(186,230,253,.85);
  padding: 1px 6px;
  border-radius: 3px;
}
.hl-pink {
  background: rgba(254,205,211,.85);
  padding: 1px 6px;
  border-radius: 3px;
}

.note-body-hand {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #1e293b;
  margin-bottom: 1rem;
}
.note-body-hand ul {
  margin: .4rem 0;
  padding-left: 1.2rem;
}
.note-body-hand li {
  margin-bottom: .25rem;
}

/* Sticky note highlight inside notebook */
.hand-sticky {
  background: #fef08a;
  color: #713f12;
  border-radius: 4px;
  padding: .75rem 1rem;
  margin: .85rem 0;
  box-shadow: 2px 4px 10px rgba(0,0,0,.1);
  transform: rotate(-1deg);
  font-size: 1.15rem;
  line-height: 1.45;
  border-left: 4px solid #eab308;
}

/* Diagram box inside handwritten note */
.hand-diagram-box {
  background: #ffffff;
  border: 1.5px dashed #94a3b8;
  border-radius: 6px;
  padding: .85rem 1rem;
  margin: .85rem 0;
  font-family: var(--font);
  font-size: .88rem;
  color: #334155;
}

.note-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font);
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #e2e8f0;
}
.btn-print-note {
  background: #1e293b;
  color: #fff;
  border: none;
  padding: .4rem .85rem;
  border-radius: var(--r-sm);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-print-note:hover {
  background: #0f172a;
}


/* =============================================================================
   IN-WEBSITE DIGITAL NCERT TEXTBOOK & EXAM PREPARATION READER
   Comprehensive embedded reader for online study with all preparation materials
   ============================================================================= */

.ncert-reader-station {
  display: flex;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0,0,0,.4);
  margin-top: 1.25rem;
  margin-bottom: 2rem;
  min-height: 720px;
}
@media (max-width: 950px) {
  .ncert-reader-station {
    flex-direction: column;
  }
}

/* ─── READER SIDEBAR (CHAPTER NAVIGATOR) ─── */
.reader-sidebar {
  width: 320px;
  background: var(--hub-card);
  border-right: 1px solid var(--hub-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
@media (max-width: 950px) {
  .reader-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--hub-border);
    max-height: 300px;
  }
}

.reader-sidebar-hdr {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--hub-border);
  background: rgba(0,0,0,.15);
}
.reader-subject-pills {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: .75rem;
}
.reader-subject-pills::-webkit-scrollbar { display: none; }
.reader-subj-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--hub-border);
  color: var(--hub-muted);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .65rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
}
.reader-subj-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.reader-subj-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
}

.reader-class-pills {
  display: flex;
  gap: 6px;
  margin-bottom: .75rem;
}
.reader-class-btn {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--hub-border);
  color: var(--hub-muted);
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 700;
  padding: .3rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: center;
  transition: all .2s ease;
}
.reader-class-btn.active {
  background: rgba(99,102,241,.25);
  color: #a5b4fc;
  border-color: rgba(99,102,241,.5);
}

.reader-search-input {
  width: 100%;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-sm);
  padding: .45rem .75rem;
  color: var(--hub-text);
  font-family: var(--font);
  font-size: .8rem;
}

.reader-chapter-list {
  flex: 1;
  overflow-y: auto;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reader-ch-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .65rem .85rem;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--hub-muted);
  cursor: pointer;
  text-align: left;
  transition: all .15s ease;
}
.reader-ch-item:hover {
  background: rgba(255,255,255,.04);
  color: var(--hub-text);
}
.reader-ch-item.active {
  background: rgba(59,130,246,.15);
  border-color: rgba(59,130,246,.35);
  color: #fff;
}
.reader-ch-num {
  font-size: .7rem;
  font-family: var(--mono);
  font-weight: 700;
  color: #60a5fa;
  margin-top: 2px;
  flex-shrink: 0;
}
.reader-ch-meta {
  flex: 1;
}
.reader-ch-title {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.reader-ch-code {
  font-size: .65rem;
  color: var(--hub-muted);
  font-family: var(--mono);
  margin-top: 2px;
}

/* ─── READER MAIN STAGE ─── */
.reader-main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hub-bg);
}

.reader-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  border-bottom: 1px solid var(--hub-border);
  background: var(--hub-surface);
  flex-wrap: wrap;
  gap: .75rem;
}
.reader-stage-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reader-active-ch-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hub-text);
  margin: 0;
}

/* View Switcher Pills inside Reader */
.reader-view-switcher {
  display: flex;
  gap: 4px;
  background: var(--hub-card);
  padding: 3px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hub-border);
}
.reader-view-pill {
  background: transparent;
  border: none;
  color: var(--hub-muted);
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.reader-view-pill:hover { color: #fff; }
.reader-view-pill.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 6px rgba(37,99,235,.35);
}

/* Reader Reading Controls */
.reader-stage-controls {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.reader-ctrl-btn {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  color: var(--hub-text);
  padding: .35rem .65rem;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.reader-ctrl-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ─── READING PANE & ARTICLE TYPOGRAPHY ─── */
.reader-reading-pane {
  flex: 1;
  padding: 2.5rem 3.5rem;
  overflow-y: auto;
  line-height: 1.85;
  font-size: 1.05rem;
  color: var(--hub-text);
  max-height: 680px;
}
@media (max-width: 768px) {
  .reader-reading-pane { padding: 1.5rem; }
}

/* Reading Themes */
.reader-reading-pane[data-theme="dark"] {
  background: #090e17;
  color: #e2e8f0;
}
.reader-reading-pane[data-theme="sepia"] {
  background: #fbf0d9;
  color: #3b2f20;
  font-family: 'Georgia', serif;
}
.reader-reading-pane[data-theme="sepia"] h1,
.reader-reading-pane[data-theme="sepia"] h2,
.reader-reading-pane[data-theme="sepia"] h3,
.reader-reading-pane[data-theme="sepia"] h4 {
  color: #713f12;
}
.reader-reading-pane[data-theme="sepia"] .reader-section-tag {
  color: #b45309;
}
.reader-reading-pane[data-theme="sepia"] .ncert-def-box {
  background: #fef3c7;
  border-left-color: #d97706;
  color: #78350f;
}
.reader-reading-pane[data-theme="sepia"] .ncert-math-block {
  background: #f5e6c8;
  color: #451a03;
  border-color: #d97706;
}

.reader-reading-pane[data-theme="white"] {
  background: #ffffff;
  color: #0f172a;
}
.reader-reading-pane[data-theme="white"] h1,
.reader-reading-pane[data-theme="white"] h2,
.reader-reading-pane[data-theme="white"] h3 {
  color: #1e3a8a;
}
.reader-reading-pane[data-theme="white"] .ncert-def-box {
  background: #f0fdf4;
  border-left-color: #16a34a;
  color: #14532d;
}
.reader-reading-pane[data-theme="white"] .ncert-math-block {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Chapter Presentation Components */
.reader-ch-header-banner {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hub-border);
}
.reader-official-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,.15);
  color: #60a5fa;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .6rem;
}
.reader-main-heading {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 .5rem 0;
  letter-spacing: -.02em;
}
.reader-curriculum-sub {
  font-size: .95rem;
  color: var(--hub-muted);
  line-height: 1.5;
  margin: 0;
}

.reader-section-header {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 .75rem 0;
  color: #60a5fa;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reader-para {
  margin: 0 0 1.25rem 0;
  line-height: 1.85;
}

/* NCERT Definition Box */
.ncert-def-box {
  background: rgba(59,130,246,.1);
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.65;
}
.ncert-def-box strong { color: #fff; }

/* Math & Reaction Block */
.ncert-math-block {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--mono);
  font-size: 1.05rem;
  text-align: center;
  color: #38bdf8;
  overflow-x: auto;
}

/* Solved Example Box */
.ncert-worked-example {
  background: rgba(16,185,129,.07);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: var(--r-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.example-badge {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #34d399;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}
.example-q {
  font-weight: 700;
  margin-bottom: .85rem;
  line-height: 1.5;
}
.example-sol {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--hub-text);
  border-top: 1px dashed rgba(16,185,129,.2);
  padding-top: .75rem;
}

/* NCERT Exercise Accordion */
.exercise-sol-card {
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-md);
  margin-bottom: 1rem;
  overflow: hidden;
}
.exercise-sol-card summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  background: var(--hub-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.exercise-sol-card summary:hover {
  background: rgba(255,255,255,.03);
}
.exercise-sol-body {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--hub-border);
  font-size: .95rem;
  line-height: 1.7;
}

/* Exam Prep PYQ Card inside Reader */
.reader-pyq-box {
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--r-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.pyq-tag-exam {
  font-size: .72rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: .4rem;
  text-transform: uppercase;
}


/* =============================================================================
   OFFLINE NCERT TEXTBOOK VOLUMES & SEPARATE BOOK BLOCKS
   Complete offline reading, standalone bundle download, and chapter indexing
   ============================================================================= */

.offline-books-section {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.offline-library-banner {
  background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(59,130,246,.12));
  border: 1px solid rgba(16,185,129,.35);
  border-radius: var(--r-xl);
  padding: 1.5rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.offline-banner-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.offline-banner-sub {
  font-size: .88rem;
  color: var(--hub-muted);
  margin: 0;
  max-width: 650px;
  line-height: 1.5;
}

/* Offline Books Grid */
.offline-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

/* Individual Book Volume Block */
.book-volume-block {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.book-volume-block:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,.5);
  box-shadow: 0 16px 45px rgba(0,0,0,.35);
}

/* Color Accents by Subject */
.book-volume-block.vol-chem { border-top: 4px solid #c084fc; }
.book-volume-block.vol-bio { border-top: 4px solid #10b981; }
.book-volume-block.vol-phys { border-top: 4px solid #f59e0b; }
.book-volume-block.vol-eng { border-top: 4px solid #f43f5e; }
.book-volume-block.vol-math { border-top: 4px solid #38bdf8; }

.book-vol-hdr {
  display: flex;
  gap: 1.15rem;
  margin-bottom: 1rem;
}
.book-3d-cover {
  width: 70px;
  height: 98px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 4px 6px 15px rgba(0,0,0,.4), inset -2px 0 6px rgba(0,0,0,.3);
  position: relative;
  border: 1px solid rgba(255,255,255,.15);
}
.book-3d-cover.chem { background: linear-gradient(135deg, #4c1d95, #7e22ce); }
.book-3d-cover.bio { background: linear-gradient(135deg, #064e3b, #059669); }
.book-3d-cover.phys { background: linear-gradient(135deg, #78350f, #d97706); }
.book-3d-cover.eng { background: linear-gradient(135deg, #881337, #e11d48); }
.book-3d-cover.math { background: linear-gradient(135deg, #0c4a6e, #0284c7); }

.cover-ncert-tag {
  font-size: .55rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: .06em;
}
.cover-icon-center { font-size: 1.6rem; }
.cover-code-btm {
  font-size: .55rem;
  font-family: var(--mono);
  color: rgba(255,255,255,.8);
}

.book-vol-meta {
  flex: 1;
}
.book-vol-pill-row {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.book-offline-badge {
  background: rgba(16,185,129,.18);
  color: #34d399;
  border: 1px solid rgba(16,185,129,.35);
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: .02em;
}
.book-vol-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--hub-text);
  margin: 0 0 4px 0;
  line-height: 1.3;
}
.book-vol-edition {
  font-size: .75rem;
  color: #94a3b8;
  margin: 0;
}

.book-vol-summary {
  font-size: .8rem;
  color: var(--hub-muted);
  line-height: 1.5;
  margin: .85rem 0 1rem 0;
  background: var(--hub-card);
  padding: .75rem .9rem;
  border-radius: var(--r-sm);
  border-left: 2px solid rgba(99,102,241,.4);
}

/* Action Buttons inside Book Block */
.book-vol-actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.book-action-row-primary {
  display: flex;
  gap: .5rem;
}
.btn-book-read {
  flex: 1;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border: none;
  padding: .6rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .2s ease;
  box-shadow: 0 3px 12px rgba(37,99,235,.35);
}
.btn-book-read:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  transform: translateY(-1px);
}

.btn-book-download {
  flex: 1;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border: none;
  padding: .6rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .2s ease;
  box-shadow: 0 3px 12px rgba(16,185,129,.35);
}
.btn-book-download:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
}

.book-action-row-secondary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-book-drawer-toggle {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-book-drawer-toggle:hover {
  text-decoration: underline;
}

/* Collapsible Chapter Index Drawer inside Book Block */
.book-chapter-drawer {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px dashed rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
}
.book-chapter-drawer.hidden { display: none !important; }
.drawer-ch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--hub-card);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: .76rem;
  color: var(--hub-text);
  gap: 6px;
}
.drawer-ch-item:hover {
  background: rgba(255,255,255,.06);
}
.drawer-ch-link {
  color: #93c5fd;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.drawer-ch-link:hover { text-decoration: underline; }
