:root {
  color-scheme: light;
  --brand: #8a50c4;
  --brand-strong: #6f35aa;
  --brand-soft: #efe3fb;
  --pink: #f067b8;
  --pink-soft: #ffe7f5;
  --ink: #18131f;
  --muted: #766d82;
  --line: #e9e2ef;
  --panel: #ffffff;
  --paper: #fbf8ff;
  --success: #367b57;
  --success-bg: #e9f7ee;
  --warning: #b06a00;
  --warning-bg: #fff3d7;
  --urgent: #a84417;
  --urgent-bg: #ffe5d8;
  --late: #b52243;
  --late-bg: #ffe4ec;
  --delete: #a6384d;
  --delete-strong: #8f2f42;
  --delete-bg: #fff1f4;
  --shadow: 0 18px 55px rgba(67, 42, 86, 0.13);
  --shadow-small: 0 8px 22px rgba(67, 42, 86, 0.09);
  --radius: 8px;
  --target: 44px;
  --font: "Bricolage Grotesque", Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(138, 80, 196, 0.12), transparent 28%),
    linear-gradient(315deg, rgba(240, 103, 184, 0.12), transparent 24%),
    #fffafd;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

button .app-icon {
  pointer-events: none;
}

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

.app-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 8px 0 22px;
}

.brand-block {
  display: grid;
  gap: 8px;
}

.brand-mark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0;
}

.logo-stack,
.empty-stack {
  position: relative;
  display: inline-grid;
  width: 58px;
  height: 46px;
}

.logo-stack span,
.empty-stack span {
  position: absolute;
  display: block;
  width: 46px;
  height: 27px;
  border-radius: 8px;
  background: var(--brand);
  box-shadow: 0 11px 24px rgba(138, 80, 196, 0.25);
}

.logo-stack span:nth-child(1),
.empty-stack span:nth-child(1) {
  left: 8px;
  top: 2px;
  background: #b77de2;
}

.logo-stack span:nth-child(2),
.empty-stack span:nth-child(2) {
  left: 4px;
  top: 10px;
  background: var(--pink);
}

.logo-stack span:nth-child(3),
.empty-stack span:nth-child(3) {
  left: 0;
  top: 18px;
}

.tagline,
.date-line,
.eyebrow,
.empty-state p,
.confirm-modal p {
  margin: 0;
  color: var(--muted);
}

.tagline {
  font-size: 1.03rem;
  font-weight: 760;
}

.hero-meta {
  display: grid;
  gap: 0;
  justify-items: end;
  min-width: min(390px, 100%);
}

.date-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.94rem;
  font-weight: 760;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(138, 80, 196, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.date-divider {
  width: 1px;
  height: 16px;
  background: rgba(138, 80, 196, 0.22);
}

.clock-time {
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(180deg, #9d5ee0 0%, var(--brand) 58%, var(--brand-strong) 100%);
  color: #fff;
  box-shadow:
    0 9px 18px rgba(111, 53, 170, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.greeting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: flex-end;
}

.greeting-row h1,
.toolbar h2,
.empty-state h2,
.modal h2 {
  margin: 0;
  letter-spacing: 0;
}

.greeting-row h1 {
  font-size: clamp(1.45rem, 4vw, 2.45rem);
  line-height: 1.04;
  text-align: right;
}

#greetingNameText {
  border-radius: 6px;
}

#greetingNameText[contenteditable="true"] {
  padding: 0 4px;
  background: var(--pink-soft);
  box-shadow: 0 0 0 3px rgba(240, 103, 184, 0.18);
}

.eyebrow {
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-grid {
  display: grid;
}

.workspace {
  display: grid;
  gap: 12px;
  padding: 0;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.toolbar h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.done-toggle,
.time-button {
  min-height: var(--target);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease, opacity 160ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-color: var(--brand);
  background: linear-gradient(180deg, #955cd0 0%, var(--brand) 100%);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(138, 80, 196, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.primary-button.compact {
  min-height: 40px;
  padding: 0 12px;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: linear-gradient(180deg, #884cc4 0%, var(--brand-strong) 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(138, 80, 196, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.ghost-button,
.time-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 780;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 18px rgba(67, 42, 86, 0.04);
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--late);
  color: #fff;
  font-weight: 850;
}

.ghost-button:hover,
.time-button:hover {
  border-color: rgba(138, 80, 196, 0.32);
  background: var(--brand-soft);
  box-shadow: 0 10px 20px rgba(67, 42, 86, 0.07);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--target);
  padding: 0;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 8px 16px rgba(67, 42, 86, 0.04);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(138, 80, 196, 0.32);
  background: var(--brand-soft);
}

.greeting-edit {
  flex: 0 0 auto;
}

.rollover-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(138, 80, 196, 0.22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-small);
}

.rollover-banner strong,
.rollover-banner span {
  display: block;
}

.rollover-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 650;
}

.storage-warning {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(181, 34, 67, 0.22);
  border-radius: var(--radius);
  background: var(--late-bg);
  color: var(--late);
  box-shadow: var(--shadow-small);
}

.sync-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid rgba(138, 80, 196, 0.22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-small);
}

.sync-banner strong,
.sync-banner span {
  display: block;
}

.sync-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 680;
}

.compact-sync {
  box-shadow: none;
}

.storage-warning span {
  color: #7d263a;
  font-weight: 680;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.task-list-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(138, 80, 196, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(67, 42, 86, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.empty-plan .workspace {
  gap: 10px;
  padding-top: 14px;
}

.empty-plan .app-shell {
  width: min(900px, calc(100% - 40px));
}

.empty-plan .hero {
  padding-bottom: 34px;
}

.empty-plan .hero-meta .greeting-row {
  display: none;
}

.empty-plan .toolbar {
  display: none;
}

.empty-plan .task-list-panel {
  display: grid;
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.empty-plan .task-list {
  order: 2;
  padding: 0;
}

.empty-plan .empty-state {
  order: 1;
}

.capturing-first-task .empty-state {
  padding-bottom: 18px;
}

.capturing-first-task .empty-add-shell {
  display: none;
}

.progress-summary {
  display: grid;
  gap: 11px;
  padding: 20px 28px 17px;
  border-bottom: 1px solid rgba(138, 80, 196, 0.1);
  background:
    linear-gradient(90deg, rgba(138, 80, 196, 0.065), rgba(240, 103, 184, 0.045)),
    rgba(255, 255, 255, 0.72);
}

.progress-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.progress-kicker,
.progress-meta {
  margin: 0;
}

.progress-kicker {
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-meta {
  margin-top: 3px;
  color: #62566f;
  font-size: 0.9rem;
  font-weight: 760;
}

.progress-percent {
  color: var(--ink);
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 900;
  line-height: 0.95;
  white-space: nowrap;
}

.progress-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 11px;
  border: 1px solid rgba(138, 80, 196, 0.12);
  border-radius: 999px;
  background: rgba(138, 80, 196, 0.1);
  box-shadow: inset 0 1px 3px rgba(67, 42, 86, 0.08);
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-strong), var(--brand), var(--pink));
  box-shadow: 0 0 18px rgba(138, 80, 196, 0.24);
  transition: width 260ms ease;
}

.progress-summary.complete .progress-kicker,
.progress-summary.complete .progress-percent {
  color: var(--success);
}

.progress-summary.complete .progress-fill {
  background: linear-gradient(90deg, #367b57, #4f9b73);
  box-shadow: 0 0 18px rgba(79, 155, 115, 0.22);
}

.task-list {
  display: grid;
  padding: 0 28px;
}

.task-item {
  position: relative;
  border-bottom: 1px solid rgba(138, 80, 196, 0.1);
}

.task-item:last-child {
  border-bottom: 0;
}

.task-row,
.inline-add-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
}

.task-row {
  cursor: grab;
  transition: background 160ms ease;
}

.task-row:hover {
  background: rgba(138, 80, 196, 0.025);
}

.task-row:active {
  cursor: grabbing;
}

.task-item.dragging {
  opacity: 0.64;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(67, 42, 86, 0.12);
}

.task-item.drop-before::before,
.task-item.drop-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.task-item.drop-before::before {
  top: 0;
}

.task-item.drop-after::after {
  bottom: -1px;
}

.done-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 950;
}

.done-toggle::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.6px solid rgba(138, 80, 196, 0.32);
  border-radius: 999px;
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.done-toggle .app-icon {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.done-toggle:hover,
.done-toggle:focus-visible {
  background: transparent;
}

.done-toggle:hover::before,
.done-toggle:focus-visible::before {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 5px 12px rgba(138, 80, 196, 0.12);
}

.done-toggle.checked {
  background: transparent;
  color: #fff;
}

.done-toggle.checked::before {
  border-color: var(--brand);
  background: var(--brand);
}

.task-title-area {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  cursor: pointer;
}

.task-title-area:hover .status-pill,
.task-title-area:hover .timer-pill {
  box-shadow: 0 5px 14px rgba(138, 80, 196, 0.1);
}

.task-title-button {
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
}

.task-title-button:hover {
  color: var(--brand-strong);
}

.done .task-title-button {
  color: rgba(24, 19, 31, 0.46);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(24, 19, 31, 0.3);
}

.row-icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(116, 107, 127, 0.86);
  font-weight: 900;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.row-icon-button .app-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.1;
}

.row-icon-button:hover,
.row-icon-button:focus-visible {
  background: var(--brand-soft);
  color: var(--brand-strong);
  transform: translateY(-1px);
}

.row-delete-task {
  justify-self: end;
  font-size: 0.86rem;
}

.row-delete-task:hover,
.row-delete-task:focus-visible {
  background: var(--late-bg);
  color: var(--late);
}

.timer-pill {
  --timer-accent: var(--brand);
  --timer-strong: var(--brand-strong);
  --timer-soft: rgba(138, 80, 196, 0.1);
  --timer-border: rgba(138, 80, 196, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 30px;
  padding: 3px 5px 3px 8px;
  border: 1px solid var(--timer-border);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    var(--timer-soft);
  color: var(--timer-strong);
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 5px 14px rgba(67, 42, 86, 0.06);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
}

.status-mark {
  display: inline-grid;
  place-items: center;
  width: 16px;
  min-width: 16px;
  height: 16px;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1;
}

.status-mark-todo {
  border: 1.8px solid currentColor;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.42);
  opacity: 0.95;
}

.status-mark-progress {
  color: #62566f;
  font-size: 1.12rem;
  line-height: 0.8;
}

.status-mark-done {
  border: 1.8px solid var(--success);
  border-radius: 4px;
  background: rgba(233, 247, 238, 0.52);
  color: var(--success);
  font-size: 0.78rem;
}

.status-pill.status-todo {
  border-color: rgba(138, 80, 196, 0.16);
  background: #f3ecfb;
  color: #61427f;
}

.status-pill.status-progress {
  border-color: rgba(240, 103, 184, 0.18);
  background: rgba(240, 103, 184, 0.12);
  color: #963c73;
}

.status-pill.status-done {
  border-color: rgba(79, 155, 115, 0.2);
  background: var(--success-bg);
  color: var(--success);
}

.timer-pill .app-icon {
  width: 13px;
  height: 13px;
  color: var(--timer-accent);
  opacity: 0.9;
  stroke-width: 2.2;
}

.timer-pill-text,
.timer-pill-deadline,
.timer-pill-separator,
.timer-pill-remaining {
  line-height: 1;
}

.timer-pill-text,
.timer-pill-deadline {
  overflow: hidden;
  text-overflow: ellipsis;
}

.timer-pill-deadline {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.timer-pill-separator {
  margin: 0 -1px;
  color: currentColor;
  font-weight: 900;
  opacity: 0.42;
}

.timer-pill-remaining {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--timer-accent);
  color: #fff;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(67, 42, 86, 0.1);
}

.timer-pill.scheduled {
  --timer-accent: var(--brand);
  --timer-strong: #5c3582;
  --timer-soft: rgba(138, 80, 196, 0.11);
  --timer-border: rgba(138, 80, 196, 0.22);
}

.timer-pill.active {
  --timer-accent: #3f8f63;
  --timer-strong: #2e6f4b;
  --timer-soft: rgba(79, 155, 115, 0.13);
  --timer-border: rgba(79, 155, 115, 0.24);
}

.timer-pill.warning {
  --timer-accent: #9a6400;
  --timer-strong: #7a4f00;
  --timer-soft: rgba(255, 196, 87, 0.22);
  --timer-border: rgba(176, 106, 0, 0.28);
}

.timer-pill.urgent {
  --timer-accent: #b34a1f;
  --timer-strong: #8f3815;
  --timer-soft: rgba(255, 137, 86, 0.18);
  --timer-border: rgba(168, 68, 23, 0.28);
}

.timer-pill.late {
  --timer-accent: #b52243;
  --timer-strong: #911b36;
  --timer-soft: rgba(255, 110, 145, 0.17);
  --timer-border: rgba(181, 34, 67, 0.28);
}

.timer-pill.done-time {
  --timer-accent: #72707a;
  --timer-strong: #625d6b;
  --timer-soft: rgba(111, 104, 122, 0.1);
  --timer-border: rgba(111, 104, 122, 0.18);
}

.timer-pill.done-time .timer-pill-remaining {
  background: #ece8f1;
  color: #625d6b;
  box-shadow: inset 0 0 0 1px rgba(111, 104, 122, 0.1);
}

.task-item.invalid-time .timer-pill {
  --timer-accent: #b52243;
  --timer-strong: #911b36;
  --timer-soft: rgba(255, 110, 145, 0.16);
  --timer-border: rgba(181, 34, 67, 0.3);
}

.task-details {
  position: relative;
  display: none;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0 0 14px;
  padding: 24px 24px 20px;
  overflow: hidden;
  border: 1.5px solid rgba(138, 80, 196, 0.25);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(138, 80, 196, 0.065), rgba(240, 103, 184, 0.035)),
    radial-gradient(circle at 12% 8%, rgba(138, 80, 196, 0.07), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(240, 103, 184, 0.048), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 255, 0.98), rgba(250, 245, 255, 0.95)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    0 18px 44px rgba(67, 42, 86, 0.1);
}

.task-details::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--pink));
  opacity: 0.48;
  pointer-events: none;
}

.task-details > * {
  position: relative;
  z-index: 1;
}

.status-segment-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 9px;
}

.status-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  gap: 0;
  min-height: 54px;
  border: 1px solid rgba(138, 80, 196, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 9px 18px rgba(67, 42, 86, 0.035);
}

.status-segment {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border: 0;
  border-right: 1px solid rgba(138, 80, 196, 0.16);
  border-radius: 0;
  background: transparent;
  color: #4e425e;
  font-weight: 850;
}

.status-segment:last-child {
  border-right: 0;
}

.status-segment .status-mark {
  font-size: 0.86rem;
}

.status-segment.active {
  z-index: 1;
  background:
    radial-gradient(circle at 35% 15%, rgba(255, 255, 255, 0.9), transparent 50%),
    linear-gradient(180deg, #fcf7ff, #efe2fb);
  color: var(--brand-strong);
  box-shadow:
    inset 0 0 0 1px rgba(138, 80, 196, 0.7),
    0 7px 18px rgba(138, 80, 196, 0.09);
  font-weight: 900;
}

.status-segment.status-progress.active {
  background: linear-gradient(180deg, #fff0fa, #ffdff1);
  color: #963c73;
  box-shadow: inset 0 0 0 1px rgba(240, 103, 184, 0.3);
}

.status-segment.status-done.active {
  background:
    radial-gradient(circle at 35% 15%, rgba(255, 255, 255, 0.92), transparent 50%),
    linear-gradient(180deg, #f5fff8, #e6f7ec);
  color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(79, 155, 115, 0.28);
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #62566f;
  font-size: 0.78rem;
  font-weight: 870;
  line-height: 1.2;
}

.task-item.expanded .task-details {
  display: grid;
}

.field {
  display: grid;
  gap: 9px;
  min-width: 0;
  color: #62566f;
  font-size: 0.78rem;
  font-weight: 860;
}

.task-details > .field:first-child {
  grid-column: 1 / -1;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(138, 80, 196, 0.26);
  border-radius: 8px;
  padding: 0 14px;
  background-color: #fff;
  color: var(--ink);
  font-weight: 780;
  box-shadow:
    inset 0 1px 2px rgba(67, 42, 86, 0.04),
    0 8px 18px rgba(67, 42, 86, 0.035);
}

.field select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23766d82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
}

.schedule-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-header .field-label {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

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

.schedule-column {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px 11px;
  border: 1px solid rgba(138, 80, 196, 0.17);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(252, 248, 255, 0.86)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 26px rgba(67, 42, 86, 0.04);
}

.start-column {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 26px rgba(67, 42, 86, 0.04);
}

.end-column {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 26px rgba(67, 42, 86, 0.04);
}

.time-stepper-field {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.time-stepper-field .field-label {
  color: #564865;
  font-size: 0.9rem;
  font-weight: 880;
}

.time-stepper-field .app-icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
  stroke-width: 2.2;
}

.time-stepper {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  overflow: hidden;
  min-height: 44px;
  border: 1px solid rgba(138, 80, 196, 0.22);
  border-radius: 8px;
  background-color: #fff;
  color: var(--ink);
  box-shadow: 0 9px 18px rgba(67, 42, 86, 0.035);
}

.time-step-button,
.time-display,
.time-preset,
.duration-chip {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.time-step-button {
  display: grid;
  place-items: center;
  min-height: 44px;
  color: var(--brand-strong);
  font-size: 1.28rem;
  font-weight: 900;
}

.time-step-button:hover,
.time-step-button:focus-visible,
.time-display:hover,
.time-display:focus-visible,
.time-preset:hover,
.time-preset:focus-visible,
.duration-chip:hover,
.duration-chip:focus-visible {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.time-display {
  min-height: 44px;
  border-right: 1px solid rgba(138, 80, 196, 0.16);
  border-left: 1px solid rgba(138, 80, 196, 0.16);
  color: #4d425a;
  font-size: 0.9rem;
  font-weight: 800;
}

.time-display.empty {
  color: #65586f;
  font-weight: 760;
}

.schedule-presets,
.duration-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.time-preset,
.duration-chip {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(138, 80, 196, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #643c89;
  font-size: 0.76rem;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 7px 14px rgba(67, 42, 86, 0.035);
}

.schedule-presets .time-preset {
  border-color: rgba(138, 80, 196, 0.22);
  background: rgba(138, 80, 196, 0.065);
  color: #654187;
}

.duration-presets .duration-chip {
  border-color: rgba(138, 80, 196, 0.2);
  background: rgba(138, 80, 196, 0.065);
  color: #654187;
}

.schedule-presets .time-preset:hover,
.schedule-presets .time-preset:focus-visible {
  border-color: rgba(138, 80, 196, 0.36);
  background: rgba(138, 80, 196, 0.14);
  color: var(--brand-strong);
}

.duration-presets .duration-chip:hover,
.duration-presets .duration-chip:focus-visible {
  border-color: rgba(138, 80, 196, 0.36);
  background: rgba(138, 80, 196, 0.14);
  color: var(--brand-strong);
}

.chip-group-label {
  flex: 1 0 100%;
  margin: 2px 0 0;
  color: #82778d;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.time-field-note {
  min-height: 16px;
  color: rgba(116, 107, 127, 0.84);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.25;
}

.field-hint,
.input-meta {
  margin: 0;
  color: #62566f;
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1.35;
}

.field input:focus,
.field select:focus,
button:focus-visible {
  outline: 3px solid rgba(240, 103, 184, 0.25);
  outline-offset: 2px;
}

.field-error {
  display: none;
  color: var(--late);
  font-size: 0.75rem;
  font-weight: 760;
}

.task-item.invalid-time .field-error {
  display: block;
}

.clear-time-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(138, 80, 196, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 245, 255, 0.92)),
    #fff;
  color: #5f3292;
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow: 0 9px 18px rgba(67, 42, 86, 0.055);
}

.editor-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -2px;
  padding-top: 18px;
  border-top: 1px solid rgba(138, 80, 196, 0.12);
}

.done-edit-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 136px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #9d5ee0, #7732bd);
  color: #fff;
  box-shadow: 0 14px 24px rgba(111, 53, 170, 0.26);
  font-size: 0.98rem;
  font-weight: 880;
}

.editor-actions > button {
  flex: 0 1 auto;
}

.done-edit-action .app-icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.7;
}

.done-edit-action:hover,
.done-edit-action:focus-visible {
  background: linear-gradient(180deg, #7e43ba, #612b9b);
  color: #fff;
  transform: translateY(-1px);
}

.task-delete-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(216, 76, 104, 0.74);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 249, 0.94)),
    #fff;
  color: #c93f5d;
  box-shadow: 0 10px 20px rgba(166, 56, 77, 0.08);
  font-size: 0.94rem;
  font-weight: 850;
}

.task-delete-action:hover,
.task-delete-action:focus-visible {
  border-color: #b93351;
  background: linear-gradient(180deg, #cc4967, #a6334c);
  color: #fff;
  transform: translateY(-1px);
}

.inline-add-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 66px;
  margin: 12px 0;
  padding: 8px 10px;
  border: 1px solid rgba(138, 80, 196, 0.17);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 249, 255, 0.94)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(67, 42, 86, 0.045);
}

.inline-add-marker {
  width: 22px;
  height: 22px;
  border: 1.6px solid rgba(138, 80, 196, 0.22);
  border-radius: 999px;
  background: #fff;
}

.inline-add-input {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 650;
  outline: 0;
}

.inline-add-input::placeholder {
  color: rgba(116, 107, 127, 0.68);
}

.inline-add-button {
  min-height: 44px;
  padding-inline: 18px;
  white-space: nowrap;
}

.clear-tasks-footer {
  display: flex;
  justify-content: center;
  padding: 15px 24px 16px;
  border-top: 1px solid rgba(216, 76, 104, 0.1);
  background:
    linear-gradient(90deg, rgba(255, 228, 236, 0.5), rgba(255, 244, 248, 0.78), rgba(255, 228, 236, 0.5)),
    rgba(255, 255, 255, 0.64);
}

.clear-tasks-footer[hidden] {
  display: none !important;
}

.clear-tasks-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #d63854;
  font-weight: 860;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.clear-tasks-button .app-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.clear-tasks-button:hover,
.clear-tasks-button:focus-visible {
  border-color: rgba(216, 76, 104, 0.22);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(166, 56, 77, 0.09);
  transform: translateY(-1px);
}

.empty-plan .inline-add-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 88px;
  padding: 14px 18px;
  border: 1px solid rgba(138, 80, 196, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 42px rgba(111, 53, 170, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.empty-plan .inline-add-marker {
  border-radius: 5px;
}

.empty-plan .inline-add-input {
  font-size: 1.08rem;
}

.empty-state {
  display: grid;
  gap: 28px;
  padding: 38px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: color 160ms ease;
}

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

.empty-state:hover,
.empty-state:focus-visible {
  outline: 0;
}

.empty-state:focus-visible {
  border-radius: 16px;
  box-shadow: 0 0 0 3px rgba(240, 103, 184, 0.18);
}

.empty-stack {
  display: none;
}

.empty-landing-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.empty-landing-copy h2 {
  max-width: 13ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.1rem, 6vw, 3.35rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0;
}

.empty-landing-copy p {
  margin: 14px 0 0;
  color: #766d82;
  font-size: 1.04rem;
  font-weight: 720;
}

.empty-greeting-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.empty-wave {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.88), transparent 44%),
    var(--brand-soft);
  box-shadow: 0 12px 30px rgba(138, 80, 196, 0.12);
  font-size: 1.72rem;
}

.empty-greeting-card strong,
.empty-greeting-card small {
  display: block;
}

.empty-greeting-card strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.empty-greeting-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.empty-add-shell {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 1px auto;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 14px 18px;
  border: 1px solid rgba(138, 80, 196, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 18px 42px rgba(111, 53, 170, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.empty-state:hover .empty-add-shell,
.empty-state:focus-visible .empty-add-shell {
  border-color: rgba(138, 80, 196, 0.38);
  box-shadow:
    0 22px 50px rgba(111, 53, 170, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.empty-add-check {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(138, 80, 196, 0.24);
  border-radius: 5px;
  background: #fff;
}

.empty-add-placeholder {
  color: #82778d;
  font-size: 1.02rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.empty-add-divider {
  height: 46px;
  background: rgba(138, 80, 196, 0.12);
}

.empty-add-button {
  min-width: 148px;
}

.modal {
  width: min(430px, calc(100vw - 28px));
  border: 1px solid rgba(138, 80, 196, 0.18);
  border-radius: 12px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.batch-modal {
  width: min(660px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(24, 19, 31, 0.22);
  backdrop-filter: blur(5px);
}

.modal form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.batch-modal form {
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal h2 {
  font-size: 1.25rem;
}

.modal-kicker {
  max-width: 45ch;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 690;
  line-height: 1.45;
}

.modal-actions {
  justify-content: flex-end;
}

.form-error {
  min-height: 18px;
  margin: -6px 0 0;
  color: var(--late);
  font-size: 0.8rem;
  font-weight: 760;
}

.form-error:empty {
  display: none;
}

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

.batch-list-section {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(138, 80, 196, 0.14);
  border-radius: var(--radius);
  background: var(--paper);
}

.batch-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.saved-cue {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.76rem;
  font-weight: 860;
}

.batch-list-header h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.batch-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 860;
}

.batch-list {
  display: grid;
  gap: 9px;
  max-height: 330px;
  overflow: auto;
}

.batch-task {
  display: grid;
  grid-template-columns: var(--target) 38px minmax(0, 1fr) auto var(--target);
  gap: 9px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(138, 80, 196, 0.13);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(67, 42, 86, 0.07);
}

.batch-task.dragging {
  opacity: 0.55;
}

.batch-drag-handle {
  display: grid;
  place-items: center;
  width: var(--target);
  height: var(--target);
  border: 0;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-strong);
  cursor: grab;
}

.batch-drag-handle:active {
  cursor: grabbing;
}

.batch-number {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.batch-task-title {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 820;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.batch-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.batch-move {
  min-height: var(--target);
  padding: 0 9px;
  font-size: 0.75rem;
}

.batch-delete {
  color: var(--late);
  font-size: 0.98rem;
}

.batch-empty {
  margin: 0;
  padding: 18px 10px;
  border: 1px dashed rgba(138, 80, 196, 0.24);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-weight: 720;
}

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

.undo-toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(138, 80, 196, 0.2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.compact-toast-button {
  min-height: var(--target);
  margin-left: auto;
}

@media (min-width: 761px) and (max-width: 920px) {
  .app-shell {
    width: min(720px, calc(100% - 36px));
    padding-top: 24px;
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 20px;
    padding-bottom: 28px;
    text-align: center;
  }

  .brand-block {
    justify-items: center;
  }

  .brand-mark {
    justify-content: center;
  }

  .tagline {
    max-width: 34ch;
  }

  .hero-meta {
    width: 100%;
    min-width: 0;
    justify-items: center;
  }

  .date-line {
    justify-content: center;
  }

  .greeting-row {
    justify-content: center;
  }

  .greeting-row h1 {
    text-align: center;
  }

  .toolbar {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
  }

  .toolbar h2 {
    font-size: clamp(1.55rem, 4vw, 2.05rem);
  }

  .toolbar-actions {
    justify-content: center;
    width: min(100%, 380px);
    margin-inline: auto;
  }

  .toolbar-actions > * {
    flex: 1 1 150px;
    max-width: 180px;
  }

  .task-list-panel {
    border-radius: 20px;
  }

  .progress-summary {
    padding: 18px 22px 16px;
  }

  .task-list {
    padding: 0 18px;
  }

  .task-row,
  .inline-add-row {
    min-height: 58px;
  }

  .task-details {
    justify-items: center;
    padding: 22px;
  }

  .task-details > * {
    width: min(100%, 560px);
  }

  .schedule-fields {
    grid-template-columns: 1fr;
  }

  .editor-actions {
    width: min(100%, 560px);
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(640px, calc(100% - 22px));
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
    padding-bottom: 22px;
    text-align: center;
  }

  .brand-block {
    justify-items: center;
  }

  .brand-mark {
    justify-content: center;
  }

  .tagline {
    max-width: 30ch;
  }

  .hero-meta,
  .greeting-row {
    width: 100%;
    min-width: 0;
    justify-items: center;
    justify-content: center;
  }

  .greeting-row h1 {
    text-align: center;
  }

  .workspace {
    padding-top: 4px;
  }

  .toolbar,
  .rollover-banner,
  .sync-banner {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .toolbar {
    align-items: center;
  }

  .toolbar h2 {
    font-size: clamp(1.34rem, 5vw, 1.72rem);
    max-width: 18ch;
    margin-inline: auto;
    line-height: 1.08;
  }

  .toolbar-actions {
    justify-content: center;
    width: min(100%, 380px);
    margin-inline: auto;
  }

  .toolbar-actions > * {
    flex: 1 1 150px;
    min-width: 0;
    max-width: 180px;
    width: auto;
  }

  .task-list-panel {
    border-radius: 18px;
  }

  .empty-plan .hero {
    padding-bottom: 20px;
  }

  .empty-state {
    gap: 22px;
    padding-top: 18px;
    text-align: center;
  }

  .empty-landing-copy {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
  }

  .empty-landing-copy h2 {
    max-width: 16ch;
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .empty-landing-copy p {
    max-width: 34ch;
    margin-inline: auto;
  }

  .empty-greeting-card {
    justify-content: center;
    min-width: 0;
  }

  .empty-add-shell {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 13px;
    min-height: 0;
    padding: 16px;
  }

  .empty-add-divider {
    display: none;
  }

  .empty-add-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 50px;
  }

  .task-list {
    padding: 0 12px;
  }

  .task-row,
  .inline-add-row {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    min-height: 60px;
    padding: 5px 0;
  }

  .inline-add-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
  }

  .inline-add-button {
    padding-inline: 14px;
  }

  .task-details {
    grid-template-columns: 1fr;
    margin-left: 0;
    padding: 17px;
  }

  .task-title-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    width: 100%;
    column-gap: 5px;
    row-gap: 5px;
  }

  .task-title-button {
    grid-column: 1;
  }

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

  .status-pill,
  .timer-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .schedule-fields {
    grid-template-columns: 1fr;
  }

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

  .chip-group-label {
    grid-column: 1 / -1;
    text-align: center;
  }

  .time-preset,
  .duration-chip {
    width: 100%;
    padding: 0 7px;
  }

  .batch-entry {
    grid-template-columns: 1fr;
  }

  .batch-entry .primary-button,
  .modal-actions > * {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .batch-list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-task {
    grid-template-columns: var(--target) 34px minmax(0, 1fr) var(--target);
  }

  .batch-task-title {
    grid-column: 3;
  }

  .batch-controls {
    grid-column: 3 / -1;
    justify-content: flex-start;
  }

  .batch-delete {
    grid-column: 4;
    grid-row: 1;
  }

  .editor-actions > button {
    flex: 1 1 128px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(640px, calc(100% - 14px));
    padding: 14px 0 30px;
  }

  .hero {
    gap: 16px;
  }

  .brand-mark {
    gap: 10px;
    font-size: 1.42rem;
  }

  .logo-stack,
  .empty-stack {
    width: 46px;
    height: 37px;
  }

  .logo-stack span,
  .empty-stack span {
    width: 36px;
    height: 21px;
    border-radius: 7px;
  }

  .logo-stack span:nth-child(1),
  .empty-stack span:nth-child(1) {
    left: 7px;
    top: 1px;
  }

  .logo-stack span:nth-child(2),
  .empty-stack span:nth-child(2) {
    left: 4px;
    top: 8px;
  }

  .logo-stack span:nth-child(3),
  .empty-stack span:nth-child(3) {
    top: 15px;
  }

  .tagline {
    max-width: 25ch;
    font-size: 0.9rem;
  }

  .date-line {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  #todayDate {
    flex: 1 1 100%;
  }

  .date-divider {
    display: none;
  }

  .clock-time {
    width: auto;
    min-width: 106px;
    font-size: 1rem;
    text-align: center;
  }

  .greeting-row {
    display: inline-grid;
    grid-template-columns: 40px minmax(0, auto);
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    gap: 10px;
    text-align: left;
  }

  .greeting-row > div {
    min-width: 0;
  }

  .greeting-row .eyebrow {
    text-align: left;
  }

  .greeting-row h1 {
    font-size: clamp(1.36rem, 6.2vw, 1.68rem);
    line-height: 1.08;
    text-align: left;
  }

  .toolbar {
    gap: 12px;
  }

  .toolbar h2 {
    max-width: 16ch;
  }

  .toolbar-actions {
    width: min(100%, 360px);
  }

  .toolbar-actions > * {
    max-width: none;
    min-height: 48px;
  }

  .empty-state {
    padding-top: 10px;
  }

  .empty-landing-copy h2 {
    max-width: 15ch;
    font-size: clamp(1.8rem, 9.2vw, 2.35rem);
    line-height: 1.02;
  }

  .empty-landing-copy p {
    font-size: 0.96rem;
  }

  .empty-wave {
    width: 50px;
    height: 50px;
    font-size: 1.45rem;
  }

  .empty-add-shell,
  .empty-plan .inline-add-row {
    padding: 14px;
  }

  .progress-summary {
    justify-items: center;
    padding: 17px 14px 15px;
    text-align: center;
  }

  .progress-topline {
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .progress-percent {
    width: 100%;
    font-size: 2.15rem;
    text-align: center;
  }

  .task-list {
    padding: 0 9px;
  }

  .task-row,
  .inline-add-row {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 5px;
    min-height: 64px;
  }

  .inline-add-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .inline-add-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
  }

  .done-toggle,
  .row-icon-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .task-title-area {
    gap: 6px;
  }

  .task-title-button {
    font-size: 1rem;
  }

  .status-pill,
  .timer-pill {
    font-size: 0.7rem;
  }

  .task-details {
    margin-bottom: 10px;
    padding: 14px 11px;
    border-radius: 12px;
  }

  .status-segment {
    gap: 4px;
    min-height: 40px;
    font-size: 0.72rem;
  }

  .schedule-panel {
    padding: 11px;
  }

  .schedule-column {
    padding: 9px;
  }

  .time-preset,
  .duration-chip {
    min-height: 34px;
    padding: 0 7px;
  }

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

  .time-stepper {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .time-display {
    font-size: 0.82rem;
  }

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

  .task-delete-action,
  .done-edit-action {
    width: 100%;
    min-width: 0;
    gap: 5px;
    padding: 0 8px;
    font-size: 0.88rem;
  }

  .undo-toast {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-toast-button {
    width: 100%;
    margin-left: 0;
  }

  .batch-modal {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .batch-modal form {
    height: 100vh;
    height: 100dvh;
    max-height: none;
    overflow: auto;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }

  .batch-list-section {
    min-height: 0;
  }

  .batch-list {
    max-height: none;
  }

  .batch-modal .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -16px calc(-16px - env(safe-area-inset-bottom));
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
  }
}

@media (max-width: 520px) {
  body {
    background:
      linear-gradient(180deg, rgba(138, 80, 196, 0.1), transparent 245px),
      linear-gradient(330deg, rgba(240, 103, 184, 0.1), transparent 38%),
      #fffafd;
  }

  .app-shell,
  .empty-plan .app-shell {
    width: 100%;
    padding: 16px max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 12px;
    padding: 0 0 16px;
    text-align: left;
  }

  .brand-block {
    justify-items: stretch;
    gap: 4px;
  }

  .brand-mark {
    justify-content: flex-start;
    gap: 10px;
    font-size: 1.48rem;
    line-height: 1;
  }

  .brand-mark > span:last-child {
    min-width: 0;
  }

  .logo-stack,
  .empty-stack {
    width: 45px;
    height: 36px;
  }

  .logo-stack span,
  .empty-stack span {
    width: 36px;
    height: 21px;
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(138, 80, 196, 0.22);
  }

  .logo-stack span:nth-child(1),
  .empty-stack span:nth-child(1) {
    left: 7px;
    top: 1px;
  }

  .logo-stack span:nth-child(2),
  .empty-stack span:nth-child(2) {
    left: 4px;
    top: 8px;
  }

  .logo-stack span:nth-child(3),
  .empty-stack span:nth-child(3) {
    top: 15px;
  }

  .tagline {
    max-width: none;
    margin-left: 55px;
    color: #6f647a;
    font-size: 0.83rem;
    font-weight: 760;
    line-height: 1.2;
    text-align: left;
  }

  .hero-meta {
    width: 100%;
    min-width: 0;
    justify-items: stretch;
  }

  .date-line {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px;
    border-color: rgba(138, 80, 196, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 10px 24px rgba(67, 42, 86, 0.05);
    font-size: 0.82rem;
    text-align: left;
  }

  #todayDate {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .date-divider {
    display: block;
    flex: 0 0 1px;
    height: 24px;
  }

  .clock-time {
    min-width: 88px;
    min-height: 34px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 0.9rem;
  }

  .workspace {
    gap: 10px;
    padding: 0;
  }

  .empty-plan .workspace {
    padding-top: 0;
  }

  .empty-plan .hero {
    padding-bottom: 12px;
  }

  .empty-plan .task-list-panel {
    overflow: visible;
  }

  .empty-state {
    gap: 14px;
    padding-top: 0;
    text-align: left;
  }

  .empty-landing-copy {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(138, 80, 196, 0.13);
    border-radius: 24px;
    background:
      linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(251, 246, 255, 0.88)),
      rgba(255, 255, 255, 0.92);
    box-shadow:
      0 20px 48px rgba(67, 42, 86, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.86);
  }

  .empty-landing-copy h2 {
    max-width: none;
    color: #1b1424;
    font-size: clamp(1.86rem, 9.4vw, 2.28rem);
    line-height: 1.01;
  }

  .empty-landing-copy p {
    max-width: 28ch;
    margin: 10px 0 0;
    color: #71667c;
    font-size: 0.94rem;
    font-weight: 740;
    line-height: 1.3;
  }

  .empty-greeting-card {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(138, 80, 196, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
  }

  .empty-wave {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }

  .empty-greeting-card strong {
    font-size: 0.94rem;
  }

  .empty-greeting-card small {
    font-size: 0.74rem;
  }

  .empty-add-shell {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 13px;
    border-color: rgba(138, 80, 196, 0.17);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
      0 16px 36px rgba(111, 53, 170, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .empty-add-check {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .empty-add-placeholder {
    align-self: center;
    color: #776c82;
    font-size: 0.94rem;
    line-height: 1.24;
    text-align: left;
  }

  .empty-add-divider {
    display: none;
  }

  .empty-add-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    border-radius: 13px;
    font-size: 1rem;
  }

  .capturing-first-task .empty-state {
    padding-bottom: 2px;
  }

  .empty-plan .inline-add-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    margin: 12px 0 0;
    padding: 13px;
    border-radius: 20px;
  }

  .empty-plan .inline-add-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    border-radius: 13px;
  }

  .task-list-panel {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow:
      0 18px 48px rgba(67, 42, 86, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.88);
  }

  .progress-summary {
    justify-items: stretch;
    gap: 9px;
    padding: 14px;
    text-align: left;
  }

  .progress-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .progress-kicker {
    font-size: 0.68rem;
  }

  .progress-meta {
    margin-top: 2px;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .progress-percent {
    width: auto;
    font-size: 1.7rem;
    text-align: right;
  }

  .progress-track {
    height: 9px;
  }

  .task-list {
    padding: 0 12px;
  }

  .task-row,
  .inline-add-row {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 6px;
    min-height: 62px;
    padding: 7px 0;
  }

  .done-toggle,
  .row-icon-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .task-title-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    column-gap: 5px;
    row-gap: 6px;
  }

  .task-title-button {
    font-size: 1.01rem;
    line-height: 1.18;
  }

  .edit-task {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .status-pill,
  .timer-pill {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 0.68rem;
  }

  .timer-pill {
    min-height: 28px;
    white-space: normal;
  }

  .inline-add-row {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 0;
    margin: 10px 0 12px;
    padding: 12px;
    border-radius: 18px;
  }

  .inline-add-input {
    min-height: 34px;
    font-size: 1rem;
  }

  .inline-add-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    border-radius: 13px;
  }

  .clear-tasks-footer {
    padding: 12px;
  }

  .clear-tasks-button {
    width: 100%;
    min-height: 46px;
    border-color: rgba(216, 76, 104, 0.14);
    background: rgba(255, 255, 255, 0.54);
  }

  .task-details {
    margin: 0 0 12px;
    padding: 13px;
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(250, 244, 255, 0.96), rgba(255, 250, 253, 0.94)),
      #fff;
  }

  .status-segments {
    grid-template-columns: 1fr;
  }

  .status-segment {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 13px;
    font-size: 0.78rem;
  }

  .schedule-panel {
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .schedule-fields {
    gap: 10px;
  }

  .schedule-column {
    gap: 10px;
    padding: 11px;
    border-radius: 15px;
  }

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

  .editor-actions {
    grid-template-columns: 1fr;
  }

  .task-delete-action,
  .done-edit-action {
    min-height: 46px;
    font-size: 0.92rem;
  }
}

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