:root,
:root[data-theme="light"] {
  color-scheme: light;
  /* =========================
     Typography / Font
  ========================= */
  --font-sans:
    "Inter",
    "Avenir Next",
    "Helvetica Neue",
    "SF Pro Text",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans SC",
    sans-serif;
  --font-display:
    "Inter",
    "Avenir Next",
    "Helvetica Neue",
    "SF Pro Display",
    "PingFang SC",
    "Noto Sans SC",
    sans-serif;
  --font-mono:
    "SFMono-Regular",
    "JetBrains Mono",
    "Menlo",
    "Consolas",
    monospace;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-2xl: 40px;

  --line-height-tight: 1.15;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  --letter-tight: -0.02em;
  --letter-normal: 0;
  --letter-wide: 0.08em;
  --letter-extra-wide: 0.18em;

  /* =========================
     Background
  ========================= */
  --bg-base-1: #a2fc81;
  --bg-base-2: #61ff12;
  --bg-base-3: #fff56e;
  --bg-gradient: linear-gradient(
    135deg,
    rgba(162, 252, 129, 1) 0%,
    rgba(178, 250, 77, 1) 10%,
    rgba(97, 255, 18, 1) 30%,
    rgba(202, 255, 56, 1) 60%,
    rgba(255, 245, 110, 1) 100%
  );

  --bg-radial-1: rgba(255, 255, 255, 0.6);
  --bg-radial-2: rgba(163, 252, 104, 0.4);
  --bg-radial-3: rgba(220, 255, 180, 0.5);

  --surface-0: rgba(255, 255, 255, 0.08);
  --surface-1: rgba(255, 255, 255, 0.26);
  --surface-2: rgba(255, 255, 255, 0.48);
  --surface-3: rgba(255, 255, 255, 0.72);
  --surface-4: rgba(248, 252, 242, 0.9);

  /* =========================
     Text Colors
  ========================= */
  --text-primary: #171a16;
  --text-secondary: #5d6957;
  --text-tertiary: #909b8c;
  --text-muted: #bcc6b6;
  --text-inverse: #ffffff;

  /* =========================
     Accent / UI State
  ========================= */
  --accent-strong: #111111;
  --accent-strong-hover: #000000;
  --accent-soft: rgba(17, 17, 17, 0.08);

  --border-soft: rgba(23, 26, 22, 0.06);
  --border-medium: rgba(23, 26, 22, 0.1);
  --border-strong: rgba(23, 26, 22, 0.16);

  --success: #2f7d32;
  --warning: #b3811f;
  --danger: #a64141;

  /* =========================
     Shadow
  ========================= */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 40px rgba(163, 252, 104, 0.18);

  /* =========================
     Radius
  ========================= */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* =========================
     Spacing
  ========================= */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* =========================
     Layout
  ========================= */
  --container-max: 1440px;
  --sidebar-width: 320px;
  --topbar-height: 84px;
  --page-gutter: clamp(16px, 2.6vw, 36px);
  --topbar-gap: 14px;

  /* =========================
     Motion
  ========================= */
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: ease-in-out;

  --duration-fast: 160ms;
  --duration-base: 240ms;
  --duration-slow: 420ms;
  --duration-bg: 24s;

  /* =========================
     Component Tokens
  ========================= */
  --card-bg: var(--surface-2);
  --card-border: var(--border-soft);
  --card-shadow: var(--shadow-sm);
  --card-backdrop: blur(12px);

  --panel-bg: rgba(255, 255, 255, 0.52);
  --panel-border: rgba(23, 26, 22, 0.08);

  --input-bg: rgba(255, 255, 255, 0.72);
  --input-border: rgba(23, 26, 22, 0.08);
  --input-placeholder: var(--text-muted);

  --button-primary-bg: #111111;
  --button-primary-bg-hover: #000000;
  --button-primary-text: #ffffff;

  --button-secondary-bg: rgba(255, 255, 255, 0.58);
  --button-secondary-bg-hover: rgba(255, 255, 255, 0.78);
  --button-secondary-text: var(--text-primary);
  --button-secondary-border: rgba(23, 26, 22, 0.08);

  --tab-bg: rgba(255, 255, 255, 0.42);
  --tab-active-bg: #111111;
  --tab-text: var(--text-secondary);
  --tab-active-text: #ffffff;

  --task-item-bg: rgba(255, 255, 255, 0.34);
  --task-item-hover-bg: rgba(255, 255, 255, 0.52);

  --focus-ring: 0 0 0 3px rgba(163, 252, 104, 0.25);
  --grain-dot: rgba(0, 0, 0, 0.12);
  --logo-color: #111111;
  --surface-soft-bg: rgba(255, 255, 255, 0.3);
  --surface-soft-border: rgba(23, 26, 22, 0.05);
  --topbar-shadow: var(--shadow-xs);

  --theme-toggle-bg: rgba(255, 255, 255, 0.46);
  --theme-toggle-active-bg: rgba(255, 255, 255, 0.72);
  --theme-toggle-border: rgba(23, 26, 22, 0.08);
  --theme-toggle-text: var(--text-secondary);
  --theme-toggle-orb: linear-gradient(135deg, #fff7b8, #a4fc6f);
  --theme-toggle-orb-shadow: 0 0 0 8px rgba(163, 252, 104, 0.14), 0 10px 24px rgba(111, 155, 42, 0.16);

  --scene-frame-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.42));
  --scene-frame-base: var(--surface-1);
  --scene-frame-inset: rgba(255, 255, 255, 0.7);
  --scene-hover-shadow: 0 20px 44px rgba(68, 88, 18, 0.12);
  --scene-focus-outline: 0 0 0 3px rgba(17, 17, 17, 0.14);
  --scene-immersive-bg:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.58), transparent 22%),
    linear-gradient(329deg, rgba(255, 255, 255, 0.88) 0%, rgba(247, 247, 161, 0.94) 32%, rgba(163, 252, 104, 0.98) 100%);
  --scene-badge-bg: rgba(17, 17, 17, 0.9);
  --scene-badge-text: #ffffff;
  --scene-display-muted: rgba(15, 15, 15, 0.54);
  --scene-display-strong: rgba(15, 15, 15, 0.72);
  --scene-grid-line: rgba(17, 17, 17, 0.06);
  --scene-column: rgba(17, 17, 17, 0.16);
  --scene-column-earned: rgba(17, 17, 17, 0.92);
  --scene-plateau: rgba(17, 17, 17, 0.08);
  --scene-glow: rgba(17, 17, 17, 0.12);
  --scene-link: rgba(17, 17, 17, 0.18);
  --scene-link-earned: rgba(17, 17, 17, 0.92);
  --scene-node: rgba(17, 17, 17, 0.2);
  --scene-node-shadow: rgba(17, 17, 17, 0.14);
  --scene-node-earned: rgba(17, 17, 17, 0.96);
  --scene-node-ring: rgba(17, 17, 17, 0.06);
  --scene-halo-border: rgba(17, 17, 17, 0.08);
  --scene-tabs-immersive-bg: rgba(255, 255, 255, 0.22);
  --scene-tabs-immersive-text: rgba(15, 15, 15, 0.8);
  --scene-reward-immersive-bg: rgba(255, 255, 255, 0.2);
  --scene-reward-immersive-text: rgba(15, 15, 15, 0.78);
  --task-sidebar-immersive-bg: rgba(255, 255, 255, 0.24);

  --todo-toast-bg: rgba(17, 24, 39, 0.88);
  --todo-toast-border: rgba(255, 255, 255, 0.2);
  --todo-toast-text: #f8fafc;
  --todo-toast-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);

  --usage-bar-fill: linear-gradient(90deg, rgba(163, 252, 104, 0.96), rgba(17, 17, 17, 0.78));
  --chart-hole-bg: #f7f6f2;
  --chart-hole-border: rgba(15, 23, 42, 0.04);
  --modal-scrim-bg: rgba(17, 17, 17, 0.45);
  --modal-card-border: rgba(255, 255, 255, 0.18);
  --modal-card-bg: rgba(14, 14, 14, 0.92);
  --modal-card-text: #ffffff;
  --modal-card-muted: rgba(255, 255, 255, 0.72);

}

:root[data-theme="night"] {
  color-scheme: dark;
  --bg-base-1: #09110d;
  --bg-base-2: #0f2b1b;
  --bg-base-3: #2a2b17;
  --bg-gradient: linear-gradient(135deg, #030504 0%, #07100c 14%, #0b1912 30%, #12221a 52%, #181321 76%, #08090d 100%);
  --bg-radial-1: rgba(198, 255, 236, 0.12);
  --bg-radial-2: rgba(173, 255, 72, 0.12);
  --bg-radial-3: rgba(255, 223, 128, 0.08);

  --surface-0: rgba(255, 255, 255, 0.03);
  --surface-1: rgba(14, 20, 17, 0.52);
  --surface-2: rgba(20, 28, 24, 0.76);
  --surface-3: rgba(31, 41, 35, 0.92);
  --surface-4: rgba(18, 24, 21, 0.96);

  --text-primary: #eff7e8;
  --text-secondary: #b2c1ac;
  --text-tertiary: #869582;
  --text-muted: #5d6b5e;
  --text-inverse: #10130f;

  --accent-strong: #e3fb87;
  --accent-strong-hover: #f0ffad;
  --accent-soft: rgba(227, 251, 135, 0.12);

  --border-soft: rgba(229, 247, 219, 0.08);
  --border-medium: rgba(229, 247, 219, 0.12);
  --border-strong: rgba(229, 247, 219, 0.2);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.26);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(173, 255, 72, 0.1);

  --card-bg: rgba(17, 25, 21, 0.66);
  --card-border: rgba(229, 247, 219, 0.08);
  --card-shadow: var(--shadow-sm);
  --panel-bg: rgba(11, 16, 14, 0.62);
  --panel-border: rgba(229, 247, 219, 0.08);

  --input-bg: rgba(19, 27, 23, 0.86);
  --input-border: rgba(229, 247, 219, 0.1);
  --input-placeholder: rgba(178, 193, 172, 0.46);

  --button-primary-bg: #e3fb87;
  --button-primary-bg-hover: #f0ffad;
  --button-primary-text: #10130f;

  --button-secondary-bg: rgba(19, 27, 23, 0.72);
  --button-secondary-bg-hover: rgba(28, 37, 32, 0.86);
  --button-secondary-text: var(--text-primary);
  --button-secondary-border: rgba(229, 247, 219, 0.09);

  --tab-bg: rgba(12, 18, 15, 0.5);
  --tab-active-bg: #e3fb87;
  --tab-text: var(--text-secondary);
  --tab-active-text: #10130f;

  --task-item-bg: rgba(18, 25, 21, 0.72);
  --task-item-hover-bg: rgba(28, 36, 31, 0.9);

  --focus-ring: 0 0 0 3px rgba(227, 251, 135, 0.18);
  --grain-dot: rgba(255, 255, 255, 0.18);
  --logo-color: #f1f8ed;
  --surface-soft-bg: rgba(17, 25, 21, 0.46);
  --surface-soft-border: rgba(229, 247, 219, 0.08);
  --topbar-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);

  --theme-toggle-bg: rgba(12, 18, 15, 0.5);
  --theme-toggle-active-bg: rgba(21, 31, 26, 0.86);
  --theme-toggle-border: rgba(229, 247, 219, 0.1);
  --theme-toggle-text: var(--text-secondary);
  --theme-toggle-orb: linear-gradient(135deg, #f4ffbe, #c4f86b);
  --theme-toggle-orb-shadow: 0 0 0 8px rgba(227, 251, 135, 0.1), 0 10px 24px rgba(160, 215, 74, 0.18);

  --scene-frame-overlay: linear-gradient(180deg, rgba(28, 36, 30, 0.78), rgba(10, 15, 13, 0.46));
  --scene-frame-base: rgba(17, 25, 21, 0.74);
  --scene-frame-inset: rgba(255, 255, 255, 0.08);
  --scene-hover-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  --scene-focus-outline: 0 0 0 3px rgba(227, 251, 135, 0.18);
  --scene-immersive-bg:
    radial-gradient(circle at 18% 18%, rgba(237, 255, 177, 0.08), transparent 18%),
    linear-gradient(320deg, rgba(7, 10, 9, 0.98) 0%, rgba(12, 21, 18, 0.96) 38%, rgba(24, 35, 28, 0.96) 58%, rgba(31, 21, 42, 0.88) 100%);
  --scene-badge-bg: rgba(227, 251, 135, 0.92);
  --scene-badge-text: #10130f;
  --scene-display-muted: rgba(231, 242, 223, 0.52);
  --scene-display-strong: rgba(241, 248, 237, 0.96);
  --scene-grid-line: rgba(229, 247, 219, 0.08);
  --scene-column: rgba(210, 232, 199, 0.16);
  --scene-column-earned: rgba(227, 251, 135, 0.92);
  --scene-plateau: rgba(227, 251, 135, 0.12);
  --scene-glow: rgba(227, 251, 135, 0.16);
  --scene-link: rgba(226, 242, 218, 0.16);
  --scene-link-earned: rgba(227, 251, 135, 0.88);
  --scene-node: rgba(214, 231, 209, 0.18);
  --scene-node-shadow: rgba(227, 251, 135, 0.12);
  --scene-node-earned: rgba(245, 255, 209, 0.98);
  --scene-node-ring: rgba(227, 251, 135, 0.12);
  --scene-halo-border: rgba(229, 247, 219, 0.1);
  --scene-tabs-immersive-bg: rgba(10, 15, 13, 0.46);
  --scene-tabs-immersive-text: rgba(239, 247, 232, 0.78);
  --scene-reward-immersive-bg: rgba(12, 18, 15, 0.5);
  --scene-reward-immersive-text: rgba(239, 247, 232, 0.78);
  --task-sidebar-immersive-bg: rgba(11, 16, 14, 0.5);

  --todo-toast-bg: rgba(11, 16, 14, 0.9);
  --todo-toast-border: rgba(229, 247, 219, 0.12);
  --todo-toast-text: #f4f8ef;
  --todo-toast-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);

  --usage-bar-fill: linear-gradient(90deg, rgba(227, 251, 135, 0.98), rgba(120, 255, 204, 0.72));
  --chart-hole-bg: rgba(9, 13, 11, 0.95);
  --chart-hole-border: rgba(229, 247, 219, 0.08);
  --modal-scrim-bg: rgba(4, 6, 5, 0.58);
  --modal-card-border: rgba(229, 247, 219, 0.12);
  --modal-card-bg: rgba(8, 12, 10, 0.92);
  --modal-card-text: #f4f8ef;
  --modal-card-muted: rgba(239, 247, 232, 0.72);
}

/* =========================
   Global Reset
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* Fallback only; the real page background is rendered via body::before. */
  background: var(--bg-gradient);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-regular);
  color: var(--text-primary);
  background: transparent;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 24%, var(--bg-radial-1) 0%, transparent 40%),
    radial-gradient(circle at 82% 68%, var(--bg-radial-2) 0%, transparent 45%),
    radial-gradient(circle at 58% 10%, var(--bg-radial-3) 0%, transparent 36%),
    var(--bg-gradient);
  background-size: 120% 120%, 120% 120%, 120% 120%, 100% 100%;
  background-position: 20% 30%, 80% 70%, 60% 10%, 0% 0%;
  background-repeat: no-repeat;
  animation: flowdoroBackgroundMove var(--duration-bg) var(--ease-soft) infinite alternate;
  transform: translateZ(0);
  will-change: transform;
}

@keyframes flowdoroBackgroundMove {
  0% {
    background-position: 20% 30%, 80% 70%, 60% 10%, 0% 0%;
  }

  100% {
    background-position: 24% 34%, 76% 64%, 56% 14%, 0% 0%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: radial-gradient(var(--grain-dot) 0.4px, transparent 0.4px);
  background-size: 8px 8px;
  mix-blend-mode: soft-light;
}

/* Performance: reduce heavy paints while fast-scrolling to avoid checkerboarding. */
body.is-scrolling::before {
  animation-play-state: paused;
}

body.is-scrolling::after {
  opacity: 0.02;
  mix-blend-mode: normal;
}

body.is-scrolling * {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.is-scrolling .mist-layer,
body.is-scrolling .mist-haze-band {
  filter: none;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

::selection {
  background: rgba(163, 252, 104, 0.26);
}

/* =========================
   Type Scale Helpers
========================= */
.text-display {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-tight);
  font-weight: var(--font-weight-bold);
}

.text-h1 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-tight);
  font-weight: var(--font-weight-bold);
}

.text-h2 {
  font-size: var(--text-lg);
  line-height: 1.25;
  font-weight: var(--font-weight-semibold);
}

.text-body {
  font-size: var(--text-md);
  line-height: var(--line-height-normal);
}

.text-small {
  font-size: var(--text-sm);
  line-height: 1.45;
}

.text-micro {
  font-size: var(--text-xs);
  line-height: 1.4;
}

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

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

.text-muted {
  color: var(--text-muted);
}

.text-inverse {
  color: var(--text-inverse);
}

.text-label {
  font-size: var(--text-sm);
  letter-spacing: var(--letter-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.text-environment {
  font-size: var(--text-md);
  letter-spacing: var(--letter-extra-wide);
  color: var(--text-tertiary);
  text-transform: uppercase;
}

/* =========================
   Layout / Component Helpers
========================= */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.surface-soft {
  background: var(--surface-soft-bg);
  border: 1px solid var(--surface-soft-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.border-soft {
  border: 1px solid var(--border-soft);
}

.shadow-soft {
  box-shadow: var(--shadow-sm);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.app-shell {
  width: calc(100vw - (var(--page-gutter) * 2));
  margin: 0 auto;
  min-height: calc(100dvh - (var(--page-gutter) * 2));
  padding: 0 0 56px;
  position: relative;
  z-index: 1;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 22vw, 460px);
  gap: 28px;
  align-items: start;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  position: sticky;
  top: 0;
  z-index: 24;
  margin: 0 calc(-1 * var(--page-gutter)) 22px;
  min-height: var(--topbar-height);
  padding: var(--space-3) var(--page-gutter);
  isolation: isolate;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: 0;
  border: none;
  background-image:
    radial-gradient(circle at 20% 24%, var(--bg-radial-1) 0%, transparent 40%),
    radial-gradient(circle at 82% 68%, var(--bg-radial-2) 0%, transparent 45%),
    radial-gradient(circle at 58% 10%, var(--bg-radial-3) 0%, transparent 36%),
    var(--bg-gradient);
  background-repeat: no-repeat;
  background-size:
    120% 120%,
    120% 120%,
    120% 120%,
    100vw var(--page-bg-height, 100vh);
  background-position:
    20% 30%,
    80% 70%,
    60% 10%,
    0 calc(-1 * var(--topbar-scroll-y, 0px));
  box-shadow: var(--topbar-shadow);
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 24%, var(--bg-radial-1) 0%, transparent 40%),
    radial-gradient(circle at 82% 68%, var(--bg-radial-2) 0%, transparent 45%),
    radial-gradient(circle at 58% 10%, var(--bg-radial-3) 0%, transparent 36%),
    var(--bg-gradient);
  background-repeat: no-repeat;
  background-size:
    120% 120%,
    120% 120%,
    120% 120%,
    100vw var(--page-bg-height, 100vh);
  background-position:
    20% 30%,
    80% 70%,
    60% 10%,
    0 calc(-1 * var(--topbar-scroll-y, 0px) - 84px);
  opacity: 0.92;
  -webkit-mask-image: linear-gradient(
    360deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(0, 0, 0, 0.05) 10%,
    rgba(0, 0, 0, 0.51) 30%,
    rgba(0, 0, 0, 0.9) 80%,
    rgba(0, 0, 0, 1) 100%
  );
  mask-image: linear-gradient(
    360deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(0, 0, 0, 0.05) 10%,
    rgba(0, 0, 0, 0.51) 30%,
    rgba(0, 0, 0, 0.9) 80%,
    rgba(0, 0, 0, 1) 100%
  );
}

.topbar .hero {
  flex: 0 1 auto;
  align-items: center;
}

.topbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
  margin-left: auto;
}

.topbar .top-nav {
  width: min(420px, 100%);
  flex: 0 0 auto;
}

.main-column {
  min-width: 0;
}

.flow-layout {
  display: block;
}

.hero {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  width: fit-content;
  max-width: 100%;
}

.sticky-rail {
  align-self: start;
  min-width: 0;
}

.sticky-rail-inner {
  display: grid;
  gap: 18px;
  align-items: start;
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
}

.sidebar-sticky-enhanced .sticky-rail {
  align-self: stretch;
}

.sidebar-sticky-enhanced .sticky-rail-inner {
  align-self: start;
}

.sidebar-sticky-enhanced .task-sidebar-shell {
  height: var(--sidebar-window-height);
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-sticky-enhanced .task-sidebar-shell::-webkit-scrollbar {
  display: none;
}

.scroll-debug-overlay {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

body.debug-scroll .scroll-debug-overlay {
  display: block;
}

.scroll-debug-line,
.scroll-debug-axis,
.scroll-debug-handoff {
  position: absolute;
}

.scroll-debug-line {
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(17, 17, 17, 0.4);
}

.scroll-debug-line span {
  position: absolute;
  top: -12px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: rgba(17, 17, 17, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scroll-debug-line-top {
  top: 25vh;
}

.scroll-debug-line-mid {
  top: 50vh;
}

.scroll-debug-line-bottom {
  top: 75vh;
}

.scroll-debug-axis {
  top: 0;
  bottom: 0;
  left: 50vw;
  border-left: 1px dashed rgba(17, 17, 17, 0.18);
}

.scroll-debug-handoff {
  top: var(--debug-handoff-top, 0);
  border-top: 2px solid rgba(17, 17, 17, 0.5);
}

.scroll-debug-handoff span {
  position: absolute;
  top: -14px;
  left: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.88);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-debug-handoff-left {
  left: var(--debug-left-start, 0);
  width: var(--debug-left-width, 0);
}

.scroll-debug-handoff-right {
  left: var(--debug-right-start, 0);
  width: var(--debug-right-width, 0);
}

.scroll-debug-panel {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
}

body.debug-scroll .scroll-debug-panel {
  display: grid;
  gap: 10px;
}

.scroll-debug-control {
  display: grid;
  gap: 8px;
  color: rgba(17, 17, 17, 0.74);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-debug-control input {
  width: 100%;
}

.scroll-debug-value {
  margin: 0;
  color: #111111;
  font-size: 20px;
  font-weight: 800;
}

.scroll-debug-metrics {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.04);
  color: rgba(17, 17, 17, 0.72);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--letter-wide);
  font-size: var(--text-sm);
}

h1,
h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  letter-spacing: var(--letter-tight);
}

h1 {
  font-size: clamp(2.4rem, 4.6vw, var(--text-2xl));
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
}

.logo {
  font-family: "Poppins", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: clamp(56px, 6vw, 96px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--logo-color);
  display: inline-block;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 124px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  color: var(--theme-toggle-text);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-self: flex-end;
}

.theme-toggle.is-night {
  background: var(--theme-toggle-active-bg);
}

.theme-toggle-copy {
  display: grid;
  justify-items: start;
  gap: 1px;
}

.theme-toggle-label,
.theme-toggle-value {
  margin: 0;
  line-height: 1;
}

.theme-toggle-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-toggle-value {
  font-size: 0.94rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.theme-toggle-orb {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--theme-toggle-orb);
  box-shadow: var(--theme-toggle-orb-shadow);
}

h2 {
  font-size: clamp(2rem, 4vw, var(--text-xl));
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
}

.top-nav,
.scene-tabs {
  display: inline-grid;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--tab-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.top-nav {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.scene-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  width: fit-content;
  max-width: 100%;
}

.top-nav-item,
.scene-tab {
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--tab-text);
  cursor: pointer;
  font-weight: var(--font-weight-semibold);
  transition:
    background var(--duration-base) var(--ease-standard),
    color var(--duration-base) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.top-nav-item {
  min-width: 98px;
  padding: 10px 16px;
}

.scene-tab {
  padding: 9px 14px;
  min-width: 0;
  flex: 0 0 auto;
  font-size: 0.92rem;
}

.top-nav-item.is-active,
.scene-tab.is-active {
  background: var(--tab-active-bg);
  color: var(--tab-active-text);
  box-shadow: var(--shadow-xs);
}

.page {
  display: block;
  scroll-margin-top: 96px;
}

.page + .page {
  margin-top: 22px;
}

.focus-immersive {
  overflow: hidden;
}

.panel {
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.summary-grid,
.actions,
.stats-grid,
.modal-actions {
  display: grid;
  gap: 16px;
}

.focus-immersive .hero,
.focus-immersive .topbar,
.focus-immersive .summary-grid,
.focus-immersive .actions,
.focus-immersive .page-stats,
.focus-immersive .page-settings {
  display: none !important;
}

.focus-immersive .panel {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.task-sidebar {
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-height: none;
  overflow: visible;
}

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

.task-count {
  margin: 0;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.task-done-today {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
}

.counter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.task-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    background var(--duration-base) var(--ease-standard);
}

.task-input::placeholder {
  color: var(--input-placeholder);
}

.task-input:focus {
  border-color: rgba(163, 252, 104, 0.48);
  box-shadow: var(--focus-ring);
}

.task-add-button {
  min-width: 78px;
}

.task-tools {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.task-random-button {
  width: 100%;
}

.task-random-result {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-medium);
  background: var(--surface-0);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
  word-break: break-word;
}

.task-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.counter-section {
  display: grid;
  gap: 12px;
}

.counter-section-main {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.counter-count {
  margin: 0;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.counter-total {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

.counter-add-button {
  min-width: 78px;
}

.counter-list {
  display: grid;
  gap: 10px;
}

.counter-section-main .counter-list {
  gap: 12px;
}

.task-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.task-group.is-drop-target {
  border-color: var(--border-medium);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-soft);
}

.task-group-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.task-group-title,
.task-group-meta,
.task-item-tag {
  margin: 0;
}

.task-group-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-wide);
  text-transform: uppercase;
  color: var(--text-primary);
}

.task-group-meta,
.task-group-empty {
  color: var(--text-secondary);
}

.task-group-meta {
  font-variant-numeric: tabular-nums;
}

.task-group-items {
  display: grid;
  gap: 10px;
  min-height: 50px;
}

.task-group-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-medium);
  background: var(--surface-0);
}

.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--task-item-bg);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    opacity var(--duration-fast) var(--ease-standard),
    background var(--duration-base) var(--ease-standard);
}

.task-item:hover {
  background: var(--task-item-hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.task-item.is-random-picked {
  border-color: color-mix(in srgb, var(--accent-strong) 16%, var(--border-medium));
  background: color-mix(in srgb, var(--task-item-hover-bg) 82%, var(--accent-soft));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent-strong) 10%, transparent),
    var(--shadow-sm);
}

.task-item.is-random-picked .task-item-title {
  font-weight: var(--font-weight-bold);
}

body.todo-drag-active .task-item:hover {
  transform: none;
}

body.todo-drag-active .task-sidebar {
  user-select: none;
}

.task-item.is-dragging {
  opacity: 0.45;
  transform: scale(0.985);
}

.task-item-drag-preview {
  opacity: 0.92;
  transform: rotate(-1.5deg) scale(0.98);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.task-item-drag-preview .task-item-drag,
.task-item-drag-preview .task-item-toggle,
.task-item-drag-preview .task-item-remove,
.task-item-drag-preview .task-category-control {
  opacity: 0.72;
}

.task-item.drop-before {
  border-top-color: var(--border-strong);
  box-shadow: inset 0 3px 0 color-mix(in srgb, var(--accent-strong) 24%, transparent);
}

.task-item.drop-after {
  border-bottom-color: var(--border-strong);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--accent-strong) 24%, transparent);
}

.task-item-leading {
  display: grid;
  gap: 8px;
}

.task-item-drag,
.task-item-toggle,
.task-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
}

.task-item-drag {
  cursor: grab;
  background: var(--button-secondary-bg);
  border-color: var(--button-secondary-border);
  color: var(--text-secondary);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
}

.task-item-drag:active {
  cursor: grabbing;
}

.task-item-toggle {
  background: var(--surface-3);
  border-color: var(--border-medium);
  color: var(--text-secondary);
}

.task-item.is-done .task-item-toggle {
  background: var(--button-primary-bg);
  border-color: var(--button-primary-bg);
  color: var(--button-primary-text);
}

.task-item-remove {
  background: var(--button-secondary-bg);
  border-color: var(--button-secondary-border);
  color: var(--text-secondary);
}

.task-item-content {
  display: grid;
  gap: 8px;
}

.task-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.task-item-title {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.55;
  word-break: break-word;
}

.task-item-tag {
  justify-self: start;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}

:root:not([data-theme="night"]) .task-item-tag-category {
  border: 1px solid color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.12)) 42%, rgba(255, 255, 255, 0.52));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--surface-4) 80%, white),
      color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 12%, var(--surface-3))
    ),
    color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 24%, transparent);
  color: color-mix(in srgb, var(--category-color, var(--text-secondary)) 70%, var(--text-primary));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 8%, transparent),
    0 6px 14px color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 10%, transparent);
}

.task-category-control {
  display: inline-flex;
  position: relative;
}

.task-category-select {
  min-width: 0;
  max-width: 112px;
  padding: 4px 26px 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
  appearance: none;
  cursor: pointer;
}

:root:not([data-theme="night"]) .task-category-select {
  border: 1px solid color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.12)) 50%, rgba(255, 255, 255, 0.54));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--surface-4) 82%, white),
      color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 14%, var(--surface-2))
    ),
    color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 26%, transparent);
  color: color-mix(in srgb, var(--category-color, var(--text-primary)) 62%, var(--text-primary));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 10%, transparent),
    0 8px 18px color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.08)) 12%, transparent);
}

:root[data-theme="night"] .task-category-select {
  border: 1px solid color-mix(in srgb, var(--category-color, #e3fb87) 78%, rgba(229, 247, 219, 0.16));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--category-color, #e3fb87) 34%, rgba(56, 68, 60, 0.98)),
      color-mix(in srgb, var(--category-color, #e3fb87) 24%, rgba(20, 28, 24, 0.96))
    ),
    color-mix(in srgb, var(--category-color, #e3fb87) 28%, transparent);
  color: color-mix(in srgb, var(--category-color, #e3fb87) 72%, #f7fbf2);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--category-color, #e3fb87) 18%, transparent),
    0 8px 18px color-mix(in srgb, var(--category-color, #e3fb87) 14%, transparent);
}

.task-category-select:focus {
  outline: none;
}

:root:not([data-theme="night"]) .task-category-select:focus {
  outline: none;
  border-color: var(--category-color, var(--accent-strong));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.12)) 14%, transparent),
    0 0 0 4px color-mix(in srgb, var(--category-color, rgba(0, 0, 0, 0.12)) 20%, transparent);
}

:root[data-theme="night"] .task-category-select:focus {
  border-color: color-mix(in srgb, var(--category-color, #e3fb87) 88%, #f2fde4);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--category-color, #e3fb87) 22%, transparent),
    0 0 0 4px color-mix(in srgb, var(--category-color, #e3fb87) 20%, transparent),
    0 10px 22px color-mix(in srgb, var(--category-color, #e3fb87) 16%, transparent);
}

.task-category-control::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--category-color, var(--text-secondary));
  font-size: 10px;
  pointer-events: none;
}

:root:not([data-theme="night"]) .task-category-control::after {
  color: color-mix(in srgb, var(--category-color, var(--text-secondary)) 82%, var(--text-primary));
}

.task-item.is-done .task-item-title {
  color: var(--text-secondary);
  text-decoration: line-through;
}

.counter-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.counter-item-main,
.counter-item-remove {
  border-radius: var(--radius-md);
}

.counter-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  background: var(--task-item-bg);
  color: var(--text-primary);
  text-align: left;
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    background var(--duration-base) var(--ease-standard);
}

.counter-section-main .counter-item-main {
  min-height: 84px;
  padding: 18px 20px;
}

.counter-item-main:hover {
  background: var(--task-item-hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.counter-item-main:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.counter-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.counter-item-title {
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
  line-height: 1.45;
  word-break: break-word;
}

.counter-section-main .counter-item-title {
  font-size: 1.02rem;
}

.counter-item-hint {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

.counter-item-value {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.counter-section-main .counter-item-value {
  min-width: 72px;
  padding: 10px 14px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.counter-item-remove {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border: 1px solid var(--button-secondary-border);
  background: var(--button-secondary-bg);
  color: var(--text-secondary);
}

.todo-undo-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--todo-toast-border);
  background: var(--todo-toast-bg);
  color: var(--todo-toast-text);
  box-shadow: var(--todo-toast-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.todo-undo-toast[hidden] {
  display: none;
}

.todo-undo-label {
  margin: 0;
  min-width: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  word-break: break-word;
}

.todo-undo-button {
  flex: 0 0 auto;
  border-color: var(--todo-toast-border);
  color: var(--todo-toast-text);
}

.experience-card {
  display: block;
  padding: 20px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--panel-bg) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--panel-border) 88%, rgba(255, 255, 255, 0.18));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text-inverse) 20%, transparent);
}

.scene-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.scene-reward,
.stats-note,
.settings-note,
.history-note,
.modal-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

.scene-reward {
  max-width: 320px;
  text-align: right;
}

.scene {
  height: clamp(420px, calc(100dvh - 290px), 920px);
  cursor: pointer;
}

.focus-immersive .experience-card {
  position: fixed;
  inset: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  z-index: 30;
}

.focus-immersive .sticky-rail {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(320px, calc(100vw - 36px));
  z-index: 50;
}

.focus-immersive .sticky-rail-inner {
  position: static;
  height: 100%;
}

.focus-immersive .task-sidebar-shell {
  height: 100%;
}

.focus-immersive .task-sidebar {
  height: 100%;
  max-height: none;
  overflow: auto;
  background: var(--task-sidebar-immersive-bg);
}

.focus-immersive .scene-toolbar {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 40;
  margin-bottom: 0;
  align-items: start;
}

.focus-immersive .scene-tabs {
  background: var(--scene-tabs-immersive-bg);
}

.focus-immersive .scene-tab {
  color: var(--scene-tabs-immersive-text);
}

.focus-immersive .scene-tab.is-active {
  color: var(--tab-active-text);
}

.focus-immersive .scene-reward {
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--scene-reward-immersive-bg);
  color: var(--scene-reward-immersive-text);
  backdrop-filter: blur(16px);
}

.focus-immersive .scene {
  position: fixed;
  inset: 0;
  height: 100vh;
  z-index: 35;
}

.scene-frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-medium);
  background: var(--scene-frame-overlay), var(--scene-frame-base);
  box-shadow:
    inset 0 1px 0 var(--scene-frame-inset),
    var(--shadow-md);
  transition:
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard);
}

.scene:hover .scene-frame {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 var(--scene-frame-inset),
    var(--scene-hover-shadow);
}

.scene:focus-visible {
  outline: none;
  box-shadow: none;
}

.scene:focus-visible .scene-frame {
  box-shadow:
    inset 0 1px 0 var(--scene-frame-inset),
    var(--scene-focus-outline),
    var(--scene-hover-shadow);
}

.focus-immersive .scene-frame {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--scene-immersive-bg);
}

.focus-immersive .scene:hover .scene-frame,
.focus-immersive .scene:focus-visible .scene-frame {
  transform: none;
  box-shadow: none;
}

.scene-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.scene-view.is-active {
  opacity: 1;
}

.scene-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  pointer-events: none;
  z-index: 3;
}

.focus-immersive .scene-overlay {
  padding: 28px;
}

.scene-mode-name {
  margin: 0;
  font-size: var(--text-md);
  text-transform: uppercase;
  letter-spacing: var(--letter-extra-wide);
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.scene-badge {
  align-self: start;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--scene-badge-bg);
  color: var(--scene-badge-text);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.focus-immersive .scene-badge {
  background: color-mix(in srgb, var(--scene-badge-bg) 92%, transparent);
}

.scene-display {
  align-self: end;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.24rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--scene-display-muted);
}

.focus-immersive .scene-display {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  color: var(--scene-display-strong);
}

.scene-display.is-rest {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--text-primary);
}

.scene-grid {
  position: absolute;
  inset: 20px;
}

.grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--scene-grid-line);
}

.grid-line:nth-child(1) { top: 10%; }
.grid-line:nth-child(2) { top: 24%; }
.grid-line:nth-child(3) { top: 38%; }
.grid-line:nth-child(4) { top: 52%; }
.grid-line:nth-child(5) { top: 66%; }
.grid-line:nth-child(6) { top: 80%; }

.climb-columns {
  position: absolute;
  inset: auto 34px 34px;
  height: 270px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.climb-column {
  height: calc(12% + var(--stack-depth, 0) * 76%);
  background: var(--scene-column);
  border-radius: 18px 18px 6px 6px;
  transform-origin: bottom;
  transform: scaleY(0.18);
  opacity: 0.5;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.climb-column.is-earned {
  transform: scaleY(1);
  opacity: 1;
  background: var(--scene-column-earned);
}

.climb-plateau {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 26px;
  height: 16px;
  border-radius: 999px;
  background: var(--scene-plateau);
}

.climb-glow {
  position: absolute;
  inset: auto auto 58px 50%;
  width: calc(90px + var(--focus-depth, 0) * 180px);
  height: calc(90px + var(--focus-depth, 0) * 180px);
  border-radius: 999px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--scene-glow), transparent 72%);
}

.constellation-lines,
.constellation-stars {
  position: absolute;
  inset: 0;
}

.star-link {
  position: absolute;
  height: 2px;
  background: var(--scene-link);
  transform-origin: left center;
  opacity: 0.45;
  transition: opacity 180ms ease, background 180ms ease;
}

.star-link.is-earned {
  opacity: 1;
  background: var(--scene-link-earned);
}

.link-a { top: 32%; left: 22%; width: 18%; transform: rotate(18deg); }
.link-b { top: 42%; left: 36%; width: 24%; transform: rotate(-10deg); }
.link-c { top: 50%; left: 52%; width: 18%; transform: rotate(28deg); }
.link-d { top: 28%; left: 45%; width: 17%; transform: rotate(70deg); }
.link-e { top: 56%; left: 28%; width: 22%; transform: rotate(-22deg); }

.star-node {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--scene-node);
  box-shadow: 0 0 0 0 var(--scene-node-shadow);
  opacity: 0.55;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.star-node.is-earned {
  background: var(--scene-node-earned);
  opacity: 1;
  transform: scale(1.16);
  box-shadow: 0 0 0 10px var(--scene-node-ring);
}

.star-node:nth-child(1) { top: 30%; left: 20%; }
.star-node:nth-child(2) { top: 35%; left: 32%; }
.star-node:nth-child(3) { top: 26%; left: 42%; }
.star-node:nth-child(4) { top: 40%; left: 48%; }
.star-node:nth-child(5) { top: 37%; left: 60%; }
.star-node:nth-child(6) { top: 51%; left: 64%; }
.star-node:nth-child(7) { top: 58%; left: 52%; }
.star-node:nth-child(8) { top: 61%; left: 38%; }
.star-node:nth-child(9) { top: 56%; left: 26%; }
.star-node:nth-child(10) { top: 44%; left: 74%; }
.star-node:nth-child(11) { top: 22%; left: 58%; }
.star-node:nth-child(12) { top: 68%; left: 70%; }

.constellation-halo {
  position: absolute;
  inset: 18% 22%;
  border-radius: 999px;
  border: 1px dashed var(--scene-halo-border);
  transform: scale(calc(0.82 + var(--focus-depth, 0) * 0.28));
}

.scene-view-mist {
  --mist-depth: var(--focus-depth, 0);
}

.mist-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 255, 255, calc(0.14 + var(--mist-depth) * 0.22)), transparent 48%),
    radial-gradient(circle at 50% 70%, rgba(163, 252, 104, calc(0.08 + var(--mist-depth) * 0.16)), transparent 64%);
  opacity: calc(0.46 + var(--mist-depth) * 0.84);
  transition: opacity 280ms ease;
}

.mist-field,
.mist-haze {
  position: absolute;
  inset: 0;
}

.mist-layer,
.mist-haze-band {
  position: absolute;
  border-radius: 999px;
  filter: blur(38px);
  transform-origin: center center;
  transition: opacity 320ms ease, transform 320ms ease, filter 320ms ease;
}

.mist-layer {
  left: 50%;
  top: 56%;
  opacity: 0.1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.38) 50%, transparent 78%);
  animation: mistBreathe 15s ease-in-out infinite, mistDrift 22s ease-in-out infinite;
}

.mist-layer.is-earned {
  opacity: calc(0.24 + var(--mist-depth, 0) * 0.42);
}

.mist-layer-core {
  --mist-offset-x: -50%;
  --mist-offset-y: -50%;
  --mist-scale-base: calc(0.9 + var(--mist-depth, 0) * 0.18);
  width: calc(120px + var(--mist-depth, 0) * 180px);
  height: calc(90px + var(--mist-depth, 0) * 150px);
  filter: blur(calc(18px + var(--mist-depth, 0) * 12px));
  animation-duration: 11s, 14s;
}

.mist-layer-inner {
  --mist-offset-x: -48%;
  --mist-offset-y: -52%;
  --mist-scale-base: calc(0.86 + var(--mist-depth, 0) * 0.22);
  width: calc(210px + var(--mist-depth, 0) * 240px);
  height: calc(150px + var(--mist-depth, 0) * 180px);
  filter: blur(calc(28px + var(--mist-depth, 0) * 14px));
  animation-duration: 14s, 18s;
  animation-delay: -2s, -1s;
}

.mist-layer-middle {
  --mist-offset-x: -52%;
  --mist-offset-y: -50%;
  --mist-scale-base: calc(0.82 + var(--mist-depth, 0) * 0.24);
  width: calc(310px + var(--mist-depth, 0) * 260px);
  height: calc(220px + var(--mist-depth, 0) * 180px);
  filter: blur(calc(38px + var(--mist-depth, 0) * 16px));
  animation-duration: 16s, 22s;
  animation-delay: -3.5s, -2s;
}

.mist-layer-wide {
  --mist-offset-x: -50%;
  --mist-offset-y: -48%;
  --mist-scale-base: calc(0.78 + var(--mist-depth, 0) * 0.28);
  width: calc(440px + var(--mist-depth, 0) * 320px);
  height: calc(280px + var(--mist-depth, 0) * 230px);
  filter: blur(calc(48px + var(--mist-depth, 0) * 18px));
  animation-duration: 19s, 26s;
  animation-delay: -5s, -3s;
}

.mist-layer-veil {
  --mist-offset-x: -50%;
  --mist-offset-y: -44%;
  --mist-scale-base: calc(0.74 + var(--mist-depth, 0) * 0.3);
  width: calc(620px + var(--mist-depth, 0) * 420px);
  height: calc(360px + var(--mist-depth, 0) * 280px);
  filter: blur(calc(62px + var(--mist-depth, 0) * 22px));
  animation-duration: 22s, 30s;
  animation-delay: -6s, -4s;
}

.mist-haze-band {
  --mist-offset-x: 0%;
  --mist-offset-y: 0%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0.18) 52%, transparent 82%);
  opacity: calc(0.1 + var(--mist-depth, 0) * 0.24);
  animation: mistBreathe 18s ease-in-out infinite, mistFloat 24s ease-in-out infinite;
}

.mist-haze-band:nth-child(1) {
  width: calc(420px + var(--mist-depth, 0) * 200px);
  height: calc(180px + var(--mist-depth, 0) * 120px);
  left: 14%;
  top: 18%;
  animation-delay: -4s, -3s;
}

.mist-haze-band:nth-child(2) {
  width: calc(520px + var(--mist-depth, 0) * 260px);
  height: calc(210px + var(--mist-depth, 0) * 140px);
  right: 8%;
  bottom: 16%;
  animation-delay: -10s, -7s;
}

.mist-haze-band:nth-child(3) {
  --mist-offset-x: -50%;
  --mist-offset-y: -50%;
  width: calc(680px + var(--mist-depth, 0) * 320px);
  height: calc(240px + var(--mist-depth, 0) * 160px);
  left: 50%;
  top: 46%;
  animation-duration: 24s, 44s;
  animation-delay: -6s, -9s;
}

@keyframes mistBreathe {
  0%, 100% {
    transform: translate(var(--mist-offset-x, 0%), var(--mist-offset-y, 0%))
      scale(calc(var(--mist-scale-base, 1) * 0.965));
  }
  50% {
    transform: translate(calc(var(--mist-offset-x, 0%) + 1.8%), calc(var(--mist-offset-y, 0%) - 1.6%))
      scale(calc(var(--mist-scale-base, 1) * 1.05));
  }
}

@keyframes mistDrift {
  0%, 100% {
    margin-left: -1.6%;
    margin-top: 0.6%;
  }
  50% {
    margin-left: 2.1%;
    margin-top: -1.8%;
  }
}

@keyframes mistFloat {
  0%, 100% {
    margin-left: -1.2%;
    margin-top: 0.4%;
  }
  50% {
    margin-left: 2.4%;
    margin-top: -1.7%;
  }
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.summary-card,
.stat-card,
.history-section {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.summary-value,
.stats-value {
  margin: 10px 0 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-tight);
  color: var(--text-primary);
}

.summary-value.small {
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0;
}

.actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

button {
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: var(--font-weight-semibold);
  transition:
    transform var(--duration-fast) var(--ease-standard),
    opacity var(--duration-fast) var(--ease-standard),
    background var(--duration-base) var(--ease-standard),
    border-color var(--duration-base) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard);
}

button:hover:enabled {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  box-shadow: var(--shadow-md);
}

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

.secondary,
.ghost {
  background: var(--button-secondary-bg);
  border-color: var(--button-secondary-border);
  color: var(--button-secondary-text);
  backdrop-filter: blur(10px);
}

.secondary:hover:enabled,
.ghost:hover:enabled {
  background: var(--button-secondary-bg-hover);
}

.stats-header,
.settings-header,
.history-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.history-section {
  margin-top: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}

.settings-panel {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.settings-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.settings-panel-label,
.settings-panel-value {
  margin: 0;
}

.settings-panel-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.settings-panel-value {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.settings-panel-note {
  margin: 10px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.sync-panel {
  margin-bottom: 18px;
}

.sync-meta {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.sync-meta-item {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.usage-bar {
  width: 100%;
  height: 12px;
  margin-top: 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  overflow: hidden;
}

.usage-bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--usage-bar-fill);
  transition: width var(--duration-fast) var(--ease-standard);
}

.sync-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.settings-panel-slider {
  width: 100%;
  margin-top: 14px;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

.theme-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: min(280px, 100%);
  margin-top: 14px;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--tab-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bell-select-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.bell-select-control {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.bell-select-control::after {
  content: "v";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
  font-weight: 700;
  opacity: 0.8;
}

.bell-select {
  width: 100%;
  padding: 11px 38px 11px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--tab-bg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  appearance: none;
  cursor: pointer;
}

.bell-select:focus-visible {
  border-color: var(--border-strong);
}

.theme-option {
  padding: 11px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--tab-text);
}

.theme-option.is-selected {
  background: var(--tab-active-bg);
  color: var(--tab-active-text);
  box-shadow: var(--shadow-xs);
}

.settings-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition:
    transform var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard),
    background var(--duration-base) var(--ease-standard);
  cursor: pointer;
}

.settings-option.is-selected {
  border-color: var(--border-strong);
  background: var(--surface-3);
  box-shadow: var(--shadow-md);
}

.settings-option:hover {
  transform: translateY(-1px);
}

.settings-option-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-option-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-tight);
}

.settings-option-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--button-secondary-border);
  color: transparent;
  background: var(--button-secondary-bg);
}

.settings-option.is-selected .settings-option-check {
  color: var(--button-primary-text);
  background: var(--button-primary-bg);
  border-color: var(--button-primary-bg);
}

.settings-option:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.history-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.daily-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.category-overview {
  margin-top: 16px;
}

.category-overview-list {
  margin-top: 16px;
}

.category-overview-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.category-overview-chart-wrap {
  display: grid;
  place-items: center;
}

.category-overview-chart {
  position: relative;
  width: min(100%, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--border-soft), var(--shadow-sm);
}

.category-overview-chart-hole {
  position: absolute;
  inset: 22%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 50%;
  background: var(--chart-hole-bg);
  box-shadow: inset 0 0 0 1px var(--chart-hole-border);
}

.category-overview-chart-total,
.category-overview-chart-label,
.category-overview-title,
.category-overview-meta,
.category-overview-share {
  margin: 0;
}

.category-overview-chart-total {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-tight);
  color: var(--text-primary);
}

.category-overview-chart-label {
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.category-overview-legend {
  display: grid;
  gap: 12px;
}

.category-overview-legend-item {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--card-border);
}

.category-overview-legend-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.category-overview-legend-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-overview-share {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.category-overview-title {
  font-weight: 700;
  color: var(--text-primary);
}

.category-overview-meta {
  margin-top: 8px;
  color: var(--text-secondary);
}

.category-overview-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--category-color);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--category-color) 16%, transparent);
}

.daily-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

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

.daily-card-title,
.daily-card-meta,
.daily-block-title,
.daily-block-copy,
.daily-empty {
  margin: 0;
}

.daily-card-title {
  font-size: 1.14rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-tight);
}

.daily-card-meta,
.daily-block-copy,
.daily-empty {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.daily-block {
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--surface-2);
}

.daily-block-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.daily-block-copy strong {
  color: var(--text-primary);
}

.history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--card-border);
}

.history-entry-title,
.history-entry-meta,
.empty-history {
  margin: 0;
}

.history-entry-title {
  font-weight: 700;
}

.history-entry-meta,
.empty-history {
  color: var(--text-secondary);
  line-height: 1.6;
}

.history-entry-tag {
  align-self: start;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-medium);
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal[hidden] {
  display: none;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: var(--modal-scrim-bg);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(460px, calc(100vw - 24px));
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--modal-card-border);
  background: var(--modal-card-bg);
  color: var(--modal-card-text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.modal-card .eyebrow,
.modal-card .modal-copy {
  color: var(--modal-card-muted);
}

.modal-card h2 {
  margin-bottom: 16px;
}

.modal-card-focus {
  width: min(520px, calc(100vw - 24px));
  text-align: center;
}

.modal-card-focus .eyebrow {
  display: block;
  text-align: center;
}

.modal-card-focus h2 {
  margin: 8px 0 12px;
}

.modal-card-focus .modal-copy {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.modal-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.modal-actions.single-action {
  display: flex;
  justify-content: center;
}

.modal-actions.single-action button {
  width: min(100%, 320px);
  margin: 0 auto;
}

.modal-actions .ghost {
  color: var(--modal-card-text);
  border-color: var(--modal-card-border);
}

@media (max-width: 860px) {
  .topbar,
  .scene-toolbar,
  .stats-header,
  .settings-header,
  .history-head {
    flex-direction: column;
    align-items: start;
  }

  .scene-reward {
    max-width: none;
    text-align: left;
  }

  .focus-immersive .scene-toolbar {
    top: 14px;
    left: 14px;
    right: 14px;
  }

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

  .app-layout {
    grid-template-columns: 1fr;
  }

  .sticky-rail,
  .sticky-rail-inner {
    position: static;
    top: auto;
  }

  .topbar-actions {
    width: 100%;
  }

  .top-nav {
    width: 100%;
  }

  .top-nav-item {
    min-width: 0;
  }
}

@media (max-width: 1180px) {
  .scene-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .scene-reward {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 1320px) {
  .page-flow .scene-reward {
    display: none;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: calc(100vw - 16px);
    min-height: calc(100dvh - 16px);
    padding-top: 0;
  }

  .topbar {
    gap: 14px;
    margin-bottom: 16px;
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .theme-toggle {
    width: 100%;
    justify-content: center;
  }

  h1 {
    font-size: clamp(2.8rem, 18vw, 4.6rem);
  }

  .panel,
  .experience-card,
  .task-sidebar,
  .summary-card,
  .stat-card,
  .history-section {
    padding: 16px;
  }

  .summary-grid,
  .actions,
  .stats-grid,
  .modal-actions,
  .daily-blocks,
  .sync-actions {
    grid-template-columns: 1fr;
  }

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

  .settings-option-actions {
    width: 100%;
    justify-content: space-between;
  }

  .top-nav,
  .scene-tabs {
    width: 100%;
  }

  .top-nav-item {
    padding: 10px 8px;
  }

  .scene-toolbar {
    gap: 12px;
  }

  .scene-tabs {
    justify-content: flex-start;
  }

  .scene-tab {
    flex: 1 1 calc(50% - 4px);
    min-width: min(140px, 100%);
    padding: 10px 8px;
    font-size: 0.88rem;
  }

  .scene {
    height: 320px;
  }

  .scene-overlay {
    padding: 16px;
  }

  .scene-badge {
    max-width: 82%;
  }

  .scene-display.is-rest {
    font-size: clamp(1.8rem, 12vw, 2.8rem);
  }

  .focus-immersive .scene-toolbar {
    gap: 10px;
  }

  .focus-immersive .scene-reward {
    max-width: none;
    font-size: 0.95rem;
  }

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

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

  .task-head,
  .task-group-head,
  .counter-head {
    flex-direction: column;
    align-items: start;
  }

  .counter-section-main {
    padding: 16px;
  }

  .todo-undo-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    justify-content: space-between;
  }

  .task-item {
    gap: 10px;
    padding: 12px;
  }

  .counter-item {
    grid-template-columns: 1fr;
  }

  .counter-item-remove {
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }

  .task-group-title {
    letter-spacing: 0.04em;
  }

  .counter-section-main .counter-item-main {
    min-height: 0;
    padding: 16px;
  }

  .focus-immersive .task-sidebar-shell {
    max-height: 38vh;
  }

  .focus-immersive .sticky-rail {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }
}

@media (max-width: 520px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    width: calc(100vw - 12px);
    min-height: calc(100dvh - 12px);
    padding-top: 18px;
    padding-bottom: 32px;
  }

  .panel,
  .experience-card,
  .task-sidebar,
  .summary-card,
  .stat-card,
  .history-section,
  .modal-card {
    border-radius: 22px;
  }

  .top-nav-item,
  .scene-tab,
  button {
    font-size: 0.95rem;
  }

  .scene {
    height: 280px;
  }

  .scene-badge {
    max-width: 100%;
    font-size: 0.88rem;
  }

  .task-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .task-item-content {
    grid-column: 2;
    grid-row: 1;
  }

  .task-item-meta {
    align-items: start;
  }

  .task-category-select {
    width: 100%;
  }

  .task-item-remove {
    grid-column: 3;
    grid-row: 1;
  }

  .category-overview-layout {
    grid-template-columns: 1fr;
  }

  .category-overview-chart {
    width: min(100%, 220px);
  }

  .category-overview-legend-top {
    flex-direction: column;
    align-items: start;
  }

  .focus-immersive .scene-toolbar {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .focus-immersive .scene-tabs {
    width: min(100%, 360px);
  }

  .focus-immersive .sticky-rail {
    max-height: 34vh;
  }
}

/* =========================
   Beta Workspace Redesign
   Quiet, tool-like UI layered over the stable Flowdoro DOM.
========================= */

:root,
:root[data-theme="light"] {
  --font-sans:
    "Inter",
    "Avenir Next",
    "Helvetica Neue",
    "SF Pro Text",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans SC",
    sans-serif;
  --font-display: var(--font-sans);
  --font-mono:
    "SFMono-Regular",
    "JetBrains Mono",
    "Menlo",
    "Consolas",
    monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 36px;
  --letter-tight: 0;
  --letter-normal: 0;
  --letter-wide: 0;
  --letter-extra-wide: 0;

  --bg-gradient: #f5f7f4;
  --bg-radial-1: rgba(30, 116, 111, 0.08);
  --bg-radial-2: rgba(190, 124, 44, 0.08);
  --bg-radial-3: rgba(26, 31, 37, 0.05);

  --surface-0: rgba(255, 255, 255, 0.48);
  --surface-1: #ffffff;
  --surface-2: #fbfcfa;
  --surface-3: #f0f3ef;
  --surface-4: #e5ebe3;

  --text-primary: #18201c;
  --text-secondary: #66706a;
  --text-tertiary: #87918b;
  --text-muted: #a9b1ac;
  --text-inverse: #ffffff;

  --accent-strong: #1f766f;
  --accent-strong-hover: #155f59;
  --accent-soft: rgba(31, 118, 111, 0.11);
  --success: #26734d;
  --warning: #a96f20;
  --danger: #a84d4b;

  --border-soft: rgba(24, 32, 28, 0.08);
  --border-medium: rgba(24, 32, 28, 0.14);
  --border-strong: rgba(24, 32, 28, 0.22);

  --shadow-xs: 0 1px 2px rgba(24, 32, 28, 0.04);
  --shadow-sm: 0 8px 20px rgba(24, 32, 28, 0.06);
  --shadow-md: 0 18px 44px rgba(24, 32, 28, 0.08);
  --shadow-lg: 0 28px 72px rgba(24, 32, 28, 0.12);
  --shadow-glow: 0 0 0 transparent;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --radius-pill: 999px;

  --container-max: 1420px;
  --topbar-height: 78px;
  --page-gutter: clamp(18px, 2.4vw, 34px);

  --card-bg: #ffffff;
  --card-border: var(--border-soft);
  --card-shadow: var(--shadow-xs);
  --card-backdrop: none;
  --panel-bg: rgba(255, 255, 255, 0.82);
  --panel-border: var(--border-soft);

  --input-bg: #ffffff;
  --input-border: var(--border-soft);
  --input-placeholder: #9aa39d;

  --button-primary-bg: #1f766f;
  --button-primary-bg-hover: #155f59;
  --button-primary-text: #ffffff;
  --button-secondary-bg: #ffffff;
  --button-secondary-bg-hover: #f1f5f2;
  --button-secondary-text: var(--text-primary);
  --button-secondary-border: var(--border-soft);

  --tab-bg: #edf2ef;
  --tab-active-bg: #18201c;
  --tab-text: #68716b;
  --tab-active-text: #ffffff;

  --task-item-bg: #ffffff;
  --task-item-hover-bg: #f8faf8;
  --focus-ring: 0 0 0 3px rgba(31, 118, 111, 0.16);
  --logo-color: #18201c;

  --theme-toggle-bg: #ffffff;
  --theme-toggle-active-bg: #f7faf8;
  --theme-toggle-border: var(--border-soft);
  --theme-toggle-text: var(--text-secondary);
  --theme-toggle-orb: linear-gradient(135deg, #f5b95b, #1f766f);
  --theme-toggle-orb-shadow: 0 8px 18px rgba(24, 32, 28, 0.1);

  --scene-frame-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  --scene-frame-base: #111817;
  --scene-frame-inset: rgba(255, 255, 255, 0.06);
  --scene-hover-shadow: 0 26px 64px rgba(24, 32, 28, 0.16);
  --scene-focus-outline: var(--focus-ring);
  --scene-immersive-bg:
    radial-gradient(circle at 16% 14%, rgba(71, 162, 154, 0.2), transparent 30%),
    linear-gradient(135deg, #111817 0%, #152320 48%, #1a1d21 100%);
  --scene-badge-bg: rgba(236, 246, 242, 0.92);
  --scene-badge-text: #13201d;
  --scene-display-muted: rgba(235, 245, 240, 0.52);
  --scene-display-strong: rgba(248, 252, 250, 0.96);
  --scene-grid-line: rgba(238, 248, 243, 0.08);
  --scene-column: rgba(238, 248, 243, 0.14);
  --scene-column-earned: rgba(92, 211, 190, 0.9);
  --scene-plateau: rgba(238, 248, 243, 0.08);
  --scene-glow: rgba(92, 211, 190, 0.18);
  --scene-link: rgba(238, 248, 243, 0.14);
  --scene-link-earned: rgba(92, 211, 190, 0.9);
  --scene-node: rgba(238, 248, 243, 0.18);
  --scene-node-shadow: rgba(92, 211, 190, 0.16);
  --scene-node-earned: rgba(244, 185, 91, 0.98);
  --scene-node-ring: rgba(238, 248, 243, 0.1);
  --scene-halo-border: rgba(238, 248, 243, 0.1);

  --todo-toast-bg: rgba(24, 32, 28, 0.94);
  --todo-toast-border: rgba(255, 255, 255, 0.14);
  --todo-toast-text: #ffffff;
  --todo-toast-shadow: 0 20px 50px rgba(24, 32, 28, 0.18);
  --usage-bar-fill: linear-gradient(90deg, #1f766f, #f5b95b);
  --chart-hole-bg: #ffffff;
  --modal-scrim-bg: rgba(24, 32, 28, 0.42);
  --modal-card-bg: #ffffff;
  --modal-card-border: rgba(24, 32, 28, 0.1);
  --modal-card-text: #18201c;
  --modal-card-muted: #66706a;
}

:root[data-theme="night"] {
  --bg-gradient: #101412;
  --bg-radial-1: rgba(74, 182, 169, 0.12);
  --bg-radial-2: rgba(245, 185, 91, 0.08);
  --bg-radial-3: rgba(255, 255, 255, 0.04);

  --surface-0: rgba(255, 255, 255, 0.04);
  --surface-1: #151b18;
  --surface-2: #111613;
  --surface-3: #1d2521;
  --surface-4: #252f2a;

  --text-primary: #edf3ee;
  --text-secondary: #a8b4ac;
  --text-tertiary: #7f8b84;
  --text-muted: #6d7871;
  --text-inverse: #101412;

  --accent-strong: #64c7ba;
  --accent-strong-hover: #88ddd2;
  --accent-soft: rgba(100, 199, 186, 0.12);
  --border-soft: rgba(237, 243, 238, 0.08);
  --border-medium: rgba(237, 243, 238, 0.14);
  --border-strong: rgba(237, 243, 238, 0.22);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 20px 52px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.42);

  --card-bg: #151b18;
  --card-border: var(--border-soft);
  --panel-bg: rgba(21, 27, 24, 0.84);
  --panel-border: var(--border-soft);
  --input-bg: #101512;
  --input-border: var(--border-soft);
  --input-placeholder: #6f7b73;
  --button-primary-bg: #64c7ba;
  --button-primary-bg-hover: #88ddd2;
  --button-primary-text: #0d1513;
  --button-secondary-bg: #171e1a;
  --button-secondary-bg-hover: #202923;
  --button-secondary-text: var(--text-primary);
  --button-secondary-border: var(--border-soft);
  --tab-bg: #1a221e;
  --tab-active-bg: #edf3ee;
  --tab-text: #a8b4ac;
  --tab-active-text: #101412;
  --task-item-bg: #111714;
  --task-item-hover-bg: #19211d;
  --focus-ring: 0 0 0 3px rgba(100, 199, 186, 0.2);
  --logo-color: #edf3ee;
  --theme-toggle-bg: #171e1a;
  --theme-toggle-active-bg: #202923;
  --theme-toggle-border: var(--border-soft);
  --theme-toggle-text: var(--text-secondary);
  --scene-frame-base: #0b100f;
  --scene-badge-bg: rgba(237, 243, 238, 0.92);
  --scene-badge-text: #0f1715;
  --modal-card-bg: #151b18;
  --modal-card-border: rgba(237, 243, 238, 0.1);
  --modal-card-text: #edf3ee;
  --modal-card-muted: #a8b4ac;
  --chart-hole-bg: #151b18;
}

html {
  background: var(--bg-gradient);
}

body {
  font-size: var(--text-md);
  color: var(--text-primary);
  background: var(--bg-gradient);
}

body::before {
  background:
    radial-gradient(circle at 8% 10%, var(--bg-radial-1), transparent 30%),
    radial-gradient(circle at 92% 0%, var(--bg-radial-2), transparent 34%),
    radial-gradient(circle at 55% 92%, var(--bg-radial-3), transparent 42%),
    var(--bg-gradient);
  animation: none;
}

body::after {
  display: none;
}

.app-shell {
  width: min(100% - (var(--page-gutter) * 2), var(--container-max));
  padding: 0 0 48px;
}

.app-layout {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 380px);
  gap: 18px;
}

.topbar {
  min-height: var(--topbar-height);
  margin: 0 0 18px;
  padding: 14px 0;
  align-items: center;
}

.topbar::before,
.topbar::after {
  display: none;
}

.topbar .hero {
  width: auto;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--logo-color);
  text-transform: lowercase;
}

.beta-mark {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
}

.topbar-actions {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.topbar .top-nav,
.top-nav {
  width: auto;
  padding: 3px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--tab-bg);
  box-shadow: var(--shadow-xs);
}

.top-nav-item,
.scene-tab,
.theme-option {
  min-height: 36px;
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
}

.top-nav-item {
  min-width: 78px;
  padding: 8px 12px;
}

.theme-toggle {
  min-height: 44px;
  padding: 7px 12px 7px 8px;
  border-radius: var(--radius-md);
  border-color: var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  box-shadow: var(--shadow-xs);
}

.theme-toggle-orb {
  width: 28px;
  height: 28px;
}

.theme-toggle-label,
.theme-toggle-value {
  letter-spacing: 0;
}

.panel,
.task-sidebar,
.experience-card,
.history-section,
.settings-panel,
.stat-card,
.card,
.modal-card {
  border-radius: var(--radius-md);
  border-color: var(--border-soft);
  background: var(--panel-bg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel {
  padding: 18px;
}

.experience-card {
  padding: 0;
  overflow: hidden;
}

.scene-toolbar {
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--surface-1) 76%, transparent);
}

.scene-tabs {
  width: fit-content;
  padding: 3px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--tab-bg);
  box-shadow: none;
}

.scene-tab {
  padding: 8px 12px;
  color: var(--tab-text);
}

.scene-tab.is-active,
.top-nav-item.is-active,
.theme-option.is-selected {
  background: var(--tab-active-bg);
  color: var(--tab-active-text);
  box-shadow: var(--shadow-xs);
}

.scene {
  height: clamp(460px, 58vh, 680px);
  padding: 14px;
  background: var(--surface-1);
}

.scene-frame {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    var(--scene-frame-overlay),
    radial-gradient(circle at 22% 18%, rgba(100, 199, 186, 0.22), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(245, 185, 91, 0.12), transparent 24%),
    var(--scene-immersive-bg);
  box-shadow: inset 0 0 0 1px var(--scene-frame-inset);
}

.scene-overlay {
  align-items: start;
  justify-content: end;
  padding: clamp(22px, 4vw, 42px);
}

.scene-mode-name {
  color: rgba(248, 252, 250, 0.72);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
  text-transform: none;
}

.scene-badge {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: var(--radius-md);
  background: var(--scene-badge-bg);
  color: var(--scene-badge-text);
  font-size: var(--text-sm);
  letter-spacing: 0;
}

.scene-display {
  margin-top: 22px;
  color: var(--scene-display-strong);
  font-family: var(--font-mono);
  font-size: clamp(4.8rem, 13vw, 10.5rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-align: left;
  text-shadow: none;
}

.scene-display.is-rest {
  font-size: clamp(3rem, 8vw, 7rem);
}

.climb-column,
.star-node,
.mist-layer {
  transition-duration: 360ms;
}

.counter-section-main {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  box-shadow: var(--shadow-xs);
}

.eyebrow {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
}

.label,
.history-note,
.counter-total,
.counter-count,
.task-count,
.task-done-today,
.settings-panel-value,
.settings-panel-note,
.sync-meta-item {
  color: var(--text-secondary);
  letter-spacing: 0;
}

.task-sidebar {
  padding: 16px;
  background: color-mix(in srgb, var(--surface-1) 86%, transparent);
}

.task-form,
.counter-form {
  gap: 8px;
}

.task-input,
.bell-select {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: var(--text-sm);
  box-shadow: none;
}

.task-input:focus,
.bell-select:focus-visible,
.settings-panel-slider:focus-visible {
  border-color: var(--accent-strong);
  box-shadow: var(--focus-ring);
}

button {
  min-height: 38px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0;
  box-shadow: none;
}

.primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}

.secondary,
.ghost {
  background: var(--button-secondary-bg);
  border-color: var(--button-secondary-border);
  color: var(--button-secondary-text);
}

.task-list,
.counter-list,
.history-list,
.daily-list,
.category-overview-list {
  gap: 10px;
}

.task-group {
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.task-group-title {
  font-size: var(--text-xs);
  letter-spacing: 0;
}

.task-group-empty,
.empty-history {
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.task-item {
  gap: 10px;
  padding: 11px;
  border-radius: var(--radius-md);
  background: var(--task-item-bg);
  box-shadow: none;
}

.task-item:hover {
  transform: translateY(-1px);
  background: var(--task-item-hover-bg);
  box-shadow: var(--shadow-xs);
}

.task-item-drag,
.task-item-toggle,
.task-item-remove {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
}

.task-item-title,
.counter-item-title {
  color: var(--text-primary);
  letter-spacing: 0;
}

.task-item-tag,
.task-item-meta,
.counter-item-hint {
  color: var(--text-secondary);
  letter-spacing: 0;
}

.task-category-select {
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-secondary);
}

.counter-item {
  border-radius: var(--radius-md);
}

.counter-item-main,
.counter-item-remove {
  border-radius: var(--radius-md);
  background: var(--task-item-bg);
  box-shadow: none;
}

.counter-item-main:hover {
  background: var(--task-item-hover-bg);
  transform: translateY(-1px);
}

.counter-item-value {
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.stats-header,
.settings-header,
.history-head {
  align-items: center;
}

.stats-header::before,
.settings-header::before {
  content: "";
  display: block;
  width: 4px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--accent-strong);
}

.stats-header > div,
.settings-header > div {
  margin-right: auto;
}

.settings-header h2 {
  margin: 0;
  font-size: var(--text-xl);
  letter-spacing: 0;
}

.stats-grid {
  gap: 12px;
}

.stat-card {
  padding: 15px;
  background: var(--surface-1);
}

.stats-value {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1;
  letter-spacing: 0;
}

.history-section,
.category-overview,
.settings-panel {
  padding: 16px;
  background: var(--surface-1);
}

.history-item,
.daily-card,
.daily-block,
.category-overview-layout {
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.settings-panel-label {
  font-size: var(--text-md);
  letter-spacing: 0;
}

.theme-switch {
  border-radius: var(--radius-md);
}

.bell-select-control::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: translateY(-65%) rotate(45deg);
}

.usage-bar {
  height: 8px;
  border-radius: var(--radius-pill);
}

.modal-card {
  color: var(--modal-card-text);
  background: var(--modal-card-bg);
}

.modal-copy,
.modal-card .eyebrow {
  color: var(--modal-card-muted);
}

.todo-undo-toast {
  border-radius: var(--radius-md);
}

.focus-immersive .panel,
.focus-immersive .experience-card {
  background: transparent;
}

.focus-immersive .scene {
  height: 100dvh;
  padding: 0;
  background: var(--scene-frame-base);
}

.focus-immersive .scene-frame {
  border-radius: 0;
}

.focus-immersive .scene-toolbar {
  padding: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 1040px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sticky-rail,
  .sticky-rail-inner {
    position: static;
    top: auto;
  }

  .task-sidebar {
    display: block;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 24px, var(--container-max));
    padding-bottom: 30px;
  }

  .topbar {
    position: static;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
    min-height: 0;
  }

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

  .topbar .top-nav,
  .top-nav,
  .theme-toggle,
  .scene-tabs {
    width: 100%;
  }

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

  .top-nav-item {
    min-width: 0;
  }

  .panel,
  .task-sidebar,
  .history-section,
  .settings-panel,
  .stat-card {
    padding: 14px;
  }

  .scene-toolbar {
    padding: 12px;
  }

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

  .scene-tab {
    min-width: 0;
    padding: 8px 6px;
    white-space: normal;
  }

  .scene {
    height: 380px;
    padding: 10px;
  }

  .scene-overlay {
    padding: 18px;
  }

  .scene-display {
    font-size: clamp(3.8rem, 18vw, 6rem);
  }

  .task-form,
  .counter-form,
  .sync-actions {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 18px, var(--container-max));
    padding-top: 8px;
  }

  .logo {
    font-size: clamp(2.4rem, 14vw, 3.6rem);
  }

  .stats-grid,
  .daily-summary-grid {
    grid-template-columns: 1fr;
  }

  .scene {
    height: 330px;
  }

  .scene-display {
    font-size: clamp(3.2rem, 17vw, 4.7rem);
  }

  .scene-badge {
    max-width: 100%;
  }

  .task-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .counter-item {
    grid-template-columns: 1fr;
  }

  .counter-item-remove {
    width: 100%;
  }
}
