/*
 * 2026 UI refresh
 * Visual-only layer: no layout hooks, IDs, form names, or interaction states are changed.
 */

:root {
  --ui-ink: #172620;
  --ui-muted: #66736c;
  --ui-line: #cfd8d2;
  --ui-line-strong: #aebdb4;
  --ui-paper: #fffefa;
  --ui-canvas: #edf1ed;
  --ui-pine: #173f35;
  --ui-pine-deep: #102f28;
  --ui-pine-soft: #e2ece6;
  --ui-carb: #cf8c20;
  --ui-carb-soft: #fff4da;
  --ui-protein: #3f76aa;
  --ui-protein-soft: #eaf3fb;
  --ui-fat: #a65377;
  --ui-fat-soft: #faedf3;
  --ui-danger: #a1453b;
  --ui-display: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --ui-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ui-data: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, monospace;
}

/* Final cascade correction for the confirmed 05 mobile surface. */
@media (max-width: 560px) {
  .preset-card {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .preset-card > .section-heading,
  .preset-intro,
  .preset-card .info-note { display: none !important; }
  .preset-control-panel { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
  .version-field,
  .meal-field {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
  }
  .version-field-head legend,
  .meal-field legend { margin: 0 !important; color: #747d72 !important; font-size: 8px !important; }
  .meal-choice-row { margin: 6px 0 0 !important; padding: 6px 0 0 !important; border: 0 !important; }
  .version-options,
  .meal-options { display: flex !important; gap: 6px !important; flex-wrap: nowrap !important; }
  .version-option,
  .meal-option {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .meal-option { flex: 1 1 0 !important; }
  .version-option > span,
  .meal-option > span {
    width: 100% !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 8px !important;
    border: 1px solid #d6e3b4 !important;
    border-radius: 9px !important;
    color: #747d72 !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  .version-option > span i { display: none !important; }
  .version-option > input:checked + span,
  .meal-option > input:checked + span {
    border-color: #202620 !important;
    color: #fff !important;
    background: #202620 !important;
    box-shadow: none !important;
  }
  .composer-card {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .composer-card > .section-heading { display: none !important; }
  .macro-composers { gap: 5px !important; }
  .macro-composer,
  .macro-composer.status-under,
  .macro-composer.status-matched,
  .macro-composer.status-over {
    min-height: 154px !important;
    padding: 9px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 7px 0 #d6e6aa !important;
  }
  .macro-composer.status-under { box-shadow: 0 7px 0 #efb8ae !important; }
  .macro-composer.status-matched { box-shadow: 0 7px 0 #b5da4d !important; }
  .macro-composer.status-over { box-shadow: 0 7px 0 #cdbce8 !important; }
}

/* Screenshot source of truth: 01 Matcha Cream. No mascot artwork. */
.hero-r18-cat,
.calendar-cat,
.checkin-cat-progress img,
.pixel-paw { display: none !important; }
.hero::before,
.admin-header::before,
.checkin-hero::before,
.access-card::before,
.checkin-cat-progress::before { content: none !important; display: none !important; }

@media (max-width: 560px) {
  :root {
    --matcha-bg: #dcedad;
    --matcha-shell: #fbfff2;
    --matcha-card: #ffffff;
    --matcha-soft: #eef7d9;
    --matcha-ink: #1d251d;
    --matcha-muted: #747d72;
    --matcha-accent: #a8ca58;
    --matcha-line: #dfe8d2;
  }
  html, body:not(.admin-body) { background: linear-gradient(180deg,#dbeead 0%,#cfe79b 100%) !important; }
  .page-shell {
    width: min(calc(100% - 24px), 360px) !important;
    min-height: 690px;
    margin: 16px auto 28px !important;
    border: 1px solid var(--matcha-line) !important;
    border-radius: 42px !important;
    overflow: hidden !important;
    background: var(--matcha-shell) !important;
    box-shadow: 0 28px 70px rgba(69,92,39,.19) !important;
  }
  .app-canvas {
    min-height: 690px;
    padding: 27px 24px 42px !important;
    display: flex !important;
    flex-direction: column;
    background: var(--matcha-shell) !important;
  }
  .client-phone-top { order: 1; display: flex; justify-content: space-between; align-items: center; color: var(--matcha-muted); font-family: Inter,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; font-size: 9px; }
  .client-phone-top strong { color: var(--matcha-muted); font-weight: 700; }
  .hero { order: 2; display: block !important; margin: 42px 0 20px !important; padding: 0 !important; }
  .hero::after { content: none !important; display: none !important; }
  .hero .eyebrow { margin: 0 !important; color: var(--matcha-muted) !important; font-family: Inter,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif !important; font-size: 8px !important; letter-spacing: 0 !important; }
  .hero .client-expiry, .hero-copy > p:last-child { display: none !important; }
  .hero h1 { margin: 7px 0 0 !important; color: var(--matcha-ink) !important; font-family: "SF Pro Rounded","Arial Rounded MT Bold","PingFang SC",sans-serif !important; font-size: 27px !important; line-height: 1 !important; letter-spacing: -.055em !important; }

  .preset-card { order: 3; margin: 0 0 14px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .preset-card > .section-heading, .preset-intro, .preset-card .info-note { display: none !important; }
  .preset-control-panel { padding: 0 !important; border: 0 !important; background: transparent !important; }
  .version-field:has(.version-option:only-child) { display: none !important; }
  .version-field, .meal-field { display: block !important; margin: 0 !important; }
  .version-field-head legend, .meal-field legend { display: none !important; }
  .meal-choice-row { margin: 0 !important; padding: 0 !important; border: 0 !important; }
  .version-options, .meal-options { display: flex !important; gap: 7px !important; flex-wrap: nowrap !important; }
  .version-options > label.version-option, .meal-options > label.meal-option { flex: 1 1 0 !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .version-option > span, .meal-option > span { width: 100% !important; min-height: 42px !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 9px 7px !important; border: 1px solid var(--matcha-line) !important; border-radius: 12px !important; color: var(--matcha-muted) !important; background: var(--matcha-card) !important; box-shadow: none !important; font-family: Inter,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif !important; font-size: 9px !important; line-height: 1 !important; white-space: nowrap !important; }
  .version-option > span i { display: none !important; }
  .version-option > input:checked + span, .meal-option > input:checked + span { border-color: var(--matcha-ink) !important; color: #fff !important; background: var(--matcha-ink) !important; }

  .composer-card { order: 4; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .composer-card > .section-heading { display: none !important; }
  .macro-composers { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 7px !important; }
  .macro-composer, .macro-composer.status-under, .macro-composer.status-matched, .macro-composer.status-over {
    position: relative;
    min-height: 178px !important;
    padding: 13px 11px !important;
    overflow: hidden;
    border: 1px solid var(--matcha-line) !important;
    border-radius: 17px !important;
    color: var(--matcha-ink) !important;
    background: var(--matcha-card) !important;
    box-shadow: none !important;
  }
  .macro-composer::after { content: ""; position: absolute; z-index: 0; right: -22px; bottom: -31px; width: 90px; height: 90px; display: block !important; border-radius: 50%; background: var(--matcha-accent); opacity: .12; }
  .macro-composer > * { position: relative; z-index: 1; }
  .macro-composer-head { display: block !important; }
  .macro-kicker { color: var(--matcha-ink) !important; font-size: 9px !important; font-weight: 900 !important; }
  .macro-kicker::before { content: none !important; }
  .macro-kicker .dot { display: none !important; }
  .target-current { display: flex !important; flex-direction: column; margin: 22px 0 8px !important; padding: 0 !important; background: transparent !important; }
  .target-current > span:not(.slash) { order: 1; display: block !important; color: var(--matcha-ink) !important; font-size: 0 !important; }
  .target-current > label { order: 2; display: block !important; margin-top: 3px; color: var(--matcha-muted) !important; font-family: Inter,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif !important; font-size: 8px !important; }
  .target-current .slash { display: none !important; }
  .target-current strong { color: var(--matcha-ink) !important; font-size: 26px !important; line-height: 1 !important; letter-spacing: -.07em; }
  .target-current input { width: 28px !important; padding: 0 !important; color: var(--matcha-muted) !important; font-family: Inter,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif !important; font-size: 8px !important; font-weight: 500 !important; }
  .target-current em { color: var(--matcha-muted) !important; font-size: 8px !important; }
  .macro-progress { height: 6px !important; margin-top: 7px !important; border: 0 !important; border-radius: 20px !important; background: var(--matcha-soft) !important; }
  .macro-progress span { border-radius: inherit !important; }
  .macro-balance { position: absolute !important; z-index: 2 !important; right: 9px; top: 9px; margin: 0 !important; }
  .macro-balance span:first-child { width: 28px; min-height: 28px; display: grid; place-items: center; padding: 4px; border-radius: 50%; color: #d87368; background: #fff0ed; font-size: 6px !important; line-height: 1.05; text-align: center; }
  .macro-composer.status-matched .macro-balance span:first-child { color: #749b25; background: #eef8d8; }
  .macro-composer.status-over .macro-balance span:first-child { color: #7755ad; background: #f1e9ff; }
  .macro-balance span:last-child { display: none !important; }
  .macro-card-compact-foods { min-height: 33px; margin-top: 12px !important; padding-top: 9px !important; border-top: 1px solid var(--matcha-line) !important; color: var(--matcha-ink) !important; font-size: 8px !important; line-height: 1.45 !important; }
  .macro-card-toggle { position: absolute !important; z-index: 4 !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; opacity: 0 !important; }
  .macro-composer.expanded { grid-column: 1 / -1 !important; min-height: 0 !important; padding: 15px !important; }
  .macro-composer.expanded .macro-card-toggle { position: static !important; height: auto !important; min-height: 32px !important; margin-top: 9px !important; padding: 6px !important; opacity: 1 !important; }
  .cross-nutrient-strip { grid-template-columns: 1fr !important; gap: 0 !important; margin-top: 12px !important; padding: 14px 15px !important; border: 0 !important; border-radius: 18px !important; color: #fff !important; background: var(--matcha-ink) !important; }
  .cross-nutrient-strip h3 { font-size: 10px !important; }
  .cross-nutrient-strip p { margin-top: 5px !important; color: #aab3aa !important; font-size: 8px !important; }
  .cross-compact-summary { display: block !important; margin-top: 7px; color: #d8ded5; font-size: 8px !important; }
  .cross-nutrient-strip > button { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
  .cross-nutrient-strip.expanded > button { position: static; height: auto; margin-top: 8px; opacity: 1; }
  .match-help { display: none !important; }

  .daily-fixed-card { order: 5; margin: 14px 0 0 !important; padding: 16px !important; border: 1px solid var(--matcha-line) !important; border-radius: 18px !important; background: var(--matcha-card) !important; box-shadow: none !important; }
  .daily-fixed-card .step, .daily-fixed-card .status-pill { display: none !important; }
  .daily-fixed-card .section-heading h2 { font-size: 12px !important; }
  #error { order: 6; }
  #composer-actions { order: 7; }
  #result { order: 8; }
  .footer-forget-device { order: 9; position: static !important; align-self: center; width: auto !important; margin: 24px 0 0 !important; padding: 5px 8px !important; border: 0 !important; color: var(--matcha-muted) !important; background: transparent !important; font-size: 8px !important; }
}

/* 05 source-match checkpoint · mobile first screen
   Tokens and proportions are copied from diet-calculator-ui-matcha-cute-8.html .t5. */
@media (max-width: 560px) {
  html, body:not(.admin-body) { background: #b6d75b !important; }
  .page-shell {
    width: min(calc(100% - 20px), 360px) !important;
    margin: 10px auto 24px !important;
    border: 1px solid #d6e3b4 !important;
    border-radius: 34px !important;
    overflow: hidden !important;
    background: #f8ffe9 !important;
    box-shadow: 0 28px 70px #3e571f32 !important;
  }
  .app-canvas { padding: 17px 14px 34px !important; background: #f8ffe9 !important; }

  .hero {
    margin: 0 0 12px !important;
    padding: 42px 54px 0 0 !important;
  }
  .hero::after {
    left: 0 !important;
    top: 0 !important;
    color: #747d72 !important;
    font-size: 9px !important;
  }
  .hero::before {
    right: 0 !important;
    top: 25px !important;
    width: 47px !important;
    height: 40px !important;
    background: #e6f3bd !important;
  }
  .hero-r18-cat { top: 19px; right: 2px; width: 47px; height: 47px; }
  .hero .eyebrow { margin: 0 !important; color: #747d72 !important; font-size: 8px !important; letter-spacing: 0 !important; }
  .hero .client-expiry { display: none !important; }
  .hero h1 { margin: 4px 0 0 !important; font-size: 22px !important; line-height: 1 !important; letter-spacing: -.05em !important; }
  .hero-copy > p:last-child { display: none !important; }
  .forget-device { position: absolute !important; right: 0 !important; top: 72px !important; margin: 0 !important; min-height: 22px !important; padding: 3px 7px !important; border: 0 !important; color: #747d72 !important; background: transparent !important; font-size: 7px !important; }

  .preset-card {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .preset-card > .section-heading,
  .preset-intro,
  .preset-card .info-note { display: none !important; }
  .preset-control-panel { padding: 0 !important; border: 0 !important; background: transparent !important; }
  .version-field,
  .meal-field {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 6px !important;
  }
  .version-field-head legend,
  .meal-field legend { color: #747d72 !important; font-size: 8px !important; }
  .meal-choice-row { margin-top: 6px !important; padding-top: 6px !important; border-top: 0 !important; }
  .version-options,
  .meal-options { gap: 6px !important; }
  .version-options label,
  .meal-options label {
    min-height: 32px !important;
    padding: 7px 8px !important;
    border: 1px solid #d6e3b4 !important;
    border-radius: 9px !important;
    color: #747d72 !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 8px !important;
  }
  .version-options label:has(input:checked),
  .meal-options label:has(input:checked) { border-color: #202620 !important; color: #fff !important; background: #202620 !important; }

  .composer-card {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .composer-card > .section-heading { display: none !important; }
  .macro-composers { gap: 5px !important; }
  .macro-composer,
  .macro-composer.status-under,
  .macro-composer.status-matched,
  .macro-composer.status-over {
    min-height: 154px !important;
    padding: 9px !important;
    border: 0 !important;
    border-radius: 12px !important;
    color: #182018 !important;
    background: #fff !important;
    box-shadow: 0 7px 0 #d6e6aa !important;
  }
  .macro-composer.status-under { box-shadow: 0 7px 0 #efb8ae !important; }
  .macro-composer.status-matched { box-shadow: 0 7px 0 #b5da4d !important; }
  .macro-composer.status-over { box-shadow: 0 7px 0 #cdbce8 !important; }
  .macro-composer-head { display: block !important; }
  .macro-kicker { font-size: 8px !important; }
  .macro-kicker::before { margin-right: 3px !important; color: #ef9c52 !important; }
  .target-current {
    display: block !important;
    margin: 10px 0 5px !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .target-current label,
  .target-current > span:not(.slash) { display: block !important; color: #747d72; font-size: 7px !important; }
  .target-current .slash { display: none !important; }
  .target-current input,
  .target-current strong { display: inline !important; width: auto !important; color: #182018 !important; font-size: 19px !important; font-weight: 900 !important; }
  .target-current input { max-width: 36px !important; }
  .target-current em { font-size: 7px !important; }
  .macro-progress { height: 5px !important; margin-top: 6px !important; border: 0 !important; border-radius: 20px !important; background: #e6f3bd !important; }
  .macro-balance { margin-top: 5px !important; font-size: 7px !important; }
  .macro-balance span:last-child { display: none !important; }
  .macro-card-compact-foods { margin-top: 7px !important; padding-top: 6px !important; border-top: 1px solid #d6e3b4 !important; font-size: 7px !important; line-height: 1.35 !important; }
  .macro-card-toggle {
    min-height: 22px !important;
    margin-top: 6px !important;
    padding: 4px !important;
    border-radius: 8px !important;
    background: #202620 !important;
    font-size: 7px !important;
  }
  .cross-nutrient-strip {
    grid-template-columns: 1fr auto !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding: 10px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #202620 !important;
  }
  .cross-nutrient-strip h3 { font-size: 9px !important; }
  .cross-nutrient-strip p { font-size: 7px !important; }
  .cross-compact-summary { display: none !important; }
  .cross-nutrient-strip > button { min-height: 28px !important; padding: 5px 7px !important; border: 0 !important; border-radius: 8px !important; background: #c5ed5a !important; font-size: 7px !important; }
  .match-help { display: none !important; }
}

html {
  background: var(--ui-canvas);
  color: var(--ui-ink);
  text-rendering: optimizeLegibility;
}

body {
  background:
    linear-gradient(rgba(23, 63, 53, .035) 1px, transparent 1px),
    var(--ui-canvas);
  background-size: 100% 34px;
  color: var(--ui-ink);
  font-family: var(--ui-body);
}

[hidden] { display: none !important; }

h1, h2, h3 {
  color: var(--ui-ink);
  font-family: var(--ui-display);
  font-weight: 700;
}

button, a, input, select, textarea, summary {
  -webkit-tap-highlight-color: transparent;
}

button, a, summary {
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(63, 118, 170, .26);
  outline-offset: 2px;
}

button:not(:disabled):active { transform: translateY(1px); }

input, select, textarea {
  border-color: var(--ui-line) !important;
  border-radius: 8px !important;
  color: var(--ui-ink) !important;
  background: #fff !important;
}

input[type="number"],
.target-current strong,
.target-current input,
.actual-grid strong,
.target-preview strong,
.client-console-details strong,
.checkin-stats-grid strong {
  font-family: var(--ui-data);
  font-variant-numeric: tabular-nums;
}

/* Access */
.access-gate {
  position: relative;
  overflow: hidden;
  background: var(--ui-pine-deep);
}

.access-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.06) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(255,255,255,.05) 50%, transparent 50.2%);
  background-size: 88px 88px;
  opacity: .55;
}

.access-card {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 14px;
  background: var(--ui-paper);
  box-shadow: 18px 18px 0 rgba(0,0,0,.14);
}

.access-card::before,
.hero::after,
.admin-header::after,
.checkin-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: 6px;
  border-radius: 0;
  background: linear-gradient(90deg,
    var(--ui-carb) 0 33.333%,
    var(--ui-protein) 33.333% 66.666%,
    var(--ui-fat) 66.666% 100%);
}

.access-card .eyebrow,
.eyebrow,
.step,
.result-kicker,
.admin-section-head span,
.versions-heading > div > span,
.dialog-head span {
  font-family: var(--ui-data);
  letter-spacing: .12em;
}

.access-card h1 {
  font-family: var(--ui-display);
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.22;
}

.access-card input {
  border: 0 !important;
  border-bottom: 2px solid var(--ui-line-strong) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.access-card button,
.admin-login-form button {
  border-radius: 8px;
  background: var(--ui-pine);
  box-shadow: 0 5px 0 var(--ui-pine-deep);
}

/* Member shell and prescription header */
.page-shell {
  width: min(1020px, calc(100% - 36px));
  padding-top: 24px;
}

.hero {
  min-height: 250px;
  padding: 42px 46px 46px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background:
    linear-gradient(115deg, rgba(255,255,255,.035), transparent 48%),
    var(--ui-pine);
  box-shadow: 0 14px 30px rgba(16,47,40,.13);
}

.hero::before {
  content: "";
  position: absolute;
  top: 34px;
  right: 40px;
  width: 72px;
  height: 5px;
  background: linear-gradient(90deg,
    var(--ui-carb) 0 33.333%,
    var(--ui-protein) 33.333% 66.666%,
    var(--ui-fat) 66.666% 100%);
  opacity: .72;
}

.hero h1,
.admin-header h1,
.checkin-hero h1 {
  color: #fff;
  font-family: var(--ui-display);
  letter-spacing: -.025em;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.15;
}

.hero-copy > p:last-child {
  max-width: 690px;
  color: rgba(255,255,255,.74);
}

.client-expiry,
.status-pill,
.unit-label,
.key-status,
.client-name-button .key-status {
  border-radius: 5px;
}

.forget-device {
  border-radius: 6px;
}

.card,
.result,
.admin-card,
.checkin-card {
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: var(--ui-paper);
  box-shadow: 0 7px 20px rgba(23,38,32,.055);
}

.card {
  position: relative;
  padding: 28px;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--ui-pine);
}

.section-heading h2,
.result-heading h2,
.admin-section-head h2 {
  font-family: var(--ui-display);
  font-size: 25px;
}

.step {
  width: fit-content;
  margin-bottom: 7px;
  padding: 3px 6px;
  border: 1px solid #c9b48c;
  color: #795f31;
  background: #fff8e9;
  font-size: 10px;
}

.status-pill,
.unit-label,
.info-note,
.match-help {
  color: #315c4e;
  background: var(--ui-pine-soft);
}

.version-option > span,
.meal-option > span,
.meal-mode-toggle,
.custom-food-toggle {
  border-radius: 7px;
}

.version-option > input:checked + span,
.meal-option > input:checked + span,
.custom-food-toggle:has(input:checked) {
  border-color: var(--ui-pine);
  color: #fff;
  background: var(--ui-pine);
  box-shadow: none;
}

.version-option > input:checked + span i {
  border-color: #fff;
  background: transparent;
}

.fixed-section-first {
  border-color: var(--ui-line);
  border-radius: 10px;
  background: #f5f7f4;
}

.macro-composer {
  position: relative;
  overflow: hidden;
  border-color: var(--ui-line);
  border-radius: 11px;
  background: var(--ui-paper);
  box-shadow: none;
}

.macro-composer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--macro-accent);
}

.macro-composer.status-under,
.macro-composer.status-matched,
.macro-composer.status-over {
  box-shadow: none;
}

.carb-composer { --macro-accent: var(--ui-carb); --macro-soft: var(--ui-carb-soft); }
.protein-composer { --macro-accent: var(--ui-protein); --macro-soft: var(--ui-protein-soft); }
.fat-composer { --macro-accent: var(--ui-fat); --macro-soft: var(--ui-fat-soft); }

.target-current,
.auto-fat-panel,
.food-selector,
.fixed-food-selector,
.picker-choice,
.selected-food-row,
.fixed-food,
.daily-fixed-item {
  border-radius: 8px;
  box-shadow: none;
}

.target-current {
  border: 1px solid var(--ui-line);
}

.target-current input {
  border-radius: 0 !important;
  background: transparent !important;
}

.macro-progress {
  height: 8px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg,
      #dce3de 0,
      #dce3de calc(10% - 2px),
      transparent calc(10% - 2px),
      transparent 10%);
}

.macro-progress span { border-radius: 2px; }

.picker-choice.checked,
.fixed-picker-choice.checked,
.selected-food-row.matching {
  border-color: var(--ui-pine);
  background: var(--ui-pine-soft);
  box-shadow: none;
}

.button,
.submit-calculator-checkin,
.view-checkin-calendar,
.share-dialog-actions a,
.share-dialog-actions button {
  border-radius: 8px;
}

.button.primary {
  background: var(--ui-pine);
  box-shadow: 0 4px 0 var(--ui-pine-deep);
}

.button.secondary {
  border-color: var(--ui-line-strong);
  background: var(--ui-paper);
}

.result {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--ui-pine-deep);
  box-shadow: 0 14px 32px rgba(16,47,40,.14);
}

.result::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg,
    var(--ui-carb) 0 33.333%,
    var(--ui-protein) 33.333% 66.666%,
    var(--ui-fat) 66.666% 100%);
}

.result h2,
.result h3 { color: #fff; }

.result-row,
.actual-panel,
.calculator-checkin,
.result-guidance,
.result-supplement-section {
  border-radius: 9px;
}

.actual-grid strong,
.result-row b {
  font-family: var(--ui-data);
  font-variant-numeric: tabular-nums;
}

/* Coach/admin */
.admin-body { background-color: var(--ui-canvas); }

.admin-shell,
.food-admin-shell {
  width: min(1220px, calc(100% - 36px));
}

.admin-header {
  position: relative;
  overflow: hidden;
  padding: 32px 36px 36px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: var(--ui-pine);
}

.admin-header h1 {
  font-size: clamp(31px, 4vw, 43px);
}

.client-link,
.header-actions button {
  border-radius: 7px;
}

.admin-card {
  padding: 25px;
}

.compact-editor > summary,
.client-settings-editor > summary,
.version-compact-summary,
.meal-row > summary {
  border-radius: 7px;
}

.compact-editor > summary:hover,
.client-settings-editor > summary:hover,
.version-compact-summary:hover,
.meal-row > summary:hover {
  background: #eef3ef;
}

.target-preview {
  overflow: hidden;
  gap: 0;
  padding: 0;
  border-color: var(--ui-line);
  border-radius: 9px;
  background: #fff;
}

.target-preview div {
  min-height: 78px;
  border-radius: 0;
  box-shadow: none;
}

.target-preview div + div { border-left: 1px solid var(--ui-line); }
.target-preview div:nth-child(1) { border-top: 5px solid var(--ui-carb); border-left: 0; }
.target-preview div:nth-child(2) { border-top: 5px solid var(--ui-protein); border-left: 1px solid var(--ui-line); }
.target-preview div:nth-child(3) { border-top: 5px solid var(--ui-fat); border-left: 1px solid var(--ui-line); }

.versions-editor,
.fixed-items-editor,
.training-foods-editor {
  border-width: 1px;
  border-radius: 11px;
}

.versions-editor { border-color: #b9c9c0; background: #e8efeb; }
.fixed-items-editor { border-color: #e1c995; background: #fff8e7; }
.training-foods-editor { border-color: #b7cde0; background: #edf5fb; }

.version-shell,
.version-card,
.meal-row,
.meal-extra-editor,
.coach-category-card,
.meal-food-status,
.client-record,
.client-action-console,
.client-console-details > div,
.key-dialog,
.food-record,
.checkin-record-card {
  border-radius: 9px;
  box-shadow: none;
}

.version-external-status,
.version-status-bar,
.status-filters button.active {
  background: var(--ui-pine);
}

.version-shell.version-matched { border-color: #6f9a85; }

.version-compact-summary {
  background: #f2f6f3;
}

.version-compact-summary strong,
.meal-row > summary strong,
.client-name-button {
  color: var(--ui-ink);
}

.coach-category-card.category-carb { border-color: #dfbd73; background: var(--ui-carb-soft); }
.coach-category-card.category-protein { border-color: #a9c5df; background: var(--ui-protein-soft); }
.coach-category-card.category-fat { border-color: #d8b2c3; background: var(--ui-fat-soft); }

.category-carb .coach-category-symbol { background: var(--ui-carb); }
.category-protein .coach-category-symbol { background: var(--ui-protein); }
.category-fat .coach-category-symbol { background: var(--ui-fat); }

.admin-primary {
  border-radius: 8px;
  background: var(--ui-pine);
  box-shadow: 0 4px 0 var(--ui-pine-deep);
}

.admin-secondary,
.record-actions button,
.status-filters button,
.batch-actions button,
.batch-actions select,
.file-button {
  border-radius: 7px;
}

.client-list { gap: 12px; }

.client-record {
  border-left: 4px solid var(--ui-line-strong);
  background: #fff;
}

.client-record.selected-for-management {
  border-color: var(--ui-pine);
  box-shadow: 0 0 0 2px rgba(23,63,53,.11);
}

.client-action-console {
  border-style: solid;
  background: #f3f6f3;
}

.client-action-console.active {
  border-width: 1px;
  border-color: var(--ui-pine);
  background: var(--ui-pine-soft);
}

.key-status.valid { color: #1c5b43; background: #dceddf; }
.key-status.expiring { color: #76520c; background: var(--ui-carb-soft); }
.key-status.expired,
.key-status.revoked { color: #8e342d; background: #f9e4e1; }

/* Library and check-in pages */
.library-tabs button,
.category-tabs button,
.library-update-actions button,
.alphabet-nav button,
.food-library-card {
  border-radius: 8px !important;
}

.library-tabs button.active,
.category-tabs button.active,
.alphabet-nav button.active {
  border-color: var(--ui-pine) !important;
  color: #fff !important;
  background: var(--ui-pine) !important;
}

.library-tabs button.active strong,
.library-tabs button.active small {
  color: inherit !important;
}

.checkin-shell {
  width: min(860px, calc(100% - 28px));
}

.checkin-hero {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--ui-pine);
}

.checkin-card,
.meal-detail-card,
.meal-detail-section,
.calendar-cell,
.day-detail-dialog {
  border-radius: 9px;
}

.calendar-cell {
  border: 1px solid var(--ui-line);
}

@media (hover: hover) {
  button:not(:disabled):hover,
  .client-link:hover,
  summary:hover {
    border-color: var(--ui-pine);
  }

  .button.primary:hover,
  .admin-primary:hover {
    background: #215447;
  }
}

@media (max-width: 720px) {
  body { background-size: 100% 28px; }

  .page-shell,
  .admin-shell,
  .food-admin-shell {
    width: min(100% - 18px, 1220px);
    padding-top: 9px;
  }

  .hero,
  .admin-header,
  .checkin-hero {
    border-radius: 11px;
  }

  .hero {
    min-height: 0;
    padding: 27px 20px 31px;
  }

  .hero::before { display: none; }
  .hero h1 { font-size: clamp(31px, 9vw, 40px); }

  .card,
  .result,
  .admin-card,
  .checkin-card {
    border-radius: 10px;
  }

  .card { padding: 21px 16px; }

  .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .section-heading h2 { font-size: 22px; }

  .macro-composer {
    padding: 17px 13px 17px 17px;
  }

  .target-current { border-radius: 7px; }

  .admin-header { padding: 25px 21px 29px; }
  .admin-header h1 { font-size: 31px; }
  .admin-header .header-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    width: 100%;
    gap: 6px;
  }
  .admin-header .client-link,
  .admin-header .header-actions button {
    min-width: 0;
    padding: 10px 5px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }

  .admin-card { padding: 18px 13px; }

  .target-preview { grid-template-columns: 1fr; }
  .target-preview div + div { border-left: 0; border-top: 1px solid var(--ui-line); }
  .target-preview div:nth-child(2),
  .target-preview div:nth-child(3) { border-left: 0; }

  .client-record-summary { padding: 13px 11px; }

  .result { padding: 23px 17px; }

  .access-card {
    padding: 31px 23px;
    border-radius: 11px;
    box-shadow: 10px 10px 0 rgba(0,0,0,.14);
  }
}

@media (max-width: 390px) {
  .page-shell,
  .admin-shell,
  .food-admin-shell {
    width: min(100% - 12px, 1220px);
  }

  .hero h1 { font-size: 29px; }
  .card { padding: 19px 13px; }
  .section-heading { gap: 8px; }
  .status-pill,
  .unit-label { max-width: 104px; white-space: normal; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* r16 · 1B 青柠运动 */
body:not(.admin-body) { background: #b6d45b; }
.page-shell { padding: 18px; border-right: 6px solid #151918; border-left: 6px solid #151918; background: #f4ffe2; }
.macro-composers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.macro-composer { position: relative; min-width: 0; min-height: 255px; padding: 15px !important; overflow: hidden; border: 2px solid #151918 !important; border-radius: 16px !important; background: #faffed !important; box-shadow: 5px 5px 0 #151918 !important; }
.macro-composer.status-under { border-color: #c84739 !important; background: #fff0eb !important; box-shadow: 5px 5px 0 #c84739 !important; }
.macro-composer.status-matched { border-color: #151918 !important; background: #d6f176 !important; box-shadow: 5px 5px 0 #151918 !important; }
.macro-composer.status-over { border-color: #7146a8 !important; background: #f1e8ff !important; box-shadow: 5px 5px 0 #7146a8 !important; }
.macro-composer-head { display: grid !important; gap: 9px !important; }
.macro-composer-head h3 { display: none; }
.target-current { display: grid !important; grid-template-columns: 1fr auto 1fr; gap: 5px !important; width: 100%; padding: 8px !important; border-radius: 10px !important; background: rgba(255,255,255,.58) !important; }
.target-current label, .target-current > span:not(.slash) { display: grid !important; grid-template-columns: auto auto; align-items: baseline; gap: 2px !important; min-width: 0; }
.target-current input, .target-current strong { width: auto !important; min-width: 0; border: 0 !important; font-size: 21px !important; text-align: left !important; }
.macro-progress { height: 8px !important; margin-top: 12px !important; border: 1px solid rgba(21,25,24,.18); background: rgba(255,255,255,.65) !important; }
.macro-card-compact-foods { display: grid; gap: 5px; min-height: 46px; margin-top: 11px; color: #596159; font-size: 9px; }
.macro-card-compact-foods span { display: flex; justify-content: space-between; gap: 7px; padding-top: 5px; border-top: 1px solid rgba(21,25,24,.15); }
.macro-card-compact-foods b, .macro-card-compact-foods em { overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.macro-card-toggle { width: 100%; min-height: 35px; margin-top: 9px; border: 0; border-radius: 9px; color: #fff; background: #151918; font-size: 10px; font-weight: 800; }
.macro-composer > .food-selector, .macro-composer > .selected-foods, .macro-composer > .auto-fat-panel { display: none; }
.macro-composer.expanded { grid-column: 1 / -1; min-height: 0; }
.macro-composer.expanded > .food-selector, .macro-composer.expanded > .selected-foods, .macro-composer.expanded > .auto-fat-panel { display: grid; }
.macro-composer.expanded .macro-card-compact-foods { display: none; }

.cross-nutrient-strip { display: grid !important; grid-template-columns: minmax(150px,.75fr) minmax(220px,1.5fr) auto; gap: 10px 16px; align-items: center; margin-top: 16px !important; padding: 13px 15px !important; border: 2px solid #151918 !important; border-radius: 14px !important; background: #151918 !important; color: #fff; }
.cross-nutrient-strip h3, .cross-nutrient-strip p { color: #fff !important; }
.cross-nutrient-strip p { margin: 3px 0 0 !important; opacity: .58; font-size: 9px !important; }
.cross-compact-summary { display: flex; flex-wrap: wrap; gap: 6px; color: #cdd3cb; font-size: 9px; }
.cross-compact-summary span { display: flex; gap: 6px; padding: 6px 8px; border-radius: 8px; color: #111; background: #d3ef72; }
.cross-compact-summary em { font-style: normal; }
.cross-nutrient-strip > button { min-height: 34px; border: 1px solid #d3ef72; border-radius: 9px; color: #111; background: #d3ef72; font-size: 9px; font-weight: 800; }
.cross-nutrient-strip > .fixed-foods { display: none; grid-column: 1 / -1; }
.cross-nutrient-strip.expanded > .fixed-foods { display: grid; }
.actual-panel { border: 2px solid #d3ef72 !important; background: #151918 !important; }

.admin-body { background: #b6d45b; }
.admin-shell { border-right: 6px solid #151918; border-left: 6px solid #151918; background: #f4ffe2; }
.admin-header { color: #fff; background: #151918 !important; }
.admin-header h1, .admin-header p, .admin-header .eyebrow { color: #fff !important; }
.meal-food-status { border: 2px solid #151918 !important; background: #eefbcf !important; }
.meal-food-status-item { width: 100%; min-height: 104px; border: 2px solid transparent !important; font: inherit; text-align: left; cursor: pointer; }
.meal-food-status-item.matched { color: #151918 !important; border-color: #151918 !important; background: #d3ef72 !important; }
.meal-food-status-item.shortage { color: #8f2f26 !important; border-color: #c84739 !important; background: #fff0eb !important; }
.meal-food-status-item.excess { color: #583082 !important; border-color: #7146a8 !important; background: #f1e8ff !important; }
.coach-food-detail { margin-top: 9px; }
.unified-food-unlock { background: #dff39a !important; }

@media (max-width: 700px) {
  .page-shell { width: 100%; padding: 10px; border-width: 4px; }
  .macro-composers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .macro-composer { min-height: 226px; padding: 9px !important; border-radius: 11px !important; box-shadow: 3px 3px 0 currentColor !important; }
  .macro-kicker { font-size: 10px !important; }
  .target-current { padding: 6px !important; }
  .target-current input, .target-current strong { font-size: 17px !important; }
  .target-current em, .target-current .slash { font-size: 8px !important; }
  .macro-balance { display: grid !important; gap: 2px; font-size: 8px !important; }
  .macro-card-compact-foods { min-height: 42px; font-size: 8px; }
  .macro-card-compact-foods span { display: grid; gap: 1px; }
  .macro-card-toggle { padding: 4px; font-size: 8px; }
  .macro-composer.expanded { grid-column: 1 / -1; padding: 14px !important; }
  .cross-nutrient-strip { grid-template-columns: 1fr auto !important; padding: 11px !important; }
  .cross-compact-summary { grid-column: 1 / -1; grid-row: 2; }
  .admin-shell { border-width: 4px; }
}

/* r17 · 05 猫爪运动
   目标：保留高密度营养信息，用软阴影和猫爪反馈替代 r16 的粗黑描边。 */
:root {
  --paw-canvas: #b7d85c;
  --paw-shell: #f8ffe9;
  --paw-paper: #fffef9;
  --paw-ink: #202820;
  --paw-muted: #717b70;
  --paw-lime: #c6ec63;
  --paw-lime-soft: #e8f5bd;
  --paw-orange: #ef9c52;
  --paw-line: #dbe6bd;
  --paw-under: #fff0ec;
  --paw-under-ink: #b64f45;
  --paw-over: #f1eaff;
  --paw-over-ink: #7654aa;
  --paw-shadow: 0 14px 38px rgba(48, 70, 25, .12);
}

html { background: var(--paw-canvas); }
body,
body:not(.admin-body),
body.admin-body {
  color: var(--paw-ink);
  background:
    radial-gradient(circle at 12px 12px, rgba(255,255,255,.18) 0 2px, transparent 2.5px) 0 0 / 32px 32px,
    var(--paw-canvas) !important;
  font-family: "SF Pro Rounded", "Arial Rounded MT Bold", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

button, input, select, textarea { font: inherit; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(239, 156, 82, .38) !important;
  outline-offset: 2px;
}

.page-shell,
.admin-shell,
.food-admin-shell,
.checkin-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 18px 64px;
  border: 0 !important;
  border-radius: 0 0 28px 28px;
  background: var(--paw-shell) !important;
  box-shadow: 0 24px 65px rgba(38, 58, 18, .15);
}

.page-shell { width: min(980px, calc(100% - 28px)); }
.checkin-shell { width: min(700px, calc(100% - 22px)); }

.hero,
.admin-header,
.checkin-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0 !important;
  border-radius: 22px !important;
  color: #fff !important;
  background: var(--paw-ink) !important;
  box-shadow: 0 16px 34px rgba(30, 40, 30, .18) !important;
}

.hero { min-height: 250px; padding: 38px 210px 38px 38px !important; }
.admin-header { min-height: 184px; padding: 32px 190px 32px 34px !important; }
.checkin-hero { min-height: 190px; padding: 32px 180px 32px 30px !important; }

.hero::before,
.access-card::before { display: none !important; }
.hero::after,
.admin-header::after,
.checkin-hero::after {
  content: "" !important;
  position: absolute !important;
  z-index: -1 !important;
  right: 20px !important;
  bottom: -11px !important;
  top: auto !important;
  width: 170px !important;
  height: 170px !important;
  border: 0 !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  background: none !important;
  image-rendering: pixelated;
}
.admin-header::after { width: 155px !important; height: 155px !important; right: 24px !important; }
.checkin-hero::after { width: 145px !important; height: 145px !important; right: 18px !important; }

.hero h1,
.admin-header h1,
.checkin-hero h1 { color: #fff !important; letter-spacing: -.045em; }
.hero-copy > p:last-child,
.admin-header > div > p:not(.eyebrow),
.checkin-hero span { color: rgba(255,255,255,.66) !important; }
.hero .eyebrow,
.admin-header .eyebrow,
.checkin-hero p { color: var(--paw-lime) !important; }
.hero-badge span { border: 0 !important; background: rgba(198,236,99,.13) !important; }

.card,
.result,
.admin-card,
.checkin-card,
.client-record,
.meal-detail-card,
.meal-detail-section,
.food-library-card {
  border: 1px solid var(--paw-line) !important;
  border-radius: 18px !important;
  background: var(--paw-paper) !important;
  box-shadow: var(--paw-shadow) !important;
}
.card::before { display: none !important; }
.admin-card, .card { padding: 24px; }
.section-heading h2, .admin-card h2, .card-heading h2 { letter-spacing: -.03em; }
.section-number, .status-pill, .unit-label, .card-heading i {
  border: 0 !important;
  color: var(--paw-ink) !important;
  background: var(--paw-lime-soft) !important;
}

.button.primary,
.admin-primary,
.submit-calculator-checkin,
.complete-checkin,
.access-card button,
.file-button.primary {
  border: 0 !important;
  border-radius: 12px !important;
  color: var(--paw-ink) !important;
  background: var(--paw-lime) !important;
  box-shadow: 0 6px 0 #9fbe45 !important;
}
.button.primary:active,
.admin-primary:active,
.submit-calculator-checkin:active,
.complete-checkin:active { transform: translateY(3px); box-shadow: 0 3px 0 #9fbe45 !important; }
.button.secondary,
.admin-secondary,
.record-actions button,
.status-filters button,
.batch-actions button,
.batch-actions select,
.file-button {
  border: 1px solid var(--paw-line) !important;
  border-radius: 11px !important;
  color: var(--paw-ink) !important;
  background: #fff !important;
}
input, select, textarea {
  border: 1px solid var(--paw-line) !important;
  border-radius: 11px !important;
  color: var(--paw-ink);
  background: #fff !important;
  box-shadow: none !important;
}
input:focus, select:focus, textarea:focus { border-color: #9fbe45 !important; }

.macro-composers { gap: 9px !important; }
.macro-composer {
  min-height: 238px;
  padding: 14px !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: 0 7px 0 #dbe9af, 0 15px 26px rgba(54,78,27,.08) !important;
}
.macro-composer::before { display: none !important; }
.macro-composer.status-under {
  border: 1px solid #f2c5bd !important;
  color: var(--paw-under-ink) !important;
  background: var(--paw-under) !important;
  box-shadow: 0 7px 0 #f2c5bd !important;
}
.macro-composer.status-matched {
  border: 1px solid #badc5a !important;
  color: var(--paw-ink) !important;
  background: #f2fbd9 !important;
  box-shadow: 0 7px 0 #badc5a !important;
}
.macro-composer.status-over {
  border: 1px solid #d8c7ef !important;
  color: var(--paw-over-ink) !important;
  background: var(--paw-over) !important;
  box-shadow: 0 7px 0 #d8c7ef !important;
}
.macro-kicker::before { content: "●"; margin-right: 5px; color: var(--paw-orange); }
.target-current { border: 0 !important; background: rgba(255,255,255,.62) !important; }
.macro-progress { border: 0 !important; background: rgba(32,40,32,.09) !important; }
.macro-card-toggle {
  min-height: 34px;
  border: 0 !important;
  border-radius: 10px !important;
  color: #fff;
  background: var(--paw-ink) !important;
}
.macro-card-compact-foods span { border-color: rgba(32,40,32,.11) !important; }
.macro-composer.expanded { box-shadow: 0 8px 0 #dbe9af, var(--paw-shadow) !important; }

.cross-nutrient-strip {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--paw-ink) !important;
  box-shadow: 0 10px 24px rgba(32,40,32,.14) !important;
}
.cross-compact-summary span,
.cross-nutrient-strip > button {
  border: 0 !important;
  border-radius: 9px !important;
  color: var(--paw-ink) !important;
  background: var(--paw-lime) !important;
}
.actual-panel {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--paw-ink) !important;
}

.meal-food-status {
  border: 0 !important;
  border-radius: 15px !important;
  background: var(--paw-lime-soft) !important;
  box-shadow: inset 0 0 0 1px var(--paw-line) !important;
}
.meal-food-status-item {
  min-height: 96px;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 0 rgba(32,40,32,.08) !important;
}
.meal-food-status-item.matched { color: var(--paw-ink) !important; background: var(--paw-lime) !important; }
.meal-food-status-item.shortage { color: var(--paw-under-ink) !important; background: var(--paw-under) !important; }
.meal-food-status-item.excess { color: var(--paw-over-ink) !important; background: var(--paw-over) !important; }
.unified-food-unlock { border: 0 !important; background: var(--paw-lime-soft) !important; }

details, .setting-fold, .version-workbench, .client-action-console {
  border-color: var(--paw-line) !important;
  border-radius: 14px !important;
}
details[open], .setting-fold[open], .client-action-console.active { background: #fbfff2 !important; }
summary::marker { color: var(--paw-orange); }
.version-selector button.active,
.plan-version-tab.active,
.coach-food-mode-switch button.active,
.library-tabs button.active,
.category-tabs button.active,
.alphabet-nav button.active {
  border-color: var(--paw-ink) !important;
  color: #fff !important;
  background: var(--paw-ink) !important;
}

.checkin-cat-progress {
  border: 1px solid rgba(198,236,99,.22) !important;
  background: rgba(198,236,99,.1) !important;
}
.checkin-cat-progress img { filter: drop-shadow(0 5px 8px rgba(0,0,0,.15)); }
.calculator-checkin { border: 0 !important; border-radius: 17px !important; background: var(--paw-ink) !important; }
.checkin-success-confirm input { accent-color: var(--paw-orange) !important; }
.calendar-cell { border: 1px solid var(--paw-line) !important; border-radius: 11px !important; }
.calendar-cell.has-checkin { background: var(--paw-lime-soft) !important; }
.checkin-stats-grid > div, .checkin-record-card { border-color: var(--paw-line) !important; background: #fff !important; }

.access-gate {
  background:
    radial-gradient(circle at 12px 12px, rgba(255,255,255,.18) 0 2px, transparent 2.5px) 0 0 / 32px 32px,
    var(--paw-canvas) !important;
}
.access-card {
  position: relative;
  overflow: visible;
  border: 0 !important;
  border-radius: 24px !important;
  background: var(--paw-paper) !important;
  box-shadow: 0 24px 65px rgba(38,58,18,.22) !important;
}
.access-card::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -66px;
  width: 118px;
  height: 118px;
  background: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 9px 12px rgba(54, 45, 27, .14));
}

@media (hover: hover) {
  button:not(:disabled):hover, .client-link:hover, summary:hover { transform: translateY(-1px); }
  .macro-composer:hover, .meal-food-status-item:hover { transform: translateY(-2px); }
}

@media (max-width: 720px) {
  .page-shell, .admin-shell, .food-admin-shell { width: 100%; padding: 8px 8px 44px; border-radius: 0; }
  .checkin-shell { width: 100%; padding: 8px 8px 44px; border-radius: 0; }
  .hero { min-height: 192px; padding: 25px 108px 26px 20px !important; }
  .admin-header { min-height: 160px; padding: 24px 105px 24px 20px !important; }
  .checkin-hero { min-height: 165px; padding: 24px 104px 24px 20px !important; }
  .hero::after, .admin-header::after, .checkin-hero::after { right: 5px !important; bottom: -5px !important; width: 108px !important; height: 108px !important; }
  .hero h1 { font-size: clamp(28px, 8vw, 36px) !important; }
  .admin-header h1 { font-size: 27px !important; white-space: normal !important; }
  .card, .admin-card, .result { padding: 17px 12px !important; }
  .macro-composers { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px !important; }
  .macro-composer { min-height: 210px; padding: 8px !important; border-radius: 11px !important; box-shadow: 0 5px 0 #dbe9af !important; }
  .macro-composer.status-under { box-shadow: 0 5px 0 #f2c5bd !important; }
  .macro-composer.status-matched { box-shadow: 0 5px 0 #badc5a !important; }
  .macro-composer.status-over { box-shadow: 0 5px 0 #d8c7ef !important; }
  .macro-card-toggle { min-height: 31px; }
  .cross-nutrient-strip { margin-top: 12px !important; }
  .access-card::after { right: 4px; top: -57px; width: 98px; height: 98px; }
}

/* r18 · PDF-confirmed 05 system
   Lime frame + milk-white workbench + ink controls + pixel paw. No cat artwork. */
:root {
  --paw-canvas: #b6d75b;
  --paw-shell: #f8ffe9;
  --paw-paper: #ffffff;
  --paw-ink: #182018;
  --paw-muted: #747d72;
  --paw-lime: #c5ed5a;
  --paw-lime-soft: #e6f3bd;
  --paw-orange: #ef9c52;
  --paw-line: #d6e3b4;
  --paw-shadow: 0 28px 70px rgba(62, 87, 31, .20);
}

html,
body,
body.admin-body,
body:not(.admin-body) {
  min-height: 100%;
  background: var(--paw-canvas) !important;
}

h1, h2, h3, h4,
.hero h1,
.admin-header h1,
.checkin-hero h1,
.section-heading h2,
.admin-card h2,
.card-heading h2 {
  font-family: "SF Pro Rounded", "Arial Rounded MT Bold", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif !important;
  font-style: normal !important;
}

.page-shell,
.admin-shell,
.food-admin-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 58px;
  padding: 0;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--paw-line) !important;
  border-radius: 18px !important;
  background: var(--paw-shell) !important;
  box-shadow: var(--paw-shadow) !important;
}

.page-shell { width: min(1180px, calc(100% - 32px)); }
.app-canvas { min-width: 0; padding: 26px 28px 58px; background: var(--paw-shell); }
.app-rail {
  min-height: calc(100vh - 82px);
  padding: 25px 14px 18px;
  display: flex;
  flex-direction: column;
  color: var(--paw-ink);
  background: var(--paw-lime-soft);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
}
.app-brand i {
  width: 19px;
  height: 13px;
  border-radius: 13px 2px 13px 2px;
  background: #a9d13d;
  transform: rotate(-13deg);
}
.app-person { display: flex; align-items: center; gap: 9px; margin: 28px 0 22px; }
.app-person > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 50%;
  color: var(--paw-ink);
  background: #ffc08e;
  font-size: 11px;
  font-weight: 900;
}
.app-person b,
.app-person small { display: block; }
.app-person b { font-size: 10px; }
.app-person small { margin-top: 2px; color: var(--paw-muted); font-size: 8px; }
.app-rail nav { display: grid; gap: 5px; }
.app-rail nav a {
  padding: 10px;
  border-radius: 10px;
  color: var(--paw-muted);
  text-decoration: none;
  font-size: 10px;
}
.app-rail nav a.active,
.app-rail nav a:hover { color: #fff; background: #202620; }
.app-rail-foot { margin-top: auto; color: var(--paw-muted); font-size: 7px; }

.hero,
.admin-header,
.checkin-hero {
  min-height: 0 !important;
  padding: 10px 0 24px !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--paw-ink) !important;
  background: transparent !important;
  box-shadow: none !important;
}
.hero { padding-right: 82px !important; }
.admin-header { padding-right: 0 !important; }
.checkin-hero { padding: 6px 58px 22px 2px !important; }
.hero::after,
.admin-header::after,
.checkin-hero::after,
.access-card::after { content: none !important; display: none !important; background: none !important; }
.hero::before,
.checkin-hero::before,
.access-card::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  right: 14px;
  top: 16px;
  width: 34px;
  height: 34px;
  background: var(--paw-ink) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 0h2v2H1zM5 0h2v2H5zM0 3h2v2H0zm6 0h2v2H6zM2 4h4v3H5v1H3V7H2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 0h2v2H1zM5 0h2v2H5zM0 3h2v2H0zm6 0h2v2H6zM2 4h4v3H5v1H3V7H2z'/%3E%3C/svg%3E") center / contain no-repeat;
  image-rendering: pixelated;
}
.checkin-hero::before { right: 8px; top: 12px; }
.hero h1,
.admin-header h1,
.checkin-hero h1 { color: var(--paw-ink) !important; }
.hero-copy > p:last-child,
.admin-header > div > p:not(.eyebrow),
.checkin-hero span { color: var(--paw-muted) !important; }
.hero .eyebrow,
.admin-header .eyebrow,
.checkin-hero p { color: var(--paw-muted) !important; }
.admin-header .client-link,
.admin-header button,
.forget-device {
  border: 1px solid var(--paw-line) !important;
  border-radius: 10px !important;
  color: var(--paw-ink) !important;
  background: #fff !important;
}

.card,
.result,
.admin-card,
.checkin-card,
.client-record,
.meal-detail-card,
.meal-detail-section,
.food-library-card {
  border: 1px solid var(--paw-line) !important;
  border-radius: 14px !important;
  background: var(--paw-paper) !important;
  box-shadow: 0 7px 0 #d6e6aa !important;
}
.admin-card,
.card { padding: 20px; }
.client-record:hover,
.food-library-card:hover { transform: translateY(-2px); }

.button.primary,
.admin-primary,
.submit-calculator-checkin,
.complete-checkin,
.access-card button,
.file-button.primary {
  color: #fff !important;
  background: #202620 !important;
  box-shadow: none !important;
}
.button.primary:active,
.admin-primary:active,
.submit-calculator-checkin:active,
.complete-checkin:active { transform: translateY(1px); box-shadow: none !important; }

.macro-composers { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 9px !important; }
.macro-composer {
  min-width: 0;
  min-height: 208px;
  padding: 14px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 7px 0 #d6e6aa !important;
}
.macro-composer.status-under,
.macro-composer.status-matched,
.macro-composer.status-over { background: #fff !important; }
.macro-composer.status-under { color: var(--paw-under-ink) !important; box-shadow: 0 7px 0 #f1c7c1 !important; }
.macro-composer.status-matched { color: var(--paw-ink) !important; box-shadow: 0 7px 0 #b5da4d !important; }
.macro-composer.status-over { color: var(--paw-over-ink) !important; box-shadow: 0 7px 0 #d7c7ef !important; }
.target-current { background: var(--paw-shell) !important; }
.macro-card-toggle { color: #fff !important; background: #202620 !important; }
.cross-nutrient-strip,
.actual-panel,
.calculator-checkin { border-radius: 13px !important; color: #fff !important; background: #202620 !important; }
.actual-panel h3,
.actual-panel strong,
.actual-panel span,
.calculator-checkin h3 { color: #fff !important; }
.cross-compact-summary span,
.cross-nutrient-strip > button { background: var(--paw-lime) !important; }
.meal-food-status { background: var(--paw-shell) !important; }

.access-gate { background: var(--paw-canvas) !important; }
.access-card {
  overflow: hidden;
  border: 1px solid var(--paw-line) !important;
  border-radius: 18px !important;
  background: var(--paw-shell) !important;
  box-shadow: var(--paw-shadow) !important;
}
.access-card::before { right: 24px; top: 22px; width: 30px; height: 30px; }

.checkin-shell {
  width: min(720px, calc(100% - 24px));
  margin: 24px auto 50px;
  padding: 24px;
  border: 1px solid var(--paw-line) !important;
  border-radius: 18px !important;
  background: var(--paw-shell) !important;
  box-shadow: var(--paw-shadow) !important;
}
.checkin-cat-progress { position: relative; min-width: 104px; padding-left: 38px !important; }
.checkin-cat-progress img,
.checkin-cat-progress > [hidden] { display: none !important; }
.checkin-cat-progress::before,
.pixel-paw {
  width: 26px;
  height: 26px;
  display: inline-block;
  color: var(--paw-lime);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 0h2v2H1zM5 0h2v2H5zM0 3h2v2H0zm6 0h2v2H6zM2 4h4v3H5v1H3V7H2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1 0h2v2H1zM5 0h2v2H5zM0 3h2v2H0zm6 0h2v2H6zM2 4h4v3H5v1H3V7H2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checkin-cat-progress::before { content: ""; position: absolute; left: 7px; top: 50%; transform: translateY(-50%); }
.pixel-paw.stage-0 { color: #aab3aa; }
.pixel-paw.stage-1,
.pixel-paw.stage-2,
.pixel-paw.stage-3 { color: var(--paw-orange); }
.pixel-paw.stage-4 { color: #87ad2d; }
.calendar-paw { width: 31px; height: 31px; }
.calendar-legend img,
.calendar-cat { display: none !important; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 720px) {
  .page-shell,
  .admin-shell,
  .food-admin-shell {
    width: 100%;
    margin: 0;
    display: block;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .app-rail { display: none; }
  .app-canvas { padding: 14px 10px 48px; }
  .admin-header,
  .hero { padding: 12px 54px 20px 4px !important; }
  .header-actions { margin-top: 12px; }
}

@media (max-width: 560px) {
  .page-shell,
  .admin-shell,
  .food-admin-shell,
  .checkin-shell { width: 100%; margin: 0; border-radius: 0 !important; }
  .checkin-shell { padding: 14px 10px 42px; }
  .app-canvas { padding: 10px 8px 44px; }
  .hero { min-height: 150px !important; padding: 20px 48px 18px 12px !important; }
  .hero h1 { font-size: 30px !important; }
  .admin-header h1 { font-size: 28px !important; }
  .card,
  .admin-card,
  .result { padding: 16px 10px !important; }
  .macro-composers { gap: 5px !important; }
  .macro-composer { min-height: 190px; padding: 8px !important; border-radius: 10px !important; }
  .macro-composer-head h3 { display: none; }
  .target-current { padding: 7px 5px !important; }
  .macro-card-toggle { min-height: 30px; font-size: 10px !important; }
  .cross-nutrient-strip { border-radius: 10px !important; }
}

/* r18 visual checkpoint 01 · PDF 05 top + plan selector only */
.hero::before { content: none !important; display: none !important; }
.admin-header::before,
.checkin-hero::before,
.access-card::before {
  width: 58px !important;
  height: 58px !important;
  background: url("assets/orange-cat/orange-cat-0.png") center / contain no-repeat !important;
  -webkit-mask: none !important;
  mask: none !important;
  image-rendering: pixelated;
}
.checkin-cat-progress::before { content: none !important; display: none !important; }
.checkin-cat-progress img,
.calendar-cat { display: block !important; content: url("assets/orange-cat/orange-cat-0.png"); image-rendering: pixelated; }
.pixel-paw {
  width: 28px !important;
  height: 28px !important;
  background: url("assets/orange-cat/orange-cat-2.png") center / contain no-repeat !important;
  -webkit-mask: none !important;
  mask: none !important;
  image-rendering: pixelated;
}
.pixel-paw.stage-0,
.pixel-paw.stage-1,
.pixel-paw.stage-2,
.pixel-paw.stage-3,
.pixel-paw.stage-4 { background-image: url("assets/orange-cat/orange-cat-0.png") !important; }
.hero-r18-cat {
  position: absolute;
  z-index: 1;
  right: 8px;
  top: 4px;
  width: 62px;
  height: 62px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 5px 0 rgba(79, 104, 37, .10));
  pointer-events: none;
}

@media (max-width: 560px) {
  body:not(.admin-body) { background: var(--paw-shell) !important; }
  .hero {
    display: block !important;
    min-height: 0 !important;
    margin: 0 4px 22px;
    padding: 45px 76px 5px 4px !important;
  }
  .hero::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 0;
    right: -2px !important;
    top: 4px !important;
    width: 69px !important;
    height: 61px !important;
    border-radius: 48% 52% 45% 55% !important;
    background: var(--paw-lime-soft) !important;
    -webkit-mask: none !important;
    mask: none !important;
    transform: rotate(7deg);
  }
  .hero::after {
    content: "好好吃饭" !important;
    display: block !important;
    position: absolute !important;
    left: 4px !important;
    right: auto !important;
    top: 17px !important;
    width: auto !important;
    height: auto !important;
    margin: 0;
    color: var(--paw-muted);
    background: none !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .hero-r18-cat { z-index: 2; top: 3px; right: 3px; width: 59px; height: 59px; transform: rotate(-3deg); }
  .hero .eyebrow { margin-bottom: 7px !important; font-size: 11px !important; }
  .hero .client-expiry { margin-bottom: 6px !important; font-size: 9px !important; opacity: .72; }
  .hero h1 {
    margin: 0 !important;
    font-size: 28px !important;
    line-height: 1.08 !important;
    letter-spacing: -.045em !important;
  }
  .hero-copy > p:last-child {
    display: none !important;
  }
  .forget-device { position: static !important; width: max-content !important; margin-top: 9px; min-height: 28px !important; padding: 4px 9px !important; font-size: 9px !important; }

  .preset-card {
    display: block !important;
    margin: 0 0 20px;
    padding: 17px 14px 15px !important;
    border: 1px solid var(--paw-line) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.74) !important;
    box-shadow: 0 7px 0 #dce9b8 !important;
  }
  .preset-card .section-heading { grid-column: 1 / -1; align-items: flex-end; margin-bottom: 5px; }
  .preset-card .section-heading > div { display: flex; align-items: baseline; gap: 9px; }
  .preset-card .step {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    color: var(--paw-muted) !important;
    background: transparent !important;
    font-size: 10px !important;
  }
  .preset-card .section-heading h2 { font-size: 22px !important; letter-spacing: -.035em; }
  .preset-card .status-pill {
    padding: 7px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: var(--paw-ink) !important;
    background: var(--paw-lime-soft) !important;
    font-size: 9px !important;
  }
  .preset-intro {
    margin: 0 0 14px;
    color: var(--paw-muted);
    font-size: 10px;
    line-height: 1.55;
  }
  .preset-control-panel {
    padding: 13px 12px;
    border: 1px solid #e2e8d4;
    border-radius: 14px;
    background: #fff;
  }
  .version-field, .meal-field {
    min-width: 0;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }
  .meal-choice-row { min-width: 0; margin: 11px 0 0 !important; padding-top: 11px; border-top: 1px solid #edf0e6; }
  .version-field-head { display: block !important; }
  .version-field-head legend, .meal-field legend { margin: 0 !important; font-size: 10px !important; }
  .meal-field legend { grid-column: 1; grid-row: 1; }
  .meal-field .meal-options { grid-column: 2; grid-row: 1; width: 100%; }
  .meal-field .meal-options label { min-width: 0 !important; flex: 1 1 0; justify-content: center; padding-inline: 7px !important; }
  .version-options, .meal-options { gap: 6px !important; flex-wrap: wrap; }
  .version-options label, .meal-options label {
    min-height: 34px !important;
    padding: 7px 11px !important;
    border-radius: 999px !important;
    box-shadow: none !important;
  }
  .preset-card .info-note { margin-top: 12px !important; padding: 10px 12px !important; border-radius: 12px !important; font-size: 9px !important; }
}

/* 05 mobile must stay last so legacy r18 rules cannot override it. */
@media (max-width: 560px) {
  .preset-card { margin: 0 0 12px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .preset-card > .section-heading, .preset-intro, .preset-card .info-note { display: none !important; }
  .preset-control-panel { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
  .version-field, .meal-field { display: grid !important; grid-template-columns: 64px minmax(0,1fr) !important; align-items: center !important; gap: 6px !important; margin: 0 !important; }
  .version-field-head legend, .meal-field legend { margin: 0 !important; color: #747d72 !important; font-size: 8px !important; }
  .meal-choice-row { margin: 6px 0 0 !important; padding: 6px 0 0 !important; border: 0 !important; }
  .version-options, .meal-options { display: flex !important; gap: 6px !important; flex-wrap: nowrap !important; }
  .version-option, .meal-option { min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .version-options > label.version-option, .meal-options > label.meal-option { min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .meal-option { flex: 1 1 0 !important; }
  .version-option > span, .meal-option > span { width: 100% !important; min-height: 32px !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 7px 8px !important; border: 1px solid #d6e3b4 !important; border-radius: 9px !important; color: #747d72 !important; background: #fff !important; box-shadow: none !important; font-size: 8px !important; line-height: 1 !important; white-space: nowrap !important; }
  .version-option > span i { display: none !important; }
  .version-option > input:checked + span, .meal-option > input:checked + span { border-color: #202620 !important; color: #fff !important; background: #202620 !important; box-shadow: none !important; }
  .composer-card { margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .composer-card > .section-heading { display: none !important; }
  .macro-composers { gap: 5px !important; }
  .macro-composer, .macro-composer.status-under, .macro-composer.status-matched, .macro-composer.status-over { min-height: 154px !important; padding: 9px !important; border: 0 !important; border-radius: 12px !important; background: #fff !important; box-shadow: 0 7px 0 #d6e6aa !important; }
  .macro-composer.status-under { box-shadow: 0 7px 0 #efb8ae !important; }
  .macro-composer.status-matched { box-shadow: 0 7px 0 #b5da4d !important; }
  .macro-composer.status-over { box-shadow: 0 7px 0 #cdbce8 !important; }
}
.calendar-cat{display:block!important;width:34px!important;height:34px!important;margin:2px auto!important;object-fit:contain!important;image-rendering:pixelated!important}.calendar-cat.uncompleted{filter:grayscale(1)!important;opacity:.48!important}.calendar-legend .calendar-cat{width:27px!important;height:27px!important;margin:0!important}.calendar-legend span{display:inline-flex!important;align-items:center!important;gap:5px!important}.pixel-paw,.calendar-paw{display:none!important}

/* r25: do not let the old r18 fallback force every calendar day to the fat cat. */
.calendar-cat.stage-0{content:url("assets/orange-cat/orange-cat-0.png")!important}
.calendar-cat.stage-1{content:url("assets/orange-cat/orange-cat-1.png")!important}
.calendar-cat.stage-2{content:url("assets/orange-cat/orange-cat-2.png")!important}
.calendar-cat.stage-3{content:url("assets/orange-cat/orange-cat-3.png")!important}
.calendar-cat.stage-4{content:url("assets/orange-cat/orange-cat-4.png")!important}

/* r20.1 · client copy, single-open cards, compact food chips and safe summary cards */
.daily-execution-card { margin-top: 14px !important; }
.daily-execution-notes { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.daily-execution-notes li { padding: 11px 13px; border: 1px solid var(--paw-line); border-radius: 12px; color: var(--paw-ink); background: #fff; line-height: 1.55; font-size: 11px; }
.macro-composer.expanded { order: -1; grid-column: 1 / -1; }
.cross-nutrient-strip > button { width: 34px; min-width: 34px; padding: 0; font-size: 17px; line-height: 1; }
.cross-nutrient-strip > button span { display: block; transition: transform .2s ease; }
.cross-nutrient-strip.expanded > button span { transform: rotate(180deg); }
.cross-nutrient-strip .fixed-selected-foods,
.cross-nutrient-strip .fixed-foods,
.cross-nutrient-strip .fixed-food { color: var(--paw-ink); }
.cross-nutrient-strip .fixed-food strong,
.cross-nutrient-strip .fixed-food small,
.cross-nutrient-strip .fixed-picker-choice strong { color: var(--paw-ink) !important; }
.selected-foods, .fixed-selected-foods { display: flex !important; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.selected-food-row, .fixed-food { display: inline-flex !important; width: max-content; max-width: 100%; flex: 0 1 auto; align-items: center; gap: 8px; padding: 9px 10px !important; }
.selected-food-row.natural-custom-food, .fixed-food.natural-custom-food { border-color: #d7ad55 !important; background: #fff8dc !important; color: #3d3218 !important; }
.selected-food-row.manual-custom-food, .fixed-food.manual-custom-food { border-color: #d9867a !important; background: #fff0ed !important; color: #4b2622 !important; }
.selected-food-row.natural-custom-food strong, .selected-food-row.natural-custom-food small, .fixed-food.natural-custom-food strong, .fixed-food.natural-custom-food small, .selected-food-row.manual-custom-food strong, .selected-food-row.manual-custom-food small, .fixed-food.manual-custom-food strong, .fixed-food.manual-custom-food small { color: inherit !important; }
.selected-food-name { min-width: 0; max-width: 220px; }
.selected-food-name strong, .selected-food-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixed-food > span:first-child { min-width: 0; max-width: 210px; }
.fixed-food > span:first-child strong, .fixed-food > span:first-child small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-row { min-height: 68px; padding: 12px !important; border-color: var(--paw-line) !important; color: var(--paw-ink); background: #fff !important; box-shadow: 0 5px 0 #dbe9af !important; }
.result-row strong { color: var(--paw-ink) !important; }
.result-row small { color: var(--paw-muted) !important; }
.result-row b { color: var(--paw-ink) !important; }
.result-row.cross-summary-card { background: var(--paw-lime-soft) !important; }
.result-row.auto-fat-result { grid-column: auto; }

@media (max-width: 560px) {
  .hero-copy > p:last-child { display: block !important; max-width: none; margin-top: 10px !important; color: var(--paw-muted) !important; font-size: 10px !important; line-height: 1.55 !important; }
  .preset-card > .section-heading, .preset-intro, .preset-card .info-note { display: block !important; }
  .preset-card > .section-heading { display: flex !important; }
  .preset-intro { margin: 5px 0 10px !important; }
  .preset-card .section-heading h2 { font-size: 17px !important; }
  .daily-execution-card:not([hidden]) { display: block !important; margin: 10px 0 14px !important; padding: 13px !important; }
  .daily-execution-card .section-heading h2 { font-size: 17px !important; }
  .selected-food-row, .fixed-food { max-width: 100%; }
  .selected-food-name { max-width: 145px; }
  .result-foods { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 7px !important; }
  .result-row { min-height: 58px; padding: 9px !important; }
  .result-row b { font-size: 18px !important; }
}
