/* Chez Bunker
   Photography first, then type. Warm white (or near-black) ground, soft raised cards, one warm accent,
   a floating dock, and motion that explains where things went. Mobile first; two columns from 900px.
   Light is the default; dark is chosen with the switch at the top of every screen. */

/* ------------------------------------------------------------------ */
/* Tokens                                                             */
/* ------------------------------------------------------------------ */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --raised: #ffffff;
  --inset: #f1ede6;
  --ink: #1d1b19;
  --ink-2: #6a625a;
  --ink-3: #a0978d;
  --line: rgba(29, 27, 25, 0.08);
  --line-2: rgba(29, 27, 25, 0.16);
  --accent: #b4532a;
  --accent-soft: #fbece2;
  --good: #4e6b4a;
  --good-soft: #e7eee0;
  --gold: #9a783c;
  --warn: #a4473a;
  --on-ink: #fbf9f5;
  --glass: rgba(255, 255, 255, 0.86);
  --glass-line: rgba(29, 27, 25, 0.08);
  --scrim: rgba(250, 248, 244, 0.86);
  --cue: rgba(214, 170, 84, 0.34);

  --tint-0: #f4e4dc;
  --tint-1: #e6ecdd;
  --tint-2: #f0e8d9;
  --tint-3: #e1e8e9;
  --tint-4: #f6e6d2;
  --tint-5: #ebe4ec;
  --art-ink: #3b332d;

  --serif: 'Cormorant Garamond', 'Cormorant', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

  --r-xl: 30px;
  --r-card: 26px;
  --r-ctl: 16px;
  --shadow: 0 1px 2px rgba(40, 28, 16, 0.04), 0 14px 34px -18px rgba(60, 40, 20, 0.18);
  --shadow-lift: 0 2px 6px rgba(40, 28, 16, 0.06), 0 26px 50px -22px rgba(60, 40, 20, 0.3);
  --shadow-up: 0 -18px 50px -14px rgba(40, 28, 16, 0.28);
  --dock-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.22, 0.8, 0.22, 1);
  --spring: cubic-bezier(0.3, 1.3, 0.4, 1);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0f0e0d;
  --surface: #191715;
  --raised: #221f1c;
  --inset: #24211d;
  --ink: #f5f0e8;
  --ink-2: #b5aca2;
  --ink-3: #80786f;
  --line: rgba(245, 240, 232, 0.08);
  --line-2: rgba(245, 240, 232, 0.17);
  --accent: #e88f5c;
  --accent-soft: #33221a;
  --good: #a7c09c;
  --good-soft: #1f2a1d;
  --gold: #d3b174;
  --warn: #ea9a8c;
  --on-ink: #151312;
  --glass: rgba(30, 27, 24, 0.86);
  --glass-line: rgba(245, 240, 232, 0.1);
  --scrim: rgba(15, 14, 13, 0.84);
  --cue: rgba(211, 177, 116, 0.3);

  --tint-0: #3a2c27;
  --tint-1: #2c3327;
  --tint-2: #37312a;
  --tint-3: #2a3234;
  --tint-4: #3b3026;
  --tint-5: #322d35;
  --art-ink: #ede5db;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px -18px rgba(0, 0, 0, 0.8);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 26px 50px -22px rgba(0, 0, 0, 0.9);
  --shadow-up: 0 -18px 50px -14px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ */
/* Base                                                               */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}
ul, ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
/* Touch: no delay before a tap registers, no double-tap zoom, no text selection on controls. */
a,
button,
summary,
label {
  touch-action: manipulation;
}
button,
summary,
.btn,
.chip,
.tab,
.seg,
.day-tab,
.round-btn {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
b, strong {
  font-weight: 600;
}
small {
  font-size: inherit;
}
img {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
#view:focus {
  outline: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--ink);
  color: var(--on-ink);
  padding: 8px 14px;
  border-radius: 999px;
}
.center {
  text-align: center;
}

.gl {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ */
/* Page frame and type                                                */
/* ------------------------------------------------------------------ */

#view {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(14px + var(--safe-t)) 18px calc(var(--dock-h) + var(--safe-b) + 56px);
  min-height: 100dvh;
}
body.has-status #view {
  padding-top: calc(60px + var(--safe-t));
}
body[data-route='cook'] #view,
body[data-route='login'] #view,
body[data-route='boot'] #view {
  padding-bottom: 24px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 20px;
}
.page-head-txt {
  min-width: 0;
}
.page-head-act {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}
.kicker,
.eyebrow,
.row-label {
  font: 500 12.5px/1.3 var(--sans);
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.kicker {
  margin-bottom: 6px;
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
}
.row-label.hot {
  color: var(--accent);
  font-weight: 600;
}
.display {
  font: 500 clamp(40px, 11vw, 54px) / 0.96 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.week-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-2);
}
.week-line .gl {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}
.tagline {
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.lede {
  color: var(--ink-2);
  font-size: 15px;
  text-wrap: pretty;
}
.fine {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.fine.tiny {
  font-size: 12px;
  color: var(--ink-3);
}

.cols,
.stats-grid,
.week-grid,
.g-columns {
  display: grid;
  gap: 16px;
}
.col-main,
.col-side,
.g-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-content: start;
  min-width: 0;
}
.jobs,
.field,
.field-grid {
  min-width: 0;
}
.jobs {
  grid-template-columns: minmax(0, 1fr);
}

/* ------------------------------------------------------------------ */
/* Pictures                                                           */
/* ------------------------------------------------------------------ */

.pic {
  display: block;
  position: relative;
  overflow: hidden;
  flex: none;
  background: var(--pc, var(--tint-2));
  color: var(--art-ink);
  isolation: isolate;
}
/* The frame sets the size; the photograph only ever fills it. */
.pic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  /* Only a fade: Safari drops a frame's rounded corners while a picture inside it is being scaled. */
  transition: opacity 0.6s var(--ease);
}
.pic img[data-in] {
  opacity: 1;
}
/* A picture the phone already had: shown at once, with no fade. */
.pic img[data-in='now'] {
  transition: none;
}
.pic {
  background-size: cover;
  background-position: center;
}
.pic.broken img {
  display: none;
}
.pic.no-photo {
  display: grid;
  place-items: center;
}
.art-svg {
  width: 44%;
  max-width: 132px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.art-svg * {
  vector-effect: non-scaling-stroke;
  stroke-width: 1.4px;
}
.tint-0 { background: var(--tint-0); }
.tint-1 { background: var(--tint-1); }
.tint-2 { background: var(--tint-2); }
.tint-3 { background: var(--tint-3); }
.tint-4 { background: var(--tint-4); }
.tint-5 { background: var(--tint-5); }

.pic-hero {
  width: 100%;
  aspect-ratio: 4 / 3;
}
.pic-card {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 20px;
}
.pic-row {
  width: 62px;
  height: 62px;
  border-radius: 18px;
}
.pic-row .art-svg,
.pic-dot .art-svg {
  width: 56%;
}
.pic-dot {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

/* A soft chip that sits on a picture. */
.chip-glass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--glass-line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Cards and common pieces                                            */
/* ------------------------------------------------------------------ */

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
a.card,
button.card {
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.card:active,
button.card:active,
.lib-card:active,
.strip-card:active,
.job:active {
  transform: scale(0.985);
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h2,
.sheet-title,
.g-store-h > span,
.settings > summary > span {
  font: 500 25px/1.08 var(--serif);
  letter-spacing: -0.01em;
}
.card-note {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}
.card-note .gl {
  width: 13px;
  height: 13px;
}
.card > .fine:last-child,
.card > .lede + * {
  margin-top: 12px;
}
.empty {
  text-align: center;
  padding: 40px 24px;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.empty h2 {
  font: 500 27px/1.1 var(--serif);
}
.note-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--inset);
  font-size: 15px;
}
.note-box h3 {
  font: 600 12.5px/1.3 var(--sans);
  color: var(--accent);
  margin-bottom: 6px;
}
.note-box p {
  text-wrap: pretty;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font: 600 15.5px/1 var(--sans);
  letter-spacing: 0;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s, opacity 0.2s;
}
.btn:active {
  transform: scale(0.97);
}
.btn small {
  font-weight: 400;
  font-size: 13px;
  opacity: 0.7;
  padding-left: 9px;
  margin-left: 2px;
  border-left: 1px solid currentColor;
}
.btn .gl {
  width: 17px;
  height: 17px;
}
.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--ink) 60%, transparent);
}
.gl-play {
  fill: currentColor;
  stroke: none;
}
.btn-quiet {
  background: var(--inset);
  color: var(--ink);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn + .btn-block,
.field + .btn-block,
.picks + .btn-block,
.more + .btn-block,
.btn-block + .fine {
  margin-top: 10px;
}
.round-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), background 0.25s, color 0.25s;
}
.round-btn:active {
  transform: scale(0.92);
}
.round-btn.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-color: var(--glass-line);
}
.round-btn.bare {
  background: none;
  border-color: transparent;
  box-shadow: none;
  color: var(--ink-3);
}
.round-btn.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.theme-btn .gl {
  transition: transform 0.6s var(--spring);
}
.theme-btn[aria-pressed='true'] .gl {
  transform: rotate(40deg);
}
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  color: var(--ink-2);
}
.link-btn b {
  color: var(--ink);
}
.icon-spacer {
  width: 42px;
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}
.chip:active {
  transform: scale(0.96);
}
.chip small {
  font-size: 12px;
  color: var(--ink-3);
}
.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.chip.on small {
  color: inherit;
  opacity: 0.7;
}
.chip-timer {
  margin-top: 10px;
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  font-weight: 500;
}
.chip-timer .gl {
  width: 16px;
  height: 16px;
}
.chips,
.week-strip,
.store-tabs,
.strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -18px;
  padding: 2px 18px;
  scroll-snap-type: x proximity;
  scroll-padding: 0 18px;
}
.chips::-webkit-scrollbar,
.week-strip::-webkit-scrollbar,
.store-tabs::-webkit-scrollbar,
.strip::-webkit-scrollbar {
  display: none;
}
.name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

/* Rows: a picture, a few lines, something at the end */
.rows > li + li {
  border-top: 1px solid var(--line);
}
.row,
.pick {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  width: 100%;
  min-width: 0;
}
.rows > li:first-child > .row,
.week-row:first-child .row {
  padding-top: 2px;
}
.rows > li:last-child > .row {
  padding-bottom: 2px;
}
.rows > li.done .pic,
.rows > li.done .row-name {
  opacity: 0.5;
}
.row-txt {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.row-label:empty {
  display: none;
}
.row-name {
  font: 500 16px/1.25 var(--sans);
  text-wrap: pretty;
}
.row-sub {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-end {
  flex: none;
  text-align: right;
  display: grid;
  justify-items: end;
  line-height: 1;
  gap: 2px;
  color: var(--ink-2);
}
.row-end b {
  font: 500 25px/1 var(--serif);
  color: var(--ink);
  font-variant-numeric: lining-nums;
}
.row-end small {
  font-size: 11.5px;
  color: var(--ink-3);
}
.row > .gl,
.job > .gl,
.budget > .gl,
.shop-card > .gl,
.putaway-link > .gl {
  color: var(--ink-3);
  width: 16px;
  height: 16px;
}
.state {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--inset);
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.state .gl {
  width: 13px;
  height: 13px;
}
.state.done {
  background: var(--good-soft);
  color: var(--good);
}
.state.hot {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag,
.rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: var(--inset);
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.tag .gl,
.rating .gl {
  width: 13px;
  height: 13px;
}
.rating {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.rating .gl {
  fill: currentColor;
  stroke: none;
}

/* Facts as a row of quiet pills: bold figure, small word */
.facts-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
.facts-line li {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--inset);
  white-space: nowrap;
}
.facts-line b {
  color: var(--ink);
}
.facts-line .bare {
  padding: 0;
  background: none;
  align-self: center;
}

/* Facts as a small table of figures */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.facts.four {
  grid-template-columns: repeat(2, 1fr);
}
.facts > div {
  padding: 13px 8px 12px;
  text-align: center;
  min-width: 0;
  border-radius: 18px;
  background: var(--inset);
}
.facts dt {
  font: 500 12px/1.2 var(--sans);
  color: var(--ink-3);
  margin-bottom: 4px;
}
.facts dd {
  font: 500 25px/1.05 var(--serif);
  font-variant-numeric: lining-nums;
}
.facts dd small {
  font: 400 12px var(--sans);
  color: var(--ink-3);
}
.card > .facts:last-child,
.fold-body > .facts {
  margin-bottom: 0;
}

.meter {
  height: 6px;
  border-radius: 999px;
  background: var(--inset);
  overflow: hidden;
  margin: 14px 0 10px;
}
.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--good);
  transition: width 0.7s var(--ease);
}
.over .meter span {
  background: var(--warn);
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--good-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}
.banner .gl {
  color: var(--good);
  margin-top: 1px;
}
.segmented + .banner,
.banner + .banner,
.g-summary + .banner {
  margin-top: 12px;
}

.notes {
  display: grid;
  gap: 10px;
  font-size: 15px;
}
.notes > li {
  position: relative;
  padding-left: 18px;
  text-wrap: pretty;
}
.notes > li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.notes + .rows {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

details summary {
  cursor: pointer;
  list-style: none;
}
details summary::-webkit-details-marker {
  display: none;
}
details.more {
  margin-top: 6px;
}
details.more > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 44px;
  padding-top: 12px;
  font-weight: 500;
  border-top: 1px solid var(--line);
}
details.more > summary small {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: auto;
}
details.more > summary::after,
.settings > summary::after,
.g-fold > summary::after,
.fold > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg);
  margin-left: 12px;
  flex: none;
  align-self: center;
  transition: transform 0.3s var(--ease);
}
details[open] > summary::after {
  transform: rotate(-135deg);
}

/* Forms */
.field {
  display: grid;
  gap: 8px;
}
.field + .field,
.field-grid {
  margin-top: 18px;
}
.field-grid {
  display: grid;
  gap: 16px;
}
.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.field-grid .field + .field {
  margin-top: 0;
}
.field label,
.field-label {
  font: 500 13px/1.3 var(--sans);
  color: var(--ink-2);
}
input[type='text'],
input[type='number'],
input[type='search'],
input[type='date'],
input[type='time'],
input:not([type]),
select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  background: var(--surface);
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
/* Time fields: 16px so iOS does not zoom the page on focus, and centered the way Safari wants to be told. */
input[type='time'] {
  padding: 0 4px;
  min-width: 0;
  text-align: center;
  line-height: 48px;
}
input[type='time']::-webkit-date-and-time-value {
  text-align: center;
  margin: 0;
}
input::placeholder {
  color: var(--ink-3);
}
input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--inset);
}
.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.input-row input {
  flex: 1;
  min-width: 0;
}
.input-row .prefix {
  position: absolute;
  left: 16px;
  color: var(--ink-3);
  pointer-events: none;
}
.input-row .prefix + input {
  padding-left: 30px;
}

/* Tick circles */
.tick {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  border: 1.6px solid var(--line-2);
  position: relative;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.35s var(--spring);
}
.tick::after {
  content: '';
  position: absolute;
  left: 8.5px;
  top: 4.5px;
  width: 6.5px;
  height: 12px;
  border-right: 2px solid var(--on-ink);
  border-bottom: 2px solid var(--on-ink);
  transform: rotate(42deg) scale(0);
  transition: transform 0.35s var(--spring);
}
.done > .tick,
.done > .g-check > .tick {
  background: var(--good);
  border-color: var(--good);
  transform: scale(1.04);
}
:root[data-theme='dark'] .tick::after {
  border-color: #10140f;
}
.done > .tick::after,
.done > .g-check > .tick::after {
  transform: rotate(42deg) scale(1);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 10px 0;
  min-height: 46px;
}
.check-txt {
  font-size: 15.5px;
  padding-top: 2px;
  text-wrap: pretty;
  transition: color 0.3s, opacity 0.3s;
}
.check.done .check-txt {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}
.check-note {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  color: var(--good);
  font-size: 15px;
}

/* Segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 20px;
  background: var(--inset);
}
.seg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 16px;
  text-align: center;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.seg b {
  font-weight: 500;
}
.seg small {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
}
.seg.on {
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------------------ */
/* The dock, status pills, toast, timers                              */
/* ------------------------------------------------------------------ */

#tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(12px + var(--safe-b));
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 14px;
  pointer-events: none;
}
#tabs {
  transition: transform 0.36s var(--ease), opacity 0.22s ease-out;
}
#tabs.away {
  transform: translateY(calc(100% + 40px));
  opacity: 0;
}
.dock {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 430px;
  height: var(--dock-h);
  padding: 6px;
  border-radius: 34px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-lift);
}
.dock-ind {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 5);
  border-radius: 28px;
  background: var(--ink);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 0.55s var(--spring), opacity 0.3s;
}
.dock.none .dock-ind {
  opacity: 0;
}
.dock.still .dock-ind {
  transition: none;
}
.tab {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  color: var(--ink-2);
  font: 500 10.5px/1 var(--sans);
  border-radius: 28px;
  transition: color 0.35s var(--ease), transform 0.2s var(--ease);
}
.tab:active {
  transform: scale(0.92);
}
.tab .gl {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}
.tab.on {
  color: var(--on-ink);
}

#devbar {
  position: fixed;
  top: calc(8px + var(--safe-t));
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 12px;
}
#devbar[hidden] {
  display: none;
}
.pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12.5px;
  box-shadow: var(--shadow);
}
.pill button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: -6px;
}
.pill .gl {
  width: 14px;
  height: 14px;
}
.pill-off {
  background: var(--warn);
  color: #fff;
}

#toast {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--dock-h) + var(--safe-b) + 28px);
  z-index: 70;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--spring);
}
#toast.show {
  opacity: 1;
  transform: none;
}
body[data-route='recipe'] #toast {
  bottom: calc(104px + var(--safe-b));
}
/* In cook mode the bottom of the screen belongs to the timers and the Next button. */
body[data-route='cook'] #toast {
  bottom: auto;
  top: calc(86px + var(--safe-t));
  transform: translateY(-14px) scale(0.96);
}
body[data-route='cook'] #toast.show {
  transform: none;
}
.segmented.three .seg {
  flex-wrap: nowrap;
  font-size: 14px;
  padding: 7px 6px;
}
.toast-card {
  background: var(--ink);
  color: var(--on-ink);
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-lift);
  max-width: 100%;
  text-align: center;
}

#timers {
  position: fixed;
  right: 14px;
  bottom: calc(var(--dock-h) + var(--safe-b) + 26px);
  z-index: 65;
  display: grid;
  gap: 8px;
  justify-items: end;
}
body[data-route='cook'] #timers,
body[data-route='recipe'] #timers {
  bottom: calc(98px + var(--safe-b));
}
.timer-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 8px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-lift);
}
.timer-pill[hidden] {
  display: none;
}
.timer-pill.done {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  animation: ring 1.2s ease-in-out infinite;
}
@keyframes ring {
  50% { transform: scale(1.04); }
}
.t-ring {
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 3.5;
}
.t-ring-bg {
  stroke: var(--line-2);
}
.t-ring-fg {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.timer-pill.done .t-ring-fg,
.timer-pill.done .t-ring-bg {
  stroke: #fff;
}
.timer-txt {
  display: grid;
  line-height: 1.15;
}
.timer-txt b {
  font: 600 16px/1.1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.timer-txt small {
  font-size: 11.5px;
  color: var(--ink-2);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timer-pill.done .timer-txt small {
  color: inherit;
  opacity: 0.8;
}
.timer-btn {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--inset);
  font-size: 12px;
  font-weight: 600;
}
.timer-pill.done .timer-btn {
  background: rgba(255, 255, 255, 0.22);
}
.timer-pill.done .timer-more {
  display: none;
}
.timer-btn .gl {
  width: 14px;
  height: 14px;
}

/* ------------------------------------------------------------------ */
/* Sheets                                                             */
/* ------------------------------------------------------------------ */

dialog.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-up);
  overflow: hidden;
}
dialog.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-in 0.5s var(--ease);
}
dialog.sheet::backdrop {
  background: rgba(20, 16, 12, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade-in 0.35s var(--ease);
}
dialog.sheet.closing {
  animation: sheet-out 0.24s ease-in forwards;
}
dialog.sheet.closing::backdrop {
  animation: fade-out 0.24s ease-in forwards;
}
@keyframes sheet-in {
  from { transform: translateY(60%); opacity: 0.4; }
}
@keyframes sheet-out {
  to { transform: translateY(40%); opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
}
@keyframes fade-out {
  to { opacity: 0; }
}
.sheet-grip {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: var(--line-2);
  margin: 10px auto 0;
  flex: none;
}
.sheet-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--inset);
  color: var(--ink-2);
  z-index: 2;
}
.sheet-body:focus {
  outline: none;
}
.sheet-body {
  padding: 18px 22px calc(28px + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet-title {
  font-size: 32px;
  padding-right: 46px;
  margin-bottom: 8px;
}
.sheet-sub {
  color: var(--ink-2);
  font-size: 15px;
  text-wrap: pretty;
}
.sheet-h {
  font: 600 13px/1.3 var(--sans);
  color: var(--accent);
  margin: 26px 0 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.sheet-h + .fine {
  margin-bottom: 4px;
}
.sheet-note {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  font-size: 14px;
}
.sheet-now {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 4px;
}
.picks {
  display: grid;
}
.pick + .pick {
  border-top: 1px solid var(--line);
}
.pick {
  transition: opacity 0.2s, transform 0.2s var(--ease);
}
.pick:active {
  opacity: 0.6;
  transform: scale(0.99);
}
.pick.here .row-name {
  color: var(--accent);
}
.pick .step-n {
  width: 28px;
  font-size: 24px;
}
.pick > .gl {
  color: var(--good);
}
.sheet-body > .btn-block {
  margin-top: 18px;
}
.sheet-body form.field {
  margin-top: 16px;
}

/* ------------------------------------------------------------------ */
/* Today                                                              */
/* ------------------------------------------------------------------ */

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.hero-pic {
  display: block;
  position: relative;
}
.hero-chip {
  position: absolute;
  left: 14px;
  top: 14px;
}
.hero-body {
  padding: 20px 20px 18px;
}
.hero-name {
  font: 500 34px/1.02 var(--serif);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.uses-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14.5px;
  color: var(--good);
}
.uses-line .gl {
  margin-top: 2px;
}
.when {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--inset);
}
.when p {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.when b {
  font: 600 19px/1.15 var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.when span {
  font-size: 13.5px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.when-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: none;
}
.when.hot {
  background: var(--accent-soft);
}
.when.hot b {
  color: var(--accent);
}
.when.hot .when-dot {
  background: var(--accent);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
.hero .tags {
  margin: -4px 0 16px;
}
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 18px;
  margin-top: 8px;
}

.jobs {
  display: grid;
  gap: 10px;
}
.job,
.shop-card,
.putaway-link,
.budget {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  transition: transform 0.25s var(--ease);
}
.job {
  padding: 14px 16px 14px 14px;
  border-radius: var(--r-card);
  background: var(--accent-soft);
}
.shop-card,
.putaway-link {
  padding: 16px 18px;
}
.round-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--good-soft);
  color: var(--good);
  flex: none;
}
.round-ico .gl {
  width: 21px;
  height: 21px;
}

.ahead-list {
  display: grid;
}
.ahead-list > li {
  display: grid;
  gap: 5px;
  padding: 14px 0;
}
.ahead-list > li + li {
  border-top: 1px solid var(--line);
}
.ahead-list > li:first-child {
  padding-top: 0;
}
.ahead-list > li:last-child {
  padding-bottom: 0;
}
.ahead-when {
  font: 600 12.5px/1.3 var(--sans);
  color: var(--accent);
}
.ahead-txt {
  font-size: 15px;
  text-wrap: pretty;
}
.ahead-for {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  color: var(--ink-3);
}
.ahead-for .gl {
  width: 13px;
  height: 13px;
}
.ahead details.more {
  margin-top: 14px;
}

.prep-group {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.prep-dish {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.prep-dish span {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}
.prep-dish small {
  font-size: 12.5px;
  color: var(--ink-3);
}
.prep-progress {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font: italic 500 19px/1.2 var(--serif);
  color: var(--good);
  text-align: center;
}

.vote-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.vote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border-radius: 18px;
  background: var(--inset);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--spring);
}
.vote-btn:active {
  transform: scale(0.95);
}
.vote-btn.picked {
  background: var(--ink);
  color: var(--on-ink);
}
.vote-count:empty {
  display: none;
}
.vote-count {
  font-size: 13px;
  opacity: 0.6;
}

.budget {
  padding: 16px 18px;
}
.ring {
  width: 52px;
  height: 52px;
  flex: none;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 5;
}
.ring-bg {
  stroke: var(--inset);
}
.ring-fg {
  stroke: var(--good);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s var(--ease);
}
.ring.over .ring-fg {
  stroke: var(--warn);
}
.budget-big,
.budget-huge,
.g-total {
  font: 500 30px/1 var(--serif);
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}
.budget-big small,
.budget-huge small {
  font: 400 13.5px var(--sans);
  letter-spacing: 0;
  color: var(--ink-2);
}
.budget-huge {
  font-size: 60px;
  margin-top: 8px;
}
.budget.over .budget-big,
.budget-main.over .budget-huge {
  color: var(--warn);
}

.strip-sec .card-head {
  margin-bottom: 12px;
  padding: 0 2px;
}
.strip {
  gap: 12px;
  padding-bottom: 6px;
}
.strip-card {
  flex: none;
  width: 62%;
  max-width: 250px;
  display: grid;
  gap: 4px;
  /* Cards in a row are equally tall; keep each one's text up under its picture. */
  align-content: start;
  scroll-snap-align: start;
  transition: transform 0.25s var(--ease);
}
.strip-card .pic {
  margin-bottom: 6px;
}
.strip-card .row-name {
  font-size: 15px;
}

.rhythm-list > li {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  align-items: baseline;
}
.rhythm-list > li + li {
  border-top: 1px solid var(--line);
}
.rhythm-day {
  width: 36px;
  flex: none;
  font: 600 12.5px/1.3 var(--sans);
  color: var(--accent);
}
.rhythm-list b {
  display: block;
  font-weight: 500;
}
.rhythm-list small {
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ */
/* Week                                                               */
/* ------------------------------------------------------------------ */

.week-strip {
  margin-bottom: 14px;
}
.days {
  position: sticky;
  top: calc(8px + var(--safe-t));
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 5px;
  margin-bottom: 14px;
  border-radius: 24px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
}
.days-ind {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 7);
  border-radius: 19px;
  background: var(--ink);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 0.5s var(--spring);
}
.day-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 0 7px;
  border-radius: 19px;
  color: var(--ink-2);
  transition: color 0.3s var(--ease);
}
.day-tab small {
  font-size: 11.5px;
}
.day-tab b {
  font: 500 21px/1 var(--serif);
  font-variant-numeric: lining-nums;
}
.day-tab.today:not(.on) b {
  color: var(--accent);
}
.day-tab.on {
  color: var(--on-ink);
}
.day {
  padding: 18px 20px 12px;
}
.week-grid > .day:not(.sel) {
  display: none;
}
.day-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.day-head h2 {
  font: 500 30px/1.02 var(--serif);
  letter-spacing: -0.01em;
}
.today-mark {
  font: 600 11.5px/1 var(--sans);
  color: #fff;
  background: var(--accent);
  padding: 4px 9px;
  border-radius: 999px;
  vertical-align: 6px;
  margin-left: 6px;
}
.day-sub {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.day-facts {
  display: grid;
  gap: 5px;
  justify-items: end;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  padding-top: 4px;
}
.day-facts > div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.day-facts .gl {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}
.week-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.week-row .row {
  flex: 1;
  padding: 11px 0;
}
.week-row .tags {
  margin-top: 3px;
}
.week-row .round-btn {
  margin-right: -10px;
}

/* ------------------------------------------------------------------ */
/* Groceries                                                          */
/* ------------------------------------------------------------------ */

#view > .segmented {
  margin-bottom: 14px;
}
.g-sum-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.g-total {
  font-size: 52px;
  margin-top: 4px;
}
.g-total .approx {
  font: italic 500 21px var(--serif);
  color: var(--ink-3);
  letter-spacing: 0;
}
.g-sum-side {
  text-align: right;
}
.g-month {
  font: 500 25px/1 var(--serif);
  margin-top: 8px;
  font-variant-numeric: lining-nums;
}
.g-month small {
  display: block;
  font: 400 12.5px/1.3 var(--sans);
  color: var(--ink-3);
  margin-top: 4px;
}
.g-register {
  margin: 10px 0 2px;
}
.g-register > summary {
  font-size: 14px;
  padding-top: 10px;
  min-height: 40px;
}
.g-register .fine {
  padding-bottom: 6px;
}
.g-count {
  font-size: 13px;
  color: var(--ink-2);
}
.g-count:empty {
  display: none;
}
.g-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 16px;
}
.tool {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 2px 10px;
  font: 500 12px/1.2 var(--sans);
  color: var(--ink-2);
  border-radius: 18px;
  background: var(--inset);
  transition: transform 0.2s var(--ease);
}
.tool:active {
  transform: scale(0.95);
}
.tool .gl {
  width: 20px;
  height: 20px;
  color: var(--ink);
}
.quick-add {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}
.quick-add input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  padding: 0 20px;
}
.store-tabs {
  margin-bottom: 6px;
}

.g-store {
  padding-top: 20px;
}
.g-store-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
}
.g-store-h > span {
  font-size: 30px;
}
.g-store-h small {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
}
.g-store > .fine {
  padding: 12px 0 4px;
}
.g-fold > summary {
  align-items: center;
}
.g-fold > summary > span {
  flex: 1;
}
.g-sec-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0 4px;
  font: 600 12.5px/1.3 var(--sans);
  color: var(--accent);
}
.sec-done {
  display: inline-grid;
  color: var(--good);
}
.sec-done .gl {
  width: 14px;
  height: 14px;
}
.g-section.all-done .g-sec-h {
  color: var(--ink-3);
}
.g-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.g-check {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  min-height: 62px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: opacity 0.2s;
}
.g-check:active {
  opacity: 0.6;
}
.g-txt {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.g-name::first-letter,
.uses-list .row-name::first-letter {
  text-transform: uppercase;
}
.g-name {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.25;
  transition: color 0.3s;
}
.g-amt {
  font-size: 13.5px;
  color: var(--ink-2);
}
.g-hint {
  font-size: 12.5px;
  color: var(--good);
}
.g-price {
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.g-more {
  display: grid;
  place-items: center;
  width: 36px;
  margin-right: -10px;
  color: var(--ink-3);
}
.g-more .gl {
  width: 15px;
  height: 15px;
}
.g-item.done .g-name {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}
.g-item.done .g-amt,
.g-item.done .g-price {
  color: var(--ink-3);
}
.putaway-link {
  margin-top: 20px;
}

.pa-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.pa-list > li {
  display: grid;
  gap: 7px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.pa-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 14.5px;
}
.pa-tag {
  flex: none;
  width: 62px;
  font: 600 12.5px/1.3 var(--sans);
  color: var(--accent);
}
.pa-tag.cold {
  color: var(--good);
}
.pa-list + .fine,
.notes + .fine {
  margin-top: 14px;
}
.uses-list > li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.uses-amt {
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
}
.receipt-list > li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.receipt-list small {
  flex: 1;
  font-size: 13px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ */
/* Recipes (the library)                                              */
/* ------------------------------------------------------------------ */

.lib-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}
.search {
  position: relative;
  display: block;
}
.search .gl {
  position: absolute;
  left: 18px;
  top: 16px;
  color: var(--ink-3);
}
.search input {
  padding-left: 46px;
  border-radius: 999px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.lib-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 14px;
}
.lib-card {
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform 0.25s var(--ease);
}
.lib-txt {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0 2px;
}
.lib-name {
  font: 500 20px/1.08 var(--serif);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.lib-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.lib-meta .rating {
  padding: 2px 8px 2px 6px;
}

/* ------------------------------------------------------------------ */
/* Recipe                                                             */
/* ------------------------------------------------------------------ */

/* Phone first: the picture runs edge to edge with two quiet buttons over it, then the name, the facts,
   and three tabs. From 740px the picture becomes a card with the buttons above it; from 980px the
   ingredients sit beside the directions (see "Wider screens"). */
.r-top {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
}
.r-top .round-btn {
  pointer-events: auto;
  background: var(--glass);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}
.r-back span {
  display: none;
}
body.has-status .r-top {
  top: calc(56px + var(--safe-t));
}
body[data-route='recipe'] #view {
  position: relative;
  padding-top: 0;
  padding-bottom: calc(118px + var(--safe-b));
}
.r-hero {
  margin: 0 -18px;
}
.r-hero .pic-hero {
  aspect-ratio: 4 / 3;
  max-height: 54dvh;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.r-intro {
  padding: 24px 2px 0;
}
.r-name {
  font-size: clamp(36px, 10vw, 48px);
  margin: 10px 0 12px;
}
.r-intro .facts-line {
  margin: 18px 0 0;
}
.r-intro > .when,
.r-intro > .banner {
  margin-top: 14px;
}
.r-tabs {
  margin: 26px 0 4px;
  position: sticky;
  top: calc(8px + var(--safe-t));
  z-index: 8;
  box-shadow: 0 0 0 8px var(--bg);
}
.r-body {
  display: flex;
  flex-direction: column;
}
/* One part at a time on a phone; the tabs choose which. */
.r-part {
  display: none;
  padding-top: 14px;
}
.r-body[data-on='ing'] .r-part[data-tab='ing'],
.r-body[data-on='method'] .r-part[data-tab='method'],
.r-body[data-on='notes'] .r-part[data-tab='notes'] {
  display: block;
}
.r-body[data-on='notes'] .r-dir {
  order: -1;
}
.r-body[data-on='notes'] .r-part {
  padding-top: 0;
}
.r-h {
  display: none;
}

/* How the time divides. */
.timebar {
  display: flex;
  gap: 3px;
  height: 6px;
  margin-top: 4px;
}
.timebar span {
  border-radius: 3px;
  min-width: 10px;
}
.tb-hands {
  background: var(--accent);
}
.tb-own {
  background: var(--line-2);
}
.timebar-key {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 10px 0 22px;
  font-size: 13px;
  color: var(--ink-2);
}
.timebar-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.timebar-key i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.timebar-key b {
  color: var(--ink);
}

/* Before step one: what must already be done, and who can help. */
.r-before {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
}
.before-card {
  padding: 18px 20px 20px;
  border-radius: 22px;
}
.before-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font: 600 13px/1.2 var(--sans);
}
.before-card h3 .gl {
  width: 16px;
  height: 16px;
}
.ahead-card {
  background: var(--accent-soft);
}
.ahead-card h3 {
  color: var(--accent);
}
.ahead-card .ahead-list > li + li {
  border-top-color: color-mix(in srgb, var(--accent) 16%, transparent);
}
.helper-card {
  background: var(--good-soft);
}
.helper-card h3 {
  color: var(--good);
}
.helper-card .notes > li::before {
  background: var(--good);
}
.r-missing {
  margin-top: 90px;
}
.pane-foot {
  margin-top: 16px;
}
.serv,
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.stepper {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: var(--inset);
  flex: none;
  padding: 3px;
}
.step-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--raised);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--spring);
}
.step-btn:active {
  transform: scale(0.88);
}
.step-val {
  min-width: 42px;
  text-align: center;
  font: 500 24px/1 var(--serif);
  font-variant-numeric: lining-nums;
}
.switch {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--line-2);
  position: relative;
  flex: none;
  transition: background 0.3s var(--ease);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s var(--spring);
}
[aria-checked='true'] .switch {
  background: var(--good);
}
[aria-checked='true'] .switch::after {
  transform: translateX(20px);
}
.ing-group {
  margin-top: 20px;
}
.ing-h {
  font: 600 12.5px/1.3 var(--sans);
  color: var(--accent);
  padding-bottom: 6px;
}
.ing {
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
  font-size: 15.5px;
  line-height: 1.35;
  transition: color 0.3s, opacity 0.3s;
}
.ing-amt {
  flex: none;
  width: 84px;
  font-weight: 600;
  font-variant-numeric: lining-nums;
}
.ing-name {
  flex: 1;
  min-width: 0;
}
.ing-prep,
.ing-note {
  color: var(--ink-2);
}
.ing-note {
  display: block;
  font-size: 13px;
}
.opt {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--inset);
  color: var(--ink-2);
  vertical-align: 1px;
}
.opt.extra {
  background: var(--good-soft);
  color: var(--good);
}
.ing.struck {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}
.ing-text {
  color: var(--good);
  align-items: center;
  gap: 10px;
}
/* The directions read as one line down the page: a number, a thread to the next number, and beside
   each step only what its own words name (the oven and its temperature, the burner and its heat),
   with its timer at the right edge where the times can be run down at a glance. */
.steps {
  display: grid;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0 16px;
  padding-bottom: 28px;
}
.step:last-child {
  padding-bottom: 4px;
}
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17.5px;
  top: 40px;
  bottom: 6px;
  width: 1px;
  background: var(--line-2);
}
.step-n {
  font: italic 500 34px/0.9 var(--serif);
  color: var(--accent);
  text-align: center;
  font-variant-numeric: lining-nums;
  padding-top: 1px;
}
.step-body {
  min-width: 0;
  font-size: 16.5px;
  line-height: 1.55;
}
.step-body p {
  text-wrap: pretty;
}
.step-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 30px;
  margin-bottom: 6px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 12.5px/1.2 var(--sans);
  color: var(--ink-2);
  white-space: nowrap;
}
.mark .gl {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}
.mark b {
  color: var(--ink);
}
.step-meta .chip-timer {
  margin: 0 0 0 auto;
  min-height: 30px;
  padding: 0 12px 0 9px;
  font-size: 12.5px;
}
.amt {
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent);
}
/* What to look for: a soft stroke of highlighter under the words, nothing more. */
.cue {
  font-style: normal;
  background: linear-gradient(transparent 64%, var(--cue) 64%, var(--cue) 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.serve-box {
  margin-top: 26px;
}
.serve-box h3 {
  display: flex;
  align-items: center;
  gap: 7px;
}
.serve-box h3 .gl {
  width: 15px;
  height: 15px;
}
.r-part[data-tab='notes'] {
  margin-top: 8px;
}
.folds {
  display: grid;
}
.fold {
  border-bottom: 1px solid var(--line);
}
.fold > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  font-size: 16.5px;
  font-weight: 500;
}
.fold > summary > span {
  flex: 1;
}
.fold > summary small {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 400;
}
.fold-body {
  padding: 0 0 20px;
  font-size: 15.5px;
  color: var(--ink);
}
.fold-body p {
  text-wrap: pretty;
}
.fold-body .tags {
  margin-top: 12px;
}
.r-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  justify-content: center;
  padding: 26px 18px calc(16px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
  pointer-events: none;
}
.r-cta .btn {
  pointer-events: auto;
  max-width: 604px;
  min-height: 58px;
  font-size: 16.5px;
}

/* ------------------------------------------------------------------ */
/* Cook mode                                                          */
/* ------------------------------------------------------------------ */

.cook {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-t);
}
.cook-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.cook-where {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 2px 0;
}
.cook-name {
  max-width: 100%;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cook-segs {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 260px;
}
.cook-segs span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--line-2);
  transition: background 0.5s var(--ease), flex-grow 0.5s var(--spring);
}
.cook-segs span.past {
  background: var(--ink);
}
.cook-segs span.here {
  background: var(--accent);
  flex-grow: 2.2;
}
.cook-stage {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 24px 96px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  outline: none;
}
.cook-kicker {
  font: 600 13.5px/1.3 var(--sans);
  color: var(--accent);
  margin-bottom: 14px;
}
.cook-title-big {
  font: 500 clamp(36px, 10vw, 48px) / 1 var(--serif);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.cook-meta {
  font-size: 15.5px;
  color: var(--ink-2);
  text-wrap: pretty;
  margin-bottom: 4px;
}
.cook-meta b {
  color: var(--ink);
}
.cook-text {
  font: 400 clamp(23px, 6.2vw, 31px) / 1.4 var(--sans);
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.cook-ings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.cook-ings li {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--inset);
  font-size: 14.5px;
}
.timer-go,
.timer-live {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 26px;
  padding: 14px 18px 14px 14px;
  border-radius: 26px;
  background: var(--accent-soft);
  text-align: left;
}
.timer-go {
  transition: transform 0.25s var(--spring);
}
.timer-go:active {
  transform: scale(0.97);
}
.timer-go-ring {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  flex: none;
}
.timer-go-ring .gl {
  fill: currentColor;
  stroke: none;
  width: 22px;
  height: 22px;
  margin-left: 2px;
}
.timer-go .row-name {
  font: 500 24px/1.1 var(--serif);
}
.timer-live {
  flex-wrap: wrap;
}
.big-ring {
  width: 86px;
  height: 86px;
  flex: none;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 9;
}
.big-ring-bg {
  stroke: color-mix(in srgb, var(--accent) 18%, transparent);
}
.big-ring-fg {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.timer-live-txt {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.timer-live-txt b {
  font: 500 42px/1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--accent);
}
.timer-live-txt span {
  font-size: 13.5px;
  color: var(--ink-2);
}
.timer-live-act {
  display: flex;
  gap: 8px;
  width: 100%;
}
.timer-live.done {
  background: var(--accent);
}
.timer-live.done b,
.timer-live.done span {
  color: #fff;
}
.timer-live.done .big-ring-bg {
  stroke: rgba(255, 255, 255, 0.35);
}
.cook .ing-group:first-of-type {
  margin-top: 22px;
}
.cook-done {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}
.cook-done .pic {
  margin-bottom: 8px;
}
.cook-done .cook-kicker,
.cook-done .cook-title-big {
  margin-bottom: 0;
}
.cook-serve {
  font-size: 17px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.cook-done .btn {
  margin-top: 8px;
}
.cook-nav {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  padding: 12px 18px calc(14px + var(--safe-b));
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.cook-nav .btn {
  min-height: 62px;
  font-size: 17px;
}
.cook-prev {
  padding: 0;
}

/* ------------------------------------------------------------------ */
/* Family                                                             */
/* ------------------------------------------------------------------ */

.budget-main .facts {
  margin-bottom: 14px;
}
.budget-main .fine {
  margin-bottom: 16px;
}
.chart {
  width: 100%;
  height: auto;
  display: block;
}
.chart .bar {
  fill: var(--line-2);
}
.chart .bar.now {
  fill: var(--good);
}
.chart .bar.over {
  fill: var(--warn);
}
.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .cap {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.chart .ax {
  font: 400 9.5px var(--sans);
  fill: var(--ink-3);
}
.chart .cap-lbl {
  fill: var(--ink-2);
  stroke: none;
}
.rot-list > li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.rot-list > li:first-child {
  padding-top: 0;
}
.rot-list + .fine {
  margin-top: 12px;
}
.rot-num {
  text-align: right;
  flex: none;
}
.rot-num b {
  display: block;
  font: 500 26px/1 var(--serif);
  font-variant-numeric: lining-nums;
}
.rot-num small {
  font-size: 12.5px;
  color: var(--ink-3);
}
.effort {
  display: grid;
  gap: 12px;
}
.effort > li {
  display: grid;
  grid-template-columns: 36px 1fr 58px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.effort-day {
  font: 500 12.5px/1 var(--sans);
  color: var(--ink-3);
}
.effort-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--inset);
  overflow: hidden;
}
.effort-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--line-2);
}
.effort > li.now .effort-bar span {
  background: var(--accent);
}
.effort > li.now .effort-day,
.effort > li.now .effort-num {
  color: var(--ink);
}
.effort-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.effort + .fine {
  margin-top: 14px;
}
.settings {
  margin-top: 16px;
}
.settings > summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.settings > summary small {
  flex: 1;
  font-size: 13px;
  color: var(--ink-3);
}
.settings-body {
  padding-top: 20px;
}
.settings-body .sheet-h + .fine {
  margin-bottom: 12px;
}
.settings-body .fine.tiny {
  margin-top: 16px;
  text-align: center;
}
.settings-body .seg .gl {
  width: 16px;
  height: 16px;
}
.hc-grid {
  width: 100%;
  border-collapse: collapse;
}
.hc-grid th {
  font: 500 12.5px/1.3 var(--sans);
  color: var(--ink-3);
  padding: 6px 4px;
  text-align: center;
}
.hc-grid th[scope='row'] {
  text-align: left;
  width: 44px;
}
.hc-grid td {
  padding: 3px;
}
.hc-sel {
  min-height: 44px;
  padding: 0 6px;
  text-align: center;
  text-align-last: center;
  border-radius: 14px;
}

/* ------------------------------------------------------------------ */
/* Login and loading                                                  */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/* The house                                                          */
/* ------------------------------------------------------------------ */

/* The few flourishes, kept few on purpose: the name set as a restaurant would set it, one ornament
   (two hairlines and a small star, as on a menu card), and small labels in spaced capitals. */
.house-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
}
/* At the head of Today, where a menu carries the name of the house. */
.kicker:has(.house-name) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 0;
  margin-bottom: 10px;
}
.kicker .house-name {
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  padding-right: 11px;
}
.kicker-date {
  padding-left: 11px;
  border-left: 1px solid var(--line-2);
}
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  color: var(--gold);
}
.flourish::before,
.flourish::after {
  content: '';
  width: 46px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.flourish-star {
  width: 9px;
  height: 9px;
  fill: currentColor;
}
.flourish span {
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding-left: 0.24em;
}
/* The foot of a page. */
.colophon {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 52px;
}
.colophon .house-name {
  font-size: 17px;
  line-height: 1;
  color: var(--ink-3);
}
.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mark-shine {
  stroke: var(--gold);
}

.boot,
.login {
  min-height: 80dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 14px;
}
.boot p {
  font: italic 500 21px var(--serif);
  color: var(--ink-2);
}
.boot-mark,
.login-mark {
  width: 78px;
  height: 78px;
  color: var(--ink);
}
.boot-mark svg,
.login-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.boot-mark {
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  50% { opacity: 0.4; transform: scale(0.96); }
}
.login .house-name {
  font-size: clamp(54px, 15vw, 76px);
  line-height: 1;
  margin-top: 4px;
}
.login .flourish {
  margin: 2px 0 8px;
}
.login-sub {
  color: var(--ink-2);
  max-width: 300px;
  text-wrap: balance;
}
.login-form {
  width: 100%;
  max-width: 340px;
  margin-top: 14px;
  text-align: left;
}
.login-form input {
  text-align: center;
}
.login-form label {
  text-align: center;
}
.login-err {
  min-height: 20px;
  font-size: 14px;
  color: var(--warn);
  text-align: center;
}
.shake {
  animation: shake 0.35s;
}
@keyframes shake {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ------------------------------------------------------------------ */
/* Motion                                                             */
/* ------------------------------------------------------------------ */

/* Entrances inside a screen (a new step, a tab, a fold opening, a day picked) are started in script,
   once, by the tap that causes them: see play() in ui.js. Nothing here animates by itself, because a
   rule would play again every time it happened to match again. The change from one screen to a
   deeper one and back is drawn in script too (deepChange in app.js), and needs only these two
   plain elements. */

/* A recipe's picture on its way between a card and the top of its page. */
.fly {
  position: fixed;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--tint-2);
}
.fly > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The new ground that opens out from the light/dark switch. */
.theme-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
/* While the colors change under it, nothing eases from the old color to the new. */
.theme-swap *,
.theme-swap *::before,
.theme-swap *::after {
  transition: none !important;
}

/* ------------------------------------------------------------------ */
/* Wider screens                                                      */
/* ------------------------------------------------------------------ */

@media (min-width: 620px) {
  .lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .vote-row {
    grid-template-columns: repeat(4, 1fr);
  }
  .facts.four {
    grid-template-columns: repeat(4, 1fr);
  }
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }
  .strip-card {
    width: 38%;
  }
}

@media (min-width: 740px) {
  #view {
    max-width: 900px;
    padding-left: 28px;
    padding-right: 28px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .hero-pic {
    display: grid;
  }
  .hero-pic .pic-hero {
    aspect-ratio: auto;
    height: auto;
    min-height: 340px;
  }
  .hero-body {
    padding: 26px;
    align-self: center;
  }
  /* Recipe: the buttons move out of the picture into a quiet bar above it, and the picture becomes a card. */
  .r-top {
    position: static;
    padding: 22px 0 18px;
  }
  .r-top .round-btn {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow);
  }
  .r-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    padding: 0 18px 0 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
  }
  .r-back span {
    display: inline;
  }
  body.has-status .r-top {
    top: auto;
  }
  body[data-route='recipe'] #view {
    padding-top: var(--safe-t);
  }
  .r-hero {
    margin: 0;
  }
  .r-hero .pic-hero {
    aspect-ratio: 16 / 9;
    max-height: none;
    border-radius: var(--r-xl);
  }
  .r-intro {
    padding: 30px 4px 0;
    max-width: 720px;
  }
  .r-name {
    font-size: 52px;
  }
  .tagline {
    font-size: 16.5px;
  }
}

/* Recipe on a wide screen: picture beside the name, then ingredients beside directions.
   The ingredients stay in view (and scroll on their own if they are long) while the directions are read. */
@media (min-width: 980px) {
  body[data-route='recipe'] #view {
    padding-bottom: 96px;
  }
  .r-head {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
  }
  .r-hero .pic-hero {
    aspect-ratio: 4 / 3;
  }
  .r-intro {
    padding: 0;
    max-width: none;
  }
  .r-name {
    font-size: clamp(46px, 4.6vw, 62px);
    margin: 12px 0 16px;
  }
  .r-intro .facts-line {
    margin-top: 22px;
  }
  .r-cta {
    position: static;
    justify-content: flex-start;
    padding: 0;
    margin-top: 28px;
    background: none;
  }
  .r-cta .btn {
    width: auto;
    min-width: 300px;
    max-width: none;
  }
  .r-tabs {
    display: none;
  }
  .r-body {
    display: grid;
    grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1.26fr);
    gap: 72px;
    align-items: start;
    margin-top: 64px;
    padding-top: 44px;
    border-top: 1px solid var(--line);
  }
  .r-body .r-part,
  .r-body[data-on] .r-part {
    display: block;
    padding-top: 0;
  }
  .r-body[data-on='notes'] .r-dir {
    order: 0;
  }
  .r-h {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 22px;
    font: 500 38px/1 var(--serif);
    letter-spacing: -0.015em;
  }
  .r-h small {
    font: 400 13.5px/1 var(--sans);
    letter-spacing: 0;
    color: var(--ink-3);
  }
  .r-ing {
    position: sticky;
    top: 28px;
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    overscroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
    padding: 0 18px 30px 0;
    margin-right: -18px;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent);
  }
  .r-ing .serv:first-child {
    padding-top: 0;
  }
  .r-part[data-tab='notes'] {
    margin-top: 30px;
  }
  .r-before {
    margin-bottom: 34px;
  }
  .r-before:has(.ahead-card):has(.helper-card) {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
  .step {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0 20px;
    padding-bottom: 34px;
  }
  .step:not(:last-child)::before {
    left: 21.5px;
    top: 46px;
  }
  .step-n {
    font-size: 40px;
  }
  .step-body {
    font-size: 17px;
    line-height: 1.6;
  }
}

@media (min-width: 900px) {
  #view {
    max-width: 1140px;
    padding-left: 32px;
    padding-right: 32px;
  }
  .cols {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 22px;
    align-items: start;
  }
  .cols .hero,
  .cols .hero-pic {
    display: block;
  }
  .cols .hero-pic .pic-hero {
    aspect-ratio: 16 / 10;
    min-height: 0;
    height: auto;
  }
  .g-columns {
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: start;
  }
  /* Room for the whole week at once: every day shows, and the day strip is not needed. */
  .days {
    display: none;
  }
  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .week-grid > .day:not(.sel) {
    display: block;
  }
  .week-grid > .day.is-today {
    border-color: var(--accent);
  }
  .lib-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .g-summary,
  #view > .segmented,
  .quick-add {
    max-width: 580px;
  }
  .chips,
  .week-strip,
  .store-tabs {
    flex-wrap: wrap;
  }
  dialog.sheet {
    margin: auto;
    border-radius: var(--r-xl);
  }
}

@media (min-width: 1240px) {
  .week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  #view {
    padding-left: 14px;
    padding-right: 14px;
  }
  .chips,
  .week-strip,
  .store-tabs,
  .strip {
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .r-hero {
    margin-left: -14px;
    margin-right: -14px;
  }
  .card {
    padding: 17px;
  }
  .hero-body {
    padding: 18px 17px 16px;
  }
  .hero-name {
    font-size: 31px;
  }
  .ing-amt {
    width: 74px;
  }
  .lib-name {
    font-size: 18.5px;
  }
  .tab span {
    font-size: 10px;
  }
}

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

/* ------------------------------------------------------------------ */
/* Print: the grocery list on paper                                   */
/* ------------------------------------------------------------------ */

@media print {
  :root,
  :root[data-theme='dark'] {
    --bg: #fff;
    --surface: #fff;
    --inset: #fff;
    --ink: #000;
    --ink-2: #333;
    --ink-3: #555;
    --line: #ccc;
    --line-2: #999;
    --accent: #000;
  }
  #tabs, #devbar, #toast, #timers, .segmented, .quick-add, .g-actions, .g-more, .store-tabs, .putaway-link, .meter, #rescue-box, .banner, .page-head-act, .g-register {
    display: none !important;
  }
  #view {
    max-width: none;
    padding: 0;
  }
  .card {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  .g-columns {
    display: block;
    columns: 2;
    column-gap: 28px;
  }
  .g-item,
  .g-section {
    break-inside: avoid;
  }
  .g-check {
    min-height: 0;
    padding: 5px 0;
  }
  .tick {
    width: 14px;
    height: 14px;
    border-radius: 3px;
  }
  .display {
    font-size: 30px;
  }
}
