:root {
  color-scheme: light;
  --paper: #f4f2e9;
  --paper-deep: #ebe8dc;
  --ink: #202b25;
  --muted: #7b8176;
  --line: #e9e7dc;
  --leaf: #526f59;
  --leaf-dark: #3f5b47;
  --sage: #e7ece2;
  --gold: #d59b58;
  --white: #fffefa;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 8% 14%, rgb(222 224 203 / 42%), transparent 34rem),
    radial-gradient(ellipse at 94% 69%, rgb(230 213 183 / 33%), transparent 30rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #d59b58; outline-offset: 3px; }

.page {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding: 0 6.1vw;
}

.topbar, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-actions { display: flex; align-items: center; gap: 19px; }
.account-button { min-height: 35px; padding: 0 14px; border: 1px solid rgb(32 43 37 / 18%); border-radius: 999px; background: rgb(255 254 250 / 50%); color: var(--leaf-dark); cursor: pointer; font-size: 11px; transition: background 160ms ease, border-color 160ms ease; }
.account-button:hover { border-color: rgb(82 111 89 / 38%); background: #fffefa; }

.topbar {
  height: 84px;
  border-bottom: 1px solid rgb(32 43 37 / 11%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .17em;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgb(32 43 37 / 24%);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
}

.brand-dot { color: var(--gold); }
.top-note, .footer, .eyebrow, .panel-kicker { font-family: var(--mono); }
.top-note { color: var(--muted); font-size: 10px; letter-spacing: .12em; }

.main {
  display: grid;
  width: min(100%, 1020px);
  flex: 1;
  grid-template-columns: .88fr 1.12fr;
  align-content: center;
  align-items: center;
  gap: clamp(44px, 7vw, 110px);
  margin: 0 auto;
  padding: 56px 0 70px;
}

.intro { padding-bottom: 45px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 25px;
  color: var(--leaf);
  font-size: 10px;
  letter-spacing: .16em;
}

.eyebrow-line { width: 28px; height: 1px; background: var(--gold); }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 72px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .99;
}

h1 em { color: var(--leaf); font-weight: 500; }

.intro-copy {
  margin: 23px 0 0;
  color: #6d756b;
  font-size: 14px;
  line-height: 1.8;
}
.today-card { display: inline-flex; align-items: center; gap: 11px; margin-top: 27px; padding: 11px 14px; border: 1px solid rgb(32 43 37 / 8%); border-radius: 12px; background: rgb(255 254 250 / 56%); text-align: left; }
.today-mark { color: var(--gold); font-size: 19px; }
.today-card strong, .today-card small { display: block; }
.today-card strong { color: var(--leaf-dark); font-family: var(--serif); font-size: 15px; font-weight: 500; }
.today-card small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.list-panel {
  padding: 31px 31px 20px;
  border: 1px solid rgb(32 43 37 / 8%);
  border-radius: 22px;
  background: rgb(255 254 250 / 89%);
  box-shadow: 0 22px 65px rgb(56 57 41 / 9%), 0 2px 8px rgb(56 57 41 / 3%);
  backdrop-filter: blur(10px);
}

.panel-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.panel-kicker { margin: 0 0 9px; color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.panel-top h2 { margin: 0; font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: -.025em; }
.progress-summary { display: grid; justify-items: end; gap: 2px; padding-bottom: 3px; }
.progress-number { color: var(--leaf-dark); font-family: var(--mono); font-size: 13px; }
.progress-caption { color: #989b91; font-size: 10px; }

.progress-track { display: block; width: 100%; height: 3px; overflow: hidden; border: 0; border-radius: 10px; appearance: none; background: #eeede5; }
.progress-track::-webkit-progress-bar { border-radius: inherit; background: #eeede5; }
.progress-track::-webkit-progress-value { border-radius: inherit; background: var(--leaf); transition: width 220ms ease; }
.progress-track::-moz-progress-bar { border-radius: inherit; background: var(--leaf); transition: width 220ms ease; }

.add-form { display: flex; align-items: flex-start; gap: 9px; margin-top: 23px; }
.add-fields { display: grid; min-width: 0; flex: 1; gap: 7px; }
.add-form input {
  min-width: 0;
  height: 49px;
  flex: 1;
  padding: 0 15px;
  border: 1px solid #e6e5da;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.add-form textarea, .task-note-editor textarea { min-width: 0; width: 100%; resize: vertical; padding: 10px 13px; border: 1px solid #e6e5da; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; line-height: 1.5; }
.add-form textarea { min-height: 48px; }
.add-form textarea::placeholder, .task-note-editor textarea::placeholder { color: #a4a69c; }
.add-form textarea:focus, .task-note-editor textarea:focus { border-color: #8eaa91; box-shadow: 0 0 0 3px rgb(82 111 89 / 10%); outline: none; }
.add-form input::placeholder { color: #a4a69c; }
.add-form input:focus { border-color: #8eaa91; box-shadow: 0 0 0 3px rgb(82 111 89 / 10%); outline: none; }

.add-button {
  display: inline-flex;
  height: 49px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: var(--leaf);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 160ms ease, transform 160ms ease;
}
.add-button { flex: 0 0 auto; }
.add-button:hover { background: var(--leaf-dark); transform: translateY(-1px); }
.add-arrow { color: #e2c598; font-size: 15px; }

.list-toolbar { display: flex; min-height: 57px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.filters { display: flex; align-items: center; gap: 4px; }
.filter-button, .clear-button {
  border: 0;
  background: transparent;
  color: #858a80;
  cursor: pointer;
  font-size: 11px;
}
.filter-button { display: inline-flex; min-height: 31px; align-items: center; gap: 6px; padding: 0 10px; border-radius: 7px; }
.filter-button:hover { color: var(--ink); }
.filter-button.is-selected { background: var(--sage); color: var(--leaf-dark); font-weight: 600; }
.filter-button span { color: #9ba596; font-family: var(--mono); font-size: 9px; }
.clear-button { padding: 7px 0 7px 8px; color: #9b6a55; }
.clear-button:hover { color: #6f3f2d; }
.clear-button[hidden] { display: none; }
.toolbar-end { display: flex; align-items: center; gap: 10px; }
.search-wrap { display: inline-flex; height: 30px; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid #eeede5; border-radius: 7px; color: #9a9d93; }
.search-wrap:focus-within { border-color: #8eaa91; }
.search-wrap > span { font-size: 16px; }
.search-wrap input { width: 66px; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.search-wrap input::placeholder { color: #a4a69c; }

.task-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.task-row {
  display: flex;
  min-height: 57px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  animation: arrive 180ms ease both;
}
.task-content { min-width: 0; flex: 1; padding: 11px 0; }
.task-check {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  accent-color: var(--leaf);
  cursor: pointer;
}
.task-text { display: block; min-width: 0; overflow-wrap: anywhere; color: #3a443d; font-size: 12px; line-height: 1.5; }
.task-note-preview { margin: 5px 0 0; overflow-wrap: anywhere; color: #878d82; font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.task-note-preview[hidden] { display: none; }
.task-note-editor { margin-top: 5px; }
.task-note-editor summary { width: fit-content; color: #9a9d93; cursor: pointer; font-size: 9px; list-style: none; }
.task-note-editor summary::-webkit-details-marker { display: none; }
.task-note-editor summary::before { content: '＋ '; color: var(--gold); }
.task-note-editor[open] summary::before { content: '− '; }
.task-note-editor textarea { display: block; min-height: 48px; margin-top: 7px; }
.task-row.is-done .task-text { color: #a0a49a; text-decoration: line-through; text-decoration-color: #bac0b5; }
.remove-button {
  padding: 6px 0 6px 8px;
  border: 0;
  background: transparent;
  color: #aaa99e;
  cursor: pointer;
  font-size: 10px;
  opacity: 0;
  transition: color 140ms ease, opacity 140ms ease;
}
.task-row:hover .remove-button, .remove-button:focus-visible { color: #9b6a55; opacity: 1; }

.empty-state { display: grid; min-height: 162px; align-content: center; justify-items: center; text-align: center; }
.empty-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: #f3f0e4; color: var(--gold); font-size: 16px; }
.empty-title { margin: 11px 0 4px; font-family: var(--serif); font-size: 17px; }
.empty-copy { margin: 0; color: #989b91; font-size: 11px; }
.empty-state[hidden] { display: none; }

.list-footer { display: flex; min-height: 42px; align-items: flex-end; justify-content: space-between; gap: 10px; color: #a0a398; font-size: 9px; }
.save-note { display: inline-flex; align-items: center; gap: 6px; }
.save-dot { width: 5px; height: 5px; border-radius: 50%; background: #86a585; }
.save-dot.is-error { background: #bb725b; }
.privacy-note { grid-column: 2; margin: -52px 0 0; color: #8e9187; font-size: 10px; text-align: center; }

.footer { min-height: 64px; border-top: 1px solid rgb(32 43 37 / 11%); color: #8f9389; font-size: 9px; letter-spacing: .08em; }
.footer a { color: #747b70; letter-spacing: .01em; }
.footer a span { color: var(--gold); }

.auth-dialog { width: min(92vw, 430px); max-width: 430px; padding: 0; overflow: visible; border: 1px solid rgb(32 43 37 / 10%); border-radius: 20px; background: var(--white); color: var(--ink); box-shadow: 0 28px 90px rgb(32 43 37 / 24%); }
.auth-dialog::backdrop { background: rgb(24 34 27 / 40%); backdrop-filter: blur(5px); }
.auth-card { position: relative; display: grid; gap: 10px; padding: 36px; }
.auth-card .eyebrow { margin: 0 0 4px; }
.auth-card h2 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -.04em; }
.auth-copy { margin: 0 0 7px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-card label { margin-top: 4px; color: #687166; font-size: 10px; font-weight: 600; }
.auth-card input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #e6e5da; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; }
.auth-card input:focus { border-color: #8eaa91; box-shadow: 0 0 0 3px rgb(82 111 89 / 10%); outline: none; }
.dialog-close { position: absolute; top: 17px; right: 17px; display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; background: #f3f2ec; color: #777e73; cursor: pointer; font-size: 20px; }
.auth-message { min-height: 16px; margin: 2px 0 0; color: var(--leaf-dark); font-size: 11px; line-height: 1.5; }
.auth-message.is-error { color: #9b5141; }
.auth-submit { min-height: 45px; border: 0; border-radius: 8px; background: var(--leaf); color: #fff; cursor: pointer; font-size: 12px; font-weight: 600; }
.auth-submit:hover { background: var(--leaf-dark); }
.auth-submit:disabled, .auth-links button:disabled { cursor: wait; opacity: .65; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 2px; }
.auth-links button { padding: 4px 0; border: 0; background: transparent; color: var(--leaf-dark); cursor: pointer; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.auth-footnote { margin: 7px 0 0; color: #a0a398; font-size: 9px; line-height: 1.5; }

.ambient { position: fixed; z-index: -1; width: 210px; height: 210px; border: 1px solid rgb(82 111 89 / 8%); border-radius: 50%; pointer-events: none; }
.ambient::before, .ambient::after { position: absolute; inset: 17px; border: 1px solid rgb(82 111 89 / 7%); border-radius: 50%; content: ''; }
.ambient::after { inset: 37px; }
.ambient-one { top: 25%; left: -145px; }
.ambient-two { right: -145px; bottom: 16%; width: 270px; height: 270px; border-color: rgb(213 155 88 / 12%); }
.ambient-two::before, .ambient-two::after { border-color: rgb(213 155 88 / 10%); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

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

@media (max-width: 820px) {
  .page { padding: 0 6vw; }
  .main { width: min(100%, 620px); grid-template-columns: 1fr; gap: 30px; padding: 52px 0 56px; }
  .intro { padding: 0; text-align: center; }
  .today-card { margin-top: 20px; }
  .eyebrow { justify-content: center; margin-bottom: 19px; }
  h1 { font-size: clamp(52px, 10vw, 70px); }
  .intro-copy { margin-top: 17px; }
  .privacy-note { grid-column: 1; margin: -14px 0 0; }
}

@media (max-width: 520px) {
  .page { padding: 0 18px; }
  .topbar { height: 68px; }
  .top-note { font-size: 8px; letter-spacing: .08em; }
  .top-actions { gap: 9px; }
  .account-button { min-height: 32px; padding: 0 10px; font-size: 10px; }
  .main { gap: 25px; padding: 42px 0 38px; }
  .intro-copy { font-size: 13px; }
  .desktop-break { display: none; }
  .list-panel { padding: 23px 17px 16px; border-radius: 16px; }
  .panel-top h2 { font-size: 24px; }
  .add-form { gap: 7px; }
  .add-fields { flex: 1 1 62%; }
  .add-form input { height: 46px; padding: 0 11px; font-size: 11px; }
  .add-form textarea { min-height: 44px; padding: 9px 11px; font-size: 10px; }
  .add-button { height: 46px; gap: 7px; padding: 0 11px; font-size: 11px; }
  .list-toolbar { min-height: 52px; }
  .filter-button { padding: 0 8px; font-size: 10px; }
  .clear-button { font-size: 10px; }
  .search-wrap { gap: 2px; padding: 0 5px; }
  .search-wrap input { width: 46px; font-size: 9px; }
  .toolbar-end { gap: 6px; }
  .task-row { min-height: 54px; }
  .remove-button { opacity: 1; }
  .auth-card { padding: 30px 24px 24px; }
  .auth-links button { font-size: 9px; }
  .footer { min-height: 56px; font-size: 8px; }
}

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

:root { --panel: #fffefa; --panel-soft: #f7f6f0; --input: #fff; --danger: #9b5141; }
body, button, input, textarea, select { font-family: var(--sans); }
button, input, textarea, select { font-size: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.top-actions { gap: 10px; }
.icon-button, .view-toggle { display: inline-grid; min-width: 34px; min-height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--leaf-dark); cursor: pointer; font-size: 12px; }
.icon-button:hover, .view-toggle:hover { background: var(--sage); }
.list-panel { background: var(--panel); }
.panel-tools { display: flex; align-items: flex-end; gap: 23px; }
.focus-timer { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.focus-timer span { min-width: 38px; color: var(--leaf-dark); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.focus-timer button { padding: 4px 8px; border: 0; border-radius: 6px; background: var(--sage); color: var(--leaf-dark); font-size: 9px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 12px; }
.stat-card { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid rgb(32 43 37 / 7%); border-radius: 9px; background: var(--panel-soft); }
.stat-card > span { color: var(--leaf-dark); font-family: var(--serif); font-size: 18px; }
.stat-card small { color: var(--muted); font-size: 9px; }
.stat-alert > span { color: var(--danger); }
.add-form { display: grid; }
.add-primary { display: flex; gap: 9px; }
.add-primary input { min-width: 0; flex: 1; }
.planning-options { margin-top: 8px; }
.planning-options summary { width: fit-content; color: var(--leaf-dark); cursor: pointer; font-size: 10px; }
.planning-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.planning-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.planning-grid input, .planning-grid select, .edit-dialog input, .edit-dialog textarea, .edit-dialog select { min-width: 0; width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--ink); font: inherit; font-size: 11px; }
.planning-grid textarea, .edit-dialog textarea { resize: vertical; }
.template-actions { display: flex; gap: 14px; margin-top: 10px; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--leaf-dark); cursor: pointer; font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.workspace-toolbar { display: grid; gap: 9px; margin-top: 17px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.view-tabs, .toolbar-actions { display: flex; align-items: center; gap: 5px; }
.view-tabs { overflow-x: auto; scrollbar-width: thin; }
.view-button { display: inline-flex; min-height: 31px; align-items: center; gap: 5px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: #858a80; cursor: pointer; font-size: 10px; white-space: nowrap; }
.view-button:hover { color: var(--ink); }
.view-button.is-selected { background: var(--sage); color: var(--leaf-dark); font-weight: 650; }
.view-button span { color: #9ba596; font-family: var(--mono); font-size: 9px; }
.toolbar-actions { flex-wrap: wrap; }
.toolbar-select { min-width: 88px; max-width: 130px; height: 31px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--ink); font-size: 9px; }
.sort-select { min-width: 91px; }
.view-toggle { min-height: 31px; min-width: 42px; padding: 0 8px; font-size: 9px; }
.view-toggle.is-selected { border-color: #c4d1c0; background: var(--sage); color: var(--leaf-dark); }
.bulk-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 3px; padding: 9px 11px; border-radius: 9px; background: #edf1e9; color: var(--leaf-dark); font-size: 10px; }
.bulk-toolbar button:not(.text-button) { padding: 5px 8px; border: 1px solid rgb(63 91 71 / 13%); border-radius: 6px; background: var(--panel); color: var(--leaf-dark); font-size: 9px; }
.calendar-view { padding: 11px 0; }
.calendar-heading { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 7px 0 12px; }
.calendar-heading h3 { min-width: 150px; margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 500; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekday { padding: 5px 2px; color: var(--muted); font-family: var(--mono); font-size: 9px; text-align: center; }
.calendar-blank { min-height: 71px; }
.calendar-day { display: grid; min-height: 71px; align-content: start; justify-items: start; gap: 3px; overflow: hidden; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); text-align: left; }
.calendar-day:hover { border-color: #afc2ac; background: var(--panel-soft); }
.calendar-day.is-today { border-color: var(--leaf); }
.calendar-day-number { font-family: var(--mono); font-size: 10px; }
.calendar-day-label { color: var(--leaf-dark); font-size: 8px; font-weight: 700; }
.calendar-day-sample { width: 100%; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.task-row { align-items: flex-start; gap: 8px; padding: 9px 0; }
.select-check, .task-check { flex: 0 0 auto; margin-top: 2px; accent-color: var(--leaf); cursor: pointer; }
.select-check { width: 13px; height: 13px; }
.task-check { width: 16px; height: 16px; }
.task-content { padding: 0 2px; }
.task-title-line { display: flex; align-items: center; gap: 7px; }
.task-text { font-size: 12px; }
.pin-mark { padding: 2px 5px; border-radius: 5px; background: #f4eddf; color: #97703e; font-size: 8px; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.meta-chip, .tag-chip { display: inline-flex; align-items: center; min-height: 19px; padding: 2px 6px; border-radius: 5px; background: var(--panel-soft); color: var(--muted); font-size: 8px; }
.priority-1 { background: #eff2ec; color: #687564; }
.priority-2 { background: #eef0e8; color: #66735e; }
.priority-3 { background: #fbf0dd; color: #9a6c27; }
.priority-4, .overdue-chip { background: #fae9e4; color: #9b5141; }
.tag-chip { background: #edf1f5; color: #627487; }
.task-row.is-overdue .task-text { color: #8c4b3c; }
.task-row.is-pinned { border-left: 2px solid #d7b675; padding-left: 8px; }
.task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; flex-wrap: wrap; max-width: 140px; }
.row-action, .inline-action { padding: 4px 5px; border: 0; border-radius: 5px; background: transparent; color: #8b9085; cursor: pointer; font-size: 8px; }
.row-action:hover, .inline-action:hover { background: var(--sage); color: var(--leaf-dark); }
.danger-action:hover { background: #fae9e4; color: var(--danger); }
.subtasks-box { margin-top: 7px; }
.subtasks-box summary { width: fit-content; color: var(--leaf-dark); cursor: pointer; font-size: 9px; }
.subtask-list { display: grid; gap: 5px; margin-top: 7px; }
.subtask-item { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 10px; }
.subtask-item input { accent-color: var(--leaf); }
.subtask-item.is-done span { color: var(--muted); text-decoration: line-through; }
.subtask-form { display: flex; gap: 5px; margin-top: 8px; }
.subtask-form input { width: min(100%, 230px); min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--input); color: var(--ink); font-size: 10px; }
.subtask-form button { padding: 5px 8px; border: 0; border-radius: 6px; background: var(--sage); color: var(--leaf-dark); font-size: 9px; }
.task-note-preview { color: var(--muted); }
.footer-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.list-footer { min-height: 36px; align-items: center; }
.shortcut-hint { margin: 9px 0 0; color: #a0a398; font-size: 8px; text-align: right; }
.shortcut-hint kbd { padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-soft); color: var(--muted); font: inherit; }
.undo-toast { display: flex; width: fit-content; align-items: center; gap: 15px; margin: 14px auto 0; padding: 9px 14px; border-radius: 9px; background: #28352e; color: white; box-shadow: 0 7px 24px rgb(0 0 0 / 15%); font-size: 11px; }
.undo-toast button { border: 0; background: transparent; color: #d9c08f; font-size: 10px; font-weight: 700; text-decoration: underline; }
.edit-dialog { width: min(92vw, 500px); max-width: 500px; padding: 0; border: 1px solid rgb(32 43 37 / 10%); border-radius: 20px; background: var(--panel); color: var(--ink); box-shadow: 0 28px 90px rgb(32 43 37 / 24%); }
.edit-dialog::backdrop { background: rgb(24 34 27 / 40%); backdrop-filter: blur(5px); }
.edit-dialog .auth-card { gap: 10px; }
.edit-dialog textarea { min-height: 80px; }
.edit-dialog label { display: grid; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 10px; }
.auth-dialog { background: var(--panel); }
.auth-card input { background: var(--input); color: var(--ink); }
.dark-theme {
  color-scheme: dark;
  --paper: #171d19;
  --paper-deep: #202922;
  --ink: #e7ece5;
  --muted: #a0aa9e;
  --line: #344037;
  --leaf: #96b69a;
  --leaf-dark: #b3cfb1;
  --sage: #29382c;
  --white: #202922;
  --panel: #202922;
  --panel-soft: #252f28;
  --input: #19211c;
  --danger: #e49c88;
  background: radial-gradient(ellipse at 8% 14%, rgb(70 91 72 / 22%), transparent 34rem), radial-gradient(ellipse at 94% 69%, rgb(113 91 58 / 14%), transparent 30rem), var(--paper);
}
.dark-theme .list-panel { border-color: #344037; background: rgb(32 41 34 / 94%); }
.dark-theme .add-form input, .dark-theme .add-form textarea, .dark-theme .task-note-editor textarea { border-color: var(--line); background: var(--input); color: var(--ink); }
.dark-theme .task-text, .dark-theme .task-row.is-overdue .task-text { color: var(--ink); }
.dark-theme .task-row.is-done .task-text { color: #778277; }
.dark-theme .meta-chip, .dark-theme .tag-chip { color: var(--muted); }
.dark-theme .priority-4, .dark-theme .overdue-chip { background: #4b302b; color: #f2ad98; }
.dark-theme .tag-chip { background: #2b3a47; color: #b1c5d5; }
.dark-theme .pin-mark { background: #403a2b; color: #e0c487; }
.dark-theme .bulk-toolbar { background: #29382c; }
.dark-theme .bulk-toolbar button:not(.text-button) { background: var(--panel); color: var(--ink); }
.dark-theme .view-button { color: #a0aa9e; }
.dark-theme .view-button.is-selected, .dark-theme .view-toggle.is-selected { color: var(--leaf-dark); }
.compact-layout .task-row { min-height: 0; padding: 6px 0; }
.compact-layout .task-content { padding: 1px 2px; }
.compact-layout .stats-grid { margin: 11px 0 8px; }
.compact-layout .stat-card { padding: 6px 9px; }
.compact-layout .task-actions { max-width: 120px; }

@media (max-width: 820px) {
  .panel-tools { gap: 12px; }
  .workspace-toolbar { gap: 7px; }
  .toolbar-actions { gap: 5px; }
  .task-actions { max-width: 135px; }
}
@media (max-width: 600px) {
  .top-note { display: none; }
  .top-actions { gap: 6px; }
  .panel-top { align-items: center; }
  .panel-tools { align-items: flex-end; gap: 7px; }
  .focus-timer { gap: 4px; padding: 5px; }
  .focus-timer button { max-width: 56px; font-size: 8px; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .stat-card { padding: 7px 6px; }
  .stat-card > span { font-size: 16px; }
  .stat-card small { font-size: 8px; }
  .planning-grid { grid-template-columns: 1fr 1fr; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .search-wrap { min-width: 0; }
  .search-wrap input { width: 100%; }
  .toolbar-select { max-width: none; width: 100%; }
  .view-toggle { width: 100%; }
  .task-actions { max-width: 72px; }
  .row-action { font-size: 8px; }
  .calendar-grid { gap: 3px; }
  .calendar-day, .calendar-blank { min-height: 57px; }
  .calendar-day { padding: 4px; }
  .calendar-day-sample { display: none; }
  .list-footer { align-items: flex-start; flex-direction: column; padding-top: 10px; }
  .footer-actions { gap: 8px; }
  .shortcut-hint { text-align: left; }
}
