/* Phase 1 — pastel café default, with the observatory preserved as the dark theme. */
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #fff8fc;
  --panel: #fffdfd;
  --panel-2: #fff0f7;
  --panel-3: #f6e5f3;
  --text: #382b3c;
  --muted: #6e5c74;
  --muted-2: #897a8c;
  --line: #ead8e8;
  --purple: #9465c8;
  --purple-2: #7950ad;
  --gold: #b87937;
  --rose: #d264a5;
  --red: #cf638f;
  --pink: #d264a5;
  --peach: #bd7946;
  --yellow: #a87931;
  --mint: #559b83;
  --cyan: #598eaa;
  --coral: #c86f73;
  --shadow: 0 18px 40px rgb(100 56 111 / 10%);
  --shadow-soft: 0 8px 22px rgb(100 56 111 / 7%);
  --journey-ink: #382b3c;
  --journey-muted: #6e5c74;
  --journey-stroke: color-mix(in srgb, var(--purple) 17%, var(--line));
  --journey-wash: color-mix(in srgb, var(--rose) 5%, var(--panel));
  --journey-raised: color-mix(in srgb, var(--purple) 5%, var(--panel-2));
  --journey-glow: color-mix(in srgb, var(--rose) 8%, transparent);
  --cafe-glow: color-mix(in srgb, #ffc5e1 34%, transparent);
  --rune-glow: color-mix(in srgb, #d7c2ff 20%, transparent);
  --button-primary-bg: #d264a5;
  --button-primary-fg: #fffaff;
  --focus-ring: #925bc3;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #171421;
  --panel: #211c2a;
  --panel-2: #2c2538;
  --panel-3: #393048;
  --text: #f7f1f8;
  --muted: #c3b7ca;
  --muted-2: #9a8da4;
  --line: #51435d;
  --purple: #b29af2;
  --purple-2: #9278dc;
  --gold: #f1c778;
  --rose: #e98bb2;
  --red: #e98bb2;
  --pink: #e98bb2;
  --peach: #f1c778;
  --yellow: #f1c778;
  --mint: #91d2b5;
  --cyan: #8ac9dc;
  --coral: #f08d80;
  --shadow: 0 18px 48px rgb(8 5 13 / 42%);
  --shadow-soft: 0 10px 28px rgb(8 5 13 / 28%);
  --journey-ink: #f7f2f3;
  --journey-muted: #c1b6c2;
  --cafe-glow: color-mix(in srgb, var(--peach) 8%, transparent);
  --rune-glow: color-mix(in srgb, var(--purple) 10%, transparent);
  --button-primary-fg: #2d1723;
}

html { color-scheme: light; }
html[data-theme='dark'] { color-scheme: dark; }

/* The café shell is the shared frame around every destination. */
:root[data-theme='light'] body {
  background-image:
    radial-gradient(ellipse 46rem 34rem at 95% -8%, #ffd8eb88, transparent 70%),
    radial-gradient(ellipse 42rem 42rem at 0% 48%, #eadcff66, transparent 70%),
    linear-gradient(145deg, #fff9fc, #fff4fa 56%, #f9f0fc);
}
.app-shell { background: transparent; }
:root[data-theme='light'] .sidebar {
  background: linear-gradient(180deg, #fffafd 0%, #fff5fa 58%, #f8effa 100%);
  border-right: 1px solid #ead9ea;
  box-shadow: 7px 0 26px rgb(89 52 93 / 6%);
}
.brand { margin-bottom: 22px; }
:root[data-theme='light'] .brand-cat { filter: drop-shadow(0 4px 9px #d264a533); }
:root[data-theme='light'] .brand strong { color: #493452; letter-spacing: .035em; }
:root[data-theme='light'] .brand .brand-slogan { color: #8d7094; }
:root[data-theme='light'] .profile-connect {
  border-color: #eddaeb;
  background: linear-gradient(130deg, #fff 0%, #fff3fa 100%);
  box-shadow: 0 5px 15px rgb(113 65 119 / 5%);
}
:root[data-theme='light'] .nav-label { color: #927c98; }
:root[data-theme='light'] .nav-link { border-radius: 12px; }
:root[data-theme='light'] .nav-link:hover { background: #f6eaf5; color: #684b78; }
:root[data-theme='light'] .nav-link.active {
  background: linear-gradient(100deg, #f9e3f1, #f2eafa 90%);
  box-shadow: inset 3px 0 #d264a5, 0 5px 15px rgb(155 91 151 / 7%);
  color: #714d86;
}
:root[data-theme='light'] .nav-link.active::before { display: none; }
:root[data-theme='light'] .nav-link.active > .nav-icon { color: #bd5c9c; }
:root[data-theme='light'] .paw-card {
  border-color: #ead9ec;
  background: linear-gradient(145deg, #fff 0%, #f8effa 100%);
}
:root[data-theme='light'] .theme-toggle {
  border-color: #e7d5e8;
  background: #fff9fd;
}
:root[data-theme='light'] .topbar {
  background: rgb(255 250 253 / 94%);
  border-bottom-color: #ead9e8;
  box-shadow: 0 5px 18px rgb(85 53 91 / 4%);
  backdrop-filter: none;
}
:root[data-theme='light'] .crumb strong { color: #674b76; }
:root[data-theme='light'] .finder-open-button { background: #fffafd; border-color: #ead9e8; }
:root[data-theme='light'] .sync-status { color: var(--muted); }
:root[data-theme='light'] .mobile-menu { background: #fffafd; border-color: #ead9e8; }
:root[data-theme='light'] .footer { border-top-color: #ead9e8; color: #85738a; }

:root[data-theme='dark'] .sidebar {
  background: linear-gradient(180deg, #211c2a, #1a1723);
  border-right-color: #463a52;
  box-shadow: 7px 0 28px rgb(0 0 0 / 15%);
}
:root[data-theme='dark'] .brand strong { color: #f7f1f8; }
:root[data-theme='dark'] .brand .brand-slogan,
:root[data-theme='dark'] .nav-label { color: #b8a8c3; }
:root[data-theme='dark'] .profile-connect,
:root[data-theme='dark'] .paw-card,
:root[data-theme='dark'] .theme-toggle,
:root[data-theme='dark'] .finder-open-button,
:root[data-theme='dark'] .mobile-menu { background: #282232; border-color: #4b3e57; }
:root[data-theme='dark'] .nav-link:hover { background: #30283b; }
:root[data-theme='dark'] .nav-link.active { background: #392c43; color: #f1a8c7; }
:root[data-theme='dark'] .topbar { background: rgb(23 20 33 / 95%); border-bottom-color: #463a52; }
:root[data-theme='dark'] .crumb strong { color: #f1c778; }

/* Fast, composited feedback replaces the old blur and stagger spectacle. */
#page-content :is(.content-header,.home-command-center,.benchmark-library-panel,.practice-split-panel,.daily-community-plan,.practice-journal,.playlist-intro,.playlist-library-tools,.playlist-research,.login-wrap,.player-lookup-card),
.practice-category-grid > *, .learning-track-card, .fundamental-card,
.daily-routine-day, .benchmark-groups > *, .benchmark-grid > *,
.community-benchmark-grid > *, .playlist-grid > *, .dashboard-grid > .section-card {
  animation: none !important;
  filter: none !important;
}
.home-orbit-core, .astral-starfield, .astral-center-halo { animation: none !important; }
.astral-detail-map .astral-skill-node, .astral-branch-card { animation-duration: 180ms; }
#page-content { view-transition-name: ferxl-page-content; }
::view-transition-old(ferxl-page-content) { animation: ferxl-route-out 100ms ease both; }
::view-transition-new(ferxl-page-content) { animation: ferxl-route-in 190ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes ferxl-route-out { to { opacity: 0; transform: translateY(-3px); } }
@keyframes ferxl-route-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.practice-scenario-toolbar { backdrop-filter: none; background: var(--panel); }
.astral-path-node, .astral-branch-card { backdrop-filter: none; }

@media (max-width: 800px) {
  :root[data-theme='light'] .sidebar { box-shadow: 12px 0 36px rgb(75 39 81 / 14%); }
  :root[data-theme='dark'] .sidebar { box-shadow: 12px 0 36px rgb(0 0 0 / 32%); }
}
