@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
a { color: var(--fg); text-underline-offset: 3px; }

/* The Happy Spatula: same family as The Happy Hanger. White, near-black ink, sunshine yellow for today and the active tab, #FF3EA5 pink for links and the + button. */
:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --sunk: #F4F2EE; --line: #ECE8E2;
  --fg: #1E1C1A; --body: #3F3B37; --muted: #6B655E; --faint: #8C867F;
  --accent: #FF3EA5; --accent-ink: #FFFFFF; --accent-soft: #FFE6F2; --label: #D1157A;
  --sun: #FFD45C; --sun-soft: #FFF1C7;
  --ink: #1E1C1A; --ink-fg: #FFFFFF;
  --warn: #9C5A00; --warn-soft: #FFF1C7; --good: #2C8A5C; --good-soft: #DDF3E7;
  --bad: #1E1C1A; --bad-soft: #FFE6F2;
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-num: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-script: var(--font-display);
  --r: 20px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #161412; --surface: #201D1A; --sunk: #2A2622; --line: #36312C;
  --fg: #F6F2EC; --body: #DCD5CC; --muted: #B3ABA2; --faint: #958D84;
  --accent: #FF5CB3; --accent-ink: #161412; --accent-soft: #3E2232; --label: #FF8CC9;
  --sun: #E8BC3E; --sun-soft: #3A3220; --ink: #F6F2EC; --ink-fg: #161412;
  --warn: #E3A55A; --warn-soft: #3B2C17; --good: #6CC79E; --good-soft: #173A2E; --bad: #F6F2EC; --bad-soft: #3E2232; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #161412; --surface: #201D1A; --sunk: #2A2622; --line: #36312C;
  --fg: #F6F2EC; --body: #DCD5CC; --muted: #B3ABA2; --faint: #958D84;
  --accent: #FF5CB3; --accent-ink: #161412; --accent-soft: #3E2232; --label: #FF8CC9;
  --sun: #E8BC3E; --sun-soft: #3A3220; --ink: #F6F2EC; --ink-fg: #161412;
  --warn: #E3A55A; --warn-soft: #3B2C17; --good: #6CC79E; --good-soft: #173A2E; --bad: #F6F2EC; --bad-soft: #3E2232; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.brand { font-family: var(--font-display); font-size: 22px; letter-spacing: .2px; white-space: nowrap; }
.brand small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.tabs { display: none; margin-left: auto; gap: 4px; }
.tabs button, .tabbar button { border: 0; background: transparent; padding: 8px 12px; border-radius: 999px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tabs button[aria-current="true"] { background: var(--accent-soft); color: var(--fg); }
.count { font-family: var(--font-num); font-size: 11px; background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 6px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabbar button { flex-direction: column; gap: 2px; font-size: 12px; padding: 6px 4px; border-radius: 8px; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-current="true"] { color: var(--accent); }
main { padding-block: 18px 110px; }
@media (min-width: 760px) {
  .tabs { display: flex; }
  .tabbar { display: none; }
  main { padding-bottom: 48px; }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
.lede { color: var(--muted); margin: 6px 0 0; max-width: 62ch; }
.section { display: grid; gap: 14px; margin-bottom: 28px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.btn { border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); padding-inline: 8px; }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip { flex: none; }
input[type="search"], input[type="text"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-height: 40px; width: 100%; }
textarea { min-height: 260px; font-family: var(--font-num); font-size: 13px; line-height: 1.6; }
label.f { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* recipe cards */
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 8px; text-align: left; width: 100%; min-width: 0; }
button.card:hover { border-color: var(--muted); }
.card .t { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.meta { font-size: 12.5px; color: var(--muted); }
.macros { display: flex; gap: 10px; font-family: var(--font-num); font-size: 12.5px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.macros b { font-weight: 500; color: var(--fg); }
.macros span { color: var(--muted); }
.star { color: var(--warn); }
.bar { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.miss { font-size: 12.5px; color: var(--muted); }
.miss b { color: var(--bad); font-weight: 600; }

/* pantry */
.pgroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pgroup h3 { font-family: var(--font-body); font-weight: 700; font-size: 12px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); padding: 10px 14px; background: var(--sunk); }
.pitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.pitem:first-of-type { border-top: 0; }
.pname { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pname .tag { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; margin-left: 6px; padding: 1px 6px; border-radius: 4px; }
.tag.low { background: var(--bad-soft); color: var(--bad); }
.tag.out { background: var(--sunk); color: var(--muted); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty input { width: 72px; text-align: right; font-family: var(--font-num); padding: 6px 8px; min-height: 36px; }
.qty .u { font-size: 13px; color: var(--muted); min-width: 42px; }
.step { width: 34px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font-weight: 700; }
.toggle { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; background: var(--surface); }
.toggle.on { background: var(--accent-soft); border-color: var(--accent); color: var(--fg); }
.toggle.off { color: var(--muted); }
.more { grid-column: 1 / -1; display: none; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); align-items: end; padding-top: 6px; }
.pitem.editing .more { display: grid; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 12px; }
.panel.tint { background: var(--accent-soft); border-color: transparent; }
.quick { display: grid; gap: 0; }
.qrow { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.qrow:first-child { border-top: 0; }
.qrow .uses { font-size: 12px; color: var(--muted); }

/* shopping */
.shop { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.srow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.srow:first-child { border-top: 0; }
.srow input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.srow.done .stext { text-decoration: line-through; color: var(--muted); }
.srow .restock { grid-column: 2 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.srow .restock input { width: 90px; }

/* sheet */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(10, 14, 10, .45); display: flex; justify-content: flex-end; }
.sheet .body { background: var(--bg); width: min(720px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet .bar-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 14px; position: sticky; top: -14px; background: var(--bg); padding-block: 8px; z-index: 1; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts div { padding: 10px; text-align: center; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts b { display: block; font-family: var(--font-num); font-size: 20px; font-weight: 500; }
.facts span { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ings { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.ings li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); align-items: baseline; }
.ings li:first-child { border-top: 0; }
.ings li.h { display: block; font-weight: 700; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); background: var(--sunk); padding-block: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; transform: translateY(1px); }
.dot.have { background: var(--accent); }
.dot.short { background: var(--warn); }
.dot.missing { border: 2px solid var(--bad); }
.dot.skip { background: var(--line); }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; max-width: 70ch; }
.steps li::marker { font-family: var(--font-num); color: var(--accent); }
.note { background: var(--warn-soft); border-radius: var(--r); padding: 10px 14px; font-size: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }

.review { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.rrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start; }
.rrow:first-child { border-top: 0; }
.rrow input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; }
.rrow .ctrl { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 6px; }
.rrow .ctrl .amt { display: flex; align-items: center; gap: 4px; }
.rrow .ctrl .amt input { text-align: right; font-family: var(--font-num); padding: 6px 8px; min-height: 36px; }
.rrow .ctrl select { padding: 6px 8px; min-height: 36px; }
.rrow .hint { grid-column: 2; font-size: 12px; color: var(--muted); }
.rrow.off .ctrl, .rrow.off .hint { opacity: .45; }

.empty { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.banner { background: var(--warn-soft); color: var(--fg); border-radius: var(--r); padding: 10px 14px; font-size: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.2); }
@media (min-width: 760px) { .toast { bottom: 28px; } }
@media (prefers-reduced-motion: no-preference) {
  .sheet .body { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* scan */
.scan { background: var(--fg); color: var(--bg); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.scan h2 { color: var(--bg); }
.scan p { margin: 0; color: var(--bg); opacity: .85; max-width: 62ch; }
.scan .modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.scan label.pick { display: grid; gap: 2px; border: 2px solid var(--accent); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: transparent; }
.scan label.pick:hover, .scan label.pick:focus-within { background: var(--accent); color: var(--accent-ink); }
.scan label.pick strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .8px; font-size: 14px; }
.scan label.pick span { font-size: 13px; opacity: .85; }
.scan input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.scanrev { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.scrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start; }
.scrow:first-child { border-top: 0; }
.scrow input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 9px; }
.scrow .fields { display: grid; gap: 6px; grid-template-columns: minmax(0, 2fr) minmax(70px, 1fr) minmax(90px, 1fr); }
.scrow .fields2 { grid-column: 2; display: grid; gap: 6px; grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr); }
.scrow input, .scrow select { padding: 6px 8px; min-height: 36px; }
.scrow .hint { grid-column: 2; font-size: 12px; color: var(--muted); }
.scrow.off .fields, .scrow.off .fields2, .scrow.off .hint { opacity: .45; }
@media (max-width: 520px) { .scrow .fields { grid-template-columns: 1fr 1fr; } .scrow .fields input[data-sc-name] { grid-column: 1 / -1; } .scrow .fields2 { grid-template-columns: 1fr; } }
.thinking { display: flex; gap: 10px; align-items: center; }
.thinking i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .thinking i { animation: pulse 1s ease-in-out infinite; } @keyframes pulse { 50% { transform: scale(.5); opacity: .5; } } }

/* me tab */
.targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tbox { border: 2px solid var(--fg); border-radius: var(--r); padding: 14px; display: grid; gap: 2px; background: var(--surface); }
.tbox.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tbox .lab { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.tbox .big { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tbox .sub { font-size: 13px; }
.form2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.excl { display: flex; flex-wrap: wrap; gap: 6px; }
.chip .x { margin-left: 6px; font-weight: 800; }
.fitbar { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.fitrow { display: grid; grid-template-columns: 90px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 13px; }
.fitrow .num { text-align: right; }
.warnflag { background: var(--fg); color: var(--bg); border-radius: var(--r); padding: 10px 14px; font-size: 14px; }
.warnflag b { color: var(--accent); }
.badge-fit { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.badge-ex { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; background: var(--fg); color: var(--bg); border-radius: 4px; padding: 1px 6px; }

/* dinner picker */
.dinner { background: var(--fg); color: var(--bg); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; }
.dinner h2 { color: var(--bg); font-size: 24px; }
.dinner .macros span, .dinner .macros b, .dinner .meta { color: var(--bg); }
.dinner .meta { opacity: .75; }
.dinner .why { font-size: 14px; opacity: .9; }
.dinner .why b { color: var(--accent); }
.dinner .btn { background: transparent; color: var(--bg); border-color: var(--bg); }
.dinner .btn.pink { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dinner .btn.ghost { border-color: transparent; color: var(--bg); }
.bigask { width: 100%; display: grid; gap: 4px; justify-items: start; text-align: left; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--r); padding: 20px; }
.bigask strong { font-family: var(--font-display); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: .6px; line-height: 1.1; }
.bigask span { font-size: 14px; }
.bigask:hover { filter: brightness(1.05); }
.toast { display: flex; gap: 12px; align-items: center; }
.toast button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 6px 14px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .5px; flex: none; }

/* cook mode */
.cook { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.cook > * { min-width: 0; }
.gather span { min-width: 0; overflow-wrap: anywhere; }
.cook header { background: var(--ink); color: var(--ink-fg); padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.cook header .ttl { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cook header button { background: transparent; color: var(--ink-fg); border: 1.5px solid var(--ink-fg); border-radius: 999px; padding: 6px 14px; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 12px; flex: none; }
.cook .prog { height: 6px; background: var(--sunk); }
.cook .prog i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.cook .main { overflow-y: auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 22px max(16px, env(safe-area-inset-left, 0px)); }
.cook .inner { max-width: 760px; margin: 0 auto; display: grid; gap: 18px; }
.cook .stepno { font-family: var(--font-script); color: var(--accent); font-size: 32px; line-height: 1; }
.cook .steptext { font-size: clamp(21px, 3.6vw, 30px); line-height: 1.45; font-weight: 400; max-width: 34ch; }
.cook .uses { display: flex; flex-wrap: wrap; gap: 6px; }
.cook .uses span { background: var(--sunk); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.cook .tbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.gather { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gather li { border-top: 1px solid var(--line); }
.gather li:first-child { border-top: 0; }
.gather label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; font-size: 17px; cursor: pointer; }
.gather input { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.gather li.h { padding: 8px 14px; background: var(--fg); color: var(--bg); font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .8px; }
.gather input:checked + span { text-decoration: line-through; color: var(--muted); }
.timers { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.timers:empty { display: none; }
.timer { display: inline-flex; gap: 8px; align-items: center; background: var(--fg); color: var(--bg); border-radius: 999px; padding: 6px 8px 6px 14px; font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.done { background: var(--accent); color: var(--accent-ink); }
.timer button { background: transparent; border: 0; color: inherit; font-weight: 800; padding: 2px 6px; }
.cook footer { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); background: var(--bg); }
.cook footer .btn { min-height: 56px; font-size: 15px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .cook .prog i { transition: none; } }


/* ---------- sign-in ---------- */
#auth { min-height: 100%; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.authcard { width: min(420px, 100%); display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; box-shadow: 0 10px 30px rgba(14, 20, 23, .06); }
.authbrand { justify-content: center; }
.authlogo { width: 44px; height: 44px; }
.authcard h1 { text-align: center; font-size: 26px; }
.authcard h1::after { margin-inline: auto; }
.oauth { display: grid; gap: 10px; }
.oauthbtn { justify-content: center; text-transform: none; letter-spacing: 0; font-size: 15px; min-height: 48px; background: var(--surface); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.authform { display: grid; gap: 12px; }
.authform .btn { justify-content: center; min-height: 48px; }
.authlinks { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.improw { text-align: left; background: none; border: 0; border-top: 1px solid var(--line); width: 100%; padding: 12px 0; color: inherit; }
.improw:first-child { border-top: 0; }
.improw:hover strong { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }


/* ---------- Getting started ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tour { position: fixed; inset: 0; z-index: 60; background: rgba(21, 23, 28, .45); display: grid; place-items: end center; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
.tour[hidden] { display: none !important; }
.tourcard { width: min(460px, 100%); background: var(--surface); border-radius: 18px; padding: 28px 24px 22px; display: grid; gap: 10px; justify-items: start; max-height: calc(100dvh - 32px); overflow: auto; border-top: 3px solid var(--accent); }
@media (min-width: 640px) { .tour { place-items: center; } }
.tourtiny { width: 84px; height: auto; justify-self: center; margin-bottom: 4px; }
.tourstep { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--label); }
.tourcard h2 { font-size: 30px; line-height: 1.1; letter-spacing: -0.015em; }
.tourbody { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--body); }
.tourdots { display: flex; gap: 6px; margin: 6px 0 4px; }
.tourdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tourdots i.on { background: var(--accent); width: 20px; border-radius: 4px; }
.tourbtns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.tourskip { justify-self: center; margin-top: 4px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .tourcard { animation: tourIn .28s ease-out; } @keyframes tourIn { from { transform: translateY(14px); opacity: 0; } } }

.guide { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px; padding: 20px 18px; }
.guide h2 { font-size: 24px; }
.guidelist { list-style: none; margin: 0; padding: 0; display: grid; }
.guidelist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-height: 56px; }
.guidelist li > span { flex: 1; color: var(--fg); font-weight: 700; font-size: 15px; }
.guidelist li i { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--fg); display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 900; }
.guidelist li.done > span { color: var(--muted); font-weight: 400; text-decoration: line-through; text-decoration-color: var(--line); }
.guidelist li.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.guide > .linkish { justify-self: start; }

/* ---------- cookbook import ---------- */
.bookbar { height: 8px; background: var(--sunk); border-radius: 999px; overflow: hidden; }
.bookbar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
@media (prefers-reduced-motion: reduce) { .bookbar i { transition: none; } }
.bookcount { margin: 0; font-size: 16px; color: var(--fg); }
.bookcount b { font-family: var(--font-display); font-weight: 500; font-size: 34px; letter-spacing: -0.02em; margin-right: 4px; }
.booklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.booklist li { padding: 10px 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 18px; color: var(--fg); }
.booklist li:first-child { animation: none; }

/* ---------- recipe photos ---------- */
.photopick { position: relative; cursor: pointer; }
.photopick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photoctl { gap: 16px; }
.card.hasimg { padding-top: 0; overflow: hidden; }
.cardimg { display: block; width: calc(100% + 28px); max-width: none; margin: 0 -14px 4px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sunk); }
.hero { margin: 0 0 4px; border-radius: 12px; overflow: hidden; background: var(--sunk); }
.hero img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero.small img { aspect-ratio: 16 / 10; }
@media (min-width: 760px) { .hero img { aspect-ratio: 16 / 9; } }
.dinner.hasimg { padding-top: 0; overflow: hidden; }
.dinnerimg { display: block; width: calc(100% + 36px); max-width: none; margin: 0 -18px 6px; aspect-ratio: 16 / 10; object-fit: cover; }

/* Recipe cards: small square photo on the left, name and details beside it */
.card.hasimg { grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; padding-top: 14px; overflow: visible; align-items: start; }
.card.hasimg > * { grid-column: 2; }
.card.hasimg > .cardimg { grid-column: 1; grid-row: 1 / span 4; width: 88px; height: 88px; margin: 0; aspect-ratio: 1; border-radius: 8px; object-fit: cover; }
.card.hasimg > .bar, .card.hasimg > .miss { grid-column: 1 / -1; }
.card.hasimg .t { font-size: 19px; line-height: 1.2; }
.card.hasimg .meta { font-size: 14px; }
@media (min-width: 640px) { .card.hasimg { grid-template-columns: 104px minmax(0, 1fr); } .card.hasimg > .cardimg { width: 104px; height: 104px; } }
.card.hasimg .macros { row-gap: 2px; column-gap: 10px; font-size: 13px; }
.card.hasimg { row-gap: 6px; }

/* ---------- Recipe Drop and feedback ---------- */
.badge-new { display: inline-block; font-family: var(--font-body); font-weight: 900; font-size: 11px; letter-spacing: .02em; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 8px; vertical-align: 4px; margin-right: 4px; }
.adminbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.adminbar > span { display: grid; gap: 2px; }
.adminbar.warn { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.fbbtn { margin-left: auto; flex: none; background: var(--surface); border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 7px 14px; font-family: var(--font-body); font-weight: 700; font-size: 14px; cursor: pointer; }
.fbbtn:hover { border-color: var(--fg); }
.fbcard { justify-items: stretch; }
.fbcard .photopick { justify-self: start; }
.fbthumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.inbox { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inbox li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 14px; display: grid; gap: 8px; }
.inbox li p { margin: 0; white-space: pre-wrap; color: var(--fg); }
.inbox li.done { border-left-color: var(--line); opacity: .7; }
.inbox .btn { justify-self: start; }

/* ---------- order emails ---------- */
.orderpanel { gap: 10px; }
.linkrow { background: none; border: 0; padding: 0; text-align: left; color: inherit; width: 100%; cursor: pointer; font: inherit; }
.linkrow > span:last-child { font-size: 24px; color: var(--muted); }
.orderbody { display: grid; gap: 12px; }
.addr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.addr code { font-size: 14px; background: var(--sunk); border-radius: 6px; padding: 8px 10px; word-break: break-all; color: var(--fg); }
.steps2 { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--body); }
.mailwait { border-left: 3px solid var(--accent); display: grid; gap: 10px; }

/* ---------- household ---------- */
.members { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.members li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- plan my week and sharing ---------- */
.weekcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; gap: 12px; }
.weeklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.weeklist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.weekrow { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; min-width: 0; flex: 1; }
.weekrow img, .weekrow .noimg { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--sunk); }
.weekrow strong { font-family: var(--font-display); font-weight: 500; font-size: 19px; color: var(--fg); }
.weekbtns { display: flex; gap: 12px; flex: none; }
.sharepanel { gap: 10px; border-color: var(--accent); }
.gotimg { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; }

/* ---------- community ---------- */
.feed { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.post img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--sunk); }
.postbody { padding: 14px 16px; display: grid; gap: 6px; }
.postbody h3 { font-size: 22px; }
.postbody p { margin: 0; }
.postmenu { margin-left: auto; }
.heart { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font: 700 15px var(--font-body); color: var(--fg); cursor: pointer; min-height: 40px; }
.heart[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.kcard .t { font-size: 22px; }
.toggle-row { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--fg); }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- challenge and tips ---------- */
.challenge { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px; padding: 18px; }
.chdots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chdots span { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); font-weight: 700; font-size: 13px; }
.chdots span.on { background: var(--accent); color: #fff; }
.chdots span.today { box-shadow: 0 0 0 2px var(--fg); }
.tipcard { background: var(--accent-soft); border-radius: 10px; padding: 16px 18px; display: grid; gap: 8px; }
.tipcard p { margin: 0; color: var(--fg); font-size: 16px; }


/* =====================================================================
   Happy Hanger family layer (Oct 25): Bricolage Grotesque headlines, Instrument Sans text,
   black pill buttons, soft gray chips, sunshine yellow for tonight and the active tab.
   ===================================================================== */
body { font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .card .t, .pname, strong { color: var(--fg); }
.wrap { max-width: 760px; }
main { padding-block: 6px 120px; }
h1, h2, h3 { font-family: var(--font-display); text-transform: none; font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(32px, 8.5vw, 44px); line-height: 1; letter-spacing: -.035em; }
h2 { font-size: 26px; line-height: 1.05; letter-spacing: -.03em; }
h3 { font-size: 19px; line-height: 1.15; letter-spacing: -.02em; }
.kicker { display: block; font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 14px; letter-spacing: -.01em; text-transform: none; color: var(--fg); margin: 0 0 4px; line-height: 1.2; }
.lede { font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--muted); margin-top: 8px; max-width: 46ch; }
.meta { font-family: var(--font-body); font-style: normal; font-size: 13.5px; color: var(--muted); }
.small { font-size: 14px; }
.section { gap: 14px; margin-bottom: 26px; }

/* Top bar: The spatula mark and the wordmark on the left, feedback and settings on the right */
body::before { background: var(--bg); z-index: 30; }
.top { position: sticky; top: 0; z-index: 25; background: var(--bg); border-bottom: 0; box-shadow: none; padding-top: max(6px, env(safe-area-inset-top, 0px)); margin-top: calc(-1 * env(safe-area-inset-top, 0px)); }
.top .wrap { gap: 10px; padding-block: 8px 6px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; font-size: 23px; line-height: 1; text-transform: none; color: var(--fg); white-space: nowrap; }
.brand small { display: none; }
.brandmark { height: 40px; width: auto; margin: -4px 0; flex: none; }
.brand .amp { color: var(--accent); }
.topbtns { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.topicon { background: none; border: 0; padding: 8px; color: var(--fg); border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.topicon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topicon[aria-current="true"] { color: var(--label); }
.fbbtn { display: none; }
.tabs { display: none !important; }

/* Bottom tabs on every screen size, active icon in a yellow pill */
.tabbar { display: block !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.tabbar .tabs-in { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--faint); box-shadow: none !important; border-radius: 0; position: relative; }
.tabbar button svg { width: 22px; height: 22px; padding: 3px 12px; border-radius: 999px; box-sizing: content-box; stroke-width: 1.6; }
.tabbar button[aria-current="true"] { color: var(--fg); font-weight: 700; }
.tabbar button[aria-current="true"] svg { background: var(--sun); color: var(--fg); }
.tabbar .count { position: absolute; top: 4px; left: calc(50% + 10px); font-size: 10.5px; padding: 0 5px; min-width: 18px; line-height: 16px; text-align: center; background: var(--accent); color: #fff; font-family: var(--font-body); font-weight: 700; border-radius: 999px; }
@media (min-width: 760px) { main { padding-bottom: 120px; } .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }

/* Buttons: black pills; pink only for the one thing to do, links are pink text */
.btn { appearance: none; border: 0; border-radius: 999px; padding: 11px 20px; min-height: 44px; background: var(--sunk); color: var(--fg); font-family: var(--font-body); font-weight: 600; font-size: 15px; letter-spacing: 0; text-transform: none; justify-content: center; text-decoration: none; }
.btn:hover { border-color: transparent; filter: brightness(.97); }
.btn.primary, .btn.pink { background: var(--ink); color: var(--ink-fg); border: 0; }
.btn.primary:hover, .btn.pink:hover { opacity: .9; filter: none; }
.btn.hot { background: var(--accent); color: #fff; }
.btn.ghost { background: none; color: var(--label); text-decoration: none; padding-inline: 10px; }
.btn.small { min-height: 38px; padding: 7px 16px; font-size: 14px; }
.btn.line { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.linkish { background: none; border: 0; padding: 0; color: var(--label); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.chip { appearance: none; border: 1.5px solid transparent; background: var(--sunk); border-radius: 999px; padding: 8px 14px; min-height: 38px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--fg); letter-spacing: 0; }
.chip:hover { border-color: transparent; filter: brightness(.97); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.chips { gap: 8px; }
.seg { display: flex; flex-wrap: nowrap; background: var(--sunk); border-radius: 999px; padding: 4px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px 12px; font-size: 15px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--ink-fg); font-weight: 600; }
input[type="search"], input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="url"], input[type="date"], select, textarea { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 16px; background: var(--surface); color: var(--fg); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { font-family: var(--font-body); }
label.f { font-weight: 600; color: var(--fg); font-size: 14px; }

/* Cards and panels */
.card, .panel, .pgroup, .shop, .ings, .gather, .review, .scanrev, .weekcard, .post, .fitbar { border-radius: var(--r); border-color: var(--line); }
.card { padding: 14px; gap: 6px; box-shadow: none; transition: none; }
button.card:hover { border-color: var(--fg); box-shadow: none; }
.card .t { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.15; letter-spacing: -.02em; }
.card.hasimg .t { font-size: 18px; }
.card.hasimg .meta { font-size: 13.5px; }
.card.hasimg > .cardimg { border-radius: 14px; }
.macros { font-family: var(--font-body); font-size: 13px; color: var(--muted); }
.macros b { font-family: var(--font-body); font-weight: 700; color: var(--fg); }
.star { color: var(--accent); }
.bar { height: 5px; background: var(--sunk); }
.bar i { background: var(--fg); }
.miss b { color: var(--fg); font-weight: 700; }
.panel { padding: 16px; }
.panel.tint, .note, .banner { background: var(--sun-soft); border: 0; border-radius: 16px; color: var(--fg); }
.warnflag { background: var(--accent-soft); color: var(--fg); border-radius: 16px; }
.warnflag b { color: var(--label); }
.empty { background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--r); color: var(--muted); }
.empty .tiny, img.tiny { width: 72px; height: auto; display: block; margin: 0 auto 6px; }
.badge-fit { background: var(--good-soft); color: var(--good); font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: 2px; }
.badge-ex { background: var(--sunk); color: var(--muted); font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.badge-new { background: var(--accent); color: #fff; }
.badge-book { display: inline-block; background: var(--sunk); color: var(--muted); font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pgroup h3, .ings li.h, .gather li.h { font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 15px; letter-spacing: -.01em; text-transform: none; color: var(--fg); background: var(--sunk); border-bottom: 0; }
.tag.low { background: var(--accent-soft); color: var(--label); }
.tag.out { background: var(--sunk); color: var(--muted); }
.pname .tag { text-transform: none; letter-spacing: 0; font-size: 12px; border-radius: 999px; }
.toggle.on { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.step { border-radius: 10px; }
.dot.have { background: var(--good); }
.dot.missing { border-color: var(--fg); }
.steps li::marker { font-family: var(--font-display); font-weight: 700; color: var(--label); }
.facts { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.facts div { border-left: 1px solid var(--line); background: transparent; }
.facts div:first-child { border-left: 0; background: var(--sun-soft); }
.facts b { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.03em; color: var(--fg); }
.facts span { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tbox { border: 1px solid var(--line); border-radius: var(--r); }
.tbox.hot { background: var(--sun-soft); border-color: transparent; color: var(--fg); }
.tbox .lab { font-family: var(--font-body); font-weight: 600; font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.tbox .big { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; }
.low-panel { background: var(--accent-soft) !important; border: 0; color: var(--fg); }
.low-panel .btn { background: var(--ink); color: var(--ink-fg); }
.scan { background: var(--sunk) !important; color: var(--fg); border: 0; border-radius: var(--r); }
.scan h2, .scan p { color: var(--fg); opacity: 1; }
.scan p { color: var(--muted); }
.scan label.pick { border: 0; background: var(--surface); color: var(--fg); border-radius: 16px; }
.scan label.pick strong { font-family: var(--font-display); font-weight: 700; text-transform: none; letter-spacing: -.01em; font-size: 17px; }
.scan label.pick span { color: var(--muted); opacity: 1; }
.scan label.pick:hover, .scan label.pick:focus-within { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.thinking i { background: var(--accent); }
.toast { background: var(--ink); color: var(--ink-fg); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 500; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.toast button { background: var(--accent); color: #fff; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 13px; }

/* Today */
.hello { display: grid; gap: 6px; margin: 4px 0 22px; }
.hello .kicker { margin: 0; }
.tonight { background: var(--sun); border-radius: 28px; padding: 14px; display: grid; gap: 12px; }
.tonight .tin { background: var(--surface); border-radius: 20px; padding: 16px; display: grid; gap: 8px; }
.tonight .tonimg { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; display: block; }
.tonight h2 { font-size: 24px; }
.tonight .why { font-size: 14.5px; color: var(--body); }
.tonight .why b { color: var(--fg); }
.tonight .label { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 4px 0; color: #1E1C1A; }
.tonight .label strong { color: #1E1C1A; font-family: var(--font-display); font-size: 15px; }
.tonight .label .pill { background: rgba(255,255,255,.7); color: #1E1C1A; }
.tonight .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tonight .acts .btn { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.tonight .acts .btn.primary { background: var(--ink); color: var(--ink-fg); box-shadow: none; }
.bigask { width: 100%; display: grid; gap: 4px; justify-items: start; text-align: left; background: var(--sun); color: #1E1C1A; border: 0; border-radius: 28px; padding: 22px 20px; cursor: pointer; }
.bigask strong { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -.035em; text-transform: none; line-height: 1.05; color: #1E1C1A; }
.bigask span { font-size: 15px; color: #3F3B37; }
.bigask:hover { filter: brightness(1.02); }
.tipstrip { display: flex; gap: 10px; align-items: flex-start; background: var(--sunk); border-radius: 18px; padding: 12px 14px; position: relative; }
.tipstrip .bulb { flex: none; width: 26px; height: 26px; color: var(--fg); margin-top: 1px; }
.tipstrip p { margin: 0; color: var(--fg); font-size: 15px; line-height: 1.45; padding-right: 22px; }
.tipstrip .row { margin-top: 6px; gap: 14px; }
.dis { position: relative; }
.card-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; z-index: 1; }
.card-x:hover, .card-x:focus-visible { background: var(--line); color: var(--fg); }
.guide, .challenge, .weekcard { background: var(--surface); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.guide h2, .challenge h2 { font-size: 24px; }
.guidelist li > span { font-weight: 600; }
.guidelist li > button.golink { flex: 1; text-align: left; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--fg); cursor: pointer; }
.guidelist li > button.golink:hover { color: var(--label); }
.guidelist li i { border-color: var(--line); border-width: 2px; }
.guidelist li.done > span { color: var(--muted); font-weight: 400; text-decoration: line-through; text-decoration-color: var(--fg); text-decoration-thickness: 1px; }
.guidelist li.done i { background: var(--sun); border-color: var(--sun); color: #1E1C1A; }
.chdots span.on { background: var(--sun); color: #1E1C1A; }
.tipcard { background: var(--sunk); border-radius: 18px; }

/* Plan */
.ways { display: grid; gap: 8px; }
.way { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; cursor: pointer; color: inherit; font: inherit; }
.way:hover { border-color: var(--fg); }
.way strong { font-family: var(--font-display); font-size: 18px; letter-spacing: -.02em; }
.way span { grid-column: 1; color: var(--muted); font-size: 14px; }
.way::after { content: "›"; grid-column: 2; grid-row: 1 / span 2; font-size: 24px; color: var(--faint); }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pickgrid button { display: grid; gap: 6px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 8px; cursor: pointer; font: inherit; color: var(--fg); }
.pickgrid button img, .pickgrid button .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--sunk); display: block; }
.pickgrid button span { font-weight: 600; font-size: 14px; line-height: 1.25; }
.pickgrid button[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.weekrow strong { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.weekrow img, .weekrow .noimg { border-radius: 12px; }
.emptyday { color: var(--muted); font-style: normal; }

/* + button on Recipes */
.fab { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 19; width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0 0 3px; background: var(--accent); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.22); display: grid; place-items: center; }
.fab:active { transform: scale(.94); }
@media (min-width: 800px) { .fab { right: calc(50% - 380px + 16px); } }

/* Sheets and pop-ups */
.sheet { background: rgba(30, 28, 26, .42); z-index: 40; }
.sheet .body { background: var(--bg); }
.sheet .bar-top { background: var(--bg); }
.hero { border-radius: 20px; cursor: zoom-in; }
.tour { background: rgba(30, 28, 26, .42); }
.tourcard { border-radius: 28px; border-top: 0; }
.tourcard h2 { font-size: 28px; letter-spacing: -.035em; }
.tourstep { font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 14px; color: var(--label); }
.tourdots i.on { background: var(--fg); }
.tourbody { color: var(--body); }
.adminbar.warn { border-color: var(--accent); background: var(--accent-soft); }
.sharepanel { border-color: var(--line); }
.inbox li { border-left: 3px solid var(--sun); }
.heart[aria-pressed="true"] { color: var(--label); border-color: var(--accent); }
.postbody h3 { font-size: 20px; }
.kcard .t { font-size: 19px; }
.booklist li { font-family: var(--font-body); font-size: 16px; }
.bookcount b { font-family: var(--font-display); font-weight: 700; }
.bookbar i { background: var(--fg); }

/* Cook mode */
.cook header { background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--line); }
.cook header .ttl { font-family: var(--font-display); font-weight: 700; text-transform: none; letter-spacing: -.02em; font-size: 17px; }
.cook header button { color: var(--fg); border-color: var(--line); font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.cook .prog i { background: var(--sun); }
.cook .stepno { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--label); }
.cook .steptext { font-family: var(--font-body); font-size: clamp(21px, 3.6vw, 28px); line-height: 1.45; color: var(--fg); }
.timer { font-family: var(--font-body); background: var(--ink); color: var(--ink-fg); }
.timer.done { background: var(--sun); color: #1E1C1A; }
.cook footer .btn.pink { background: var(--ink); color: var(--ink-fg); }

/* Sign-in */
.authcard { border-radius: 28px; box-shadow: none; border: 1px solid var(--line); }
.authcard h1 { font-size: 32px; }
.authbrand { flex-direction: column; gap: 6px; font-size: 26px; }
.authlogo { height: 96px; width: auto; }
.oauthbtn { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }

/* Full-screen photo with pinch to zoom */
.zoom { position: fixed; inset: 0; z-index: 70; background: #0d0c0b; touch-action: none; overflow: hidden; }
.zoom img { position: absolute; left: 50%; top: 50%; max-width: 100vw; max-height: 100vh; transform-origin: center; user-select: none; -webkit-user-drag: none; }
.zoom .zx { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 26px; cursor: pointer; z-index: 1; }

/* Pull to refresh and offline */
.ptr { position: fixed; left: 50%; top: calc(60px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -80px); z-index: 24; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--fg); box-shadow: 0 4px 14px rgba(0,0,0,.08); transition: transform .15s; pointer-events: none; }
.offline { background: var(--sunk); color: var(--fg); border-radius: 14px; padding: 8px 12px; font-size: 14px; margin-bottom: 12px; }
.srcpick { display: grid; gap: 8px; }
.srcpick .chips { flex-wrap: wrap; }

/* =====================================================================
   Easier to use (Oct 25 UX pass): nothing smaller than 13px, darker grays,
   every tap target at least 44px tall, and a Larger / Largest text setting.
   ===================================================================== */
:root { --muted: #5F5952; --faint: #7A746D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --muted: #C2BAB1; --faint: #A39B92; } }
.tabbar button { font-size: 13px; }
.miss, .meta, .macros, .card.hasimg .macros { font-size: 13.5px; }
.badge-fit, .badge-ex, .pill, .badge-book, .pname .tag, .qrow .uses, .legend { font-size: 13px; }
.tabbar .count { font-size: 11.5px; line-height: 17px; min-width: 19px; }
.linkish { min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px; }
.row .linkish, .spread .linkish { min-height: 40px; }
.chip { min-height: 42px; }
.btn.small { min-height: 40px; }
.step { width: 44px; height: 44px; }
.qty input { min-height: 44px; }
.toggle { min-height: 40px; }
.guidelist li > button.golink { min-height: 44px; }
.weekbtns { gap: 6px; align-items: center; }
.weekbtns .btn.small { padding: 6px 14px; }
.shop.pgroup { margin-bottom: 4px; }
.shop.pgroup h3 { padding: 10px 14px; }
.srow input[type=checkbox] { width: 26px; height: 26px; }
.seg button { min-height: 40px; }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--fg); }
html[data-text="larger"] main, html[data-text="larger"] .sheet .body, html[data-text="larger"] .tour, html[data-text="larger"] .cook { zoom: 1.12; }
html[data-text="largest"] main, html[data-text="largest"] .sheet .body, html[data-text="largest"] .tour, html[data-text="largest"] .cook { zoom: 1.25; }
.card-x { width: 40px; height: 40px; top: 4px; right: 4px; }
.panel .row.small a { display: inline-flex; min-height: 40px; align-items: center; }
.seg.grid2 { display: grid; grid-template-columns: 1fr 1fr; border-radius: 24px; }
.tabbar .tabs-in { grid-template-columns: repeat(var(--tabs, 5), 1fr); }
.protein .big2 { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.03em; color: var(--fg); }
.protein .bar { height: 10px; }
.protein .bar i { background: var(--good); }
.topicon { padding: 7px; }

/* Meal of the day, history and get-togethers (Nov 1) */
.pill.sun { background: var(--sun); color: #1E1C1A; }
.pill.good { background: var(--good-soft); color: var(--good); }
.vibe { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.altcard { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 10px; align-items: start; }
.altcard:not(:has(img)) { grid-template-columns: 1fr; }
.altcard img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.altcard b { font-family: var(--font-display); font-size: 16px; letter-spacing: -.02em; color: var(--fg); }
details.quiet summary { cursor: pointer; color: var(--label); font-weight: 600; font-size: 14px; min-height: 40px; display: flex; align-items: center; }
details.quiet[open] summary { color: var(--fg); }
.hcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.hcal > b { font-size: 13px; color: var(--muted); font-weight: 600; }
.hday { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0; overflow: hidden; display: grid; place-items: center; font: inherit; color: var(--fg); cursor: pointer; }
.hday.on { background: var(--sun-soft); border-color: transparent; }
.hday.today { box-shadow: inset 0 0 0 2px var(--fg); }
.hday img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hday .dn { position: absolute; top: 3px; left: 5px; font-size: 12px; font-weight: 700; z-index: 1; text-shadow: 0 0 3px #fff; }
.hday i { font-style: normal; font-weight: 800; }
.hday i.out { font-size: 11px; color: var(--muted); font-weight: 600; }
.recap { gap: 4px; }
.pickgrid button .small { font-weight: 500; }
input[type="date"] { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 16px; background: var(--surface); color: var(--fg); min-height: 44px; width: 100%; }
.ptr { opacity: 0; }
.members li .row { flex-wrap: nowrap; gap: 6px; }
.members li .row .btn.small { padding: 6px 12px; min-width: 40px; }
.vibe > .btn.line { justify-self: start; }
.avatar { width: 32px; height: 32px; border-radius: 999px; background: var(--label, #FFD45C); color: #1E1C1A; font-weight: 800; font-size: 15px; display: grid; place-items: center; border: 2px solid #1E1C1A; }
.topicon[aria-current="true"] .avatar { background: #FF3EA5; color: #fff; }
/* profile button and menu, matching the other Happy apps */
#meMenu { position: absolute; right: max(12px, env(safe-area-inset-right, 0px)); top: calc(100% - 4px); z-index: 40; }
.mebox { background: #fff; border: 1px solid var(--line, #ECE8E2); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 8px; min-width: 240px; display: grid; }
.mebox button, .mebox a { font: inherit; text-align: left; background: none; border: 0; color: var(--fg, #1E1C1A); padding: 12px; border-radius: 12px; cursor: pointer; text-decoration: none; font-weight: 600; }
.mebox button:hover, .mebox a:hover { background: var(--soft, #F4F2EE); }
.mebox .medel { color: #B42318; }
.mehead { display: flex; gap: 10px; align-items: center; padding: 8px 12px 12px; border-bottom: 1px solid var(--line, #ECE8E2); margin-bottom: 4px; }
.mehead small { display: block; color: var(--muted, #6B655E); font-size: 13px; }
.mecircle { width: 36px; height: 36px; border-radius: 50%; background: #FFD45C; display: grid; place-items: center; font-weight: 700; }

/* People (admin back end) */
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prow { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; color: inherit; font: inherit; cursor: pointer; }
.prow:hover { border-color: #FF3EA5; }
.pmain, .pside { display: grid; gap: 2px; min-width: 0; }
.pmain small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pside { text-align: right; }
.pside small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ptags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ptag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--fg); }
.ptag.client, .ptag.pro { background: #FF3EA5; color: #fff; }
.ptag.warn { background: #FFF1C7; color: #6b4e00; }
.phead { display: flex; gap: 14px; align-items: center; }
.phead h1 { margin: 0; }
.mecircle.big { width: 56px; height: 56px; font-size: 24px; flex: none; }
.pbody h3 { margin: 16px 0 6px; font-size: 15px; }
.precipes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.precipes > li { grid-template-columns: 96px 1fr; align-items: start; gap: 12px; }
.precipes img, .pnoimg { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--sunk); }
.precipes b { display: block; }
.precipes details { margin: 6px 0; }
.pplan { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pplan li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.pdl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0; }
.pdl dt { color: var(--muted); }
.pdl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .prow { grid-template-columns: 36px 1fr; } .pside { grid-column: 2; text-align: left; } }
.pbtns { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pbtns .linkish { padding: 4px 0; }
.actbar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 10px 16px; background: #FF3EA5; color: #fff; font-size: 14px; text-align: center; }
.actbar button { appearance: none; border: 0; border-radius: 999px; background: #fff; color: #FF3EA5; font: inherit; font-weight: 700; padding: 6px 14px; cursor: pointer; }
.pwork { display: grid; gap: 6px; margin: 4px 0 8px; }
.pwork .btn { justify-self: start; }
