:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-muted: #f2f2f7;
  --ink: #1d1d1f;
  --ink-soft: #86868b;
  --muted: #aeaeb2;
  --line: rgba(0, 0, 0, 0.06);
  --line-strong: rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --mint: #2e7d6f;
  --mint-strong: #2e7d6f;
  --mint-deep: #215f54;
  --mint-soft: #e8f2ef;
  --lavender: #6b5ce7;
  --lavender-strong: #6b5ce7;
  --lavender-deep: #5145b8;
  --lavender-soft: #eeecfc;
  --peach: #d4754e;
  --peach-strong: #d4754e;
  --peach-deep: #a65332;
  --peach-soft: #fbeee8;
  --rose: #ff3b30;
  --rose-strong: #ff3b30;
  --rose-deep: #c92b22;
  --rose-soft: #fff0ef;
  --amber: #ff9f0a;
  --amber-deep: #a86600;
  --amber-soft: #fff6e8;
  --success: #34c759;
  --warning: #ff9f0a;
  --danger: #ff3b30;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.07);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.08);
  --radius-xl: 16px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 12px;
  --gutter: 16px;
  --fw-body: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --font-sans: -apple-system, "SF Pro Display", "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: -apple-system, "SF Pro Display", "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-spring: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html.has-modal {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: var(--fw-body);
  background:
    radial-gradient(960px 640px at 8% -10%, rgba(46, 125, 111, 0.08), transparent 62%),
    radial-gradient(820px 580px at 100% 0%, rgba(107, 92, 231, 0.06), transparent 58%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.16) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: default;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

::selection {
  background: rgba(169, 214, 197, 0.58);
}

:focus-visible {
  outline: 2px solid var(--mint-deep);
  outline-offset: 3px;
}

.tone-mint {
  --tone: var(--mint);
  --tone-strong: var(--mint-strong);
  --tone-deep: var(--mint-deep);
  --tone-soft: var(--mint-soft);
}

.tone-lavender {
  --tone: var(--lavender);
  --tone-strong: var(--lavender-strong);
  --tone-deep: var(--lavender-deep);
  --tone-soft: var(--lavender-soft);
}

.tone-peach {
  --tone: var(--peach);
  --tone-strong: var(--peach-strong);
  --tone-deep: var(--peach-deep);
  --tone-soft: var(--peach-soft);
}

.tone-rose {
  --tone: var(--rose);
  --tone-strong: var(--rose-strong);
  --tone-deep: var(--rose-deep);
  --tone-soft: var(--rose-soft);
}

.tone-quiet {
  --tone: #c9c4b8;
  --tone-strong: #9a9b93;
  --tone-deep: #70766f;
  --tone-soft: #f3f0e8;
}

.app-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top))
    0
    calc(36px + env(safe-area-inset-bottom));
}

.boot-fallback {
  display: grid;
  place-items: center;
  min-height: 70vh;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-align: center;
}

.fatal-error {
  max-width: 620px;
  margin: 12vh auto;
  padding: 48px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.fatal-error h1 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}

.fatal-error p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: var(--mint-deep);
  background: linear-gradient(145deg, #dff0e8, #f6e3d6);
  border-radius: 15px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 8px 20px rgba(63, 111, 93, 0.1);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-date {
  padding: 9px 14px;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
  background: rgba(255, 253, 249, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.topbar-badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 11px;
  color: var(--mint-deep);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: var(--mint-soft);
  border: 1px solid rgba(95, 149, 127, 0.16);
  border-radius: 999px;
}

.topbar-badge-dot {
  width: 5px;
  height: 5px;
  background: var(--mint-strong);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(95, 149, 127, 0.12);
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  margin: -4px 0 18px;
  background: rgba(255, 253, 249, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.view-tab {
  min-height: 34px;
  padding: 7px 17px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.view-tab:hover {
  color: var(--ink-soft);
}

.view-tab.is-active {
  color: var(--mint-deep);
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(38, 51, 45, 0.07);
}

.view-tab:active,
.panel-action:active,
.mini-btn:active,
.report-nav-btn:active,
.notice-button:active,
.report-empty-action:active,
.form-button:active {
  transform: translateY(1px);
}

.page {
  min-height: 50vh;
}

.notice-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
}

.notice-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.notice-icon svg {
  width: 100%;
  height: 100%;
}

.notice-copy strong {
  display: block;
  font-size: 13px;
}

.notice-copy p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.notice-amber {
  color: var(--amber-deep);
  background: var(--amber-soft);
  border-color: rgba(139, 106, 45, 0.12);
}

.notice-rose {
  color: var(--rose-deep);
  background: var(--rose-soft);
  border-color: rgba(143, 79, 88, 0.12);
}

.notice-mint {
  color: var(--mint-deep);
  background: var(--mint-soft);
  border-color: rgba(95, 149, 127, 0.14);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.4vw, 38px);
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.97) 0%, rgba(250, 245, 236, 0.94) 55%, rgba(238, 246, 241, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.hero-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-orb {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

.hero-orb-a {
  top: -160px;
  right: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(169, 214, 197, 0.45), transparent 68%);
}

.hero-orb-b {
  right: 18%;
  bottom: -190px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(242, 201, 177, 0.35), transparent 70%);
}

.hero-main,
.stats-strip {
  position: relative;
  z-index: 1;
}

.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.hero-copy {
  max-width: 660px;
}

.hero-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--mint-deep);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
}

.now-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  color: var(--ink-soft);
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(38, 51, 45, 0.07);
  border-radius: 999px;
}

.now-dot {
  width: 5px;
  height: 5px;
  background: var(--mint-strong);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(95, 149, 127, 0.12);
}

.hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.hero-copy h1 span {
  color: var(--mint-deep);
}

.hero-subtitle {
  max-width: 48ch;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.countdown-pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
  margin-top: 22px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.countdown-kicker {
  margin-right: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.countdown-number {
  color: var(--mint-deep);
  font-family: var(--font-display);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.countdown-unit {
  color: var(--ink-soft);
  font-size: 12px;
}

.countdown-date {
  margin-left: 4px;
  padding-left: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-left: 1px solid var(--line);
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.hero-meta-row .countdown-pill {
  margin-top: 0;
}

.target-chip {
  position: relative;
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  padding: 10px 12px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1;
  cursor: help;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.target-chip strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.target-chip-kicker {
  letter-spacing: 0.04em;
}

.target-chip-arrow {
  color: var(--muted);
  font-size: 12px;
}

.target-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 158px;
  padding: 10px 12px;
  color: var(--ink-soft);
  text-align: left;
  visibility: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(38, 51, 45, 0.14);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0.16s ease;
  pointer-events: none;
}

.target-chip:hover .target-popover,
.target-chip:focus-within .target-popover {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.target-popover-head {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.target-popover-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-top: 1px solid rgba(38, 51, 45, 0.06);
}

.target-popover-row:first-of-type {
  border-top: 0;
}

.target-popover-name {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 10.5px;
}

.target-popover-name .subject-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: 0;
}

.target-popover-row strong {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.burden-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 13px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
}

.burden-strip.is-over {
  color: var(--rose-deep);
  background: var(--rose-soft);
  border-color: rgba(143, 79, 88, 0.15);
}

.burden-strip.is-full {
  color: var(--amber-deep);
  background: var(--amber-soft);
  border-color: rgba(139, 106, 45, 0.14);
}

.burden-strip.is-normal {
  color: var(--mint-deep);
  background: rgba(232, 243, 237, 0.78);
  border-color: rgba(95, 149, 127, 0.12);
}

.burden-icon {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
}

.burden-icon svg {
  width: 100%;
  height: 100%;
}

.burden-copy {
  display: flex;
  flex: 1 1 250px;
  flex-wrap: wrap;
  gap: 2px 9px;
  align-items: baseline;
  min-width: 0;
}

.burden-copy strong {
  font-size: 11.5px;
  font-weight: 600;
}

.burden-copy span {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.55;
}

.burden-facts {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.burden-facts strong {
  color: currentColor;
  font-weight: 600;
}

.burden-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
}

.burden-action {
  min-height: 30px;
  padding: 5px 10px;
  color: var(--ink-soft);
  font-size: 10.5px;
  white-space: nowrap;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid currentColor;
  border-radius: 999px;
}

.burden-action:hover {
  color: var(--ink);
  background: var(--surface);
}

.hero-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}

.ring-summary {
  display: flex;
  gap: 16px;
  align-items: center;
}

.ring-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-width: 0;
}

.ring-reference {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.ring-reference strong {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.ring-reference-divider {
  margin: 0 3px;
  color: var(--line-strong);
}

.ring-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.ring-summary .ring-caption {
  margin-top: 0;
}

.progress-ring {
  position: relative;
  width: clamp(160px, 18vw, 196px);
  aspect-ratio: 1;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(38, 51, 45, 0.08);
  stroke-width: 9;
}

.ring-value {
  fill: none;
  stroke: url(#ring-gradient);
  stroke-linecap: round;
  stroke-width: 9;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
}

.ring-center strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 46px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.ring-center strong span {
  margin-left: 1px;
  color: var(--ink-soft);
  font-size: 16px;
}

.ring-center > span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.ring-center .ring-empty {
  color: var(--muted);
  font-size: 38px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(38, 51, 45, 0.08);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 18px;
  border-left: 1px solid rgba(38, 51, 45, 0.08);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.stat-value {
  display: flex;
  gap: 5px;
  align-items: baseline;
  color: var(--ink);
}

.stat-value strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.stat-value span {
  color: var(--ink-soft);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel {
  padding: clamp(18px, 2.4vw, 26px);
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.timeline-panel {
  min-width: 0;
}

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

.panel-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.panel-meta {
  padding-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.conflict-panel {
  margin-bottom: 16px;
  padding: 12px 13px;
  color: var(--rose-deep);
  background: var(--rose-soft);
  border: 1px solid rgba(143, 79, 88, 0.14);
  border-radius: 16px;
}

.conflict-head {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.conflict-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.conflict-icon svg {
  width: 100%;
  height: 100%;
}

.conflict-copy {
  flex: 1;
  min-width: 0;
}

.conflict-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.conflict-copy span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.conflict-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: -4px -4px 0 0;
  color: var(--rose-deep);
  font-size: 20px;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.conflict-close:hover {
  background: rgba(255, 253, 249, 0.72);
}

.conflict-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  margin: 10px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.conflict-item {
  padding: 9px 10px;
  background: rgba(255, 253, 249, 0.64);
  border: 1px solid rgba(143, 79, 88, 0.08);
  border-radius: 11px;
}

.conflict-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  justify-content: space-between;
}

.conflict-item-head strong {
  font-size: 11px;
  font-weight: 500;
}

.conflict-item-head span {
  color: var(--rose-deep);
  font-size: 9.5px;
  white-space: nowrap;
}

.conflict-item p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.conflict-deferred {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(143, 79, 88, 0.14);
}

.conflict-subtitle {
  display: block;
  margin-bottom: 4px;
  color: var(--rose-deep);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.conflict-deferred ul {
  margin: 0;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.65;
}

.conflict-deferred li + li {
  margin-top: 3px;
}

.subject-flow-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subject-flow-card {
  overflow: hidden;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(38, 51, 45, 0.07);
  border-radius: 19px;
  box-shadow: 0 1px 2px rgba(38, 51, 45, 0.02);
}

.subject-flow-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 15px;
  cursor: pointer;
  list-style: none;
  background:
    radial-gradient(circle at 92% 0%, var(--tone-soft, var(--mint-soft)), transparent 44%),
    rgba(255, 253, 249, 0.7);
}

.subject-flow-summary::-webkit-details-marker {
  display: none;
}

.subject-flow-summary:focus-visible {
  outline-offset: -3px;
}

.subject-flow-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.subject-flow-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.subject-flow-big-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  background: var(--tone-strong, var(--mint-strong));
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--tone-soft, var(--mint-soft));
}

.subject-flow-title strong {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.subject-flow-title > span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.subject-flow-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font-size: 10.5px;
}

.subject-flow-stats strong {
  color: var(--ink-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.subject-flow-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  background: rgba(38, 51, 45, 0.065);
  border-radius: 999px;
}

.subject-flow-bar > span {
  display: block;
  height: 100%;
  background: var(--tone-strong, var(--mint-strong));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.subject-flow-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

.subject-flow-side > strong {
  color: var(--tone-deep, var(--mint-deep));
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.subject-flow-chevron {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.18s ease;
}

.subject-flow-card[open] .subject-flow-chevron {
  transform: rotate(180deg);
}

.subject-flow-body {
  padding: 0 15px;
  border-top: 1px solid var(--line);
}

.subject-flow-task {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(38, 51, 45, 0.055);
}

.subject-flow-task:first-child {
  border-top: 0;
}

.subject-flow-task.is-done {
  opacity: 0.72;
}

.subject-flow-task-index {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  text-align: center;
}

.subject-flow-task-main {
  min-width: 0;
}

.subject-flow-task-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  justify-content: space-between;
}

.subject-flow-task-title {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
  min-width: 0;
}

.subject-flow-task-title strong {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
}

.subject-flow-task-time {
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.subject-flow-task-bar {
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  background: rgba(38, 51, 45, 0.06);
  border-radius: 999px;
}

.subject-flow-task-bar > span {
  display: block;
  height: 100%;
  background: var(--tone-strong, var(--mint-strong));
  border-radius: inherit;
}

.subject-flow-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.subject-flow-checkin {
  align-self: center;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10.5px;
}

.subject-flow-checkin svg {
  width: 13px;
  height: 13px;
}

.fixed-flow {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(38, 51, 45, 0.11);
}

.fixed-flow-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fixed-flow-head h3 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.fixed-flow-head > span {
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 54px 24px minmax(0, 1fr);
  column-gap: 12px;
  padding-bottom: 16px;
}

.timeline-row:last-child {
  padding-bottom: 0;
}

.timeline-time {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

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

.timeline-time span {
  color: var(--muted);
  font-size: 10.5px;
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 15px;
}

.timeline-rail::before {
  position: absolute;
  top: 21px;
  bottom: -16px;
  width: 1px;
  content: "";
  background: linear-gradient(to bottom, rgba(38, 51, 45, 0.14), rgba(38, 51, 45, 0.07));
}

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

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  background: var(--tone, #c9c4b8);
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(255, 253, 249, 0.9),
    0 0 0 5px rgba(38, 51, 45, 0.06);
}

.timeline-card {
  position: relative;
  min-width: 0;
  padding: 15px 16px 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(38, 51, 45, 0.075);
  border-radius: 18px;
  box-shadow: 0 1px 1px rgba(38, 51, 45, 0.02);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.card-task {
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.9), rgba(255, 253, 249, 0.72));
}

.card-task::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px;
  content: "";
  background: var(--tone-strong, var(--mint-strong));
  border-radius: 0 3px 3px 0;
  opacity: 0.8;
}

.card-fixed {
  background: rgba(247, 244, 237, 0.7);
  border-style: dashed;
}

.timeline-row.is-current .timeline-card {
  border-color: rgba(95, 149, 127, 0.5);
  box-shadow:
    0 0 0 3px rgba(169, 214, 197, 0.18),
    0 10px 24px rgba(63, 111, 93, 0.06);
}

.timeline-row.is-done .timeline-card {
  background: rgba(248, 250, 247, 0.72);
}

.timeline-row.is-done .block-heading h3 {
  color: var(--ink-soft);
}

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

.block-heading {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.block-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.5;
}

.subject-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  background: var(--tone, var(--mint));
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--tone-soft, var(--mint-soft));
}

.fixed-mark {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--muted);
}

.fixed-mark svg {
  width: 100%;
  height: 100%;
}

.block-tags {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 999px;
}

.tag-now {
  color: #fff;
  background: var(--mint-deep);
  box-shadow: 0 3px 8px rgba(63, 111, 93, 0.18);
}

.tag-fixed {
  color: var(--muted);
  background: rgba(38, 51, 45, 0.055);
}

.tag-load {
  color: var(--ink-soft);
  background: rgba(38, 51, 45, 0.045);
}

.load-high {
  color: var(--peach-deep);
  background: var(--peach-soft);
}

.load-medium {
  color: var(--lavender-deep);
  background: var(--lavender-soft);
}

.load-low {
  color: var(--mint-deep);
  background: var(--mint-soft);
}

.block-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.meta-dot {
  width: 2px;
  height: 2px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.5;
}

.meta-due {
  margin-left: auto;
  color: var(--muted);
  font-size: 10.5px;
}

.block-stage-progress {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.block-stage-progress strong {
  color: var(--tone-deep, var(--mint-deep));
  font-weight: 600;
}

.energy-chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  border-radius: 999px;
}

.energy-chip::before {
  width: 4px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.energy-peak {
  color: var(--mint-deep);
  background: rgba(169, 214, 197, 0.28);
}

.energy-moderate {
  color: var(--lavender-deep);
  background: rgba(207, 200, 232, 0.28);
}

.energy-low {
  color: var(--amber-deep);
  background: rgba(232, 201, 139, 0.22);
}

.block-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(38, 51, 45, 0.07);
}

.block-note {
  color: var(--muted);
  font-size: 11px;
}

.checkin-btn {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 7px 12px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--mint-deep);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(63, 111, 93, 0.16);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.checkin-btn svg {
  width: 14px;
  height: 14px;
}

.checkin-btn:hover {
  background: #345d4e;
  box-shadow: 0 7px 16px rgba(63, 111, 93, 0.2);
  transform: translateY(-1px);
}

.checkin-btn:active {
  transform: translateY(0);
}

.checkin-btn:disabled {
  color: var(--mint-deep);
  background: var(--mint-soft);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.checkin-btn.is-checked {
  opacity: 0.9;
}

.all-done {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: linear-gradient(120deg, var(--mint-soft), rgba(255, 253, 249, 0.8));
  border: 1px solid rgba(95, 149, 127, 0.14);
  border-radius: 16px;
}

.all-done-icon {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--mint-deep);
  border-radius: 50%;
}

.all-done-icon svg {
  width: 16px;
  height: 16px;
}

.all-done strong {
  display: block;
  font-size: 13px;
}

.all-done p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 18px 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(169, 214, 197, 0.16), transparent 56%),
    rgba(250, 247, 241, 0.65);
  border: 1px dashed rgba(38, 51, 45, 0.12);
  border-radius: 20px;
}

.empty-illustration {
  width: 150px;
  height: 112px;
  margin-bottom: 8px;
  color: var(--mint-strong);
  opacity: 0.9;
}

.empty-state .eyebrow {
  margin-top: 2px;
  color: var(--muted);
}

.empty-state h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.empty-state p:last-child {
  max-width: 36ch;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.empty-inline {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(248, 244, 236, 0.7);
  border: 1px dashed rgba(38, 51, 45, 0.12);
  border-radius: 16px;
}

.empty-inline-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--mint-strong);
}

.empty-inline-mark svg {
  width: 100%;
  height: 100%;
}

.empty-inline h3 {
  margin: 0;
  font-size: 13px;
}

.empty-inline p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.subject-list {
  display: flex;
  flex-direction: column;
}

.subject-item {
  padding: 13px 0;
  border-top: 1px solid rgba(38, 51, 45, 0.07);
}

.subject-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.subject-item:last-child {
  padding-bottom: 0;
}

.subject-item-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.subject-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.subject-minutes {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.subject-bar {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(38, 51, 45, 0.07);
  border-radius: 999px;
}

.subject-bar-fill {
  display: block;
  height: 100%;
  background: var(--tone-strong, var(--mint-strong));
  border-radius: inherit;
  transition: width 0.45s ease;
}

.subject-item-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.sidebar-empty {
  margin: 4px 0 0;
  padding: 16px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.energy-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 11px;
}

.energy-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.energy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.energy-dot.energy-peak {
  background: var(--mint-strong);
}

.energy-dot.energy-moderate {
  background: var(--lavender-strong);
}

.energy-dot.energy-low {
  background: var(--amber);
}

.insight-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
}

.plan-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(38, 51, 45, 0.07);
}

.plan-facts div {
  min-width: 0;
}

.plan-facts dt {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.plan-facts dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.plan-facts dd.is-warn {
  color: var(--rose-deep);
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.panel-head-actions .panel-meta {
  margin-right: 3px;
}

.panel-action {
  min-height: 30px;
  padding: 5px 10px;
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
  background: rgba(255, 253, 249, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.panel-action:hover {
  color: var(--mint-deep);
  background: var(--mint-soft);
  border-color: rgba(95, 149, 127, 0.24);
}

.panel-action.is-primary {
  color: #fff;
  background: var(--mint-deep);
  border-color: transparent;
}

.panel-action.is-primary:hover {
  color: #fff;
  background: #345d4e;
}

.notice-copy {
  flex: 1;
  min-width: 0;
}

.notice-action {
  flex: 0 0 auto;
  align-self: center;
}

.notice-button {
  padding: 7px 12px;
  color: var(--amber-deep);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(139, 106, 45, 0.22);
  border-radius: 999px;
}

.notice-button:hover {
  background: #fffdf9;
}

.tag-adjusted {
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.fixed-foot {
  flex-wrap: wrap;
  align-items: flex-end;
}

.fixed-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.mini-btn:hover {
  color: var(--mint-deep);
  background: var(--mint-soft);
  border-color: rgba(95, 149, 127, 0.2);
}

.mini-btn-quiet {
  color: var(--muted);
}

.mini-btn-danger {
  color: var(--rose-deep);
  border-color: rgba(143, 79, 88, 0.14);
}

.mini-btn-danger:hover {
  color: var(--rose-deep);
  background: var(--rose-soft);
  border-color: rgba(143, 79, 88, 0.24);
}

.session-history {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(38, 51, 45, 0.11);
}

.session-history-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  margin-bottom: 8px;
}

.session-history-head > span {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

.session-history-head small {
  color: var(--muted);
  font-size: 10.5px;
}

.session-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-record {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  padding: 6px 9px;
  color: var(--ink-soft);
  font-size: 10.5px;
  background: var(--tone-soft, var(--surface-muted));
  border: 1px solid rgba(38, 51, 45, 0.06);
  border-radius: 10px;
}

.session-record .subject-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: 0;
  box-shadow: 0 0 0 2px var(--tone-soft, var(--mint-soft));
}

.session-record strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-record time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.app-dialog {
  width: min(820px, calc(100vw - 32px));
  max-width: none;
  max-height: min(calc(100dvh - 32px), 920px);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: 0 34px 100px rgba(38, 51, 45, 0.26);
}

.app-dialog[open] {
  animation: dialog-in 0.22s ease both;
}

.app-dialog::backdrop {
  background: rgba(38, 51, 45, 0.32);
  backdrop-filter: blur(6px);
  animation: backdrop-in 0.18s ease both;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.dialog-content {
  max-height: min(calc(100dvh - 32px), 920px);
  overflow: hidden;
}

.fixed-manager {
  display: flex;
  flex-direction: column;
  max-height: min(calc(100dvh - 32px), 920px);
}

.manager-head {
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px 18px;
  background:
    radial-gradient(circle at 88% 0%, rgba(242, 201, 177, 0.28), transparent 44%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.98), rgba(242, 248, 244, 0.92));
  border-bottom: 1px solid var(--line);
}

.manager-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}

.manager-subtitle {
  max-width: 58ch;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.manager-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  color: var(--ink-soft);
  font-size: 11.5px;
  background: rgba(255, 253, 249, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.manager-scroll {
  flex: 1;
  min-height: 0;
  padding: 0 26px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.manager-error,
.manager-status {
  margin: 16px 0 0;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.6;
  border-radius: 12px;
}

.manager-error {
  color: var(--rose-deep);
  background: var(--rose-soft);
  border: 1px solid rgba(143, 79, 88, 0.14);
}

.manager-status {
  color: var(--mint-deep);
  background: var(--mint-soft);
  border: 1px solid rgba(95, 149, 127, 0.14);
}

.manager-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.manager-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.manager-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.manager-section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.manager-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.manager-empty {
  margin: 0;
  padding: 13px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  background: var(--surface-muted);
  border: 1px dashed rgba(38, 51, 45, 0.12);
  border-radius: 12px;
}

.fixed-event-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field > span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.field-wide {
  grid-column: span 3;
}

.field input,
.field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--ink);
  font-size: 13px;
  background: #fffdf9;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}

.field input:hover,
.field select:hover {
  border-color: rgba(95, 149, 127, 0.34);
}

.weekday-picker {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
}

.weekday-picker legend {
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

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

.weekday-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 5px 2px;
  color: var(--ink-soft);
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

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

.weekday-option span {
  font-size: 13px;
  font-weight: 600;
}

.weekday-option small {
  color: var(--muted);
  font-size: 9px;
}

.weekday-option:hover {
  border-color: rgba(95, 149, 127, 0.3);
}

.weekday-option:has(input:checked) {
  color: var(--mint-deep);
  background: var(--mint-soft);
  border-color: rgba(95, 149, 127, 0.34);
}

.weekday-option:has(input:focus-visible) {
  outline: 2px solid var(--mint-deep);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
}

.form-button {
  min-height: 38px;
  padding: 8px 15px;
  color: var(--ink-soft);
  font-size: 12.5px;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.form-button.is-primary {
  color: #fff;
  background: var(--mint-deep);
  border-color: var(--mint-deep);
}

.form-button.is-primary:hover {
  background: #345d4e;
}

.shift-panel {
  margin-top: 18px;
  padding: 16px;
  background: var(--amber-soft);
  border: 1px solid rgba(139, 106, 45, 0.14);
  border-radius: 16px;
}

.shift-panel .manager-section-head {
  margin-bottom: 10px;
}

.shift-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.shift-form .form-actions {
  grid-column: 1 / -1;
}

.event-manager-list,
.exception-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 12px 14px;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.event-manager-row.is-disabled {
  opacity: 0.62;
}

.event-manager-main {
  min-width: 0;
}

.event-manager-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.event-manager-title strong {
  font-size: 13px;
  font-weight: 500;
}

.event-kind,
.manager-tag {
  padding: 2px 7px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  background: var(--surface-muted);
  border-radius: 999px;
}

.event-manager-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.event-manager-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
  justify-content: flex-end;
}

.manager-tag.is-accent {
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.event-manager-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 5px;
  justify-content: flex-end;
}

.exception-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.exception-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.exception-copy strong {
  font-size: 12px;
  font-weight: 500;
}

.exception-copy span {
  color: var(--amber-deep);
  font-size: 11px;
}

.report-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.target-panel {
  overflow: hidden;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.target-panel-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

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

.target-panel[open] .target-panel-summary {
  border-bottom: 1px solid var(--line);
}

.target-panel-heading {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  align-items: baseline;
}

.target-panel-heading > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.target-panel-heading em {
  color: var(--mint-deep);
  font-family: var(--font-display);
  font-size: 20px;
  font-style: normal;
  font-weight: 600;
}

.target-panel-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.target-panel-score {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
}

.target-panel-score .subject-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: 0;
}

.target-panel-score strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.target-panel-edit {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  color: var(--mint-deep);
  font-size: 10.5px;
  white-space: nowrap;
}

.target-panel-edit::after {
  content: "⌄";
  font-size: 13px;
  transition: transform 0.18s ease;
}

.target-panel[open] .target-panel-edit::after {
  transform: rotate(180deg);
}

.target-form {
  padding: 16px 18px 18px;
}

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

.target-form-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
  margin-top: 10px;
}

.target-sum-line,
.target-help,
.target-error {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.6;
}

.target-sum-line {
  color: var(--ink-soft);
}

.target-sum-line strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.target-error {
  color: var(--rose-deep);
}

.target-error[hidden] {
  display: none;
}

.target-help {
  color: var(--muted);
}

.target-form .form-actions {
  margin-top: 12px;
}

.report-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.2vw, 36px);
  isolation: isolate;
  background:
    linear-gradient(132deg, rgba(255, 253, 249, 0.97), rgba(245, 242, 251, 0.92) 52%, rgba(240, 248, 244, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.report-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.report-orb {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

.report-orb-a {
  top: -150px;
  right: -70px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(207, 200, 232, 0.35), transparent 68%);
}

.report-orb-b {
  bottom: -170px;
  left: 24%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(242, 201, 177, 0.28), transparent 70%);
}

.report-hero-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.report-heading-block {
  min-width: 0;
}

.report-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: baseline;
}

.report-title-row h1 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.report-period-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  color: var(--lavender-deep);
  font-size: 11.5px;
  background: var(--lavender-soft);
  border: 1px solid rgba(139, 127, 179, 0.12);
  border-radius: 999px;
}

.report-range {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.report-period-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
  align-items: center;
  padding: 4px;
  background: rgba(255, 253, 249, 0.68);
  border: 1px solid rgba(38, 51, 45, 0.07);
  border-radius: 999px;
}

.report-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.report-nav-btn:hover {
  color: var(--mint-deep);
  background: var(--surface);
}

.report-nav-btn.is-text {
  min-width: auto;
  padding: 0 11px;
  font-size: 11px;
}

.report-nav-btn:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.38;
  background: transparent;
}

.report-summary-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(38, 51, 45, 0.08);
}

.report-summary {
  max-width: 72ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.75;
}

.report-change {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
  border-radius: 999px;
}

.report-change.is-positive {
  color: var(--mint-deep);
  background: var(--mint-soft);
}

.report-change.is-negative {
  color: var(--rose-deep);
  background: var(--rose-soft);
}

.report-change.is-neutral {
  color: var(--ink-soft);
  background: rgba(38, 51, 45, 0.045);
}

.report-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(38, 51, 45, 0.08);
}

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

.report-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid rgba(38, 51, 45, 0.08);
}

.report-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.report-stat-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.report-stat-value {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
}

.report-stat-value strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

.report-stat-value span {
  color: var(--ink-soft);
  font-size: 11px;
}

.report-stat-note {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.report-highlight {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 128px;
  padding: 8px 12px;
  background: var(--mint-soft);
  border: 1px solid rgba(95, 149, 127, 0.1);
  border-radius: 12px;
}

.report-highlight:nth-child(2) {
  background: var(--lavender-soft);
  border-color: rgba(139, 127, 179, 0.1);
}

.report-highlight-label {
  color: var(--ink-soft);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.report-highlight strong {
  display: inline-flex;
  gap: 3px;
  align-items: baseline;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.report-highlight small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
}

.report-empty-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(120deg, var(--amber-soft), rgba(255, 253, 249, 0.82));
  border: 1px solid rgba(139, 106, 45, 0.12);
  border-radius: 18px;
}

.report-empty-banner strong {
  display: block;
  color: var(--amber-deep);
  font-size: 12.5px;
}

.report-empty-banner p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.report-empty-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 13px;
  color: var(--amber-deep);
  font-size: 11.5px;
  background: rgba(255, 253, 249, 0.75);
  border: 1px solid rgba(139, 106, 45, 0.18);
  border-radius: 999px;
}

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

.report-panel {
  min-width: 0;
}

.report-panel-wide {
  grid-column: 1 / -1;
}

.report-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.report-panel-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
}

.report-panel-meta {
  padding-top: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.report-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 188px;
  padding: 20px;
  text-align: center;
  background: rgba(248, 244, 236, 0.58);
  border: 1px dashed rgba(38, 51, 45, 0.12);
  border-radius: 16px;
}

.report-empty-mark {
  color: var(--mint-strong);
  font-family: var(--font-display);
  font-size: 24px;
  opacity: 0.7;
}

.report-empty p {
  max-width: 28ch;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.report-donut-layout {
  display: grid;
  grid-template-columns: 182px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.report-donut {
  position: relative;
  width: 178px;
  height: 178px;
  justify-self: center;
}

.report-donut svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.report-donut-track {
  fill: none;
  stroke: rgba(38, 51, 45, 0.065);
  stroke-width: 16;
}

.report-donut-segment {
  fill: none;
  stroke: var(--tone-strong, var(--mint-strong));
  stroke-width: 16;
  transition: stroke-dasharray 0.4s ease;
}

.report-donut-center {
  position: absolute;
  inset: 22px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.report-donut-center strong {
  max-width: 112px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.report-donut-center span {
  color: var(--muted);
  font-size: 9.5px;
}

.report-donut-legend {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.legend-item {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(38, 51, 45, 0.07);
}

.legend-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.legend-item .subject-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 0;
}

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

.legend-copy strong {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-copy span {
  color: var(--muted);
  font-size: 10px;
}

.legend-value {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 1px;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}

.legend-value strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
}

.legend-value span {
  color: var(--muted);
  font-size: 10px;
}

.stage-progress-list {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.stage-progress-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.stage-name {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.stage-name .subject-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 0;
}

.stage-name strong {
  font-size: 12px;
  font-weight: 500;
}

.stage-name > span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.stage-percent {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.stage-bar {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(38, 51, 45, 0.065);
  border-radius: 999px;
}

.stage-bar-fill {
  display: block;
  height: 100%;
  background: var(--tone-strong, var(--mint-strong));
  border-radius: inherit;
  transition: width 0.45s ease;
}

.stage-foot {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.trend-chart {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 4px;
}

.trend-plot {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.trend-axis {
  display: flex;
  flex: 0 0 26px;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  padding: 21px 0 20px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: right;
}

.trend-bars {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: clamp(7px, 2vw, 18px);
  align-items: stretch;
  min-width: 0;
  height: 232px;
}

.trend-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
}

.trend-value {
  display: block;
  min-height: 15px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trend-value small {
  margin-left: 1px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 500;
}

.trend-track {
  display: flex;
  flex: 1;
  align-items: flex-end;
  width: 100%;
  max-width: 58px;
  min-height: 0;
  overflow: hidden;
  background-color: rgba(38, 51, 45, 0.028);
  background-image: linear-gradient(to top, rgba(38, 51, 45, 0.06) 1px, transparent 1px);
  background-size: 100% 25%;
  border-radius: 10px;
}

.trend-fill {
  display: block;
  width: 100%;
  background: linear-gradient(to top, var(--mint), var(--mint-strong));
  border-radius: 8px 8px 5px 5px;
  transform-origin: bottom;
  animation: report-bar-rise 0.55s ease both;
}

.trend-bar-item.is-current .trend-value,
.trend-bar-item.is-current .trend-label {
  color: var(--mint-deep);
  font-weight: 600;
}

.trend-bar-item.is-current .trend-fill {
  background: linear-gradient(to top, var(--mint-strong), var(--mint-deep));
}

.trend-bar-item.is-current .trend-track {
  box-shadow: inset 0 0 0 1px rgba(63, 111, 93, 0.2);
}

.trend-bar-item:hover .trend-track,
.trend-bar-item:focus-visible .trend-track {
  border-color: rgba(95, 149, 127, 0.3);
  background-color: rgba(232, 243, 237, 0.55);
}

.trend-bar-item:focus-visible {
  outline-offset: 3px;
}

.trend-bar-item.is-future {
  opacity: 0.62;
}

.trend-bar-item.is-future .trend-track {
  background-color: transparent;
  background-image: none;
  border: 1px dashed rgba(38, 51, 45, 0.18);
}

.trend-label {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-inspector {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  min-height: 36px;
  margin-top: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 10.5px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.trend-inspector-label {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.trend-inspector strong {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

.trend-foot {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

@keyframes report-bar-rise {
  from {
    opacity: 0.2;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.heatmap-insight {
  margin: 0 0 14px;
  padding: 10px 12px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
  background: linear-gradient(120deg, rgba(232, 243, 237, 0.75), rgba(255, 253, 249, 0.6));
  border: 1px solid rgba(95, 149, 127, 0.1);
  border-radius: 12px;
}

.heatmap-calendar {
  max-width: 780px;
  margin: 0 auto;
}

.heatmap-weekdays,
.heatmap-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(4px, 0.8vw, 8px);
}

.heatmap-weekdays {
  margin-bottom: 7px;
}

.heatmap-weekdays span {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.heatmap-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: clamp(36px, 4vw, 48px);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  background: rgba(38, 51, 45, 0.04);
  border-radius: 13px;
}

.heatmap-cell.is-placeholder {
  background: transparent;
}

.heatmap-cell.is-today {
  font-weight: 700;
  box-shadow: inset 0 0 0 2px #4d8fe8;
}

.heatmap-cell.is-future {
  color: rgba(141, 149, 143, 0.45);
  background: rgba(38, 51, 45, 0.02);
}

.heat-level-0 {
  color: #59645e;
  background: #d8dbd7;
}

.heat-level-1 {
  color: #3f6f5d;
  background: #e5f5da;
}

.heat-level-2 {
  color: #28563f;
  background: #b7e4a1;
}

.heat-level-3 {
  color: #174c2d;
  background: #7ed15b;
}

.heat-level-4 {
  color: #073c20;
  background: #43d17e;
}

.heatmap-cell.is-future.heat-level-1,
.heatmap-cell.is-future.heat-level-2,
.heatmap-cell.is-future.heat-level-3,
.heatmap-cell.is-future.heat-level-4 {
  background: rgba(38, 51, 45, 0.02);
}

.heatmap-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 12px;
  color: var(--ink-soft);
  font-size: 11px;
  border-top: 1px dashed rgba(38, 51, 45, 0.11);
}

.heatmap-summary span {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
}

.heatmap-summary strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.heatmap-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10px;
}

.heatmap-legend {
  display: flex;
  gap: 4px;
  align-items: center;
}

.heatmap-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.heatmap-legend span {
  margin: 0 2px;
}

.task-library {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.library-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(22px, 3vw, 32px);
  isolation: isolate;
  background:
    radial-gradient(circle at 90% 10%, rgba(207, 200, 232, 0.28), transparent 38%),
    linear-gradient(132deg, rgba(255, 253, 249, 0.98), rgba(240, 248, 244, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.library-hero-copy {
  max-width: 620px;
  min-width: 0;
}

.library-hero-copy h1 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.library-hero-copy p:last-child {
  max-width: 55ch;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.library-add {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 10px 17px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--mint-deep);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(63, 111, 93, 0.16);
}

.library-add span {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.library-add:hover {
  background: #345d4e;
  transform: translateY(-1px);
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
}

.library-count {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.library-count strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.library-count small {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.group-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: rgba(255, 253, 249, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.group-switch-btn {
  min-height: 30px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 11px;
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.group-switch-btn.is-active {
  color: var(--mint-deep);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(38, 51, 45, 0.06);
}

.library-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  color: var(--amber-deep);
  font-size: 11.5px;
  background: var(--amber-soft);
  border: 1px solid rgba(139, 106, 45, 0.12);
  border-radius: 13px;
}

.library-notice-action {
  min-height: 32px;
  padding: 6px 12px;
  color: var(--amber-deep);
  font-size: 11px;
  background: rgba(255, 253, 249, 0.76);
  border: 1px solid rgba(139, 106, 45, 0.18);
  border-radius: 999px;
}

.library-empty {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  padding: 46px 20px 40px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 22%, rgba(169, 214, 197, 0.15), transparent 56%),
    rgba(255, 253, 249, 0.72);
  border: 1px dashed rgba(38, 51, 45, 0.13);
  border-radius: 24px;
}

.library-empty-mark {
  color: var(--mint-strong);
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
}

.library-empty h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
}

.library-empty p {
  max-width: 34ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.library-empty-action {
  min-height: 40px;
  margin-top: 8px;
  padding: 8px 15px;
  color: #fff;
  font-size: 11.5px;
  background: var(--mint-deep);
  border: 0;
  border-radius: 999px;
}

.task-groups {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.task-group {
  overflow: hidden;
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.task-group-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  background: rgba(248, 244, 236, 0.5);
}

.task-group-summary::-webkit-details-marker {
  display: none;
}

.task-group-summary:focus-visible {
  outline-offset: -3px;
}

.task-group-title {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.task-group-title .subject-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 0;
}

.task-group-title strong {
  font-size: 13.5px;
  font-weight: 600;
}

.task-group-title > span:last-child {
  color: var(--muted);
  font-size: 10.5px;
}

.task-group-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.task-group-chevron {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.18s ease;
}

.task-group[open] .task-group-chevron {
  transform: rotate(180deg);
}

.task-group-body {
  border-top: 1px solid var(--line);
}

.task-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid rgba(38, 51, 45, 0.055);
  transition: background 0.18s ease;
}

.task-row:first-child {
  border-top: 0;
}

.task-row:hover {
  background: rgba(232, 243, 237, 0.24);
}

.task-row-main {
  flex: 1 1 240px;
  min-width: 0;
}

.task-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.task-row-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.task-load {
  padding: 2px 7px;
  font-size: 9.5px;
  white-space: nowrap;
  border-radius: 999px;
}

.task-progress {
  padding: 2px 7px;
  color: var(--mint-deep);
  font-size: 9.5px;
  white-space: nowrap;
  background: var(--mint-soft);
  border-radius: 999px;
}

.task-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  align-items: center;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.task-subject {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--tone-deep, var(--mint-deep));
  font-weight: 500;
}

.task-subject .subject-dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: 0;
}

.task-row-meta .is-overdue {
  color: var(--rose-deep);
}

.task-stage {
  padding: 1px 6px;
  background: rgba(38, 51, 45, 0.045);
  border-radius: 999px;
}

.task-row-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

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

.task-form-panel .manager-scroll {
  padding-top: 16px;
}

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

.task-field-wide {
  grid-column: 1 / -1;
}

.task-form .form-actions {
  margin-top: 16px;
}

.library-hero-stats {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.library-hero-stats span {
  padding: 8px 12px;
  color: var(--ink-soft);
  font-size: 10.5px;
  white-space: nowrap;
  background: rgba(255, 253, 249, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.library-hero-stats strong {
  margin-right: 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.library-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.library-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.library-section-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.library-section-head p:last-child {
  max-width: 65ch;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.library-add-project {
  min-height: 40px;
  padding: 8px 15px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--mint-deep);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(63, 111, 93, 0.14);
}

.library-add-project:hover {
  background: #345d4e;
}

.library-fixed-panel {
  padding: 18px 20px;
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.fixed-today-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.fixed-today-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: baseline;
  padding: 7px 10px;
  color: var(--ink-soft);
  font-size: 10.5px;
  background: var(--surface-muted);
  border: 1px solid rgba(38, 51, 45, 0.055);
  border-radius: 11px;
}

.fixed-today-row strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}

.fixed-today-time {
  color: var(--mint-deep);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.fixed-today-tag {
  padding: 1px 6px;
  color: var(--amber-deep);
  font-size: 9px;
  background: var(--amber-soft);
  border-radius: 999px;
}

.fixed-exception-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
  padding-top: 9px;
  color: var(--amber-deep);
  font-size: 10px;
  line-height: 1.55;
  border-top: 1px dashed rgba(139, 106, 45, 0.14);
}

.library-inline-empty {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  text-align: center;
  background: rgba(248, 244, 236, 0.5);
  border: 1px dashed rgba(38, 51, 45, 0.12);
  border-radius: 12px;
}

.library-inline-empty-large {
  padding: 30px 18px;
  font-size: 12px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card {
  overflow: hidden;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.project-summary {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  background:
    radial-gradient(circle at 95% 0%, rgba(207, 200, 232, 0.14), transparent 34%),
    rgba(255, 253, 249, 0.9);
}

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

.project-summary:focus-visible {
  outline-offset: -3px;
}

.project-summary-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.project-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.project-title-line > strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.project-title-line .subject-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 0;
}

.project-subject {
  padding: 2px 7px;
  color: var(--tone-deep, var(--mint-deep));
  font-size: 9.5px;
  background: var(--tone-soft, var(--mint-soft));
  border-radius: 999px;
}

.project-subtask-count {
  color: var(--muted);
  font-size: 10px;
}

.project-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font-size: 10px;
}

.project-summary-stats strong {
  color: var(--ink-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.project-summary-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  background: rgba(38, 51, 45, 0.065);
  border-radius: 999px;
}

.project-summary-bar > span {
  display: block;
  height: 100%;
  background: var(--tone-strong, var(--mint-strong));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.project-summary-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.project-summary-side > strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.project-chevron {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.18s ease;
}

.project-card[open] .project-chevron {
  transform: rotate(180deg);
}

.project-body {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
}

.project-body-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.project-description {
  max-width: 70ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.65;
}

.project-plan-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.project-subtask-list {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.project-subtask {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(38, 51, 45, 0.055);
}

.project-subtask:first-child {
  border-top: 0;
}

.project-subtask-index {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  text-align: center;
}

.project-subtask-main {
  min-width: 0;
}

.project-subtask-title {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}

.project-subtask-title strong {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
}

.project-subtask-title span {
  color: var(--muted);
  font-size: 9.5px;
}

.project-subtask-bar {
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  background: rgba(38, 51, 45, 0.06);
  border-radius: 999px;
}

.project-subtask-bar > span {
  display: block;
  height: 100%;
  background: var(--tone-strong, var(--mint-strong));
  border-radius: inherit;
}

.project-subtask-percent {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.project-subtask-actions {
  display: flex;
  gap: 5px;
}

.archived-projects {
  overflow: hidden;
  background: rgba(248, 244, 236, 0.58);
  border: 1px dashed rgba(38, 51, 45, 0.12);
  border-radius: 16px;
}

.archived-projects > summary {
  padding: 12px 15px;
  color: var(--ink-soft);
  font-size: 11.5px;
  cursor: pointer;
  list-style: none;
}

.archived-projects > summary::-webkit-details-marker {
  display: none;
}

.archived-projects > summary span {
  margin-left: 6px;
  color: var(--muted);
}

.archived-project-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.archived-project {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  padding: 10px 15px;
  border-top: 1px solid rgba(38, 51, 45, 0.055);
}

.archived-project:first-child {
  border-top: 0;
}

.archived-project strong {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
}

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

.archived-project span:last-child {
  margin-left: auto;
  color: var(--mint-deep);
}

.library-pool {
  padding-top: 2px;
}

.pool-head {
  align-items: center;
}

.stepper-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.stepper-field > span:first-child {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.stepper {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 3px 5px;
  background: #fffdf9;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}

.stepper-btn {
  display: inline-flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--ink-soft);
  font-size: 17px;
  background: var(--surface-muted);
  border: 0;
  border-radius: 50%;
}

.stepper-btn:hover {
  color: var(--mint-deep);
  background: var(--mint-soft);
}

.stepper input {
  flex: 1;
  width: 52px;
  min-width: 0;
  padding: 0 2px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  background: transparent;
  border: 0;
  outline: 0;
  -moz-appearance: textfield;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.stepper-unit {
  padding-right: 4px;
  color: var(--muted);
  font-size: 10px;
}

.field textarea {
  width: 100%;
  min-height: 82px;
  padding: 10px 11px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  background: #fffdf9;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}

.field textarea:hover {
  border-color: rgba(95, 149, 127, 0.34);
}

.subtask-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.subtask-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 13px;
  background: var(--lavender-soft);
  border: 1px solid rgba(139, 127, 179, 0.1);
  border-radius: 12px;
}

.subtask-summary > div:last-child {
  background: var(--mint-soft);
  border-color: rgba(95, 149, 127, 0.1);
}

.subtask-summary span {
  color: var(--muted);
  font-size: 10px;
}

.subtask-summary strong {
  color: var(--lavender-deep);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.subtask-summary > div:last-child strong {
  color: var(--mint-deep);
}

.progress-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.progress-editor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.progress-editor-head strong {
  color: var(--lavender-deep);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.progress-editor input[type="range"] {
  width: 100%;
  accent-color: var(--mint-deep);
}

.progress-warning {
  color: var(--amber-deep);
  font-size: 10.5px;
  line-height: 1.55;
}

.temp-high-toggle {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 11.5px;
  cursor: pointer;
}

.temp-high-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--mint-deep);
}

.day-preview .manager-scroll {
  padding-top: 16px;
}

.day-preview-subject {
  margin-bottom: 12px;
  padding: 12px 13px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.day-preview-subject > header {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: center;
  padding-bottom: 8px;
}

.day-preview-subject > header .subject-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 0;
}

.day-preview-subject > header strong {
  font-size: 12px;
  font-weight: 600;
}

.day-preview-subject > header span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.day-preview-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.day-preview-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgba(38, 51, 45, 0.055);
}

.day-preview-row:first-child {
  border-top: 0;
}

.day-preview-row > span {
  color: var(--mint-deep);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.day-preview-row > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-preview-row > small {
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.day-preview-fixed {
  background: rgba(248, 244, 236, 0.72);
}

/* =========================================================
   Apple × Flyme design language
   毛玻璃、去线留白、苹果中性灰与系统字体。
   ========================================================= */

.app-shell {
  width: min(calc(100% - 32px), var(--max-width));
  padding-top: max(22px, env(safe-area-inset-top));
}

.topbar {
  margin-bottom: 18px;
}

.brand-mark {
  color: var(--mint-deep);
  background: var(--glass);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.brand-copy strong {
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}

.brand-copy small,
.topbar-date,
.topbar-badge {
  color: var(--ink-soft);
}

.topbar-date,
.topbar-badge,
.view-tabs,
.group-switch {
  background: var(--glass);
  border: 0;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar-badge {
  color: var(--mint-deep);
}

.topbar-date {
  border-radius: 12px;
}

.view-tabs {
  margin-bottom: 16px;
  border-radius: 14px;
}

.view-tab {
  font-weight: var(--fw-medium);
}

.view-tab.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hero-card,
.library-hero,
.report-hero,
.panel,
.library-fixed-panel,
.project-card,
.task-group,
.report-panel,
.subject-flow-card,
.day-preview-subject {
  background: var(--glass);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-card,
.library-hero,
.report-hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)),
    var(--glass);
}

.hero-card::after {
  box-shadow: none;
}

.hero-orb {
  opacity: 0.55;
}

.hero-copy h1,
.library-hero-copy h1,
.report-title-row h1 {
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

.panel-head h2,
.library-section-head h2,
.report-panel-head h2,
.fixed-flow-head h3,
.manager-head h2,
.manager-section-head h3 {
  font-weight: var(--fw-semibold);
}

.hero-card,
.library-hero,
.report-hero,
.panel,
.subject-flow-card,
.project-card,
.task-group,
.report-panel {
  transition:
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s var(--ease-spring),
    background-color 0.3s var(--ease-spring);
}

.countdown-pill {
  background: rgba(255, 255, 255, 0.62);
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

.countdown-number {
  font-size: clamp(32px, 3.4vw, 38px);
  font-weight: var(--fw-bold);
}

.countdown-unit {
  font-size: 14px;
  font-weight: var(--fw-body);
}

.countdown-date {
  padding-left: 0;
  margin-left: 8px;
  border-left: 0;
}

.stats-strip {
  gap: 12px;
  padding-top: 0;
  margin-top: 22px;
  border-top: 0;
}

.stat {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.56);
  border-left: 0;
  border-radius: 12px;
}

.stat:first-child {
  padding-left: 16px;
}

.stat-label {
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
}

.stat-value strong {
  font-size: 32px;
  font-weight: var(--fw-bold);
}

.stat-value span {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: var(--fw-body);
}

.ring-center strong {
  font-weight: var(--fw-bold);
}

.ring-center strong span {
  font-size: 14px;
  font-weight: var(--fw-body);
}

.dashboard-grid,
.dashboard-side,
.task-library,
.report-grid {
  gap: var(--gutter);
}

.dashboard-grid {
  margin-top: var(--gutter);
}

.panel {
  padding: 20px;
}

.panel-head {
  margin-bottom: var(--gutter);
}

.panel-meta {
  color: var(--ink-soft);
  font-weight: var(--fw-medium);
}

.panel-action,
.mini-btn,
.form-button,
.burden-action,
.library-add,
.library-add-project,
.library-empty-action,
.report-nav-btn,
.report-empty-action,
.notice-button,
.pool-mode-btn,
.stepper-btn {
  border-radius: 12px;
  transition:
    transform 0.18s var(--ease-spring),
    background-color 0.3s var(--ease-spring),
    color 0.3s var(--ease-spring),
    box-shadow 0.3s var(--ease-spring);
}

.panel-action,
.mini-btn,
.form-button,
.report-nav-btn,
.report-empty-action,
.notice-button {
  border: 0;
  box-shadow: var(--shadow-sm);
}

.panel-action.is-primary,
.form-button.is-primary,
.library-add,
.library-add-project,
.library-empty-action {
  background: var(--mint-deep);
  box-shadow: 0 6px 18px rgba(46, 125, 111, 0.16);
}

.subject-flow-list {
  gap: var(--gutter);
}

.subject-flow-card {
  overflow: hidden;
}

.subject-flow-summary {
  padding: 16px;
  background:
    radial-gradient(circle at 94% 0%, var(--tone-soft, var(--mint-soft)), transparent 44%),
    rgba(255, 255, 255, 0.58);
}

.subject-flow-title strong {
  font-size: 16px;
  font-weight: var(--fw-semibold);
}

.subject-flow-stats strong {
  font-weight: var(--fw-semibold);
}

.subject-flow-side > strong {
  font-size: 32px;
  font-weight: var(--fw-bold);
}

.subject-flow-bar,
.subject-flow-task-bar,
.project-summary-bar,
.project-subtask-bar,
.subject-bar,
.stage-bar {
  background: rgba(118, 118, 128, 0.12);
}

.subject-flow-bar > span,
.subject-flow-task-bar > span,
.project-summary-bar > span,
.project-subtask-bar > span,
.subject-bar-fill,
.stage-bar-fill {
  transition: width 0.6s ease-out;
}

.subject-flow-body {
  padding: 0 16px 12px;
  border-top: 0;
}

.subject-flow-task {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  margin-top: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-top: 0;
  border-radius: 12px;
}

.subject-flow-task-title strong {
  font-weight: var(--fw-semibold);
}

.subject-flow-task-bar {
  height: 6px;
}

.fixed-flow {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.timeline {
  gap: 8px;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.66);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.card-fixed {
  background: rgba(242, 242, 247, 0.72);
  border-style: none;
}

.timeline-row.is-current .timeline-card {
  border: 0;
  box-shadow:
    0 0 0 2px rgba(46, 125, 111, 0.18),
    var(--shadow-sm);
}

.conflict-panel,
.notice,
.library-notice,
.library-inline-empty,
.manager-error,
.manager-status,
.archived-projects {
  border: 0;
  border-radius: 12px;
}

.conflict-panel,
.notice,
.library-notice,
.manager-error,
.manager-status {
  box-shadow: var(--shadow-sm);
}

.subject-list {
  gap: var(--gutter);
}

.subject-item {
  padding: 0;
  border-top: 0;
}

.subject-item:first-child,
.subject-item:last-child {
  padding: 0;
}

.library-hero {
  padding: clamp(22px, 3vw, 32px);
}

.library-hero-stats span {
  background: rgba(255, 255, 255, 0.62);
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.library-hero-stats strong {
  font-weight: var(--fw-bold);
}

.library-section {
  gap: var(--gutter);
}

.library-section-head h2 {
  font-weight: var(--fw-semibold);
}

.library-fixed-panel {
  padding: 20px;
}

.project-card,
.task-group {
  padding: 0;
}

.project-list,
.task-groups,
.library-pool {
  gap: var(--gutter);
}

.fixed-today-list {
  gap: 8px;
}

.fixed-today-row {
  background: rgba(255, 255, 255, 0.56);
  border: 0;
  border-radius: 12px;
}

.fixed-exception-summary,
.project-body,
.project-subtask-list,
.task-group-body,
.archived-project-list,
.day-preview-list {
  border-top: 0;
}

.project-summary {
  padding: 16px;
  background:
    radial-gradient(circle at 94% 0%, var(--tone-soft, var(--mint-soft)), transparent 34%),
    rgba(255, 255, 255, 0.5);
}

.project-title-line > strong {
  font-size: 16px;
  font-weight: var(--fw-semibold);
}

.project-summary-stats {
  gap: 4px 16px;
  color: var(--ink-soft);
}

.project-summary-stats strong {
  color: var(--ink);
  font-weight: var(--fw-semibold);
}

.project-daily-target {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: var(--fw-body);
}

.project-daily-target strong {
  color: var(--tone-deep, var(--mint-deep));
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}

.project-summary-side > strong {
  color: var(--ink);
  font-size: 32px;
  font-weight: var(--fw-bold);
}

.project-body {
  padding: 14px 16px 18px;
}

.project-plan-meta {
  color: var(--ink-soft);
  font-size: 11px;
}

.project-subtask-list {
  gap: 8px;
  margin-top: 12px;
  padding-top: 4px;
}

.project-subtask {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.48);
  border-top: 0;
  border-radius: 12px;
}

.project-subtask + .project-subtask {
  margin-top: 0;
}

.project-subtask-title strong {
  font-weight: var(--fw-semibold);
}

.project-subtask-percent {
  font-weight: var(--fw-semibold);
}

.project-empty-hint {
  margin-top: 12px;
}

.project-form-hint,
.subtask-auto-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
  background: rgba(242, 242, 247, 0.82);
  border-radius: 12px;
}

.subtask-summary {
  gap: 12px;
  margin-top: 16px;
}

.subtask-summary > div {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.56);
  border: 0;
  border-radius: 12px;
}

.subtask-summary strong {
  font-size: 24px;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.archived-projects {
  background: rgba(242, 242, 247, 0.72);
}

.archived-project {
  border-top: 0;
}

.task-group-summary {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.34);
}

.task-group-body {
  padding: 8px;
}

.task-row {
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.5);
  border-top: 0;
  border-radius: 12px;
}

.task-row + .task-row {
  margin-top: 8px;
}

.task-row-title h3 {
  font-weight: var(--fw-semibold);
}

.task-row:hover {
  background: rgba(255, 255, 255, 0.82);
}

.field > span {
  color: var(--ink-soft);
  font-weight: var(--fw-medium);
}

.field input,
.field select,
.field textarea,
.stepper input {
  color: var(--ink);
  background: rgba(118, 118, 128, 0.08);
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.stepper input:hover {
  background: rgba(118, 118, 128, 0.11);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.stepper input:focus {
  outline: 2px solid rgba(46, 125, 111, 0.42);
  outline-offset: 1px;
}

.stepper {
  background: transparent;
  border: 0;
  border-radius: 12px;
}

.stepper-btn {
  color: var(--mint-deep);
  background: rgba(118, 118, 128, 0.09);
  border: 0;
}

.app-dialog {
  background: rgba(255, 255, 255, 0.82);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.app-dialog[open] {
  animation: slideUp 0.35s ease-out both;
}

.app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
  animation: backdrop-in 0.24s ease both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.manager-head {
  background: rgba(255, 255, 255, 0.54);
  border-bottom: 0;
}

.manager-section {
  border-bottom: 0;
  padding: 18px 0;
}

.manager-close {
  border: 0;
  box-shadow: var(--shadow-sm);
}

.manager-empty {
  background: rgba(118, 118, 128, 0.06);
  border: 0;
}

.report-stats {
  gap: 12px;
  padding-top: 0;
  margin-top: var(--gutter);
  border-top: 0;
}

.report-stat {
  padding: 16px;
  background: rgba(255, 255, 255, 0.56);
  border-left: 0;
  border-radius: 12px;
}

.report-stat:first-child {
  padding-left: 16px;
}

.report-stat-label {
  color: var(--ink-soft);
  font-weight: var(--fw-medium);
}

.report-stat-value strong {
  font-size: 36px;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.report-stat-value span {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: var(--fw-body);
}

.report-panel {
  padding: 20px;
}

.report-panel-head,
.report-summary-row {
  margin-bottom: var(--gutter);
}

.report-summary,
.report-change {
  border: 0;
}

.report-donut-legend,
.stage-progress-list {
  gap: 8px;
}

.report-donut-layout {
  border-top: 0;
}

.legend-item,
.heatmap-cell,
.trend-inspector,
.report-empty-banner {
  border: 0;
}

.stage-progress-row {
  padding: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 0;
  border-radius: 12px;
}

.stage-progress-row + .stage-progress-row {
  margin-top: 8px;
}

.trend-inspector {
  background: rgba(118, 118, 128, 0.06);
  border-radius: 12px;
}

.trend-bar-item.is-selected .trend-track {
  box-shadow: 0 0 0 2px rgba(46, 125, 111, 0.2);
}

.trend-day-details {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.56);
  border-radius: 12px;
}

.trend-day-details[hidden] {
  display: none;
}

.trend-detail-day + .trend-detail-day {
  margin-top: 16px;
}

.trend-detail-day-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.trend-detail-day-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: var(--fw-semibold);
}

.trend-detail-day-head span {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.trend-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.trend-task-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 12px;
}

.trend-task-status {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.trend-task-status svg {
  width: 20px;
  height: 20px;
}

.trend-task-row.is-complete .trend-task-status {
  color: var(--success);
}

.trend-task-row.is-pending .trend-task-status {
  color: var(--warning);
}

.trend-task-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.trend-task-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-task-copy span {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.trend-task-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  justify-content: flex-end;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.trend-task-metrics strong {
  color: var(--ink);
  font-weight: var(--fw-semibold);
}

.trend-task-percent {
  color: var(--mint-deep) !important;
  font-size: 12px;
}

.trend-task-row.is-pending .trend-task-percent {
  color: var(--amber-deep) !important;
}

.trend-detail-empty {
  margin: 0;
  padding: 12px 0;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.heatmap-panel .heatmap-calendar {
  border-top: 0;
}

.heatmap-insight {
  padding: 12px 14px;
  background: rgba(118, 118, 128, 0.06);
  border-radius: 12px;
}

.toast {
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
}

.fatal-error {
  border: 0;
  border-radius: 16px;
}

@media (max-width: 480px) {
  .day-preview-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .day-preview-row > small {
    grid-column: 2;
  }
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 22px 4px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.toast-root {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 50;
  display: flex;
  justify-content: center;
  width: min(calc(100% - 32px), 420px);
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  padding: 11px 18px;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: auto;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(38, 51, 45, 0.22);
  animation: toast-in 0.24s ease both;
}

.toast-success {
  background: var(--mint-deep);
}

.toast-error {
  background: var(--rose-deep);
}

.toast-info {
  background: var(--lavender-deep);
}

.toast.is-leaving {
  animation: toast-out 0.2s ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

@media (max-width: 980px) {
  .hero-main {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-progress {
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    min-width: 0;
  }

  .progress-ring {
    width: 150px;
  }

  .ring-caption {
    margin-top: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .view-tabs {
    position: sticky;
    top: max(8px, env(safe-area-inset-top));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    background: rgba(255, 253, 249, 0.88);
    backdrop-filter: blur(18px);
    box-shadow:
      0 8px 28px rgba(38, 51, 45, 0.07),
      inset 0 1px 0 rgba(255, 255, 255, 0.86);
  }

  .view-tab {
    width: 100%;
    min-height: 44px;
    padding: 8px;
    font-size: 12.5px;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .panel-head-actions {
    justify-content: flex-start;
  }

  .notice {
    flex-wrap: wrap;
  }

  .notice-action {
    width: 100%;
    padding-left: 32px;
  }

  .notice-button,
  .report-empty-action {
    min-height: 40px;
  }

  .mini-btn,
  .panel-action {
    min-height: 40px;
    padding: 7px 12px;
  }

  .target-chip {
    min-height: 44px;
    align-items: center;
  }

  .conflict-close {
    width: 40px;
    height: 40px;
  }

  .report-nav-btn {
    min-width: 40px;
    min-height: 40px;
  }

  .report-nav-btn.is-text {
    min-height: 40px;
  }

  .manager-close {
    min-height: 44px;
    padding: 8px 16px;
  }

  .field input,
  .field select {
    min-height: 44px;
    font-size: 16px;
  }

  .form-button {
    min-height: 44px;
    padding: 10px 17px;
  }

  .event-manager-row {
    grid-template-columns: 1fr;
  }

  .event-manager-status {
    justify-content: flex-start;
  }

  .event-manager-actions {
    justify-content: flex-start;
  }

  .app-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .dialog-content,
  .fixed-manager {
    max-height: calc(100dvh - 20px);
  }

  .manager-head {
    padding: 20px 18px 15px;
  }

  .manager-head h2 {
    font-size: 23px;
  }

  .manager-scroll {
    padding: 0 18px 22px;
  }

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

  .field-wide,
  .weekday-picker,
  .form-actions {
    grid-column: 1 / -1;
  }

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

  .report-hero {
    padding: 22px 20px;
  }

  .report-hero-head {
    gap: 14px;
  }

  .report-title-row h1 {
    font-size: 30px;
  }

  .report-period-nav {
    align-self: flex-start;
  }

  .report-summary-row {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 18px;
    padding-top: 15px;
  }

  .report-stats {
    grid-template-columns: 1fr 1fr;
    row-gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
  }

  .report-stat {
    padding: 0 12px;
  }

  .report-stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .report-stat-note {
    overflow: visible;
    white-space: normal;
  }

  .report-donut-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
  }

  .report-donut {
    width: 158px;
    height: 158px;
  }

  .report-donut-center {
    inset: 18px;
  }

  .trend-bars {
    height: 208px;
    gap: 6px;
  }

  .trend-axis {
    flex-basis: 22px;
    width: 22px;
    font-size: 8.5px;
  }

  .heatmap-cell {
    height: 38px;
  }

  .report-empty-banner {
    align-items: flex-start;
  }

  .library-hero {
    padding: 22px 20px;
  }

  .library-hero-copy h1 {
    font-size: 30px;
  }

  .library-notice {
    align-items: flex-start;
  }

  .group-switch-btn {
    min-height: 40px;
    padding: 7px 13px;
    font-size: 11.5px;
  }

  .task-group-summary {
    min-height: 48px;
  }

  .library-hero-stats {
    width: 100%;
  }

  .project-subtask {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .project-subtask-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .project-summary {
    align-items: flex-start;
  }

  .project-actions {
    width: 100%;
    margin-left: 0;
  }

  .stepper-btn {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .field textarea {
    font-size: 16px;
  }

  .app-shell {
    width: calc(100% - 28px);
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .topbar {
    margin-bottom: 18px;
  }

  .brand-mark {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .brand-mark svg {
    width: 23px;
    height: 23px;
  }

  .brand-copy strong {
    font-size: 21px;
  }

  .brand-copy small {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .topbar-date {
    padding: 8px 12px;
    font-size: 12px;
  }

  .hero-card {
    padding: 22px 20px;
    border-radius: 26px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .hero-progress {
    gap: 10px;
  }

  .burden-actions {
    width: 100%;
  }

  .burden-action {
    flex: 1;
    min-height: 40px;
  }

  .checkin-btn {
    min-height: 42px;
    padding: 9px 14px;
  }

  .progress-ring {
    width: 132px;
  }

  .ring-center strong {
    font-size: 34px;
  }

  .ring-center > span {
    font-size: 10px;
  }

  .stats-strip {
    grid-template-columns: 1fr 1fr;
    row-gap: 16px;
    margin-top: 22px;
    padding-top: 16px;
  }

  .stat {
    padding: 0 12px;
  }

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .panel-head {
    margin-bottom: 14px;
  }

  .panel-head h2 {
    font-size: 20px;
  }

  .timeline-row {
    grid-template-columns: 42px 18px minmax(0, 1fr);
    column-gap: 8px;
  }

  .timeline-time strong {
    font-size: 12px;
  }

  .timeline-time span {
    font-size: 9.5px;
  }

  .timeline-card {
    padding: 13px 13px 12px;
    border-radius: 16px;
  }

  .block-heading h3 {
    font-size: 13.5px;
  }

  .block-tags {
    gap: 4px;
  }

  .tag {
    padding: 2px 7px;
    font-size: 10px;
  }

  .block-meta {
    gap: 5px;
    font-size: 11px;
  }

  .meta-due {
    width: 100%;
    margin-left: 0;
  }

  .block-foot {
    flex-wrap: wrap;
  }

  .checkin-btn {
    margin-left: auto;
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .app-footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .topbar-date {
    display: none;
  }

  .hero-topline {
    gap: 8px;
  }

  .now-chip {
    font-size: 10.5px;
  }

  .hero-copy h1 {
    font-size: 27px;
  }

  .hero-progress {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .ring-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ring-copy {
    align-items: flex-start;
  }

  .progress-ring {
    width: 118px;
  }

  .ring-caption {
    margin-top: 0;
  }

  .countdown-pill {
    width: 100%;
    justify-content: flex-start;
  }

  .countdown-date {
    margin-left: auto;
  }

  .stat-value strong {
    font-size: 21px;
  }

  .timeline-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 7px;
    padding-bottom: 18px;
  }

  .timeline-time {
    flex-direction: row;
    gap: 1px;
    align-items: baseline;
    padding-top: 0;
    text-align: left;
  }

  .timeline-time strong {
    font-size: 12.5px;
  }

  .timeline-time span {
    font-size: 10.5px;
  }

  .timeline-time span::before {
    margin-right: 5px;
    content: "·";
    opacity: 0.55;
  }

  .timeline-rail {
    display: none;
  }

  .timeline-card {
    border-radius: 18px;
  }

  .block-heading h3 {
    font-size: 13.5px;
  }

  .subject-flow-summary {
    align-items: flex-start;
    padding: 13px 12px;
  }

  .subject-flow-side {
    flex-direction: row;
    gap: 3px;
    align-items: center;
  }

  .subject-flow-side > strong {
    font-size: 19px;
  }

  .subject-flow-body {
    padding: 0 12px;
  }

  .subject-flow-task {
    grid-template-columns: 16px minmax(0, 1fr);
    row-gap: 7px;
  }

  .subject-flow-checkin {
    grid-column: 2;
    justify-self: flex-start;
    min-height: 40px;
  }

  .block-foot {
    gap: 8px;
  }

  .block-note {
    font-size: 10.5px;
  }

  .checkin-btn {
    min-height: 44px;
    padding: 9px 13px;
    font-size: 11.5px;
  }

  .plan-facts {
    grid-template-columns: 1fr 1fr;
  }

  .plan-facts div:last-child {
    grid-column: 1 / -1;
  }

  .empty-state {
    padding: 28px 14px 24px;
  }

  .empty-illustration {
    width: 126px;
    height: 94px;
  }

  .app-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
  }

  .app-dialog[open] {
    animation-name: sheet-in;
  }

  @keyframes sheet-in {
    from {
      opacity: 0.6;
      transform: translateY(36px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .dialog-content,
  .fixed-manager {
    max-height: 92dvh;
  }

  .manager-head {
    position: relative;
    padding: 24px 15px 14px;
  }

  .manager-head::before {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 34px;
    height: 4px;
    content: "";
    background: rgba(38, 51, 45, 0.13);
    border-radius: 999px;
    transform: translateX(-50%);
  }

  .manager-head h2 {
    font-size: 21px;
  }

  .manager-subtitle {
    font-size: 11.5px;
  }

  .manager-scroll {
    padding: 0 15px calc(24px + env(safe-area-inset-bottom));
  }

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

  .field-wide,
  .field,
  .weekday-picker,
  .form-actions {
    grid-column: 1 / -1;
  }

  .weekday-options {
    gap: 4px;
  }

  .weekday-option {
    min-height: 44px;
  }

  .notice-action {
    padding-left: 0;
  }

  .notice-button {
    width: 100%;
  }

  .burden-strip {
    padding: 11px 12px;
  }

  .burden-copy {
    flex-basis: 100%;
  }

  .burden-facts {
    font-size: 10.5px;
  }

  .burden-action {
    min-height: 44px;
  }

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

  .fixed-quick-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .mini-btn,
  .panel-action,
  .notice-button,
  .report-empty-action {
    min-height: 44px;
  }

  .mini-btn {
    padding: 8px 12px;
  }

  .conflict-close {
    width: 44px;
    height: 44px;
    margin-top: -7px;
  }

  .session-record {
    width: 100%;
  }

  .session-record strong {
    flex: 1;
  }

  .target-panel-summary {
    gap: 8px 12px;
    padding: 13px 14px;
  }

  .target-panel-edit {
    margin-left: 0;
  }

  .target-panel-scores {
    gap: 4px 10px;
  }

  .target-form {
    padding: 14px;
  }

  .report-title-row h1 {
    font-size: 27px;
  }

  .report-range {
    font-size: 11.5px;
  }

  .report-stat-value strong {
    font-size: 23px;
  }

  .report-period-nav {
    width: auto;
    justify-content: flex-start;
  }

  .report-nav-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .report-nav-btn.is-text {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
  }

  .report-panel-head h2 {
    font-size: 19px;
  }

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

  .report-donut {
    width: 160px;
    height: 160px;
  }

  .report-donut-legend {
    width: 100%;
  }

  .trend-bars {
    height: 190px;
  }

  .trend-track {
    max-width: 44px;
  }

  .trend-axis {
    flex-basis: 20px;
    width: 20px;
    padding-top: 19px;
    font-size: 8px;
  }

  .trend-value {
    font-size: 9.5px;
  }

  .trend-value small {
    margin-left: 0;
    font-size: 6.5px;
  }

  .trend-label {
    font-size: 10px;
  }

  .heatmap-weekdays,
  .heatmap-cells {
    gap: 4px;
  }

  .heatmap-cell {
    height: 36px;
    font-size: 10px;
    border-radius: 10px;
  }

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

  .report-empty-banner {
    padding: 14px 16px;
  }

  .report-empty-action {
    width: 100%;
  }

  .library-hero {
    align-items: flex-start;
    padding: 20px 17px;
  }

  .library-hero-copy h1 {
    font-size: 27px;
  }

  .library-add {
    align-self: flex-start;
  }

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

  .group-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .group-switch-btn {
    width: 100%;
    min-height: 44px;
  }

  .library-notice {
    flex-direction: column;
  }

  .library-notice-action,
  .library-empty-action {
    min-height: 44px;
  }

  .task-group-summary {
    padding: 13px 14px;
  }

  .task-row {
    align-items: flex-start;
    padding: 13px 14px;
  }

  .task-row-main {
    flex-basis: 100%;
  }

  .task-row-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

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

  .task-field-wide,
  .task-form-fields .field,
  .task-form-fields .stepper-field {
    grid-column: 1 / -1;
  }

  .library-hero-stats span {
    flex: 1 1 auto;
    text-align: center;
  }

  .library-fixed-panel {
    padding: 15px;
  }

  .project-summary {
    padding: 14px;
  }

  .project-summary-side {
    flex-direction: row;
    gap: 5px;
    align-items: center;
  }

  .project-summary-side > strong {
    font-size: 19px;
  }

  .project-body {
    padding: 13px 14px 15px;
  }

  .project-subtask {
    grid-template-columns: 20px minmax(0, 1fr) auto;
  }

  .project-subtask-actions {
    grid-column: 2 / -1;
  }

  .project-subtask-index {
    font-size: 11px;
  }

  .stepper-btn {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .stepper {
    min-height: 46px;
  }

  .subtask-summary {
    gap: 8px;
  }

  .subtask-summary strong {
    font-size: 16px;
  }

  .toast-root {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
}

@media (hover: hover) and (min-width: 721px) {
  .timeline-row.is-task:hover .timeline-card {
    border-color: rgba(95, 149, 127, 0.22);
    box-shadow: 0 10px 26px rgba(38, 51, 45, 0.06);
    transform: translateY(-1px);
  }

  .report-panel:hover {
    border-color: rgba(95, 149, 127, 0.15);
  }
}

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

/* Flyme-style motion and mobile refinements for the design layer. */
@media (hover: hover) and (min-width: 721px) {
  .hero-card:hover,
  .library-hero:hover,
  .report-hero:hover,
  .subject-flow-card:hover,
  .project-card:hover,
  .task-group:hover,
  .report-panel:hover,
  .library-fixed-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
  }

  .timeline-row.is-task:hover .timeline-card {
    border-color: transparent;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
  }
}

.view-tab:active,
.panel-action:active,
.mini-btn:active,
.form-button:active,
.burden-action:active,
.library-add:active,
.library-add-project:active,
.library-empty-action:active,
.report-nav-btn:active,
.report-empty-action:active,
.notice-button:active,
.pool-mode-btn:active,
.stepper-btn:active,
.manager-close:active,
.trend-bar-item:active,
button:active {
  transform: scale(0.97);
}

@media (max-width: 720px) {
  .stat-value strong,
  .report-stat-value strong {
    font-size: 32px;
  }

  .stat-value span,
  .report-stat-value span {
    font-size: 14px;
    font-weight: var(--fw-body);
  }

  .stat {
    padding: 12px;
  }

  .stat:first-child {
    padding-left: 12px;
  }

  .subject-flow-side > strong,
  .project-summary-side > strong {
    font-size: 32px;
  }

  .trend-task-row {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .trend-task-metrics {
    grid-column: 2;
    justify-content: flex-start;
  }

  .trend-day-details {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .app-shell {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .stats-strip {
    gap: 10px;
  }

  .trend-task-copy strong {
    white-space: normal;
  }

  .project-daily-target {
    font-size: 11.5px;
  }
}

@media (max-width: 720px) {
  .view-tabs {
    background: var(--glass);
    box-shadow: var(--shadow-sm);
  }

  .hero-card,
  .library-hero,
  .report-hero,
  .panel,
  .library-fixed-panel,
  .project-card,
  .task-group,
  .report-panel,
  .subject-flow-card {
    border-radius: 16px;
  }

  .stats-strip {
    padding-top: 0;
  }
}

.now-chip,
.target-chip,
.target-popover,
.burden-strip,
.report-period-badge,
.report-period-nav {
  border: 0;
  box-shadow: var(--shadow-sm);
}

.target-popover-row,
.plan-facts,
.report-summary-row {
  border-top: 0;
}

.trend-track {
  border: 0;
  background: rgba(118, 118, 128, 0.1);
}

@media (max-width: 720px) {
  .app-dialog {
    border-radius: 16px;
  }
}

@media (max-width: 720px) {
  .view-tabs {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}
