/* Kitchen — one shared visual system. Components own their borders and controls. */
:root {
  color-scheme: light;
  --canvas: #f5f5f0;
  --surface: #fff;
  --surface-soft: #f5f7f3;
  --ink: #334239;
  --ink-strong: #1e3027;
  --muted: #69756c;
  --line: #e3e8e0;
  --line-strong: #cdd7cc;
  --accent: #356548;
  --accent-deep: #244e36;
  --accent-soft: #eaf1e7;
  --gold: #895d2a;
  --gold-soft: #faf1df;
  --danger: #a33c32;
  --danger-soft: #fff0ed;
  --focus: #356548;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 4px 20px rgb(30 48 39 / 3%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.65;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); scroll-padding-top: 100px; }
body { min-height: 100dvh; margin: 0; background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-deep); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
button, .button, input, select, textarea { border-radius: var(--radius-sm); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
:where(h1, h2, h3, p) { margin-top: 0; }
h1, h2, h3 { color: var(--ink-strong); text-wrap: pretty; }
h1 { margin-bottom: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.3; letter-spacing: -.035em; }
h2 { font-size: 22px; line-height: 1.4; }
h3 { font-size: 18px; line-height: 1.5; }
svg { display: block; flex: 0 0 auto; }
.ui-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 200; padding: 10px 14px; border-radius: 8px; color: white; background: var(--ink-strong); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* Shared frame */
.app-shell { min-height: 100dvh; padding-bottom: 48px; }
.app-bar { width: min(100% - 64px, 1160px); height: 96px; display: flex; align-items: center; justify-content: space-between; margin: auto; border-bottom: 1px solid var(--line); }
.app-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-strong); text-decoration: none; }
.app-brand__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: white; background: var(--accent-deep); }
.app-brand strong { font-size: 21px; letter-spacing: -.03em; }
.app-bar__action { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: transparent; font-size: 14px; font-weight: 600; text-decoration: none; }
.app-bar__action .ui-icon { width: 17px; height: 17px; }
.content { width: min(100% - 64px, 820px); margin: auto; padding: 36px 0 48px; }
.content--wide, .content--today { width: min(100% - 64px, 1160px); }
.bottom-nav { position: absolute; top: 25px; left: 50%; display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #e9ede5; transform: translateX(-50%); z-index: 20; }
.bottom-nav a { min-width: 100px; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; border-radius: 10px; color: #657263; font-size: 14px; font-weight: 650; line-height: 1.4; text-decoration: none; }
.bottom-nav .ui-icon { width: 18px; height: 18px; }
.bottom-nav a[aria-current="page"] { color: var(--accent-deep); background: white; box-shadow: 0 1px 4px rgb(30 48 39 / 6%); }
.page-head { margin-bottom: 28px; }
.page-intro { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.serial { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .1em; }
.flash-stack { display: grid; gap: 8px; margin-bottom: 20px; }
.flash-stack p { margin: 0; padding: 13px 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); }
.back-link, .k-back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 16px; font-size: 15px; font-weight: 600; text-decoration: none; }

/* Today: an open date header, a single boundary for each meal. */
.k-day-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: end; margin-bottom: 30px; }
.k-day-eyebrow { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.k-day-row { grid-column: 1; grid-row: 2; }
.k-day-date { font-size: clamp(32px, 4vw, 42px); line-height: 1.25; font-weight: 750; letter-spacing: -.045em; }
.k-day-date small { margin-left: 12px; color: var(--muted); font-size: 18px; font-weight: 500; letter-spacing: 0; }
.k-day-meta { color: var(--muted); font-size: 14px; }
.k-day-head > .k-day-meta { grid-column: 1; grid-row: 3; }
.k-pager { grid-column: 2; grid-row: 2 / 4; display: flex; gap: 8px; align-self: center; }
.k-pager a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 25px; text-decoration: none; }
.k-day-head .k-note { grid-column: 1 / -1; margin-top: 6px; }
.k-meals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.k-section { min-width: 0; margin: 0; }
.k-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
.k-meal-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 24px 26px 0; }
.k-chip { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--accent-deep); font-size: 15px; font-weight: 700; }
.k-chip .ui-icon { width: 20px; height: 20px; }
.k-section--dinner .k-chip { color: #68628a; }
.k-inline-form { display: inline-flex; margin: 0; }
.k-freeman { min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 12px; font-weight: 600; }
.k-freeman[aria-pressed="true"] { color: var(--accent-deep); border-color: #d7e4d3; background: var(--accent-soft); }
.k-stepper { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.k-stepper form { display: contents; }
.k-stepper button { display: grid; place-items: center; width: 36px; height: 36px; min-width: 36px; min-height: 36px; flex: 0 0 36px; aspect-ratio: 1; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent-deep); background: var(--surface); font-size: 22px; font-weight: 500; line-height: 1; }
.k-stepper button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.k-count { min-width: 22px; color: var(--ink-strong); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.k-count--static { margin-left: auto; }
.k-person-unit { color: var(--muted); font-size: 12px; margin-left: -5px; }
.k-dish-name { margin: 0; padding: 18px 26px 24px; color: var(--ink-strong); font-size: clamp(23px, 2vw, 27px); font-weight: 720; line-height: 1.45; letter-spacing: -.02em; overflow-wrap: anywhere; }
.k-dish-link { color: inherit; text-decoration: none; }
.k-dish-link:hover { color: var(--accent); }
.k-blocks { border-top: 1px solid var(--line); }
.k-block + .k-block { border-top: 1px solid var(--line); }
.k-block__head, .k-extra__head { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 0; padding: 16px 26px; text-align: left; color: var(--ink-strong); background: transparent; font-size: 15px; font-weight: 650; line-height: 1.6; }
.k-block__head:hover, .k-extra__head:hover { background: var(--surface-soft); }
.k-chev { width: 16px; height: 16px; flex: 0 0 16px; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1; }
.k-block.open > .k-block__head .k-chev, .k-extra.open > .k-extra__head .k-chev { transform: rotate(90deg); }
.k-block__body { display: none; padding: 0 26px 24px; }
.k-block.open > .k-block__body { display: block; }
.k-tag { flex: 0 1 auto; padding: 2px 8px; border-radius: 6px; color: var(--muted); background: #f0f3ed; font-size: 11px; font-weight: 500; }
.k-tag--accent { color: var(--gold); background: var(--gold-soft); }
.k-ing { list-style: none; margin: 0; padding: 0; }
.k-ing li { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid #edf0ea; font-size: 17px; line-height: 1.65; }
.k-ing li:last-child { border-bottom: 0; }
.k-ing li > span { min-width: 0; overflow-wrap: anywhere; }
.k-ing li b { max-width: 52%; color: var(--ink-strong); font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.k-ing li.k-freeman-line { color: var(--accent); }
.k-steps { counter-reset: cooking-step; display: grid; gap: 12px; margin: 22px 0 0; padding: 20px 0 0; list-style: none; border-top: 1px solid var(--line); }
.k-steps li { counter-increment: cooking-step; position: relative; padding-left: 31px; color: #526055; font-size: 15px; line-height: 1.8; }
.k-steps li::before { content: counter(cooking-step, decimal-leading-zero); position: absolute; top: 3px; left: 0; color: var(--accent); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.k-extras { background: var(--surface-soft); border-top: 1px solid var(--line); }
.k-extra + .k-extra { border-top: 1px solid #e7ece3; }
.k-extra__head { min-height: 53px; color: #526451; font-size: 14px; font-weight: 550; }
.k-extra__body { display: none; padding: 0 26px 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.k-extra.open > .k-extra__body { display: block; }
.k-extra__body .k-ing li, .k-extra__body .k-ing b { font-size: 14px; }
.k-note { margin: 0; border-radius: 10px; padding: 12px 16px; color: var(--gold); background: var(--gold-soft); font-size: 14px; }
.k-card .k-day-meta { margin: 0 26px 20px; }

/* Prep and recipe library */
.k-page-title { margin: 0 0 10px; font-size: 34px; }
.k-page-description { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.k-weeks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 22px; }
.k-week { min-width: 0; }
.k-week-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); color: var(--ink-strong); font-size: 17px; font-weight: 650; }
.k-week-head small { color: var(--muted); font-size: 12px; font-weight: 500; }
.k-cycle-day { display: flex; gap: 18px; align-items: center; margin-bottom: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink-strong); background: var(--surface); text-decoration: none; }
.k-cycle-day:hover { border-color: #a4b99c; }
.k-cycle-day--today { border-color: #75936b; background: #f0f5ed; }
.k-weeks .k-cycle-day { display: block; padding: 17px 18px; }
.k-cycle-date { flex: 0 0 100px; }
.k-cycle-date b { display: block; color: var(--ink-strong); font-size: 17px; font-weight: 650; }
.k-cycle-date small { color: var(--muted); font-size: 12px; }
.k-weeks .k-cycle-date { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.k-cycle-body { min-width: 0; flex: 1; font-size: 16px; }
.k-cycle-row { display: flex; gap: 10px; margin-top: 6px; font-size: 14px; }
.k-cycle-row > span { flex: 0 0 17px; color: var(--muted); }
.k-cycle-row b { font-weight: 550; overflow-wrap: anywhere; }
.k-cycle-snack { margin-top: 10px; color: var(--muted); font-size: 12px; }
.k-cycle-arrow { flex: 0 0 20px; color: #83937e; font-size: 24px; line-height: 1; }
.k-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
.k-library-group { min-width: 0; }
.k-library-group .k-cycle-day { min-height: 80px; }
.k-library-group .k-cycle-body b { font-weight: 600; }
.k-empty, .empty-note { padding: 32px 18px; color: var(--muted); font-size: 15px; text-align: center; }
.k-prose { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.k-prose :where(h2, h3) { margin: 22px 0 10px; color: var(--accent-deep); font-size: 16px; }
.k-prose > :first-child { margin-top: 0; }
.k-prose > :last-child { margin-bottom: 0; }
.k-prose ul { list-style: none; margin: 0; padding: 0; }
.k-prose ul li { padding: 9px 0; border-bottom: 1px solid #edf0ea; }
.k-prose ul li:last-child { border-bottom: 0; }
.k-prose ol { margin: 8px 0; padding-left: 24px; }
.k-prose ol li { padding: 5px 0 5px 5px; }
.k-prose ol li::marker { color: var(--accent); font-weight: 650; }
.k-prose p { margin: 8px 0; }

/* Forms and management. No global section/article borders. */
form { margin: 0; }
label { display: grid; min-width: 0; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 600; }
input:not([type="hidden"]), select, textarea { width: 100%; min-width: 0; min-height: 46px; border: 1px solid var(--line-strong); padding: 10px 12px; color: var(--ink-strong); background: var(--surface); font-size: 16px; line-height: 1.6; }
textarea { resize: vertical; min-height: 160px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid transparent; padding: 10px 16px; color: white; background: var(--accent-deep); font-size: 14px; font-weight: 650; line-height: 1.4; text-decoration: none; }
.button--quiet { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.button--danger-quiet { border: 1px solid #e7c6bf; padding: 9px 14px; color: var(--danger); background: var(--danger-soft); font-size: 14px; }
[role="alert"] { border-left: 3px solid var(--danger); border-radius: 8px; padding: 12px 16px; color: var(--danger); background: var(--danger-soft); }
.manage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.manage-link { min-height: 134px; display: grid; grid-template-columns: 40px 1fr 18px; align-items: center; gap: 14px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); text-decoration: none; }
.manage-link:hover { border-color: var(--accent); }
.manage-link__code { color: #8d9d84; font-size: 14px; }
.manage-link strong, .manage-link small { display: block; }
.manage-link strong { color: var(--ink-strong); font-size: 20px; }
.manage-link small { margin-top: 5px; color: var(--muted); font-size: 13px; }
.chevron { font-size: 24px; color: var(--muted); }
.logout-panel, .existing-overrides, .cycle-tool-card, .activate-card, .supplement-plan-group { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.logout-panel { margin-top: 24px; }
.logout-panel h2 { margin-bottom: 6px; font-size: 18px; }
.logout-panel p { color: var(--muted); font-size: 14px; }
.manage-page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.manage-list { display: grid; gap: 12px; }
.manage-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.manage-row__main { min-width: 0; }
.manage-row__main :where(h2, h3) { margin: 5px 0 0; font-size: 18px; overflow-wrap: anywhere; }
.manage-row__main p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.status-tag { color: var(--accent); font-size: 12px; }
.status-tag--muted { color: var(--muted); }
.manage-row__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; align-items: center; }
.app-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.app-form label small { color: var(--muted); font-size: 12px; font-weight: 400; }
.field--full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: end; }
.form-actions button { min-width: 150px; }
.override-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
fieldset { display: grid; min-width: 0; align-content: start; gap: 14px; margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--surface); }
legend { padding: 0 6px; color: var(--ink-strong); font-weight: 650; }
.override-date, .override-reason, .override-submit { grid-column: 1 / -1; }
.check-label { display: flex; align-items: center; min-height: 40px; gap: 10px; }
.check-label input { width: 19px; height: 19px; min-height: 0; margin: 0; accent-color: var(--accent); }
.existing-overrides { margin-top: 28px; }
.error-card { max-width: 620px; margin: 10vh auto; padding: 28px; border-radius: 18px; background: var(--surface); }
.error-card h1 { margin-bottom: 18px; }

/* Cycle editor */
.cycle-picker { display: flex; gap: 10px; margin-bottom: 24px; padding-bottom: 8px; overflow: auto; }
.cycle-picker a { display: grid; flex: 0 0 auto; min-width: 160px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font-size: 14px; text-decoration: none; }
.cycle-picker a small { color: var(--muted); font-size: 12px; }
.cycle-picker a[aria-current="page"] { border-color: #8fa786; background: var(--accent-soft); }
.cycle-weeks { display: grid; gap: 30px; }
.cycle-week__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 15px; }
.cycle-week__head span { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.cycle-week__head h2 { margin: 0; }
.cycle-day-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cycle-day-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cycle-day-card__head { position: relative; padding: 18px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.cycle-day-card__head span { color: var(--accent); font-size: 13px; }
.cycle-day-card__head h3 { margin: 2px 0 0; }
.cycle-day-card__head small { position: absolute; top: 20px; right: 18px; color: var(--muted); font-size: 11px; }
.cycle-day-form { display: grid; gap: 15px; padding: 18px; }
.cycle-day-form__meta, .cycle-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cycle-tools { gap: 20px; margin-top: 32px; }
.cycle-tool-card h2 { margin-bottom: 8px; }
.cycle-tool-card > p:not(.serial) { color: var(--muted); font-size: 14px; }
.cycle-tool-card form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cycle-tool-card form label:first-of-type, .cycle-tool-card form button { grid-column: 1 / -1; }
.activate-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 20px; background: var(--gold-soft); }
.activate-card p { margin-bottom: 0; }

/* Supplements */
.segment-nav { display: flex; gap: 6px; margin-bottom: 24px; padding: 4px; border-radius: 12px; background: #e9ede5; }
.segment-nav a { flex: 1; min-height: 42px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.segment-nav a[aria-current="page"] { color: var(--accent-deep); background: var(--surface); }
.supplement-periods, .supplement-period { display: grid; gap: 20px; }
.supplement-period + .supplement-period { margin-top: 16px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; }
.section-count { color: var(--muted); font-size: 13px; }
.supplement-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.supplement-card { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--surface); }
.supplement-card__brand { margin-bottom: 4px; color: var(--accent); font-size: 12px; font-weight: 600; }
.supplement-card h2 { margin: 0; font-size: 20px; }
.supplement-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.supplement-card dt { color: var(--muted); font-size: 12px; }
.supplement-card dd { margin: 2px 0 0; color: var(--ink-strong); font-size: 16px; font-weight: 650; }
.supplement-card__note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.manage-entry { display: block; margin-top: 28px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; text-decoration: none; }
.manage-entry strong, .manage-entry span { display: block; }
.manage-entry span { color: var(--muted); font-size: 13px; }
.supplement-plan-form { display: grid; gap: 24px; }
.supplement-plan-group__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.supplement-plan-group__head > div { display: flex; align-items: baseline; gap: 12px; }
.supplement-plan-group__head h2 { margin: 0; }
.supplement-plan-group__head span { color: var(--muted); font-size: 12px; }
.supplement-plan-rows { display: grid; gap: 16px; }
.supplement-plan-row { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(160px, 1.5fr) 80px 74px; gap: 14px; padding: 18px; border-radius: 12px; background: var(--surface-soft); }
.supplement-plan-row textarea { min-height: 80px; }
.supplement-plan-row__note, .supplement-plan-row__remove { grid-column: 1 / -1; }
.supplement-plan-row__remove { justify-self: end; min-height: 36px; padding: 4px 8px; border: 0; color: var(--danger); background: transparent; font-size: 13px; }
.supplement-plan-actions { position: sticky; bottom: 16px; display: flex; justify-content: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgb(255 255 255 / 95%); }

/* Login */
.login-body { display: grid; min-height: 100dvh; place-items: center; padding: 24px; }
.login-screen { width: min(100%, 440px); }
.login-card { border: 1px solid var(--line); border-radius: 24px; padding: 40px; background: var(--surface); box-shadow: var(--shadow-soft); }
.login-card h1 { font-size: 34px; }
.login-copy { margin: 16px 0 24px; color: var(--muted); font-size: 15px; }
.login-card form { display: grid; gap: 12px; }
.login-note { margin: 24px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-align: center; }

@media (min-width: 1500px) { .content--today { padding-top: 48px; } }
@media (max-width: 1000px) {
  .k-meals { gap: 18px; }
  .k-meal-top { padding: 20px 20px 0; gap: 8px; }
  .k-dish-name { padding: 16px 20px 22px; }
  .k-block__head, .k-extra__head { padding-inline: 20px; }
  .k-block__body, .k-extra__body { padding-inline: 20px; }
  .k-weeks { grid-template-columns: 1fr; gap: 26px; }
  .k-weeks .k-cycle-day { display: flex; gap: 20px; }
  .k-weeks .k-cycle-date { display: block; flex: 0 0 105px; margin: 0; }
  .cycle-day-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 20px; }
  .app-shell { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .app-bar { width: calc(100% - 36px); height: 78px; }
  .app-brand { gap: 9px; }
  .app-brand strong { font-size: 19px; }
  .app-brand__mark { width: 36px; height: 36px; border-radius: 12px; }
  .app-bar__action { min-height: 38px; padding: 6px 11px; font-size: 13px; }
  .content, .content--wide, .content--today { width: calc(100% - 36px); padding: 28px 0 20px; }
  .bottom-nav { position: fixed; top: auto; bottom: 0; width: 100%; padding: 9px max(18px, env(safe-area-inset-left)) calc(9px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-right)); border-top: 1px solid var(--line); border-radius: 0; background: rgb(255 255 255 / 97%); backdrop-filter: blur(16px); }
  .bottom-nav a { flex: 1; min-width: 0; min-height: 52px; flex-direction: column; gap: 2px; padding: 5px 10px; font-size: 11px; }
  .bottom-nav .ui-icon { width: 21px; height: 21px; }
  .bottom-nav a[aria-current="page"] { background: var(--accent-soft); box-shadow: none; }
  .k-day-head { margin-bottom: 24px; gap: 7px 14px; }
  .k-day-date { font-size: 32px; }
  .k-day-date small { font-size: 15px; margin-left: 8px; }
  .k-day-eyebrow { font-size: 12px; }
  .k-day-meta { font-size: 12px; }
  .k-pager { gap: 7px; }
  .k-pager a { width: 38px; height: 38px; }
  .k-meals { grid-template-columns: 1fr; gap: 24px; }
  .k-meal-top { padding: 20px 20px 0; gap: 10px; }
  .k-dish-name { font-size: 24px; }
  .k-stepper { gap: 6px; }
  .k-stepper button { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
  .k-person-unit { display: none; }
  .k-ing li { font-size: 16px; }
  .k-ing li b { font-size: 16px; }
  .k-steps li { font-size: 15px; }
  .k-card { border-radius: 18px; }
  .k-block__head:focus-visible, .k-extra__head:focus-visible { outline-offset: -4px; }
  .k-page-title { font-size: 30px; }
  .k-library-grid { grid-template-columns: 1fr; gap: 28px; }
  .k-weeks .k-cycle-day { padding: 16px; gap: 16px; }
  .k-weeks .k-cycle-date { flex-basis: 80px; }
  .k-cycle-date b { font-size: 16px; }
  .k-cycle-date small { font-size: 11px; }
  .k-cycle-row { font-size: 14px; }
  .manage-grid, .cycle-tools { grid-template-columns: 1fr; }
  .manage-link { min-height: 110px; padding: 20px; }
  .manage-page-head { align-items: start; flex-direction: column; }
  .manage-row { align-items: stretch; flex-direction: column; padding: 20px; gap: 16px; }
  .manage-row__actions { justify-content: start; }
  .app-form { grid-template-columns: 1fr; padding: 22px; }
  .override-form { grid-template-columns: 1fr; }
  .activate-card { align-items: start; flex-direction: column; }
  .supplement-plan-row { grid-template-columns: minmax(0, 1fr) 84px; padding: 14px; }
  .supplement-plan-row__product { grid-column: 1 / -1; }
  .supplement-plan-group { padding: 18px; }
  .supplement-plan-actions { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .supplement-list { grid-template-columns: 1fr; }
  .login-card { padding: 28px; }
}
@media (max-width: 520px) { .cycle-day-list { grid-template-columns: 1fr; } }
@media (max-width: 359px) {
  .app-bar, .content, .content--wide, .content--today { width: calc(100% - 24px); }
  .k-meal-top { padding: 18px 14px 0; gap: 7px; }
  .k-freeman { padding-inline: 7px; font-size: 11px; }
  .k-dish-name { padding-inline: 14px; font-size: 22px; }
  .k-block__head, .k-extra__head, .k-block__body, .k-extra__body { padding-inline: 14px; }
  .k-day-date { font-size: 28px; }
  .k-pager a { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
  .k-chev { transition: transform .18s ease; }
}
@media (forced-colors: active) {
  .k-card, .bottom-nav, .app-brand__mark, .k-stepper button { border: 1px solid CanvasText; }
}
