:root {
  color-scheme: light;
  --canvas: #ffffff;
  --canvas-deep: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-raised: #ffffff;
  --ink: #16233b;
  --ink-soft: #3d4d63;
  --muted: #63718a;
  --faint: #96a3b8;
  --line: #e2e7f0;
  --line-strong: #c8d1e0;
  --primary: #2f5b96;
  --primary-dark: #234877;
  --primary-soft: #e4ebf6;
  --accent: #ff6b5e;
  --accent-dark: #e85445;
  --accent-soft: #fdecea;
  --success: #189a6a;
  --success-soft: #e0f3ea;
  --warning: #e0a11c;
  --warning-soft: #fdf3dd;
  --danger: #e5484d;
  --danger-soft: #fde9ea;
  --info: #2f5b96;
  --info-soft: #e4ebf6;
  --blue: #2f5b96;
  --blue-soft: #e4ebf6;
  --amber: #d99420;
  --amber-soft: #fdf3dd;
  --coral: #ff6b5e;
  --coral-soft: #fdecea;
  --sidebar: #ffffff;
  --sidebar-soft: #f7f9fc;
  --sidebar-ink: #16233b;
  --sidebar-muted: #63718a;
  --shadow-sm: 0 1px 3px rgba(22, 35, 59, 0.06);
  --shadow-md: 0 10px 30px rgba(22, 35, 59, 0.10);
  --shadow-lg: 0 20px 50px rgba(22, 35, 59, 0.14);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-width: 236px;
}

body.dark {
  color-scheme: dark;
  --canvas: #0f1728;
  --canvas-deep: #0a0f1d;
  --surface: #182136;
  --surface-soft: #182136;
  --surface-raised: #222d45;
  --ink: #eef2f9;
  --ink-soft: #c3cde0;
  --muted: #8b98b0;
  --faint: #5d6a80;
  --line: #2b3854;
  --line-strong: #3c4c6e;
  --primary: #7a9df0;
  --primary-dark: #9db8f5;
  --primary-soft: #1c2742;
  --accent: #ff7d72;
  --accent-dark: #ff9489;
  --accent-soft: #3a2322;
  --success: #4cc38a;
  --success-soft: #1c3a2e;
  --warning: #f0b842;
  --warning-soft: #3a2f1c;
  --danger: #f0716b;
  --danger-soft: #3a2322;
  --info: #7a9df0;
  --info-soft: #1c2742;
  --blue: #7a9df0;
  --blue-soft: #1c2742;
  --amber: #f0b842;
  --amber-soft: #3a2f1c;
  --coral: #ff7d72;
  --coral-soft: #3a2322;
  --sidebar: #182136;
  --sidebar-soft: #222d45;
  --sidebar-ink: #eef2f9;
  --sidebar-muted: #8b98b0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.35);
}

body.dark .sidebar {
  border-right-color: #2b3854;
  background: linear-gradient(180deg, #182136 0%, #0f1728 100%);
  color: #eef2f9;
}

body.dark .brand {
  border-bottom-color: #2b3854;
}

body.dark .brand p {
  color: #8b98b0;
}

body.dark .nav-label,
body.dark .nav-group-toggle > svg {
  color: #5d6a80;
}

body.dark .nav-item {
  color: #c3cde0;
}

body.dark .nav-item:hover {
  background: #222d45;
  color: #eef2f9;
}

body.dark .nav-item.active {
  border-color: #2b3854;
  background: #1c2742;
  color: #9db8f5;
  box-shadow: inset 3px 0 #7a9df0;
}

body.dark .nav-item.active svg {
  color: #a8bce0;
}

body.dark .local-status {
  border-color: #2b3854;
  background: #182136;
  color: #8b98b0;
}

body.dark .local-status strong {
  color: #eef2f9;
}

body.dark .local-status svg {
  color: #7a9df0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "PingFang SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button,
select,
input[type="range"] {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.48;
}

a {
  color: inherit;
}

svg {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4,
strong {
  letter-spacing: 0;
}

h2 {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid #e0e2e4;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
  color: var(--sidebar-ink);
  scrollbar-width: thin;
}

.resources-quick-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 11px 8px;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2f5b96 0%, #234877 100%);
  color: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 14px rgba(32, 38, 47, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.resources-quick-entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(32, 38, 47, 0.30);
}

.resources-quick-entry:active {
  transform: translateY(0);
}

.resources-entry-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.resources-entry-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.resources-entry-text {
  flex: 1;
  min-width: 0;
}

.resources-entry-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.resources-entry-text small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.2;
}

.resources-entry-arrow {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.resources-quick-entry.active {
  background: linear-gradient(135deg, #234877 0%, #2f5b96 100%);
  box-shadow: 0 4px 14px rgba(32, 38, 47, 0.30), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 83px;
  padding: 18px 17px 15px;
  border-bottom: 1px solid #e0e2e4;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(207, 216, 230, 0.3);
  border-radius: 8px;
  background: linear-gradient(135deg, #e4ebf6, #a8bce0);
  color: #234877;
  font-size: 18px;
  font-weight: 700;
}

.brand p {
  margin-bottom: 2px;
  color: #63718a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand h1 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.nav {
  display: grid;
  gap: 15px;
  padding: 16px 11px 20px;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 9px 3px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.nav-group-toggle .nav-label {
  padding: 0;
}

.nav-group-toggle > svg {
  width: 13px;
  height: 13px;
  color: #63718a;
  transition: transform 180ms ease;
}

.nav-group.is-collapsed {
  gap: 0;
}

.nav-group.is-collapsed .nav-group-toggle > svg {
  transform: rotate(-90deg);
}

.nav-group.is-collapsed > .nav-item {
  display: none;
}

.nav-label {
  padding: 0 9px 4px;
  color: #63718a;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 36px;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #4b5970;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.nav-item svg {
  width: 16px;
  height: 16px;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  background: #f5f7fa;
  color: #16233b;
}

.nav-item.active {
  border-color: #d3def4;
  background: #e4ebf6;
  color: #234877;
  box-shadow: inset 3px 0 #2f5b96;
}

.nav-item.active svg {
  color: #234877;
}

.nav-badge {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.nav-badge[hidden] {
  display: none;
}

.local-status {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: auto 11px 14px;
  padding: 11px;
  border: 1px solid #e0e2e4;
  border-radius: 6px;
  background: #f5f7fa;
  color: #63718a;
}

.local-status svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #2f5b96;
}

.local-status strong,
.local-status small {
  display: block;
}

.local-status strong {
  color: #16233b;
  font-size: 11px;
  font-weight: 600;
}

.local-status small {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(300px, 600px) minmax(220px, 0.7fr);
  align-items: center;
  min-height: 72px;
  gap: 18px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(18px);
}

.topbar-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.topbar-title > div {
  min-width: 0;
}

.topbar-title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow,
.section-label,
.panel-kicker {
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 1px;
}

.global-search-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 39px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.global-search-wrap > svg {
  color: var(--faint);
}

.global-search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: text;
}

.global-search-wrap kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
}

.search-results {
  position: absolute;
  inset: calc(100% + 7px) 0 auto;
  z-index: 80;
  max-height: min(520px, 70vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 18px 45px rgba(20, 31, 25, 0.18);
}

.search-results > button {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  width: 100%;
  gap: 2px 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}

.search-results > button:hover {
  background: var(--surface-soft);
}

.search-results > button span {
  grid-row: 1 / 3;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.search-results > button strong,
.search-results > button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results > button small {
  color: var(--muted);
  font-size: 11px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.date-text {
  margin-right: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--primary);
}

.icon-button.subtle {
  width: 29px;
  height: 29px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.icon-button.subtle:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.mobile-menu {
  display: none;
}

.main {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 25px 28px 60px;
}

.view {
  display: none;
  animation: view-in 180ms ease-out;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
  background: var(--surface);
}

input:not([type="range"]):not([type="checkbox"]),
select {
  min-height: 39px;
  padding: 8px 10px;
}

textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--primary) 72%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

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

.primary-button,
.secondary-button,
.danger-button,
.wide-button,
.text-button,
.file-button,
.timer-controls button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--primary-dark);
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

body.dark .primary-button {
  border-color: var(--primary);
  background: #7a9df0;
  color: #fff;
}

.primary-button.compact {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.secondary-button,
.wide-button,
.timer-controls button:not(.primary-button) {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.secondary-button:hover,
.wide-button:hover,
.timer-controls button:not(.primary-button):hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.danger-button {
  border: 1px solid color-mix(in srgb, var(--coral) 48%, var(--line));
  background: var(--surface);
  color: var(--coral);
}

.danger-button:hover {
  background: var(--coral-soft);
}

.text-button {
  min-height: 30px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
}

.text-button svg {
  width: 14px;
  height: 14px;
}

.text-button:hover {
  color: var(--primary-dark);
}

.file-button input {
  display: none;
}

.panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.panel-elevated {
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--line));
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface) 0%, var(--primary-soft) 100%);
  box-shadow: var(--shadow-md);
}

.panel-elevated .panel-kicker {
  color: var(--primary-dark);
}

.panel-subtle {
  padding: 15px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: none;
}

.panel-subtle .panel-heading {
  margin-bottom: 10px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading > div {
  min-width: 0;
}

.panel-kicker {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.panel-heading > span,
.muted-note {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.55fr);
  align-items: stretch;
  min-height: 276px;
  gap: 32px;
  margin-bottom: 13px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--primary-soft) 68%, var(--surface)) 100%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.dashboard-intro::after {
  position: absolute;
  right: -70px;
  bottom: -105px;
  width: 300px;
  height: 300px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-copy,
.hero-side {
  position: relative;
  z-index: 1;
}

.dashboard-intro .section-label {
  margin-bottom: 5px;
}

.hero-copy h1 {
  max-width: 620px;
  margin: 4px 0 9px;
  color: var(--ink);
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
}

.hero-copy h1 em {
  color: var(--primary);
  font-style: normal;
}

.hero-description {
  max-width: 560px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}

.hero-focus-field {
  display: block;
  max-width: 650px;
}

.hero-focus-field > span {
  display: block;
  margin-bottom: 3px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.focus-input {
  display: block;
  width: 100%;
  min-height: auto !important;
  padding: 0 0 6px !important;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  color: var(--ink);
  cursor: text;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
}

.focus-input:focus {
  border-bottom-color: var(--line-strong);
}

.weekly-intent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  max-width: 760px;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
}

.weekly-intent span {
  font-size: 11px;
  font-weight: 700;
}

.weekly-intent input {
  min-height: 28px !important;
  padding: 3px 0 !important;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  cursor: text;
}

.hero-side {
  display: grid;
  align-content: end;
  gap: 10px;
}

.phase-card {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
  border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(8px);
}

.phase-card span,
.phase-card small,
.phase-card strong {
  display: block;
}

.phase-card span,
.phase-card small {
  color: var(--muted);
  font-size: 11px;
}

.phase-card strong {
  margin: 2px 0 5px;
  font-size: 20px;
}

.hero-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 12px;
  padding: 15px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  text-align: left;
}

.hero-progress:hover {
  background: var(--primary-dark);
}

.hero-progress > span,
.hero-progress > em {
  color: color-mix(in srgb, #fff 78%, var(--primary));
  font-size: 11px;
  font-style: normal;
}

.hero-progress > strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 30px;
  line-height: 1;
}

.hero-progress > strong small {
  font-size: 11px;
  font-weight: 600;
}

.hero-progress > em {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-progress svg {
  width: 13px;
  height: 13px;
}

.capture-bar {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 92px 40px auto;
  align-items: center;
  min-height: 52px;
  gap: 8px;
  margin-bottom: 13px;
  padding: 6px 7px 6px 13px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.capture-bar > svg {
  color: var(--primary);
}

.capture-bar input {
  min-height: 36px !important;
  padding-left: 2px !important;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: text;
}

.capture-bar select {
  min-height: 36px;
  border-color: var(--line);
  background: var(--surface-soft);
}

.capture-bar button[type="submit"] {
  min-height: 36px;
  padding: 7px 16px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  min-width: 56px;
}

.capture-bar #templateBtn {
  width: 40px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
}

.capture-bar.standalone {
  max-width: 100%;
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.summary-item {
  display: grid;
  min-width: 0;
  min-height: 80px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 0 8px;
  padding: 12px 15px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item:hover {
  background: var(--surface-soft);
}

.summary-item span,
.summary-item small {
  color: var(--muted);
  font-size: 11px;
}

.summary-item strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--ink);
  font-size: 29px;
  font-weight: 600;
}

.summary-item:first-child strong {
  color: var(--coral);
}

.summary-item:nth-child(2) strong {
  color: var(--blue);
}

.summary-item:nth-child(3) strong {
  color: var(--primary);
}

.summary-item:nth-child(4) strong {
  color: var(--amber);
}

.onboarding-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
  margin-bottom: 13px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--amber) 42%, var(--line));
  border-radius: var(--radius);
  background: linear-gradient(110deg, var(--amber-soft), var(--surface));
  box-shadow: var(--shadow-sm);
}

.onboarding-card[hidden] {
  display: none;
}

.onboarding-mark {
  display: grid;
  min-height: 118px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 7px;
  background: var(--amber);
  color: #fff;
}

.onboarding-mark span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.onboarding-mark svg {
  width: 28px;
  height: 28px;
}

.onboarding-copy h3 {
  margin: 2px 0 4px;
  font-size: 19px;
}

.onboarding-copy > p:not(.panel-kicker) {
  max-width: 700px;
  color: var(--muted);
  font-size: 12px;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.onboarding-steps button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--amber) 36%, var(--line));
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  text-align: left;
}

.onboarding-steps button:hover {
  border-color: var(--amber);
  background: var(--surface);
}

.onboarding-steps b {
  color: var(--amber);
  font-size: 10px;
}

.onboarding-steps span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboarding-steps svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.72fr);
  align-items: start;
  gap: 13px;
}

.dashboard-main-column,
.dashboard-rail {
  display: grid;
  min-width: 0;
  gap: 13px;
}

.deadline-list,
.task-list,
.agenda-list,
.next-list,
.rhythm-list,
.record-list,
.direction-list,
.week-list,
.timeline-list,
.activity-list,
.inbox-list {
  display: grid;
  gap: 7px;
}

.deadline-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto 18px;
  align-items: center;
  width: 100%;
  min-height: 59px;
  gap: 12px;
  padding: 7px 9px 7px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
  text-align: left;
}

.deadline-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.deadline-row.soon {
  border-left-color: var(--amber);
}

.deadline-row.urgent,
.deadline-row.overdue {
  border-left-color: var(--coral);
}

.deadline-date b,
.deadline-date small,
.deadline-copy strong,
.deadline-copy small {
  display: block;
}

.deadline-date b {
  font-size: 12px;
}

.deadline-date small,
.deadline-copy small {
  color: var(--muted);
  font-size: 10px;
}

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

.deadline-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.deadline-row.urgent em,
.deadline-row.overdue em {
  color: var(--coral);
  font-weight: 700;
}

.deadline-row.soon em {
  color: var(--amber);
}

.deadline-row > svg {
  width: 15px;
  color: var(--faint);
}

.task-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px 34px;
  align-items: center;
  min-height: 46px;
  gap: 9px;
  padding: 6px 7px 6px 9px;
  border-bottom: 1px solid var(--line);
}

.task-item:last-child {
  border-bottom: 0;
}

.task-item > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.task-item > div strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.task-item.done > div strong {
  color: var(--muted);
  text-decoration: line-through;
}

.check-control {
  position: relative;
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.check-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-control > span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}

.check-control input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
}

.check-control input:checked + span::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.priority-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 9px;
  font-weight: 700;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px auto;
  gap: 7px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.agenda-row {
  display: grid;
  grid-template-columns: 44px 2px minmax(0, 1fr);
  align-items: stretch;
  min-height: 47px;
  gap: 10px;
}

.agenda-row time {
  padding-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.agenda-line {
  position: relative;
  width: 2px;
  height: 100%;
  background: var(--line);
}

.agenda-line::before {
  position: absolute;
  top: 5px;
  left: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  content: "";
}

.agenda-row strong,
.agenda-row small {
  display: block;
}

.agenda-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.next-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  text-align: left;
}

.next-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.next-row span {
  grid-row: 1 / 3;
  align-self: start;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 700;
}

.next-row strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.next-row small {
  color: var(--muted);
  font-size: 10px;
}

.rhythm-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.rhythm-row > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.category-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.category-dot.研究 { background: var(--primary); }
.category-dot.项目 { background: var(--amber); }
.category-dot.生活 { background: var(--coral); }

.rhythm-row > div {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--canvas-deep);
}

.rhythm-row > div b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.rhythm-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.wellbeing-panel textarea {
  width: 100%;
  min-height: 58px;
  margin-top: 10px;
  background: var(--surface-soft);
}

.range-field {
  display: grid;
  gap: 6px;
}

.range-field span {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.range-field b {
  color: var(--primary);
}

input[type="range"] {
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 2px;
  accent-color: var(--primary);
  background: var(--canvas-deep);
}

.compact-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px auto;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
}

.compact-field input {
  min-height: 32px !important;
  padding: 5px 7px !important;
}

.compact-field em {
  color: var(--muted);
  font-style: normal;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.quick-links a,
.quick-links button {
  display: grid;
  min-width: 0;
  min-height: 64px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 7px 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  text-align: center;
  text-decoration: none;
}

.quick-links a:hover,
.quick-links button:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  color: var(--primary);
}

.quick-links span {
  max-width: 100%;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 112px;
  place-items: center;
  align-content: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  color: var(--faint);
}

.empty-state strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.empty-state p {
  max-width: 360px;
  margin-top: 2px;
  font-size: 10px;
}

.page-lead,
.resource-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 92px;
  gap: 24px;
  margin-bottom: 16px;
  padding: 3px 2px 16px;
  border-bottom: 1px solid var(--line-strong);
}

.page-lead h3,
.resource-header h3 {
  font-size: 23px;
  font-weight: 700;
}

.page-lead p,
.resource-header p:not(.section-label) {
  max-width: 760px;
  margin-top: 5px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.segmented button.active {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-weight: 700;
}

.inbox-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
  gap: 12px;
  padding: 8px 8px 8px 10px;
  border-bottom: 1px solid var(--line);
}

.inbox-row:last-child {
  border-bottom: 0;
}

.inbox-row.processed {
  opacity: 0.6;
}

.type-mark {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.type-任务 { background: var(--blue-soft); color: var(--blue); }
.type-文献 { background: var(--primary-soft); color: var(--primary-dark); }
.type-想法 { background: var(--amber-soft); color: var(--amber); }
.type-沟通 { background: var(--coral-soft); color: var(--coral); }

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

.inbox-copy strong,
.inbox-copy small {
  display: block;
}

.inbox-copy strong {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.inbox-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.inbox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.process-select {
  min-height: 32px;
  max-width: 105px;
  padding: 5px 7px;
  font-size: 11px;
}

.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.week-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-switcher strong {
  min-width: 155px;
  text-align: center;
}

.schedule-compose {
  margin-bottom: 13px;
  padding: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.form-grid textarea {
  grid-column: 1 / -2;
}

.form-grid button {
  align-self: end;
}

.schedule-form {
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(110px, 0.7fr)) auto;
  margin: 0;
}

.schedule-mobile-mode-switch,
.schedule-day-view {
  display: none;
}

.schedule-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}

.schedule-day-strip button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 62px;
  place-items: center;
  gap: 1px;
  padding: 6px 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
}

.schedule-day-strip button span {
  font-size: 10px;
}

.schedule-day-strip button strong {
  color: var(--ink);
  font-size: 17px;
}

.schedule-day-strip button small {
  position: absolute;
  top: 4px;
  right: 5px;
  color: var(--primary-dark);
  font-size: 9px;
}

.schedule-day-strip button.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.schedule-day-panel {
  padding: 14px;
}

.schedule-day-agenda {
  display: grid;
  gap: 8px;
}

.schedule-day-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 18px;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface-soft);
  text-align: left;
}

.schedule-day-item time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.schedule-day-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-day-item strong,
.schedule-day-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-day-item small {
  color: var(--muted);
  font-size: 11px;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  min-width: 930px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

#schedule {
  overflow-x: auto;
  padding-bottom: 5px;
}

.day-column {
  min-height: 480px;
  border-right: 1px solid var(--line);
}

.day-column:last-child {
  border-right: 0;
}

.day-column > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.day-column > header strong {
  font-size: 22px;
  font-weight: 500;
}

.day-column.today > header {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.day-blocks {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 420px;
  padding: 7px;
}

.day-empty,
.kanban-empty {
  display: block;
  padding: 16px 4px;
  color: var(--faint);
  font-size: 10px;
  text-align: center;
}

.schedule-block {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
  padding: 8px 68px 8px 8px !important;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  background: var(--blue-soft);
  grid-template-columns: none !important;
  gap: 0 !important;
  align-items: stretch !important;
}

.schedule-block.category-研究 { border-left-color: var(--primary); background: var(--primary-soft); }
.schedule-block.category-项目 { border-left-color: var(--amber); background: var(--amber-soft); }
.schedule-block.category-生活 { border-left-color: var(--coral); background: var(--coral-soft); }

.schedule-block time {
  display: block !important;
  width: 100%;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  margin-bottom: 2px;
}

.schedule-block strong {
  display: block !important;
  width: 100%;
  margin: 2px 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
}

.schedule-block small {
  display: block !important;
  width: 100%;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  margin-top: 2px;
}

.schedule-block button {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
}

.schedule-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 0;
  align-items: center;
}

.schedule-actions button {
  position: static;
}

.schedule-block button svg {
  width: 12px;
  height: 12px;
}

.grid {
  display: grid;
  align-items: start;
  gap: 13px;
  margin-bottom: 13px;
}

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

.grid.two-thirds {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.82fr);
}

.stacked-form {
  grid-template-columns: 1fr 1fr;
}

.stacked-form textarea {
  grid-column: 1 / -1;
}

.stacked-form button {
  grid-column: -2 / -1;
}

.record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.record-card > div {
  min-width: 0;
}

.record-card strong,
.record-card small,
.record-card p {
  display: block;
}

.record-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.record-card p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.record-card a {
  color: var(--primary-dark);
  text-decoration: none;
}

.record-card a:hover {
  text-decoration: underline;
}

.record-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.record-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-status-select {
  flex: 0 0 auto;
  width: auto;
  max-width: 104px;
  min-height: 27px;
  padding: 3px 22px 3px 7px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: 48%;
  min-height: 21px;
  align-items: center;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.assignment-form {
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) repeat(3, minmax(120px, 0.7fr)) auto;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-column {
  min-height: 420px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.kanban-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 35px;
  padding: 2px 3px 8px;
}

.kanban-column h4 {
  font-size: 12px;
}

.kanban-column > header span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 10px;
  background: var(--canvas-deep);
  color: var(--muted);
  font-size: 10px;
}

.kanban-stack {
  display: grid;
  gap: 7px;
}

.kanban-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kanban-card.overdue {
  border-color: color-mix(in srgb, var(--coral) 45%, var(--line));
}

.kanban-meta,
.kanban-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kanban-meta > span {
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
}

.kanban-meta .priority-重要 { background: var(--amber-soft); color: var(--amber); }
.kanban-meta .priority-紧急 { background: var(--coral-soft); color: var(--coral); }

.kanban-card > strong,
.kanban-card > small {
  display: block;
}

.kanban-card > strong {
  margin: 7px 0 2px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.kanban-card > small,
.kanban-due {
  color: var(--muted);
  font-size: 9px;
}

.kanban-due {
  justify-content: flex-start;
  margin: 9px 0 7px;
}

.kanban-due svg {
  width: 12px;
  height: 12px;
}

.kanban-card > select {
  width: 100%;
  min-height: 31px;
  padding: 5px 7px;
  font-size: 10px;
}

/* 旧版计时器样式已被新版 timer-ring 布局替代，保留以防其他地方引用
.timer-display {
  display: grid;
  min-height: 178px;
  place-items: center;
  margin: 5px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--primary-dark);
  font-family: "PingFang SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 62px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
*/

.timer-controls,
.timer-settings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.timer-settings {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 10px;
}

.timer-settings label {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.timer-settings input {
  min-height: 34px !important;
  padding: 5px 7px !important;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 6px;
  margin: 8px 0 14px;
}

.calendar-day {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
}

.calendar-day.checked {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
}

.calendar-day.today {
  border-color: var(--amber);
}

.wide-button {
  width: 100%;
}

.date-picker-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.date-picker-label input {
  min-height: 32px !important;
  padding: 5px 7px !important;
}

.large-textarea {
  width: 100%;
  min-height: 360px;
  border-color: var(--line);
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.8;
}

.save-status {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.activity-row {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
}

.activity-row > span svg {
  width: 14px;
  height: 14px;
}

.activity-row strong,
.activity-row small {
  display: block;
}

.activity-row strong { font-size: 11px; }
.activity-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.compact-search {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: center;
  min-width: 190px;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.compact-search svg {
  width: 14px;
  color: var(--faint);
}

.compact-search input {
  min-height: 32px !important;
  padding: 5px 0 !important;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: text;
}

.literature-form {
  grid-template-columns: minmax(210px, 1.6fr) repeat(4, minmax(100px, 0.65fr));
}

.literature-card select {
  min-height: 30px;
  margin-top: 8px;
  padding: 4px 7px;
  font-size: 10px;
}

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

.link-grid.single {
  grid-template-columns: 1fr;
}

.link-grid a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.link-grid a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.link-grid a svg {
  width: 13px;
  height: 13px;
  color: var(--faint);
}

.link-grid a:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.direction-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(120px, 1fr) 30px;
  align-items: center;
  gap: 12px;
  min-height: 51px;
  padding: 7px 3px;
  border-bottom: 1px solid var(--line);
}

.direction-row:last-child {
  border-bottom: 0;
}

.direction-row span strong,
.direction-row span small {
  display: block;
}

.direction-row span strong {
  font-size: 11px;
}

.direction-row span small,
.direction-row > b {
  color: var(--muted);
  font-size: 9px;
}

.advisor-form {
  grid-template-columns: 140px minmax(180px, 1fr) minmax(240px, 1.4fr) minmax(180px, 1fr) 120px auto;
}

.advisor-form textarea {
  grid-column: auto;
  min-height: 39px;
  max-height: 90px;
}

.next-note {
  color: var(--primary-dark) !important;
  font-weight: 600;
}

.thesis-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.75fr);
  gap: 16px 28px;
  margin-bottom: 13px;
  padding: 23px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.thesis-copy .section-label {
  margin-bottom: 6px;
}

.thesis-title-input,
.thesis-section-input {
  display: block;
  width: 100%;
  min-height: auto !important;
  padding: 3px 0 !important;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  cursor: text;
}

.thesis-title-input {
  font-size: 25px;
  font-weight: 600;
}

.thesis-section-input {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.thesis-title-input:focus,
.thesis-section-input:focus {
  border-bottom-color: var(--line-strong);
}

.thesis-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.thesis-stats label span,
.thesis-progress label {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.thesis-stats input {
  width: 100%;
  margin-top: 4px;
}

.thesis-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(280px, 1.2fr);
  gap: 7px 22px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.thesis-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.thesis-progress > div:nth-child(2) {
  grid-column: 1;
}

.thesis-progress label {
  grid-column: 2;
  grid-row: 1 / 3;
}

.thesis-progress label input {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 39px;
  gap: 6px;
}

.input-action-row .icon-button {
  width: 39px;
  height: 39px;
}

.progress-wrap {
  height: 7px;
  overflow: hidden;
  margin: 7px 0 13px;
  border-radius: 3px;
  background: var(--canvas-deep);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.week-row {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.week-row:last-child {
  border-bottom: 0;
}

.week-row strong,
.week-row small,
.week-row p {
  display: block;
}

.week-row strong { font-size: 11px; }
.week-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.week-row p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.week-row.done { opacity: 0.64; }

.project-form {
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(240px, 1.4fr) 140px 120px auto;
}

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

.project-grid > .empty-state {
  grid-column: 1 / -1;
}

.project-card {
  min-width: 0;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 6px;
  background: var(--surface-soft);
}

.project-top,
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-top > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.project-card h3 {
  min-height: 43px;
  margin: 9px 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.project-next {
  min-height: 59px;
  padding: 8px;
  border-left: 2px solid var(--primary);
  background: var(--surface);
}

.project-next small,
.project-next strong {
  display: block;
}

.project-next small { color: var(--muted); font-size: 9px; }
.project-next strong { margin-top: 2px; overflow-wrap: anywhere; font-size: 11px; }

.project-footer {
  margin-top: 10px;
}

.project-footer select {
  width: 105px;
  min-height: 31px;
  padding: 5px 7px;
  font-size: 10px;
}

.project-footer span {
  color: var(--muted);
  font-size: 9px;
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: 9px 5px 14px;
}

.timeline-row::before {
  position: absolute;
  top: 39px;
  bottom: -1px;
  left: 23px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-row:last-child::before {
  display: none;
}

.timeline-index {
  display: grid;
  z-index: 1;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.timeline-row.current .timeline-index {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.timeline-row strong,
.timeline-row small,
.timeline-row span {
  display: block;
}

.timeline-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.timeline-row span {
  width: max-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 9px;
}

.archive-panel {
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.archive-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.archive-panel summary::-webkit-details-marker {
  display: none;
}

.archive-panel summary span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.archive-panel summary small {
  color: var(--muted);
}

.archive-panel[open] summary {
  margin-bottom: 12px;
}

.review-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.review-snapshot article {
  display: grid;
  min-height: 92px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.review-snapshot article:last-child {
  border-right: 0;
}

.review-snapshot span,
.review-snapshot small {
  color: var(--muted);
  font-size: 10px;
}

.review-snapshot strong {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 29px;
  font-weight: 500;
}

.review-form {
  display: grid;
  gap: 11px;
}

.review-form > input {
  max-width: 180px;
}

.review-form label {
  display: grid;
  gap: 5px;
}

.review-form label span {
  font-size: 11px;
  font-weight: 600;
}

.review-form textarea {
  min-height: 112px;
  background: var(--surface-soft);
}

.review-form button {
  justify-self: end;
}

.resource-header {
  align-items: center;
}

.resource-header .section-label {
  margin-bottom: 4px;
}

.resource-inline-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.75fr) minmax(220px, 1.2fr) auto;
  flex: 0 1 620px;
  gap: 7px;
}

.resource-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.resource-group-filters {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 10px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.resource-group-filters button {
  min-height: 34px;
  white-space: nowrap;
}

.resource-recent-strip[hidden] {
  display: none;
}

.resource-access {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  vertical-align: middle;
}

.resource-access.is-warning {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.resource-access.is-campus {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.resource-access.is-global {
  color: var(--muted);
  background: var(--surface-strong);
}

.resource-search {
  width: min(340px, 100%);
  background: var(--surface);
}

.segmented.scrollable {
  max-width: calc(100% - 360px);
  overflow-x: auto;
}

.resource-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 13px;
  margin-bottom: 13px;
}

.resource-sections > .empty-state {
  grid-column: 1 / -1;
}

.resource-section {
  box-shadow: none;
}

.resource-section .panel-heading h3 {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

/* Expanded graduate workspace */
.record-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.record-form > button {
  grid-column: 2;
  justify-self: end;
}

.analysis-form {
  grid-template-columns: minmax(140px, 0.7fr) minmax(150px, 0.8fr) minmax(260px, 1.5fr) minmax(160px, 0.9fr) auto;
  margin-bottom: 14px;
}

.analysis-form textarea {
  min-height: 39px;
  height: 39px;
  padding-block: 8px;
}

.managed-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.managed-card .managed-status {
  width: auto;
  min-height: 30px;
  margin-top: 8px;
  padding: 4px 28px 4px 8px;
  font-size: 10px;
}

.record-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
}

.record-card > .record-actions {
  align-self: start;
}

.ticktick-action:hover {
  border-color: #e5484d;
  background: #fde9ea;
  color: #cf3d43;
}

.requirement-form,
.habit-form {
  grid-template-columns: minmax(0, 1fr) 160px auto;
  margin-bottom: 14px;
}

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

.requirement-item,
.habit-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px 34px;
  align-items: center;
  min-height: 56px;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.requirement-item > div,
.habit-row > div {
  min-width: 0;
}

.requirement-item strong,
.requirement-item small,
.habit-row strong,
.habit-row small {
  display: block;
}

.requirement-item strong,
.habit-row strong {
  font-size: 12px;
}

.requirement-item small,
.habit-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.requirement-item.done,
.habit-row.done {
  background: var(--primary-soft);
  opacity: 0.72;
}

.requirement-item.done strong,
.habit-row.done strong {
  text-decoration: line-through;
}

.health-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 15px;
}

.health-form textarea {
  grid-column: span 2;
  min-height: 70px;
}

.health-form button {
  align-self: end;
}

.form-labelled {
  display: grid;
  gap: 3px;
}

.form-labelled > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.habit-list {
  display: grid;
  gap: 7px;
}

.habit-row {
  grid-template-columns: 24px minmax(0, 1fr) 34px;
}

.health-row {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.favorite-strip {
  display: flex;
  min-height: 47px;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  padding: 8px 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.favorite-strip > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 5px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
}

.favorite-strip > span svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.favorite-strip a {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.favorite-strip a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.favorite-strip small {
  color: var(--muted);
  font-size: 10px;
}

.resource-link-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.resource-link-row > a {
  min-height: 40px;
  border: 0;
  background: transparent;
}

.resource-link-row > a:hover {
  border: 0;
}

.resource-star {
  display: grid;
  width: 31px;
  min-height: 100%;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 4px 4px 0;
  background: transparent;
  color: var(--faint);
}

.resource-star svg {
  width: 13px;
  height: 13px;
}

.resource-star:hover,
.resource-star.active {
  background: var(--amber-soft);
  color: var(--amber);
}

.resource-star.active svg {
  fill: currentColor;
}

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

.resource-section {
  padding: 15px;
}

.resource-section .panel-heading {
  min-height: 44px;
}

.resource-section .link-grid {
  grid-template-columns: 1fr;
}

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

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

.settings-form label {
  display: grid;
  gap: 5px;
}

.settings-form label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.settings-form button {
  grid-column: 2;
  justify-self: end;
}

.local-data-panel > .panel-heading > svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.local-data-panel > p {
  color: var(--muted);
  line-height: 1.7;
}

.data-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 17px;
  border-top: 1px solid var(--line);
}

.data-stats div {
  padding: 12px 8px 0 0;
}

.data-stats dt {
  color: var(--muted);
  font-size: 9px;
}

.data-stats dd {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-stack-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.recovery-panel {
  border-color: color-mix(in srgb, var(--amber) 38%, var(--line));
  background: color-mix(in srgb, var(--amber-soft) 45%, var(--surface));
}

.recovery-panel .panel-heading > svg {
  color: var(--amber);
}

.dashboard-controlbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-mode-hint {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-controlbar .secondary-button {
  min-height: 36px;
}

.dashboard-mode-switch {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.dashboard-mode-switch button {
  min-width: 58px;
  min-height: 30px;
  padding: 5px 12px;
}

.dashboard-customize-panel {
  display: grid;
  grid-template-columns: minmax(170px, .6fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-customize-panel[hidden] {
  display: none;
}

.dashboard-customize-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.dashboard-customize-panel small {
  color: var(--muted);
}

.dashboard-widget-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-widget-options label {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 12px;
}

.dashboard-widget-options input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.dashboard-widget-hidden {
  display: none !important;
}

.dashboard-mode-daily .habit-row {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-mode-daily .top-three-panel {
  min-height: auto;
}

.semester-setup-progress {
  height: 5px;
  overflow: hidden;
  margin: 12px 0 14px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}

.semester-setup-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .25s ease;
}

.semester-setup-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.semester-setup-steps button.is-complete {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #16233b;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-action {
  margin-left: 12px;
  padding: 4px 10px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
}

.toast-action:hover {
  background: rgba(255, 255, 255, 0.3);
}

.trash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.trash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.trash-item-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
}

.trash-item-icon svg {
  width: 16px;
  height: 16px;
}

.trash-item-info {
  flex: 1;
  min-width: 0;
}

.trash-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-item-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.trash-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.trash-empty {
  padding: 24px;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}

.task-relations {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.relation-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.relation-tag svg {
  width: 10px;
  height: 10px;
}

.relation-course {
  background: var(--info-soft);
  color: var(--info);
}

.relation-project {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.relation-topic {
  background: var(--success-soft);
  color: var(--success);
}

.kanban-card.dragging {
  opacity: 0.4;
  transform: rotate(2deg);
}

.kanban-stack.drag-over {
  background: var(--primary-soft);
  border: 2px dashed var(--primary);
  border-radius: 8px;
  min-height: 80px;
}

.kanban-stack.drag-over .kanban-empty {
  color: var(--primary);
  font-weight: 600;
}

.diff-up {
  color: var(--success);
  font-weight: 600;
}

.diff-down {
  color: var(--danger);
  font-weight: 600;
}

.diff-neutral {
  color: var(--muted);
}

.review-extras {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.mood-tag {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.achievement {
  color: var(--accent-dark);
  font-style: italic;
  padding: 6px 10px;
  background: var(--accent-soft);
  border-radius: 6px;
  margin: 6px 0;
}

.shortcuts-card {
  max-width: 640px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.shortcut-group h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.shortcut-row span {
  margin-left: 4px;
}

.shortcut-row kbd {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
}

.search-highlight {
  background: var(--warning-soft);
  color: var(--warning);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

.search-show-all {
  width: 100%;
  padding: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
}

.search-show-all:hover {
  background: var(--primary-soft);
}

.search-history {
  padding: 8px;
}

.search-history-title {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-history-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.search-history-item:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.search-clear-history {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  cursor: pointer;
}

.search-clear-history:hover {
  color: var(--danger);
}

.batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--primary-soft);
}

.batch-bar.hidden {
  display: none;
}

.batch-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-bar-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
}

.batch-bar-actions {
  display: flex;
  gap: 8px;
}

.batch-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.record-card.batch-mode {
  padding-left: 12px;
}

.record-card.batch-mode .batch-checkbox {
  flex-shrink: 0;
}

.batch-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}

.batch-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.batch-toggle-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.import-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: all 150ms ease;
}

.import-card:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.import-card input[type="file"] {
  display: none;
}

.import-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}

.import-icon svg {
  width: 18px;
  height: 18px;
}

.import-card strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.import-card small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.import-preview {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.import-preview h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.import-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}

.import-preview th, .import-preview td {
  padding: 6px 8px;
  border: 1px solid var(--line);
  text-align: left;
}

.import-preview th {
  background: var(--surface);
  font-weight: 600;
}

.import-preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.record-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.record-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}

.record-tag:hover {
  background: var(--primary);
  color: #fff;
}

.tag-manager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-manager-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 12px;
}

.tag-manager-count {
  color: var(--muted);
  font-size: 11px;
}

.tag-manager-remove {
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.tag-manager-remove:hover {
  color: var(--danger);
}

.sidebar-toggle {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar-toggle {
    display: grid;
  }
}

.app-shell.sidebar-collapsed .sidebar {
  width: 64px;
  min-width: 64px;
}

.app-shell.sidebar-collapsed .sidebar .brand > div,
.app-shell.sidebar-collapsed .sidebar .resources-entry-text,
.app-shell.sidebar-collapsed .sidebar .resources-entry-arrow,
.app-shell.sidebar-collapsed .sidebar .nav-label,
.app-shell.sidebar-collapsed .sidebar .nav-item span,
.app-shell.sidebar-collapsed .sidebar .nav-badge,
.app-shell.sidebar-collapsed .sidebar .nav-group-toggle i,
.app-shell.sidebar-collapsed .sidebar .cloud-sidebar-status > div {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar .brand {
  justify-content: center;
  padding: 16px 0;
}

.app-shell.sidebar-collapsed .sidebar .resources-quick-entry {
  justify-content: center;
  padding: 12px;
}

.app-shell.sidebar-collapsed .sidebar .resources-entry-icon {
  margin: 0;
}

.app-shell.sidebar-collapsed .sidebar .nav-item {
  justify-content: center;
  padding: 10px;
}

.app-shell.sidebar-collapsed .sidebar .nav-group-toggle {
  justify-content: center;
  padding: 8px;
}

.app-shell.sidebar-collapsed .sidebar .cloud-sidebar-status {
  justify-content: center;
  padding: 12px 8px;
}

.app-shell.sidebar-collapsed .workspace {
  margin-left: 64px;
}

.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 200ms ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(32, 38, 47, 0.18);
}

.scroll-top-btn svg {
  width: 20px;
  height: 20px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.record-card {
  transition: all 180ms ease;
}

.record-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(32, 38, 47, 0.08);
  transform: translateY(-1px);
}

.primary-button,
.secondary-button,
.danger-button {
  transition: all 150ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(32, 38, 47, 0.16);
}

.secondary-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-button {
  transition: all 150ms ease;
}

.icon-button:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: scale(1.05);
}

.nav-item {
  transition: all 150ms ease;
}

.nav-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
  padding-left: 18px;
}

.course-schedule-grid {
  display: grid;
  grid-template-columns: 50px repeat(7, 1fr);
  gap: 2px;
  margin-top: 12px;
  overflow-x: auto;
}

.schedule-header-cell {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-radius: 4px;
}

.schedule-header-cell.today {
  background: var(--primary);
  color: #fff;
}

.schedule-period-label {
  display: grid;
  place-items: center;
  padding: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 4px;
  min-height: 48px;
}

.schedule-cell {
  min-height: 48px;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--line);
  position: relative;
}

.schedule-course {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  overflow: hidden;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}

.schedule-course:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.schedule-course strong {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.schedule-course small {
  font-size: 10px;
  opacity: 0.85;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-course.color-blue { background: linear-gradient(135deg, #2f5b96, #234877); color: #fff; }
.schedule-course.color-green { background: linear-gradient(135deg, #189a6a, #14795a); color: #fff; }
.schedule-course.color-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; }
.schedule-course.color-orange { background: linear-gradient(135deg, #e0a11c, #c9881a); color: #fff; }
.schedule-course.color-pink { background: linear-gradient(135deg, #ec4899, #db2777); color: #fff; }
.schedule-course.color-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #fff; }
.schedule-course.color-red { background: linear-gradient(135deg, #e5484d, #d43a40); color: #fff; }
.schedule-course.color-gray { background: linear-gradient(135deg, #63718a, #4b5970); color: #fff; }

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

.check-in-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: all 200ms ease;
  min-width: 100px;
}

.check-in-btn:hover {
  border-color: var(--warning);
  background: var(--warning-soft);
  transform: translateY(-1px);
}

.check-in-btn.checked {
  border-color: var(--warning);
  background: linear-gradient(135deg, #ff6b5e, #e85445);
  color: #fff;
}

.check-in-btn.checked small {
  color: rgba(255,255,255,0.85);
}

.check-in-btn i {
  width: 20px;
  height: 20px;
}

.check-in-btn span {
  font-size: 12px;
  font-weight: 600;
}

.check-in-btn small {
  font-size: 10px;
  color: var(--muted);
}

.habit-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 13px;
  margin-bottom: 13px;
}

@media (max-width: 1024px) {
  .habit-row {
    grid-template-columns: 1fr;
  }
}

.top-three-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.top-three-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  transition: all 150ms ease;
}

.top-three-item:hover {
  background: var(--primary-soft);
}

.top-three-item.done {
  opacity: 0.5;
}

.top-three-item.done strong {
  text-decoration: line-through;
}

.top-three-rank {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.top-three-item:nth-child(2) .top-three-rank { background: var(--warning); }
.top-three-item:nth-child(3) .top-three-rank { background: var(--coral); }

.top-three-item strong {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.top-three-item .delete-action {
  opacity: 0;
  transition: opacity 150ms ease;
}

.top-three-item:hover .delete-action {
  opacity: 1;
}

.completion-ring-wrap {
  display: grid;
  place-items: center;
  padding: 10px;
}

.completion-ring {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--surface-soft);
  stroke-width: 8;
}

.ring-fg {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 600ms ease;
}

.completion-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.completion-center strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.completion-center small {
  font-size: 11px;
  color: var(--muted);
}

.daily-quote {
  margin: 0;
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  font-style: italic;
  border-left: 3px solid var(--primary);
  background: var(--surface-soft);
  border-radius: 0 8px 8px 0;
}

.daily-quote footer {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  font-style: normal;
}

.timer-mode-tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--surface-soft);
  border-radius: 6px;
}

.timer-mode-tab {
  padding: 4px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}

.timer-mode-tab.active {
  background: var(--primary);
  color: #fff;
}

.timer-visual {
  position: relative;
  display: grid;
  place-items: center;
  margin: 20px 0 12px;
  min-height: 240px;
}

.timer-ring {
  width: 220px;
  height: 220px;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: var(--surface-soft);
  stroke-width: 6;
}

.timer-ring-fg {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 565.5;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 300ms ease;
}

.timer-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.timer-center .timer-display {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  min-height: auto;
  margin: 0;
  border: 0;
  color: var(--ink);
}

.timer-center #timerMode {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.timer-center #pomodoroCount {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}

.focus-panel.break-mode .timer-ring-fg {
  stroke: var(--success);
}

.focus-panel.break-mode .timer-center #timerMode {
  color: var(--success);
}

.timer-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.timer-controls button {
  min-height: 40px;
}

.timer-settings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.timer-settings[hidden] {
  display: none !important;
}

.timer-settings label {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.timer-settings input {
  min-height: 34px !important;
  padding: 5px 7px !important;
  text-align: center;
}

.focus-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  margin-bottom: 12px;
  padding: 8px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.trend-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.trend-bar {
  width: 100%;
  max-width: 24px;
  min-height: 2px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  transition: height 400ms ease;
}

.trend-bar.today {
  background: var(--warning);
}

.trend-bar-label {
  font-size: 9px;
  color: var(--muted);
}

.trend-bar-value {
  font-size: 9px;
  color: var(--ink-soft);
  font-weight: 600;
}

.pwa-install-btn {
  padding: 6px 12px;
  font-size: 12px;
  animation: pulse-install 2s infinite;
}

@keyframes pulse-install {
  0%, 100% { box-shadow: 0 0 0 0 rgba(32, 38, 47, 0.22); }
  50% { box-shadow: 0 0 0 6px rgba(32, 38, 47, 0); }
}

.version-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.version-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.version-history-item:hover {
  border-color: var(--primary);
}

.version-history-item strong {
  font-size: 13px;
  font-weight: 500;
}

.version-history-item small {
  font-size: 11px;
  color: var(--muted);
}

.version-history-item button {
  padding: 4px 10px;
  font-size: 11px;
}

.template-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.template-panel[hidden] {
  display: none;
}

.template-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: all 150ms ease;
  text-align: left;
}

.template-card:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.template-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.template-card small {
  font-size: 11px;
  color: var(--muted);
}

.monthly-goals-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.monthly-goal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--surface-soft);
  transition: all 150ms ease;
}

.monthly-goal-item:hover {
  background: var(--primary-soft);
}

.monthly-goal-item.done {
  opacity: 0.5;
}

.monthly-goal-item.done strong {
  text-decoration: line-through;
}

.monthly-goal-item strong {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.monthly-goal-item .delete-action {
  opacity: 0;
  transition: opacity 150ms ease;
}

.monthly-goal-item:hover .delete-action {
  opacity: 1;
}

.mood-picker {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mood-label {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.mood-options {
  display: flex;
  gap: 6px;
}

.mood-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  transition: all 150ms ease;
  display: grid;
  place-items: center;
  padding: 0;
}

.mood-btn:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

.mood-btn.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.monthly-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.insight-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.insight-card strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.insight-card span {
  font-size: 12px;
  color: var(--muted);
}

.insight-card.warning strong {
  color: var(--warning);
}

.insight-card.success strong {
  color: var(--success);
}

.insight-card.danger strong {
  color: var(--danger);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 25, 29, 0.55);
  backdrop-filter: blur(4px);
  animation: modal-fade-in 180ms ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modal-slide-up 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-form {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
}

.modal-form label {
  display: grid;
  gap: 4px;
}

.modal-form label > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
}

.modal-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.confirm-card {
  max-width: 400px;
}

.confirm-message {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.record-card {
  position: relative;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.record-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  box-shadow: var(--shadow-sm);
}

.record-card .edit-hint {
  position: absolute;
  top: 10px;
  right: 36px;
  display: none;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 600;
}

.record-card:hover .edit-hint {
  display: inline-flex;
}

.record-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.record-card-actions .icon-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

.activity-row.record-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.habit-row.record-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.kanban-card.record-card {
  cursor: pointer;
}

.kanban-card.record-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  box-shadow: var(--shadow-sm);
}

.project-card.record-card {
  cursor: pointer;
}

.project-card.record-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 120px;
  padding: 8px 0 4px;
}

.bar-chart .bar-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.bar-chart .bar-value {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1;
}

.bar-chart .bar-track {
  display: flex;
  width: 100%;
  height: 80px;
  align-items: flex-end;
  justify-content: center;
}

.bar-chart .bar-fill {
  width: 70%;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  transition: height 300ms ease;
}

.bar-chart .bar-item.today .bar-fill {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
}

.bar-chart .bar-item.today .bar-value {
  color: var(--accent-dark);
  font-weight: 700;
}

.bar-chart .bar-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}

.bar-chart .bar-empty .bar-fill {
  background: var(--line);
  opacity: 0.5;
}

.donut-chart-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.donut-chart {
  position: relative;
  flex: 0 0 110px;
  width: 110px;
  height: 110px;
}

.donut-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-chart .donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut-chart .donut-center strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.donut-chart .donut-center small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.donut-legend {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.donut-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}

.donut-legend .legend-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.donut-legend .legend-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend .legend-value {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--muted);
}

.donut-chart-empty {
  display: flex;
  width: 100%;
  height: 110px;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 12px;
}

.mobile-scrim {
  display: none;
}

.sync-status {
  display: inline-flex;
  min-width: 92px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  white-space: nowrap;
}

.sync-status svg {
  width: 15px;
  height: 15px;
}

.sync-status.is-synced {
  border-color: rgba(18, 107, 111, 0.24);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.sync-status.is-syncing svg {
  animation: sync-spin 1s linear infinite;
}

.sync-status.is-error {
  color: var(--coral);
  background: var(--coral-soft);
}

@keyframes sync-spin {
  to { transform: rotate(360deg); }
}

.full-width-button {
  width: 100%;
  margin-top: 14px;
}

.mobile-bottom-nav,
.more-sheet,
.sheet-backdrop {
  display: none;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 23, 27, 0.68);
  backdrop-filter: blur(10px);
}

.auth-overlay[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(9, 24, 29, 0.24);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 23px;
}

.auth-brand p,
.auth-brand strong {
  display: block;
  margin: 0;
}

.auth-brand p {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.auth-brand strong {
  font-size: 17px;
}

.auth-card h2 {
  max-width: 360px;
  margin: 5px 0 9px;
  font-size: 25px;
  line-height: 1.3;
}

.auth-copy,
.auth-message {
  color: var(--muted);
  font-size: 12px;
}

.auth-message:empty {
  display: none;
}

.auth-message.is-error {
  color: #c94046;
  font-weight: 700;
}

.auth-message.is-success {
  color: #189a6a;
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin: 22px 0 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.auth-form input {
  min-height: 46px;
}

.auth-form button,
.auth-actions button {
  min-height: 44px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-link-form {
  margin-top: 12px;
}

.auth-text-button {
  display: block;
  margin: 2px 0 0 auto;
  padding: 4px 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-text-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.set-password-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.account-summary > svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.account-summary strong,
.account-summary small {
  display: block;
  overflow-wrap: anywhere;
}

.account-summary small {
  margin-top: 3px;
  color: var(--muted);
}

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

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 23px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.privacy-note svg {
  width: 14px;
  min-width: 14px;
}

.offline-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 6px;
  color: #fff;
  background: #16233b;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  transform: translateX(-50%);
}

.offline-banner[hidden] {
  display: none;
}

body.dark .toast,
body.dark .offline-banner {
  background: #0a0f1d;
  color: #eef2f9;
}

@media (max-width: 1260px) {
  .topbar {
    grid-template-columns: minmax(180px, 0.75fr) minmax(280px, 1.35fr) auto;
    padding-inline: 22px;
  }

  .date-text {
    display: none;
  }

  .main {
    padding-inline: 22px;
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    overflow-x: auto;
  }

  .summary-item {
    min-width: 110px;
  }

  .schedule-form,
  .assignment-form,
  .advisor-form,
  .project-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .advisor-form textarea {
    grid-column: span 2;
  }

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

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

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

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

  .analysis-form textarea,
  .analysis-form button {
    grid-column: span 2;
  }
}

@media (max-width: 1020px) {
  :root {
    --sidebar-width: 218px;
  }

  .topbar {
    grid-template-columns: minmax(170px, 0.7fr) minmax(220px, 1fr) auto;
    gap: 10px;
  }

  .dashboard-layout,
  .grid.two-thirds {
    grid-template-columns: 1fr;
  }

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

  .quick-launch-panel,
  .wellbeing-panel {
    min-height: 100%;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .focus-input {
    font-size: 25px;
  }

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

  .resource-inline-form {
    width: 100%;
    flex-basis: auto;
  }

  .thesis-workspace {
    grid-template-columns: 1fr;
  }

  .thesis-progress {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    min-width: 0;
  }

  .mobile-menu {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    gap: 8px 10px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 10px;
  }

  .global-search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 42px;
    box-shadow: none;
  }

  .global-search-wrap input {
    font-size: 16px;
  }

  .global-search-wrap kbd {
    display: none;
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 5px;
  }

  .top-actions #quickCaptureBtn,
  .top-actions #themeBtn,
  .top-actions #exportBtn,
  .date-text {
    display: none;
  }

  .topbar-title h2 {
    font-size: 18px;
  }

  .main {
    width: 100%;
    padding: 14px 14px calc(82px + env(safe-area-inset-bottom));
  }

  .schedule-toolbar {
    align-items: flex-start;
    gap: 10px;
  }

  .schedule-toolbar .muted-note {
    display: none;
  }

  .schedule-mobile-mode-switch {
    display: flex;
    flex-shrink: 0;
  }

  .schedule-day-view {
    display: block;
  }

  #schedule:not(.schedule-mobile-week) .week-calendar {
    display: none;
  }

  #schedule.schedule-mobile-week .schedule-day-view {
    display: none;
  }

  #schedule.schedule-mobile-week {
    overflow-x: auto;
  }

  .schedule-day-strip {
    position: sticky;
    top: 102px;
    z-index: 8;
    padding: 5px 0;
    background: var(--page);
  }

  .dashboard-controlbar {
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .dashboard-mode-hint {
    order: 2;
    flex-basis: 100%;
    margin: 0;
  }

  .dashboard-controlbar .secondary-button {
    min-height: 38px;
    padding: 7px 10px;
  }

  .dashboard-customize-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

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

  .dashboard-widget-options label {
    min-height: 38px;
  }

  .semester-setup-steps {
    grid-template-columns: 1fr;
  }

  .dashboard-intro {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-hero {
    min-height: 0;
    padding: 24px;
  }

  .hero-side {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .phase-card {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .phase-card strong {
    grid-row: 2;
  }

  .phase-card small {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }

  .dashboard-rail {
    grid-template-columns: 1fr;
  }

  .resource-sections {
    grid-template-columns: 1fr;
  }

  .requirement-grid {
    grid-template-columns: 1fr;
  }

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

  .review-snapshot article:nth-child(2) {
    border-right: 0;
  }

  .review-snapshot article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(58px + env(safe-area-inset-bottom));
    padding: 4px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    box-shadow: 0 -8px 24px rgba(20, 43, 49, 0.08);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav button {
    display: grid;
    min-width: 0;
    min-height: 50px;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
    font-weight: 600;
  }

  .mobile-bottom-nav button svg {
    width: 21px;
    height: 21px;
  }

  .mobile-bottom-nav button.active {
    color: var(--primary-dark);
    background: var(--primary-soft);
  }

  .sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    background: rgba(12, 25, 29, 0.48);
  }

  .sheet-backdrop[hidden],
  .more-sheet[hidden] {
    display: none;
  }

  .more-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: block;
    max-height: min(82dvh, 760px);
    overflow-y: auto;
    padding: 7px 14px calc(22px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--surface);
    box-shadow: 0 -20px 60px rgba(12, 27, 32, 0.2);
  }

  .sheet-handle {
    width: 38px;
    height: 4px;
    margin: 0 auto 9px;
    border-radius: 4px;
    background: var(--line-strong);
  }

  .sheet-heading {
    position: sticky;
    top: -7px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 12px;
    background: var(--surface);
  }

  .sheet-heading h3 {
    margin: 0;
    font-size: 18px;
  }

  .mobile-all-nav section {
    margin-bottom: 18px;
  }

  .mobile-all-nav section > p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-all-nav section > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-all-nav button {
    display: grid;
    min-width: 0;
    min-height: 76px;
    place-items: center;
    align-content: center;
    gap: 6px;
    padding: 9px 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: 11px;
    line-height: 1.25;
  }

  .mobile-all-nav button svg {
    width: 21px;
    height: 21px;
    color: var(--primary);
  }

  .mobile-all-nav button.active {
    border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
    color: var(--primary-dark);
    background: var(--primary-soft);
  }

  .kanban {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .kanban-column {
    min-height: 0;
  }

  .kanban-stack:has(.kanban-empty) {
    min-height: 56px;
    align-content: center;
  }

  body.sheet-open {
    overflow: hidden;
  }
}

/* Core depth v17: connected research, analytics, project workspace and resource health */
.month-calendar {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* 日程的日/周/月切换在桌面与手机保持一致。 */
.schedule-mobile-mode-switch { display: flex; }
.schedule-day-view { display: block; }

.month-weekdays,
.month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-weekdays {
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.month-weekdays span {
  padding: 9px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.month-day {
  min-width: 0;
  min-height: 104px;
  padding: 8px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.month-day:nth-child(7n) { border-right: 0; }
.month-day:hover { background: var(--primary-mist, var(--primary-soft)); }
.month-day.outside { background: var(--surface-soft); opacity: 0.55; }
.month-day.today { box-shadow: inset 0 0 0 2px var(--primary); }
.month-day > strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 13px; }
.month-day > span { display: grid; gap: 3px; }
.month-day > span i {
  overflow: hidden;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.month-day > small { display: block; margin-top: 3px; font-size: 9px; }

.grade-trend-chart {
  min-height: 216px;
  overflow-x: auto;
}
.grade-trend-chart svg { display: block; width: 100%; min-width: 480px; height: 210px; }
.grade-trend-chart polyline { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.grade-trend-chart circle { fill: var(--surface); stroke: var(--primary); stroke-width: 3; }
.grade-grid line { stroke: var(--line); stroke-width: 1; }
.grade-grid text,
.grade-course-label { fill: var(--muted); font-size: 10px; }
.grade-score-label { fill: var(--primary-dark); font-size: 11px; font-weight: 700; }

.target-credit-control { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.target-credit-control input { width: 72px; min-height: 34px; padding: 5px 8px; }
.credit-progress-view { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 24px; min-height: 216px; }
.credit-ring {
  display: grid;
  width: 142px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--credit-progress), var(--primary-soft) 0);
}
.credit-ring::before { content: ""; grid-area: 1/1; width: 108px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); }
.credit-ring > span { z-index: 1; display: grid; grid-area: 1/1; text-align: center; }
.credit-ring strong { color: var(--ink); font-size: 28px; line-height: 1.1; }
.credit-breakdown { display: grid; gap: 0; }
.credit-breakdown > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.credit-breakdown > div:last-child { border-bottom: 0; }
.credit-breakdown span { color: var(--muted); }

.exam-countdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.exam-countdown button { display: grid; min-height: 104px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); text-align: left; }
.exam-countdown button:hover { border-color: var(--primary); background: var(--primary-soft); }
.exam-countdown button.urgent { border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); background: var(--danger-soft); }
.exam-countdown button span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.exam-countdown button span svg { width: 14px; }
.exam-countdown button strong { color: var(--ink); font-size: 24px; }

.research-relation-panel { overflow: hidden; }
.research-relation-map { display: grid; gap: 10px; }
.relation-chain { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr) auto) minmax(120px, 1fr); align-items: stretch; gap: 8px; }
.relation-chain > svg { width: 16px; align-self: center; color: var(--faint); }
.relation-node { display: grid; min-width: 0; min-height: 104px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); text-align: left; }
.relation-node:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.relation-node > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.relation-node > span svg { width: 14px; }
.relation-node > strong { overflow: hidden; margin: 5px 0; color: var(--ink); font-size: 13px; line-height: 1.45; text-overflow: ellipsis; }
.relation-node > small { align-self: end; }
.literature-node { border-top: 3px solid #6f8fc4; }
.topic-node { border-top: 3px solid #d2a43d; }
.project-node { border-top: 3px solid #4f8e83; }
.thesis-node { border-top: 3px solid #8c78ae; }

.literature-card { align-items: flex-start; }
.literature-card-main { min-width: 0; }
.literature-bibliography { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 7px 0; }
.literature-bibliography span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.literature-bibliography svg { width: 13px; height: 13px; }
.doi-link { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: var(--primary-dark); font-size: 12px; overflow-wrap: anywhere; }
.doi-link svg { width: 13px; flex: 0 0 auto; }
.relation-tag { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); color: var(--ink-soft); font-size: 11px; }
button.relation-tag { cursor: pointer; }
.relation-tag svg { width: 13px; }
.literature-note { margin: 10px 0; color: var(--ink-soft); }
.citation-preview { margin-top: 10px; padding: 9px 11px; border-left: 3px solid var(--primary); border-radius: 0 6px 6px 0; background: var(--surface-soft); }
.citation-preview p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; }
.literature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.literature-actions select { min-width: 112px; min-height: 36px; }
.literature-actions .secondary-button { min-height: 36px; padding: 7px 10px; }

.project-relations,
.project-record-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin: 8px 0; }
.project-relations span,
.project-record-progress span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.project-relations svg,
.project-record-progress svg { width: 13px; }
.project-record-progress { padding-top: 8px; border-top: 1px solid var(--line); }
.project-record-progress strong { font-size: 11px; }
.project-open-workspace { display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--primary-dark); }
.project-open-workspace:hover { border-color: var(--primary); background: var(--primary-soft); }
.project-open-workspace svg { width: 15px; }
.project-workspace { scroll-margin-top: 88px; }
.project-workspace-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.project-workspace-summary > div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.project-workspace-summary span { display: block; color: var(--muted); font-size: 10px; }
.project-workspace-summary strong { display: block; overflow: hidden; margin-top: 3px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-record-form { grid-template-columns: 0.8fr 1.4fr 0.8fr 0.8fr 1.2fr; }
.project-record-form textarea { grid-column: 1 / -2; }
.project-record-form button { grid-column: -2 / -1; }
.project-record-board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 9px; margin-top: 18px; overflow-x: auto; padding-bottom: 6px; }
.project-record-column { min-width: 210px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.project-record-column > header { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.project-record-column > header span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; }
.project-record-column > header svg { width: 14px; color: var(--primary); }
.project-record-column > header strong { color: var(--muted); font-size: 11px; }
.project-record-column > div { display: grid; gap: 7px; padding: 8px; }
.project-record-item { position: relative; display: grid; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.project-record-item > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.project-record-item time { color: var(--muted); font-size: 9px; }
.project-record-item p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.project-record-item a,
.project-record-item > small { display: flex; align-items: center; gap: 4px; color: var(--primary-dark); font-size: 10px; overflow-wrap: anywhere; }
.project-record-item svg { width: 12px; }
.project-record-actions { display: flex; justify-content: flex-end !important; opacity: 0.65; }
.project-record-actions .icon-button { width: 28px; height: 28px; min-height: 28px; }
.project-record-status { padding: 2px 5px; border-radius: 4px; background: var(--primary-soft); color: var(--primary-dark); font-size: 9px; }
.project-record-empty { margin: 0; padding: 14px 6px; color: var(--muted); font-size: 11px; text-align: center; }

.review-auto-summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; }
.review-digest-copy { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--primary-mist, var(--primary-soft)); }
.review-digest-copy > span { display: flex; align-items: center; gap: 6px; color: var(--primary-dark); font-size: 11px; font-weight: 700; }
.review-digest-copy svg { width: 15px; }
.review-digest-copy p { margin: 8px 0 0; color: var(--ink-soft); }
.review-digest-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.review-digest-metrics > div { display: grid; align-content: center; min-height: 90px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); text-align: center; }
.review-digest-metrics strong { color: var(--ink); font-size: 21px; }
.review-digest-metrics small { font-size: 10px; }

.resource-health-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.resource-health-summary > span { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-dark); font-weight: 650; }
.resource-health-summary svg { width: 15px; }
.resource-health-summary em { color: var(--muted); font-style: normal; }
.resource-health-summary small { flex-basis: 100%; }
.resource-health-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; font-size: 9px; font-style: normal; white-space: nowrap; }
.resource-health-badge svg { width: 11px; height: 11px; }
.resource-health-badge.is-reachable { color: var(--success); }
.resource-health-badge.is-failed { color: var(--danger); }
.resource-health-badge.is-mixed { color: var(--warning); }
.custom-resource-row { display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 62px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.custom-resource-row:last-child { border-bottom: 0; }
.custom-resource-row.dragging { opacity: 0.45; }
.custom-resource-row.drag-over { box-shadow: inset 0 2px var(--primary); }
.resource-drag-handle { display: grid; width: 30px; height: 34px; place-items: center; border: 0; background: transparent; color: var(--faint); cursor: grab; }
.resource-drag-handle svg { width: 16px; }
.custom-resource-row > a { display: grid; min-width: 0; color: inherit; text-decoration: none; }
.custom-resource-row > a strong,
.custom-resource-row > a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-resource-row > div { display: flex; }
.spin { animation: core-spin 0.8s linear infinite; }
@keyframes core-spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .academic-analytics-grid { grid-template-columns: minmax(0, 1fr); }
  .credit-progress-view { grid-template-columns: 118px minmax(0, 1fr); gap: 14px; }
  .credit-ring { width: 112px; }
  .credit-ring::before { width: 84px; }
  .credit-ring strong { font-size: 22px; }
  .relation-chain { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .relation-chain > svg { justify-self: center; transform: rotate(90deg); }
  .relation-node { min-height: 78px; }
  .project-workspace-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-record-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-record-form textarea,
  .project-record-form button { grid-column: 1 / -1; }
  .project-record-board { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .project-record-column { min-width: 0; }
  .review-auto-summary { grid-template-columns: minmax(0, 1fr); }
  .review-digest-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .resource-health-summary { align-items: flex-start; }
}

@media (max-width: 520px) {
  .month-day { min-height: 76px; padding: 4px; }
  .month-day > strong { margin-bottom: 2px; font-size: 11px; }
  .month-day > span { gap: 2px; }
  .month-day > span i { padding: 1px 2px; font-size: 8px; }
  .month-day > span i:nth-child(n + 3) { display: none; }
  .month-day > small { display: none; }
  .month-weekdays span { padding: 7px 2px; font-size: 9px; }
  .exam-countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-countdown button { min-height: 94px; padding: 9px; }
  .literature-card { padding-right: 38px; }
  .literature-actions { align-items: stretch; }
  .literature-actions select { flex: 1 1 100%; width: 100%; }
  .literature-actions .secondary-button { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .project-workspace-summary { gap: 6px; }
  .project-record-form { grid-template-columns: minmax(0, 1fr); }
  .project-record-form > * { grid-column: 1 !important; }
  .review-digest-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-digest-metrics > div { min-height: 72px; }
  .custom-resource-row { grid-template-columns: 26px 32px minmax(0, 1fr) auto; gap: 5px; padding: 7px 4px; }
  .custom-resource-row .resource-site-icon { width: 32px; height: 32px; }
  .custom-resource-row > div .icon-button { width: 30px; min-width: 30px; height: 30px; }
  .resource-health-badge { display: none; }
}

/* Data safety center */
.data-safety-overview { overflow: hidden; border-top: 3px solid var(--primary) !important; }
.safety-status { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 9px; border: 1px solid var(--success-soft); border-radius: 6px; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 650; }
.safety-status.is-warning { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); background: color-mix(in srgb, var(--warning) 10%, var(--surface)); color: color-mix(in srgb, var(--warning) 75%, var(--ink)); }
.safety-status svg, .safety-metric-icon svg { width: 15px; height: 15px; }
.safety-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.safety-metric-grid > div { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; align-items: center; min-width: 0; padding: 13px; background: var(--surface); }
.safety-metric-icon { display: grid; grid-row: 1 / span 2; width: 28px; height: 28px; place-items: center; border-radius: 6px; background: var(--primary-soft); color: var(--primary); }
.safety-metric-grid strong { font-size: 18px; line-height: 1.1; color: var(--ink); }
.safety-metric-grid small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.export-format-grid { display: grid; grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(150px, 1fr)); gap: 9px; margin: 14px 0 10px; }
.export-format-grid button { min-height: 48px; justify-content: center; }
.export-format-grid .export-all-button { justify-content: flex-start; text-align: left; }
.export-all-button span { display: grid; gap: 2px; }
.export-all-button strong { font-size: 13px; }
.export-all-button small { color: rgba(255, 255, 255, 0.76); font-size: 10px; font-weight: 500; }
.data-safety-grid { align-items: start; }
.version-history-item { position: relative; gap: 10px; }
.version-history-item > div { display: grid; flex: 1; min-width: 0; gap: 3px; }
.version-node { flex: 0 0 9px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 35%, var(--line)); }
.version-node.is-cloud { background: var(--success); box-shadow: 0 0 0 1px color-mix(in srgb, var(--success) 35%, var(--line)); }
.sync-queue-panel .settings-actions { margin-top: 10px; }
.sync-queue-list { margin-top: 12px; }
.sync-queue-empty, .sync-queue-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.sync-queue-empty > i, .sync-queue-item > span { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 6px; background: var(--success-soft); color: var(--success); }
.sync-queue-item > span { background: color-mix(in srgb, var(--warning) 12%, var(--surface)); color: var(--warning); }
.sync-queue-empty > i, .sync-queue-item svg { width: 17px; height: 17px; }
.sync-queue-empty span, .sync-queue-item > div { display: grid; gap: 3px; }
.sync-queue-empty small, .sync-queue-item small, .sync-queue-item p { margin: 0; color: var(--muted); font-size: 11px; }
.import-card-primary { grid-column: 1 / -1; min-height: 88px; justify-content: center; border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.import-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.import-preview-heading h4 { margin: 2px 0 0; overflow-wrap: anywhere; }
.import-ready-badge { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; color: var(--success); font-size: 11px; font-weight: 650; }
.import-ready-badge svg { width: 15px; height: 15px; }
.import-audit-grid, .conflict-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--line); }
.import-audit-grid > div, .conflict-metrics > div { display: grid; gap: 3px; padding: 10px; background: var(--surface); text-align: center; }
.import-audit-grid strong, .conflict-metrics strong { color: var(--ink); font-size: 18px; }
.import-audit-grid span, .conflict-metrics span { color: var(--muted); font-size: 10px; }
.import-table-wrap { margin-top: 12px; overflow-x: auto; }
.import-error-note { display: flex; gap: 6px; margin: 10px 0 0; color: var(--danger); font-size: 11px; }
.import-error-note svg { width: 14px; height: 14px; }
.import-mode-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.import-mode-selector label { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; }
.import-mode-selector label.selected { border-color: var(--primary); background: var(--primary-soft); }
.import-mode-selector span { display: grid; gap: 3px; }
.import-mode-selector small { color: var(--muted); font-size: 10px; }
.migration-log { display: grid; gap: 7px; margin-top: 12px; }
.migration-log > div { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-left: 2px solid var(--success); background: var(--surface-soft); }
.migration-log > div > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.migration-log svg { width: 13px; height: 13px; }
.migration-log div div { display: grid; gap: 2px; }
.migration-log small { color: var(--muted); font-size: 10px; }
.data-decision-overlay { z-index: 1600 !important; background: rgba(14, 28, 45, 0.56) !important; }
.data-decision-card { width: min(660px, calc(100vw - 32px)); background: var(--surface) !important; box-shadow: 0 24px 64px rgba(14, 28, 45, 0.24) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.decision-shield { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 7px; background: var(--primary-soft); color: var(--primary); }
.decision-copy { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.conflict-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.conflict-collection-list { display: grid; max-height: 210px; gap: 1px; margin: 12px 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--line); }
.conflict-collection-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; background: var(--surface); }
.conflict-collection-list p { margin: 0; padding: 12px; background: var(--surface); color: var(--muted); font-size: 12px; }
.conflict-collection-list span { color: var(--muted); font-size: 11px; }
.conflict-choice-grid { display: grid; gap: 8px; }
.conflict-choice { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.conflict-choice:hover, .conflict-choice.recommended { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); background: color-mix(in srgb, var(--primary-soft) 65%, var(--surface)); }
.conflict-choice > svg { width: 20px; color: var(--primary); }
.conflict-choice span { display: grid; gap: 3px; }
.conflict-choice small { color: var(--muted); font-size: 10px; }
.conflict-choice b { padding: 3px 6px; border-radius: 4px; background: var(--primary); color: #fff; font-size: 9px; }

@media (max-width: 820px) {
  .safety-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .export-format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .export-format-grid .export-all-button { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .safety-metric-grid > div { padding: 10px; }
  .export-format-grid, .import-grid, .import-mode-selector { grid-template-columns: 1fr; }
  .export-format-grid .export-all-button, .import-card-primary { grid-column: auto; }
  .import-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-preview { padding: 11px; }
  .import-preview-heading { align-items: flex-start; }
  .version-history-item { align-items: flex-start; flex-wrap: wrap; }
  .version-history-item button { width: 100%; min-height: 34px; }
  .trash-item { align-items: flex-start; flex-wrap: wrap; }
  .trash-item-actions { width: 100%; padding-left: 42px; }
  .trash-item-actions button { flex: 1; min-height: 34px; }
  .data-decision-card { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); overflow-y: auto; }
  .conflict-choice { grid-template-columns: 28px 1fr; }
  .conflict-choice b { display: none; }
}

/* V20 · Assignment workflow loop */
.workflow-modal-card {
  width: min(780px, 100%);
  max-width: 780px;
  max-height: min(900px, 92vh);
}

.workflow-path {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -3px 0 15px;
  overflow-x: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  scrollbar-width: none;
}

.workflow-path::-webkit-scrollbar {
  display: none;
}

.workflow-path span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.workflow-path > svg {
  flex: 0 0 12px;
  width: 12px;
  color: var(--faint);
}

.workflow-path span svg,
.workflow-section legend svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.workflow-form {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

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

.workflow-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.workflow-form label > span,
.workflow-section > small {
  color: var(--muted);
  font-size: 11px;
}

.workflow-form label > span {
  color: var(--ink-soft);
  font-weight: 650;
}

.workflow-form input,
.workflow-form select,
.workflow-form textarea {
  width: 100%;
}

.workflow-wide {
  grid-column: 1 / -1;
}

.workflow-section {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.workflow-section legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.workflow-literature-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 176px;
  gap: 6px;
  overflow-y: auto;
}

.workflow-literature-options label {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
}

.workflow-literature-options input {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.workflow-literature-options strong,
.workflow-literature-options small {
  display: block;
}

.workflow-literature-options strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-literature-options small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.workflow-empty-hint,
.course-progress-empty {
  margin: 0;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.workflow-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workflow-attachment-preview:empty {
  display: none;
}

.workflow-attachment-preview a,
.workflow-attachment-preview > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 10px;
  text-decoration: none;
}

.workflow-attachment-preview svg {
  width: 12px;
  height: 12px;
}

.inbox-workflow-status {
  display: inline-flex !important;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: 5px !important;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--success-soft);
  color: var(--success) !important;
  font-size: 9px !important;
  font-weight: 650;
}

.inbox-workflow-status svg {
  width: 12px;
  height: 12px;
}

.inbox-row.processed:has(.inbox-workflow-status) {
  opacity: 1;
}

.assignment-workflow {
  margin: 8px 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.kanban-card.record-card {
  display: block;
}

.workflow-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.workflow-badges span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
}

.workflow-badges span:first-child {
  color: var(--primary-dark);
  font-weight: 700;
}

.workflow-badges svg {
  width: 10px;
  height: 10px;
}

.assignment-workflow .workflow-link-btn {
  margin-top: 5px;
  padding: 0;
  font-size: 9px;
}

.course-progress-grid {
  display: grid;
  gap: 6px;
  margin: 13px 0;
}

.course-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  text-align: left;
}

.course-progress-row strong,
.course-progress-row small {
  display: block;
}

.course-progress-row strong {
  font-size: 11px;
}

.course-progress-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.course-progress-row > div {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 34px;
  align-items: center;
  gap: 7px;
}

.course-progress-row i,
.course-card-progress > span {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--canvas-deep);
}

.course-progress-row i b,
.course-card-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.course-progress-row em {
  color: var(--primary-dark);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.course-card-progress {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.course-card-progress em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.workflow-review-panel {
  margin-bottom: 12px;
}

.workflow-review-list {
  display: grid;
  gap: 7px;
}

.workflow-review-list > article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.workflow-complete-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.workflow-complete-mark svg {
  width: 15px;
  height: 15px;
}

.workflow-review-list strong,
.workflow-review-list small,
.workflow-review-list p {
  display: block;
}

.workflow-review-list strong {
  font-size: 11px;
}

.workflow-review-list small,
.workflow-review-list p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 820px) {
  #workflowModal {
    align-items: flex-end;
    padding: 0;
  }

  .workflow-modal-card {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top) - 10px);
    padding: 17px 15px calc(12px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
  }

  .workflow-form-grid,
  .workflow-literature-options {
    grid-template-columns: 1fr;
  }

  .workflow-wide {
    grid-column: auto;
  }

  .workflow-path {
    margin-bottom: 11px;
  }

  .workflow-section {
    padding: 11px;
  }

  .workflow-form .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 14px -4px 0;
    padding: 11px 4px 2px;
    background: var(--surface);
  }

  .workflow-form .modal-actions > * {
    flex: 1;
  }

  .course-progress-row {
    grid-template-columns: 1fr;
  }

  .workflow-review-list > article {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .workflow-review-list > article > button {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }
}

@media (max-width: 620px) {
  h2 {
    font-size: 18px;
  }

  .eyebrow {
    display: none;
  }

  .topbar-title h2 {
    white-space: normal;
  }

  .sync-status {
    min-width: 78px;
    width: auto;
    height: 36px;
    padding: 0 9px;
  }

  .sync-status span {
    display: inline;
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main {
    padding-inline: 12px;
  }

  input:not([type="range"]):not([type="checkbox"]),
  select,
  textarea {
    font-size: 16px;
  }

  .dashboard-intro {
    min-height: 0;
    padding: 16px;
  }

  .dashboard-hero {
    padding: 20px 16px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-description {
    margin-bottom: 17px;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .focus-input {
    font-size: 21px;
  }

  .weekly-intent {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .capture-bar {
    grid-template-columns: 20px minmax(0, 1fr) 80px 36px;
    padding-bottom: 7px;
  }

  .capture-bar button[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .capture-bar #templateBtn {
    grid-column: auto;
  }

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

  .summary-item {
    min-width: 0;
    min-height: 74px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-item:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .summary-item:nth-child(n + 3) {
    border-bottom: 0;
  }

  .summary-item:last-child {
    grid-column: auto;
    border-right: 0;
  }

  .onboarding-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .onboarding-mark {
    min-height: 72px;
    grid-template-columns: auto auto;
    justify-content: center;
  }

  .onboarding-steps {
    grid-template-columns: 1fr;
  }

  .summary-item strong {
    font-size: 24px;
  }

  .panel {
    padding: 14px;
  }

  .deadline-row {
    grid-template-columns: 65px minmax(0, 1fr) 15px;
    gap: 8px;
  }

  .deadline-row em {
    grid-column: 2;
    grid-row: 2;
  }

  .deadline-row > svg {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .inline-form,
  .form-grid,
  .stacked-form,
  .schedule-form,
  .assignment-form,
  .advisor-form,
  .project-form,
  .literature-form {
    grid-template-columns: 1fr;
  }

  .record-form,
  .analysis-form,
  .health-form,
  .requirement-form,
  .habit-form {
    grid-template-columns: 1fr;
  }

  .record-form > button,
  .analysis-form textarea,
  .analysis-form button,
  .health-form textarea {
    grid-column: auto;
  }

  .form-grid textarea,
  .stacked-form textarea,
  .stacked-form button,
  .advisor-form textarea {
    grid-column: auto;
  }

  .form-grid button,
  .review-form button {
    width: 100%;
    justify-self: stretch;
  }

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

  .page-lead h3,
  .resource-header h3 {
    font-size: 20px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions > * {
    flex: 1;
  }

  .segmented {
    max-width: 100%;
    overflow-x: auto;
  }

  .inbox-row {
    grid-template-columns: 45px minmax(0, 1fr);
  }

  .inbox-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

  .week-switcher {
    width: 100%;
  }

  .week-switcher strong {
    min-width: 0;
    flex: 1;
  }

  .course-list,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .timer-center .timer-display {
    min-height: auto;
    font-size: 36px;
  }

  .timer-ring {
    width: 180px;
    height: 180px;
  }

  .timer-visual {
    min-height: 200px;
  }

  .timer-controls {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .timer-controls button {
    padding-inline: 4px;
    font-size: 11px;
  }

  .timer-settings,
  .settings-form,
  .thesis-stats,
  .data-stats {
    grid-template-columns: 1fr;
  }

  .settings-form button {
    grid-column: auto;
    width: 100%;
  }

  .thesis-workspace {
    padding: 16px;
  }

  .thesis-title-input {
    font-size: 21px;
  }

  .thesis-progress {
    grid-template-columns: 1fr;
  }

  .thesis-progress > div:nth-child(2),
  .thesis-progress label {
    grid-column: 1;
    grid-row: auto;
  }

  .resource-inline-form {
    grid-template-columns: 1fr;
  }

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

  .resource-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-search,
  .segmented.scrollable {
    width: 100%;
    max-width: 100%;
  }

  .settings-actions {
    display: grid;
  }

  .auth-overlay {
    align-items: end;
    padding: 0;
  }

  .auth-card {
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .offline-banner {
    right: 12px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    left: 12px;
    justify-content: center;
    transform: none;
  }

  .habit-row {
    grid-template-columns: 1fr;
  }

  .course-schedule-grid {
    font-size: 10px;
  }

  .schedule-course strong {
    font-size: 9px;
  }

  .schedule-course small {
    display: none;
  }

  .timer-ring {
    width: 160px;
    height: 160px;
  }

  .timer-center .timer-display {
    font-size: 32px;
  }

  .template-panel {
    grid-template-columns: 1fr;
  }

  .pwa-install-btn span,
  .pwa-install-btn i {
    display: none;
  }

  .pwa-install-btn {
    padding: 6px 8px;
  }

  .pwa-install-btn::after {
    content: "App";
    font-size: 12px;
  }

  .completion-ring {
    width: 100px;
    height: 100px;
  }

  .completion-center strong {
    font-size: 20px;
  }

  .check-in-btn {
    min-width: 80px;
    padding: 8px 12px;
  }

  .mood-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .mood-picker {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

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

  .insight-card strong {
    font-size: 20px;
  }

  .monthly-goal-item {
    padding: 10px;
  }

  .version-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .focus-trend-chart {
    height: 60px;
    padding: 6px;
  }

  .trend-bar-value {
    font-size: 8px;
  }

  .top-three-panel {
    padding: 12px;
  }

  .daily-quote blockquote {
    font-size: 13px;
  }

  .grid.two,
  .grid.two-thirds,
  .grid.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 370px) {
  .mobile-all-nav section > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* V16 · Movement center and photographic depth */
.sports-view {
  --sports-blue: #315f9f;
  --sports-blue-deep: #163860;
  --sports-green: #4f8d76;
  --sports-amber: #d9963b;
}

.sports-hero,
.sports-feature-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 55px rgba(24, 48, 82, 0.18);
}

.sports-main-hero {
  display: grid;
  min-height: 350px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding: 42px;
  background-image: linear-gradient(90deg, rgba(9, 29, 50, 0.96) 0%, rgba(13, 39, 66, 0.8) 38%, rgba(13, 39, 66, 0.18) 72%), url("./assets-sports-badminton-hero-v1.d99227e070db.jpg");
  color: #fff;
}

.sports-main-hero::after,
.sports-feature-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  box-shadow: inset 0 -90px 90px rgba(5, 19, 34, 0.14);
  pointer-events: none;
}

.sports-hero-copy {
  max-width: 610px;
}

.sports-hero .section-label,
.badminton-feature .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.sports-hero h3,
.sports-feature-hero h3 {
  max-width: 620px;
  margin: 8px 0 12px;
  color: inherit;
  font-size: clamp(30px, 3.1vw, 46px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: 0;
}

.sports-hero-copy > p:not(.section-label),
.sports-feature-hero > div > p:not(.section-label) {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.sports-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.sports-hero-actions button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 7px;
  font-weight: 650;
}

.sports-hero-actions svg {
  width: 17px;
  height: 17px;
}

.sports-primary-action {
  border: 1px solid #fff;
  background: #fff;
  color: #183b66;
}

.sports-primary-action:hover {
  background: #edf3fb;
}

.sports-ghost-action {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(12, 35, 59, 0.35);
  color: #fff;
  backdrop-filter: blur(8px);
}

.sports-ghost-action:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

.sports-hero-week {
  display: grid;
  width: 180px;
  min-height: 116px;
  align-content: center;
  gap: 3px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(8, 28, 49, 0.54);
  backdrop-filter: blur(12px);
}

.sports-hero-week span,
.sports-hero-week small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.sports-hero-week strong {
  color: #fff;
  font-size: 16px;
}

.sports-hero-week b {
  font-size: 31px;
  font-weight: 680;
}

.sports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.sports-kpi-grid button {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: center;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.sports-kpi-grid button:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sports-kpi-grid span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.sports-kpi-grid svg {
  width: 15px;
  height: 15px;
  color: var(--sports-blue);
}

.sports-kpi-grid strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 25px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sports-kpi-grid small {
  font-size: 11px;
}

.sports-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.sports-chart-panel,
.sports-mix-panel,
.sports-recent-panel {
  min-width: 0;
  border-radius: 8px;
}

.sports-recent-panel {
  grid-column: 1 / -1;
}

.sports-week-chart {
  display: grid;
  height: 210px;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 16px 4px 0;
}

.sports-week-chart > div {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 4px;
}

.sports-week-chart > div > span {
  position: relative;
  display: flex;
  width: min(32px, 70%);
  height: 142px;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 5px 5px 3px 3px;
  background: var(--surface-soft);
}

.sports-week-chart b {
  display: block;
  width: 100%;
  min-height: 3px;
  border-radius: inherit;
  background: var(--sports-blue);
  transition: height 420ms ease;
}

.sports-week-chart .today b {
  background: var(--sports-amber);
}

.sports-week-chart strong,
.sports-week-chart small {
  font-size: 10px;
}

.sports-week-chart .today strong {
  color: var(--sports-blue);
}

.sports-mix-wrap {
  display: grid;
  min-height: 210px;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.sports-mix-donut {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
}

.sports-mix-donut::after {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.sports-mix-donut > span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.sports-mix-donut strong {
  font-size: 22px;
}

.sports-mix-legend {
  display: grid;
  gap: 10px;
}

.sports-mix-legend > div {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.sports-mix-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.sports-mix-legend strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.sports-recent-list,
.sports-log-list {
  display: grid;
  gap: 8px;
}

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

.sports-log-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.sports-log-row:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  background: var(--surface-soft);
}

.sports-log-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.sports-log-icon svg {
  width: 17px;
  height: 17px;
}

.sports-log-row > div:nth-child(2) {
  min-width: 0;
}

.sports-log-row strong,
.sports-log-row small,
.sports-log-row p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sports-log-row strong {
  color: var(--ink);
  font-size: 13px;
}

.sports-log-row p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.sports-log-row .record-card-actions {
  opacity: 0;
  transition: opacity 160ms ease;
}

.sports-log-row:hover .record-card-actions,
.sports-log-row:focus-within .record-card-actions {
  opacity: 1;
}

.sports-feature-hero {
  display: flex;
  min-height: 255px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 34px;
}

.sports-feature-hero > div {
  max-width: 660px;
}

.sports-feature-hero > span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  opacity: 0.82;
}

.badminton-feature {
  background-image: linear-gradient(90deg, rgba(8, 27, 47, 0.94) 0%, rgba(12, 38, 63, 0.65) 48%, rgba(12, 38, 63, 0.05) 78%), url("./assets-sports-badminton-hero-v1.d99227e070db.jpg");
  color: #fff;
  background-position: center 64%;
}

.fitness-feature {
  background-image: linear-gradient(90deg, rgba(245, 248, 252, 0.98) 0%, rgba(245, 248, 252, 0.9) 42%, rgba(245, 248, 252, 0.12) 75%), url("./assets-sports-fitness-hero-v1.0727e9217940.jpg");
  color: #172a44;
  background-position: center;
}

.nutrition-feature {
  background-image: linear-gradient(90deg, rgba(248, 251, 253, 0.99) 0%, rgba(248, 251, 253, 0.9) 43%, rgba(248, 251, 253, 0.08) 74%), url("./assets-sports-meal-hero-v1.c953a0734e58.jpg");
  color: #19324b;
  background-position: center;
}

.fitness-feature .section-label,
.nutrition-feature .section-label {
  color: #55718e;
}

.fitness-feature > div > p:not(.section-label),
.nutrition-feature > div > p:not(.section-label) {
  color: #52657a;
}

.sports-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  gap: 1px;
}

.sports-stat-strip article {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 1px;
  padding: 14px 18px;
  background: var(--surface);
}

.sports-stat-strip span,
.sports-stat-strip small {
  color: var(--muted);
  font-size: 11px;
}

.sports-stat-strip strong {
  color: var(--ink);
  font-size: 23px;
  font-weight: 680;
}

.sports-entry-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.sports-form-panel,
.sports-history-panel {
  min-width: 0;
}

.sports-form-panel > .panel-heading > svg {
  width: 21px;
  height: 21px;
  color: var(--primary);
}

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

.sports-form-wide {
  grid-column: 1 / -1;
}

.sports-record-form textarea {
  min-height: 80px;
  resize: vertical;
}

body.dark .fitness-feature,
body.dark .nutrition-feature {
  color: #fff;
}

body.dark .fitness-feature {
  background-image: linear-gradient(90deg, rgba(12, 23, 39, 0.96) 0%, rgba(12, 23, 39, 0.79) 48%, rgba(12, 23, 39, 0.18) 78%), url("./assets-sports-fitness-hero-v1.0727e9217940.jpg");
}

body.dark .nutrition-feature {
  background-image: linear-gradient(90deg, rgba(12, 23, 39, 0.97) 0%, rgba(12, 23, 39, 0.82) 48%, rgba(12, 23, 39, 0.16) 78%), url("./assets-sports-meal-hero-v1.c953a0734e58.jpg");
}

body.dark .fitness-feature .section-label,
body.dark .nutrition-feature .section-label,
body.dark .fitness-feature > div > p:not(.section-label),
body.dark .nutrition-feature > div > p:not(.section-label) {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1100px) {
  .sports-main-hero {
    min-height: 330px;
    padding: 34px;
  }

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

  .sports-dashboard-grid,
  .sports-entry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .sports-main-hero {
    display: flex;
    min-height: 330px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 16px;
    padding: 24px 18px 18px;
    background-image: linear-gradient(180deg, rgba(7, 24, 42, 0.1) 0%, rgba(7, 24, 42, 0.58) 42%, rgba(7, 24, 42, 0.96) 100%), url("./assets-sports-badminton-hero-v1.d99227e070db.jpg");
    background-position: 62% center;
  }

  .sports-hero h3,
  .sports-feature-hero h3 {
    margin: 5px 0 8px;
    font-size: 27px;
  }

  .sports-hero-copy > p:not(.section-label),
  .sports-feature-hero > div > p:not(.section-label) {
    font-size: 13px;
    line-height: 1.55;
  }

  .sports-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 16px;
  }

  .sports-hero-actions button {
    justify-content: center;
  }

  .sports-hero-week {
    width: 100%;
    min-height: 68px;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 10px 13px;
  }

  .sports-hero-week strong {
    grid-row: 1 / 3;
    grid-column: 2;
  }

  .sports-hero-week b {
    font-size: 26px;
  }

  .sports-kpi-grid {
    gap: 8px;
    margin: 10px 0;
  }

  .sports-kpi-grid button {
    min-height: 94px;
    padding: 12px;
  }

  .sports-kpi-grid strong {
    font-size: 21px;
  }

  .sports-dashboard-grid {
    gap: 10px;
  }

  .sports-week-chart {
    height: 178px;
    gap: 5px;
    padding-top: 8px;
  }

  .sports-week-chart > div > span {
    width: min(25px, 80%);
    height: 115px;
  }

  .sports-mix-wrap {
    min-height: 170px;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
  }

  .sports-mix-donut {
    width: 110px;
    height: 110px;
  }

  .sports-mix-donut::after {
    width: 68px;
    height: 68px;
  }

  .sports-recent-list {
    grid-template-columns: 1fr;
  }

  .sports-log-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 10px;
  }

  .sports-log-row .record-card-actions {
    display: flex;
    opacity: 1;
  }

  .sports-log-row .record-card-actions .icon-button {
    width: 32px;
    height: 32px;
  }

  .sports-feature-hero {
    min-height: 300px;
    align-items: flex-end;
    padding: 22px 18px;
    background-position: 60% center;
  }

  .badminton-feature,
  .fitness-feature,
  .nutrition-feature,
  body.dark .fitness-feature,
  body.dark .nutrition-feature {
    background-image: linear-gradient(180deg, rgba(8, 25, 43, 0.06) 0%, rgba(8, 25, 43, 0.58) 46%, rgba(8, 25, 43, 0.96) 100%), var(--sports-mobile-image);
    color: #fff;
  }

  .badminton-feature { --sports-mobile-image: url("./assets-sports-badminton-hero-v1.d99227e070db.jpg"); }
  .fitness-feature { --sports-mobile-image: url("./assets-sports-fitness-hero-v1.0727e9217940.jpg"); }
  .nutrition-feature { --sports-mobile-image: url("./assets-sports-meal-hero-v1.c953a0734e58.jpg"); }

  .fitness-feature .section-label,
  .nutrition-feature .section-label,
  .fitness-feature > div > p:not(.section-label),
  .nutrition-feature > div > p:not(.section-label) {
    color: rgba(255, 255, 255, 0.74);
  }

  .sports-feature-hero > span {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(8, 25, 43, 0.52);
    backdrop-filter: blur(8px);
  }

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

  .sports-stat-strip article {
    min-height: 78px;
    padding: 11px 13px;
  }

  .sports-stat-strip strong {
    font-size: 20px;
  }

  .sports-entry-grid {
    gap: 10px;
  }

  .sports-record-form {
    grid-template-columns: 1fr;
  }

  .sports-form-wide {
    grid-column: auto;
  }

  .sports-record-form .primary-button {
    min-height: 46px;
  }
}

@media (max-width: 390px) {
  .sports-main-hero {
    min-height: 350px;
  }

  .sports-hero-actions {
    grid-template-columns: 1fr;
  }

  .sports-log-row {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
  }

  .sports-log-icon {
    width: 32px;
    height: 32px;
  }

  .sports-log-row .record-card-actions .sports-delete-btn {
    display: none;
  }
}

/* Information architecture refresh */
.context-nav {
  position: sticky;
  top: 72px;
  z-index: 29;
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 14px;
  padding: 6px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px);
}

.context-nav[hidden] {
  display: none;
}

.context-nav > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.context-nav > div {
  display: flex;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.context-nav > div::-webkit-scrollbar {
  display: none;
}

.context-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.context-nav button svg {
  width: 15px;
  height: 15px;
}

.context-nav button b {
  font-size: 12px;
}

.context-nav button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.context-nav button.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.course-workspace-embedded {
  margin-top: 14px;
  scroll-margin-top: 132px;
}

.course-workspace-embedded > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  box-shadow: var(--shadow-sm);
}

.course-workspace-embedded > summary::-webkit-details-marker {
  display: none;
}

.course-workspace-embedded > summary > span {
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 1px 10px;
}

.course-workspace-embedded > summary > span > svg {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.course-workspace-embedded > summary strong {
  font-size: 13px;
}

.course-workspace-embedded > summary small {
  color: var(--muted);
  font-size: 10px;
}

.course-workspace-embedded > summary > svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.course-workspace-embedded[open] > summary > svg {
  transform: rotate(180deg);
}

.course-workspace-content {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.nav-centers .nav-item {
  min-height: 42px;
}

.capture-module {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 7px;
  background: var(--surface);
}

.capture-module-heading,
.capture-module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.capture-module-heading {
  margin-bottom: 10px;
}

.capture-module-heading h3 {
  font-size: 16px;
}

.capture-module-heading > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.capture-module .capture-bar {
  margin: 0;
  box-shadow: none;
}

.capture-module-footer {
  margin-top: 9px;
}

.capture-module-footer p {
  max-width: 720px;
  color: var(--muted);
  font-size: 11px;
}

.capture-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.capture-preview > button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  text-align: left;
}

.capture-preview > button > svg:first-child {
  padding: 6px;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.capture-preview > button span,
.capture-preview > button strong,
.capture-preview > button small {
  min-width: 0;
}

.capture-preview > button strong,
.capture-preview > button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-preview > button strong {
  font-size: 12px;
}

.capture-preview > button small {
  font-size: 10px;
}

.capture-preview-more {
  display: flex !important;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.capture-preview-clear {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.hub-view {
  --hub-accent: var(--primary);
  --hub-soft: var(--primary-soft);
}

#researchHub {
  --hub-accent: var(--success);
  --hub-soft: var(--success-soft);
}

#growthHub {
  --hub-accent: var(--accent);
  --hub-soft: var(--accent-soft);
}

body.dark #researchHub {
  --hub-accent: var(--success);
  --hub-soft: var(--success-soft);
}

body.dark #growthHub {
  --hub-accent: var(--accent);
  --hub-soft: var(--accent-soft);
}

.hub-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 18px;
  padding: 10px 2px 20px;
  border-bottom: 2px solid var(--hub-accent);
}

.hub-intro > div:first-child {
  max-width: 780px;
}

.hub-intro h3 {
  margin: 3px 0 6px;
  font-size: clamp(22px, 2.1vw, 34px);
  line-height: 1.25;
}

.hub-intro > div:first-child > p:last-child {
  color: var(--muted);
  font-size: 13px;
}

.hub-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.hub-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hub-metric-grid > button {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--hub-accent);
  border-radius: 7px;
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.hub-metric-grid > button:hover {
  border-color: var(--hub-accent);
  transform: translateY(-1px);
}

.hub-metric-grid > button > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.hub-metric-grid > button > span svg {
  width: 15px;
  height: 15px;
  color: var(--hub-accent);
}

.hub-metric-grid > button > strong {
  color: var(--ink);
  font-size: 27px;
  line-height: 1.2;
}

.hub-metric-grid > button > small {
  font-size: 10px;
}

.hub-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: stretch;
  gap: 12px;
}

.hub-dashboard-grid > .panel {
  min-width: 0;
}

.hub-wide-panel {
  grid-column: 1 / -1;
}

.week-load-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  height: 220px;
  gap: 8px;
  padding-top: 8px;
}

.week-load-chart button {
  display: grid;
  grid-template-rows: minmax(110px, 1fr) auto auto;
  min-width: 0;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.week-load-chart button > span {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-soft);
}

.week-load-chart button > span b {
  width: min(34px, 65%);
  border-radius: 4px 4px 0 0;
  background: var(--hub-accent);
}

.week-load-chart button.today > span {
  outline: 2px solid var(--hub-accent);
  outline-offset: 2px;
}

.week-load-chart button strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.week-load-chart button small {
  font-size: 9px;
}

.hub-compact-list {
  display: grid;
  gap: 6px;
}

.hub-compact-list > button {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 16px;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.hub-compact-list > button:last-child {
  border-bottom: 0;
}

.hub-compact-list time,
.hub-kind {
  color: var(--hub-accent);
  font-size: 10px;
  font-weight: 700;
}

.hub-compact-list > button span,
.hub-compact-list > button strong,
.hub-compact-list > button small {
  min-width: 0;
}

.hub-compact-list > button strong,
.hub-compact-list > button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-compact-list > button strong {
  font-size: 12px;
}

.hub-deadline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hub-deadline-grid > button {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: var(--surface-soft);
  text-align: left;
}

.hub-deadline-grid > button.urgent {
  border-left-color: var(--warning);
}

.hub-deadline-grid > button.overdue {
  border-left-color: var(--danger);
}

.hub-deadline-grid > button span,
.hub-deadline-grid > button small,
.hub-deadline-grid > button em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.hub-deadline-grid > button strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-deadline-grid > button em {
  color: var(--primary-dark);
  font-weight: 700;
}

.research-pipeline-panel {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.research-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
}

.research-pipeline > button {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 1px 9px;
  padding: 11px 22px 11px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.research-pipeline > button:last-child {
  border-right: 0;
}

.research-pipeline > button > span {
  display: grid;
  grid-row: 1 / 4;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  background: var(--hub-soft);
  color: var(--hub-accent);
}

.research-pipeline > button > small {
  color: var(--faint);
  font-size: 8px;
}

.research-pipeline > button > strong {
  font-size: 12px;
}

.research-pipeline > button > b {
  position: absolute;
  top: 10px;
  right: 21px;
  color: var(--hub-accent);
  font-size: 17px;
}

.research-pipeline > button > em {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-pipeline > button > svg {
  position: absolute;
  right: 5px;
  top: 50%;
  width: 13px;
  height: 13px;
  color: var(--faint);
  transform: translateY(-50%);
}

.asset-bar-chart,
.competency-mini-chart {
  display: grid;
  gap: 10px;
}

.asset-bar-chart button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 26px;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
}

.asset-bar-chart button > span,
.competency-mini-chart b {
  display: block;
  overflow: hidden;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-soft);
}

.asset-bar-chart button > span b,
.competency-mini-chart b i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--hub-accent);
}

.asset-bar-chart button strong,
.asset-bar-chart button em {
  font-size: 10px;
  font-style: normal;
}

.asset-bar-chart button strong {
  color: var(--muted);
}

.asset-bar-chart button em {
  color: var(--hub-accent);
  font-weight: 700;
}

.competency-mini-chart > div {
  display: grid;
  gap: 4px;
}

.competency-mini-chart > div > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.competency-mini-chart strong,
.competency-mini-chart em {
  font-size: 10px;
  font-style: normal;
}

.competency-mini-chart em {
  color: var(--hub-accent);
  font-weight: 700;
}

.wellbeing-week-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  height: 205px;
  gap: 7px;
}

.wellbeing-week-chart > div {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto auto;
  gap: 3px;
  text-align: center;
}

.wellbeing-week-chart > div > span {
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 5px;
  background: var(--surface-soft);
}

.wellbeing-week-chart > div > span b {
  width: 58%;
  border-radius: 4px 4px 0 0;
  background: var(--hub-accent);
  opacity: 0.86;
}

.wellbeing-week-chart > div.today > span {
  outline: 2px solid var(--hub-accent);
  outline-offset: 2px;
}

.wellbeing-week-chart strong,
.wellbeing-week-chart small {
  font-size: 9px;
}

.stage-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 18px 0 5px;
}

.stage-track::before {
  position: absolute;
  top: 15px;
  right: 7%;
  left: 7%;
  height: 2px;
  background: var(--line);
  content: "";
}

.stage-track > span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
}

.stage-track i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.stage-track strong {
  color: var(--muted);
  font-size: 10px;
}

.stage-track .done i,
.stage-track .active i {
  border-color: var(--hub-accent);
  background: var(--hub-accent);
  color: #fff;
}

.stage-track .active strong {
  color: var(--hub-accent);
}

/* Resource hub: one filter system and visual website cards */
.resource-header {
  align-items: end;
  gap: 18px;
}

.resource-header-metrics {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.resource-header-metrics > span {
  display: grid;
  min-width: 78px;
  padding: 8px 10px;
  border-left: 2px solid var(--primary);
  background: var(--surface-soft);
}

.resource-header-metrics strong {
  font-size: 18px;
  line-height: 1.1;
}

.resource-header-metrics small {
  font-size: 9px;
}

.resource-group-filters {
  width: 100%;
  margin: 12px 0;
}

.resource-group-filters button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 15px;
  font-size: 13px;
}

.resource-toolbar {
  align-items: stretch;
}

.resource-search {
  width: min(560px, 100%);
}

.resource-category-select {
  display: grid;
  grid-template-columns: 17px auto minmax(160px, 1fr);
  align-items: center;
  min-height: 40px;
  gap: 7px;
  padding-left: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
}

.resource-category-select span {
  font-size: 11px;
  font-weight: 700;
}

.resource-category-select select {
  height: 100%;
  padding: 0 30px 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

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

.resource-section {
  padding: 16px;
}

.resource-section .panel-heading {
  min-height: 52px;
}

.resource-section .panel-heading h3 {
  max-width: 620px;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.55;
}

.resource-section .link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.resource-link-row {
  grid-template-columns: minmax(0, 1fr) 36px;
  min-height: 64px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--surface);
}

.resource-link-row > a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 15px;
  align-items: center;
  min-height: 62px;
  gap: 10px;
  padding: 8px 9px;
  text-decoration: none;
}

.resource-site-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.resource-tone-tool .resource-site-icon {
  background: var(--success-soft);
  color: var(--success);
}

.resource-tone-life .resource-site-icon {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.resource-site-icon svg {
  width: 19px;
  height: 19px;
}

.resource-link-copy,
.resource-link-copy strong,
.resource-link-copy small {
  min-width: 0;
}

.resource-link-copy strong,
.resource-link-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-link-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.resource-link-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.resource-open-icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.resource-star {
  width: 36px;
  border-radius: 0 6px 6px 0;
}

.resource-star svg {
  width: 15px;
  height: 15px;
}

.resource-access {
  margin-left: 5px;
  font-size: 8px;
}

@media (max-width: 1100px) {
  .hub-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .research-pipeline > button:nth-child(3) {
    border-right: 0;
  }

  .research-pipeline > button:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .resource-header {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .resource-inline-form {
    flex-basis: 100%;
  }

  .resource-section .link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .context-nav {
    top: 64px;
    min-height: 45px;
    padding: 5px 14px;
  }

  .context-nav > span {
    display: none;
  }

  .context-nav button {
    min-height: 33px;
    padding: 0 9px;
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .capture-preview {
    grid-template-columns: 1fr;
  }

  .capture-module-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hub-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hub-actions {
    width: 100%;
  }

  .hub-actions button {
    flex: 1 1 0;
    justify-content: center;
  }

  .hub-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hub-wide-panel {
    grid-column: auto;
  }

  .hub-deadline-grid {
    grid-template-columns: 1fr;
  }

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

  .research-pipeline > button,
  .research-pipeline > button:nth-child(3),
  .research-pipeline > button:nth-child(n + 4) {
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .research-pipeline > button:last-child {
    border-bottom: 0;
  }

  .resource-header-metrics {
    width: 100%;
  }

  .resource-header-metrics > span {
    flex: 1 1 0;
    min-width: 0;
  }

  .resource-category-select {
    width: 100%;
  }

  .resource-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .context-nav {
    top: 58px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .context-nav button svg {
    display: none;
  }

  .hub-intro {
    margin-bottom: 12px;
    padding-top: 2px;
    padding-bottom: 14px;
  }

  .hub-intro h3 {
    font-size: 22px;
  }

  .hub-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .hub-metric-grid > button {
    padding: 11px;
  }

  .hub-metric-grid > button > strong {
    font-size: 22px;
  }

  .week-load-chart {
    height: 180px;
    gap: 4px;
  }

  .week-load-chart button {
    grid-template-rows: minmax(90px, 1fr) auto auto;
  }

  .week-load-chart button > span b {
    width: 62%;
  }

  .stage-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 4px;
  }

  .stage-track::before {
    display: none;
  }

  .resource-header-metrics strong {
    font-size: 16px;
  }

  .resource-group-filters button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .resource-section {
    padding: 12px;
  }

  .resource-link-row {
    min-height: 60px;
  }

  .resource-link-row > a {
    min-height: 58px;
  }
}

/* Visual system v13: quiet academic workspace */
:root {
  color-scheme: light;
  --canvas: #ffffff;
  --canvas-deep: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-raised: #ffffff;
  --ink: #16233b;
  --ink-soft: #3d4d63;
  --muted: #63718a;
  --faint: #96a3b8;
  --line: #e2e7f0;
  --line-strong: #c8d1e0;
  --primary: #2f5b96;
  --primary-dark: #234877;
  --primary-soft: #e4ebf6;
  --accent: #ff6b5e;
  --accent-dark: #e85445;
  --accent-soft: #fdecea;
  --success: #189a6a;
  --success-soft: #e0f3ea;
  --warning: #e0a11c;
  --warning-soft: #fdf3dd;
  --danger: #e5484d;
  --danger-soft: #fde9ea;
  --info: #2f5b96;
  --info-soft: #e4ebf6;
  --blue: #2f5b96;
  --blue-soft: #e4ebf6;
  --amber: #d99420;
  --amber-soft: #fdf3dd;
  --coral: #ff6b5e;
  --coral-soft: #fdecea;
  --sidebar: #ffffff;
  --sidebar-soft: #f7f9fc;
  --sidebar-ink: #16233b;
  --sidebar-muted: #63718a;
  --shadow-sm: 0 1px 3px rgba(22, 35, 59, 0.06);
  --shadow-md: 0 10px 30px rgba(22, 35, 59, 0.10);
  --shadow-lg: 0 20px 50px rgba(22, 35, 59, 0.14);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-width: 236px;
}

body.dark {
  color-scheme: dark;
  --canvas: #0f1728;
  --canvas-deep: #0a0f1d;
  --surface: #182136;
  --surface-soft: #182136;
  --surface-raised: #222d45;
  --ink: #eef2f9;
  --ink-soft: #c3cde0;
  --muted: #8b98b0;
  --faint: #5d6a80;
  --line: #2b3854;
  --line-strong: #3c4c6e;
  --primary: #7a9df0;
  --primary-dark: #9db8f5;
  --primary-soft: #1c2742;
  --accent: #ff7d72;
  --accent-dark: #ff9489;
  --accent-soft: #3a2322;
  --success: #4cc38a;
  --success-soft: #1c3a2e;
  --warning: #f0b842;
  --warning-soft: #3a2f1c;
  --danger: #f0716b;
  --danger-soft: #3a2322;
  --info: #7a9df0;
  --info-soft: #1c2742;
  --blue: #7a9df0;
  --blue-soft: #1c2742;
  --amber: #f0b842;
  --amber-soft: #3a2f1c;
  --coral: #ff7d72;
  --coral-soft: #3a2322;
  --sidebar: #182136;
  --sidebar-soft: #222d45;
  --sidebar-ink: #eef2f9;
  --sidebar-muted: #8b98b0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.40);
}

body {
  background: var(--canvas);
  font-family: "PingFang SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

h1,
h2,
h3,
h4,
button,
input,
select,
textarea {
  font-family: inherit;
}

.sidebar,
body.dark .sidebar {
  border-right-color: var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
  color: var(--sidebar-ink);
}

body.dark .sidebar {
  background: linear-gradient(180deg, #182136 0%, #0f1728 100%);
}

.brand,
body.dark .brand {
  border-bottom-color: var(--line);
}

.brand p,
body.dark .brand p,
.nav-label,
.nav-group-toggle > svg,
body.dark .nav-label,
body.dark .nav-group-toggle > svg {
  color: var(--sidebar-muted);
}

.brand-mark {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.nav-item,
body.dark .nav-item {
  color: var(--sidebar-muted);
}

.nav-item:hover,
body.dark .nav-item:hover {
  background: var(--sidebar-soft);
  color: var(--sidebar-ink);
}

.nav-item.active,
body.dark .nav-item.active {
  border-color: var(--line-strong);
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: inset 3px 0 var(--primary);
}

.nav-item.active svg,
body.dark .nav-item.active svg {
  color: var(--primary-dark);
}

.resources-quick-entry,
.resources-quick-entry.active {
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, #2f5b96 0%, #234877 100%);
  box-shadow: none;
}

.resources-quick-entry:hover,
.resources-quick-entry.active:hover {
  background: linear-gradient(135deg, #234877 0%, #2f5b96 100%);
  box-shadow: none;
}

body.dark .resources-quick-entry,
body.dark .resources-quick-entry.active {
  border-color: #3c4c6e;
  background: linear-gradient(135deg, #1c2742 0%, #234877 100%);
}

body.dark .resources-quick-entry:hover,
body.dark .resources-quick-entry.active:hover {
  background: linear-gradient(135deg, #234877 0%, #1c2742 100%);
}

.resources-entry-icon {
  background: rgba(255, 255, 255, 0.12);
}

.local-status,
body.dark .local-status {
  border-color: var(--line);
  background: var(--sidebar-soft);
  color: var(--sidebar-muted);
}

.local-status strong,
body.dark .local-status strong {
  color: var(--sidebar-ink);
}

.local-status svg,
body.dark .local-status svg {
  color: var(--primary);
}

.topbar {
  min-height: 68px;
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
}

.global-search-wrap,
.icon-button,
.sync-status {
  box-shadow: none;
}

.main {
  width: min(100%, 1560px);
  padding-top: 22px;
}

.panel,
.panel-elevated,
.capture-module,
.research-pipeline-panel {
  box-shadow: none;
}

.panel {
  border-color: var(--line);
  background: var(--surface);
}

.panel-elevated {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  box-shadow: none;
}

.panel-subtle {
  padding: 15px 2px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.dashboard-rail > .panel-subtle:first-child {
  border-top-color: transparent;
}

.panel-heading {
  margin-bottom: 12px;
}

.panel-kicker,
.eyebrow,
.section-label {
  letter-spacing: 0;
}

.dashboard-controlbar {
  min-height: 34px;
  margin-bottom: 9px;
}

.dashboard-mode-switch,
.segmented {
  background: var(--surface-soft);
  box-shadow: none;
}

.dashboard-intro {
  position: relative;
  grid-template-columns: minmax(0, 1.2fr) minmax(270px, 0.62fr);
  min-height: 218px;
  gap: 28px;
  margin-bottom: 12px;
  padding: 22px 26px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.dashboard-intro::before {
  position: absolute;
  inset: 0 0 0 auto;
  width: 41%;
  border-left: 1px solid rgba(255, 255, 255, 0.7);
  background: url("./assets-study-desk-hero.8ec0335c2382.png") 64% 52% / cover no-repeat;
  content: "";
  pointer-events: none;
}

.dashboard-intro::after {
  display: none;
}

body.dark .dashboard-intro::before {
  opacity: 0.72;
}

.hero-copy h1 {
  max-width: 540px;
  margin: 2px 0 7px;
  font-size: clamp(28px, 2.7vw, 38px);
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.18;
}

.hero-copy h1 em {
  color: var(--primary-dark);
}

.hero-description {
  max-width: 520px;
  margin-bottom: 12px;
  font-size: 12px;
}

.hero-focus-field > span,
.weekly-intent span {
  color: var(--primary-dark);
}

.focus-input {
  max-width: 620px;
  padding-bottom: 4px !important;
  font-size: 18px;
}

.weekly-intent {
  margin-top: 5px;
}

.hero-side {
  align-content: end;
  gap: 8px;
}

.check-in-btn,
.hero-progress {
  border-color: color-mix(in srgb, var(--line-strong) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 7px 20px rgba(25, 42, 36, 0.1);
  backdrop-filter: blur(12px);
}

.check-in-btn {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 52px;
  gap: 8px;
  padding: 9px 12px;
  text-align: left;
}

.check-in-btn i {
  grid-row: 1 / 3;
  color: var(--warning);
}

.check-in-btn span,
.check-in-btn small {
  display: block;
}

.check-in-btn small {
  grid-column: 3;
  grid-row: 1 / 3;
}

.check-in-btn.checked {
  border-color: var(--warning);
  background: var(--warning);
}

.hero-progress {
  min-height: 68px;
  border-color: var(--primary-dark);
  background: var(--primary);
}

.hero-progress:hover {
  background: var(--primary-dark);
}

body.dark .hero-progress {
  border-color: var(--primary);
  background: var(--primary-soft);
}

body.dark .hero-progress:hover {
  background: #234877;
}

.capture-module {
  padding: 13px 14px;
  border: 0;
  border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 30%, var(--surface));
}

.capture-module .capture-bar {
  border-color: var(--line);
  background: var(--surface);
}

.summary-grid {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.summary-item {
  min-height: 70px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.summary-item strong {
  font-size: 25px;
}

.habit-row {
  gap: 12px;
}

.completion-panel,
.quote-panel {
  border-color: transparent;
  background: var(--surface-soft);
}

.onboarding-card {
  border-color: color-mix(in srgb, var(--warning) 34%, var(--line));
  background: var(--surface);
  box-shadow: none;
}

.dashboard-layout {
  gap: 18px;
}

.dashboard-main-column {
  gap: 12px;
}

.dashboard-rail {
  gap: 0;
}

.hub-view {
  --hub-accent: var(--primary);
  --hub-soft: var(--primary-soft);
}

#researchHub {
  --hub-accent: var(--success);
  --hub-soft: var(--success-soft);
}

#growthHub {
  --hub-accent: var(--accent);
  --hub-soft: var(--accent-soft);
}

body.dark #researchHub {
  --hub-accent: var(--success);
  --hub-soft: var(--success-soft);
}

body.dark #growthHub {
  --hub-accent: var(--accent);
  --hub-soft: var(--accent-soft);
}

.hub-intro {
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 2px 16px;
  border-bottom: 3px solid var(--hub-accent);
}

.hub-intro .section-label {
  color: var(--hub-accent);
}

.hub-intro h3 {
  margin-top: 2px;
  font-size: clamp(22px, 2vw, 30px);
}

.hub-metric-grid {
  gap: 9px;
}

.hub-metric-grid > button {
  border-color: transparent;
  border-top-color: var(--hub-accent);
  background: color-mix(in srgb, var(--hub-soft) 34%, var(--surface));
  box-shadow: none;
}

.hub-dashboard-grid {
  gap: 14px;
}

.hub-dashboard-grid > .panel {
  border-top: 2px solid color-mix(in srgb, var(--hub-accent) 72%, var(--line));
}

.research-pipeline-panel {
  border: 0;
  border-top: 2px solid var(--hub-accent);
  border-radius: 0;
  background: transparent;
}

.resource-header {
  min-height: 82px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--line-strong);
}

.resource-header h3 {
  font-size: 26px;
}

.resource-header-metrics > span {
  border-left-color: var(--line-strong);
  background: transparent;
}

.resource-group-filters {
  margin-top: 10px;
  margin-bottom: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.resource-group-filters button {
  border-bottom: 3px solid transparent;
  border-radius: 0;
}

.resource-group-filters button.active {
  border-bottom-color: var(--primary);
  background: transparent;
  box-shadow: none;
  color: var(--primary-dark);
}

.resource-section {
  padding: 15px 0 4px;
  border: 0;
  border-top: 2px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.resource-section .panel-heading {
  padding: 0 2px;
}

.resource-link-row {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.resource-link-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.resource-site-icon {
  border-radius: 6px;
}

.context-nav {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

@media (max-width: 1020px) {
  .dashboard-intro {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.58fr);
  }

  .dashboard-intro::before {
    width: 40%;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: auto;
    padding-right: 12px;
    padding-left: 12px;
  }

  .main {
    padding: 12px 12px calc(78px + env(safe-area-inset-bottom));
  }

  .dashboard-controlbar {
    margin-bottom: 8px;
  }

  .dashboard-intro {
    display: block;
    min-height: 0;
    padding: 112px 18px 17px;
  }

  .dashboard-intro::before {
    inset: 0 0 auto;
    width: 100%;
    height: 94px;
    border-bottom: 1px solid var(--line);
    border-left: 0;
    background-position: 56% 49%;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 30px;
  }

  .hero-description {
    max-width: none;
  }

  .hero-side {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    margin-top: 13px;
  }

  .check-in-btn,
  .hero-progress {
    min-width: 0;
    box-shadow: none;
  }

  .check-in-btn {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .check-in-btn small {
    grid-column: 2;
    grid-row: 2;
  }

  .hero-progress {
    min-height: 58px;
    padding: 10px 12px;
  }

  .hub-intro {
    align-items: flex-start;
  }

  .resource-header {
    padding-bottom: 12px;
  }

  .resource-section {
    padding-top: 13px;
  }

  .mobile-bottom-nav {
    min-height: calc(60px + env(safe-area-inset-bottom));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: max(8px, env(safe-area-inset-left));
    border-top-color: var(--line-strong);
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    box-shadow: 0 -6px 18px rgba(25, 42, 36, 0.08);
  }

  .mobile-bottom-nav button.active {
    background: transparent;
    color: var(--primary-dark);
  }

  .mobile-bottom-nav button.active::before {
    position: absolute;
    top: 3px;
    width: 24px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary);
    content: "";
  }

  .mobile-bottom-nav button {
    position: relative;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 6px 8px;
    padding-top: calc(7px + env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .global-search-wrap {
    min-height: 39px;
  }

  .topbar-title h2 {
    font-size: 17px;
  }

  .sync-status {
    min-width: 70px;
    height: 34px;
  }

  .dashboard-mode-hint {
    display: none;
  }

  .dashboard-controlbar {
    flex-wrap: nowrap;
  }

  .dashboard-controlbar .secondary-button {
    margin-left: auto;
  }

  .dashboard-intro {
    padding: 88px 14px 14px;
  }

  .dashboard-intro::before {
    height: 74px;
  }

  .dashboard-intro .section-label {
    margin-bottom: 1px;
  }

  .hero-copy h1 {
    margin-bottom: 8px;
    font-size: 26px;
    line-height: 1.2;
  }

  .hero-description {
    display: none;
  }

  .focus-input {
    font-size: 17px;
  }

  .weekly-intent {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }

  .weekly-intent input {
    font-size: 14px !important;
  }

  .hero-side {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 7px;
    margin-top: 10px;
  }

  .check-in-btn {
    min-height: 56px;
    padding: 8px;
  }

  .check-in-btn i {
    display: none;
  }

  .check-in-btn span,
  .check-in-btn small {
    grid-column: 1 / -1;
  }

  .check-in-btn span {
    grid-row: 1;
  }

  .check-in-btn small {
    grid-row: 2;
  }

  .hero-progress > strong {
    font-size: 23px;
  }

  .hero-progress > em {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .capture-module {
    padding: 12px;
  }

  .summary-item {
    min-height: 66px;
  }

  .hub-intro h3,
  .resource-header h3 {
    font-size: 21px;
  }

  .hub-metric-grid > button {
    min-height: 94px;
  }

  .resource-header-metrics > span {
    padding-right: 7px;
    padding-left: 7px;
  }

  .resource-section .link-grid {
    gap: 7px;
  }

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

  .mobile-bottom-nav button {
    min-height: 52px;
    font-size: 10px;
  }
}
/* ============================================================
   PREMIUM DESIGN SYSTEM v2  (quiet-luxury academic workspace)
   覆盖层: 追加于样式表末尾, 覆盖旧视觉层。仅影响外观, 不改功能。
   参考语言: Apple / Notion / Linear 式静奢极简:
   - 暖白画布 + 墨黑文字 + 单一宝蓝强调色 (克制用色)
   - 排版层级优先 (字号/字重/字距), 非颜色堆叠
   - 大圆角细描边柔和阴影 + 顶部淡光晕 + 微动效
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  color-scheme: light;
  --canvas: #F6F5F2;
  --canvas-deep: #EFEDE8;
  --surface: #FFFFFF;
  --surface-soft: #FAFAF8;
  --surface-raised: #FFFFFF;
  --ink: #1B1B20;
  --ink-soft: #3F3F46;
  --muted: #71717A;
  --faint: #A3A3AC;
  --line: #ECEBE7;
  --line-strong: #DCDBD5;
  --primary: #3556E8;
  --primary-dark: #2748C4;
  --primary-soft: #EDF0FD;
  --primary-mist: #F4F6FF;
  --primary-ink: #23306E;
  --accent: #4A5FE8;
  --accent-dark: #3B50D0;
  --accent-soft: #EDF0FD;
  --success: #2F66D6;
  --success-soft: #ECF1FE;
  --warning: #B7791F;
  --warning-soft: #FBF3E4;
  --danger: #D64545;
  --danger-soft: #FBEDED;
  --info: #3556E8;
  --info-soft: #EDF0FD;
  --blue: #3556E8;
  --blue-soft: #EDF0FD;
  --amber: #B7791F;
  --amber-soft: #FBF3E4;
  --coral: #4A5FE8;
  --coral-soft: #EDF0FD;
  --sidebar: #FBFBF9;
  --sidebar-soft: #F3F2EE;
  --sidebar-ink: #1B1B20;
  --sidebar-muted: #71717A;
  --shadow-sm: 0 1px 2px rgba(27, 27, 32, 0.04);
  --shadow-md: 0 2px 6px rgba(27, 27, 32, 0.04), 0 14px 36px -12px rgba(27, 27, 32, 0.10);
  --shadow-lg: 0 6px 16px rgba(27, 27, 32, 0.06), 0 28px 70px -16px rgba(27, 27, 32, 0.14);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-num: "SF Pro Display", -apple-system, "PingFang SC", sans-serif;
}

body.dark {
  color-scheme: dark;
  --canvas: #0F1115;
  --canvas-deep: #0B0D11;
  --surface: #16181E;
  --surface-soft: #1B1E25;
  --surface-raised: #20232B;
  --ink: #F4F4F6;
  --ink-soft: #C9CBD2;
  --muted: #8B8E98;
  --faint: #5D6069;
  --line: #262A31;
  --line-strong: #343943;
  --primary: #7C8CF5;
  --primary-dark: #93A0F8;
  --primary-soft: #20264A;
  --primary-mist: #191E3A;
  --primary-ink: #BCC4FF;
  --accent: #8A9BFF;
  --accent-dark: #A5B3FF;
  --accent-soft: #20264A;
  --success: #7C9AF0;
  --success-soft: #1D2740;
  --warning: #D9A44A;
  --warning-soft: #332A1A;
  --danger: #E4665F;
  --danger-soft: #3A2222;
  --info: #7C8CF5;
  --info-soft: #20264A;
  --blue: #7C8CF5;
  --blue-soft: #20264A;
  --amber: #D9A44A;
  --amber-soft: #332A1A;
  --coral: #8A9BFF;
  --coral-soft: #20264A;
  --sidebar: #12141A;
  --sidebar-soft: #181B22;
  --sidebar-ink: #F4F4F6;
  --sidebar-muted: #8B8E98;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.30), 0 16px 40px -14px rgba(0, 0, 0, 0.50);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.36), 0 32px 80px -20px rgba(0, 0, 0, 0.60);
}

/* ---------- 2. 全局氛围 / 排版 ---------- */
body {
  background:
    radial-gradient(1100px 420px at 50% -140px, rgba(53, 86, 232, 0.055), transparent 62%),
    radial-gradient(800px 320px at 100% 110%, rgba(222, 91, 85, 0.030), transparent 60%),
    var(--canvas);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.005em;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

body.dark {
  background:
    radial-gradient(1100px 420px at 50% -140px, rgba(124, 140, 245, 0.075), transparent 62%),
    radial-gradient(800px 320px at 100% 110%, rgba(242, 114, 106, 0.040), transparent 60%),
    var(--canvas);
  background-attachment: fixed;
}

body, button, input, select, textarea {
  font-family: inherit;
}

::selection { background: var(--primary-soft); color: var(--primary-ink); }

/* 滚动条克制化 */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* 数字/数据: 等宽数字, 更精致 */
b, strong, .hero-progress strong, .focus-trend-chart, .stat-value,
[id$="Metric"], [id*="Count"] { font-variant-numeric: tabular-nums; }

/* ---------- 3. 顶栏 / 搜索 ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-title h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.global-search-wrap {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.global-search-wrap:focus-within {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent), var(--shadow-md);
  background: var(--surface);
}
.global-search-wrap input { font-size: 14px; }
.global-search-wrap kbd {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
  border-radius: 6px;
  padding: 2px 6px;
}

/* ---------- 4. 控制条 / 分段切换 ---------- */
.dashboard-controlbar {
  padding: 14px 0 18px;
}
.dashboard-mode-hint { color: var(--muted); }

.segmented {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 3px;
}
.segmented button {
  border-radius: 999px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.segmented button.active,
.segmented button[aria-pressed="true"],
.segmented button.is-active {
  background: var(--surface);
  color: var(--primary-ink);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* ---------- 5. 主按钮 / 次要按钮 / 文字按钮 / 图标按钮 ---------- */
.primary-button {
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 96%, #fff) 0%, var(--primary) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 1px 2px rgba(39,72,196,.25), 0 8px 20px -6px rgba(53,86,232,.45);
  font-weight: 600;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.primary-button:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 2px 4px rgba(39,72,196,.25), 0 14px 30px -8px rgba(53,86,232,.5); }
.primary-button:active { transform: translateY(0); }

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 10px;
  font-weight: 500;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .18s var(--ease);
}
.secondary-button:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line-strong)); background: var(--surface); }

.text-button {
  color: var(--primary);
  font-weight: 500;
  transition: opacity .2s var(--ease);
}
.text-button:hover { opacity: .8; }

.icon-button {
  border-radius: 10px;
  color: var(--muted);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .18s var(--ease);
}
.icon-button:hover { background: var(--surface-soft); color: var(--ink-soft); }

/* ---------- 6. 首页 Hero ---------- */
.dashboard-hero {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
}

.hero-copy .section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.hero-copy .section-label::before {
  content: "";
  width: 14px; height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.hero-copy h1 {
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
  margin: 10px 0 12px;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--primary);
  background: linear-gradient(120deg, var(--primary) 20%, color-mix(in srgb, var(--primary) 55%, #6C5CE7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: 34em;
}

.hero-focus-field,
.weekly-intent {
  display: block;
  margin-top: 16px;
}
.hero-focus-field > span,
.weekly-intent > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.hero-focus-field input,
.weekly-intent input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 13px 15px !important;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), background-color .22s var(--ease);
}
.hero-focus-field input::placeholder,
.weekly-intent input::placeholder { color: var(--faint); }
.hero-focus-field input:focus,
.weekly-intent input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 60%, var(--line-strong));
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Hero 右侧: 签到 + 专注统计 */
.hero-side {
  display: grid;
  gap: 14px;
}

.check-in-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.check-in-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.check-in-btn i { color: var(--amber); }
.check-in-btn.checked {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--warning-soft) 80%, #fff), var(--warning-soft));
}
.check-in-btn.checked i { color: var(--warning); }

.hero-progress {
  min-height: 78px;
  border: 1px solid color-mix(in srgb, var(--primary-dark) 70%, transparent);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 55%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 10px 26px -10px rgba(39,72,196,.55);
  color: #fff;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease);
}
.hero-progress:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 16px 34px -10px rgba(39,72,196,.6); }
.hero-progress > span { font-weight: 600; letter-spacing: .02em; }
.hero-progress > strong { font-weight: 650; }
.hero-progress > em { color: rgba(255,255,255,.82); }

body.dark .hero-progress {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 55%),
    var(--primary-soft);
  box-shadow: var(--shadow-sm);
}
body.dark .hero-progress > span,
body.dark .hero-progress > em { color: var(--ink-soft); }
body.dark .hero-progress:hover { background: var(--surface-raised); box-shadow: var(--shadow-md); }

/* ---------- 7. 收集箱 / 通用卡片面板 ---------- */
.capture-module,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.capture-module:hover,
.panel:hover { box-shadow: var(--shadow-md); }

.panel-heading,
.capture-module-heading {
  padding-bottom: 6px;
}
.panel-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.panel-heading h3,
.capture-module-heading h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* 收集箱输入行 */
.capture-bar {
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 6px;
  gap: 8px;
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), background-color .22s var(--ease);
}
.capture-bar:focus-within {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line-strong));
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 10%, transparent);
}
.capture-bar input {
  background: transparent;
  border: 0;
  font-size: 14px;
}
.capture-bar select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink-soft);
}
.capture-bar button[type="submit"] {
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 14px -6px rgba(53,86,232,.5);
}
body.dark .capture-bar button[type="submit"] { color: #fff; }

.capture-module-footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* 面板细节点 */
.panel-subtle { background: var(--surface-soft); border-color: var(--line); }
.panel-elevated { box-shadow: var(--shadow-md); border-color: var(--line); }

/* ---------- 8. 底部导航 ---------- */
.mobile-bottom-nav {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.mobile-bottom-nav button[data-mobile-view] {
  border-radius: 12px;
  color: var(--muted);
  transition: color .2s var(--ease), background-color .2s var(--ease), transform .18s var(--ease);
}
.mobile-bottom-nav button[data-mobile-view].active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 70%, transparent);
  font-weight: 600;
}
.mobile-bottom-nav button[data-mobile-view]:active { transform: scale(.94); }
.mobile-bottom-nav button[data-mobile-view] i { transition: transform .2s var(--ease); }
.mobile-bottom-nav button[data-mobile-view].active i { transform: translateY(-1px); }

/* ---------- 9. 侧边栏 (桌面) ---------- */
.app-shell .sidebar,
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
.sidebar .nav-item { border-radius: 10px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.sidebar .nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-weight: 600;
}

/* ---------- 10. 通用卡片/列表润色 ---------- */
.record-list, .agenda-list, .activity-list, .inbox-list,
.hub-compact-list, .deadline-list, .next-list {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mood-btn, .progress-wrap, .donut-chart-wrap, .bar-chart {
  border-radius: var(--radius);
}

/* 输入/选择/文本域通用 */
input[type="text"], input[type="search"], input[type="number"], input[type="date"],
input[type="email"], input[type="password"], select, textarea {
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), background-color .22s var(--ease);
}

/* 登录卡片 */
.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

/* 全局平滑动效开关 */
button, a, input, select, textarea { transition-timing-function: var(--ease); }

/* ---------- 11. 移动端 (≤820px): hero 紧凑化 + 去掉照片横幅换光晕 ---------- */
@media (max-width: 820px) {
  .dashboard-hero {
    padding: 26px 20px 20px !important;
  }
  /* 原照片横幅替换为极淡主色光晕 */
  .dashboard-hero::before {
    display: block;
    position: absolute;
    inset: 0 0 auto 0;
    width: 100%;
    height: 150px;
    background:
      radial-gradient(380px 150px at 18% 0%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 70%),
      radial-gradient(320px 130px at 92% 6%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 72%);
    border-bottom: 0;
    border-left: 0;
    opacity: 1;
  }
  .hero-copy h1 {
    font-size: 29px;
    letter-spacing: -0.02em;
  }
  .hero-description { display: none; }
  .hero-focus-field { margin-top: 13px; }
  .weekly-intent { margin-top: 11px; }
  .hero-focus-field input,
  .weekly-intent input {
    padding: 12px 14px !important;
    font-size: 14px;
    border-radius: 11px;
  }
  .hero-focus-field > span,
  .weekly-intent > span {
    font-size: 11.5px;
    margin-bottom: 6px;
  }
  .hero-side {
    margin-top: 16px;
    align-content: stretch;
  }
  .check-in-btn { border-radius: 14px; }
  .hero-progress { min-height: 78px; border-radius: 14px; }
}

/* ---------- 12. 全站颜色统一: 分类色/状态色收敛为蓝色系 ----------
   目标: 全站以 蓝(主) + 琥珀(签到/截止/考试, 唯一暖色) + 深红(删除/危险) 三色体系
   消除 绿/粉/紫/青/珊瑚 等杂色。 */

/* 课程分类色: 统一为蓝色系渐变 (orange 保留琥珀作为唯一暖色) */
.schedule-course.color-green  { background: linear-gradient(135deg, #3B6AD8, #2B55C0); color: #fff; }
.schedule-course.color-purple { background: linear-gradient(135deg, #2748C4, #1E3A9E); color: #fff; }
.schedule-course.color-pink   { background: linear-gradient(135deg, #4C63EE, #3B50D0); color: #fff; }
.schedule-course.color-cyan   { background: linear-gradient(135deg, #2F6BD8, #2357C0); color: #fff; }
.schedule-course.color-red    { background: linear-gradient(135deg, #2445A8, #1C358A); color: #fff; }
.schedule-course.color-blue   { background: linear-gradient(135deg, #3556E8, #2748C4); color: #fff; }
.schedule-course.color-orange { background: linear-gradient(135deg, #B7791F, #9A6417); color: #fff; }

/* 成功态(登录成功/完成等): 由绿统一为蓝 */
.auth-message.is-success { color: #2F66D6; }

/* 签到已打卡: 由绿/橙统一为琥珀金(与火焰图标一致) */
.check-in-btn.checked {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--warning-soft) 80%, #fff), var(--warning-soft));
}

/* 里程碑/趋势 etc 若引用旧绿: 兜底为蓝 */
.danger-zone .deadline-row.warning,
.risk-item.warning,
.tag-green,
.label-green { color: var(--success) !important; border-color: var(--success-soft) !important; background: var(--success-soft) !important; }

/* ============================================================
   V4 · LAYOUT RESTRUCTURE 布局重构
   目标: 今日工作台从"13个同等重卡片堆叠" → 有主次、有分组、有呼吸感
   ============================================================ */

/* 1) kicker 小标签降噪: 蓝→中性灰, 更小更淡, 不抢主标题 */
.panel-kicker {
  color: var(--faint) !important;
  font-weight: 600;
  letter-spacing: 0.14em;
}

/* 2) 模块间距统一加大, 页面呼吸感 */
.dashboard-controlbar { margin-bottom: 10px; }
.capture-module { margin-bottom: 20px; }
.summary-grid { margin-bottom: 20px; }
.habit-row { margin-bottom: 20px; }
#dashboardOnboarding { margin-bottom: 20px; }
.dashboard-main-column,
.dashboard-rail { gap: 16px; }

/* 3) summary 摘要带: 更紧凑, 数字等宽, 去掉笨重感 */
.summary-item { min-height: 64px; padding: 10px 16px; }
.summary-item strong {
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.summary-item span,
.summary-item small { font-size: 10.5px; letter-spacing: 0.02em; }

/* 4) 桌面布局重构 (≥821px) */
@media (min-width: 821px) {
  .dashboard-intro { margin-bottom: 22px !important; }
  .dashboard-layout { gap: 20px; }
  /* habit-row 三卡统一成组 */
  #dashboard .dashboard-mode-daily .habit-row,
  #dashboard .habit-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  #dashboard .dashboard-mode-daily .top-three-panel,
  #dashboard .dashboard-mode-daily .completion-panel,
  #dashboard .dashboard-mode-daily .quote-panel { min-height: auto; }
  /* 面板内边距统一 */
  #dashboard .panel, #dashboard .panel-subtle, #dashboard .panel-elevated, #dashboard .capture-module {
    padding: 18px 20px;
  }
  #dashboard .panel-heading h3,
  #dashboard .capture-module-heading h3 { font-size: 16px; }
}

/* 5) 空状态 / 提示性小字统一弱化 (仅限今日工作台) */

/* 6) 空状态 / 提示性小字统一弱化 (仅限今日工作台) */
#dashboard .panel .panel-heading small,
#dashboard .capture-module-footer p,
#dashboard .top-three-panel .top-three-list .empty,
#dashboard .next-list .empty,
#dashboard .deadline-list .empty,
#dashboard .agenda-list .empty,
#dashboard .task-list .empty {
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 7) hero 桌面右列: 签到/专注卡在照片上做毛玻璃浮层 */
.dashboard-hero .hero-side .check-in-btn {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -12px rgba(27,27,32,.25);
}
.dashboard-hero .hero-side .hero-progress {
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 14px 30px -12px rgba(39,72,196,.6);
}

/* 8) 桌面 hero: 照片保持但右列卡片容器加一点内边距呼吸 */
.dashboard-hero .hero-side { padding: 2px; }

/* 9) onboarding 学期设置: 轻量化为一条设置进度 */
.onboarding-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--primary-mist) 0%, var(--surface) 45%, var(--surface) 100%);
  border: 1px solid var(--line);
}
.onboarding-steps button {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.onboarding-steps button b {
  color: var(--primary);
  font-weight: 650;
}

/* ============================================================
   V4.1 · 文案瘦身 空状态压缩
   今日工作台的空状态从"图标+标题+一整段解释"压成一行
   ============================================================ */

/* 空状态: 单行化, 左对齐, 图标弱化, 隐藏解释段 */
#dashboard .empty-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 14px;
  text-align: left;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-mist);
}
#dashboard .empty-state p { display: none !important; }
#dashboard .empty-state svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: .55;
}
#dashboard .empty-state strong {
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  line-height: 1.4;
}

/* 收集箱: 隐藏说明段, 只剩"整理收集箱"动作 */
#dashboard .capture-module-footer p { display: none !important; }
#dashboard .capture-module-footer {
  justify-content: flex-end;
  margin-top: 10px;
}

/* ============================================================
   V4.2 · 精确修复
   1) 输入框不再压到 hero 照片
   2) 签到按钮可读性(已签到琥珀实底 / 未签到毛玻璃)
   3) 今日工作台三卡等高
   ============================================================ */

/* 1) 输入框不再压照片: 照片对齐右列, 左列输入框右边留白 */
#dashboard .dashboard-intro::before { width: 34%; }
#dashboard .dashboard-intro .hero-focus-field,
#dashboard .dashboard-intro .weekly-intent { margin-right: 44px; }

/* 2) 签到按钮可读性 */
/* 未签到: 毛玻璃白底提高不透明度, 深色文字清晰 */
#dashboard .dashboard-hero .hero-side .check-in-btn {
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  box-shadow: 0 6px 20px -10px rgba(27,27,32,.28);
}
/* 已签到: 恢复琥珀实底 + 白字, 不再被毛玻璃盖住 */
#dashboard .dashboard-hero .hero-side .check-in-btn.checked {
  background: var(--warning) !important;
  border-color: color-mix(in srgb, var(--warning) 80%, #000) !important;
}
#dashboard .dashboard-hero .hero-side .check-in-btn.checked i,
#dashboard .dashboard-hero .hero-side .check-in-btn.checked span,
#dashboard .dashboard-hero .hero-side .check-in-btn.checked small {
  color: #fff !important;
}
#dashboard .dashboard-hero .hero-side .check-in-btn.checked i { opacity: 1; }

/* 3) 三卡等高: 完成度环形图缩小 + 卡片拉伸等高 */
#dashboard .habit-row { align-items: stretch; }
#dashboard .habit-row > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}
#dashboard .completion-panel { justify-content: center; }
#dashboard .completion-ring-wrap { min-height: 0; padding: 4px; }
#dashboard .completion-ring { width: 96px; height: 96px; }
#dashboard .completion-center strong { font-size: 22px; }

/* ============================================================
   VISUAL SYSTEM V15 · BLUE / WHITE RESEARCH WORKSPACE
   A restrained operational UI for long-term study and research.
   ============================================================ */

:root {
  --canvas: #ffffff;
  --canvas-deep: #f4f6f9;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-raised: #ffffff;
  --surface-mist: #f7f9fc;
  --ink: #182230;
  --ink-soft: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e9f0;
  --line-strong: #d2d9e4;
  --primary: #49699f;
  --primary-dark: #304b78;
  --primary-soft: #edf2f8;
  --primary-mist: #f5f8fc;
  --primary-ink: #243c63;
  --accent: #b48132;
  --accent-dark: #8d6322;
  --accent-soft: #fbf4e7;
  --success: #39755f;
  --success-soft: #e9f3ee;
  --warning: #a87327;
  --warning-soft: #fbf3e4;
  --danger: #b94d50;
  --danger-soft: #faeded;
  --info: #49699f;
  --info-soft: #edf2f8;
  --blue: #49699f;
  --blue-soft: #edf2f8;
  --amber: #a87327;
  --amber-soft: #fbf3e4;
  --coral: #b94d50;
  --coral-soft: #faeded;
  --sidebar: #ffffff;
  --sidebar-soft: #f5f8fc;
  --sidebar-ink: #182230;
  --sidebar-muted: #667085;
  --shadow-sm: 0 1px 2px rgba(24, 34, 48, 0.04);
  --shadow-md: 0 8px 24px rgba(24, 34, 48, 0.07);
  --shadow-lg: 0 18px 44px rgba(24, 34, 48, 0.11);
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --sidebar-width: 224px;
}

body.dark {
  --canvas: #111722;
  --canvas-deep: #0c111a;
  --surface: #171f2c;
  --surface-soft: #1c2635;
  --surface-raised: #222e3f;
  --surface-mist: #1c2635;
  --ink: #eef2f7;
  --ink-soft: #c7d0dc;
  --muted: #93a0b1;
  --faint: #667386;
  --line: #2a3647;
  --line-strong: #3a485b;
  --primary: #88a5cf;
  --primary-dark: #acc0dc;
  --primary-soft: #24344d;
  --primary-mist: #1e2b40;
  --primary-ink: #d7e3f2;
  --sidebar: #111722;
  --sidebar-soft: #1c2635;
  --sidebar-ink: #eef2f7;
  --sidebar-muted: #93a0b1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.38);
}

html,
body {
  background: var(--canvas) !important;
}

body,
body * {
  letter-spacing: 0 !important;
}

body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.view.active {
  animation: view-enter 180ms ease-out both;
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar,
body.dark .sidebar {
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  box-shadow: none;
}

.brand {
  min-height: 72px;
  padding: 15px 16px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.resources-quick-entry {
  margin: 12px 10px 8px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--primary-dark) 78%, #0000);
  border-radius: 8px;
  background: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(48, 75, 120, 0.16);
}

.resources-quick-entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(48, 75, 120, 0.22);
}

.nav {
  gap: 14px;
  padding: 14px 10px 18px;
}

.nav-item {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--sidebar-muted);
}

.nav-item:hover {
  background: var(--sidebar-soft);
  color: var(--sidebar-ink);
}

.nav-item.active,
body.dark .nav-item.active {
  border-color: var(--line);
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: inset 3px 0 var(--primary);
}

.local-status {
  border-color: var(--line);
  border-radius: 6px;
  background: var(--sidebar-soft);
}

.topbar {
  min-height: 64px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.global-search-wrap {
  min-height: 38px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.global-search-wrap:focus-within {
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.icon-button,
.secondary-button,
.primary-button,
.danger-button,
.text-button,
button {
  border-radius: 6px;
}

.primary-button,
.capture-bar > button[type="submit"] {
  background: var(--primary-dark);
  box-shadow: none;
}

.primary-button:hover,
.capture-bar > button[type="submit"]:hover {
  background: color-mix(in srgb, var(--primary-dark) 88%, #000);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(48, 75, 120, 0.16);
}

.main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 26px 30px 72px;
}

.dashboard-controlbar {
  min-height: 42px;
  margin-bottom: 14px;
}

.segmented {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button.active {
  border-radius: 6px;
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.dashboard-hero {
  min-height: 364px;
  margin-bottom: 20px !important;
  padding: 30px 31% 30px 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

#dashboard .dashboard-intro::before {
  width: 34%;
  border-left: 1px solid var(--line);
}

.dashboard-intro::after {
  display: none;
}

.hero-copy h1 {
  max-width: 600px;
  font-size: 40px;
  font-weight: 720;
  line-height: 1.13;
}

.hero-copy h1 em {
  color: var(--primary-dark);
}

.hero-description {
  max-width: 560px;
  color: var(--muted);
}

#dashboard .dashboard-intro .hero-focus-field,
#dashboard .dashboard-intro .weekly-intent {
  max-width: 620px;
  margin-right: 28px;
}

.hero-focus-field input,
.weekly-intent input {
  border-color: var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.hero-side {
  right: 22px;
  bottom: 22px;
  width: calc(34% - 44px);
  padding: 0;
  gap: 10px;
}

#dashboard .dashboard-hero .hero-side .check-in-btn,
.hero-progress {
  border-radius: 8px;
}

#dashboard .dashboard-hero .hero-side .check-in-btn {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(24, 34, 48, 0.14);
}

.hero-progress {
  background: var(--primary-dark);
  box-shadow: 0 10px 24px rgba(48, 75, 120, 0.24);
}

.capture-module,
.panel,
.panel-subtle,
.panel-elevated,
.dashboard-customize-panel,
.onboarding-card,
.archive-panel,
.resource-header {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.panel-elevated,
.priority-panel {
  box-shadow: var(--shadow-md);
}

.panel-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-kicker,
.section-label,
.eyebrow {
  color: var(--muted) !important;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.summary-grid,
.habit-row,
.dashboard-layout {
  gap: 14px;
}

#dashboard > .habit-row {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.summary-item,
.hub-metric-grid > button,
.review-snapshot > article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.summary-item:hover,
.hub-metric-grid > button:hover {
  border-color: color-mix(in srgb, var(--primary) 44%, var(--line));
  background: var(--primary-mist);
  transform: translateY(-1px);
}

@media (min-width: 821px) {
  #dashboard.dashboard-mode-daily .habit-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #dashboard.dashboard-mode-daily .top-three-panel {
    width: 100%;
    min-height: 172px;
  }

  #dashboard.dashboard-mode-full .habit-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.88fr);
  }
}

#dashboard .empty-state {
  border-radius: 6px;
  background: var(--surface-soft);
}

.task-item,
.deadline-row,
.agenda-row,
.activity-row,
.record-card {
  border-radius: 6px;
}

input,
select,
textarea {
  border-color: var(--line-strong);
  border-radius: 6px !important;
  background: var(--surface);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.hub-intro,
.page-lead {
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.hub-intro h3,
.page-lead h3,
.resource-header h3 {
  color: var(--ink);
}

.resource-header {
  padding: 22px;
}

.resource-section {
  padding: 22px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.resource-sections {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.resource-section .link-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.resource-link-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.resource-link-row:hover {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.resource-link-row > a {
  min-height: 68px;
  padding: 11px 42px 11px 11px;
}

.resource-site-icon {
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.resource-link-copy strong {
  font-size: 14px;
  line-height: 1.35;
}

.resource-link-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.training-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.9fr);
  gap: 28px;
  align-items: center;
  margin: 22px 0 16px;
  padding: 24px;
  border-radius: 8px;
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(48, 75, 120, 0.18);
}

.training-overview .panel-kicker,
.training-overview p {
  color: rgba(255, 255, 255, 0.72) !important;
}

.training-overview h3 {
  margin: 3px 0 5px;
  color: #ffffff;
  font-size: 22px;
}

.training-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.training-quick-actions button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.training-quick-actions button:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
}

.training-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
}

.training-metrics > span {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 3px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--primary-dark) 88%, #ffffff 12%);
}

.training-metrics small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.training-metrics strong,
.training-metrics b {
  color: #ffffff;
  font-size: 19px;
}

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

.health-form .mood-picker,
.health-form textarea,
.health-form > button {
  grid-column: 1 / -1;
}

.health-row > span {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.wellbeing-training-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-soft);
  text-align: left;
}

.wellbeing-training-link span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.wellbeing-training-link strong {
  color: var(--primary-dark);
  font-size: 11px;
}

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

.schedule-course.color-green  { background: #39755f; color: #fff; }
.schedule-course.color-purple { background: #7563b6; color: #fff; }
.schedule-course.color-pink   { background: #b65d87; color: #fff; }
.schedule-course.color-cyan   { background: #3f7f8c; color: #fff; }
.schedule-course.color-red    { background: #ad5558; color: #fff; }
.schedule-course.color-blue   { background: #49699f; color: #fff; }
.schedule-course.color-orange { background: #a87327; color: #fff; }

@media (max-width: 1180px) {
  .resource-section .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 94px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 9px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
  }

  .main {
    padding: 16px 13px calc(110px + env(safe-area-inset-bottom));
  }

  .dashboard-controlbar {
    margin-bottom: 12px;
  }

  .dashboard-hero {
    min-height: auto;
    padding: 24px 18px 18px !important;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
  }

  .dashboard-hero::before {
    display: block;
    inset: 0 auto 0 0;
    width: 4px !important;
    height: 100%;
    border: 0 !important;
    background: var(--primary) !important;
    opacity: 1;
  }

  .hero-copy h1 {
    font-size: 29px;
    line-height: 1.16;
  }

  #dashboard .dashboard-intro .hero-focus-field,
  #dashboard .dashboard-intro .weekly-intent {
    max-width: none;
    margin-right: 0;
  }

  .hero-side {
    position: static;
    width: auto;
    margin-top: 14px;
    padding: 0;
  }

  #dashboard.dashboard-mode-daily .weekly-intent {
    display: none;
  }

  #dashboard.dashboard-mode-daily .top-three-list {
    min-height: 64px;
  }

  #dashboard .dashboard-hero .hero-side .check-in-btn {
    border-color: var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  .hero-progress {
    min-height: 70px;
    box-shadow: 0 8px 18px rgba(48, 75, 120, 0.2);
  }

  .capture-module,
  #dashboard .panel,
  #dashboard .panel-subtle,
  #dashboard .panel-elevated {
    padding: 15px;
  }

  .habit-row,
  .dashboard-layout,
  .grid.two,
  .grid.two-thirds {
    gap: 12px;
  }

  .panel,
  .panel-subtle,
  .panel-elevated,
  .capture-module,
  .resource-header {
    border-radius: 8px;
  }

  .training-overview {
    gap: 18px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 8px;
  }

  .training-overview h3 {
    font-size: 20px;
  }

  .training-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-quick-actions button {
    justify-content: center;
  }

  .training-metrics > span {
    min-height: 68px;
    padding: 10px;
  }

  .health-form {
    grid-template-columns: 1fr;
  }

  .resource-section .link-grid {
    grid-template-columns: 1fr;
  }

  .resource-link-row > a {
    min-height: 64px;
  }

  .resource-link-copy strong {
    font-size: 14px;
  }

  .mobile-bottom-nav {
    min-height: calc(64px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    box-shadow: 0 -8px 24px rgba(24, 34, 48, 0.08);
  }

  .mobile-bottom-nav button {
    min-height: 56px;
  }

  .mobile-bottom-nav button.active {
    color: var(--primary-dark);
  }
}

@media (max-width: 420px) {
  .main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .dashboard-hero {
    padding-right: 15px !important;
    padding-left: 15px !important;
  }

  .training-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 821px) {
  .dashboard-hero {
    display: block;
    padding: 30px calc(34% + 28px) 30px 28px;
  }

  .dashboard-hero .hero-side {
    position: absolute;
    right: 22px;
    bottom: 22px;
    width: calc(34% - 44px);
  }
}

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

/* V16 final mobile safeguards */
@media (max-width: 820px) {
  .mobile-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-bottom-nav button,
  .mobile-bottom-nav button[data-mobile-view] {
    min-width: 0;
    padding-right: 2px;
    padding-left: 2px;
    border-radius: 7px;
  }

  #syncStatusBtn {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  #syncStatusBtn span {
    display: none;
  }

  .sports-hero-week strong {
    min-width: 0;
    justify-self: end;
    font-size: 13px;
    white-space: nowrap;
  }

  .sports-hero-week b {
    font-size: 24px;
  }
}

/* V17 · Full-page photographic atmosphere */
body {
  --page-bg-image: url("./assets-page-bg-learning-v2.93ecc9587714.jpg");
  --page-bg-position: center center;
}

body[data-view-family="learning"] {
  --page-bg-image: url("./assets-page-bg-learning-v2.93ecc9587714.jpg");
}

body[data-view-family="research"] {
  --page-bg-image: url("./assets-page-bg-research-v2.9848da3330c2.jpg");
}

body[data-view-family="growth"] {
  --page-bg-image: url("./assets-page-bg-growth-v2.bbd49a528400.jpg");
}

body[data-view-family="resources"] {
  --page-bg-image: url("./assets-page-bg-resources-v2.f037992fd4c8.jpg");
}

body[data-view-family="manage"] {
  --page-bg-image: url("./assets-page-bg-admin-v2.23db67720848.jpg");
}

body[data-view-family="sports"] {
  --page-bg-image: url("./assets-sports-badminton-hero-v1.d99227e070db.jpg");
  --page-bg-position: center 58%;
}

body[data-active-view="fitness"] {
  --page-bg-image: url("./assets-sports-fitness-hero-v1.0727e9217940.jpg");
  --page-bg-position: center center;
}

body[data-active-view="nutrition"] {
  --page-bg-image: url("./assets-sports-meal-hero-v1.c953a0734e58.jpg");
  --page-bg-position: center center;
}

.app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: transparent;
}

.app-shell::before,
.app-shell::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
}

.app-shell::before {
  background-image: var(--page-bg-image);
  background-position: var(--page-bg-position);
  background-size: cover;
  filter: saturate(0.96) contrast(1.02);
  transform: scale(1.005);
}

.app-shell::after {
  z-index: -1;
  background: rgba(244, 248, 252, 0.26);
}

.workspace,
.main {
  background: transparent !important;
}

.sidebar {
  background: color-mix(in srgb, var(--surface) 70%, transparent) !important;
  border-right-color: color-mix(in srgb, var(--line-strong) 62%, transparent);
  box-shadow: 12px 0 38px rgba(26, 45, 72, 0.1);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
}

.topbar,
.context-nav {
  background: color-mix(in srgb, var(--surface) 84%, transparent) !important;
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.view .panel,
.view .panel-elevated,
.view .panel-subtle,
.view .capture-module,
.view .archive-panel,
.view .resource-header,
.view .page-lead,
.view .hub-intro,
.view .summary-item,
.view .hub-metric-grid > button,
.view .sports-kpi-grid > button,
.view .sports-stat-strip article,
.view .sports-log-row,
.view .resource-link-row,
.dashboard-customize-panel,
.template-panel {
  background: color-mix(in srgb, var(--surface) 81%, transparent) !important;
  backdrop-filter: blur(8px) saturate(1.04);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
}

.view .page-lead,
.view .hub-intro,
.view .resource-header {
  padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(25, 45, 72, 0.08);
}

.view .panel,
.view .capture-module,
.view .sports-kpi-grid > button,
.view .resource-link-row,
.view .summary-item {
  border-color: color-mix(in srgb, var(--line-strong) 74%, transparent);
  box-shadow: 0 10px 30px rgba(25, 45, 72, 0.07);
}

.global-search-wrap,
.icon-button,
.sync-status,
.segmented,
input,
select,
textarea {
  background-color: color-mix(in srgb, var(--surface) 88%, transparent) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#dashboard .dashboard-intro::before,
.dashboard-hero::before {
  display: none !important;
}

#dashboard .dashboard-hero {
  min-height: 310px;
  background: color-mix(in srgb, var(--surface) 80%, transparent) !important;
}

.sports-main-hero,
.badminton-feature,
.fitness-feature,
.nutrition-feature,
body.dark .fitness-feature,
body.dark .nutrition-feature {
  background-image: none !important;
}

.sports-main-hero {
  min-height: 250px;
  background: rgba(13, 39, 66, 0.73) !important;
  backdrop-filter: blur(13px) saturate(1.04);
  -webkit-backdrop-filter: blur(13px) saturate(1.04);
}

.sports-feature-hero {
  min-height: 185px;
  background: color-mix(in srgb, var(--surface) 78%, transparent) !important;
  color: var(--ink) !important;
  backdrop-filter: blur(16px) saturate(1.04);
  -webkit-backdrop-filter: blur(16px) saturate(1.04);
}

.sports-feature-hero .section-label,
.sports-feature-hero > div > p:not(.section-label) {
  color: var(--muted) !important;
}

.sports-feature-hero > span {
  color: var(--primary-dark);
}

.resource-section {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.dark .app-shell::after {
  background: rgba(8, 15, 28, 0.58);
}

body.dark .sidebar {
  background: color-mix(in srgb, var(--surface) 72%, transparent) !important;
}

body.dark .topbar,
body.dark .context-nav {
  background: color-mix(in srgb, var(--surface) 86%, transparent) !important;
}

body.dark .view .panel,
body.dark .view .panel-elevated,
body.dark .view .panel-subtle,
body.dark .view .capture-module,
body.dark .view .archive-panel,
body.dark .view .resource-header,
body.dark .view .page-lead,
body.dark .view .hub-intro,
body.dark .view .summary-item,
body.dark .view .hub-metric-grid > button,
body.dark .view .sports-kpi-grid > button,
body.dark .view .sports-stat-strip article,
body.dark .view .sports-log-row,
body.dark .view .resource-link-row {
  background: color-mix(in srgb, var(--surface) 84%, transparent) !important;
}

@media (max-width: 820px) {
  .app-shell::before {
    background-position: center center;
    transform: none;
  }

  .app-shell::after {
    background: rgba(245, 249, 252, 0.34);
  }

  .sidebar,
  .topbar,
  .context-nav {
    background: color-mix(in srgb, var(--surface) 86%, transparent) !important;
  }

  .view .panel,
  .view .capture-module,
  .view .resource-header,
  .view .page-lead,
  .view .hub-intro,
  .view .summary-item,
  .view .sports-kpi-grid > button,
  .view .sports-stat-strip article,
  .view .sports-log-row,
  .view .resource-link-row {
    background: color-mix(in srgb, var(--surface) 86%, transparent) !important;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
  }

  .view .page-lead,
  .view .hub-intro,
  .view .resource-header {
    padding: 15px;
  }

  #dashboard .dashboard-hero {
    min-height: auto;
  }

  .sports-main-hero {
    min-height: 265px;
    background: rgba(12, 35, 59, 0.76) !important;
  }

  .sports-feature-hero {
    min-height: 205px;
    background: color-mix(in srgb, var(--surface) 84%, transparent) !important;
  }
}

/* V18 · Photo-free, fast workspace canvas */
body {
  --app-canvas: #f4f7fb;
}

body[data-view-family="research"] {
  --app-canvas: #f3f7f8;
}

body[data-view-family="growth"] {
  --app-canvas: #f5f7f6;
}

body[data-view-family="resources"],
body[data-view-family="manage"] {
  --app-canvas: #f5f7fa;
}

.app-shell,
.app-shell::before {
  background: var(--app-canvas) !important;
}

.app-shell::before {
  background-image: none !important;
  filter: none !important;
  transform: none !important;
}

.app-shell::after {
  display: none !important;
}

.sidebar {
  background: #eef3f8 !important;
  border-right-color: #dce5ef;
  box-shadow: 8px 0 28px rgba(31, 53, 82, 0.055);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.topbar,
.context-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.view .panel,
.view .panel-elevated,
.view .panel-subtle,
.view .capture-module,
.view .archive-panel,
.view .resource-header,
.view .page-lead,
.view .hub-intro,
.view .summary-item,
.view .hub-metric-grid > button,
.view .sports-kpi-grid > button,
.view .sports-stat-strip article,
.view .sports-log-row,
.view .resource-link-row,
.dashboard-customize-panel,
.template-panel,
#dashboard .dashboard-hero {
  background: #ffffff !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.global-search-wrap,
.icon-button,
.sync-status,
.segmented,
input,
select,
textarea {
  background-color: #ffffff !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sports-main-hero {
  background: #203f65 !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sports-feature-hero,
body.dark .fitness-feature,
body.dark .nutrition-feature {
  background: #edf3f8 !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.dark {
  --app-canvas: #101827;
}

body.dark .sidebar {
  background: #162131 !important;
  border-right-color: #26364a;
}

body.dark .topbar,
body.dark .context-nav {
  background: #131d2b !important;
}

body.dark .view .panel,
body.dark .view .panel-elevated,
body.dark .view .panel-subtle,
body.dark .view .capture-module,
body.dark .view .archive-panel,
body.dark .view .resource-header,
body.dark .view .page-lead,
body.dark .view .hub-intro,
body.dark .view .summary-item,
body.dark .view .hub-metric-grid > button,
body.dark .view .sports-kpi-grid > button,
body.dark .view .sports-stat-strip article,
body.dark .view .sports-log-row,
body.dark .view .resource-link-row,
body.dark .dashboard-customize-panel,
body.dark .template-panel,
body.dark #dashboard .dashboard-hero {
  background: #182333 !important;
}

body.dark .global-search-wrap,
body.dark .icon-button,
body.dark .sync-status,
body.dark .segmented,
body.dark input,
body.dark select,
body.dark textarea {
  background-color: #131d2b !important;
}

body.dark .sports-feature-hero,
body.dark .fitness-feature,
body.dark .nutrition-feature {
  background: #182638 !important;
}

@media (max-width: 820px) {
  .topbar,
  .context-nav {
    background: #ffffff !important;
  }

  .view .panel,
  .view .capture-module,
  .view .resource-header,
  .view .page-lead,
  .view .hub-intro,
  .view .summary-item,
  .view .sports-kpi-grid > button,
  .view .sports-stat-strip article,
  .view .sports-log-row,
  .view .resource-link-row {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Mobile interaction layer v18 */
.mobile-quick-add,
.mobile-quick-actions,
.mobile-quick-actions-backdrop,
.update-banner {
  display: none;
}

.mobile-form-stepbar,
.mobile-step-actions {
  display: none;
}

.mobile-step-hidden { display: block; }
.mobile-step-submit[hidden] { display: none; }

@media (max-width: 820px) {
  body {
    overscroll-behavior-x: none;
  }

  .main {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .mobile-quick-add {
    position: fixed;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 76;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 34%, transparent), 0 0 0 5px color-mix(in srgb, var(--surface) 80%, transparent);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-quick-add:active { transform: scale(0.92); }
  .mobile-quick-add svg { width: 23px; height: 23px; }

  .mobile-quick-actions-backdrop {
    position: fixed;
    inset: 0;
    z-index: 91;
    display: block;
    background: rgba(18, 29, 45, 0.34);
  }

  .mobile-quick-actions-backdrop[hidden],
  .mobile-quick-actions[hidden] { display: none; }

  .mobile-quick-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 92;
    display: block;
    max-height: min(58dvh, 520px);
    overflow-y: auto;
    padding: 7px 14px calc(20px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--surface);
    box-shadow: 0 -18px 50px rgba(20, 42, 66, 0.18);
    animation: mobile-sheet-in 0.22s ease both;
  }

  .mobile-quick-actions-heading { display: flex; align-items: center; justify-content: space-between; padding: 7px 0 13px; }
  .mobile-quick-actions-heading h3 { margin: 0; font-size: 18px; }
  .mobile-quick-actions-list { display: grid; gap: 8px; }
  .mobile-quick-actions-list button { display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 9px; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); text-align: left; }
  .mobile-quick-actions-list button:active { background: var(--primary-soft); transform: scale(0.985); }
  .mobile-quick-actions-list button > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; color: var(--primary-dark); background: var(--primary-soft); }
  .mobile-quick-actions-list button > span svg { width: 17px; }
  .mobile-quick-actions-list button > svg { width: 15px; color: var(--faint); }
  @keyframes mobile-sheet-in { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

  .mobile-step-form > .mobile-form-stepbar { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 7px; min-height: 34px; padding: 4px 0 9px; }
  .mobile-form-stepbar strong { color: var(--muted); font-size: 11px; font-weight: 650; }
  .mobile-form-stepbar button { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 7px; border: 0; border-radius: 5px; background: transparent; color: var(--primary-dark); font-size: 11px; }
  .mobile-form-stepbar button:disabled { color: var(--faint); }
  .mobile-form-stepbar svg { width: 14px; }
  .mobile-step-form > .mobile-step-hidden { display: none; }
  .mobile-step-form > .mobile-step-submit:not([hidden]) { display: flex; grid-column: 1 / -1; }
  .mobile-step-form > .mobile-step-actions { display: none; }

  .update-banner {
    position: fixed;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 84;
    align-items: center;
    gap: 8px;
    padding: 9px 10px 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    color: var(--ink-soft);
    font-size: 11px;
  }
  .update-banner:not([hidden]) { display: flex; }
  .update-banner > svg { width: 15px; flex: 0 0 auto; color: var(--primary); }
  .update-banner span { flex: 1; }
  .update-banner button { min-height: 30px; padding: 4px 8px; border: 0; border-radius: 5px; color: #fff; background: var(--primary); font-size: 11px; font-weight: 650; }

  body.keyboard-open .mobile-bottom-nav,
  body.keyboard-open .mobile-quick-add,
  body.keyboard-open .offline-banner,
  body.keyboard-open .update-banner { opacity: 0; pointer-events: none; transform: translateY(120%); }
  body.keyboard-open .main { padding-bottom: 22px; }
  body.mobile-quick-open .mobile-quick-add { opacity: 0; pointer-events: none; transform: scale(0.8); }
}

@media (max-width: 520px) {
  .mobile-quick-add { right: 14px; width: 49px; height: 49px; }
  .mobile-quick-actions { padding-right: 12px; padding-left: 12px; }
  .mobile-step-form { row-gap: 8px; }
  .mobile-step-form > input,
  .mobile-step-form > select,
  .mobile-step-form > textarea,
  .mobile-step-form > label { min-height: 42px; }
  .mobile-step-form > textarea { min-height: 92px; }
}

/* Center-specific information architecture v30 */
.save-feedback {
  display: inline-flex;
  min-width: 48px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  transition: color 180ms ease, opacity 180ms ease;
}

.save-feedback.is-saving { color: var(--primary); }
.save-feedback.is-error { color: var(--danger); }
.save-feedback.is-saved { color: var(--success); }

body.is-booting .app-shell {
  opacity: 0;
  pointer-events: none;
}

body.is-booting::before {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  width: 24px;
  height: 24px;
  margin: -12px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  content: "";
  animation: center-loading 700ms linear infinite;
}

@keyframes center-loading { to { transform: rotate(360deg); } }

.field-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px var(--danger-soft) !important;
}

.is-busy {
  cursor: wait;
  opacity: 0.75;
}

.is-busy svg { animation: center-loading 800ms linear infinite; }

.action-board,
.learning-timeline-panel,
.research-evidence-panel,
.growth-analytics-panel,
.admin-operations-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.action-board-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.action-board-heading h3,
.learning-timeline-panel h3,
.research-evidence-panel h3,
.growth-analytics-panel h3,
.admin-operations-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.action-board-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.action-board-score {
  display: grid;
  min-width: 106px;
  justify-items: end;
  gap: 1px;
}

.action-board-score strong {
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

.action-board-score span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

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

.action-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 7px;
  background: var(--surface-soft);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.action-row:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.action-row.urgent { border-left-color: var(--danger); }
.action-row.deadline { border-left-color: var(--warning); }
.action-row.inbox { border-left-color: var(--success); }

.action-row-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.action-row.urgent .action-row-icon { color: var(--danger); background: var(--danger-soft); }
.action-row.deadline .action-row-icon { color: var(--warning); background: var(--warning-soft); }
.action-row.inbox .action-row-icon { color: var(--success); background: var(--success-soft); }
.action-row-icon svg { width: 16px; }

.action-row-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.action-row-copy small,
.action-row-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-row-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-row-arrow {
  width: 15px;
  color: var(--faint);
}

.action-empty,
.timeline-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
}

.action-empty > span,
.timeline-empty > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
}

.action-empty > div,
.timeline-empty > div {
  min-width: 0;
  flex: 1;
}

.action-empty strong,
.timeline-empty strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.action-empty p,
.timeline-empty p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.learning-deadline-timeline {
  display: grid;
  gap: 0;
}

.learning-deadline-item {
  display: grid;
  grid-template-columns: 62px 12px minmax(0, 1fr) auto 16px;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.learning-deadline-item:last-child { border-bottom: 0; }
.learning-deadline-item:hover { background: var(--surface-soft); }

.deadline-day {
  display: grid;
  gap: 1px;
  color: var(--primary-dark);
}

.deadline-day strong { font-size: 15px; line-height: 1.2; }
.deadline-day small { color: var(--muted); font-size: 10px; }

.deadline-line {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--surface);
}

.deadline-line::after {
  position: absolute;
  top: 8px;
  left: 1px;
  width: 2px;
  height: 48px;
  background: var(--line);
  content: "";
}

.learning-deadline-item:last-child .deadline-line::after { display: none; }
.learning-deadline-item.overdue .deadline-line { border-color: var(--danger); }
.learning-deadline-item.urgent .deadline-line { border-color: var(--warning); }

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

.deadline-item-copy small,
.deadline-item-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-item-copy small { color: var(--muted); font-size: 10px; }
.deadline-item-copy strong { color: var(--ink); font-size: 13px; }
.learning-deadline-item em { color: var(--muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.learning-deadline-item.overdue em { color: var(--danger); }
.learning-deadline-item.urgent em { color: var(--warning); }
.learning-deadline-item > svg { width: 15px; color: var(--faint); }

.research-evidence-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.evidence-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 13px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  text-align: left;
}

.evidence-flow-step:last-child { border-right: 0; }
.evidence-flow-step:hover,
.evidence-flow-step.active { background: var(--primary-soft); }
.evidence-step-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 7px; color: var(--primary-dark); background: var(--surface); }
.evidence-step-icon svg { width: 16px; }
.evidence-step-copy { display: grid; min-width: 0; gap: 1px; }
.evidence-step-copy small { color: var(--faint); font-size: 10px; }
.evidence-step-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-step-copy em { overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.evidence-flow-step > b { color: var(--primary); font-size: 20px; font-weight: 680; }
.evidence-step-arrow { position: absolute; right: -8px; z-index: 1; width: 16px; height: 16px; padding: 2px; border-radius: 50%; color: var(--faint); background: var(--surface); }

.growth-visual-grid,
.admin-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.growth-visual-card,
.admin-visual-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.visual-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.visual-card-heading > div { display: grid; gap: 1px; min-width: 0; }
.visual-card-heading strong { color: var(--ink); font-size: 13px; }
.visual-card-heading small { color: var(--muted); font-size: 10px; }
.visual-card-heading > span { color: var(--muted); font-size: 10px; white-space: nowrap; }

.growth-radar-chart {
  display: grid;
  min-height: 286px;
  place-items: center;
}

.growth-radar-chart svg { display: block; width: 100%; max-width: 390px; height: auto; overflow: visible; }
.radar-ring { fill: transparent; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-data { fill: color-mix(in srgb, var(--primary) 19%, transparent); stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; }
.radar-label { fill: var(--ink-soft); font-size: 10px; }
.radar-value { fill: var(--primary); font-size: 9px; font-weight: 700; }

.trend-legend-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.trend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 3px;
  border-radius: 50%;
}

.trend-dot.tasks,
.trend-bar.tasks { background: var(--primary); }
.trend-dot.focus,
.trend-bar.focus { background: var(--accent); }
.trend-dot.literature,
.trend-bar.literature { background: var(--success); }
.trend-dot.research,
.trend-bar.research { background: var(--warning); }

.growth-trend-chart { position: relative; min-height: 286px; padding-top: 9px; }
.trend-summary { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.trend-summary strong { color: var(--ink); font-size: 14px; }
.trend-summary span { color: var(--muted); font-size: 11px; }
.trend-plot { display: grid; height: 205px; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 9px; padding: 14px 4px 0; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to bottom, transparent 0, transparent 49px, var(--line) 50px); }
.trend-week { display: grid; min-width: 0; height: 100%; grid-template-rows: 1fr auto; align-items: end; justify-items: center; gap: 7px; }
.trend-bars { display: flex; width: min(58px, 100%); height: 100%; align-items: end; justify-content: center; gap: 3px; }
.trend-bar { display: block; width: 7px; min-height: 5px; border-radius: 3px 3px 0 0; opacity: 0.9; }
.trend-week small { color: var(--muted); font-size: 10px; }
.trend-scale { position: absolute; top: 63px; right: 0; display: grid; justify-items: end; gap: 151px; color: var(--faint); font-size: 9px; transform: translateY(-50%); }

.sports-goal-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(250px, 1.4fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--sports-blue) 25%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--sports-blue) 7%, var(--surface));
}

.sports-goal-panel h3 { margin: 0; color: var(--ink); font-size: 16px; }
.sports-goal-panel p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.sports-goal-rail { min-width: 0; }
.sports-goal-track { position: relative; height: 10px; overflow: visible; border-radius: 10px; background: var(--line); }
.sports-goal-track > span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--sports-blue); transition: width 420ms ease; }
.sports-goal-marker { position: absolute; top: -5px; width: 2px; height: 20px; background: var(--sports-amber); }
.sports-goal-marker b { position: absolute; top: 21px; right: 0; color: var(--muted); font-size: 9px; font-weight: 600; white-space: nowrap; transform: translateX(50%); }
.sports-goal-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.sports-goal-meta strong { color: var(--ink); font-size: 12px; }
.sports-goal-meta span { color: var(--muted); font-size: 10px; }
.sports-goal-meta em { color: var(--sports-blue); font-size: 11px; font-style: normal; font-weight: 700; }

.admin-status-board,
.admin-expense-chart { display: grid; gap: 8px; }
.admin-status-row { display: grid; grid-template-columns: 28px 76px minmax(0, 1fr) 24px; align-items: center; min-width: 0; gap: 8px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.admin-status-row:last-child { border-bottom: 0; }
.admin-status-row:hover { background: var(--surface); }
.admin-status-icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 6px; color: var(--primary); background: var(--primary-soft); }
.admin-status-icon svg { width: 14px; }
.admin-status-icon.办理中 { color: var(--warning); background: var(--warning-soft); }
.admin-status-icon.待提交 { color: var(--accent); background: var(--accent-soft); }
.admin-status-icon.已完成 { color: var(--success); background: var(--success-soft); }
.admin-status-copy { display: grid; min-width: 0; gap: 1px; }
.admin-status-copy strong { color: var(--ink); font-size: 11px; }
.admin-status-copy small { color: var(--muted); font-size: 9px; }
.admin-status-bar { height: 7px; overflow: hidden; border-radius: 7px; background: var(--line); }
.admin-status-bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.admin-status-row b { color: var(--ink); font-size: 13px; text-align: right; }
.admin-expense-row { display: grid; gap: 5px; }
.admin-expense-row > span { display: flex; justify-content: space-between; gap: 8px; }
.admin-expense-row strong { color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.admin-expense-row small { color: var(--muted); font-size: 10px; }
.admin-expense-row > b { display: block; height: 8px; overflow: hidden; border-radius: 8px; background: var(--line); }
.admin-expense-row > b i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.visual-empty { display: grid; justify-items: center; gap: 6px; padding: 32px 12px; color: var(--muted); text-align: center; }
.visual-empty > svg { width: 25px; color: var(--primary); }
.visual-empty strong { color: var(--ink); font-size: 13px; }
.visual-empty p { margin: 0; font-size: 11px; }
.visual-empty.compact { padding: 18px 8px; }

@media (max-width: 820px) {
  .save-feedback { display: none; }
  .action-board,
  .learning-timeline-panel,
  .research-evidence-panel,
  .growth-analytics-panel,
  .admin-operations-panel { padding: 14px; }
  .action-queue { grid-template-columns: 1fr; }
  .research-evidence-flow { grid-template-columns: 1fr; }
  .evidence-flow-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-flow-step:last-child { border-bottom: 0; }
  .evidence-step-arrow { top: auto; right: 9px; bottom: -8px; transform: rotate(90deg); }
  .growth-visual-grid,
  .admin-visual-grid { grid-template-columns: 1fr; }
  .growth-radar-chart,
  .growth-trend-chart { min-height: 254px; }
  .sports-goal-panel { grid-template-columns: 1fr; gap: 12px; }
  .sports-goal-panel .sports-primary-action { width: 100%; justify-content: center; }
}

@media (max-width: 520px) {
  .action-board-heading { gap: 10px; }
  .action-board-heading h3,
  .learning-timeline-panel h3,
  .research-evidence-panel h3,
  .growth-analytics-panel h3,
  .admin-operations-panel h3 { font-size: 16px; }
  .action-board-score { min-width: 76px; }
  .action-board-score strong { font-size: 24px; }
  .learning-deadline-item { grid-template-columns: 51px 10px minmax(0, 1fr) 16px; gap: 8px; padding-right: 0; }
  .learning-deadline-item em { display: none; }
  .deadline-day strong { font-size: 13px; }
  .deadline-item-copy strong { font-size: 12px; }
  .evidence-flow-step { grid-template-columns: 30px minmax(0, 1fr) auto; padding: 10px 9px; }
  .evidence-step-icon { width: 28px; height: 28px; }
  .trend-legend-inline { max-width: 160px; font-size: 9px !important; }
  .trend-plot { gap: 4px; }
  .trend-bar { width: 5px; }
  .admin-status-row { grid-template-columns: 28px 67px minmax(0, 1fr) 20px; gap: 6px; }
  .sports-goal-panel { padding: 14px; }
}

/* ============================================================
   VISUAL SYSTEM v31 · 白纸、深蓝、行动橙
   统一设计令牌，并按中心重排信息层级。
   ============================================================ */

:root {
  color-scheme: light;
  --canvas: #ffffff;
  --canvas-deep: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-raised: #ffffff;
  --surface-mist: #eef4fa;
  --ink: #142b4a;
  --ink-soft: #3d5874;
  --muted: #71839a;
  --faint: #a4b2c2;
  --line: #e2eaf2;
  --line-strong: #c6d4e2;
  --primary: #35689f;
  --primary-dark: #214b78;
  --primary-soft: #eaf2fa;
  --primary-mist: #f4f8fc;
  --primary-ink: #173d66;
  --accent: #d88632;
  --accent-dark: #b4661f;
  --accent-soft: #fff3e4;
  --success: #398269;
  --success-soft: #e9f4ef;
  --warning: #c47b25;
  --warning-soft: #fff4e4;
  --danger: #bd5155;
  --danger-soft: #faeded;
  --info: #35689f;
  --info-soft: #eaf2fa;
  --blue: #35689f;
  --blue-soft: #eaf2fa;
  --amber: #c47b25;
  --amber-soft: #fff4e4;
  --coral: #bd5155;
  --coral-soft: #faeded;
  --sidebar: #f8fbfe;
  --sidebar-soft: #eef4fa;
  --sidebar-ink: #142b4a;
  --sidebar-muted: #6d8097;
  --shadow-sm: 0 1px 2px rgba(20, 43, 74, 0.05);
  --shadow-md: 0 8px 24px rgba(20, 43, 74, 0.08);
  --shadow-lg: 0 18px 42px rgba(20, 43, 74, 0.12);
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-number: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

body.dark {
  color-scheme: dark;
  --canvas: #101a29;
  --canvas-deep: #0b1421;
  --surface: #172638;
  --surface-soft: #1c2d40;
  --surface-raised: #20354a;
  --surface-mist: #1d3348;
  --ink: #edf4fb;
  --ink-soft: #c4d3e2;
  --muted: #8fa4ba;
  --faint: #60758c;
  --line: #2a4056;
  --line-strong: #3b566e;
  --primary: #8db5dc;
  --primary-dark: #a9c9e8;
  --primary-soft: #203a54;
  --primary-mist: #1a3045;
  --primary-ink: #d9ebfb;
  --accent: #e2a45c;
  --accent-dark: #f0b775;
  --accent-soft: #3d2d1f;
  --success: #79c4a7;
  --success-soft: #1d3d35;
  --warning: #e3ad63;
  --warning-soft: #3d301f;
  --danger: #e07d7e;
  --danger-soft: #3b2527;
  --sidebar: #132235;
  --sidebar-soft: #1b2d41;
  --sidebar-ink: #edf4fb;
  --sidebar-muted: #91a5ba;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.38);
}

html,
body {
  background: var(--canvas) !important;
}

body,
body button,
body input,
body select,
body textarea {
  font-family: var(--font-ui);
  letter-spacing: 0 !important;
}

body {
  color: var(--ink);
  background-image: none !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body * {
  box-sizing: border-box;
}

.app-shell,
.workspace,
.main {
  background: var(--canvas) !important;
  background-image: none !important;
}

.app-shell::before,
.app-shell::after {
  display: none !important;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar) !important;
  border-right: 1px solid var(--line) !important;
  box-shadow: none !important;
}

.brand {
  min-height: 78px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 750;
}

.brand p {
  color: var(--muted) !important;
  font-size: 10px;
}

.brand h1 {
  color: var(--ink) !important;
  font-size: 16px;
  font-weight: 720;
}

.resources-quick-entry {
  margin: 16px 12px 12px;
  padding: 12px;
  border: 1px solid var(--primary-dark) !important;
  border-radius: 8px;
  background: var(--primary-dark) !important;
  box-shadow: 0 8px 18px rgba(33, 75, 120, 0.14) !important;
}

.resources-quick-entry:hover {
  background: var(--primary) !important;
  transform: translateY(-1px);
}

.nav {
  gap: 13px;
  padding: 12px 10px 18px;
}

.nav-group {
  gap: 4px;
}

.nav-label {
  color: var(--faint) !important;
  font-size: 10px;
  font-weight: 700;
}

.nav-item {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--sidebar-muted);
  font-size: 13px;
}

.nav-item:hover {
  background: var(--sidebar-soft) !important;
  color: var(--sidebar-ink) !important;
}

.nav-item.active {
  border-color: color-mix(in srgb, var(--primary) 20%, var(--line));
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  box-shadow: inset 3px 0 var(--primary) !important;
}

.local-status {
  margin: 10px 12px 14px;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  background: var(--sidebar-soft) !important;
}

.topbar {
  min-height: 68px;
  padding: 11px 30px;
  border-bottom: 1px solid var(--line) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.topbar-title h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 720;
}

.eyebrow,
.section-label,
.panel-kicker {
  color: var(--muted) !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

.global-search-wrap {
  min-height: 40px;
  border: 1px solid var(--line-strong) !important;
  border-radius: 8px;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.global-search-wrap:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent) !important;
}

.main {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 32px 38px 88px;
}

.view {
  max-width: 1320px;
  margin: 0 auto;
}

.view.active {
  animation: v31-view-enter 180ms ease-out both;
}

@keyframes v31-view-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

button,
a,
input,
select,
textarea {
  font-size: 13px;
}

button,
.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button,
.sync-status {
  border-radius: 7px !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-button,
.capture-bar > button[type="submit"] {
  min-height: 38px;
  border: 1px solid var(--primary-dark) !important;
  background: var(--primary-dark) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-weight: 680;
}

.primary-button:hover,
.capture-bar > button[type="submit"]:hover {
  background: var(--primary) !important;
  box-shadow: 0 5px 14px rgba(33, 75, 120, 0.16) !important;
  transform: translateY(-1px);
}

.secondary-button,
.text-button {
  min-height: 36px;
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
  color: var(--primary-dark) !important;
  box-shadow: none !important;
  font-weight: 650;
}

.secondary-button:hover,
.text-button:hover {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
}

.text-button {
  min-height: 30px;
  border-color: transparent !important;
  background: transparent !important;
}

.text-button:hover {
  border-color: transparent !important;
}

.icon-button,
.sync-status {
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink-soft) !important;
  box-shadow: none !important;
}

.icon-button:hover,
.sync-status:hover {
  border-color: var(--line-strong) !important;
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
}

input,
select,
textarea {
  border: 1px solid var(--line-strong) !important;
  border-radius: 7px !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent) !important;
  outline: 0;
}

.panel,
.panel-subtle,
.panel-elevated,
.capture-module,
.archive-panel,
.resource-header,
.dashboard-customize-panel,
.template-panel,
.onboarding-card {
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.panel-heading {
  min-height: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line) !important;
}

.panel-heading h3,
.page-lead h3,
.hub-intro h3,
.resource-header h3 {
  color: var(--ink) !important;
  font-weight: 720;
}

.panel-heading > span,
.panel-heading small,
.panel-heading label,
.resource-header-metrics small {
  color: var(--muted) !important;
}

/* 首页：行动、截止、研究是三条主线，其余内容降为辅助信息。 */
#dashboard .dashboard-controlbar {
  margin-bottom: 18px;
}

#dashboard .dashboard-hero {
  min-height: 300px;
  margin-bottom: 18px !important;
  padding: 30px 31% 28px 28px;
  border: 1px solid var(--line) !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: 9px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

#dashboard .dashboard-hero::before,
#dashboard .dashboard-hero::after {
  display: none !important;
}

#dashboard .hero-copy h1 {
  color: var(--ink);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 760;
  line-height: 1.15;
}

#dashboard .hero-copy h1 em {
  color: var(--primary-dark);
  font-style: normal;
}

#dashboard .hero-description {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.75;
}

#dashboard .hero-focus-field input,
#dashboard .weekly-intent input {
  border-color: var(--line-strong) !important;
}

#dashboard .hero-side {
  right: 22px;
  bottom: 22px;
  width: calc(31% - 36px);
  gap: 10px;
}

#dashboard .dashboard-hero .hero-side .check-in-btn {
  border: 1px solid var(--line-strong) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-dark) !important;
  box-shadow: none !important;
}

#dashboard .dashboard-hero .hero-side .check-in-btn i,
#dashboard .dashboard-hero .hero-side .check-in-btn span,
#dashboard .dashboard-hero .hero-side .check-in-btn small {
  color: var(--accent-dark) !important;
}

#dashboard .hero-progress {
  border: 1px solid var(--primary) !important;
  background: var(--primary-dark) !important;
  box-shadow: none !important;
}

#dashboard .capture-module {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-style: dashed !important;
  background: var(--surface-soft) !important;
}

#dashboard .capture-module-footer p {
  color: var(--muted);
}

#dashboard .summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 2px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#dashboard .summary-item {
  min-height: 84px;
  padding: 14px 18px;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
}

#dashboard .summary-item:last-child {
  border-right: 0 !important;
}

#dashboard .summary-item:hover {
  background: var(--primary-mist) !important;
  transform: none;
}

#dashboard .summary-item strong {
  color: var(--primary-dark);
  font-family: var(--font-number);
  font-size: 26px;
}

#dashboard .action-board {
  margin-top: 0;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)) !important;
  border-left: 4px solid var(--primary) !important;
  border-radius: 9px !important;
  background: var(--primary-mist) !important;
  box-shadow: none !important;
}

#dashboard .action-board-heading {
  margin-bottom: 16px;
}

#dashboard .action-board-score strong {
  color: var(--primary-dark);
  font-family: var(--font-number);
}

#dashboard .action-row {
  border-color: var(--line) !important;
  border-left-color: var(--primary) !important;
  border-radius: 7px !important;
  background: var(--surface) !important;
}

#dashboard .action-row:hover {
  background: var(--surface) !important;
  border-color: var(--line-strong) !important;
  transform: translateY(-1px);
}

#dashboard .habit-row {
  gap: 0;
  margin: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#dashboard .habit-row > .panel {
  min-height: 150px;
  padding: 18px 20px;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#dashboard .habit-row > .panel:last-child {
  border-right: 0 !important;
}

#dashboard .dashboard-layout {
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  gap: 24px;
}

#dashboard .dashboard-main-column,
#dashboard .dashboard-rail {
  gap: 20px;
}

#dashboard .priority-panel {
  border-top: 3px solid var(--accent) !important;
}

#dashboard .dashboard-rail .panel-subtle {
  background: var(--surface-soft) !important;
}

#dashboard .dashboard-rail .quick-launch-panel {
  border-top: 3px solid var(--primary) !important;
}

/* 学业：负荷图 + 课程安排 + 截止时间轴。 */
#learningHub .hub-intro {
  padding: 22px 24px;
  border: 1px solid var(--line) !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: 9px !important;
  background: var(--surface) !important;
}

#learningHub .hub-intro h3,
#researchHub .hub-intro h3,
#growthHub .hub-intro h3 {
  max-width: 720px;
  font-size: 24px;
  line-height: 1.35;
}

#learningHub .hub-metric-grid,
#researchHub .hub-metric-grid,
#growthHub .hub-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

#learningHub .hub-metric-grid > button,
#researchHub .hub-metric-grid > button,
#growthHub .hub-metric-grid > button {
  min-height: 106px;
  padding: 16px 18px;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
}

#learningHub .hub-metric-grid > button:last-child,
#researchHub .hub-metric-grid > button:last-child,
#growthHub .hub-metric-grid > button:last-child {
  border-right: 0 !important;
}

#learningHub .hub-metric-grid > button:hover,
#researchHub .hub-metric-grid > button:hover,
#growthHub .hub-metric-grid > button:hover {
  background: var(--primary-mist) !important;
  transform: none;
}

#learningHub .hub-dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
}

#learningHub .hub-wide-panel {
  grid-column: 1 / -1;
}

#learningHub .hub-chart-panel {
  border-top: 3px solid var(--primary) !important;
}

#learningHub .learning-timeline-panel {
  margin-top: 18px;
  border: 1px solid var(--line) !important;
  border-left: 4px solid var(--accent) !important;
  background: var(--surface-soft) !important;
  box-shadow: none !important;
}

#learningHub .learning-deadline-item {
  padding: 13px 4px;
}

/* 研究：把流水线作为主导航，把关系图作为证据主体。 */
#researchHub .hub-intro {
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line)) !important;
  border-left: 5px solid var(--primary-dark) !important;
  border-radius: 9px !important;
  background: var(--primary-mist) !important;
}

#researchHub .research-pipeline-panel {
  margin-top: 22px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

#researchHub .research-pipeline {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

#researchHub .research-relation-panel {
  margin-top: 18px;
  border-top: 3px solid var(--accent) !important;
}

#researchHub .research-evidence-panel {
  margin-top: 18px;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: var(--surface-soft) !important;
  box-shadow: none !important;
}

#researchHub .hub-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

#researchHub .hub-dashboard-grid > .hub-wide-panel {
  grid-column: 1 / -1;
}

#researchHub .research-metrics > button:nth-child(2) strong {
  color: var(--accent-dark);
}

/* 运动：把七天节奏放大，训练结构与近期记录作为侧栏。 */
#sportsHub .sports-main-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  min-height: 248px;
  gap: 28px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line)) !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: 9px !important;
  background: var(--primary-mist) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

#sportsHub .sports-main-hero .section-label,
#sportsHub .sports-main-hero p,
#sportsHub .sports-main-hero h3 {
  color: var(--ink) !important;
}

#sportsHub .sports-main-hero .section-label,
#sportsHub .sports-main-hero p {
  color: var(--muted) !important;
}

#sportsHub .sports-main-hero h3 {
  font-size: 27px;
}

#sportsHub .sports-primary-action {
  border: 1px solid var(--primary-dark) !important;
  background: var(--primary-dark) !important;
  color: #ffffff !important;
}

#sportsHub .sports-ghost-action {
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
  color: var(--primary-dark) !important;
}

#sportsHub .sports-hero-week {
  align-self: stretch;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}

#sportsHub .sports-hero-week span,
#sportsHub .sports-hero-week small {
  color: var(--muted);
}

#sportsHub .sports-hero-week b {
  color: var(--primary-dark);
}

#sportsHub .sports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#sportsHub .sports-kpi-grid > button {
  min-height: 92px;
  padding: 14px 18px;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
}

#sportsHub .sports-kpi-grid > button:last-child {
  border-right: 0 !important;
}

#sportsHub .sports-kpi-grid > button:hover {
  background: var(--primary-mist) !important;
  transform: none;
}

#sportsHub .sports-dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 18px;
}

#sportsHub .sports-chart-panel {
  grid-row: span 2;
  border-top: 3px solid var(--primary) !important;
}

#sportsHub .sports-goal-panel {
  margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)) !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: 9px !important;
  background: var(--accent-soft) !important;
  box-shadow: none !important;
}

#sportsHub .sports-goal-panel h3,
#sportsHub .sports-goal-panel p {
  color: var(--ink);
}

/* 成长：能力雷达与趋势图作为核心，不再堆叠相同卡片。 */
#growthHub .hub-intro {
  padding: 22px 24px;
  border: 1px solid var(--line) !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: 9px !important;
  background: var(--surface) !important;
}

#growthHub .hub-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

#growthHub .hub-dashboard-grid > .hub-wide-panel {
  grid-column: 1 / -1;
}

#growthHub .hub-chart-panel:first-child {
  border-top: 3px solid var(--primary) !important;
}

#growthHub .hub-chart-panel:nth-child(2) {
  border-top: 3px solid var(--success) !important;
}

#growthHub .growth-analytics-panel {
  margin-top: 18px;
  padding: 20px 0 0;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#growthHub .growth-visual-grid {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

#growthHub .growth-visual-card {
  padding: 20px;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#growthHub .growth-visual-card:last-child {
  border-right: 0 !important;
}

#growthHub .growth-visual-card .visual-card-heading {
  min-height: 42px;
}

#growthHub .growth-radar-chart,
#growthHub .growth-trend-chart {
  min-height: 278px;
}

/* 管理：手续是状态清单，费用是结构图，避免与普通录入页同质。 */
#admin .page-lead {
  padding: 20px 24px;
  border: 1px solid var(--line) !important;
  border-left: 5px solid var(--accent) !important;
  border-radius: 9px !important;
  background: var(--accent-soft) !important;
}

#admin .grid.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

#admin .grid.two > article:first-child {
  border-top: 3px solid var(--primary) !important;
}

#admin .grid.two > article:last-child {
  border-top: 3px solid var(--accent) !important;
}

#admin .admin-operations-panel {
  margin-top: 18px;
  padding: 20px 0 0;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#admin .admin-visual-grid {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

#admin .admin-visual-card {
  padding: 20px;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#admin .admin-visual-card:last-child {
  border-right: 0 !important;
}

/* 资源：保留图标和名称的识别层级，链接列表更像目录而不是卡片墙。 */
#resources .resource-header {
  padding: 22px 24px;
  border: 1px solid var(--line) !important;
  border-left: 5px solid var(--primary) !important;
  border-radius: 9px !important;
  background: var(--surface) !important;
}

#resources .resource-sections {
  gap: 24px;
}

#resources .resource-section {
  padding-top: 20px;
  border-top-color: var(--line-strong) !important;
}

#resources .resource-section .link-grid {
  gap: 10px;
}

#resources .resource-link-row {
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

#resources .resource-link-row:hover {
  border-color: var(--primary) !important;
  background: var(--primary-mist) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

#resources .resource-link-copy strong {
  color: var(--ink);
  font-size: 14px;
}

#resources .resource-site-icon {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* 所有中心的数字统一使用同一套字形和节奏。 */
.hub-metric-grid strong,
.sports-kpi-grid strong,
.resource-header-metrics strong,
.stat-value,
[id$="Metric"],
[id$="Count"] {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1020px) {
  .main {
    padding-right: 24px;
    padding-left: 24px;
  }

  #dashboard .dashboard-layout,
  #learningHub .hub-dashboard-grid,
  #researchHub .hub-dashboard-grid,
  #sportsHub .sports-dashboard-grid,
  #admin .grid.two {
    grid-template-columns: 1fr;
  }

  #sportsHub .sports-chart-panel {
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    width: 100%;
    max-width: none;
    min-width: 0;
    overflow: hidden;
  }

  .topbar-title,
  .topbar-title > div,
  .top-actions {
    min-width: 0 !important;
    max-width: 100%;
  }

  .topbar-title {
    overflow: hidden;
  }

  .topbar-title h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    overflow: hidden;
  }

  #syncStatusBtn,
  #accountBtn {
    width: 36px !important;
    min-width: 36px !important;
    flex: 0 0 36px;
    padding: 0 !important;
  }

  #syncStatusBtn span {
    display: none;
  }

  .global-search-wrap {
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    overflow: hidden;
  }

  .mobile-bottom-nav {
    left: 0;
    right: 0;
    width: max(100vw, 320px) !important;
    min-width: 0;
    max-width: none;
  }

  #dashboard .dashboard-controlbar {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  #dashboard .dashboard-mode-hint {
    width: 100%;
    flex: 1 0 100%;
  }

  #dashboard .dashboard-controlbar .secondary-button {
    max-width: 50%;
    margin-left: auto;
    white-space: nowrap;
  }

  #dashboard .action-empty {
    min-width: 0;
    max-width: 100%;
  }

  #dashboard .action-empty > div {
    min-width: 0;
    overflow: hidden;
  }

  #dashboard .action-empty > button {
    min-width: 0;
    flex: 0 1 auto;
    white-space: nowrap;
  }

  .main {
    padding: 18px 14px calc(112px + env(safe-area-inset-bottom));
  }

  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .view {
    max-width: none;
  }

  #dashboard .dashboard-hero {
    min-height: auto;
    padding: 22px 18px 18px !important;
  }

  #dashboard .hero-copy h1 {
    font-size: 30px;
  }

  #dashboard .hero-side {
    position: static;
    width: auto;
    margin-top: 16px;
  }

  #dashboard .summary-grid,
  #learningHub .hub-metric-grid,
  #researchHub .hub-metric-grid,
  #growthHub .hub-metric-grid,
  #sportsHub .sports-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard .summary-item:nth-child(2),
  #learningHub .hub-metric-grid > button:nth-child(2),
  #researchHub .hub-metric-grid > button:nth-child(2),
  #growthHub .hub-metric-grid > button:nth-child(2),
  #sportsHub .sports-kpi-grid > button:nth-child(2) {
    border-right: 0 !important;
  }

  #dashboard .summary-item:nth-child(-n + 2),
  #learningHub .hub-metric-grid > button:nth-child(-n + 2),
  #researchHub .hub-metric-grid > button:nth-child(-n + 2),
  #growthHub .hub-metric-grid > button:nth-child(-n + 2),
  #sportsHub .sports-kpi-grid > button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line) !important;
  }

  #dashboard .habit-row {
    grid-template-columns: 1fr;
  }

  #dashboard .habit-row > .panel {
    min-height: 0;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  #dashboard .habit-row > .panel:last-child {
    border-bottom: 0 !important;
  }

  #learningHub .hub-intro,
  #researchHub .hub-intro,
  #growthHub .hub-intro,
  #resources .resource-header,
  #admin .page-lead {
    padding: 18px;
  }

  #learningHub .hub-intro h3,
  #researchHub .hub-intro h3,
  #growthHub .hub-intro h3 {
    font-size: 21px;
  }

  #sportsHub .sports-main-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 16px;
    padding: 20px 18px;
  }

  #sportsHub .sports-main-hero h3 {
    font-size: 23px;
  }

  #sportsHub .sports-hero-week {
    min-height: 120px;
  }

  #growthHub .growth-visual-grid,
  #admin .admin-visual-grid {
    grid-template-columns: 1fr;
  }

  #growthHub .growth-visual-card,
  #admin .admin-visual-card {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  #growthHub .growth-visual-card:last-child,
  #admin .admin-visual-card:last-child {
    border-bottom: 0 !important;
  }

  #growthHub .growth-radar-chart,
  #growthHub .growth-trend-chart {
    min-height: 240px;
  }

  #resources .resource-link-copy strong {
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  .main {
    padding-right: 11px;
    padding-left: 11px;
  }

  #dashboard .action-board,
  #learningHub .learning-timeline-panel,
  #researchHub .research-evidence-panel,
  #growthHub .growth-analytics-panel,
  #admin .admin-operations-panel {
    padding-right: 14px;
    padding-left: 14px;
  }

  #dashboard .summary-item,
  #learningHub .hub-metric-grid > button,
  #researchHub .hub-metric-grid > button,
  #growthHub .hub-metric-grid > button,
  #sportsHub .sports-kpi-grid > button {
    min-height: 86px;
    padding: 13px 12px;
  }

  #dashboard .action-board-heading {
    align-items: flex-start;
  }

  #dashboard .action-board-score {
    min-width: 74px;
  }

  #dashboard .action-board-score strong {
    font-size: 24px;
  }

  #learningHub .learning-deadline-item {
    grid-template-columns: 50px 10px minmax(0, 1fr) 16px;
    gap: 8px;
  }

  #learningHub .learning-deadline-item em {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view.active {
    animation: none;
  }
}
