:root {
  color-scheme: light;
  --bg: #f7f1e7;
  --surface: #fffaf0;
  --surface-2: #eef4f3;
  --ink: #17202c;
  --muted: #667080;
  --line: #d9d4c8;
  --accent: #2a6f7f;
  --accent-2: #9d5b28;
  --accent-3: #a98b3d;
  --soft-green: #dcece3;
  --soft-red: #f2d9d4;
  --soft-blue: #dce8f4;
  --soft-yellow: #f4e8be;
  --sidebar-bg: #151f34;
  --sidebar-text: #fbf7ee;
  --sidebar-muted: #c6ccd7;
  --sidebar-panel: rgba(255, 255, 255, 0.08);
  --brand-fill: #f0d992;
  --brand-ink: #151f34;
  --nav-hover: rgba(255, 255, 255, 0.11);
  --panel-tint: #eef5f7;
  --theme-line: rgba(255, 255, 255, 0.15);
  --shadow: 0 18px 50px rgba(42, 48, 54, 0.12);
}

body[data-theme="nineteen89"] {
  --bg: #f3f8fb;
  --surface: #ffffff;
  --surface-2: #e1f0f7;
  --ink: #172733;
  --muted: #62717b;
  --line: #cfdee6;
  --accent: #2f86a6;
  --accent-2: #c84b4b;
  --accent-3: #e1a04b;
  --soft-green: #d9eee9;
  --soft-red: #f5dddc;
  --soft-blue: #d7edf8;
  --soft-yellow: #f6e8c7;
  --sidebar-bg: #d7edf8;
  --sidebar-text: #172733;
  --sidebar-muted: #586b78;
  --sidebar-panel: rgba(255, 255, 255, 0.68);
  --brand-fill: #c84b4b;
  --brand-ink: #ffffff;
  --nav-hover: rgba(47, 134, 166, 0.14);
  --panel-tint: #ebf7fb;
  --theme-line: rgba(47, 134, 166, 0.22);
}

body[data-theme="folklore"] {
  --bg: #f3f1ed;
  --surface: #fffdfa;
  --surface-2: #e9ece5;
  --ink: #222724;
  --muted: #6c706a;
  --line: #d5d6cd;
  --accent: #5a7464;
  --accent-2: #8a5f45;
  --accent-3: #66717a;
  --soft-green: #dfe8df;
  --soft-red: #ead9d1;
  --soft-blue: #dfe5e7;
  --soft-yellow: #ece2c5;
  --sidebar-bg: #2b332e;
  --sidebar-text: #f7f5ef;
  --sidebar-muted: #c4c8bf;
  --sidebar-panel: rgba(255, 255, 255, 0.08);
  --brand-fill: #dfe8df;
  --brand-ink: #2b332e;
  --nav-hover: rgba(255, 255, 255, 0.1);
  --panel-tint: #eef1eb;
  --theme-line: rgba(255, 255, 255, 0.14);
}

body[data-theme="lover"] {
  --bg: #fff5f8;
  --surface: #ffffff;
  --surface-2: #f4e5f2;
  --ink: #2b2430;
  --muted: #756979;
  --line: #ead4e4;
  --accent: #be5f93;
  --accent-2: #4b94a7;
  --accent-3: #d89b4e;
  --soft-green: #dcefe8;
  --soft-red: #f6dbe8;
  --soft-blue: #dceff6;
  --soft-yellow: #f8e8bd;
  --sidebar-bg: #f6dbe8;
  --sidebar-text: #2b2430;
  --sidebar-muted: #725f74;
  --sidebar-panel: rgba(255, 255, 255, 0.62);
  --brand-fill: #4b94a7;
  --brand-ink: #ffffff;
  --nav-hover: rgba(190, 95, 147, 0.13);
  --panel-tint: #fff1f7;
  --theme-line: rgba(190, 95, 147, 0.2);
}

body[data-theme="reputation"] {
  --bg: #f1f2ef;
  --surface: #fbfbf8;
  --surface-2: #e3e6df;
  --ink: #121513;
  --muted: #626861;
  --line: #cfd4cc;
  --accent: #2e6b46;
  --accent-2: #8a8f88;
  --accent-3: #1f2933;
  --soft-green: #d7e7d5;
  --soft-red: #e4d6d4;
  --soft-blue: #dce2e2;
  --soft-yellow: #e9e0b8;
  --sidebar-bg: #111412;
  --sidebar-text: #f4f6f2;
  --sidebar-muted: #bac2b8;
  --sidebar-panel: rgba(255, 255, 255, 0.075);
  --brand-fill: #9fbaa0;
  --brand-ink: #111412;
  --nav-hover: rgba(159, 186, 160, 0.16);
  --panel-tint: #eef2eb;
  --theme-line: rgba(255, 255, 255, 0.13);
}

body[data-theme="red"] {
  --bg: #faf3ee;
  --surface: #fffdf8;
  --surface-2: #f0e0d7;
  --ink: #271d1d;
  --muted: #756766;
  --line: #dfcec7;
  --accent: #9e2f2f;
  --accent-2: #6e4631;
  --accent-3: #c99844;
  --soft-green: #dbe9dc;
  --soft-red: #f0d1cd;
  --soft-blue: #dee5ec;
  --soft-yellow: #f5e2b5;
  --sidebar-bg: #5f2022;
  --sidebar-text: #fff9f1;
  --sidebar-muted: #e8c9c4;
  --sidebar-panel: rgba(255, 255, 255, 0.08);
  --brand-fill: #f5e2b5;
  --brand-ink: #5f2022;
  --nav-hover: rgba(255, 255, 255, 0.11);
  --panel-tint: #fff4ef;
  --theme-line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 11%, transparent), transparent 34%),
    linear-gradient(240deg, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 36%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial,
    sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 20px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sidebar-bg) 92%, #ffffff 8%), var(--sidebar-bg));
  color: var(--sidebar-text);
  transition:
    padding 180ms ease,
    gap 180ms ease;
}

.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: -16px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  box-shadow: 0 10px 24px rgba(22, 26, 32, 0.22);
  font-size: 20px;
  line-height: 1;
}

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

.brand-copy {
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #d9efe7;
  background: var(--brand-fill);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 24px;
}

.brand h1,
.brand p,
.section-header h3,
.section-header p,
.panel h3,
.topbar h2,
.topbar p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
}

.brand p {
  color: var(--sidebar-muted);
  font-size: 13px;
  margin-top: 3px;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab {
  position: relative;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
}

.nav-tab:hover,
.nav-tab.active {
  background: var(--nav-hover);
  border-color: var(--theme-line);
  color: var(--sidebar-text);
}

.theme-switcher {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--sidebar-panel);
}

.theme-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.theme-title-row span {
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.theme-title-row strong {
  margin-left: auto;
  color: var(--sidebar-text);
  font-size: 13px;
}

.collapse-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--theme-line);
  color: var(--sidebar-text);
  transition: transform 160ms ease;
}

.theme-switcher.collapsed {
  gap: 0;
}

.theme-switcher.collapsed .theme-grid {
  display: none;
}

.theme-switcher.collapsed .collapse-mark {
  transform: rotate(180deg);
}

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

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  font-size: 12px;
  text-align: left;
}

.theme-chip:hover,
.theme-chip.active {
  background: var(--nav-hover);
  border-color: color-mix(in srgb, var(--brand-fill) 72%, var(--theme-line));
}

.swatch {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.swatch-midnights {
  background: linear-gradient(135deg, #151f34 0 48%, #f0d992 48% 100%);
}

.swatch-nineteen89 {
  background: linear-gradient(135deg, #d7edf8 0 50%, #c84b4b 50% 100%);
}

.swatch-folklore {
  background: linear-gradient(135deg, #5a7464 0 50%, #e9ece5 50% 100%);
}

.swatch-lover {
  background: linear-gradient(135deg, #f6dbe8 0 50%, #4b94a7 50% 100%);
}

.swatch-reputation {
  background: linear-gradient(135deg, #111412 0 50%, #9fbaa0 50% 100%);
}

.swatch-red {
  background: linear-gradient(135deg, #9e2f2f 0 50%, #f5e2b5 50% 100%);
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--sidebar-panel);
}

.sidebar-note span {
  display: block;
  color: var(--sidebar-muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.sidebar-note strong {
  display: block;
  line-height: 1.6;
  font-size: 14px;
}

.vault-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--sidebar-panel) 70%, transparent);
  color: var(--sidebar-text);
  text-align: left;
}

.vault-button:hover {
  background: var(--nav-hover);
}

.vault-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-fill);
  color: var(--brand-ink);
  font-weight: 900;
}

.vault-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.vault-copy strong {
  font-size: 13px;
}

.vault-copy small {
  color: var(--sidebar-muted);
  font-size: 12px;
}

.app-shell.sidebar-collapsed .sidebar {
  gap: 18px;
  padding: 28px 14px;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  right: -15px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .theme-switcher,
.app-shell.sidebar-collapsed .sidebar-note {
  display: none;
}

.app-shell.sidebar-collapsed .vault-button {
  justify-content: center;
  width: 54px;
  height: 54px;
  padding: 0;
}

.app-shell.sidebar-collapsed .vault-copy {
  display: none;
}

.app-shell.sidebar-collapsed .brand-mark {
  width: 48px;
  height: 48px;
}

.app-shell.sidebar-collapsed .nav-tabs {
  gap: 10px;
}

.app-shell.sidebar-collapsed .nav-tab {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  text-align: center;
}

.app-shell.sidebar-collapsed .nav-tab span {
  display: none;
}

.app-shell.sidebar-collapsed .nav-tab::before {
  content: attr(data-short);
  font-size: 19px;
  font-weight: 800;
}

.main {
  padding: 26px 28px 34px;
  min-width: 0;
}

.topbar,
.section-header,
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 22px;
}

.topbar h2 {
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.2;
  margin-top: 3px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-stats {
  display: flex;
  gap: 8px;
}

.quick-stats div {
  min-width: 74px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  text-align: center;
}

.quick-stats span {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.quick-stats small,
.hint {
  color: var(--muted);
  font-size: 12px;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

.today-grid,
.two-col,
.competition-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 18px;
  align-items: stretch;
}

.competition-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.side-stack {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  height: 100%;
}

.today-grid > .panel,
.side-stack > .panel {
  height: 100%;
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-collapse-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink);
  font-weight: 900;
}

.collapsible-content {
  display: block;
}

.collapsible-panel.collapsed {
  padding-bottom: 16px;
}

.collapsible-panel.collapsed .collapsible-content {
  display: none;
}

.collapsible-panel.collapsed.next-panel {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--soft-blue) 24%, transparent), transparent),
    rgba(255, 253, 249, 0.9);
}

.collapsible-panel.collapsed.focus-panel {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-tint) 58%, transparent), transparent),
    rgba(255, 253, 249, 0.94);
}

.morning-brief {
  display: grid;
  grid-template-columns: minmax(190px, 0.82fr) minmax(320px, 1.5fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-tint) 46%, transparent), transparent),
    var(--surface);
  box-shadow: 0 12px 32px rgba(42, 48, 54, 0.08);
  margin-bottom: 18px;
  padding: 16px 18px;
}

.morning-brief p {
  margin: 0;
}

.brief-countdown,
.brief-main,
.brief-pressure {
  min-width: 0;
}

.brief-main,
.brief-pressure {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.brief-countdown {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brief-countdown span {
  min-width: 54px;
  font-size: 38px;
  line-height: 0.95;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
}

.brief-countdown strong {
  display: block;
  margin-bottom: 4px;
}

.brief-countdown p,
.brief-main > p,
.brief-pressure > p {
  color: var(--muted);
  line-height: 1.5;
}

.brief-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.brief-pressure .pressure-meter {
  margin-top: 0;
  margin-bottom: 9px;
}

.pressure-meter {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, #ffffff);
  overflow: hidden;
  margin-top: 14px;
}

.pressure-meter span {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.pressure-meter span.medium {
  background: #b18424;
}

.pressure-meter span.high {
  background: var(--accent-2);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 14px 38px rgba(42, 48, 54, 0.09);
  padding: 18px;
}

.focus-panel {
  background: linear-gradient(135deg, var(--surface), var(--panel-tint));
}

.week-panel {
  margin-top: 18px;
}

.check-list,
.timeline-list,
.log-list,
.gate-list,
.next-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.check-item,
.timeline-item,
.next-item,
.log-item,
.course-card,
.competition-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 13px;
}

.check-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.check-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.check-item strong,
.timeline-item strong,
.log-item strong {
  display: block;
  margin-bottom: 5px;
}

.check-item p,
.timeline-item p,
.next-item p,
.log-item p,
.course-card p,
.competition-card p,
.topic-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.next-panel {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--soft-blue) 36%, transparent), transparent),
    rgba(255, 253, 249, 0.94);
}

.next-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.next-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.next-item strong {
  display: block;
  margin-bottom: 4px;
}

.next-item small {
  display: inline-flex;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-badge,
.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--soft-green);
  color: #145447;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.high,
.mini-badge.high {
  background: var(--soft-red);
  color: #7c211f;
}

.status-badge.medium,
.mini-badge.medium {
  background: var(--soft-yellow);
  color: #654d08;
}

.status-badge.prep {
  background: var(--soft-blue);
  color: #244b7e;
}

.mini-badge.gate.good {
  background: var(--soft-green);
  color: #145447;
}

.mini-badge.gate.watch {
  background: var(--soft-blue);
  color: #244b7e;
}

.mini-badge.gate.caution {
  background: var(--soft-red);
  color: #7c211f;
}

.week-map {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.day-block {
  min-height: 172px;
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.day-block.busy {
  background: #e0ece8;
  border-color: #9fc8bd;
}

.day-block.heavy {
  background: #f2ded8;
  border-color: #dda69a;
}

.day-block h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.day-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.section-header {
  margin-bottom: 18px;
}

.section-header h3 {
  font-size: 24px;
}

.primary-button,
.text-button,
.icon-button,
dialog menu button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.text-button {
  color: var(--accent);
  font-weight: 800;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.course-card,
.competition-card {
  display: grid;
  gap: 10px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.card-head h4 {
  margin: 0;
  font-size: 17px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.pipeline-step {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.pipeline-step h4,
.topic-card h4 {
  margin: 0 0 10px;
}

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

.topic-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-blue);
}

#algorithm .panel-title-row {
  flex-wrap: wrap;
}

#algorithm .text-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 12px;
}

.gate-list label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  line-height: 1.5;
}

.gate-list input {
  accent-color: var(--accent);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--ink);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(23, 35, 31, 0.42);
}

.dialog-form {
  padding: 22px;
}

.dialog-form h3 {
  margin: 0 0 16px;
}

.backup-dialog {
  width: min(640px, calc(100vw - 32px));
}

.backup-shell {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 26px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel-tint) 40%, transparent), transparent 60%),
    var(--surface);
}

.backup-shell h3 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  letter-spacing: 0;
}

.backup-intro {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.backup-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.backup-summary div {
  display: grid;
  gap: 6px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 76%, #ffffff 24%);
}

.backup-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.backup-summary strong {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

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

.import-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.import-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.backup-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.backup-status.success {
  color: var(--accent);
  font-weight: 800;
}

.backup-status.error {
  color: var(--accent-2);
  font-weight: 800;
}

@media (max-width: 980px) {
  .backup-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .backup-shell {
    padding: 22px;
  }

  .backup-summary {
    grid-template-columns: 1fr;
  }
}

.dialog-fields {
  display: grid;
  gap: 12px;
}

.dialog-fields label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
}

.delete-button {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 980px) {
  .app-shell,
  .morning-brief,
  .today-grid,
  .two-col,
  .competition-layout,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .side-stack {
    grid-template-rows: none;
    height: auto;
  }

  .today-grid > .panel,
  .side-stack > .panel {
    height: auto;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 16px;
  }

  .sidebar-toggle {
    display: none;
  }

  .app-shell.sidebar-collapsed .sidebar {
    gap: 24px;
    padding: 16px;
  }

  .app-shell.sidebar-collapsed .brand {
    justify-content: flex-start;
  }

  .app-shell.sidebar-collapsed .brand-copy,
  .app-shell.sidebar-collapsed .theme-switcher {
    display: grid;
  }

  .app-shell.sidebar-collapsed .brand-mark {
    width: 44px;
    height: 44px;
  }

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

  .nav-tab,
  .app-shell.sidebar-collapsed .nav-tab {
    width: auto;
    height: auto;
    padding: 12px 14px;
    text-align: center;
  }

  .app-shell.sidebar-collapsed .nav-tab span {
    display: inline;
  }

  .app-shell.sidebar-collapsed .nav-tab::before {
    content: none;
  }

  .sidebar-note {
    display: none;
  }

  .theme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline,
  .week-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .main {
    padding: 18px 14px 28px;
  }

  .topbar,
  .section-header,
  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-stats,
  .morning-brief,
  .week-map,
  .pipeline {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .morning-brief {
    gap: 14px;
  }

  .brief-main,
  .brief-pressure {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }

  .brief-title-row {
    align-items: flex-start;
  }

  .quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-stats div {
    min-width: 0;
    padding: 10px 8px;
  }

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

  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Taylor study journal refresh
   Design read: warm editorial workspace with a single era accent.
   The texture is intentionally CSS-only so the organizer stays fast and offline-friendly. */
:root {
  --radius-panel: 16px;
  --radius-control: 11px;
  --paper-shadow: 0 18px 42px rgba(47, 35, 42, 0.09);
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% 4%, color-mix(in srgb, var(--accent-3) 15%, transparent), transparent 22rem),
    radial-gradient(circle at 18% 42%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 26rem),
    var(--bg);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.25;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 18%, transparent) 0.6px, transparent 0.6px);
  background-size: 7px 7px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  gap: 22px;
  padding: 30px 18px 24px;
  isolation: isolate;
  box-shadow: 14px 0 44px rgba(24, 28, 39, 0.13);
}

.sidebar::before {
  position: absolute;
  top: -110px;
  right: -84px;
  z-index: -1;
  width: 220px;
  height: 220px;
  border: 1px solid var(--theme-line);
  border-radius: 50%;
  box-shadow: 0 0 0 22px color-mix(in srgb, var(--theme-line) 35%, transparent), 0 0 0 44px color-mix(in srgb, var(--theme-line) 18%, transparent);
  content: "";
  opacity: 0.8;
}

.brand {
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--theme-line);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-fill) 24%, transparent);
  transform: rotate(-7deg);
}

.brand h1 {
  letter-spacing: -0.03em;
}

.nav-tabs {
  gap: 5px;
}

.nav-tab {
  border-radius: var(--radius-control);
  padding: 11px 12px;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-tab:hover {
  transform: translateX(4px);
}

.nav-tab.active {
  position: relative;
  padding-left: 18px;
}

.nav-tab.active::after {
  position: absolute;
  left: 7px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-fill);
  content: "";
  transform: translateY(-50%);
}

.theme-switcher,
.sidebar-note {
  border-radius: var(--radius-panel);
}

.theme-chip {
  border-radius: 9px;
}

.main {
  position: relative;
  max-width: 1500px;
  padding: 34px clamp(24px, 4vw, 64px) 52px;
}

.topbar {
  position: relative;
  min-height: 126px;
  align-items: flex-end;
  margin-bottom: 28px;
  padding: 28px 30px 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 24px 24px 8px 24px;
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--panel-tint) 72%, transparent)),
    var(--surface);
  box-shadow: var(--paper-shadow);
}

.topbar::before {
  position: absolute;
  right: 22px;
  top: -56px;
  width: 180px;
  height: 180px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 7%, transparent), 0 0 0 28px color-mix(in srgb, var(--accent) 5%, transparent);
  content: "";
}

.topbar::after {
  position: absolute;
  right: 42px;
  bottom: 14px;
  color: color-mix(in srgb, var(--accent) 52%, transparent);
  content: "TAYLOR'S STUDY ERA";
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  transform: rotate(-8deg);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar h2 {
  max-width: 12ch;
  font-size: clamp(30px, 4.5vw, 52px);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.topbar .eyebrow {
  margin-bottom: 9px;
  letter-spacing: 0.18em;
}

.quick-stats {
  gap: 10px;
}

.quick-stats div {
  min-width: 84px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 12px;
  background: transparent;
  text-align: left;
}

.quick-stats span {
  color: var(--accent);
  font-size: 26px;
  letter-spacing: -0.06em;
}

.morning-brief {
  position: relative;
  grid-template-columns: minmax(200px, 0.7fr) minmax(340px, 1.55fr) minmax(260px, 0.95fr);
  gap: 0;
  margin-bottom: 22px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--paper-shadow);
}

.brief-countdown,
.brief-main,
.brief-pressure {
  min-height: 134px;
  padding: 20px 22px;
}

.brief-countdown {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.brief-main,
.brief-pressure {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.brief-countdown span {
  color: var(--accent);
  font-size: 48px;
}

.panel,
.course-card,
.competition-card,
.pipeline-step,
.day-block,
.topic-card,
.check-item,
.timeline-item,
.next-item,
.log-item {
  border-radius: var(--radius-panel);
  box-shadow: none;
}

.panel {
  padding: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--paper-shadow);
}

.focus-panel {
  border-top: 4px solid var(--accent);
}

.side-stack {
  gap: 18px;
}

.panel-title-row {
  align-items: flex-start;
}

.panel-title-row h3,
.section-header h3 {
  letter-spacing: -0.035em;
}

.eyebrow {
  letter-spacing: 0.12em;
}

.check-list,
.timeline-list,
.log-list,
.next-list {
  gap: 10px;
}

.check-item,
.timeline-item,
.next-item,
.log-item,
.course-card,
.competition-card {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.check-item:hover,
.timeline-item:hover,
.next-item:hover,
.log-item:hover,
.course-card:hover,
.competition-card:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  transform: translateY(-2px);
}

.week-panel {
  margin-top: 22px;
}

.day-block {
  min-height: 184px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface-2) 76%, var(--surface));
}

.day-block.busy,
.day-block.heavy {
  border-width: 1px;
}

.primary-button,
.text-button,
.icon-button,
dialog menu button,
.panel-collapse-button {
  border-radius: var(--radius-control);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:active {
  transform: translateY(1px) scale(0.98);
}

.primary-button {
  padding-inline: 16px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.primary-button:hover {
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translateY(-2px);
}

textarea,
input,
select {
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface) 82%, white);
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .main {
    padding-inline: 24px;
  }

  .topbar {
    min-height: 112px;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 18px 14px 34px;
  }

  .topbar {
    min-height: 176px;
    align-items: flex-start;
    padding: 24px 20px;
  }

  .topbar h2 {
    font-size: 38px;
  }

  .topbar::after {
    right: 20px;
    bottom: 18px;
  }

  .quick-stats {
    width: 100%;
    justify-content: space-between;
  }

  .quick-stats div {
    min-width: 0;
    padding-inline: 8px;
  }

  .morning-brief {
    border-radius: var(--radius-panel);
  }

  .brief-countdown,
  .brief-main,
  .brief-pressure {
    min-height: auto;
    padding: 18px;
  }

  .brief-main,
  .brief-pressure {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-left: 18px;
  }
}

/* Typography pass: a softer humanist body paired with an editorial album-note display face. */
body {
  font-family:
    "Noto Sans SC", "Noto Sans CJK SC", "HarmonyOS Sans SC", "MiSans", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
  font-weight: 450;
  letter-spacing: 0.005em;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

h1,
h2,
h3,
h4,
.brand h1,
.topbar h2,
.quick-stats span,
.brief-countdown span {
  font-family:
    "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, Georgia, serif;
  font-weight: 600;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

.brand h1 {
  font-size: 19px;
  letter-spacing: -0.025em;
}

.brand p,
.eyebrow,
.hint,
.quick-stats small,
.status-badge,
.mini-badge,
.theme-title-row span,
.theme-title-row strong,
.theme-chip,
.sidebar-note span {
  font-family:
    "Noto Sans SC", "Noto Sans CJK SC", "HarmonyOS Sans SC", "MiSans", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
}

.topbar h2 {
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 1.06;
}

.section-header h3,
.panel-title-row h3 {
  font-weight: 600;
  letter-spacing: -0.045em;
}

.quick-stats span {
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brief-countdown span {
  font-weight: 600;
  letter-spacing: -0.075em;
}

.brief-countdown strong,
.check-item strong,
.timeline-item strong,
.next-item strong,
.log-item strong,
.card-head h4,
.day-block h4,
.topic-card h4,
.pipeline-step h4 {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.panel p,
.course-card p,
.competition-card p,
.topic-card p,
.pipeline-step p,
.day-block li {
  letter-spacing: 0.012em;
}

.primary-button,
.text-button,
.icon-button,
dialog menu button,
.panel-collapse-button {
  font-weight: 650;
  letter-spacing: 0.015em;
}

@media (max-width: 640px) {
  .topbar h2 {
    letter-spacing: -0.055em;
  }
}

/* Home layout pass: collapsed panels should become summaries, not empty cards. */
.today-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: start;
}

.side-stack {
  height: auto;
  align-content: start;
  grid-template-rows: auto auto;
}

.today-grid > .panel,
.side-stack > .panel {
  height: auto;
}

.collapsible-panel {
  min-height: 0;
}

.collapsible-panel.collapsed {
  min-height: 0;
  padding-bottom: 16px;
  background: color-mix(in srgb, var(--surface) 94%, var(--panel-tint));
}

.collapsible-panel.collapsed .panel-title-row {
  align-items: center;
}

.collapsible-panel.collapsed .panel-title-row h3 {
  margin-top: 2px;
}

.collapsible-panel.collapsed .panel-collapse-button {
  background: color-mix(in srgb, var(--surface) 72%, var(--panel-tint));
}

.collapsible-panel.collapsed.next-panel,
.collapsible-panel.collapsed.focus-panel {
  background: color-mix(in srgb, var(--surface) 94%, var(--panel-tint));
}

.focus-panel.collapsed {
  border-top-width: 3px;
}

.focus-panel:not(.collapsed) {
  min-height: 100%;
}

.side-stack .collapsible-panel:not(.collapsed) {
  animation: panel-settle 220ms ease both;
}

@keyframes panel-settle {
  from {
    opacity: 0.72;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .today-grid {
    align-items: stretch;
  }

  .focus-panel:not(.collapsed) {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .today-grid {
    grid-template-columns: 1fr;
  }

  .side-stack {
    gap: 12px;
  }

  .collapsible-panel.collapsed {
    padding-bottom: 14px;
  }
}

/* Workbench composition pass: turn the home view into one continuous workspace. */
.main {
  max-width: 1540px;
  padding-top: 40px;
}

.topbar {
  min-height: 112px;
  margin: 0 0 24px;
  padding: 8px 4px 24px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar::before {
  right: 4px;
  top: -72px;
  opacity: 0.7;
}

.topbar::after {
  right: 28px;
  bottom: 18px;
}

.topbar h2 {
  max-width: 16ch;
  font-size: clamp(34px, 4.2vw, 52px);
}

.quick-stats {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  padding-right: 16px;
}

.quick-stats div {
  min-width: 92px;
}

.morning-brief {
  grid-template-columns: minmax(190px, 0.72fr) minmax(340px, 1.6fr) minmax(260px, 0.92fr);
  margin-bottom: 30px;
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-panel) var(--radius-panel) 0;
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface) 48%, color-mix(in srgb, var(--accent-3) 7%, var(--surface)));
  box-shadow: 0 12px 28px rgba(47, 35, 42, 0.07);
}

.brief-countdown,
.brief-main,
.brief-pressure {
  min-height: 122px;
  padding: 18px 22px;
}

.brief-main,
.brief-pressure {
  border-left-color: color-mix(in srgb, var(--line) 70%, transparent);
}

.season-compass {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.season-copy {
  padding-right: 26px;
  border-right: 1px solid var(--line);
}

.season-copy h3 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.season-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.season-tracklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.season-track {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 156px;
  padding: 2px 18px 0;
  border-right: 1px solid var(--line);
}

.season-track:last-child {
  border-right: 0;
  padding-right: 0;
}

.season-track > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.season-track strong {
  display: block;
  margin: 14px 0 8px;
  color: var(--ink);
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.22;
}

.season-track p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.season-track em {
  align-self: end;
  color: color-mix(in srgb, var(--accent) 82%, var(--ink));
  font-style: normal;
  font-weight: 850;
}

.insight-dock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: -8px 0 24px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.insight-card {
  display: grid;
  gap: 7px;
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 18px 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-tint) 28%, transparent), transparent 65%),
    color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 30px rgba(47, 35, 42, 0.055);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.insight-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, var(--panel-tint));
  transform: translateY(-2px);
}

.insight-card strong {
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.16;
}

.insight-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.insight-dialog {
  width: min(960px, calc(100vw - 36px));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: var(--radius-panel);
  padding: 0;
  background: color-mix(in srgb, var(--surface) 96%, white);
  box-shadow: 0 28px 90px rgba(26, 24, 22, 0.22);
}

.insight-dialog::backdrop {
  background: rgba(24, 25, 29, 0.32);
  backdrop-filter: blur(4px);
}

.insight-dialog-shell {
  position: relative;
  padding: 30px;
}

.dialog-close {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.insight-view {
  display: none;
}

.insight-view.active {
  display: block;
}

.insight-view h3 {
  margin: 8px 0 10px;
  max-width: 16ch;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.insight-view > p:not(.eyebrow) {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.7;
}

.insight-view .season-tracklist,
.insight-view .energy-controls {
  margin-top: 24px;
}

.energy-journal {
  display: grid;
  grid-template-columns: minmax(220px, 0.52fr) minmax(0, 1.48fr);
  gap: 22px;
  align-items: start;
  margin: -8px 0 30px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}

.energy-copy h3 {
  margin: 6px 0 8px;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: 0;
}

.energy-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.energy-controls {
  display: grid;
  gap: 14px;
}

.energy-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.energy-option {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 13px 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.energy-option:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-1px);
}

.energy-option.active {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.energy-option strong,
.energy-option span {
  display: block;
}

.energy-option strong {
  margin-bottom: 7px;
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-size: 18px;
  font-weight: 650;
}

.energy-option span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.energy-note-label {
  display: grid;
  gap: 7px;
}

.energy-note-label span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.energy-note-label input {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 0;
  padding: 8px 0;
  background: transparent;
}

.insight-view .season-tracklist {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.insight-view .season-track {
  min-height: 168px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.insight-view .energy-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-view .energy-note-label {
  margin-top: 12px;
}

.today-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 34px;
}

.focus-panel:not(.collapsed) {
  padding: 26px 28px 28px;
  border-top-width: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-panel) var(--radius-panel) 0;
}

.focus-panel.collapsed {
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.side-stack {
  gap: 0;
  border-top: 1px solid var(--line);
}

.side-stack .collapsible-panel {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.side-stack .collapsible-panel:not(.collapsed) {
  padding: 22px 0;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.side-stack .collapsible-panel.collapsed {
  padding: 18px 4px;
}

.side-stack .panel-title-row h3 {
  font-size: 24px;
}

.side-stack .panel-collapse-button,
.focus-panel.collapsed .panel-collapse-button {
  width: 34px;
  height: 34px;
  border-color: var(--line);
  background: var(--surface);
}

.week-panel {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.week-panel .day-block {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

@media (max-width: 980px) {
  .main {
    padding-top: 28px;
  }

  .topbar {
    padding-inline: 0;
  }

  .season-compass {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .insight-dock {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .insight-dialog-shell {
    padding: 26px 22px;
  }

  .insight-view .energy-options,
  .insight-view .season-tracklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .energy-journal {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .energy-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .season-copy {
    padding-right: 0;
    border-right: 0;
  }

  .season-tracklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .season-track {
    min-height: 138px;
    padding: 18px 16px 0 0;
    border-bottom: 1px solid var(--line);
  }

  .season-track:nth-child(2n) {
    border-right: 0;
    padding-left: 16px;
  }

  .today-grid {
    gap: 24px;
  }

  .focus-panel:not(.collapsed) {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .main {
    padding-top: 20px;
  }

  .topbar {
    min-height: 154px;
    padding-bottom: 20px;
  }

  .topbar::before {
    right: -28px;
    top: -76px;
  }

  .quick-stats {
    padding-right: 0;
  }

  .morning-brief {
    margin-bottom: 24px;
    border-radius: 0 var(--radius-panel) var(--radius-panel) 0;
  }

  .season-compass {
    margin-bottom: 24px;
    padding: 18px 0;
  }

  .insight-dock {
    margin-bottom: 18px;
    padding-bottom: 16px;
  }

  .insight-card {
    min-height: 0;
    padding: 16px;
  }

  .insight-dialog {
    width: calc(100vw - 24px);
  }

  .insight-dialog-shell {
    padding: 24px 18px;
  }

  .insight-view .energy-options,
  .insight-view .season-tracklist {
    grid-template-columns: 1fr;
  }

  .insight-view .season-track,
  .insight-view .season-track:nth-child(2n) {
    min-height: 0;
    padding: 16px 0;
    border-right: 0;
  }

  .energy-journal {
    margin-bottom: 24px;
    padding: 16px 0 18px;
  }

  .energy-options {
    grid-template-columns: 1fr;
  }

  .energy-option {
    min-height: 0;
  }

  .season-tracklist {
    grid-template-columns: 1fr;
  }

  .season-track,
  .season-track:nth-child(2n) {
    min-height: 0;
    padding: 16px 0;
    border-right: 0;
  }

  .focus-panel:not(.collapsed) {
    border-left-width: 3px;
    padding: 20px 18px 22px;
  }

  .side-stack .collapsible-panel.collapsed {
    padding-inline: 0;
  }

  .week-panel {
    margin-top: 24px;
  }
}

/* Secondary workspaces: each tab gets a distinct editorial rhythm instead of one generic card grid. */
.tab-view:not(#today) .section-header {
  align-items: flex-end;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
}

.tab-view:not(#today) .section-header h3 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.tab-view:not(#today) .section-header .eyebrow {
  letter-spacing: 0.2em;
}

/* Courses: a course catalogue, with one quiet lead item and supporting entries. */
#courses .card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

#courses .course-card {
  position: relative;
  min-height: 190px;
  padding: 24px 26px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

#courses .course-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

#courses .course-card:first-child {
  grid-column: span 2;
  min-height: 226px;
  padding-top: 30px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}

#courses .course-card::before {
  position: absolute;
  top: 24px;
  left: 0;
  width: 3px;
  height: 26px;
  border-radius: 0 3px 3px 0;
  background: color-mix(in srgb, var(--accent) 45%, var(--line));
  content: "";
}

#courses .course-card:first-child::before {
  top: 30px;
  height: 42px;
  background: var(--accent);
}

#courses .course-card:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  transform: none;
}

#courses .course-card .card-head h4 {
  font-size: 21px;
}

/* Research: make the pipeline read as a sequence, not five equal tiles. */
#research .pipeline {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#research .pipeline-step {
  position: relative;
  min-height: 174px;
  padding: 22px 18px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

#research .pipeline-step:first-child {
  padding-left: 0;
}

#research .pipeline-step:last-child {
  border-right: 0;
  padding-right: 0;
}

#research .pipeline-step::after {
  position: absolute;
  right: -4px;
  top: 22px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

#research .pipeline-step:last-child::after {
  display: none;
}

#research .pipeline-step h4 {
  color: var(--accent);
  font-size: 17px;
}

#research .pipeline-step p {
  max-width: 18ch;
}

#research > .panel {
  border-top: 3px solid var(--accent);
  border-radius: 0 var(--radius-panel) var(--radius-panel) 0;
}

/* Algorithm: left side is the weekly editorial, right side is the working ledger. */
#algorithm .two-col {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 34px;
  align-items: start;
}

#algorithm .two-col > .panel {
  min-height: 300px;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  box-shadow: none;
  background: transparent;
}

#algorithm .two-col > .panel:first-child {
  border-top: 3px solid var(--accent);
  padding: 24px 0 0;
}

#algorithm .two-col > .panel:last-child {
  padding: 24px 0 0;
}

#algorithm .topic-card {
  min-height: 226px;
  margin-top: 22px;
  padding: 28px;
  border: 0;
  border-radius: var(--radius-panel);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), var(--surface-2));
}

#algorithm .topic-card h4 {
  font-size: 28px;
}

#algorithm .log-list {
  margin-top: 18px;
}

#algorithm .log-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding-inline: 0;
  background: transparent;
}

/* Competitions: screening is a rail, opportunities are the main field. */
#competitions .competition-layout {
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1.58fr);
  gap: 34px;
  align-items: start;
}

#competitions .competition-layout > .panel {
  position: sticky;
  top: 24px;
  border: 0;
  border-top: 3px solid var(--accent);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 20px 0;
}

#competitions .gate-list {
  gap: 0;
  margin-top: 18px;
}

#competitions .gate-list label {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

#competitions .competition-layout > .card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#competitions .competition-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

/* Review: turn the page into a calm writing desk, with a clear save action. */
#review .review-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
  border-top: 1px solid var(--line);
}

#review .review-grid label {
  min-height: 220px;
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

#review .review-grid textarea {
  min-height: 126px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 0;
  padding: 10px 0;
  background: transparent;
  font-family: "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

#review .review-grid textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 2px 0 var(--accent);
}

@media (max-width: 980px) {
  #research .pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #research .pipeline-step,
  #research .pipeline-step:first-child,
  #research .pipeline-step:last-child {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 18px;
  }

  #research .pipeline-step::after {
    display: none;
  }

  #competitions .competition-layout,
  #algorithm .two-col {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  #competitions .competition-layout > .panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .tab-view:not(#today) .section-header {
    align-items: flex-start;
  }

  #courses .card-grid,
  #competitions .competition-layout > .card-grid,
  #review .review-grid {
    grid-template-columns: 1fr;
  }

  #courses .course-card,
  #courses .course-card:first-child {
    grid-column: auto;
    min-height: 0;
    padding: 22px 18px;
  }

  #courses .course-card:nth-child(odd) {
    border-right: 0;
  }

  #research .pipeline {
    grid-template-columns: 1fr;
  }

  #research .pipeline-step,
  #research .pipeline-step:first-child,
  #research .pipeline-step:last-child {
    min-height: 0;
    border-right: 0;
    padding: 18px 0;
  }

  #algorithm .two-col > .panel:first-child,
  #algorithm .two-col > .panel:last-child {
    padding-top: 20px;
  }

  #review .review-grid label {
    min-height: 190px;
  }
}

/* Collapsible workspace polish: keep expanded panels compact and collapsed panels summary-like. */
#today .today-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 28px;
  align-items: start;
}

#today .panel-title-row {
  align-items: flex-start;
  gap: 18px;
}

#today .panel-title-row h3 {
  line-height: 1.14;
  letter-spacing: 0;
}

#today .panel-actions {
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  padding-top: 2px;
}

#today .panel-collapse-button,
#today .icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 10px;
}

#today .side-stack {
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  border-top: 0;
  align-content: start;
}

#today .side-stack .collapsible-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--paper-shadow);
}

#today .side-stack .collapsible-panel:not(.collapsed) {
  padding: 20px 22px 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-tint) 34%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface) 92%, transparent);
}

#today .side-stack .collapsible-panel.collapsed {
  padding: 15px 18px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

#today .side-stack .panel-title-row h3 {
  font-size: 28px;
}

#today .side-stack .collapsible-panel.collapsed .panel-title-row h3 {
  font-size: 22px;
}

#today .side-stack .collapsible-content {
  margin-top: 18px;
}

#today .side-stack .empty {
  padding: 8px 0 8px 14px;
  border: 0;
  border-left: 3px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 0;
  background: transparent;
  line-height: 1.65;
}

#today .timeline-list,
#today .next-list {
  gap: 10px;
}

#today .timeline-item,
#today .next-item {
  padding: 14px 16px;
  border-radius: 8px;
}

#today .today-add-button {
  min-height: 36px;
  white-space: nowrap;
}

#today .clear-done-button {
  min-height: 36px;
  white-space: nowrap;
}

#today .today-action-board {
  display: grid;
  gap: 18px;
}

#today .today-action {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
}

#today .today-action label {
  min-width: 0;
}

#today .today-action small {
  display: inline-flex;
  margin-top: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

#today .today-action.done {
  background: color-mix(in srgb, var(--soft-green) 42%, var(--surface));
}

#today .today-action.done strong,
#today .today-action.done p {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

#today .today-delete {
  opacity: 0.72;
}

#today .today-action:hover .today-delete {
  opacity: 1;
}

#today .today-empty {
  margin-top: 14px;
}

#today .suggestion-panel {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

#today .suggestion-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

#today .suggestion-heading span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#today .suggestion-heading small {
  color: var(--muted);
  font-size: 12px;
}

#today .suggestion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#today .suggestion-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 92px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--ink);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

#today .suggestion-item:hover {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  transform: translateY(-1px);
}

#today .suggestion-plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--accent);
  font-weight: 900;
}

#today .suggestion-item strong,
#today .suggestion-item small,
#today .suggestion-item p {
  display: block;
}

#today .suggestion-item strong {
  margin-bottom: 4px;
  line-height: 1.35;
}

#today .suggestion-item small {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

#today .suggestion-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

#today .collapsible-panel.collapsed .panel-title-row {
  align-items: center;
}

#today .collapsible-panel.collapsed .eyebrow {
  margin-bottom: 3px;
}

#today .status-badge,
#today .hint {
  white-space: nowrap;
}

#today .focus-panel:not(.collapsed) {
  min-height: 0;
}

@media (max-width: 980px) {
  #today .today-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #today .side-stack {
    gap: 12px;
  }

  #today .suggestion-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #today .panel-title-row {
    flex-direction: row;
    align-items: flex-start;
  }

  #today .panel-actions {
    gap: 6px;
  }

  #today .today-action {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  #today .today-delete {
    grid-column: 2;
    justify-self: start;
  }

  #today .suggestion-heading {
    display: grid;
  }

  #today .side-stack .collapsible-panel:not(.collapsed),
  #today .side-stack .collapsible-panel.collapsed {
    padding: 16px;
  }
}

/* Final responsive lock: later editorial overrides should not force mobile back into desktop columns. */
@media (max-width: 980px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    position: sticky;
    top: 0;
    z-index: 8;
    gap: 16px;
    padding: 16px;
  }

  .main {
    max-width: none;
    padding-inline: 24px;
    overflow-x: hidden;
  }

  .morning-brief,
  .today-grid,
  .week-map,
  .pipeline,
  .two-col,
  .competition-layout,
  .review-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-stats {
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .quick-stats div {
    min-width: 0;
  }

  .season-compass {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .season-copy {
    padding-right: 0;
    border-right: 0;
  }

  .season-tracklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .season-track {
    min-height: 138px;
    padding: 18px 16px 0 0;
    border-bottom: 1px solid var(--line);
  }

  .season-track:nth-child(2n) {
    border-right: 0;
    padding-left: 16px;
  }
}

@media (max-width: 640px) {
  html,
  body,
  .app-shell {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .main {
    padding-inline: 14px;
  }

  .sidebar,
  .app-shell.sidebar-collapsed .sidebar {
    position: relative;
    overflow: hidden;
  }

  .nav-tabs,
  .theme-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .theme-title-row {
    justify-content: flex-start;
  }

  .theme-title-row strong {
    display: none;
  }

  .nav-tab,
  .app-shell.sidebar-collapsed .nav-tab,
  .theme-chip,
  .theme-title-row,
  .theme-title-row strong,
  .theme-title-row span,
  .brand-copy {
    min-width: 0;
  }

  .nav-tab,
  .app-shell.sidebar-collapsed .nav-tab,
  .theme-chip {
    overflow: hidden;
  }

  .nav-tab span,
  .theme-chip,
  .theme-title-row strong,
  .theme-title-row span,
  .brand h1,
  .brand p {
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand {
    min-width: 0;
  }

  .topbar {
    min-height: 0;
    padding: 18px 0 22px;
  }

  .topbar h2 {
    max-width: 100%;
    font-size: 34px;
    line-height: 1.08;
  }

  .topbar::after {
    right: 16px;
    bottom: 8px;
  }

  .morning-brief {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: var(--radius-panel);
  }

  .brief-countdown,
  .brief-main,
  .brief-pressure {
    min-height: 0;
  }

  .brief-countdown {
    align-items: flex-start;
    gap: 14px;
  }

  .brief-countdown span {
    flex: 0 0 auto;
    font-size: 44px;
  }

  .brief-countdown div {
    min-width: 0;
  }

  .season-compass {
    margin-bottom: 24px;
    padding: 18px 0;
  }

  .season-tracklist {
    grid-template-columns: 1fr;
  }

  .season-track,
  .season-track:nth-child(2n) {
    min-height: 0;
    padding: 16px 0;
    border-right: 0;
  }
}

/* Compact collapsed home state: avoid a bare empty patch when Today is folded. */
#today {
  --collapsed-home-card: 88px;
  --collapsed-home-gap: 14px;
  --collapsed-home-total: 190px;
}

#today .today-grid {
  align-items: start;
}

#today .today-grid:has(.focus-panel.collapsed) {
  align-items: stretch;
}

#today .focus-panel.collapsed {
  position: relative;
  min-height: var(--collapsed-home-total);
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-tint) 38%, transparent), transparent 62%),
    color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--paper-shadow);
}

#today .focus-panel.collapsed::after {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 22px;
  color: var(--muted);
  content: "收起后保留今日入口。展开可查看任务清单，或直接从右侧安排继续推进。";
  font-size: 14px;
  line-height: 1.6;
}

#today .focus-panel.collapsed::before {
  position: absolute;
  right: 24px;
  bottom: 22px;
  width: 120px;
  height: 120px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 50%;
  content: "";
  opacity: 0.7;
}

#today .side-stack .collapsible-panel.collapsed {
  min-height: var(--collapsed-home-card);
  padding-block: 14px;
  display: flex;
  align-items: center;
}

#today .side-stack .collapsible-panel.collapsed .panel-title-row {
  width: 100%;
}

#today .side-stack .collapsible-panel.collapsed .panel-title-row h3 {
  font-size: 21px;
}

#today .side-stack .collapsible-panel.collapsed .panel-collapse-button {
  width: 32px;
  height: 32px;
}

@media (max-width: 980px) {
  #today .focus-panel.collapsed {
    min-height: 140px;
  }

  #today .focus-panel.collapsed::after {
    left: 22px;
    right: 22px;
  }
}

@media (max-width: 640px) {
  #today .focus-panel.collapsed {
    min-height: 126px;
  }

  #today .focus-panel.collapsed::after,
  #today .focus-panel.collapsed::before {
    display: none;
  }
}
