:root {
  --bg: #F4F7F4;
  --surface: #FFFFFF;
  --surface-2: #EEF3EF;
  --ink: #18241C;
  --ink-2: #5E6B62;
  --ink-3: #8A958D;
  --line: #E2E9E3;
  --accent: #2E9A5C;
  --accent-ink: #FFFFFF;
  --accent-soft: #E4F3EA;
  --accent-deep: #1F7444;
  --star: #E0A82E;
  --warm: #C9603E;
  --warm-soft: #FBEAE3;
  --shadow: 0 1px 2px rgba(24, 36, 28, .05), 0 6px 20px rgba(24, 36, 28, .06);
  --radius: 16px;
  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --tabs-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121714; --surface: #1B221D; --surface-2: #222B25; --ink: #E9F0EA; --ink-2: #A5B2A9; --ink-3: #7D8A81;
    --line: #2C3730; --accent: #4CC07D; --accent-ink: #0B1E12; --accent-soft: #1E3326; --accent-deep: #7AD9A1;
    --warm: #EC8C6B; --warm-soft: #3A251E; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121714; --surface: #1B221D; --surface-2: #222B25; --ink: #E9F0EA; --ink-2: #A5B2A9; --ink-3: #7D8A81;
  --line: #2C3730; --accent: #4CC07D; --accent-ink: #0B1E12; --accent-soft: #1E3326; --accent-deep: #7AD9A1;
  --warm: #EC8C6B; --warm-soft: #3A251E; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: var(--accent-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.boot { padding: 40vh 0 0; text-align: center; color: var(--ink-2); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); }
.section-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 8px; border-bottom: 2px solid var(--accent); margin: 28px 0 14px; }

/* Header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-inner { max-width: 1120px; margin: 0 auto; height: 56px; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.brand { font-weight: 800; font-size: 17px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 800; }
.tagline { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-links { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top-links a.link { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.top-links a.link.on { color: var(--accent-deep); background: var(--accent-soft); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; margin-left: 4px; }

/* Bottom tabs on phones */
.tabs { display: none; }
@media (max-width: 759px) {
  :root { --tabs-h: 62px; }
  .tagline, .top-links .link { display: none; }
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-2); font-size: 12px; font-weight: 600; position: relative; }
  .tabs a svg { width: 24px; height: 24px; }
  .tabs a.on { color: var(--accent-deep); }
  .tabs .count { position: absolute; top: 6px; left: calc(50% + 8px); margin: 0; }
}

.page { max-width: 1120px; margin: 0 auto; padding: 20px 16px calc(40px + var(--tabs-h) + env(safe-area-inset-bottom)); }
.narrow { max-width: 860px; }
.recipe-page { max-width: 820px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.big { min-height: 50px; padding: 0 26px; font-size: 16px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.danger { color: var(--warm); background: var(--warm-soft); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }

/* Build your week */
.build { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 22px; max-width: 880px; margin: 0 auto; }
.build h1 { font-size: 24px; font-weight: 800; }
.build .lead { color: var(--ink-2); font-size: 15px; margin: 6px 0 18px; }
.build-row { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-end; }
.ctl-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-2); }
.stepper .v { min-width: 34px; text-align: center; font-weight: 800; font-size: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.build .go { margin-left: auto; }
.excl { margin-top: 20px; }
.excl .hint { font-size: 12px; color: var(--ink-3); text-transform: none; letter-spacing: 0; font-weight: 500; }
@media (max-width: 759px) {
  .build { padding: 18px 16px; border-radius: 18px; }
  .build-row { gap: 16px; }
  .build-row > div:nth-child(1), .build-row > div:nth-child(2) { flex: 1; }
  .build-row > div:nth-child(3) { width: 100%; }
  .seg { display: flex; }
  .seg button { flex: 1; }
  .build .go { width: 100%; margin: 0; }
  .build .go .btn { width: 100%; }
}

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink); min-height: 34px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.x.on { background: var(--warm-soft); color: var(--warm); border-color: var(--warm); text-decoration: line-through; }
.chip-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
@media (max-width: 759px) {
  .chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .chips.scroll::-webkit-scrollbar { display: none; }
}

/* Browse */
.browse { margin-top: 32px; }
.browse h2 { font-size: 21px; font-weight: 800; }
.browse .lead { color: var(--ink-2); font-size: 13px; margin: 4px 0 14px; }
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.input, select.input, textarea.input { min-height: 42px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; outline: none; width: 100%; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tools .search { flex: 1 1 240px; }
.tools select.input { width: auto; flex: none; font-size: 14px; }
textarea.input { min-height: 140px; line-height: 1.5; resize: vertical; }
.showing { font-size: 13px; color: var(--ink-2); margin: 4px 0 10px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 759px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rc { display: flex; flex-direction: column; cursor: pointer; position: relative; }
.rc.dim { opacity: .55; }
.rc .img { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; overflow: hidden; }
.rc .img img { width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 30px; font-weight: 800; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); }
.badge { position: absolute; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.94); color: #1F7444; }
.badge.cat { top: 8px; left: 8px; }
.badge.time { bottom: 8px; left: 8px; text-transform: none; letter-spacing: 0; font-size: 12px; color: #18241C; display: inline-flex; gap: 4px; align-items: center; }
.badge.time svg { width: 12px; height: 12px; }
.badge.week { top: 8px; right: 8px; background: var(--accent); color: #fff; }
.badge.rest { top: 8px; right: 8px; background: var(--warm); color: #fff; }
.rc .body { padding: 12px 12px 10px; display: flex; flex-direction: column; flex: 1; }
.rc .t { font-weight: 700; font-size: 15px; line-height: 1.25; }
.rc .ing { font-size: 12px; color: var(--ink-2); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); }
.macros { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.macros b { color: var(--ink); font-size: 13px; }
.macros .m { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-weight: 600; }
.macros .m.p { background: var(--accent-soft); color: var(--accent-deep); }
.rc .foot { display: flex; gap: 6px; align-items: center; padding: 0 12px 12px; }
.circle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; padding: 0; color: var(--ink-3); flex: none; }
.circle svg { width: 16px; height: 16px; }
.circle.star.on { color: var(--star); border-color: var(--star); }
.circle.star.on svg { fill: currentColor; }
.circle.down.on { color: var(--warm); border-color: var(--warm); background: var(--warm-soft); }
.add-pill { margin-left: auto; border: 1px solid var(--accent); color: var(--accent-deep); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.add-pill.on { background: var(--accent); color: var(--accent-ink); }
.add-pill svg { width: 14px; height: 14px; }
@media (max-width: 759px) {
  .rc .t { font-size: 14px; }
  .rc .body { padding: 10px 10px 8px; }
  .rc .foot { padding: 0 10px 10px; }
  .rc .tags { display: none; }
  .add-pill span { display: none; }
  .macros .tiny { display: none; }
}
.more { display: flex; justify-content: center; margin: 22px 0 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }

/* Hand-pick bar */
.pickbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--tabs-h) + env(safe-area-inset-bottom)); z-index: 25; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 8px 8px 8px 18px; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.25); font-weight: 600; font-size: 14px; white-space: nowrap; }
.pickbar .btn { min-height: 36px; }

/* Recipe page */
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; }
.back svg { width: 14px; height: 14px; }
.hero { margin: 14px 0 18px; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 7; background: var(--surface-2); position: relative; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 759px) { .hero { aspect-ratio: 4 / 3; margin: 12px -16px 16px; border-radius: 0; } }
.recipe-page h1 { font-size: 30px; font-weight: 800; margin: 6px 0 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stats > div { padding: 12px 6px; text-align: center; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats .v { font-weight: 800; font-size: 17px; }
.stats .k { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.stats.nut { background: var(--accent-soft); border-color: transparent; margin-top: 8px; }
.stats.nut > div { border-color: color-mix(in srgb, var(--accent) 18%, transparent); }
.stats.nut .v.cal { color: var(--accent-deep); }
.mbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 12px 0 6px; max-width: 320px; background: var(--surface-2); }
.mbar i { display: block; }
.mlegend { display: flex; gap: 12px; font-size: 12px; color: var(--ink-2); }
.mlegend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--c); }
.fine { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; }
.two { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; margin-top: 20px; }
@media (max-width: 759px) { .two { grid-template-columns: 1fr; gap: 8px; } }
.col-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 8px; border-bottom: 2px solid var(--accent); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.ings { list-style: none; margin: 0; padding: 0; }
.ings li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; cursor: pointer; }
.ings li b { font-weight: 800; }
.ings li.done { color: var(--ink-3); text-decoration: line-through; }
.ings li.head { font-weight: 800; border: 0; padding-top: 14px; cursor: default; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 8px 0; font-size: 15px; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font-weight: 700; font-size: 12px; margin-top: 1px; }
.steps li.head { font-weight: 800; counter-increment: none; }
.steps li.head::before { display: none; }
.notes { white-space: pre-wrap; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.manage { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }

/* Your week */
.week-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.week-head h1 { font-size: 24px; font-weight: 800; }
.week-head .sub { color: var(--ink-2); font-size: 13px; }
.week-head .btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 759px) { .week-head .btns { margin: 0; width: 100%; } .week-head .btns .btn { flex: 1; padding: 0 10px; } }
.days { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
@media (max-width: 900px) {
  .days { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px -16px 0; padding: 0 16px 6px; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .days > * { flex: 0 0 min(64%, 240px); scroll-snap-align: start; }
}
.dc { display: flex; flex-direction: column; }
.dc .dh { white-space: nowrap; display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--accent-deep); }
.dc .dh .sp { flex: 1; }
.mini { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--ink-2); display: inline-flex; gap: 3px; align-items: center; letter-spacing: .02em; }
.mini svg { width: 11px; height: 11px; }
.mini.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mini.swap { color: var(--accent-deep); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dc .img { aspect-ratio: 4 / 3; position: relative; background: var(--surface-2); cursor: pointer; }
.dc .img img { width: 100%; height: 100%; object-fit: cover; }
.dc .body { padding: 10px 10px 4px; cursor: pointer; }
.dc .t { font-weight: 700; font-size: 14px; line-height: 1.25; }
.dc .m { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.dc .foot { display: flex; gap: 6px; padding: 8px 10px 10px; margin-top: auto; }
.dc.add { border-style: dashed; box-shadow: none; display: grid; place-items: center; text-align: center; min-height: 200px; padding: 16px; color: var(--ink-2); background: transparent; gap: 8px; align-content: center; }

.acc { margin-bottom: 10px; }
.acc summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc .dn { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--accent-deep); width: 44px; flex: none; }
.acc .th { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); position: relative; overflow: hidden; }
.acc .th .ph { font-size: 16px; }
.acc .tt { font-weight: 700; flex: 1; min-width: 0; }
.acc .tm { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.acc .chev { width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s; flex: none; }
.acc[open] .chev { transform: rotate(180deg); }
.acc .strip { display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: var(--accent-soft); font-size: 13px; flex-wrap: wrap; }
.acc .strip .m { background: var(--surface); padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.acc .inner { padding: 4px 14px 16px; }
.acc .inner .two { margin-top: 10px; }
@media (max-width: 759px) { .acc .tm { display: none; } .acc .dn { width: auto; } }

.shop-intro { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.shop { padding: 16px; }
.shop-add { display: flex; gap: 8px; margin-bottom: 16px; }
.sections { columns: 3 260px; column-gap: 18px; }
.sec { break-inside: avoid; margin-bottom: 18px; }
.sec h3 { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-soft); padding: 7px 10px; border-radius: 8px; margin-bottom: 4px; }
.it { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.it:last-child { border-bottom: 0; }
.it .box { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--ink-3); flex: none; margin-top: 1px; display: grid; place-items: center; }
.it .box svg { width: 13px; height: 13px; opacity: 0; color: var(--accent-ink); }
.it.done .box { background: var(--accent); border-color: var(--accent); }
.it.done .box svg { opacity: 1; }
.it.done .txt { color: var(--ink-3); text-decoration: line-through; }
.it .txt b { font-weight: 800; }
.it .x { margin-left: auto; border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0 4px; font-size: 16px; }
.to-taste { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.week-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* Forms */
.form { display: grid; gap: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.two-f { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 759px) { .two-f { grid-template-columns: 1fr 1fr; } }

/* Sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 18, 13, .45); z-index: 40; animation: fade .15s ease-out; }
.sheet { position: fixed; z-index: 41; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); background: var(--bg); border-radius: 20px 20px 0 0; max-height: 88vh; overflow-y: auto; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@media (min-width: 760px) { .sheet { bottom: auto; top: 12vh; border-radius: 20px; } }
.sheet h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.err { color: var(--warm); font-size: 14px; min-height: 20px; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 50%; bottom: calc(20px + var(--tabs-h) + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100% - 32px); display: flex; gap: 12px; align-items: center; }
#toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
#toast button { background: none; border: 0; color: #8FE0B0; font-weight: 700; cursor: pointer; padding: 4px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .box { width: 100%; max-width: 380px; text-align: center; }
.login img { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 18px; }
.login h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.login form { margin-top: 24px; display: grid; gap: 12px; }

.spinner { width: 16px; height: 16px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
footer.foot { text-align: center; font-size: 12px; color: var(--ink-3); padding: 24px 0 calc(24px + var(--tabs-h)); }

@media print {
  .top, .tabs, .no-print, #toast, .pickbar, footer.foot { display: none !important; }
  body { background: #fff; color: #000; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; }
  .days { display: grid !important; grid-template-columns: repeat(5, 1fr); margin: 10px 0 0 !important; padding: 0 !important; }
  .acc { break-inside: avoid; }
  .acc .chev { display: none; }
  .sections { columns: 3; }
  .it { padding: 2px 0; font-size: 12px; border: 0; }
}
