/* ==========================================================================
   Moss — gentle plant care
   Mobile-first. Warm paper, ink, moss, terracotta. No frameworks, no assets.
   Shape language: "leaf-nib" corners (one tight corner, three generous ones),
   arch-topped bars, pot silhouettes, and a hand-cut paper grain.
   ========================================================================== */

:root {
  /* --- palette ------------------------------------------------------- */
  --paper:        #f2e7d6;
  --paper-hi:     #fbf5e8;
  --card:         #fffaef;
  --ink:          #1e2a20;
  --ink-2:        #47534a;
  --ink-3:        #6d7a6b;
  --line:         rgba(30, 42, 32, .16);
  --line-soft:    rgba(30, 42, 32, .09);
  --moss:         #3f6b32;
  --moss-hi:      #5a8a44;
  --moss-deep:    #2c4a22;
  --clay:         #b2562f;
  --clay-deep:    #8b4222;
  --ochre:        #a8730f;
  --ochre-hi:     #d69a2a;
  --blush:        #c9607a;
  --cream:        #fdf8ec;

  /* --- shape --------------------------------------------------------- */
  --r-nib:  28px 28px 28px 10px;
  --r-nib-r: 10px 28px 28px 28px;
  --r-chip: 999px 999px 999px 5px;
  --r-pill: 999px;
  --r-arch: 16px 16px 7px 7px;

  /* --- depth --------------------------------------------------------- */
  --lift-1: 0 1px 0 rgba(255,255,255,.7) inset, 0 6px 14px -10px rgba(74, 52, 30, .45);
  --lift-2: 0 1px 0 rgba(255,255,255,.75) inset, 0 16px 30px -18px rgba(74, 52, 30, .5);
  --press:  0 3px 0;
  --paper-shadow: 0 2px 0 rgba(255,255,255,.6) inset, 0 10px 24px -16px rgba(74, 52, 30, .5);

  /* --- motion -------------------------------------------------------- */
  --dur: 220ms;
  --dur-slow: 420ms;
  --spring: cubic-bezier(.34, 1.36, .48, 1);
  --ease: cubic-bezier(.32, .72, .3, 1);

  --focus: var(--clay-deep);
  --maxw: 1160px;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--paper);
  /* soft vertical warmth, like light falling down a room */
  background-image:
    radial-gradient(120% 60% at 82% -8%, rgba(214, 154, 42, .20), transparent 60%),
    radial-gradient(90% 46% at 6% 4%, rgba(90, 138, 68, .16), transparent 62%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.06rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paper grain — a data-uri so it stays local */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .3;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='.42'/></svg>");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: rgba(30, 42, 32, .07);
  border-radius: 5px;
  padding: .1em .38em;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: .5rem;
  translate: -50% -180%;
  z-index: 80;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-weight: 650;
  padding: .7rem 1.1rem;
  border-radius: var(--r-chip);
  box-shadow: var(--lift-2);
  transition: translate var(--dur) var(--ease);
}
.skip-link:focus-visible { translate: -50% 0; }

.noscript {
  margin: 1rem;
  padding: 1rem 1.2rem;
  background: var(--card);
  border-radius: var(--r-nib);
  box-shadow: var(--paper-shadow);
}

/* ==========================================================================
   Buttons — pill keys with a pressable bottom edge
   ========================================================================== */

.btn {
  --btn-bg: var(--moss);
  --btn-edge: var(--moss-deep);
  --btn-fg: #f6f4e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .58rem 1.05rem;
  font: inherit;
  font-weight: 640;
  font-size: .95rem;
  line-height: 1.1;
  letter-spacing: .005em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 0;
  border-radius: var(--r-chip);
  box-shadow: 0 3px 0 var(--btn-edge), var(--lift-1);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--btn-edge), var(--lift-1);
}
.btn .art { width: 1.1em; height: 1.1em; flex: none; }

.btn--primary { --btn-bg: var(--moss); --btn-edge: var(--moss-deep); }
.btn--primary:hover { --btn-bg: #487a38; }

.btn--clay { --btn-bg: var(--clay); --btn-edge: var(--clay-deep); }
.btn--clay:hover { --btn-bg: #c05f36; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-edge: var(--line);
  --btn-fg: var(--ink-2);
  background: rgba(255, 253, 246, .7);
  box-shadow: 0 3px 0 rgba(30, 42, 32, .12), var(--lift-1);
}
.btn--ghost:hover { --btn-fg: var(--ink); background: var(--card); }

.btn--quiet {
  --btn-bg: transparent;
  --btn-edge: transparent;
  --btn-fg: var(--ink-3);
  background: none;
  box-shadow: none;
  padding-inline: .8rem;
  font-weight: 600;
}
.btn--quiet:hover { --btn-fg: var(--ink); background: rgba(30, 42, 32, .06); transform: none; }
.btn--quiet:active { transform: none; box-shadow: none; }
.btn--quiet .art { transition: rotate var(--dur) var(--spring); }
.btn--quiet[aria-expanded="true"] .art { rotate: 180deg; }
.btn--quiet[aria-expanded="true"] { --btn-fg: var(--ink); }

.btn--block { width: 100%; margin-top: .9rem; }

.btn__undo {
  --btn-bg: var(--cream);
  --btn-edge: rgba(30, 42, 32, .3);
  --btn-fg: var(--ink);
  min-height: 38px;
  padding: .38rem .9rem;
  font-size: .9rem;
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.masthead {
  padding: 1.15rem clamp(1rem, 4vw, 2.4rem) .35rem;
  max-width: var(--maxw);
  margin-inline: auto;
}
.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  flex: none;
  background: var(--card);
  border-radius: 56% 44% 52% 48% / 48% 56% 44% 52%;
  box-shadow: var(--paper-shadow);
  rotate: -4deg;
}
.brand__mark .art { width: 34px; height: 34px; }
.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand__tag {
  display: block;
  font-size: .78rem;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: .22rem;
}

.masthead__status {
  font-size: .9rem;
  font-weight: 620;
  color: var(--ink-2);
  background: rgba(255, 250, 239, .8);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-chip);
  padding: .45rem .9rem;
  box-shadow: 0 2px 0 rgba(30, 42, 32, .06);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.masthead__status::before {
  content: "";
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px rgba(178, 86, 47, .18);
}
.masthead__status[data-tone="calm"]::before { background: var(--moss-hi); box-shadow: 0 0 0 3px rgba(90, 138, 68, .2); }
.masthead__status[data-tone="clear"]::before { background: var(--ochre-hi); box-shadow: 0 0 0 3px rgba(214, 154, 42, .22); }

/* ==========================================================================
   Shell / layout
   ========================================================================== */

.shell {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 clamp(1rem, 4vw, 2.4rem) 2.5rem;
  display: grid;
  gap: 1.4rem;
  align-content: start;
}

.card {
  background: var(--card);
  border-radius: var(--r-nib);
  box-shadow: var(--paper-shadow);
  position: relative;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .9rem;
  flex-wrap: wrap;
}
.section-head__title {
  font-size: clamp(1.35rem, 1.2rem + .8vw, 1.7rem);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.section-head__title::after {
  content: "";
  display: block;
  width: 2.4rem; height: 6px;
  background: var(--ochre-hi);
  border-radius: var(--r-pill);
  rotate: -1.5deg;
  margin-top: .35rem;
}
.section-head__meta {
  font-size: .9rem;
  font-weight: 620;
  color: var(--ink-3);
}

/* ==========================================================================
   Hero + weekly rhythm
   ========================================================================== */

.hero {
  display: grid;
  gap: 1.2rem;
  padding-top: .4rem;
}
.hero__title {
  font-size: clamp(1.75rem, 1.35rem + 2.4vw, 2.6rem);
  max-width: 20ch;
}
.hero__sub {
  margin-top: .5rem;
  color: var(--ink-2);
  max-width: 46ch;
  font-size: 1.02rem;
}
.hero__title.is-cheer { animation: cheer var(--dur-slow) var(--spring); }

.rhythm {
  display: grid;
  gap: 1rem;
  padding: 1.05rem 1.1rem 1rem;
  rotate: -.4deg;
}
.rhythm__title { font-size: 1.1rem; }
.rhythm__sub {
  font-size: .82rem;
  color: var(--ink-3);
  margin-top: .18rem;
}

.rhythm__bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: clamp(.35rem, 1.6vw, .7rem);
  height: 118px;
}
.rhythm__bars li {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  gap: .3rem;
  height: 100%;
}
.bar {
  width: 100%;
  max-width: 2.3rem;
  height: var(--h, 20%);
  align-self: end;
  background: linear-gradient(180deg, var(--moss-hi), var(--moss));
  border-radius: var(--r-arch);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .28);
  transform-origin: 50% 100%;
  animation: sway 6s var(--ease) infinite;
  position: relative;
}
.bar::before {
  content: "";
  position: absolute;
  inset: auto 0 -3px;
  height: 3px;
  background: rgba(44, 74, 34, .22);
  border-radius: var(--r-pill);
}
.rhythm__bars li:nth-child(2) .bar,
.rhythm__bars li:nth-child(5) .bar { animation-delay: -1.4s; }
.rhythm__bars li:nth-child(3) .bar { animation-delay: -2.8s; }
.rhythm__bars li:nth-child(4) .bar { animation-delay: -4.1s; }
.rhythm__bars li:nth-child(6) .bar { animation-delay: -2.1s; }
.rhythm__bars li:nth-child(7) .bar { animation-delay: -3.4s; }

.rhythm__bars li[data-today] .bar {
  background: linear-gradient(180deg, var(--ochre-hi), var(--ochre));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 0 0 3px rgba(168, 115, 15, .2);
}
.bar__n {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-3);
  line-height: 1;
}
.rhythm__bars li[data-today] .bar__n { color: var(--ochre); }
.bar__day {
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rhythm__bars li[data-today] .bar__day { color: var(--ink); }
.rhythm__bars li[data-today] .bar__day::after {
  content: "";
  display: block;
  width: 5px; height: 5px;
  margin: .22rem auto 0;
  border-radius: 50%;
  background: var(--ochre);
}

/* ==========================================================================
   Queue cards
   ========================================================================== */

.queue { display: grid; gap: 1rem; }

.plant { position: relative; }

.plant__card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: .5rem 1rem;
  align-items: start;
  background: var(--card);
  border-radius: var(--r-nib);
  box-shadow: var(--paper-shadow);
  padding: 1.05rem 1.1rem 1.1rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              opacity var(--dur-slow) var(--ease);
}
/* status spine on the left edge */
.plant__card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--tone, var(--ink-3));
  border-radius: 0 4px 4px 0;
}
.plant[data-state="overdue"] { --tone: var(--clay); }
.plant[data-state="today"]   { --tone: var(--ochre); }
.plant[data-state="soon"]    { --tone: var(--moss-hi); }
.plant[data-state="snoozed"] { --tone: #b9a58a; }
.plant[data-state="done"]    { --tone: var(--moss); }

.plant[data-state="overdue"] .plant__card { rotate: -.5deg; }
.plant[data-state="today"] .plant__card { rotate: .4deg; }

.plant__avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px; height: 68px;
  border-radius: 50% 50% 46% 54% / 42% 44% 56% 58%;
  background: var(--blob, var(--paper-hi));
  box-shadow: inset 0 0 0 1px var(--line-soft);
  --art-leaf: var(--leaf, var(--moss));
  --art-leaf-hi: var(--leaf-hi, var(--moss-hi));
  --art-leaf-dark: var(--leaf-dark, var(--moss-deep));
  animation: sway 7s var(--ease) infinite;
}
.plant__avatar .art {
  width: 52px; height: 52px;
  position: relative;
  z-index: 1;
  rotate: -2deg;
}
.plant[data-plant="pothos"]   .plant__avatar { --blob: #f6e7c8; --art-pot: #c07b3a; --art-pot-dark: #96581f; }
.plant[data-plant="cactus"]   .plant__avatar { --blob: #e7efdc; --art-pot: #a8563a; --art-pot-dark: #7d3b24; }
.plant[data-plant="calathea"] .plant__avatar { --blob: #e4eef1; --art-pot: #4f7f96; --art-pot-dark: #376070; }
.plant[data-plant="fern"]      .plant__avatar { --blob: #eaf0dd; --art-pot: #b2562f; --art-pot-dark: #8b4222; }

.plant__pill {
  position: absolute;
  right: -.35rem; bottom: -.3rem;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  background: var(--card);
  color: var(--tone-ink, var(--ink-2));
  font-size: .72rem;
  font-weight: 700;
  padding: .22rem .5rem;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 0 rgba(30, 42, 32, .1), 0 6px 12px -8px rgba(74, 52, 30, .5);
  z-index: 2;
}
.plant__pill .art { width: .95em; height: .95em; }
.plant[data-state="overdue"] .plant__pill { --tone-ink: var(--clay-deep); }
.plant[data-state="today"] .plant__pill { --tone-ink: #7d5406; }
.plant[data-state="done"] .plant__pill { --tone-ink: var(--moss-deep); }
.plant[data-state="snoozed"] .plant__pill { --tone-ink: #7a6a56; }

.plant__name {
  font-size: 1.28rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .45rem;
}
.plant__species {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-3);
}
.plant__meta {
  margin-top: .2rem;
  font-size: .88rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
}
.plant__task {
  font-weight: 700;
  color: var(--ink);
  background: rgba(30, 42, 32, .07);
  border-radius: 6px;
  padding: .05rem .4rem;
}
.plant__dot { color: var(--ink-3); }

.plant__due {
  margin-top: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .92rem;
  font-weight: 680;
  color: var(--clay-deep);
}
.plant[data-state="today"] .plant__due { color: #7d5406; }
.plant[data-state="soon"] .plant__due { color: var(--moss-deep); }
.plant[data-state="snoozed"] .plant__due { color: #7a6a56; }
.plant[data-state="done"] .plant__due { color: var(--moss-deep); }
.plant__due .art { width: 1.05em; height: 1.05em; flex: none; }
.plant__due--overdue {
  position: relative;
  white-space: nowrap;
}
.plant__due--overdue::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -.28rem;
  height: 6px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='6' viewBox='0 0 120 6' preserveAspectRatio='none'><path d='M1 4.4c9-3.4 15 1.6 24-.6s15 2 24-.4 15 1.8 24-.5 15 1.6 24-.4 15 1.4 22-.4' fill='none' stroke='%23b2562f' stroke-width='1.7' stroke-linecap='round' opacity='.55'/></svg>") no-repeat center / 100% 100%;
  pointer-events: none;
}

.plant__actions {
  margin-top: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.plant[data-state="done"] .plant__card { background: linear-gradient(180deg, #fdfbf1, #f6f2e2); }
.plant[data-state="done"] .plant__name { color: var(--ink-2); }
.plant[data-state="snoozed"] .plant__card {
  background: repeating-linear-gradient(135deg, rgba(255,250,239,.94) 0 10px, rgba(246,240,227,.94) 10px 20px);
}
.plant.is-leaving { opacity: 0; transform: translateY(-6px) scale(.99); }
.plant.is-settling .plant__card { animation: pop var(--dur-slow) var(--spring); }
.plant.is-settling .plant__avatar { animation: hop var(--dur-slow) var(--spring) 2; }

.plant__undo-note {
  margin-top: .55rem;
  font-size: .82rem;
  color: var(--ink-3);
}

/* ==========================================================================
   Detail panel
   ========================================================================== */

.plant__detail {
  margin: .5rem 0 0 .8rem;
  padding: 1rem 1.05rem 1.1rem;
  background: linear-gradient(180deg, var(--paper-hi), #f6efdf);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--tone, var(--moss-hi));
  border-radius: var(--r-nib-r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
  animation: unroll var(--dur-slow) var(--ease);
}
@keyframes unroll {
  from { opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 92% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
.detail__grid { display: grid; gap: 1.05rem; }
.detail__block h4 {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.detail__block h4 .art { width: 1.05em; height: 1.05em; color: var(--ochre); }

.meter { display: flex; align-items: center; gap: .35rem; }
.meter__pip {
  width: 15px; height: 22px;
  border-radius: 8px 8px 3px 3px;
  background: rgba(30, 42, 32, .1);
  box-shadow: inset 0 0 0 1px rgba(30, 42, 32, .07);
  transition: background-color var(--dur) var(--ease);
}
.meter__pip[data-on] { background: var(--ochre-hi); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.meter__val {
  margin-left: .4rem;
  font-size: .88rem;
  font-weight: 650;
  color: var(--ink-2);
}

.history { display: grid; gap: .42rem; }
.history li {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-size: .9rem;
  color: var(--ink-2);
}
.history li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50% 40% 50% 40%;
  background: var(--moss-hi);
  translate: 0 -1px;
}
.history li[data-fresh] { color: var(--ink); font-weight: 640; }
.history li[data-fresh]::before { background: var(--clay); }
.history li time { color: var(--ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }

.detail__note {
  font-size: .92rem;
  color: var(--ink-2);
  font-style: italic;
  border-left: 3px solid var(--ochre-hi);
  padding-left: .7rem;
}

/* ==========================================================================
   All-done state
   ========================================================================== */

.alldone {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: .4rem 1.1rem;
  align-items: center;
  background: linear-gradient(160deg, #fdf6e4, #f3ecd6);
  border-radius: var(--r-nib);
  box-shadow: var(--paper-shadow);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  animation: pop var(--dur-slow) var(--spring);
}
.alldone__art {
  display: grid;
  place-items: center;
  width: 74px; height: 78px;
  border-radius: 52% 48% 44% 56% / 48% 52% 48% 52%;
  background: var(--cream);
  box-shadow: var(--paper-shadow);
  --art-blossom: var(--ochre-hi);
  --art-blossom-deep: var(--ochre);
  --art-pot: var(--moss);
  animation: spin-slow 9s linear infinite;
}
.alldone__art .art { width: 58px; height: 58px; }
.alldone__title { font-size: 1.3rem; }
.alldone__text { margin-top: .25rem; color: var(--ink-2); font-size: .95rem; }
.alldone__list {
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.alldone__list li {
  font-size: .8rem;
  font-weight: 650;
  color: var(--moss-deep);
  background: rgba(90, 138, 68, .16);
  border-radius: var(--r-pill);
  padding: .22rem .6rem;
}
@keyframes pop {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes spin-slow { to { rotate: 360deg; } }

/* little leaves drifting in the all-done panel */
.alldone__leaves { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.alldone__leaves span {
  position: absolute;
  top: -14px;
  width: 11px; height: 7px;
  background: var(--moss-hi);
  border-radius: 50% 0 50% 0;
  opacity: .55;
  animation: drift 3.4s var(--ease) infinite;
}
.alldone__leaves span:nth-child(1) { left: 8%;  animation-delay: 0s; }
.alldone__leaves span:nth-child(2) { left: 26%; animation-delay: .7s; background: var(--ochre-hi); }
.alldone__leaves span:nth-child(3) { left: 48%; animation-delay: 1.4s; }
.alldone__leaves span:nth-child(4) { left: 70%; animation-delay: 2.1s; background: var(--clay); }
.alldone__leaves span:nth-child(5) { left: 88%; animation-delay: 2.8s; }
@keyframes drift {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  15%  { opacity: .6; }
  100% { transform: translateY(120px) rotate(200deg); opacity: 0; }
}

/* ==========================================================================
   Rail
   ========================================================================== */

.rail { display: grid; gap: 1rem; align-content: start; }
.rail__card { padding: 1.05rem 1.1rem 1.15rem; }
.rail__title {
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .8rem;
}
.rail__icon {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 58% 42% 52% 48%;
  background: rgba(214, 154, 42, .18);
  color: var(--ochre);
  flex: none;
}
.rail__icon .art { width: 15px; height: 15px; }

.lightmap { display: grid; gap: .7rem; }
.lightmap li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: .1rem .65rem;
}
.lightmap__art { display: grid; place-items: center; width: 30px; height: 30px; }
.lightmap__art .art { width: 26px; height: 26px; }
.lightmap__name { font-size: .92rem; font-weight: 660; line-height: 1.15; }
.lightmap__where { font-size: .76rem; color: var(--ink-3); }
.lightmap .meter { grid-column: 2 / -1; }
.lightmap .meter__pip { width: 11px; height: 15px; }

.note { background: linear-gradient(165deg, #fdf7e8, #f4ecda); rotate: .5deg; }
.note__text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.42;
  color: var(--ink);
}
.note__sign {
  margin-top: .7rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.note__mascot { display: grid; place-items: center; width: 30px; height: 30px; }
.note__mascot .art { width: 28px; height: 28px; }

.legend__list { display: grid; gap: .42rem; font-size: .87rem; color: var(--ink-2); }
.legend__list li { display: flex; align-items: center; gap: .55rem; }
.swatch {
  width: 16px; height: 16px;
  flex: none;
  border-radius: 6px 6px 6px 2px;
  background: var(--sw, var(--ink-3));
  box-shadow: inset 0 0 0 1px rgba(30, 42, 32, .1);
}
.swatch--overdue { --sw: var(--clay); }
.swatch--today   { --sw: var(--ochre); }
.swatch--soon    { --sw: var(--moss-hi); }
.swatch--snoozed { --sw: #b9a58a; }
.swatch--done    { --sw: var(--moss); }

/* ==========================================================================
   Toasts
   ========================================================================== */

.toasts {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 70;
  display: grid;
  gap: .55rem;
  width: min(30rem, calc(100vw - 1.5rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: .8rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-chip);
  padding: .7rem .8rem .7rem 1rem;
  box-shadow: 0 14px 34px -14px rgba(30, 42, 32, .8);
  position: relative;
  overflow: hidden;
  animation: toast-in var(--dur-slow) var(--spring);
}
.toast.is-going { animation: toast-out 200ms var(--ease) forwards; }
.toast__text { font-size: .92rem; font-weight: 560; }
.toast__text strong { font-weight: 720; }
.toast__art { display: grid; place-items: center; width: 26px; height: 26px; flex: none; color: var(--moss-hi); }
.toast__art .art { width: 22px; height: 22px; }
.toast__undo-wrap { margin-left: auto; }
.toast__timer {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  background: var(--ochre-hi);
  animation: shrink 7s linear forwards;
}
.toast--undoing .toast__timer { animation: grow .3s var(--ease) forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes grow  { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes toast-in  { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }

/* watering droplets */
.splash { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.splash span {
  position: absolute;
  top: 46%;
  width: 8px; height: 8px;
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  background: #7fc4e8;
  opacity: 0;
  animation: splash 620ms var(--ease) forwards;
}
@keyframes splash {
  0%   { opacity: 0; transform: translate(0, 0) scale(.4); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -34px)) scale(1.1); }
}

/* ==========================================================================
   Mascot behaviour
   ========================================================================== */

.mascot-eye { transform-origin: center; animation: blink 5.5s var(--ease) infinite; }
@keyframes blink { 0%, 92%, 100% { scale: 1 1; } 95% { scale: 1 .12; } }

.is-celebrating .brand__mark { animation: hop var(--dur-slow) var(--spring); }
.is-celebrating .mascot-eye { animation: happy 700ms var(--ease) 2; }
.is-celebrating .brand__mark .art { rotate: -6deg; }
@keyframes happy { 0%, 100% { scale: 1 1; } 50% { scale: 1.2 1.2; } }
@keyframes hop {
  0%   { transform: translateY(0) rotate(0); }
  30%  { transform: translateY(-7px) rotate(-7deg); }
  60%  { transform: translateY(0) rotate(3deg); }
  80%  { transform: translateY(-3px) rotate(0); }
  100% { transform: translateY(0) rotate(0); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-1.6deg); }
  50%      { transform: rotate(1.6deg); }
}

/* ==========================================================================
   Colophon
   ========================================================================== */

.colophon {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 clamp(1rem, 4vw, 2.4rem) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.2rem;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--ink-3);
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}

/* ==========================================================================
   Desktop — a real composition, not a wider phone column
   ========================================================================== */

@media (min-width: 46rem) {
  .plant__card {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 1.15rem 1.3rem 1.2rem;
  }
  .plant__avatar { width: 76px; height: 84px; }
  .plant__avatar .art { width: 64px; height: 64px; }
  .plant__name { font-size: 1.4rem; }
  .rhythm { grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); align-items: center; padding: 1.1rem 1.3rem; }
  .rhythm__bars { height: 104px; }
  .alldone { grid-template-columns: 84px minmax(0, 1fr); padding: 1.25rem 1.4rem; }
  .alldone__art { width: 84px; height: 88px; }
  .alldone__art .art { width: 66px; height: 66px; }
  .detail__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
  .detail__block--note { grid-column: 1 / -1; }
}

@media (min-width: 62rem) {
  .masthead { padding-top: 1.6rem; }
  .shell {
    grid-template-columns: minmax(0, 1fr) clamp(17rem, 25vw, 21rem);
    grid-template-areas:
      "hero   hero"
      "queue  rail";
    column-gap: 1.6rem;
    row-gap: 1.5rem;
  }
  .hero { grid-area: hero; }
  .queue-wrap { grid-area: queue; }
  .rail {
    grid-area: rail;
    position: sticky;
    top: 1.1rem;
  }
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 1.6rem;
  }
  .rhythm { rotate: .6deg; }
  .note { rotate: -.7deg; }
  /* a little paper edge behind the rail for warmth */
  .rail::before {
    content: "";
    position: absolute;
    inset: -.5rem -.5rem -.6rem;
    background: rgba(255, 250, 239, .5);
    border-radius: 40px 40px 40px 14px;
    z-index: -1;
  }
  .rail { isolation: isolate; }
}

@media (min-width: 80rem) {
  .shell { column-gap: 2.2rem; }
}

/* ==========================================================================
   Reduced motion — honour it everywhere
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .bar, .plant__avatar, .alldone__art, .alldone__leaves span, .mascot-eye {
    animation: none !important;
  }
  .bar { height: var(--h, 20%); }
  .toast__timer { animation: none !important; }
  .splash span { display: none; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(30, 42, 32, .4); --line-soft: rgba(30, 42, 32, .28); --ink-2: #333c33; --ink-3: #4a544a; }
  .card, .plant__card, .plant__detail { box-shadow: none; border: 1px solid var(--line); }
  :focus-visible { outline-width: 4px; }
}

@media print {
  body::after, .toasts, .rail, .colophon__hint { display: none; }
  .shell { display: block; }
}
