:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-soft: #eef2ec;
  --ink: #17201d;
  --muted: #66736d;
  --line: #dce3dd;
  --green: #246b5a;
  --green-strong: #174f43;
  --rose: #b94b5b;
  --rose-soft: #fdecef;
  --blue: #3d63ad;
  --amber: #a56b16;
  --field: #fbfdfb;
  --summary-surface: #f8faf8;
  --accent-soft: #e4f4ed;
  --accent-check: #e8f4ef;
  --done-soft: #edf2fb;
  --pill-bg: #e7ece7;
  --warn-soft: #fff3d7;
  --empty-surface: rgba(255, 255, 255, 0.58);
  --nav-line: rgba(220, 227, 221, 0.88);
  --nav-surface: rgba(255, 255, 255, 0.94);
  --nav-shadow: 0 16px 44px rgba(23, 32, 29, 0.18);
  --focus-ring: rgba(36, 107, 90, 0.22);
  --shadow: 0 18px 42px rgba(23, 32, 29, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

:root[data-theme="warm"] {
  color-scheme: light;
  --bg: #fff7f2;
  --surface: #fffdfb;
  --surface-soft: #f7e8df;
  --ink: #251b18;
  --muted: #76665d;
  --line: #ead8cc;
  --green: #0f766e;
  --green-strong: #0d5a55;
  --rose: #d14f67;
  --rose-soft: #ffe9ee;
  --blue: #346fbf;
  --amber: #ad6613;
  --field: #fffaf7;
  --summary-surface: #fff1e9;
  --accent-soft: #ddf4ef;
  --accent-check: #e3f5f0;
  --done-soft: #eaf1ff;
  --pill-bg: #f4e9e1;
  --warn-soft: #fff0cb;
  --empty-surface: rgba(255, 253, 251, 0.7);
  --nav-line: rgba(234, 216, 204, 0.9);
  --nav-surface: rgba(255, 253, 251, 0.94);
  --nav-shadow: 0 16px 44px rgba(37, 27, 24, 0.18);
  --focus-ring: rgba(15, 118, 110, 0.24);
  --shadow: 0 18px 42px rgba(37, 27, 24, 0.09);
}

:root[data-theme="fresh"] {
  color-scheme: light;
  --bg: #f2f8fb;
  --surface: #ffffff;
  --surface-soft: #e5f1f5;
  --ink: #102027;
  --muted: #5e717a;
  --line: #d4e4ea;
  --green: #1d6f8f;
  --green-strong: #164f67;
  --rose: #c4495f;
  --rose-soft: #ffe9ee;
  --blue: #3b67d8;
  --amber: #9a6a12;
  --field: #f9fdff;
  --summary-surface: #edf8fb;
  --accent-soft: #dff3f4;
  --accent-check: #e3f7f7;
  --done-soft: #e8efff;
  --pill-bg: #e6eef2;
  --warn-soft: #fff3d4;
  --empty-surface: rgba(255, 255, 255, 0.68);
  --nav-line: rgba(212, 228, 234, 0.9);
  --nav-surface: rgba(255, 255, 255, 0.94);
  --nav-shadow: 0 16px 44px rgba(16, 32, 39, 0.16);
  --focus-ring: rgba(29, 111, 143, 0.24);
  --shadow: 0 18px 42px rgba(16, 32, 39, 0.08);
}

:root[data-theme="paper"] {
  color-scheme: light;
  --bg: #fbfbf1;
  --surface: #fffffa;
  --surface-soft: #eef2df;
  --ink: #202116;
  --muted: #6b705d;
  --line: #dde2c9;
  --green: #6b7418;
  --green-strong: #4e570f;
  --rose: #bd4d62;
  --rose-soft: #fdebed;
  --blue: #2e6fa5;
  --amber: #a96918;
  --field: #fffffb;
  --summary-surface: #f4f6df;
  --accent-soft: #eef5cd;
  --accent-check: #eff7d6;
  --done-soft: #e8f1fa;
  --pill-bg: #eef0df;
  --warn-soft: #fff0cf;
  --empty-surface: rgba(255, 255, 250, 0.68);
  --nav-line: rgba(221, 226, 201, 0.9);
  --nav-surface: rgba(255, 255, 250, 0.94);
  --nav-shadow: 0 16px 44px rgba(32, 33, 22, 0.16);
  --focus-ring: rgba(107, 116, 24, 0.24);
  --shadow: 0 18px 42px rgba(32, 33, 22, 0.08);
}

:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #0f1414;
  --surface: #151d1c;
  --surface-soft: #202c2a;
  --ink: #eff5f2;
  --muted: #a9bab4;
  --line: #2b3a37;
  --green: #55d6b3;
  --green-strong: #8deed5;
  --rose: #ff7a91;
  --rose-soft: #38202a;
  --blue: #8ca7ff;
  --amber: #f2c66b;
  --field: #121a19;
  --summary-surface: #192422;
  --accent-soft: #153832;
  --accent-check: #153f37;
  --done-soft: #1e2d49;
  --pill-bg: #22302d;
  --warn-soft: #3d3020;
  --empty-surface: rgba(21, 29, 28, 0.72);
  --nav-line: rgba(43, 58, 55, 0.9);
  --nav-surface: rgba(18, 26, 25, 0.94);
  --nav-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
  --focus-ring: rgba(85, 214, 179, 0.28);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  width: min(920px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom));
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 2px 18px;
}

.app-header > div,
.section-heading > div,
.settings-title-row > div {
  min-width: 0;
  flex: 1;
}

.eyebrow,
.label,
.field-label,
label span,
legend {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--green);
  text-transform: uppercase;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0;
  word-break: keep-all;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 0;
  word-break: keep-all;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  word-break: keep-all;
}

.hero-subtitle,
.muted,
.install-hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.main-stage {
  min-height: 560px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button,
.tab,
.task-action,
.quick-template,
.nav-item {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 500;
}

.icon-button {
  width: 46px;
  flex: 0 0 46px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--green);
  box-shadow: var(--shadow);
  font-size: 22px;
}

.primary-button,
.secondary-button,
.ghost-button {
  padding: 0 16px;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.primary-button.wide,
.secondary-button.wide {
  width: 100%;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--green);
}

.ghost-button {
  background: var(--surface-soft);
  color: var(--green);
}

.today-band {
  display: grid;
  gap: 18px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.summary-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--summary-surface);
  padding: 12px;
}

.summary-item strong {
  display: block;
  color: var(--green-strong);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.summary-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.summary-item.danger strong {
  color: var(--rose);
}

.list-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 18px 0 14px;
}

.tabs,
.segmented,
.assignee-controls,
.quick-templates {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px;
}

.tab {
  flex: 1;
  min-width: 64px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: var(--green);
  color: #fff;
}

.status-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.status-pill.good {
  background: var(--accent-soft);
  color: var(--green);
}

.status-pill.warn {
  background: var(--warn-soft);
  color: var(--amber);
}

.status-pill.bad {
  background: var(--rose-soft);
  color: var(--rose);
}

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

.task-group {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.task-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 0;
}

.task-group-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.task-group-heading span {
  color: var(--muted);
  font-size: 12px;
}

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

.recurring-series {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px;
}

.recurring-series-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.recurring-series-heading h3 {
  margin: 0;
}

.recurring-series-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.recurring-series-schedules {
  display: grid;
  gap: 8px;
}

.task-card.recurring-schedule {
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
}

.task-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.task-card.overdue {
  border-left-color: var(--rose);
}

.task-card.done {
  border-left-color: var(--blue);
  opacity: 0.78;
}

.task-main-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.check-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent-check);
  color: var(--green);
  font-size: 20px;
  font-weight: 500;
}

.task-card.done .check-button {
  background: var(--done-soft);
  color: var(--blue);
}

.task-title {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.task-time {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.task-note {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.meta-chip.assignee {
  background: var(--accent-soft);
  color: var(--green);
}

.meta-chip.overdue {
  background: var(--rose-soft);
  color: var(--rose);
}

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

.task-action {
  min-width: 0;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--ink);
}

.task-action.delete {
  background: var(--rose-soft);
  color: var(--rose);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--empty-surface);
  padding: 28px 18px;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-mark {
  width: 58px;
  height: 58px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(var(--green), var(--green)) 15px 20px / 28px 3px no-repeat,
    linear-gradient(var(--green), var(--green)) 15px 31px / 20px 3px no-repeat,
    var(--surface);
}

.empty-state h3 {
  margin-bottom: 0;
}

.empty-state p {
  max-width: 320px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.task-form,
.settings-list {
  display: grid;
  gap: 14px;
}

.task-form,
.settings-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.quick-template,
.segmented button,
.assignee-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font-weight: 400;
}

.quick-template {
  padding: 0 13px;
}

.segmented button {
  flex: 1;
  padding: 0 14px;
}

.segmented button.active,
.assignee-chip:has(input:checked) {
  border-color: var(--green);
  background: var(--accent-soft);
  color: var(--green);
}

.assignee-chip {
  display: inline-flex;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
}

.assignee-chip input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.settings-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-field {
  display: grid;
  gap: 0;
  margin-bottom: 12px;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(920px, calc(100% - 20px));
  margin: 0 auto calc(10px + env(safe-area-inset-bottom));
  border: 1px solid var(--nav-line);
  border-radius: 8px;
  background: var(--nav-surface);
  box-shadow: var(--nav-shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.nav-item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.nav-item.active {
  color: var(--green);
}

.nav-item:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px var(--focus-ring);
}

.nav-item-primary {
  color: var(--green-strong);
}

.nav-icon {
  position: relative;
  display: block;
  width: 23px;
  height: 23px;
}

.nav-icon-list {
  border: 2px solid currentColor;
  border-radius: 6px;
}

.nav-icon-list::before,
.nav-icon-list::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-icon-list::before {
  top: 7px;
}

.nav-icon-list::after {
  top: 13px;
}

.nav-icon-all {
  border: 2px solid currentColor;
  border-radius: 5px;
}

.nav-icon-all::before,
.nav-icon-all::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.nav-icon-all::before {
  top: 3px;
  left: 3px;
}

.nav-icon-all::after {
  right: 3px;
  bottom: 3px;
}

.nav-icon-plus {
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.nav-icon-plus::before,
.nav-icon-plus::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 6px;
  width: 11px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.nav-icon-plus::after {
  transform: rotate(90deg);
}

.nav-icon-user {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-icon-user::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 7px;
  width: 5px;
  height: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-icon-user::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 3px;
  left: 4px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 28px;
  }

  .today-band {
    grid-template-columns: minmax(0, 1fr) 380px;
  }

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

  .task-form,
  .settings-list {
    max-width: 680px;
  }

  .task-actions {
    display: flex;
    justify-content: flex-end;
  }

  .task-action {
    min-width: 98px;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

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

  .summary-item {
    padding: 10px 8px;
  }

  .summary-item strong {
    font-size: 20px;
  }

  .list-toolbar {
    grid-template-columns: 1fr;
  }

  .status-pill {
    justify-self: start;
  }

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

  .task-action.delete {
    grid-column: span 2;
  }
}

/* iOS-style direction inspired by the selected references. */
:root {
  color-scheme: light;
  --bg: #f4f4f3;
  --surface: #ffffff;
  --surface-soft: #efefee;
  --ink: #242528;
  --muted: #7b7d80;
  --line: #e7e7e5;
  --green: #34465f;
  --green-strong: #26374f;
  --rose: #df4f58;
  --rose-soft: #fae6e9;
  --blue: #34465f;
  --amber: #f47f13;
  --field: #f7f7f6;
  --summary-surface: #f2f2f1;
  --accent-soft: #e7e9ec;
  --accent-check: transparent;
  --done-soft: #eef0f3;
  --pill-bg: #ededec;
  --warn-soft: #fff4e7;
  --empty-surface: rgba(255, 255, 255, 0.72);
  --nav-line: rgba(255, 255, 255, 0.92);
  --nav-surface: rgba(255, 255, 255, 0.86);
  --nav-shadow: 0 24px 64px rgba(32, 33, 36, 0.16);
  --focus-ring: rgba(52, 70, 95, 0.2);
  --shadow: 0 20px 50px rgba(32, 33, 36, 0.08);
}

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

body {
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: min(860px, 100%);
  padding: calc(34px + env(safe-area-inset-top)) clamp(22px, 5vw, 44px)
    calc(136px + env(safe-area-inset-bottom));
}

.app-header {
  position: relative;
  min-height: 96px;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 0 26px;
}

.app-header > div {
  position: absolute;
  top: 7px;
  left: 50%;
  width: min(54vw, 360px);
  flex: 0 0 auto;
  transform: translateX(-50%);
  text-align: center;
}

.eyebrow,
.hero-subtitle {
  display: none;
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  font-weight: 500;
}

h3 {
  font-size: 16px;
  font-weight: 400;
}

.icon-button {
  width: 108px;
  height: 64px;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #3f4144;
  box-shadow: 0 18px 42px rgba(32, 33, 36, 0.1);
  backdrop-filter: blur(20px);
  font-size: 24px;
}

.main-stage {
  min-height: calc(100vh - 230px);
}

.today-band {
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 52px 8px 24px;
}

.today-band .label,
.today-band h2,
.summary-grid {
  display: none;
}

.today-band .muted {
  color: var(--ink);
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 400;
  line-height: 1.28;
}

.list-toolbar {
  display: none;
}

.task-list {
  gap: 16px;
}

.task-group {
  gap: 12px;
  margin-top: 12px;
}

.task-group-heading {
  padding: 0 8px;
}

.task-group-list {
  gap: 16px;
}

.recurring-series {
  gap: 12px;
  border: 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
}

.recurring-series-heading {
  padding: 0 4px;
}

.recurring-series-heading h3 {
  font-size: 17px;
}

.recurring-series-schedules {
  gap: 10px;
}

.task-card.recurring-schedule {
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: none;
  padding: 14px 16px;
}

.task-card {
  gap: 12px;
  border: 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  padding: 20px 24px;
}

.task-card.overdue,
.task-card.done {
  border-left: 0;
}

.task-card.overdue {
  box-shadow:
    inset 0 0 0 1px rgba(223, 79, 88, 0.08),
    0 1px 0 rgba(0, 0, 0, 0.03);
}

.task-card.done {
  opacity: 0.72;
}

.task-main-row {
  grid-template-columns: 48px minmax(0, 1fr) 38px;
  gap: 18px;
  align-items: center;
}

.check-button {
  width: 46px;
  height: 46px;
  border: 2px solid #a8aaad;
  background: transparent;
  color: var(--green);
  font-size: 0;
  line-height: 1;
}

.task-card.done .check-button {
  border-color: var(--green);
  background: var(--done-soft);
  font-size: 18px;
}

.task-title {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.28;
}

.task-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.task-more-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #85878a;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.task-meta {
  display: none;
}

.task-note {
  display: none;
  margin-left: 66px;
  color: #4d4f52;
  font-size: 14px;
}

.task-actions {
  display: none;
  gap: 10px;
  margin-left: 66px;
}

.task-card.actions-open .task-note {
  display: block;
}

.task-card.actions-open .task-actions {
  display: flex;
}

.task-action {
  min-width: 0;
  min-height: 38px;
  border-radius: 999px;
  background: #f0f0ef;
  color: #4d4f52;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 400;
}

.task-action.delete {
  background: var(--rose-soft);
  color: var(--rose);
}

.add-task-row {
  display: flex;
  width: 100%;
  min-height: 72px;
  align-items: center;
  gap: 18px;
  margin: 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 44px rgba(32, 33, 36, 0.08);
  color: var(--ink);
  padding: 0 28px;
  text-align: left;
}

.add-task-row span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border: 3px solid #4d4f52;
  border-radius: 50%;
  color: #4d4f52;
  font-size: 30px;
  font-weight: 450;
  line-height: 1;
}

.add-task-row strong {
  font-size: 17px;
  font-weight: 400;
}

.empty-state {
  margin-top: 18px;
  border: 0;
  border-radius: 28px;
  background: var(--empty-surface);
  box-shadow: none;
  padding: 26px 22px;
}

.empty-state .secondary-button {
  display: none;
}

.empty-mark {
  width: 50px;
  height: 50px;
  border-color: #d8d8d6;
  border-radius: 20px;
  background:
    linear-gradient(var(--green), var(--green)) 13px 17px / 24px 3px no-repeat,
    linear-gradient(var(--green), var(--green)) 13px 28px / 17px 3px no-repeat,
    var(--surface);
}

.section-heading {
  margin: 42px 8px 20px;
}

.section-heading .label {
  display: none;
}

.task-form,
.settings-list {
  gap: 20px;
}

.task-form,
.settings-block {
  border: 0;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  padding: 24px;
}

.field-label,
label span,
legend,
.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

input,
select,
textarea {
  min-height: 56px;
  border: 0;
  border-radius: 20px;
  background: var(--field);
  padding: 14px 16px;
  font-size: 15px;
}

textarea {
  min-height: 104px;
}

.quick-templates,
.segmented,
.assignee-controls {
  gap: 10px;
}

.quick-template,
.segmented button,
.assignee-chip {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

.segmented button.active,
.assignee-chip:has(input:checked) {
  background: var(--green);
  color: #fff;
}

.assignee-chip input {
  accent-color: var(--green);
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 54px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
}

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

.secondary-button,
.ghost-button {
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.settings-title-row {
  align-items: center;
  margin-bottom: 18px;
}

.settings-block h3 {
  margin-bottom: 6px;
}

.status-pill {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  background: var(--pill-bg);
}

.bottom-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(640px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto calc(28px + env(safe-area-inset-bottom));
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  background: var(--nav-surface);
  box-shadow: var(--nav-shadow);
  padding: 6px;
  backdrop-filter: blur(22px);
  overflow: visible;
}

.nav-item {
  min-width: 0;
  min-height: 64px;
  border-radius: 999px;
  color: #67696b;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.nav-item.active {
  background: #e3e3e2;
  color: var(--green);
}

.nav-item-primary {
  color: var(--green);
}

.nav-icon {
  width: 28px;
  height: 28px;
}

.nav-icon-list {
  border-width: 3px;
  border-radius: 8px;
}

.nav-icon-list::before,
.nav-icon-list::after {
  left: 6px;
  right: 6px;
  height: 3px;
}

.nav-icon-list::before {
  top: 8px;
}

.nav-icon-list::after {
  top: 16px;
}

.nav-icon-plus {
  background: var(--green);
}

.nav-icon-plus::before,
.nav-icon-plus::after {
  top: 12px;
  left: 7px;
  width: 14px;
  height: 4px;
}

.nav-icon-user {
  border-width: 3px;
}

.nav-icon-user::before {
  top: 6px;
  left: 8px;
  width: 6px;
  height: 6px;
}

.nav-icon-user::after {
  right: 5px;
  bottom: 3px;
  left: 5px;
  height: 9px;
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 42px;
  }

  .today-band {
    padding-top: 36px;
  }

  .task-form,
  .settings-list {
    max-width: 680px;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-right: 22px;
    padding-left: 22px;
  }

  .app-header {
    min-height: 90px;
  }

  .icon-button {
    width: 96px;
    height: 58px;
    min-height: 58px;
  }

  .today-band {
    padding-top: 42px;
  }

  .task-card {
    border-radius: 26px;
    padding: 18px 20px;
  }

  .task-title {
    font-size: 17px;
  }

  .task-note,
  .task-actions {
    margin-left: 0;
  }

  .task-card.actions-open .task-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-action.delete {
    grid-column: span 2;
  }

  .add-task-row {
    min-height: 68px;
    padding: 0 24px;
  }

  .add-task-row strong {
    font-size: 17px;
  }

  .bottom-nav {
    width: min(640px, calc(100% - 84px));
  }
}

#assignee-controls[hidden],
.modal-shell[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 37, 40, 0.28);
  backdrop-filter: blur(14px);
}

.complete-panel {
  position: relative;
  display: grid;
  width: min(420px, 100%);
  gap: 16px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 26px 74px rgba(32, 33, 36, 0.22);
  padding: 24px;
}

.complete-heading .label {
  margin-bottom: 7px;
}

.complete-task-title {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.complete-member-options {
  display: grid;
  gap: 10px;
}

.complete-member-button {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.complete-member-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (min-width: 760px) {
  .modal-shell {
    align-items: center;
  }
}
