@font-face {
  font-family: "Archivo Black";
  src: url("assets/fonts/archivo-black.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #111111;
  --night: #3a2d62;
  --canvas: #fff1e8;
  --paper: #fffdf4;
  --card: #dce6ff;
  --white: #ffffff;
  --sun: #ffd400;
  --mint: #daf5f0;
  --sage: #b5d2ad;
  --butter: #fdfd96;
  --peach: #f8d6b3;
  --lilac-pale: #e3dff2;
  --aqua-light: #a7dbd8;
  --green-light: #bafca2;
  --gold: #ffdb58;
  --salmon: #ffa07a;
  --pink-pale: #ffc0cb;
  --lilac: #c4a1ff;
  --sky: #87ceeb;
  --green: #90ee90;
  --lemon: #f4d738;
  --coral: #ff7a5c;
  --pink: #ffb2ef;
  --purple: #a388ee;
  --cyan: #69d2e7;
  --rose: #ff6b6b;
  --hot-pink: #ff69b4;
  --violet: #9723c9;
  --display: "Archivo Black", "Arial Black", "Helvetica Neue", sans-serif;
  --body: "Space Grotesk", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --page-pad: clamp(18px, 3.4vw, 40px);
  --border: 3px solid var(--ink);
  --hard-shadow: 6px 6px 0 var(--ink);
}

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

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--ink) transparent;
  scrollbar-width: thin;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.4;
  background-color: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

body.has-overlay {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
}

svg {
  display: block;
}

::selection {
  color: var(--ink);
  background: var(--pink);
}

:where(button, input, a, [tabindex]):focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 12px 16px;
  border: var(--border);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.app {
  width: 100%;
  max-width: 1120px;
  min-height: 100dvh;
  margin-inline: auto;
  padding: var(--page-pad) var(--page-pad) 210px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
}

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

.brand__mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}

.brand__mark svg {
  width: 34px;
  height: 34px;
}

.brand__name {
  font-family: var(--display);
  font-size: clamp(20px, 2.2vw, 27px);
  letter-spacing: 0.015em;
  line-height: 1;
}

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

.sync-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
  perspective: 520px;
  user-select: none;
}

.clock-digit {
  position: relative;
  display: block;
  width: 56px;
  height: 70px;
}

.clock-digit__static,
.clock-digit__flap {
  position: absolute;
  right: 0;
  left: 0;
  height: calc(50% - 0.5px);
  overflow: hidden;
  border: 2px solid var(--ink);
  border-bottom-width: 0;
  color: var(--sun);
  font-family: var(--display);
  font-size: 42px;
  line-height: 1;
}

.clock-digit__static--top,
.clock-digit__flap--top {
  top: 0;
  border-radius: 9px 9px 0 0;
  background: #49305d;
  box-shadow: 3px 3px 0 var(--ink);
}

.clock-digit__static--bottom {
  z-index: 3;
  bottom: 0;
  border-top-width: 0;
  border-radius: 0 0 9px 9px;
  background: #352448;
  box-shadow: 3px 3px 0 var(--ink);
}

.clock-digit__flap--top {
  z-index: 2;
  transform-origin: 50% 100%;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.clock-digit__number {
  position: absolute;
  left: 0;
  display: flex;
  width: 100%;
  height: 200%;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.045em;
}

.clock-digit__static--top .clock-digit__number,
.clock-digit__flap--top .clock-digit__number {
  top: 0;
}

.clock-digit__static--bottom .clock-digit__number {
  top: -100%;
}

.clock-sep {
  width: 8px;
  height: 44px;
  flex: 0 0 auto;
  margin-inline: 2px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--coral);
  box-shadow: 2px 2px 0 var(--ink);
}

.clock__suffix {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 0 9px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--night);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--sun);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.main {
  width: 100%;
}

.view {
  width: 100%;
}

.view:not([hidden]) {
  animation: view-in 190ms ease-out both;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-transform: uppercase;
}

.greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: clamp(16px, 2.2vh, 28px);
}

.greeting__copy {
  min-width: 0;
}

.greeting h1 {
  max-width: 820px;
  margin: 14px 0 20px;
  font-family: var(--display);
  font-size: clamp(54px, 8.4vw, 98px);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.9;
  text-wrap: balance;
}

.greeting h1.date-heading {
  display: flex;
  max-width: 100%;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.18em;
  margin: 0 0 20px;
  font-size: clamp(46px, 6vw, 74px);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.date-heading > span {
  white-space: nowrap;
}

.date-heading__sep {
  width: 0.15em;
  height: 0.15em;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.55;
  transform: translateY(-0.08em);
}

.mark {
  display: inline-block;
  margin-top: 0.08em;
  padding: 0 0.09em 0.03em;
  border: 4px solid var(--ink);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--ink);
  color: var(--ink);
  line-height: 0.98;
  transform: rotate(-1.2deg);
}

.mark--lilac {
  background: var(--lilac);
}

.greeting__sub {
  max-width: 580px;
  margin: 0;
  color: #2e2b20;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 500;
  line-height: 1.35;
}

.sticker {
  width: clamp(128px, 16vw, 178px);
  flex: 0 0 auto;
  margin: 0 16px 10px 0;
  transform: rotate(4deg);
  filter: drop-shadow(6px 7px 0 var(--ink));
}

.sticker svg {
  width: 100%;
  height: auto;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: var(--border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 110ms ease, box-shadow 110ms ease, background-color 110ms ease;
}

.button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.button--ink {
  background: var(--night);
  color: var(--paper);
}

.button--danger {
  border-color: var(--ink);
  background: var(--rose);
  color: var(--ink);
}

.button--ghost-danger {
  min-height: 46px;
  padding-inline: 16px;
  background: var(--rose);
  font-size: 14px;
}

.button--wide {
  min-width: 246px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  box-shadow: none;
  transform: none;
}

.round-button {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: var(--border);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 110ms ease, box-shadow 110ms ease;
}

.round-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.6;
}

.next-card {
  --cat: var(--sky);
  --flash-base: 10px 10px 0 var(--ink);
  color: var(--cat-ink, var(--ink));
  position: relative;
  margin-top: clamp(28px, 4vh, 44px);
  padding: clamp(22px, 3vw, 34px);
  border: 4px solid var(--ink);
  border-radius: 28px;
  background: var(--cat);
  box-shadow: 10px 10px 0 var(--ink);
  transition: background-color 200ms ease;
}

.next-card.is-completing {
  animation: task-card-poof 240ms cubic-bezier(0.65, 0, 0.8, 0.6) both;
  pointer-events: none;
}

.next-card.is-clear {
  --cat: var(--green-light);
}

.next-card.is-overdue {
  border-color: #a5340f;
  background: #ffd9c5;
  box-shadow: 10px 10px 0 #c2410c;
}

.next-card.is-overdue .tag {
  border-color: #7c2d12;
  background: #d9480f;
  color: var(--paper);
}

.next-card.is-overdue .next-card__relative {
  color: #7c2d12;
}

.next-card__top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.next-card .tag {
  transform: none;
}

.next-card__headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 22px;
  margin: 22px 0 16px;
}

.tag {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  padding: 4px 12px;
  border: var(--border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  transform: rotate(-1deg);
}

.tag--paper {
  background: var(--paper);
}

.next-card__time {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 7px;
  margin-left: auto;
  padding: 0 2px 4px;
  border-bottom: 4px solid currentColor;
  color: inherit;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1;
}

.next-card__time::before {
  content: "DUE";
  font-family: var(--body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  opacity: 0.7;
}

.next-card.is-clear .next-card__time {
  border-bottom-color: transparent;
}

.next-card.is-clear .next-card__time::before {
  content: none;
}

.next-card__title {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.next-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.category-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 3px 11px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.next-card__relative {
  font-size: 15px;
  font-weight: 700;
}

.next-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-top: 30px;
}

.progress {
  width: min(580px, 100%);
}

.progress__copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.progress__copy strong {
  font-size: 14px;
  letter-spacing: 0;
}

.progress__track {
  height: 16px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
  transition: width 360ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.next-card__done {
  min-height: 52px;
  flex: 0 0 auto;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tasks-section {
  margin-top: clamp(38px, 5vh, 58px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: clamp(36px, 4.4vw, 50px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.section-head .button {
  flex: 0 0 auto;
}

.section-head__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-row {
  display: flex;
  gap: 9px;
  margin-top: 22px;
  padding: 2px 4px 8px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: var(--border);
  border-radius: 999px;
  background: var(--cat, var(--paper));
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--cat-ink, var(--ink));
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease, transform 110ms ease, box-shadow 110ms ease;
}

.filter__count {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.filter[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
}

.filter[aria-pressed="true"] .filter__count {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 18px;
}

.task-card {
  --cat: var(--sky);
  display: grid;
  min-height: 96px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 15px 17px;
  border: var(--border);
  border-radius: 19px;
  background: var(--card);
  box-shadow: 5px 5px 0 var(--ink);
  animation: task-in 180ms ease-out both;
}

.task-card.is-overdue {
  border-color: #c2410c;
  background: #fff0e5;
  box-shadow: 6px 6px 0 #d9480f;
}

.task-card.is-overdue .task-time.is-overdue {
  border-color: #7c2d12;
  background: #d9480f;
  color: var(--paper);
}

.task-check {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: var(--border);
  border-radius: 50%;
  background: var(--cat);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--cat-ink, var(--ink));
  cursor: pointer;
  transition: transform 110ms ease, box-shadow 110ms ease, background-color 120ms ease;
}

.task-check svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
  opacity: 1;
  transition: opacity 120ms ease;
}

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

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

.task-cat {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 2px 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--cat);
  color: var(--cat-ink, var(--ink));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.task-repeat,
.task-date {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.task-repeat {
  background: var(--mint);
}

.task-date {
  border-color: #7c2d12;
  background: #d9480f;
  color: var(--paper);
}

.task-main h3 {
  margin: 7px 0 0;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.task-time {
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
}

.task-time.is-overdue {
  padding: 5px 7px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--rose);
}

.task-edit {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.task-edit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.task-card.is-done,
.task-card.is-completing {
  background: var(--lilac-pale);
  box-shadow: 3px 3px 0 var(--ink);
}

.task-card.is-done .task-check,
.task-card.is-completing .task-check {
  background: var(--night);
  color: var(--paper);
}

.task-card.is-done .task-check svg,
.task-card.is-completing .task-check svg {
  opacity: 1;
}

.task-card.is-done .task-main h3,
.task-card.is-completing .task-main h3 {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.68;
}

.task-card.is-done .task-time,
.task-card.is-completing .task-time {
  opacity: 0.55;
}

.task-card.is-fresh {
  animation: task-done-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.task-card.is-completing {
  animation: task-card-poof 240ms cubic-bezier(0.65, 0, 0.8, 0.6) both;
  pointer-events: none;
}

.task-card.is-completing .task-check svg {
  animation: check-stamp 200ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

@keyframes task-done-in {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.94);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes check-stamp {
  0% {
    opacity: 0;
    transform: scale(0.65);
  }
  60% {
    opacity: 1;
    transform: scale(1.12);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes task-card-poof {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: blur(0);
    box-shadow: 5px 5px 0 var(--ink);
  }
  38% {
    opacity: 0.88;
    transform: translateY(-3px) scale(0.97) rotate(-0.5deg);
    filter: blur(1px);
    box-shadow:
      5px 5px 0 var(--ink),
      0 0 0 7px rgba(210, 220, 228, 0.42),
      0 0 22px 10px rgba(220, 229, 236, 0.56);
  }
  72% {
    opacity: 0.48;
    transform: translateY(-8px) scale(0.93) rotate(0.5deg);
    filter: blur(3px);
    box-shadow:
      3px 3px 0 var(--ink),
      0 0 0 14px rgba(210, 220, 228, 0.3),
      0 0 30px 16px rgba(220, 229, 236, 0.42);
  }
  100% {
    opacity: 0;
    transform: translateY(-13px) scale(0.9) rotate(1deg);
    filter: blur(6px);
    box-shadow:
      2px 2px 0 var(--ink),
      0 0 0 20px rgba(210, 220, 228, 0.12),
      0 0 36px 22px rgba(220, 229, 236, 0.2);
  }
}

.done-group {
  margin-top: 30px;
}

.done-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.done-head > .done-head__count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
}

.done-head__line {
  height: 3px;
  flex: 1;
  background: var(--ink);
}

.empty-state {
  display: flex;
  min-height: 226px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 30px 24px;
  border: var(--border);
  border-radius: 20px;
  background: var(--mint);
  box-shadow: 5px 5px 0 var(--ink);
  text-align: center;
}

.empty-state__art {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  margin-bottom: 4px;
  border: var(--border);
  border-radius: 16px;
  background: var(--butter);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--display);
  font-size: 31px;
  line-height: 1;
  transform: none;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.empty-state p {
  max-width: 460px;
  margin: 0;
  font-size: 15px;
}

.empty-state .button {
  margin-top: 8px;
}

.empty-state--compact {
  min-height: 148px;
  padding: 20px;
}

.empty-state--compact .empty-state__art {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 23px;
}

.empty-state--compact h3 {
  font-size: 22px;
}

@keyframes task-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Upcoming */

.page-heading {
  margin-top: clamp(34px, 4.6vh, 58px);
}

.page-heading h1 {
  max-width: 900px;
  margin: 12px 0 16px;
  font-family: var(--display);
  font-size: clamp(52px, 7.5vw, 88px);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.9;
  text-wrap: balance;
}

.page-heading h1 .mark {
  margin-top: 0.1em;
}

.page-heading__sub {
  max-width: 620px;
  margin: 0;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 500;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  margin-top: clamp(28px, 3.4vh, 40px);
}

.day-tile {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  border: var(--border);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--body);
  cursor: pointer;
  transition: transform 110ms ease, box-shadow 110ms ease, background-color 110ms ease, color 110ms ease;
}

.day-tile__name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.day-tile__num {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.day-tile__count {
  min-height: 18px;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0.65;
}

.day-tile__count:empty::before {
  content: "·";
}

.day-tile[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}

.day-tile[aria-pressed="true"] .day-tile__count {
  opacity: 1;
}

.section-head--upcoming {
  margin-top: clamp(32px, 4vh, 46px);
}

.section-sub {
  margin: 7px 0 0;
  color: #312d21;
  font-size: 15px;
  font-weight: 500;
}

.section-head--upcoming .eyebrow {
  margin-bottom: 4px;
}

.section-head--compact {
  align-items: center;
}

.count-pill {
  display: grid;
  min-width: 48px;
  height: 42px;
  place-items: center;
  padding: 0 12px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--display);
  font-size: 19px;
  line-height: 1;
}

/* Groceries */

.grocery-sheet {
  margin-top: clamp(28px, 3.8vh, 42px);
  padding: clamp(18px, 2.6vw, 28px);
  border: 4px solid var(--ink);
  border-radius: 26px;
  background: #dcebe1;
  box-shadow: 9px 9px 0 var(--ink);
}

.grocery-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.grocery-toolbar h2 {
  margin: 5px 0 0;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.grocery-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.grocery-list .empty-state {
  margin-top: 0;
}

.grocery-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: var(--border);
  border-radius: 15px;
  background: var(--grocery-color, #daf5f0);
  color: var(--grocery-ink, var(--ink));
  box-shadow: 3px 3px 0 var(--ink);
  animation: task-in 180ms ease-out both;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.grocery-item.is-checked {
  background: #f3e8ff;
  box-shadow: 2px 2px 0 var(--ink);
}

.grocery-check {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: var(--border);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  transition: transform 110ms ease, box-shadow 110ms ease, background-color 120ms ease;
}

.grocery-check svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
  opacity: 1;
  transition: opacity 120ms ease;
}

.grocery-check[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
}

.grocery-check[aria-pressed="true"] svg {
  opacity: 1;
}

.grocery-name {
  min-width: 0;
  padding: 6px 3px;
  border: 0;
  background: transparent;
  color: var(--grocery-ink, var(--ink));
  font-family: var(--body);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.grocery-name:focus,
.grocery-name:focus-visible {
  outline: none;
}

.grocery-item.is-checked .grocery-name {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.62;
}


.grocery-remove {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0 0 3px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
  font-family: var(--display);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.grocery-done {
  margin-top: 27px;
}

.grocery-done__head {
  align-items: center;
}

.grocery-done__head .button {
  min-height: 38px;
  margin-left: 4px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
}

.grocery-list--done {
  margin-top: 0;
}

.grocery-note {
  margin: 18px 2px 0;
  color: #5a5447;
  font-size: 14px;
  font-weight: 500;
}

/* Overdue */

.overdue-group {
  margin-top: 24px;
  padding: 16px;
  border: 3px dashed #c2410c;
  border-radius: 20px;
  background: #fff4ec;
}

.overdue-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 4px;
}

.overdue-head h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(23px, 2.7vw, 31px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.overdue-count {
  display: grid;
  min-width: 29px;
  height: 29px;
  place-items: center;
  padding: 0 6px;
  border: 2px solid #7c2d12;
  border-radius: 999px;
  background: #d9480f;
  color: var(--paper);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.task-list--overdue {
  margin-top: 14px;
}

/* Recurrence controls */

.repeat-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.repeat-choice {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease, transform 110ms ease, box-shadow 110ms ease;
}

.repeat-choice[aria-pressed="true"],
.repeat-unit[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
}

.repeat-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 2px dashed var(--ink);
  border-radius: 15px;
  background: var(--mint);
}

.repeat-custom__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.repeat-stepper {
  display: inline-flex;
  overflow: hidden;
  align-items: center;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.repeat-stepper__button {
  display: grid;
  width: 42px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.repeat-stepper strong {
  display: grid;
  min-width: 47px;
  height: 40px;
  place-items: center;
  border-right: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.repeat-units {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.repeat-unit {
  min-height: 40px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease, transform 110ms ease, box-shadow 110ms ease;
}

.repeat-hint {
  margin: 10px 0 0;
  color: #4b463a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

@media (hover: hover) {
  .repeat-choice:hover,
  .repeat-unit:hover,
  .grocery-check:hover,
  .grocery-remove:hover {
    box-shadow: 4px 4px 0 var(--ink);
    transform: translate(-1px, -1px);
  }

  .grocery-item:hover {
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 var(--ink);
  }

  .grocery-name:hover {
    text-decoration: none;
  }
}

/* Floating navigation */

.bottom-nav {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 40;
  display: grid;
  width: min(960px, calc(100% - var(--page-pad) - var(--page-pad)));
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 104px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 4px solid var(--ink);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
  transform: translateX(-50%);
}

.nav-button {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 140px;
  min-width: 0;
  min-height: 68px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 4px;
  padding: 6px 2px;
  border: 3px solid transparent;
  border-radius: 15px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.nav-button svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.nav-button.is-active {
  border-color: var(--ink);
  background: var(--sun);
  box-shadow: 3px 3px 0 var(--ink);
}

.nav-badge {
  position: absolute;
  top: 3px;
  right: 7px;
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.nav-add {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  justify-self: center;
  padding: 0 0 6px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display);
  font-size: 46px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-22px);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

/* Overlay, sheet and form controls */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 17, 17, 0.58);
}

.overlay--center {
  align-items: center;
}

.overlay__scrim {
  position: absolute;
  inset: 0;
}

.sheet {
  position: relative;
  z-index: 1;
  width: min(970px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px clamp(20px, 3.2vw, 34px) 26px;
  border: 4px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 11px 11px 0 var(--ink);
  animation: sheet-in 200ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.sheet__head h2 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 37px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.reminder-input {
  width: 100%;
  min-height: 82px;
  padding: 17px 20px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(23px, 2.8vw, 31px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.reminder-input::placeholder {
  color: #858071;
  opacity: 1;
}

.reminder-input:focus {
  outline: none;
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(2px, 2px);
}

.field-group {
  min-inline-size: 0;
  margin: 25px 0 0;
  padding: 0;
  border: 0;
}

.field-group legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.category-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice-chip {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 14px;
  border: var(--border);
  border-radius: 999px;
  background: var(--cat, var(--paper));
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--cat-ink, var(--ink));
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 110ms ease, color 110ms ease, transform 110ms ease, box-shadow 110ms ease;
}

.choice-chip[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
}

.date-choices {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.date-choice {
  display: flex;
  min-height: 65px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  border: var(--border);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--body);
  cursor: pointer;
}

.date-choice__name {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.date-choice__num {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.date-choice[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
}

.when-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 11px;
}

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

.mini-field > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mini-field input {
  width: 100%;
  min-height: 51px;
  padding: 0 11px;
  border: var(--border);
  border-radius: 11px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
  color-scheme: light;
}

.mini-field input::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.picker-trigger {
  display: flex;
  width: 100%;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 11px;
  border: var(--border);
  border-radius: 11px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

.picker-trigger svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.picker-trigger[aria-expanded="true"] {
  background: var(--sun);
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(2px, 2px);
}

.picker-panel {
  margin-top: 12px;
  padding: 16px;
  border: var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  animation: picker-in 160ms ease-out both;
}

@keyframes picker-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.picker-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.picker-panel__head strong {
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.picker-nav {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: var(--border);
  border-radius: 10px;
  background: var(--pink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.picker-nav--next {
  background: var(--sky);
}

.picker-nav:disabled {
  opacity: 0.28;
  box-shadow: none;
  cursor: not-allowed;
}

.picker-panel--date {
  height: 430px;
}

.picker-panel--date .calendar-grid {
  min-height: 300px;
  grid-template-rows: repeat(6, minmax(0, 1fr));
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekdays {
  margin-top: 15px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-align: center;
  opacity: 0.82;
}

.calendar-grid {
  margin-top: 8px;
}

.calendar-day {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

.calendar-day.is-weekend {
  background: var(--butter);
}

.calendar-day.is-today {
  background: var(--sun);
}

.calendar-day[aria-pressed="true"] {
  background: var(--night);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--paper);
}

.calendar-day:disabled {
  border-color: #c7beb4;
  background: transparent;
  box-shadow: none;
  color: #b9afa4;
  cursor: not-allowed;
}

.picker-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.picker-link {
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.picker-done {
  min-height: 44px;
  padding: 0 17px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--night);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.time-picker__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.time-picker__head strong {
  display: block;
  margin-top: 3px;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.time-picker__hint {
  max-width: 180px;
  padding-bottom: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  opacity: 0.58;
}

.time-picker__label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.time-dial {
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-inline: auto;
}

.time-dial__col {
  min-width: 0;
}

.time-dial__colon {
  display: grid;
  height: 220px;
  place-items: center;
  align-self: end;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  opacity: 0.42;
}

.time-wheel-wrap {
  position: relative;
  min-width: 0;
}

.time-wheel {
  height: 220px;
  overflow-y: auto;
  padding-block: 85px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.time-wheel::-webkit-scrollbar {
  display: none;
}

.time-wheel__band {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 10px;
  left: 10px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--sun);
  box-shadow: 2px 2px 0 var(--ink);
  pointer-events: none;
  transform: translateY(-50%);
}

.time-wheel__item {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 44px;
  text-align: center;
  opacity: 0.32;
  cursor: pointer;
  scroll-snap-align: center;
  transition: opacity 120ms ease;
}

.time-wheel__item[aria-pressed="true"] {
  opacity: 1;
}

.time-meridiem {
  display: flex;
  height: 220px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.meridiem-option {
  min-width: 58px;
  min-height: 46px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

.meridiem-option[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
}

.time-presets {
  display: flex;
  flex: 1 1 300px;
  flex-wrap: wrap;
  gap: 7px;
}

.preset {
  min-height: 51px;
  padding: 0 11px;
  border: var(--border);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.preset[aria-pressed="true"] {
  background: var(--night);
  color: var(--paper);
}

.keyboard-box {
  margin-top: 24px;
  padding: 13px;
  border: var(--border);
  border-radius: 19px;
  background: var(--lilac-pale);
  box-shadow: 4px 4px 0 var(--ink);
}

.keyboard-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.keyboard-box__head span:last-child {
  opacity: 0.58;
}

.keyboard {
  user-select: none;
}

.key-row {
  display: flex;
  gap: 7px;
}

.key-row + .key-row {
  margin-top: 7px;
}

.key {
  display: grid;
  min-width: 0;
  min-height: 49px;
  flex: 1;
  place-items: center;
  padding: 0 3px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--body);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 70ms ease, box-shadow 70ms ease, background-color 70ms ease;
}

.key:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.key--shift {
  flex: 1.4;
  background: var(--butter);
  font-size: 16px;
}

.key--shift.is-active {
  background: var(--sun);
}

.key--backspace {
  flex: 1.4;
  background: var(--peach);
  font-size: 21px;
}

.key--mode {
  flex: 1.25;
  background: var(--lilac);
  font-size: 13px;
}

.key--space {
  flex: 5.1;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sheet__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 23px;
}

.sheet__spacer {
  flex: 1;
}

/* Settings */

.settings-panel,
.history-panel {
  position: relative;
  z-index: 1;
  width: min(690px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: 24px clamp(20px, 3vw, 30px) 26px;
  border: 4px solid var(--ink);
  border-radius: 27px;
  background: var(--paper);
  box-shadow: 11px 11px 0 var(--ink);
  animation: sheet-in 200ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.history-panel {
  width: min(760px, 100%);
}

.history-filters {
  margin-top: 4px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 22px;
}

.history-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.history-group__head > span:last-child {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
}

.history-group__line {
  height: 3px;
  flex: 1;
  background: var(--ink);
}

.history-group .task-list {
  margin-top: 0;
}

.settings-list {
  overflow: hidden;
  border: var(--border);
  border-radius: 17px;
  box-shadow: 4px 4px 0 var(--ink);
}

.category-settings {
  margin-top: 17px;
  padding: 16px;
  border: var(--border);
  border-radius: 17px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

.category-settings__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.category-settings__head h3 {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.category-settings__head .button {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 13px;
  font-size: 13px;
}

.category-settings__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.category-setting {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}

.category-setting__color {
  width: 42px;
  height: 42px;
  padding: 0;
  border: var(--border);
  border-radius: 9px;
  background: var(--swatch);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
}

.category-setting__color[aria-expanded="true"] {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.category-setting__name {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
}

.category-setting__name.is-invalid {
  border-color: var(--rose);
  box-shadow: inset 0 0 0 1px var(--rose);
}

.category-setting__remove {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--peach);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.category-setting__remove:disabled {
  cursor: not-allowed;
  opacity: 0.34;
  box-shadow: none;
}

.category-color-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 2px 0 3px 50px;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--mint);
  box-shadow: 2px 2px 0 var(--ink);
}

.category-color-panel__swatches {
  display: grid;
  grid-template-columns: repeat(6, 26px);
  gap: 6px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--swatch);
  box-shadow: 1px 1px 0 var(--ink);
  cursor: pointer;
}

.color-swatch.is-selected {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.custom-color {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-color input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--paper);
  cursor: pointer;
}

.custom-color input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 3px;
}

.category-settings__note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.64;
}

.sessions-settings {
  margin-top: 17px;
  padding: 16px;
  border: var(--border);
  border-radius: 17px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

.sessions-settings__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.sessions-settings__head h3 {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.sessions-settings__head .button {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 13px;
  font-size: 13px;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
}

.session-row__copy {
  min-width: 0;
}

.session-row__copy strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.session-row__copy small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.68;
}

.session-row__revoke {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--peach);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.session-row__revoke:disabled {
  cursor: wait;
  opacity: 0.45;
  box-shadow: none;
}

.sessions-state {
  margin: 0;
  padding: 8px 2px;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.7;
}

.sessions-state--error {
  opacity: 1;
}

.sessions-retry {
  min-height: 32px;
  margin-left: 4px;
  padding: 0 9px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--sun);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.session-row__revoke:focus-visible,
.sessions-retry:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

.sessions-settings__note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.64;
}

.category-setting__color:focus-visible,
.category-setting__name:focus-visible,
.category-setting__remove:focus-visible,
.color-swatch:focus-visible,
.custom-color input[type="color"]:focus-visible,
.category-settings__head .button:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

.setting-row {
  display: flex;
  width: 100%;
  min-height: 91px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 0;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
}

.setting-row + .setting-row {
  border-top: var(--border);
}

.setting-row__copy {
  display: block;
  min-width: 0;
}

.setting-row__copy strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.setting-row__copy small {
  display: block;
  max-width: 420px;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.72;
}

.switch {
  position: relative;
  width: 62px;
  height: 35px;
  flex: 0 0 auto;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--white);
  transition: background-color 120ms ease;
}

.switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  transition: transform 140ms ease, background-color 140ms ease;
}

.setting-row[aria-checked="true"] .switch {
  background: var(--green-light);
}

.setting-row[aria-checked="true"] .switch span {
  background: var(--paper);
  transform: translateX(26px);
}

.palette-card {
  margin-top: 17px;
  padding: 16px;
  border: var(--border);
  border-radius: 17px;
  background: var(--mint);
  box-shadow: 4px 4px 0 var(--ink);
}

.palette-card__swatches {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px;
  margin: 11px 0 9px;
}

.palette-card__swatches span {
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--swatch);
}

.palette-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.settings-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 17px;
  padding: 16px;
  border: var(--border);
  border-radius: 17px;
  background: var(--peach);
  box-shadow: 4px 4px 0 var(--ink);
}

.settings-danger strong {
  display: block;
  font-size: 15px;
}

.settings-danger p {
  max-width: 380px;
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.settings-note {
  margin: 20px 0 0;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.65;
}

/* Login */

.login-body {
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
}

.login-shell {
  width: min(470px, 100%);
}

.login-card {
  padding: clamp(26px, 5vw, 38px);
  border: 4px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.login-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}

.login-mark svg {
  width: 34px;
  height: 34px;
}

.login-brand__name {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.015em;
  line-height: 1;
}

.login-title {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.login-lede {
  max-width: 340px;
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.45;
  opacity: 0.72;
}

.login-form {
  margin-top: 26px;
}

.login-field {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.login-input {
  width: 100%;
  height: 62px;
  margin-top: 8px;
  padding: 0 15px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--body);
  font-size: 20px;
  font-weight: 500;
}

.login-input:disabled {
  opacity: 0.56;
}

.login-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--rose);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.login-submit {
  width: 100%;
  min-height: 60px;
  margin-top: 18px;
  font-size: 18px;
}

.login-note {
  margin: 22px 0 0;
  padding-top: 15px;
  border-top: 2px dashed var(--ink);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.68;
}

/* Toast */

.toast {
  position: fixed;
  bottom: 160px;
  left: 50%;
  z-index: 100;
  display: flex;
  max-width: min(620px, calc(100% - 36px));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px 13px 18px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #800020;
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  transform: translateX(-50%);
  animation: toast-in 170ms ease-out both;
}

.toast button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--sun);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Interaction niceties only on pointer devices */

@media (hover: hover) {
  .button:hover:not(:disabled) {
    box-shadow: 5px 5px 0 var(--ink);
    transform: translate(-1px, -1px);
  }

  .button:active:not(:disabled) {
    box-shadow: none;
    transform: translate(4px, 4px);
  }

  .round-button:hover,
  .task-edit:hover,
  .filter:hover,
  .choice-chip:hover,
  .date-choice:hover,
  .preset:hover,
  .day-tile:hover {
    box-shadow: 5px 5px 0 var(--ink);
    transform: translate(-1px, -1px);
  }

  .round-button:active,
  .task-edit:active,
  .filter:active,
  .choice-chip:active,
  .date-choice:active,
  .preset:active,
  .day-tile:active {
    box-shadow: none;
    transform: translate(3px, 3px);
  }

  .task-check:hover {
    box-shadow: 4px 4px 0 var(--ink);
    transform: translate(-1px, -1px);
  }

  .nav-button:hover:not(.is-active) {
    background: var(--mint);
  }

  .nav-add:hover {
    box-shadow: 6px 6px 0 var(--ink);
    transform: translate(-1px, -24px);
  }

  .nav-add:active {
    box-shadow: none;
    transform: translate(3px, -18px);
  }

  .task-card:hover {
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 var(--ink);
  }

  .task-card.is-overdue:hover {
    transform: translate(-1px, -1px);
    box-shadow: 7px 7px 0 #d9480f;
  }
}

/* Responsive */

@media (max-width: 920px) {
  .sticker {
    width: 132px;
    margin-right: 2px;
  }

  .task-card {
    gap: 13px;
  }
}

@media (max-width: 780px) {
  .app {
    padding-bottom: 190px;
  }

  .sticker {
    display: none;
  }

  .greeting {
    margin-top: 32px;
  }

  .greeting h1 {
    font-size: clamp(49px, 9.4vw, 70px);
  }

  .next-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .next-card__done {
    align-self: flex-start;
  }

  .bottom-nav {
    width: calc(100% - 20px);
    padding: 8px 8px;
    border-width: 3px;
    border-radius: 21px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .nav-button {
    min-height: 60px;
    gap: 3px;
    font-size: 11px;
  }

  .nav-button svg {
    width: 22px;
    height: 22px;
  }

  .nav-badge {
    top: 2px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    font-size: 8px;
  }

  .nav-add {
    width: 70px;
    height: 70px;
    font-size: 37px;
    transform: translateY(-17px);
  }

  .toast {
    bottom: 126px;
  }

  .week-strip {
    display: flex;
    overflow-x: auto;
    padding: 2px 3px 7px 2px;
    scrollbar-width: none;
  }

  .week-strip::-webkit-scrollbar {
    display: none;
  }

  .day-tile {
    min-width: 83px;
    flex: 1 0 83px;
    min-height: 96px;
  }

}

@media (max-width: 660px) {
  .app {
    padding-bottom: 174px;
  }

  .topbar {
    gap: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .brand__mark svg {
    width: 28px;
    height: 28px;
  }

  .brand__name {
    font-size: 18px;
  }

  .topbar__tools {
    gap: 8px;
  }

  .clock {
    gap: 4px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    font-size: 19px;
  }

  .clock-digit {
    width: 43px;
    height: 56px;
  }

  .clock-digit__static,
  .clock-digit__flap {
    border-radius: 7px 7px 0 0;
    font-size: 34px;
  }

  .clock-digit__static--bottom {
    border-radius: 0 0 7px 7px;
  }

  .clock-sep {
    width: 6px;
    height: 32px;
  }

  .clock__suffix {
    min-height: 30px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .greeting h1 {
    margin-top: 10px;
  }

  .greeting__sub {
    font-size: 16px;
  }

  .next-card {
    --flash-base: 6px 6px 0 var(--ink);
    padding: 20px;
    border-width: 3px;
    border-radius: 22px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .next-card__time {
    font-size: 22px;
  }

  .next-card__time::before {
    font-size: 9px;
  }

  .next-card__headline {
    margin-top: 20px;
  }

  .progress__copy {
    font-size: 11px;
  }

  .progress__copy strong {
    font-size: 12px;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head .button {
    min-height: 48px;
    padding-inline: 13px;
    font-size: 14px;
  }

  .section-head__actions {
    justify-content: flex-end;
  }

  .task-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 11px;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .task-check {
    width: 47px;
    height: 47px;
  }

  .task-check svg {
    width: 23px;
    height: 23px;
  }

  .task-main h3 {
    font-size: 18px;
  }

  .task-time {
    font-size: 19px;
  }

  .overlay {
    padding: 0;
  }

  .sheet,
  .settings-panel,
  .history-panel {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    padding: 19px 16px 22px;
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sheet__head h2 {
    font-size: 27px;
  }

  .round-button {
    width: 46px;
    height: 46px;
  }

  .reminder-input {
    min-height: 70px;
    padding: 14px 15px;
    font-size: 23px;
    border-width: 3px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .date-choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .date-choice {
    min-height: 58px;
  }

  .when-row {
    gap: 8px;
  }

  .mini-field {
    flex: 1 1 140px;
  }

  .time-presets {
    flex-basis: 100%;
  }

  .preset {
    flex: 1 1 auto;
  }

  .keyboard-box {
    margin-top: 18px;
  }

  .picker-panel {
    padding: 13px;
  }

  .picker-panel--date {
    height: 396px;
  }

  .picker-panel--date .calendar-grid {
    min-height: 262px;
  }

  .picker-panel__head strong {
    font-size: 20px;
  }

  .calendar-day {
    min-height: 42px;
    font-size: 14px;
  }

  .time-picker__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .time-picker__hint {
    max-width: none;
    padding-bottom: 0;
    text-align: left;
  }

  .sheet__actions {
    flex-wrap: wrap;
    margin-top: 18px;
  }

  .button--wide {
    min-width: 0;
    flex: 1;
  }

  .settings-panel,
  .history-panel {
    max-width: none;
    overflow-y: auto;
  }

  .settings-panel .sheet__head {
    margin-bottom: 16px;
  }

  .settings-list {
    border-width: 3px;
  }

  .setting-row {
    padding: 14px;
  }

  .setting-row__copy small {
    font-size: 12px;
  }

  .palette-card__swatches {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

  .settings-danger .button {
    width: 100%;
  }

  .sessions-settings {
    padding: 13px;
  }

  .sessions-settings__head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .sessions-settings__head .button {
    width: 100%;
  }

  .session-row {
    align-items: stretch;
    flex-direction: column;
  }

  .session-row__revoke {
    width: 100%;
  }

  .login-body {
    padding: 16px;
  }

  .login-card {
    padding: 22px 18px 24px;
    border-width: 3px;
    border-radius: 22px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .login-brand {
    margin-bottom: 24px;
  }

  .login-title {
    font-size: 40px;
  }

  .login-input {
    height: 58px;
    font-size: 18px;
  }

  .login-submit {
    min-height: 56px;
  }

  .bottom-nav {
    bottom: max(9px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 88px minmax(0, 1fr) minmax(0, 1fr);
    gap: 5px;
    padding: 7px 5px;
  }

  .nav-add {
    width: 64px;
    height: 64px;
    font-size: 33px;
  }

  .toast {
    bottom: 119px;
    padding: 11px 12px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  .brand__name {
    display: none;
  }

  .greeting h1 {
    font-size: 49px;
  }

  .next-card__title {
    font-size: 29px;
  }

  .section-head h2 {
    font-size: 34px;
  }

  .filter {
    min-height: 43px;
    padding-inline: 11px;
    font-size: 13px;
  }

  .task-card {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 9px;
    padding: 10px;
  }

  .task-check {
    width: 42px;
    height: 42px;
  }

  .task-time {
    align-self: center;
    padding-top: 0;
    font-size: 17px;
  }

  .task-edit {
    display: grid;
    width: 36px;
    height: 36px;
  }

  .task-edit svg {
    width: 16px;
    height: 16px;
  }

  .nav-button {
    font-size: 10px;
  }

  .nav-button svg {
    width: 20px;
    height: 20px;
  }

  .nav-add {
    width: 58px;
    height: 58px;
    font-size: 30px;
  }
}

/* Short landscape fallback: keep the floating dock from swallowing the hero. */

@media (min-width: 781px) and (max-height: 700px) {
  .app {
    padding-bottom: 104px;
  }

  .topbar {
    min-height: 44px;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }

  .brand__name {
    font-size: 21px;
  }

  .clock-digit {
    width: 45px;
    height: 58px;
  }

  .clock-digit__static,
  .clock-digit__flap {
    font-size: 36px;
  }

  .greeting {
    margin-top: 18px;
  }

  .greeting h1 {
    margin: 9px 0 12px;
    font-size: clamp(48px, 6.3vw, 62px);
  }

  .greeting__sub {
    font-size: 16px;
  }

  .sticker {
    width: 98px;
    margin-bottom: 0;
  }

  .next-card {
    margin-top: 18px;
    padding: 20px 24px 22px;
  }

  .next-card__headline {
    margin: 15px 0 11px;
  }

  .next-card__title {
    font-size: clamp(29px, 3.6vw, 38px);
  }

  .next-card__footer {
    margin-top: 17px;
  }

  .tasks-section {
    margin-top: 32px;
  }

  .bottom-nav {
    bottom: max(9px, env(safe-area-inset-bottom));
    width: min(860px, calc(100% - 24px));
    gap: 5px;
    padding: 5px 8px;
    border-width: 3px;
    border-radius: 19px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .nav-button {
    min-height: 46px;
    flex-direction: row;
    gap: 7px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .nav-button svg {
    width: 20px;
    height: 20px;
  }

  .nav-add {
    width: 58px;
    height: 58px;
    border-width: 3px;
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 30px;
    transform: translateY(-10px);
  }

  .toast {
    bottom: 98px;
  }
}

@media (max-width: 360px) {
  .next-card__headline {
    flex-wrap: wrap;
  }

  .next-card__title {
    flex-basis: 100%;
  }

  .nav-button {
    gap: 2px;
    font-size: 9px;
  }

  .nav-button svg {
    width: 18px;
    height: 18px;
  }

  .nav-badge {
    top: 0;
    right: 0;
  }
}

@media (max-width: 660px) {
  .overdue-group {
    padding: 12px;
    border-width: 2px;
    border-radius: 16px;
  }

  .overdue-head {
    align-items: flex-start;
  }

  .overdue-sub {
    flex-basis: 100%;
  }

  .grocery-sheet {
    padding: 18px;
    border-width: 3px;
    border-radius: 22px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .grocery-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .grocery-toolbar .button {
    width: 100%;
  }

  .grocery-item {
    gap: 9px;
    padding: 9px 10px;
  }

  .grocery-check {
    width: 47px;
    height: 47px;
  }

  .grocery-remove {
    width: 38px;
    height: 38px;
  }

  .grocery-done__head {
    align-items: center;
  }

  .repeat-custom {
    align-items: stretch;
  }

  .repeat-stepper {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .repeat-units {
    flex-basis: 100%;
  }
}

@media (max-width: 430px) {
  .grocery-done__head {
    flex-wrap: wrap;
  }

  .grocery-done__head .done-head__line {
    display: none;
  }

  .grocery-done__head .button {
    flex: 1 1 auto;
  }

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

  .repeat-choice {
    padding-inline: 6px;
  }
}

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