:root {
  color-scheme: dark;
  --space: oklch(14% 0.042 265);
  --space-deep: oklch(8% 0.035 268);
  --surface: oklch(19% 0.048 263);
  --surface-raised: oklch(24% 0.058 260);
  --surface-soft: oklch(17% 0.038 264);
  --ink: oklch(97% 0.012 230);
  --muted: oklch(78% 0.04 245);
  --brand: oklch(75% 0.11 220);
  --brand-deep: oklch(48% 0.14 255);
  --theme: oklch(72% 0.16 265);
  --theme-2: oklch(78% 0.13 220);
  --success: oklch(79% 0.14 160);
  --error: oklch(70% 0.19 15);
  --warning: oklch(84% 0.15 80);
  --line: oklch(34% 0.055 250);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --z-canvas: 0;
  --z-content: 10;
  --z-sticky: 30;
  --z-modal: 80;
  --z-toast: 100;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
  font-kerning: normal;
}

:root[data-theme="worldtree"] {
  color-scheme: light;
  --space: oklch(96% 0.032 148); --space-deep: oklch(91% 0.055 155);
  --surface: oklch(99% 0.014 150); --surface-raised: oklch(92% 0.065 148); --surface-soft: oklch(95% 0.036 150);
  --ink: oklch(25% 0.072 155); --muted: oklch(43% 0.066 158); --line: oklch(78% 0.08 153);
  --theme: oklch(61% 0.19 151); --theme-2: oklch(79% 0.17 112); --brand: oklch(53% 0.16 157);
}
:root[data-theme="river"] {
  --space: oklch(16% 0.064 238); --space-deep: oklch(10% 0.055 247);
  --surface: oklch(21% 0.07 236); --surface-raised: oklch(28% 0.08 230); --surface-soft: oklch(18% 0.062 240);
  --ink: oklch(97% 0.02 210); --muted: oklch(81% 0.06 214); --line: oklch(38% 0.09 228);
  --theme: oklch(81% 0.13 205); --theme-2: oklch(67% 0.19 247);
}
:root[data-theme="crystal"] {
  color-scheme: light;
  --space: oklch(94% 0.018 73); --space-deep: oklch(87% 0.035 74);
  --surface: oklch(98% 0.01 76); --surface-raised: oklch(88% 0.038 75); --surface-soft: oklch(92% 0.024 75);
  --ink: oklch(23% 0.025 245); --muted: oklch(43% 0.034 245); --line: oklch(76% 0.04 73);
  --theme: oklch(71% 0.18 55); --theme-2: oklch(50% 0.08 230); --brand: oklch(60% 0.14 55);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--space-deep); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--space);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: inherit; }
img { max-width: 100%; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: var(--z-toast);
  padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--space);
}
.skip-link:focus { top: 12px; }

#particle-field {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-canvas);
  pointer-events: none; opacity: .72;
}
:root[data-theme="worldtree"] #particle-field { opacity: .58; }
:root[data-theme="crystal"] #particle-field { opacity: .48; }

.app-root { position: relative; z-index: var(--z-content); min-height: 100vh; }
.shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.brand-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 58px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 8px color-mix(in oklch, var(--brand) 45%, transparent)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 1rem; letter-spacing: .02em; }
.brand-copy span { color: var(--muted); font-size: .72rem; margin-top: 5px; }

.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--space-deep) 90%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--brand) 20%, transparent);
  backdrop-filter: blur(14px);
}
.topbar-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.user-tools { display: flex; align-items: center; gap: 12px; }
.user-chip { color: var(--muted); font-size: .9rem; }

.btn {
  min-height: 46px; border: 0; border-radius: 12px; padding: 11px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 650; text-decoration: none; transition: transform 150ms var(--ease-out), background 180ms, color 180ms, filter 180ms;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { background: var(--brand); color: var(--space-deep); box-shadow: 0 0 14px color-mix(in oklch, var(--brand) 38%, transparent); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-theme { background: var(--theme); color: var(--space-deep); box-shadow: 0 0 14px color-mix(in oklch, var(--theme) 35%, transparent); }
.btn-ghost { background: var(--surface-raised); color: var(--ink); }
.btn-danger { background: color-mix(in oklch, var(--error) 22%, var(--surface)); color: oklch(90% 0.06 12); }
.btn-small { min-height: 40px; padding: 8px 13px; font-size: .88rem; border-radius: 10px; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }

.auth-layout { min-height: 100vh; display: grid; align-items: center; padding: 32px 0; }
.auth-stage { display: grid; gap: 32px; }
.auth-story { position: relative; min-height: 330px; display: flex; flex-direction: column; justify-content: flex-end; padding: 26px 4px; }
.auth-story h1 { max-width: 10ch; margin: 24px 0 14px; font-size: clamp(2.75rem, 12vw, 5.75rem); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.auth-story p { max-width: 36ch; margin: 0; color: var(--muted); font-size: 1.08rem; }
.auth-orbit { position: absolute; width: min(72vw, 520px); aspect-ratio: 1; right: -24%; top: -23%; border: 1px solid color-mix(in oklch, var(--brand) 32%, transparent); border-radius: 50%; transform: rotate(-18deg); animation: orbit-drift 18s linear infinite; }
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; border-radius: 50%; background: var(--brand); box-shadow: 0 0 18px var(--brand); }
.auth-orbit::before { width: 12px; height: 12px; top: 18%; left: 6%; }
.auth-orbit::after { width: 6px; height: 6px; right: 14%; bottom: 12%; }

.auth-panel { background: var(--surface); border-radius: 16px; padding: 26px; box-shadow: 0 8px 8px color-mix(in oklch, black 28%, transparent); }
.auth-panel h2 { margin: 0 0 6px; font-size: 1.5rem; }
.auth-panel > p { margin: 0 0 22px; color: var(--muted); }
.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 650; color: var(--ink); }
.field small { color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; color: var(--ink); background: var(--surface-soft);
  transition: border-color 180ms, background 180ms, box-shadow 180ms;
}
.textarea { min-height: 150px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 18%, transparent); }
.field-error { min-height: 1.4em; margin: 0; color: oklch(82% 0.10 15); font-size: .88rem; }

.student-main { padding-bottom: 72px; }
.day-hero { position: relative; min-height: 430px; display: grid; align-items: end; padding: 70px 0 46px; overflow: clip; }
.day-hero-content { position: relative; z-index: 3; max-width: 650px; }
.day-kicker { display: flex; align-items: center; gap: 10px; color: var(--theme); font-weight: 700; }
.day-kicker::before { content: ""; width: 34px; height: 2px; background: var(--theme); box-shadow: 0 0 8px var(--theme); }
.day-hero h1 { margin: 12px 0 14px; font-size: clamp(3rem, 13vw, 5.5rem); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.day-hero p { max-width: 48ch; margin: 0; color: var(--muted); font-size: 1.08rem; }
.progress-line { margin-top: 24px; display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: .92rem; }
.progress-track { width: min(260px, 55vw); height: 5px; background: var(--surface-raised); border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 100%; background: var(--theme); box-shadow: 0 0 10px var(--theme); transform: scaleX(var(--progress-scale, 0)); transform-origin: left; transition: transform 500ms var(--ease-expo); }

.world-art { position: absolute; z-index: 1; right: -5%; top: 25px; width: min(58vw, 600px); aspect-ratio: 1; opacity: .9; pointer-events: none; }
.world-art::before, .world-art::after { content: ""; position: absolute; inset: 12%; }
.theme-galaxy .world-art { border: 1px solid color-mix(in oklch, var(--theme) 35%, transparent); border-radius: 50%; animation: orbit-drift 24s linear infinite; }
.theme-galaxy .world-art::before { border: 2px solid color-mix(in oklch, var(--theme-2) 36%, transparent); border-radius: 50%; transform: rotate(58deg) scaleY(.36); box-shadow: 0 0 28px color-mix(in oklch, var(--theme) 24%, transparent); }
.theme-galaxy .world-art::after { inset: 42%; border-radius: 50%; background: var(--theme); box-shadow: 0 0 50px 18px color-mix(in oklch, var(--theme) 36%, transparent); }
.theme-worldtree .world-art::before { inset: 4% 45%; border-radius: 45% 55% 20% 20%; background: linear-gradient(var(--theme-2), var(--theme)); filter: drop-shadow(0 0 18px var(--theme)); transform: rotate(10deg); }
.theme-worldtree .world-art::after { inset: 10%; background: radial-gradient(ellipse at 40% 30%, var(--theme) 0 5%, transparent 6%), radial-gradient(ellipse at 70% 18%, var(--theme-2) 0 4%, transparent 5%), radial-gradient(ellipse at 25% 58%, var(--theme-2) 0 6%, transparent 7%), radial-gradient(ellipse at 72% 66%, var(--theme) 0 5%, transparent 6%); filter: drop-shadow(0 0 12px var(--theme)); animation: tree-breathe 4s var(--ease-out) infinite alternate; }
.theme-river .world-art::before { inset: 30% 0; border-radius: 44% 54% 42% 62%; background: linear-gradient(100deg, transparent, var(--theme-2), var(--theme), transparent); filter: blur(3px) drop-shadow(0 0 20px var(--theme)); transform: rotate(-14deg); animation: river-flow 7s ease-in-out infinite alternate; }
.theme-river .world-art::after { inset: 42% 6%; border-top: 2px solid var(--ink); border-radius: 50%; opacity: .45; transform: rotate(-8deg); }
.theme-crystal .world-art::before { inset: 14%; clip-path: polygon(50% 0, 86% 24%, 100% 68%, 58% 100%, 16% 82%, 0 36%); background: linear-gradient(145deg, var(--theme), color-mix(in oklch, var(--theme-2) 60%, transparent) 46%, transparent 47%); filter: drop-shadow(0 0 24px var(--theme)); animation: crystal-pulse 3.2s var(--ease-out) infinite alternate; }
.theme-crystal .world-art::after { inset: 35%; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--theme-2); box-shadow: 0 0 32px var(--theme-2); }

.day-switcher { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 14px; scrollbar-width: none; }
.day-switcher::-webkit-scrollbar { display: none; }
.day-tab { min-width: max-content; min-height: 44px; border: 0; border-radius: 999px; padding: 9px 16px; color: var(--muted); background: var(--surface-soft); font-weight: 650; }
.day-tab[aria-selected="true"] { color: var(--space-deep); background: var(--theme); box-shadow: 0 0 12px color-mix(in oklch, var(--theme) 34%, transparent); }

.timeline-section { position: relative; padding: 46px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: 1.75rem; }
.section-heading p { margin: 0; color: var(--muted); }
.timeline { position: relative; display: grid; gap: 18px; padding-left: 44px; }
.timeline-rail { position: absolute; left: 15px; top: 8px; bottom: 8px; width: 14px; }
.timeline-rail::before { content: ""; position: absolute; left: 5px; inset-block: 0; width: 4px; border-radius: 999px; background: linear-gradient(var(--theme), var(--theme-2), color-mix(in oklch, var(--theme) 15%, transparent)); box-shadow: 0 0 16px color-mix(in oklch, var(--theme) 64%, transparent); }
.theme-worldtree .timeline-rail::before { width: 6px; border-radius: 42% 58% 40% 60%; transform: rotate(1deg); }
.theme-river .timeline-rail::before { width: 8px; left: 3px; filter: blur(.4px); animation: river-shimmer 2.4s ease-in-out infinite alternate; }
.theme-crystal .timeline-rail::before { width: 5px; background: linear-gradient(var(--theme), var(--theme-2), var(--theme)); clip-path: polygon(50% 0, 100% 8%, 58% 18%, 95% 29%, 48% 39%, 100% 50%, 42% 63%, 88% 74%, 45% 86%, 70% 100%, 30% 100%, 52% 86%, 12% 74%, 58% 63%, 0 50%, 52% 39%, 5% 29%, 42% 18%, 0 8%); }

.timeline-node { position: relative; background: color-mix(in oklch, var(--surface) 94%, var(--theme) 6%); border-radius: 14px; padding: 20px; transition: transform 180ms var(--ease-out), background 180ms; }
.timeline-node:hover { transform: translateX(4px); background: color-mix(in oklch, var(--surface-raised) 91%, var(--theme) 9%); }
.timeline-node::before { content: ""; position: absolute; width: 14px; height: 14px; left: -36px; top: 28px; border-radius: 50%; background: var(--space-deep); border: 3px solid var(--theme); box-shadow: 0 0 13px var(--theme); }
.timeline-node.completed::before { background: var(--theme); }
.node-grid { display: grid; gap: 16px; }
.node-time { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--theme); }
.node-copy h3 { margin: 2px 0 6px; font-size: 1.15rem; }
.node-copy p { margin: 0; color: var(--muted); max-width: 62ch; }
.node-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border-radius: 999px; background: var(--surface-raised); color: var(--muted); font-size: .8rem; }
.status-pill.done { color: var(--success); background: color-mix(in oklch, var(--success) 12%, var(--surface)); }
.node-actions { align-self: center; }

.record-dialog { width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 8px 8px color-mix(in oklch, black 40%, transparent); overflow: auto; }
.record-dialog::backdrop { background: color-mix(in oklch, var(--space-deep) 80%, transparent); backdrop-filter: blur(8px); }
.dialog-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; padding: 22px 22px 14px; }
.dialog-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.dialog-head p { margin: 0; color: var(--muted); }
.icon-close { width: 44px; height: 44px; border: 0; border-radius: 12px; color: var(--ink); background: var(--surface-raised); font-size: 1.3rem; }
.prompt-panel { margin: 0 22px; padding: 16px; border-radius: 12px; background: var(--surface-soft); color: var(--muted); }
.prompt-panel strong { display: block; color: var(--theme); margin-bottom: 4px; }
.recorder-stage { min-height: 220px; display: grid; place-items: center; text-align: center; padding: 28px 22px 18px; }
.record-orb { width: 104px; height: 104px; border: 0; border-radius: 50%; background: var(--theme); color: var(--space-deep); display: grid; place-items: center; box-shadow: 0 0 28px color-mix(in oklch, var(--theme) 52%, transparent); transition: transform 150ms var(--ease-out), filter 180ms; }
.record-orb:hover { transform: scale(1.04); filter: brightness(1.08); }
.record-orb.recording { animation: record-pulse 1.5s ease-in-out infinite; }
.record-orb .icon { width: 34px; height: 34px; }
.record-time { margin-top: 14px; font-size: 2rem; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.record-status { min-height: 1.6em; margin: 4px 0 0; color: var(--muted); }
.record-controls, .preview-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.record-controls[hidden], .preview-area[hidden] { display: none !important; }
.preview-area { width: 100%; display: none; gap: 14px; }
.preview-area.visible { display: grid; }
.preview-area audio { width: 100%; }
.upload-progress { display: none; height: 6px; border-radius: 999px; background: var(--surface-raised); overflow: hidden; }
.upload-progress.visible { display: block; }
.upload-progress span { display: block; width: 100%; height: 100%; background: var(--theme); transform: scaleX(var(--upload-scale, 0)); transform-origin: left; transition: transform 120ms linear; }
.dialog-foot { padding: 14px 22px 22px; color: var(--muted); font-size: .85rem; text-align: center; }

.admin-main { padding: 34px 0 80px; }
.admin-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.admin-title h1 { margin: 0; font-size: 2rem; }
.admin-title p { margin: 4px 0 0; color: var(--muted); }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 26px; overflow-x: auto; }
.admin-tab { min-width: max-content; min-height: 44px; padding: 9px 15px; border: 0; border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-weight: 650; }
.admin-tab[aria-selected="true"] { background: var(--brand); color: var(--space-deep); }
.stats-strip { display: flex; flex-wrap: wrap; gap: 24px; padding: 20px 0 28px; border-bottom: 1px solid var(--line); }
.stat { min-width: 150px; }
.stat strong { display: block; font-size: 1.8rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); }
.panel { background: var(--surface); border-radius: 14px; padding: 20px; margin-top: 22px; }
.panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-header h2 { margin: 0; font-size: 1.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters .select { width: auto; min-width: 150px; }
.table-wrap { overflow: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .9rem; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 650; background: var(--surface-soft); position: sticky; top: 0; }
td { font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.matrix-cell { text-align: center; }
.matrix-dot { display: inline-grid; place-items: center; min-width: 32px; height: 32px; border-radius: 999px; background: var(--surface-raised); color: var(--muted); }
.matrix-dot.complete { background: color-mix(in oklch, var(--success) 16%, var(--surface)); color: var(--success); }
.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 1.08rem; margin-bottom: 4px; }
.account-grid { display: grid; gap: 22px; }
.account-list { display: grid; gap: 10px; }
.account-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-main strong { display: block; }
.account-main span { color: var(--muted); font-size: .88rem; }

.toast-region { position: fixed; z-index: var(--z-toast); right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: grid; gap: 10px; pointer-events: none; }
.toast { max-width: min(390px, calc(100vw - 32px)); padding: 13px 16px; border-radius: 12px; background: var(--ink); color: var(--space); box-shadow: 0 6px 8px color-mix(in oklch, black 30%, transparent); animation: toast-in 280ms var(--ease-expo); }
.toast.error { background: oklch(45% 0.16 16); color: white; }

.skeleton { border-radius: 10px; min-height: 84px; background: linear-gradient(100deg, var(--surface-soft) 20%, var(--surface-raised) 40%, var(--surface-soft) 60%); background-size: 200% 100%; animation: skeleton 1.5s linear infinite; }

@keyframes orbit-drift { to { transform: rotate(342deg); } }
@keyframes tree-breathe { to { transform: scale(1.08); filter: drop-shadow(0 0 22px var(--theme)); } }
@keyframes river-flow { to { transform: translateY(16px) rotate(-9deg) scaleX(1.06); } }
@keyframes river-shimmer { to { filter: brightness(1.45) blur(1px); } }
@keyframes crystal-pulse { to { transform: rotate(5deg) scale(1.04); filter: drop-shadow(0 0 34px var(--theme)); } }
@keyframes record-pulse { 50% { transform: scale(1.07); box-shadow: 0 0 48px color-mix(in oklch, var(--theme) 70%, transparent); } }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } }
@keyframes skeleton { to { background-position: -200% 0; } }

@media (min-width: 720px) {
  .auth-stage { grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); align-items: center; }
  .auth-story { min-height: 620px; padding-bottom: 70px; }
  .timeline { padding-left: 0; gap: 24px; }
  .timeline-rail { left: 50%; transform: translateX(-50%); }
  .timeline-node { width: calc(50% - 38px); }
  .timeline-node:nth-child(odd) { margin-left: auto; }
  .timeline-node:nth-child(even) { margin-right: auto; text-align: right; }
  .timeline-node:nth-child(odd)::before { left: -46px; }
  .timeline-node:nth-child(even)::before { left: auto; right: -46px; }
  .node-grid { grid-template-columns: 78px 1fr; align-items: start; }
  .timeline-node:nth-child(even) .node-grid { grid-template-columns: 1fr 78px; }
  .timeline-node:nth-child(even) .node-time { grid-column: 2; grid-row: 1; }
  .timeline-node:nth-child(even) .node-copy { grid-column: 1; grid-row: 1; }
  .timeline-node:nth-child(even) .node-meta { justify-content: flex-end; }
  .node-actions { position: absolute; top: 50%; transform: translateY(-50%); }
  .timeline-node:nth-child(odd) .node-actions { right: 18px; }
  .timeline-node:nth-child(even) .node-actions { left: 18px; }
  .node-copy { padding-right: 112px; }
  .timeline-node:nth-child(even) .node-copy { padding-right: 0; padding-left: 112px; }
  .account-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

@media (min-width: 1040px) {
  .shell { width: min(1220px, calc(100% - 64px)); }
  .day-hero { min-height: 500px; }
  .admin-main { padding-top: 52px; }
}

@media (max-width: 719px) {
  .brand-copy span, .user-chip { display: none; }
  .day-hero { min-height: 390px; padding-top: 44px; }
  .world-art { width: 86vw; right: -38%; opacity: .62; }
  .section-heading { align-items: start; flex-direction: column; }
  .node-actions { margin-top: 16px; }
  .node-actions .btn { width: 100%; }
  .panel { padding: 16px; }
  .admin-title h1 { font-size: 1.65rem; }
  .filters { width: 100%; }
  .filters .select, .filters .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #particle-field { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Student journey v2 — one exact grid, four independent worlds */
:root[data-theme="worldtree"] .topbar,
:root[data-theme="crystal"] .topbar { background: color-mix(in oklch, var(--space) 88%, transparent); }

.student-main { min-height: 100vh; padding-bottom: 96px; background: linear-gradient(180deg, color-mix(in oklch, var(--space-deep) 42%, transparent), transparent 58%); }
.day-hero { min-height: 470px; padding: 72px 0 62px; display: grid; align-items: center; border-bottom: 1px solid color-mix(in oklch, var(--line) 62%, transparent); isolation: isolate; }
.day-hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr); gap: 48px; align-items: end; }
.day-hero-content { max-width: 700px; }
.day-kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--theme); font-size: .88rem; font-weight: 750; letter-spacing: .08em; }
.day-kicker::before { width: 42px; height: 1px; box-shadow: none; }
.day-hero h1 { max-width: 9ch; margin: 18px 0 20px; font-size: clamp(3.25rem, 7.8vw, 5.75rem); line-height: .94; letter-spacing: -.035em; }
.day-hero p { max-width: 40ch; margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.75; text-wrap: pretty; }

.day-progress { justify-self: end; width: min(300px, 100%); display: grid; grid-template-columns: 94px 1fr; gap: 20px; align-items: center; padding-bottom: 8px; }
.progress-orbit { width: 94px; aspect-ratio: 1; display: grid; place-content: center; grid-template-columns: auto auto; align-items: baseline; border: 1px solid color-mix(in oklch, var(--theme) 58%, transparent); border-radius: 50%; color: var(--theme); }
.progress-orbit strong { font-size: 2rem; line-height: 1; }
.progress-orbit span { margin-left: 4px; font-size: .82rem; color: var(--muted); }
.day-progress b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.day-progress > div:last-child > span { display: block; margin: 2px 0 12px; color: var(--muted); font-size: .82rem; }
.progress-track { width: 100%; height: 3px; background: color-mix(in oklch, var(--line) 72%, transparent); }

.world-art { inset: 0; top: 0; right: 0; width: 100%; aspect-ratio: auto; opacity: 1; overflow: hidden; }
.world-art::before, .world-art::after { display: none; }
.world-art span { position: absolute; display: block; }
.theme-galaxy .world-art { border: 0; border-radius: 0; animation: none; background: radial-gradient(circle at 78% 28%, rgba(66, 126, 255, .15), transparent 27%), linear-gradient(120deg, transparent 44%, rgba(93, 55, 209, .06)); }
.theme-galaxy .world-symbol { width: min(38vw, 460px); aspect-ratio: 1; right: 4%; top: 3%; border-radius: 50%; background: radial-gradient(circle at 38% 32%, rgba(173, 222, 255, .85), rgba(62, 114, 255, .34) 12%, rgba(22, 38, 100, .15) 42%, transparent 68%); filter: drop-shadow(0 0 46px rgba(91, 156, 255, .24)); }
.theme-galaxy .world-ring { width: min(50vw, 620px); height: min(17vw, 210px); right: -2%; top: 23%; border: 1px solid rgba(140, 205, 255, .4); border-radius: 50%; transform: rotate(-18deg); }
.theme-galaxy .world-ring-two { width: min(43vw, 520px); height: min(10vw, 122px); right: 3%; top: 26%; border-color: rgba(152, 111, 255, .35); transform: rotate(24deg); }

.theme-worldtree .day-hero { background: radial-gradient(circle at 78% 12%, rgba(236, 255, 162, .78), transparent 33%), linear-gradient(120deg, rgba(255,255,255,.62), rgba(190, 239, 205, .34)); }
.theme-worldtree .world-art { background: linear-gradient(104deg, transparent 35%, rgba(117, 205, 121, .08)); }
.theme-worldtree .world-symbol { width: min(48vw, 580px); aspect-ratio: 1; right: -4%; bottom: -42%; border-radius: 47% 53% 44% 56%; background: radial-gradient(circle at 50% 48%, rgba(255,255,255,.86) 0 4%, transparent 5%), radial-gradient(circle at 34% 29%, rgba(174, 230, 75, .48) 0 9%, transparent 10%), radial-gradient(circle at 61% 20%, rgba(48, 184, 122, .35) 0 12%, transparent 13%), radial-gradient(circle at 72% 45%, rgba(110, 213, 106, .38) 0 14%, transparent 15%), radial-gradient(circle at 42% 58%, rgba(54, 174, 122, .25) 0 18%, transparent 19%); }
.theme-worldtree .world-ring { width: min(34vw, 420px); aspect-ratio: 1; right: 5%; top: 8%; border: 1px solid rgba(33, 140, 92, .22); border-radius: 50%; }
.theme-worldtree .world-ring-two { width: min(24vw, 300px); right: 10%; top: 17%; border-color: rgba(132, 184, 57, .26); }

.theme-river .day-hero { background: radial-gradient(ellipse at 82% 8%, rgba(72, 218, 242, .22), transparent 32%), linear-gradient(148deg, rgba(15, 56, 100, .18), transparent 58%); }
.theme-river .world-symbol { width: min(55vw, 700px); height: 38%; right: -5%; top: 30%; border-radius: 55% 45% 62% 38%; background: linear-gradient(100deg, transparent, rgba(65, 230, 239, .13), rgba(67, 126, 255, .24), transparent); filter: blur(2px) drop-shadow(0 0 24px rgba(67, 211, 255, .2)); transform: rotate(-9deg); }
.theme-river .world-ring { width: min(42vw, 520px); height: 2px; right: 2%; top: 40%; background: linear-gradient(90deg, transparent, rgba(202, 247, 255, .62), transparent); transform: rotate(-7deg); }
.theme-river .world-ring-two { top: 52%; right: -6%; opacity: .55; }

.theme-crystal .day-hero { background: linear-gradient(115deg, rgba(255,255,255,.8), transparent 52%), radial-gradient(circle at 80% 16%, rgba(255, 171, 69, .26), transparent 28%); }
.theme-crystal .world-symbol { width: min(34vw, 410px); aspect-ratio: 1; right: 8%; top: 6%; clip-path: polygon(50% 0, 92% 25%, 92% 74%, 50% 100%, 8% 74%, 8% 25%); background: linear-gradient(145deg, rgba(255, 181, 87, .28), rgba(49, 78, 99, .08)); box-shadow: inset 0 0 0 1px rgba(87, 97, 102, .2); }
.theme-crystal .world-ring { width: min(46vw, 560px); aspect-ratio: 1; right: 0; top: -6%; border: 1px solid rgba(255, 139, 31, .22); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.theme-crystal .world-ring-two { width: min(26vw, 320px); right: 12%; top: 12%; border-color: rgba(44, 70, 88, .22); }

.journey-shell { position: relative; }
.day-switcher { gap: 0; padding: 0; border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent); }
.day-tab { min-height: 64px; border-radius: 0; padding: 12px 20px; background: transparent; color: var(--muted); box-shadow: none; }
.day-tab span { margin-right: 9px; color: color-mix(in oklch, var(--muted) 72%, transparent); font-variant-numeric: tabular-nums; }
.day-tab[aria-selected="true"] { color: var(--ink); background: transparent; box-shadow: inset 0 -3px 0 var(--theme); }
.day-tab[aria-selected="true"] span { color: var(--theme); }

.timeline-section { padding: 58px 0 80px; }
.section-heading { align-items: end; margin-bottom: 18px; }
.section-heading h2 { font-size: 1.85rem; letter-spacing: -.025em; }
.section-heading p { margin-top: 5px; }
.timeline-note { max-width: 30ch; color: var(--muted); font-size: .84rem; text-align: right; }
.timeline { --time-col: 88px; --track-col: 32px; --track-gap: 20px; display: block; padding: 0; }
.timeline-event { min-height: 152px; display: grid; grid-template-columns: var(--time-col) var(--track-col) minmax(0, 1fr) 132px; column-gap: var(--track-gap); align-items: start; padding: 28px 0; border-bottom: 1px solid color-mix(in oklch, var(--line) 55%, transparent); transition: background 180ms var(--ease-out); }
.timeline-event:hover { background: color-mix(in oklch, var(--theme) 5%, transparent); }
.node-time { padding-top: 1px; color: var(--theme); font-size: 1.16rem; font-weight: 780; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.track-cell { position: relative; align-self: stretch; min-height: 96px; display: flex; justify-content: center; }
.track-line { position: absolute; z-index: 0; top: -28px; bottom: -28px; left: calc(50% - 1px); width: 3px; background: linear-gradient(var(--theme), color-mix(in oklch, var(--theme-2) 76%, var(--theme))); transform-origin: top; }
.is-first .track-line { top: 10px; }
.is-last .track-line { bottom: calc(100% - 12px); }
.track-dot { position: relative; z-index: 1; width: 22px; height: 22px; margin-top: 0; display: grid; place-items: center; border: 2px solid var(--theme); border-radius: 50%; background: var(--space); box-shadow: 0 0 0 5px color-mix(in oklch, var(--space) 88%, transparent); }
.track-dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--theme); }
.completed .track-dot { background: var(--theme); }
.completed .track-dot i { background: var(--space); }
.node-copy { min-width: 0; padding-right: 22px; }
.node-copy h3 { margin: -2px 0 8px; color: var(--ink); font-size: 1.2rem; line-height: 1.35; letter-spacing: -.012em; text-wrap: balance; }
.node-copy p { max-width: 64ch; margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.7; overflow-wrap: anywhere; text-wrap: pretty; }
.node-meta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; color: var(--muted); font-size: .79rem; }
.node-state, .node-duration, .node-date { white-space: nowrap; }
.node-state::before, .node-duration::before, .node-date::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: currentColor; vertical-align: 1px; opacity: .68; }
.node-meta .status-pill { min-height: 28px; background: color-mix(in oklch, var(--success) 13%, transparent); color: color-mix(in oklch, var(--success) 82%, var(--ink)); }
.node-actions { position: static; align-self: start; padding-top: 0; }
.node-actions .btn { width: 100%; min-height: 46px; }
.theme-worldtree .btn-theme, .theme-crystal .btn-theme { color: var(--ink); }

@media (max-width: 860px) {
  .day-hero-layout { grid-template-columns: 1fr; gap: 36px; }
  .day-progress { justify-self: start; }
  .timeline-event { grid-template-columns: 70px 28px minmax(0, 1fr); }
  .node-actions { grid-column: 3; margin-top: 18px; }
  .node-copy { padding-right: 0; }
}

@media (max-width: 719px) {
  .day-hero { min-height: 440px; padding: 50px 0 42px; }
  .day-hero h1 { max-width: 8ch; font-size: clamp(2.8rem, 15vw, 4.4rem); }
  .day-hero p { max-width: 30ch; font-size: 1rem; }
  .day-progress { width: 100%; grid-template-columns: 76px 1fr; gap: 16px; }
  .progress-orbit { width: 76px; }
  .progress-orbit strong { font-size: 1.6rem; }
  .world-art { width: 100%; right: 0; opacity: 1; }
  .theme-galaxy .world-symbol { width: 84vw; right: -34%; top: 5%; opacity: .7; }
  .theme-worldtree .world-symbol { width: 104vw; right: -52%; bottom: -25%; }
  .theme-river .world-symbol { width: 108vw; right: -52%; opacity: .7; }
  .theme-crystal .world-symbol { width: 78vw; right: -24%; opacity: .52; }
  .day-tab { min-height: 58px; padding-inline: 15px; }
  .timeline-section { padding-top: 42px; }
  .timeline-note { text-align: left; }
  .timeline { --time-col: 48px; --track-col: 22px; --track-gap: 10px; }
  .timeline-event { min-height: 168px; grid-template-columns: var(--time-col) var(--track-col) minmax(0, 1fr); column-gap: var(--track-gap); padding: 24px 0; }
  .node-time { padding-top: 2px; font-size: .88rem; }
  .track-cell { min-height: 116px; }
  .track-dot { width: 18px; height: 18px; box-shadow: 0 0 0 4px color-mix(in oklch, var(--space) 90%, transparent); }
  .track-dot i { width: 5px; height: 5px; }
  .track-line { top: -24px; bottom: -24px; }
  .is-first .track-line { top: 8px; }
  .is-last .track-line { bottom: calc(100% - 10px); }
  .node-copy h3 { margin-top: -1px; font-size: 1.08rem; }
  .node-copy p { font-size: .9rem; line-height: 1.65; }
  .node-actions { grid-column: 3; margin-top: 16px; }
  .node-actions .btn { width: 100%; }
}

/* Login observatory — a focused sci-fi gateway with a visible four-day route */
.auth-layout.auth-login {
  position: relative;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 17% 28%, rgba(48, 142, 255, .38), transparent 34%),
    radial-gradient(circle at 78% 76%, rgba(53, 221, 235, .19), transparent 31%),
    linear-gradient(135deg, rgba(11, 23, 50, .8) 0%, rgba(16, 43, 82, .73) 52%, rgba(8, 22, 47, .82) 100%);
}
.auth-layout.auth-login::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(64vw, 860px);
  aspect-ratio: 1;
  left: -18%;
  top: -42%;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 221, 255, .2), rgba(64, 129, 255, .09) 38%, transparent 69%);
  filter: blur(12px);
}
.auth-layout.auth-login::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .25;
  background-image:
    linear-gradient(rgba(113, 164, 255, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 164, 255, .1) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(110deg, black, transparent 72%);
}
.auth-login .auth-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .72fr);
  align-items: center;
  gap: clamp(40px, 6vw, 84px);
  padding-block: 32px;
}
.auth-login .auth-story {
  min-height: min(780px, calc(100svh - 64px));
  padding: 8px 0;
  justify-content: space-between;
  gap: 54px;
}
.auth-brandline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(111, 205, 255, .28);
  border-radius: 999px;
  color: #a8dfff;
  background: rgba(8, 21, 45, .78);
  font-size: .76rem;
  line-height: 1;
  white-space: nowrap;
}
.auth-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64d7ff;
  box-shadow: 0 0 12px #64d7ff;
}
.auth-story-main { position: relative; z-index: 1; }
.auth-context {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 20px !important;
  color: #79dafa !important;
  font-size: .82rem !important;
  font-weight: 700;
  letter-spacing: .055em;
}
.auth-context::before {
  content: "";
  width: 28px;
  height: 1px;
  margin-right: 10px;
  background: currentColor;
}
.auth-login .auth-story h1 {
  max-width: 10ch;
  margin: 0 0 24px;
  color: #f4f8ff;
  font-size: clamp(3.4rem, 6.7vw, 6rem);
  line-height: .94;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.auth-login .auth-story h1 span {
  color: #68d7fa;
  text-shadow: 0 0 32px rgba(62, 198, 255, .22);
}
.auth-login .auth-lead {
  max-width: 40ch;
  color: #c1cee4;
  font-size: 1.02rem;
  line-height: 1.8;
  text-wrap: pretty;
}
.auth-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-route::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  right: 7px;
  height: 2px;
  background: linear-gradient(90deg, #5685ff, #72dfd0 38%, #62c8ff 68%, #d6b779);
  opacity: .82;
}
.auth-route li { position: relative; min-width: 0; padding-top: 28px; }
.auth-route li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border: 2px solid #0b1227;
  border-radius: 50%;
  background: #71d8ff;
  box-shadow: 0 0 0 1px rgba(113, 216, 255, .55), 0 0 16px rgba(113, 216, 255, .5);
}
.auth-route strong,
.auth-route span { display: block; }
.auth-route strong { color: #eaf2ff; font-size: .8rem; font-weight: 680; }
.auth-route span { margin-top: 3px; color: #71809f; font-size: .72rem; }
.auth-login .auth-panel {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid rgba(137, 180, 255, .2);
  border-radius: 16px;
  background: rgba(18, 38, 73, .96);
  box-shadow: 0 8px 8px rgba(0, 0, 0, .2);
}
.auth-panel-label {
  margin-bottom: 14px;
  color: #6ed9ff;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .08em;
}
.auth-login .auth-panel h2 {
  margin: 0 0 8px;
  color: #f5f8ff;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.auth-login .auth-panel > p {
  margin: 0 0 26px;
  color: #bdc9df;
  font-size: .92rem;
  line-height: 1.65;
}
.auth-login .field label { color: #e6efff; }
.auth-login .field small { color: #8391ad; font-size: .77rem; }
.auth-login .input {
  min-height: 52px;
  border-color: rgba(132, 173, 238, .25);
  color: #f5f8ff;
  background: #0b1c39;
}
.auth-login .input::placeholder { color: #8290aa; opacity: 1; }
.auth-login .input:focus {
  border-color: #65ccf5;
  background: #0d1932;
  box-shadow: 0 0 0 3px rgba(72, 191, 239, .16);
}
.auth-submit { width: 100%; margin-top: 2px; }
.auth-security {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid rgba(134, 169, 225, .16);
  color: #7e8da8;
  font-size: .76rem;
}
.auth-security span {
  width: 7px;
  height: 7px;
  border: 1px solid #67d9b6;
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(103, 217, 182, .55);
}
.auth-signal {
  position: absolute;
  z-index: -1;
  width: min(58vw, 780px);
  aspect-ratio: 1;
  left: 30%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  pointer-events: none;
  opacity: .78;
}
.auth-signal span {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(86, 154, 255, .17);
  border-radius: 50%;
  animation: auth-signal-spin 26s linear infinite;
}
.auth-signal span:nth-child(2) {
  inset: 24%;
  border-color: rgba(84, 222, 234, .18);
  animation-direction: reverse;
  animation-duration: 18s;
}
.auth-signal span:nth-child(3) {
  inset: 38%;
  border-style: dashed;
  animation-duration: 13s;
}
.auth-signal span::before {
  content: "";
  position: absolute;
  top: 16%;
  left: 7%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #70d9ff;
  box-shadow: 0 0 18px #70d9ff;
}
@keyframes auth-signal-spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .auth-login .auth-stage { grid-template-columns: minmax(0, 1fr) minmax(330px, .82fr); gap: 32px; }
  .auth-login .auth-story h1 { font-size: clamp(3.15rem, 7.6vw, 5rem); }
  .auth-login .auth-story { gap: 42px; }
  .auth-route span { display: none; }
}

@media (max-width: 719px) {
  .auth-layout.auth-login { overflow: hidden; }
  .auth-login .auth-stage { min-height: 100svh; grid-template-columns: 1fr; gap: 28px; padding-block: 22px 34px; }
  .auth-login .auth-story { min-height: auto; gap: 34px; padding: 0; }
  .auth-brandline .auth-badge { display: none; }
  .auth-login .auth-story h1 { max-width: 9ch; margin-bottom: 18px; font-size: clamp(3rem, 15.4vw, 4.4rem); }
  .auth-login .auth-lead { font-size: .94rem; line-height: 1.7; }
  .auth-context { margin-bottom: 16px !important; font-size: .72rem !important; }
  .auth-route { gap: 7px; }
  .auth-route strong { font-size: .69rem; }
  .auth-login .auth-panel { padding: 24px 20px; }
  .auth-signal { width: 110vw; left: 45%; top: 27%; opacity: .34; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-signal span { animation: none; }
}

/* Energy pass — brighter entry particles and state-guiding timeline motion */
#particle-field.is-boosted {
  filter: saturate(1.35) brightness(1.32);
}

.timeline-event {
  position: relative;
  grid-template-columns: var(--time-col) var(--track-col) minmax(0, 1fr) 220px;
  isolation: isolate;
}
.timeline-event::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px 0;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 76% 50%, color-mix(in oklch, var(--theme) 12%, transparent), transparent 62%);
  transition: opacity 220ms var(--ease-out);
}
.timeline-event:hover::after,
.timeline-event:focus-within::after { opacity: 1; }
.node-time {
  text-shadow: 0 0 16px color-mix(in oklch, var(--theme) 34%, transparent);
  transition: color 180ms var(--ease-out), text-shadow 180ms var(--ease-out);
}
.timeline-event:hover .node-time,
.timeline-event:focus-within .node-time { text-shadow: 0 0 24px color-mix(in oklch, var(--theme) 62%, transparent); }
.track-line {
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 0 12px color-mix(in oklch, var(--theme) 28%, transparent);
}
.track-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, color-mix(in oklch, white 78%, var(--theme)) 46%, transparent 100%);
  transform: translateY(-100%);
  animation: track-energy-flow 2.4s linear infinite;
}
.track-dot {
  isolation: isolate;
  transition: transform 180ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.track-dot::before,
.track-dot::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2px;
  border: 1px solid color-mix(in oklch, var(--theme) 78%, transparent);
  border-radius: 50%;
  opacity: 0;
  animation: node-signal-ripple 2.8s var(--ease-out) infinite;
}
.track-dot::after { animation-delay: 1.4s; }
.timeline-event:hover .track-dot,
.timeline-event:focus-within .track-dot {
  transform: scale(1.12);
  box-shadow: 0 0 0 5px color-mix(in oklch, var(--space) 88%, transparent), 0 0 24px color-mix(in oklch, var(--theme) 64%, transparent);
}
.completed .track-dot {
  box-shadow: 0 0 0 5px color-mix(in oklch, var(--space) 88%, transparent), 0 0 19px color-mix(in oklch, var(--theme) 48%, transparent);
}
.completed .track-dot i { animation: completed-core-pulse 1.8s var(--ease-out) infinite; }

.node-actions {
  display: grid;
  gap: 10px;
}
.node-action-buttons {
  display: grid;
  gap: 8px;
}
.btn-file {
  border: 1px solid color-mix(in oklch, var(--theme) 48%, var(--line));
  color: var(--ink);
  background: color-mix(in oklch, var(--theme) 8%, var(--surface-soft));
}
.btn-file:hover {
  border-color: color-mix(in oklch, var(--theme) 76%, var(--line));
  background: color-mix(in oklch, var(--theme) 14%, var(--surface-soft));
}
.file-upload-stage {
  display: grid;
  gap: 16px;
  padding: 12px 22px 20px;
}
.file-upload-summary {
  min-width: 0;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: left;
}
.file-upload-summary > .icon {
  width: 28px;
  height: 28px;
  color: var(--theme);
}
.file-upload-summary div { min-width: 0; }
.file-upload-summary strong,
.file-upload-summary span { display: block; overflow-wrap: anywhere; }
.file-upload-summary strong { color: var(--ink); }
.file-upload-summary span { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.file-upload-stage audio { width: 100%; accent-color: var(--theme); }
.file-upload-stage .record-status { margin: 0; text-align: center; }
.file-upload-stage .preview-actions { margin-top: 0; }
.node-replay {
  width: 100%;
  border: 1px solid color-mix(in oklch, var(--theme) 34%, var(--line));
  border-radius: 12px;
  background: color-mix(in oklch, var(--theme) 7%, var(--surface-soft));
  overflow: hidden;
  transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.node-replay[open] {
  border-color: color-mix(in oklch, var(--theme) 68%, var(--line));
  background: color-mix(in oklch, var(--theme) 11%, var(--surface-soft));
}
.node-replay summary {
  min-height: 44px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 680;
  cursor: pointer;
  list-style: none;
}
.node-replay summary::-webkit-details-marker { display: none; }
.node-replay summary .icon { width: 17px; height: 17px; color: var(--theme); transition: transform 180ms var(--ease-out); }
.node-replay[open] summary .icon { transform: rotate(90deg); }
.node-replay summary:hover { background: color-mix(in oklch, var(--theme) 9%, transparent); }
.node-replay summary:focus-visible { outline: 3px solid var(--theme); outline-offset: -3px; }
.replay-player {
  display: grid;
  gap: 7px;
  padding: 0 10px 11px;
  animation: replay-reveal 220ms var(--ease-out) both;
}
.replay-player audio { width: 100%; height: 38px; accent-color: var(--theme); }
.replay-player small { color: var(--muted); font-size: .7rem; text-align: center; }

.theme-galaxy .world-symbol { animation: galaxy-core-breathe 5s var(--ease-out) infinite alternate; }
.theme-galaxy .world-ring { animation: galaxy-orbit 20s linear infinite; }
.theme-galaxy .world-ring-two { animation-direction: reverse; animation-duration: 14s; }
.theme-worldtree .world-symbol { animation: tree-canopy-breathe 4.8s var(--ease-out) infinite alternate; }
.theme-river .world-symbol { animation: river-energy-breathe 4.2s var(--ease-out) infinite alternate; }
.theme-crystal .world-symbol { animation: crystal-energy-pulse 3.6s var(--ease-out) infinite alternate; }
.day-tab[aria-selected="true"] { text-shadow: 0 0 15px color-mix(in oklch, var(--theme) 32%, transparent); }
.btn-theme:hover { box-shadow: 0 0 24px color-mix(in oklch, var(--theme) 54%, transparent); }

.day-switcher { align-items: stretch; }
.day-tab {
  flex: 1 1 0;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.day-tab span { margin-right: 0; font-size: .82rem; font-weight: 680; }
.day-tab i { color: color-mix(in oklch, var(--muted) 72%, transparent); font-style: normal; }
.day-tab b { color: inherit; font-size: .98rem; font-weight: 750; }
.day-tab[aria-selected="true"] i { color: color-mix(in oklch, var(--theme) 62%, var(--muted)); }

.section-heading {
  align-items: flex-start;
  margin-bottom: 36px;
}
.timeline-note {
  padding-top: 7px;
  line-height: 1.45;
}

@keyframes node-signal-ripple {
  0% { opacity: .82; transform: scale(.72); }
  72%, 100% { opacity: 0; transform: scale(3.2); }
}
@keyframes track-energy-flow { to { transform: translateY(100%); } }
@keyframes completed-core-pulse {
  0%, 100% { transform: scale(.76); opacity: .74; }
  50% { transform: scale(1.18); opacity: 1; }
}
@keyframes replay-reveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes galaxy-core-breathe {
  from { transform: scale(.94); filter: drop-shadow(0 0 34px rgba(91, 156, 255, .2)); }
  to { transform: scale(1.04); filter: drop-shadow(0 0 58px rgba(91, 156, 255, .42)); }
}
@keyframes galaxy-orbit {
  from { transform: rotate(-18deg); }
  to { transform: rotate(342deg); }
}
@keyframes tree-canopy-breathe {
  from { transform: translateY(7px) scale(.97); filter: saturate(.94); }
  to { transform: translateY(-6px) scale(1.03); filter: saturate(1.16); }
}
@keyframes river-energy-breathe {
  from { transform: rotate(-9deg) translateX(-10px); filter: blur(2px) drop-shadow(0 0 20px rgba(67, 211, 255, .18)); }
  to { transform: rotate(-6deg) translateX(14px); filter: blur(1px) drop-shadow(0 0 34px rgba(67, 211, 255, .38)); }
}
@keyframes crystal-energy-pulse {
  from { transform: scale(.96) rotate(-2deg); filter: saturate(.9); }
  to { transform: scale(1.03) rotate(2deg); filter: saturate(1.18) drop-shadow(0 0 24px rgba(255, 139, 31, .24)); }
}

@media (max-width: 860px) {
  .timeline-event { grid-template-columns: 70px 28px minmax(0, 1fr); }
  .node-actions { grid-column: 3; }
  .section-heading { flex-direction: column; gap: 8px; margin-bottom: 28px; }
  .timeline-note { padding-top: 0; text-align: left; }
}

@media (max-width: 719px) {
  .timeline-event { grid-template-columns: var(--time-col) var(--track-col) minmax(0, 1fr); }
  .node-actions { grid-column: 3; }
  .node-replay summary { justify-content: flex-start; padding-inline: 13px; }
  .day-tab { flex: 0 0 auto; min-width: 132px; padding-inline: 12px; }
  .day-tab span { font-size: .75rem; }
  .day-tab b { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  #particle-field.is-boosted { filter: none; }
  .track-dot::before,
  .track-dot::after,
  .track-line::after,
  .completed .track-dot i,
  .theme-galaxy .world-symbol,
  .theme-galaxy .world-ring,
  .theme-worldtree .world-symbol,
  .theme-river .world-symbol,
  .theme-crystal .world-symbol { animation: none !important; }
}
