/* ===================================================================
   Monolith Intelligence — Design System (基于 DESIGN.md)
   =================================================================== */

:root {
  --surface: #f9f9f9;
  --surface-dim: #dadada;
  --surface-bright: #f9f9f9;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f3;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --surface-variant: #e2e2e2;

  --on-surface: #1a1c1c;
  --on-surface-variant: #4c4546;
  --inverse-surface: #2f3131;
  --inverse-on-surface: #f1f1f1;

  --primary: #000000;
  --on-primary: #ffffff;
  --primary-container: #1b1b1b;
  --on-primary-container: #848484;
  --inverse-primary: #c6c6c6;

  --secondary: #5e5e5e;
  --on-secondary: #ffffff;
  --secondary-container: #e3e2e2;
  --on-secondary-container: #646464;

  --outline: #7e7576;
  --outline-variant: #cfc4c5;

  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;

  --background: #f9f9f9;
  --on-background: #1a1c1c;

  --unit: 8px;
  --container-max-width: 800px;
  --gutter: 24px;
  --margin-mobile: 16px;
  --margin-desktop: 40px;

  --sidebar-width: 288px;

  --r-sm: 0.25rem;
  --r-default: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;
  --r-full: 9999px;

  --shadow-long-soft: 0px 10px 30px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --surface: #0a0a0a;
  --surface-dim: #0a0a0a;
  --surface-bright: #171717;
  --surface-container-lowest: #0a0a0a;
  --surface-container-low: #121212;
  --surface-container: #171717;
  --surface-container-high: #1c1c1c;
  --surface-container-highest: #262626;
  --surface-variant: #262626;

  --on-surface: #f5f5f5;
  --on-surface-variant: #a3a3a3;
  --inverse-surface: #f5f5f5;
  --inverse-on-surface: #0a0a0a;

  --primary: #ffffff;
  --on-primary: #000000;
  --primary-container: #f5f5f5;
  --on-primary-container: #2a2a2a;
  --inverse-primary: #404040;

  --secondary: #a3a3a3;
  --on-secondary: #000000;
  --secondary-container: #262626;
  --on-secondary-container: #c4c4c4;

  --outline: #6b6b6b;
  --outline-variant: #404040;

  --background: #0a0a0a;
  --on-background: #f5f5f5;

  --shadow-long-soft: 0px 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* ===================================================================
   Base
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; }
input, select, button, textarea { font-family: inherit; }
input, select, textarea { -webkit-appearance: none; appearance: none; }
input, select { border: none; background: transparent; color: inherit; }
/* 覆盖 Chromium select 原生指示符 — 用自定义箭头替代 */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='%23999' stroke-width='1.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 10px 6px !important;
  padding-right: 24px !important;
}
input:focus, select:focus, button:focus { outline: none; }

html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--background);
  color: var(--on-surface);
  overscroll-behavior: none;
  min-height: 100vh;
}

[data-theme="dark"] body {
  background-color: #0a0a0a;
}

/* ===== Dot-matrix background ===== */
.dot-bg {
  background-image: radial-gradient(var(--outline-variant) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}
[data-theme="dark"] .dot-bg {
  background-image: radial-gradient(#262626 0.5px, transparent 0.5px);
}

.app-main.dot-bg {
  background-attachment: fixed;
}

/* ===================================================================
   Scrollbar
   =================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--outline-variant); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--outline); }

/* ===================================================================
   Layout
   =================================================================== */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(207, 196, 197, 0.3);
  z-index: 50;
  display: flex; align-items: center;
  padding: 0 24px;
  transition: left 0.3s ease;
}
[data-theme="dark"] .app-header {
  background: rgba(10, 10, 10, 0.8);
  border-bottom-color: rgba(64, 64, 64, 0.5);
}

/* Sidebar */
.app-sidebar {
  position: fixed; left: 0; top: 64px;
  height: calc(100vh - 64px);
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .app-sidebar {
  background: rgba(20, 20, 20, 0.72);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sidebar inner — 实际的滚动容器 */
.sidebar-inner {
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100%;
  padding: 24px 20px;
  overflow-y: auto;
  gap: 16px;
}

/* Sidebar header (date + sign-in + streak) */
.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 4px 20px;
  border-bottom: 1px solid var(--outline-variant);
}
.sidebar-date {
  text-align: center;
  padding: 4px 0;
}
.sidebar-streak {
  text-align: center;
  padding-top: 4px;
  font-size: 14px;
  color: var(--on-surface-variant);
}

/* Sidebar nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  flex: 1;
}
.sidebar-nav .nav-item {
  padding: 10px 14px;
  border-radius: 10px;
}

/* Sidebar footer */
.sidebar-footer {
  text-align: center;
  padding: 6px 0 4px;
  border-top: 1px solid var(--outline-variant);
  font-size: 11px;
  color: var(--on-surface-variant);
}

/* Sidebar closed */
.sidebar-closed .app-sidebar {
  transform: translateX(-100%);
  width: 0;
}
.sidebar-closed .app-main {
  margin-left: 0 !important;
  max-width: 100vw !important;
}

/* Main content */
.app-main {
  margin-left: var(--sidebar-width);
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  padding: 40px;
  max-width: calc(100vw - var(--sidebar-width));
  transition: margin-left 0.3s ease, max-width 0.3s ease;
}

/* Sidebar inner scroll */
.sidebar-inner {
  display: flex; flex-direction: column;
  width: var(--sidebar-width);
  height: 100%;
  overflow-y: auto;
}

/* Nav toggle - always visible */
.nav-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  flex-shrink: 0 !important;
}
/* Header icon buttons (menu, theme) — 强制正方形避免被压成椭圆 */
.app-header button[data-theme-toggle] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  flex-shrink: 0 !important;
}

/* ===================================================================
   Components
   =================================================================== */
.card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-long-soft); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px;
  background: var(--primary); color: var(--on-primary);
  border: none; border-radius: var(--r-xl);
  font-weight: 500; font-size: 16px;
  cursor: pointer; transition: opacity 0.2s ease;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px;
  background: transparent; color: var(--on-surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-xl);
  font-weight: 500; font-size: 16px;
  cursor: pointer; transition: background 0.2s ease;
}
.btn-secondary:hover { background: var(--surface-container-low); }

.chip {
  display: inline-flex; align-items: center;
  gap: 6px; padding: 6px 12px;
  background: var(--surface-container); color: var(--on-surface-variant);
  border: none; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; letter-spacing: 0.05em;
  cursor: pointer; transition: background 0.2s ease;
}
.chip:hover { background: var(--surface-container-high); }
.chip.active { background: var(--primary); color: var(--on-primary); }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  color: var(--on-surface-variant);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: all 0.15s ease; cursor: pointer;
  white-space: nowrap;
}
.nav-item:hover { background: var(--surface-container-low); color: var(--on-surface); }
.nav-item.active { background: var(--surface-container-high); color: var(--primary); }
.nav-item .material-symbols-outlined { font-size: 20px; }

.eyebrow {
  font-size: 13px; font-weight: 500; letter-spacing: 0.2em;
  color: var(--on-surface-variant); text-transform: uppercase;
  font-family: 'Geist', 'Inter', sans-serif;
}

.headline-xl { font-size: 40px; font-weight: 600; line-height: 48px; letter-spacing: -0.02em; }
.headline-lg { font-size: 32px; font-weight: 600; line-height: 40px; letter-spacing: -0.02em; }
.body-lg { font-size: 18px; line-height: 28px; }
.body-md { font-size: 16px; line-height: 24px; }
.code { font-family: 'JetBrains Mono', 'Geist Mono', monospace; font-size: 14px; line-height: 20px; }

/* Animations */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-in 0.4s ease-out both; }

@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.4} }
.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.progress-bar { height: 6px; background: var(--surface-container); border-radius: var(--r-full); overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: var(--r-full); transition: width 0.4s ease; }

.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }

/* No underline */
.no-underline { text-decoration: none !important; }

/* ===================================================================
   Modal
   =================================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.modal-dialog {
  background: var(--surface-container-lowest);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 90%; max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  animation: slide-up 0.3s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: none; background: var(--surface-container); border-radius: var(--r-full);
  cursor: pointer; transition: background 0.2s; color: var(--on-surface-variant);
}
.modal-close:hover { background: var(--surface-container-high); }

/* ===================================================================
   Utility classes (全局可用，所有页面共享)
   =================================================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-10 { margin-bottom: 40px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-10 { margin-top: 40px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-auto { margin-left: auto; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.p-12 { padding: 48px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 8px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }
.pb-2 { padding-bottom: 8px; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.text-7xl { font-size: 72px; }
.text-on-surface { color: var(--on-surface); }
.text-on-surface-variant { color: var(--on-surface-variant); }
.text-primary { color: var(--primary); }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }

/* 占位符：让 .placeholder:text-on-surface-variant/70 这类工具类真正生效 */
.placeholder\:text-on-surface-variant\/70::placeholder { color: var(--on-surface-variant); opacity: 0.7; }
.placeholder\:text-on-surface-variant\/50::placeholder { color: var(--on-surface-variant); opacity: 0.5; }
.placeholder\:text-on-surface-variant::placeholder { color: var(--on-surface-variant); }
input::placeholder, textarea::placeholder { color: var(--on-surface-variant); opacity: 0.6; }
.rounded-full { border-radius: 9999px; }
.rounded-md { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }
.rounded-2xl { border-radius: 16px; }
.border { border: 1px solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-primary { border-color: var(--primary); }
.border-outline-variant { border-color: var(--outline-variant); }
.border-outline-variant\/10 { border-color: rgba(207, 196, 197, 0.1); }
.border-outline-variant\/20 { border-color: rgba(207, 196, 197, 0.2); }
.border-outline-variant\/30 { border-color: rgba(207, 196, 197, 0.3); }
[data-theme="dark"] .border-outline-variant\/10 { border-color: rgba(64, 64, 64, 0.4); }
/* 深色模式下原生 select 下拉项用白字（避免部分浏览器渲染成深色文字） */
[data-theme="dark"] select option { color: #fff; background: #1a1a1a; }
.bg-primary { background: var(--primary); }
.bg-transparent { background: transparent; }
.bg-surface-container { background: var(--surface-container); }
.bg-surface-container-low { background: var(--surface-container-low); }
.bg-surface-container-high { background: var(--surface-container-high); }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gap-y-2 > * + * { margin-top: 8px; }
.w-5 { width: 20px; }
.h-5 { height: 20px; }
.w-6 { width: 24px; }
.h-6 { height: 24px; }
.w-8 { width: 32px; }
.h-8 { height: 32px; }
.w-10 { width: 40px; }
.h-10 { height: 40px; }
.w-12 { width: 48px; }
.h-12 { height: 48px; }
.w-14 { width: 56px; }
.h-14 { height: 56px; }
.w-16 { width: 64px; }
.h-16 { height: 64px; }
.w-20 { width: 80px; }
.h-20 { height: 80px; }
.w-64 { width: 256px; }
.h-64 { height: 256px; }
.w-96 { width: 384px; }
.h-96 { height: 384px; }
.w-full { width: 100%; }
.max-w-xl { max-width: 576px; }
.max-w-2xl { max-width: 672px; }
.max-w-md { max-width: 448px; }
.max-w-3xl { max-width: 768px; }
.max-w-\[180px\] { max-width: 180px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.block { display: block; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-widest { letter-spacing: 0.2em; }
.uppercase { text-transform: uppercase; }
.line-through { text-decoration: line-through; }
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.7; }
.whitespace-nowrap { white-space: nowrap; }
.transition-colors { transition: color 0.2s, background 0.2s, border 0.2s; }
.transition-all { transition: all 0.2s; }
.transition-opacity { transition: opacity 0.2s; }
.transition-transform { transition: transform 0.2s; }
.cursor-pointer { cursor: pointer; }
.outline-none { outline: none; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.no-underline { text-decoration: none !important; }
.divide-y > * + * { border-top: 1px solid rgba(207, 196, 197, 0.1); }
[data-theme="dark"] .divide-y > * + * { border-top-color: rgba(64, 64, 64, 0.4); }
.absolute { position: absolute; }
.relative { position: relative; }
.fixed { position: fixed; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.top-2 { top: 8px; }
.right-2 { right: 8px; }
.top-4 { top: 16px; }
.left-4 { left: 16px; }
.right-4 { right: 16px; }
.bottom-4 { bottom: 16px; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-r { border-right-width: 1px; border-right-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.opacity-30 { opacity: 0.3; }
.opacity-60 { opacity: 0.6; }
.opacity-0 { opacity: 0; }
.hover\:opacity-100:hover { opacity: 1; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-long-soft { box-shadow: var(--shadow-long-soft); }
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.fade-in { animation: fade-in 0.4s ease-out both; }
.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.self-start { align-self: flex-start; }
.resize-none { resize: none; }
.blur-3xl { filter: blur(64px); }
.pointer-events-none { pointer-events: none; }
.list-disc { list-style-type: disc; }
.pl-6 { padding-left: 24px; }

/* 响应式断点 */
@media (min-width: 640px) { .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sm\:flex-row { flex-direction: row; } .sm\:items-center { align-items: center; } .sm\:flex-1 { flex: 1; } .sm\:flex-nowrap { flex-wrap: nowrap; } .sm\:gap-2 { gap: 8px; } .sm\:gap-3 { gap: 12px; } .sm\:gap-4 { gap: 16px; } .sm\:px-3 { padding-left: 12px; padding-right: 12px; } .sm\:px-4 { padding-left: 16px; padding-right: 16px; } .sm\:w-auto { width: auto; } .sm\:text-sm { font-size: 14px; } .sm\:text-base { font-size: 16px; } }
@media (min-width: 768px) { .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .md\:hidden { display: none; } }
@media (min-width: 1024px) { .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lg\:col-span-2 { grid-column: span 2 / span 2; } }

/* ===================================================================
   Header ticker
   =================================================================== */
.header-ticker {
  position: relative;
  overflow: hidden;
  height: 28px;
}
.ticker-item {
  position: absolute;
  width: 100%;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateY(10px);
}
.ticker-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 1024px) {
  .app-sidebar { width: 240px; }
  .sidebar-inner { width: 240px; }
  .app-main { margin-left: 240px; padding: 24px; max-width: calc(100vw - 240px); }
  .sidebar-closed .app-main { margin-left: 0 !important; max-width: 100vw !important; }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar-inner { width: 280px; }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; padding: 16px; max-width: 100vw; }
  .sidebar-closed .app-main { margin-left: 0 !important; max-width: 100vw !important; }
  .headline-xl { font-size: 28px; line-height: 36px; }
  .headline-lg { font-size: 22px; line-height: 30px; }

  /* 待办输入区：手机端竖排，按钮/下拉占满一行 */
  #todo-form { flex-direction: column; align-items: stretch; gap: 8px; }
  #todo-form > div:first-child { width: 100%; }
  #todo-form > select,
  #todo-form > button { width: 100%; padding-top: 12px; padding-bottom: 12px; }
}
