/* Shared layout and two complete Poesh palettes. Loaded after legacy styles. */
html[data-theme="dark"] {
  --ui-bg:#07140e; --ui-surface:#102219; --ui-raised:#182d21;
  --ui-soft:#172b20; --ui-input:#0b1a12; --ui-border:#425b49;
  --ui-text:#f4f8f0; --ui-muted:#b7c8b9; --ui-link:#dbea4a;
  --ui-accent:#dbea4a; --ui-accent-ink:#1b2b0c; --ui-selected:#2b4425;
  --ui-nav:#091810f5; --ui-shadow:#00000025; --ui-focus:#e2f65d;
  --ui-fact-icon:#ffac4c;
  --photo-text:#ffffff; --photo-muted:#e2ecde;
  --photo-start:#03100dfc; --photo-mid:#04120ff2; --photo-end:#03100d16;
}
html[data-theme="light"] {
  --ui-bg:#f4f7ee; --ui-surface:#ffffff; --ui-raised:#f6faef;
  --ui-soft:#edf4e6; --ui-input:#ffffff; --ui-border:#bacbb2;
  --ui-text:#193526; --ui-muted:#4c6552; --ui-link:#28633c;
  --ui-accent:#dbea4a; --ui-accent-ink:#1b2b0c; --ui-selected:#e5f0d6;
  --ui-nav:#fafcf5fa; --ui-shadow:#244b2410; --ui-focus:#28633c;
  --ui-fact-icon:#b45309;
  --photo-text:#183323; --photo-muted:#24412c;
  --photo-start:#fcfff9fc; --photo-mid:#f7fbf0f2; --photo-end:#f5faeb10;
}
html[data-theme] {
  --ink:var(--ui-text); --navy:var(--ui-text); --muted:var(--ui-muted);
  --paper:var(--ui-bg); --line:var(--ui-border); --green:var(--ui-link);
  --green-dark:var(--ui-link); --lime:var(--ui-accent);
  background:var(--ui-bg); scroll-padding-bottom:120px;
}
html[data-theme] body {
  margin:0; color:var(--ui-text); background-color:var(--ui-bg);
  background-image:radial-gradient(ellipse at 85% 0,color-mix(in srgb,var(--ui-link) 7%,transparent),transparent 58%);
  background-attachment:fixed;
}
html[data-theme] *,html[data-theme] *::before,html[data-theme] *::after {box-sizing:border-box}
html[data-theme] button {color:inherit; max-width:100%; cursor:pointer}
html[data-theme] :is(button,input,select,textarea,a):focus-visible {outline:2px solid var(--ui-focus);outline-offset:3px}
html[data-theme] :is(input,select,textarea) {min-width:0;max-width:100%;font:inherit;accent-color:var(--ui-link)}
html[data-theme] :is(input,select,textarea):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]) {
  color:var(--ui-text); -webkit-text-fill-color:var(--ui-text);
  background-color:var(--ui-input); border-color:var(--ui-border);font-size:16px;
}
html[data-theme] :is(input,textarea)::placeholder {color:var(--ui-muted);-webkit-text-fill-color:var(--ui-muted);opacity:1}
html[data-theme] select {width:100%;text-overflow:ellipsis;color-scheme:inherit}
html[data-theme] select option {color:var(--ui-text);background:var(--ui-input)}
html[data-theme] textarea {resize:vertical;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
html[data-theme] :is(input,select,textarea):disabled {opacity:.65}
html[data-theme] :is(h1,h2,h3,h4,p,small,strong,span,label,legend) {overflow-wrap:anywhere}
html[data-theme] :is(p,small) {line-height:1.5}
html[data-theme] .sr-only {overflow-wrap:normal}

/* A single gutter and content width; no old negative card margins. */
html[data-theme] .client-shell {min-width:0;width:100%;display:grid;grid-template-columns:224px minmax(0,1fr)}
html[data-theme] .client-main {grid-column:2;min-width:0;width:100%}
html[data-theme] .desktop-sidebar {width:224px;background:var(--ui-surface);border-color:var(--ui-border);color:var(--ui-text)}
html[data-theme] .app-content {width:100%;max-width:980px;margin-inline:auto;padding:20px 26px 70px}
html[data-theme] .app-content > * {min-width:0;max-width:100%}
html[data-theme] .section-stack {min-width:0;width:100%;gap:16px}
html[data-theme] :is(.ration-main-card,.ration-configurator,.ration-full-configurator,.ration-config-left,.ration-step-block,.profile-layout,.profile-overview) {min-width:0;width:100%;max-width:100%;margin-inline:0}
html[data-theme] .ration-main-card {border:0;border-radius:0;background:transparent;overflow:visible}
html[data-theme] .ration-configurator {display:block;min-height:0;grid-template-columns:minmax(0,1fr)}
html[data-theme] .ration-config-left {padding:0!important;background:transparent}
html[data-theme] :is(.ration-full-configurator,.individual-configurator .ration-config-left) {display:flex;flex-direction:column;gap:16px}
html[data-theme] :is(.ration-line-tabs,.ration-config-title,.ration-fields-grid,.ration-choice-row,.macro-fields,.goal-choice,.plan-features) {min-width:0;max-width:100%}
html[data-theme] .app-header {max-width:980px;margin-inline:auto;background:transparent;border:0;box-shadow:none;backdrop-filter:none;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"copy actions";padding:24px 26px 12px;gap:14px}
html[data-theme] .header-copy {grid-area:copy;display:block;min-width:0}
html[data-theme] .header-copy h1 {color:var(--ui-text);font-size:32px;line-height:1.15;margin:0}
html[data-theme] .header-copy p {color:var(--ui-muted);line-height:1.5;margin:9px 0 0}
html[data-theme] .header-actions {grid-area:actions;display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex-wrap:wrap;max-width:100%}
html[data-theme] .mobile-brand {grid-area:brand;color:var(--ui-link);min-width:0}
html[data-theme] :is(.brand strong,.mobile-brand strong,.login-brand strong) {color:var(--ui-link)}
html[data-theme] :is(.recipient-switch,.round-button,.avatar-button) {color:var(--ui-text);background:var(--ui-soft);border-color:var(--ui-border)}
html[data-theme] .recipient-switch select {background:transparent}
html[data-theme] .profile-shortcut .avatar-button {background:var(--ui-soft);color:var(--ui-text)}
html[data-theme] .profile-back {grid-column:1/-1;grid-row:auto;justify-self:start;color:var(--ui-link);margin:0}

/* Surface and type rules are shared by every section, including settings. */
html[data-theme] :is(.panel,.product-card,.subscription-card,.cart-item,.cart-total,.delivery-card,.reminder-card,.profile-card,.sheet,.payment-method-card,.checkout-address-fields,.ration-step-block,.plan-features,.individual-explainer,.individual-last-request,.profile-menu-row,.profile-list-item,.profile-plan-summary,.profile-recipient-identity,.profile-plan-empty,.calendar-panel,.result-card,.empty-state) {
  background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-border);box-shadow:0 5px 22px var(--ui-shadow);
}
html[data-theme] :is(.panel,.product-card,.cart-total,.ration-step-block,.individual-explainer) {border-radius:19px}
html[data-theme] :is(.eyebrow,.configurator-step-label,.profile-block-title,.ration-live-head span) {color:var(--ui-link)}
html[data-theme] :is(.panel h2,.panel h3,.product-card h3,.product-price strong,.reminder-time,.profile-settings h3,.profile-row-copy strong,.profile-person-copy strong,.profile-recipient-name,.profile-stat strong,.ration-config-title h2,.ration-sticky-summary strong,.cart-main h3,.cart-actions strong,.cart-main strong) {color:var(--ui-text)}
html[data-theme] :is(.panel p,.product-card p,.profile-row-copy small,.profile-person-copy small,.profile-plan-summary small,.reminder-main small,.delivery-main small,.form-message,.muted,.muted-copy,.payment-method-note,.checkout-address-fields p,.cart-main p,.cart-main small,.ration-plan-description,.individual-explainer li,.result-card span) {color:var(--ui-muted)}
html[data-theme] :is(.primary-button,.lime-button) {
  color:var(--ui-accent-ink);background:var(--ui-accent);border:1px solid color-mix(in srgb,var(--ui-accent) 65%,var(--ui-border));
  box-shadow:0 4px 18px var(--ui-shadow);text-align:center;white-space:normal;line-height:1.35;
}
html[data-theme] :is(.primary-button,.lime-button) :is(span,strong,small,svg) {color:inherit}
html[data-theme] :is(.secondary-button,.glass-pill,.chip,.category-tabs button,.panel-link,.danger-button) {background:var(--ui-soft);color:var(--ui-text);border-color:var(--ui-border);white-space:normal}
html[data-theme] :is(.panel-link,.profile-personal-link,.legal-link,.configurator-exclusions) {color:var(--ui-link)}
html[data-theme] :is(.chip.active,.category-tabs button.active,.nav-button.active) {background:var(--ui-selected);color:var(--ui-link);border-color:var(--ui-link)}
html[data-theme] .nav-button {color:var(--ui-muted)}
html[data-theme] [data-action="redesign-program-back"] {
  display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;gap:8px;min-height:44px;margin:0;
  padding:10px 16px;border:1px solid var(--ui-link);border-radius:13px;background:var(--ui-accent);color:var(--ui-accent-ink);
  font-size:14px;font-weight:750;box-shadow:0 3px 14px var(--ui-shadow);
}

/* Positive photo layers avoid images disappearing behind opaque parents. */
html[data-theme] :is(.program-tile,.program-hero,.visual-photo-link,.visual-meal,.app-banner) {position:relative;isolation:isolate;min-width:0;max-width:100%;color:var(--photo-text);background:#07140f}
html[data-theme] :is(.program-tile,.program-hero,.visual-photo-link) > .program-cover,
html[data-theme] .visual-meal .today-meal-photo,
html[data-theme] .app-banner > img {z-index:0}
html[data-theme] :is(.program-tile,.program-hero,.visual-photo-link,.visual-meal,.app-banner)::after {
  content:"";display:block;position:absolute;inset:0;width:auto;height:auto;border:0;border-radius:inherit;z-index:1;pointer-events:none;background:linear-gradient(90deg,var(--photo-start) 0,var(--photo-mid) 63%,var(--photo-end) 100%);
}
html[data-theme] :is(.program-tile,.program-hero,.visual-photo-link,.app-banner) > :is(div,span,button):not(.program-cover) {position:relative;z-index:2}
html[data-theme] :is(.program-tile-copy strong,.hero-copy h2,.app-banner h2,.visual-photo-link strong,.visual-photo-link h3,.meal-copy h3,.week-meal-title) {color:var(--photo-text);text-shadow:none;overflow-wrap:anywhere}
html[data-theme] :is(.program-tile-copy small,.hero-copy p,.app-banner p,.visual-photo-link small,.visual-photo-link p,.meal-copy p,.week-meal-description) {color:var(--photo-muted);text-shadow:none}
html[data-theme] :is(.program-tile-copy,.hero-copy) {min-width:0}
html[data-theme] .program-tile {--program-icon-size:48px;display:grid;grid-template-columns:var(--program-icon-size) minmax(0,1fr) 36px;align-items:center;gap:12px;padding:16px 14px}
html[data-theme] .program-tile::after {background:linear-gradient(90deg,var(--photo-start),var(--photo-mid) 78%,var(--photo-end) 100%)}
html[data-theme] .program-tile > .visual-tile {grid-column:1;grid-row:1;width:var(--program-icon-size);height:var(--program-icon-size);margin:0}
html[data-theme] .program-tile-copy {grid-column:2;grid-row:1;max-width:100%;padding:0}
html[data-theme] .program-tile > .panel-chevron {position:relative;inset:auto;grid-column:3;grid-row:1;justify-self:end;align-self:center;width:36px;height:36px;z-index:3}
html[data-theme] .program-hero.reference-hero {padding:18px;min-height:230px}
html[data-theme] .reference-hero > .hero-main {width:100%;max-width:none;gap:12px;min-height:105px;margin-bottom:18px}
html[data-theme] .reference-hero .hero-copy {max-width:calc(77% - 62px)}
html[data-theme] .reference-hero h2 {font-size:27px;line-height:1.18}
html[data-theme] .program-individual.reference-hero h2 {font-size:clamp(20px,5.5vw,27px)}
html[data-theme] .hero-benefits {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:100%}
html[data-theme] .hero-benefits:has(> span:nth-child(2):last-child) {grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-theme] .hero-benefits > span {min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;gap:6px;padding:9px 5px;border:1px solid var(--ui-border);background:var(--ui-surface)}
html[data-theme] .hero-benefits small {color:var(--ui-text);line-height:1.35}
html[data-theme] .hero-benefits .visual-icon {color:var(--ui-link)}
html[data-theme] .hero-meal-count {background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border);white-space:normal}
html[data-theme] .hero-meal-count .visual-icon {color:var(--ui-link)}
html[data-theme] .visual-photo-link {display:grid;grid-template-columns:45px minmax(0,1fr) 36px;align-items:center;gap:12px;padding:16px 14px}
html[data-theme] .visual-photo-link::after {background:linear-gradient(90deg,var(--photo-start),var(--photo-mid) 78%,var(--photo-end) 100%)}
html[data-theme] .visual-photo-link > .visual-tile {grid-column:1;grid-row:1;align-self:center}
html[data-theme] .visual-photo-link > .photo-link-copy {grid-column:2;grid-row:1;min-width:0;max-width:100%}
html[data-theme] .visual-photo-link > :is(.panel-chevron,.glass-circle) {position:relative;inset:auto;grid-column:3;grid-row:1;justify-self:end;align-self:center;z-index:3;width:36px;height:36px;min-height:36px;padding:0;margin:0}
html[data-theme] .app-banner {flex:0 0 100%;width:100%;min-width:0;max-width:100%}
html[data-theme] .app-banner > div {position:relative;z-index:2;max-width:72%;min-width:0}
html[data-theme] .app-banner .eyebrow {color:var(--photo-text)}

/* Meal controls stay in normal flow instead of extending beyond a card. */
html[data-theme] .visual-meal {--meal-icon-size:44px;display:grid;grid-template-columns:var(--meal-icon-size) minmax(0,1fr);grid-template-rows:1fr auto;align-items:start;gap:14px 12px;padding:16px 14px 12px;min-height:210px;overflow:hidden}
html[data-theme] .meal-copy {grid-column:2;grid-row:1;padding:0;min-width:0;min-height:0;width:100%;position:relative;z-index:2}
html[data-theme] .meal-copy h3 {max-width:72%;font-size:18px;line-height:1.25}
html[data-theme] .meal-copy p {max-width:70%;font-size:12px;line-height:1.5;-webkit-line-clamp:3}
html[data-theme] .visual-meal > .visual-tile {position:relative;inset:auto;grid-column:1;grid-row:1;z-index:3;width:var(--meal-icon-size)!important;height:var(--meal-icon-size)!important;margin:0}
html[data-theme] .meal-card-footer {position:relative;inset:auto;grid-column:1/-1;grid-row:2;align-self:end;z-index:2;width:100%!important;max-width:100%!important;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,2fr);gap:7px;margin:0}
html[data-theme] .meal-card-actions {min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
html[data-theme] :is(.meal-card-footer .glass-pill,.meal-calorie-pill) {min-width:0;max-width:100%;min-height:36px;display:flex;align-items:center;justify-content:center;gap:4px;padding:6px 3px;border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-surface);color:var(--ui-text);font-size:11px;line-height:1.3;white-space:normal}
html[data-theme] :is(.meal-card-footer .glass-pill,.meal-calorie-pill) .visual-icon {width:16px;height:16px;flex:none;color:var(--ui-link)}
html[data-theme] .meal-card-footer b {font-size:11px}
html[data-theme] .week-meal-row.visual-meal {grid-template-rows:auto}
html[data-theme] .week-meal-copy {grid-column:2;grid-row:1;position:relative;z-index:2;width:100%;max-width:100%;padding:0;min-height:0}
html[data-theme] .week-meal-title {font-size:18px;line-height:1.3;max-width:70%;padding-right:8px}
html[data-theme] .week-meal-description {line-height:1.5;font-size:12px}
html[data-theme="light"] :is(.meal-copy .eyebrow,.week-meal-type) {color:var(--ui-link)}
html[data-theme] .week-meal-row .week-meal-media {z-index:0}
html[data-theme] .week-meal-row .today-meal-photo {z-index:0}
html[data-theme] .week-meal-row .week-meal-photo {z-index:0}
html[data-theme] :is(.week-detail-button,.week-change-button,.week-meal-nutrition) {position:relative;inset:auto;display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;max-width:100%;margin:10px 6px 0 0;min-height:34px;padding:6px 9px;border:1px solid var(--ui-border);border-radius:15px;background:var(--ui-surface);color:var(--ui-text);font-size:11px;line-height:1.35;white-space:normal}
html[data-theme] :is(.week-detail-button,.week-change-button) .visual-icon {color:var(--ui-link);width:16px;height:16px}
html[data-theme] .week-replacement-field {max-width:100%;width:100%;margin-top:12px;background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme] .week-meal-controls {position:relative;inset:auto;width:auto;max-width:100%;flex-wrap:wrap}
html[data-theme] .week-replacement {background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}

/* Configurators: compact grids with real zero minima, readable numeric values. */
html[data-theme] .ration-step-block {padding:16px;margin:0}
html[data-theme] .ration-config-title {display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;text-align:center}
html[data-theme] .ration-fields-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;margin:0}
html[data-theme] .ration-fields-grid.three {grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-theme] :is(.field,.config-field,.macro-field) {min-width:0;max-width:100%}
html[data-theme] :is(.field,.config-field) > span {color:var(--ui-text);line-height:1.4}
html[data-theme] :is(.field,.config-field) :is(input,select,textarea) {width:100%;max-width:100%;font-size:16px;line-height:1.4;border-radius:12px}
html[data-theme] .ration-choice-row {width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
html[data-theme] .ration-choice-row.kcal {grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible}
html[data-theme] .ration-main-card[data-program="premium"] .ration-choice-row.kcal {grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-theme] .ration-main-card[data-program="family"] .ration-choice-row.kcal {grid-template-columns:minmax(0,1fr)}
html[data-theme] .ration-choice-row > * {min-width:0}
html[data-theme] :is(.ration-choice > span,.ration-kcal-button,.goal-choice label) {min-width:0;max-width:100%;color:var(--ui-text);background:var(--ui-input);border-color:var(--ui-border);white-space:normal}
html[data-theme] :is(.ration-choice > span,.ration-kcal-button) {padding:11px 5px}
html[data-theme] :is(.ration-choice strong,.ration-kcal-button strong) {font-size:22px;line-height:1.25;color:inherit}
html[data-theme] :is(.ration-choice small,.ration-kcal-button small) {font-size:11px;line-height:1.4;color:var(--ui-muted)}
html[data-theme] :is(.ration-choice input:checked + span,.ration-kcal-button.active,.goal-choice label:has(input:checked)) {color:var(--ui-accent-ink);background:var(--ui-accent);border-color:var(--ui-link)}
html[data-theme] :is(.ration-choice input:checked + span,.ration-kcal-button.active) small {color:var(--ui-accent-ink)}
html[data-theme] .macro-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html[data-theme] .macro-field {padding:13px 11px;background:var(--ui-surface)}
html[data-theme] .macro-field > span {display:grid;grid-template-columns:24px minmax(0,1fr);gap:7px;align-items:center;color:var(--ui-text);font-size:13px;line-height:1.4}
html[data-theme] .macro-field > span .visual-icon {width:24px;height:24px}
html[data-theme] .macro-field > span b {font:inherit;min-width:0}
html[data-theme] .macro-field input {width:100%;min-width:0;background:transparent!important;border:0;box-shadow:none;padding:9px 0 0;font-size:26px;line-height:1.3;min-height:48px;font-weight:750;color:var(--ui-text)!important;-webkit-text-fill-color:var(--ui-text)!important}
html[data-theme] .macro-field input::placeholder {font-size:12px;font-weight:400;color:var(--ui-muted);-webkit-text-fill-color:var(--ui-muted)}
html[data-theme] .goal-choice {gap:7px}
html[data-theme] .goal-choice label {font-size:12px;gap:5px;padding:10px 5px;line-height:1.35;flex-wrap:wrap;text-align:center}
html[data-theme] .ration-exclusions-toggle {min-width:0;width:100%;display:grid;grid-template-columns:44px minmax(0,1fr) 36px;align-items:center;gap:12px;color:var(--ui-text);background:var(--ui-surface);border-color:var(--ui-border)}
html[data-theme] .ration-exclusions-toggle > span:first-child {grid-column:1;grid-row:1;width:44px;max-width:100%;height:44px;min-width:0;background:var(--ui-selected);color:var(--ui-link);border-color:var(--ui-border)}
html[data-theme] .ration-exclusions-toggle > div {grid-column:2;grid-row:1;min-width:0;max-width:100%;overflow-wrap:anywhere}
html[data-theme] .ration-exclusions-toggle > .ration-forward-arrow {grid-column:3;grid-row:1;display:grid;place-items:center;justify-self:end;align-self:center;width:36px;height:36px;min-width:0;background:transparent;color:var(--ui-link);border:0}
html[data-theme] .ration-forward-arrow .visual-icon {width:22px;height:22px}
html[data-theme] .ration-exclusions-toggle strong {color:var(--ui-text);font-size:14px;white-space:normal}
html[data-theme] .ration-exclusions-toggle small {color:var(--ui-muted)}
html[data-theme] .ration-exclusions-toggle b {display:block;margin-top:5px;font-size:11px;color:var(--ui-link)}
html[data-theme] .ration-forward-button {display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:12px;text-align:left}
html[data-theme] .ration-forward-button > span {min-width:0;overflow-wrap:anywhere}
html[data-theme] .ration-forward-button > .visual-icon {width:22px;height:22px;justify-self:end}
html[data-theme] .ration-sticky-summary .ration-forward-button > span {color:inherit}
html[data-theme] .ration-sticky-summary {position:static;inset:auto;z-index:auto;transform:none;width:100%;max-width:100%;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:center;padding:14px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-border);backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-theme] body[data-ration-view="configure"] .app-content {overflow-anchor:none}
html[data-theme] .ration-sticky-summary > div {min-width:0;max-width:100%}
html[data-theme] .ration-sticky-summary :is(strong,span,small) {max-width:100%;white-space:normal;overflow-wrap:anywhere}
html[data-theme] .ration-sticky-summary > div > strong {font-size:23px;line-height:1.3}
html[data-theme] .ration-sticky-summary :is(span,small) {color:var(--ui-muted)}
html[data-theme] .ration-sticky-summary .lime-button {width:100%;max-width:100%;min-width:0;min-height:48px;font-size:13px;padding:12px 10px;white-space:normal}
html[data-theme] .plan-features > div {grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-theme] .plan-features span {min-width:0}
html[data-theme] .plan-features :is(strong,small) {color:var(--ui-text);line-height:1.4}
html[data-theme] .plan-features small {color:var(--ui-muted)}

/* Cart and payments use the same palette, including the quantity number. */
html[data-theme] .quantity {display:grid;grid-template-columns:34px minmax(30px,auto) 34px;width:max-content;max-width:100%;border:1px solid var(--ui-border);border-radius:12px;overflow:hidden;background:var(--ui-soft);color:var(--ui-text)}
html[data-theme] .quantity button {height:38px;min-height:38px;width:34px;padding:0;border:0;border-radius:0;background:transparent;color:var(--ui-text);font-size:21px}
html[data-theme] .quantity strong {display:block;min-width:0;padding:4px;background:transparent;color:var(--ui-text);font-size:14px;line-height:1.4;text-align:center;white-space:nowrap}
html[data-theme] .cart-item {grid-template-columns:64px minmax(0,1fr);padding:14px;gap:12px}
html[data-theme] .cart-main {min-width:0}
html[data-theme] .cart-main :is(h3,p,small) {white-space:normal;overflow-wrap:anywhere}
html[data-theme] .cart-actions {grid-column:2;min-width:0;max-width:100%;width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
html[data-theme] .cart-actions > strong {font-size:21px;white-space:normal}
html[data-theme] .cart-item-image {width:64px;max-width:100%;background:var(--ui-soft);border-color:var(--ui-border)}
html[data-theme] .cart-item-image > img {display:block;width:100%;height:100%;object-fit:cover}
html[data-theme] .cart-total {padding:18px}
html[data-theme] .cart-total .total-row {color:var(--ui-muted);border-color:var(--ui-border);flex-wrap:wrap;gap:8px}
html[data-theme] .cart-total .total-row.grand {color:var(--ui-text)}
html[data-theme] .cart-total .total-row.grand strong {color:var(--ui-link)}
html[data-theme] .payment-method-card {min-width:0;grid-template-columns:36px minmax(0,1fr) 20px;gap:8px;padding:12px}
html[data-theme] .payment-method-copy {min-width:0;overflow-wrap:anywhere}
html[data-theme] .payment-method-copy strong {color:var(--ui-text);font-size:12px;line-height:1.4}
html[data-theme] .payment-method-copy small {color:var(--ui-muted);font-size:11px;line-height:1.4}
html[data-theme] .payment-method-icon {width:36px;height:36px;background:var(--ui-soft);border-color:var(--ui-border);color:var(--ui-link)}
html[data-theme] .payment-method-check {background:var(--ui-input);border:1px solid var(--ui-border);color:var(--ui-text);width:19px;height:19px}
html[data-theme] .payment-method-card:has(input:checked) {border-color:var(--ui-link);background:var(--ui-selected)}
html[data-theme] .payment-method-card:has(input:checked) .payment-method-check {background:var(--ui-accent);color:var(--ui-accent-ink);border-color:var(--ui-link)}
html[data-theme] .checkout-choice {color:var(--ui-text);background:var(--ui-soft);border-color:var(--ui-border)}

/* Settings, notifications and appearance belong to the same layout. */
html[data-theme] body.profile-view {background-color:var(--ui-bg);color:var(--ui-text)}
html[data-theme] .profile-view .app-content {padding-top:12px}
html[data-theme] :is(.profile-layout,.profile-overview) {display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:0;max-width:100%}
html[data-theme] .profile-settings {display:grid;gap:12px;grid-column:auto;grid-row:auto;padding:0;background:transparent;border:0}
html[data-theme] .profile-menu-list {display:grid;gap:9px;padding:0;background:transparent;border:0;box-shadow:none}
html[data-theme] .profile-settings h3 {font-size:21px;margin:4px 0;color:var(--ui-text)}
html[data-theme] .profile-menu-row {min-width:0;max-width:100%;padding:16px 14px;border-radius:17px;display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:12px;align-items:center}
html[data-theme] .profile-row-icon {color:var(--ui-link);background:transparent}
html[data-theme] .profile-row-copy {min-width:0;display:grid;gap:4px}
html[data-theme] .profile-row-copy strong {font-size:15px;line-height:1.4}
html[data-theme] .profile-row-copy small {font-size:12px;line-height:1.4}
html[data-theme] .profile-chevron {color:var(--ui-link)}
html[data-theme] :is(.profile-delivery-quick,.profile-reminders-quick) {min-width:0;width:100%;grid-column:auto;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-border);box-shadow:0 5px 22px var(--ui-shadow)}
html[data-theme] .profile-delivery-quick {padding:17px 18px 0}
html[data-theme] .profile-delivery-copy {min-width:0}
html[data-theme] .profile-delivery-copy strong {font-size:23px;line-height:1.3;color:var(--ui-text)}
html[data-theme] .profile-delivery-copy :is(span,small) {color:var(--ui-muted);line-height:1.5}
html[data-theme] :is(.profile-delivery-icon,.profile-delivery-link) {color:var(--ui-link);border-color:var(--ui-border)}
html[data-theme] .profile-reminders-quick > span {min-width:0}
html[data-theme] .profile-reminders-quick strong {color:var(--ui-text);font-size:16px}
html[data-theme] .profile-reminders-quick small {color:var(--ui-muted);font-size:12px}
html[data-theme] .profile-reminders-quick > svg {color:var(--ui-link)}
html[data-theme] :is(.home-greeting span,.weekly-menu-intro h3,.week-switcher strong,.individual-last-request strong,.plan-features h3,.checkout-address-fields strong) {color:var(--ui-text)}
html[data-theme] :is(.home-greeting small,.week-total,.water-panel small,.preference-field > small,.checkout-choice span,.checkout-choice small) {color:var(--ui-muted)}
html[data-theme] :is(.drink-card > span,.checkout-address-more summary,.day-summary-ring,.profile-plan-summary-kcal strong) {color:var(--ui-link)}
html[data-theme] .menu-preview-fold > summary {color:var(--ui-text)}
html[data-theme] .trial-restriction {color:var(--photo-muted)}
html[data-theme] .profile-identity-row {flex-wrap:wrap;gap:12px}
html[data-theme] .profile-person-avatar {background:var(--ui-selected);color:var(--ui-link)}
html[data-theme] .profile-personal-link {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 12px;border:1px solid var(--ui-border);border-radius:13px;background:var(--ui-soft);color:var(--ui-link);font-size:13px;line-height:1.4;box-shadow:none}
html[data-theme] .profile-personal-link:hover {background:var(--ui-selected)}
html[data-theme] .profile-personal-link > span {min-width:0;padding:0}
html[data-theme] .profile-personal-link .profile-ui-icon {width:20px;height:20px}
html[data-theme] .profile-personal-link .profile-ui-icon:last-child {width:16px;height:16px}
html[data-theme] .profile-recipient-panel {display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:12px;padding:16px;min-width:0}
html[data-theme] .profile-recipient-field {display:grid;gap:8px;min-width:0;margin:0}
html[data-theme] .profile-recipient-field > span {font-size:14px;font-weight:700;color:var(--ui-text)}
html[data-theme] .profile-recipient-field select {width:100%;max-width:100%;min-width:0;min-height:44px;font-size:16px;text-overflow:ellipsis}
html[data-theme] .individual-symbol {display:grid;place-items:center;width:56px;height:56px;border:1px solid var(--ui-border);border-radius:15px;background:var(--ui-soft);color:var(--ui-link);font-size:0}
html[data-theme] .individual-symbol .visual-icon {display:block;width:32px;height:32px;stroke:currentColor;fill:none}
html[data-theme] .appearance-picker {min-width:0;width:100%;margin:0;padding:16px;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-surface);color:var(--ui-text)}
html[data-theme] .appearance-picker legend {font-weight:700;font-size:15px;padding:0 6px;color:var(--ui-text)}
html[data-theme] .appearance-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html[data-theme] .appearance-option {min-width:0;display:flex;align-items:center;gap:8px;justify-content:center;padding:12px 8px;border:1px solid var(--ui-border);border-radius:13px;background:var(--ui-soft);color:var(--ui-text);font-size:14px}
html[data-theme] .appearance-option .visual-icon {width:22px;height:22px;color:var(--ui-link)}
html[data-theme] .appearance-check {font-style:normal;visibility:hidden;color:var(--ui-link)}
html[data-theme] .appearance-option.selected {background:var(--ui-selected);border-color:var(--ui-link)}
html[data-theme] .appearance-option.selected .appearance-check {visibility:visible}
html[data-theme] .appearance-picker > small {display:block;margin-top:10px;color:var(--ui-muted);font-size:12px}
html[data-theme] :is(.reminder-time,.reminder-main strong,.delivery-main strong,.profile-identity-name,.profile-plan-summary strong) {color:var(--ui-text)}
html[data-theme] :is(.notice-card,.reminder-card,.notification-card,.device-registration-card,.address-card) {background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme] .notification-preference {background:var(--ui-soft);border-color:var(--ui-border);color:var(--ui-text)}
html[data-theme] :is(.notification-preferences,.notification-preference-row) {background:transparent;color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme] .notification-preference-row strong {color:var(--ui-text)}
html[data-theme] .notification-preference-row p {color:var(--ui-muted)}

/* Shop headings wrap above their chip; no competing two-column minimums. */
html[data-theme] .panel-header {min-width:0;display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px}
html[data-theme] .panel-header > div {flex:1 1 180px;min-width:0;max-width:100%}
html[data-theme] .panel-header .chip {max-width:100%;white-space:normal;font-size:12px}
html[data-theme] .product-card {display:flex;flex-direction:column;gap:9px;min-width:0;padding:15px}
html[data-theme] .product-card h3 {font-size:19px;line-height:1.3;margin:0;color:var(--ui-text)}
html[data-theme] .product-card p {font-size:13px;min-height:0;line-height:1.5;color:var(--ui-muted)}
html[data-theme] .product-photo {display:block;background:var(--ui-soft);width:100%;max-width:100%;aspect-ratio:4/3;object-fit:cover}
html[data-theme] .product-visual {background:var(--ui-soft);color:var(--ui-link)}
html[data-theme] .product-price {min-width:0;display:flex;flex-wrap:wrap;gap:9px;align-items:center}
html[data-theme] .product-price strong {color:var(--ui-text);font-size:22px}
html[data-theme] .nutrition-row {min-width:0;display:flex;flex-wrap:wrap;gap:7px;color:var(--ui-muted)}
html[data-theme] :is(.water-panel,.ration-facts article) {color:var(--ui-text);background:var(--ui-surface);border-color:var(--ui-border)}
html[data-theme] .ration-facts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
html[data-theme] .ration-facts article {min-width:0;padding:12px 7px}
html[data-theme] .ration-facts :is(small,span) {color:var(--ui-muted);white-space:normal;line-height:1.4}
html[data-theme] .ration-facts strong {font-size:23px;color:var(--ui-text)}
html[data-theme] .ration-facts article:last-child strong {font-size:16px;line-height:1.4}
html[data-theme] .water-panel progress {background:var(--ui-soft)}
html[data-theme] .ration-action-list button {min-width:0;width:100%;display:grid;grid-template-columns:26px minmax(0,1fr) 20px;text-align:left;gap:12px}
html[data-theme] .ration-action-list button span {min-width:0;white-space:normal;line-height:1.4}
html[data-theme] .day-summary {background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border);min-width:0;max-width:100%;flex-wrap:wrap}
html[data-theme] .day-summary :is(strong,b) {color:var(--ui-text)}
html[data-theme] .day-summary :is(small,span) {color:var(--ui-muted)}
html[data-theme] .sheet {color:var(--ui-text);background:var(--ui-surface)}
html[data-theme] .sheet-header {background:var(--ui-surface);border-color:var(--ui-border)}
html[data-theme] .sheet-body {min-width:0;max-width:100%}
html[data-theme] .preference-field > span {color:var(--ui-text)}
html[data-theme] .preference-info {color:var(--ui-muted);background:var(--ui-soft);border-color:var(--ui-border)}

/* Secondary screens and transient states follow the selected palette too. */
html[data-theme] :is(.calendar-day,.profile-order-card,.ration-live-menu,.ration-live-meal,.preference-field,.trial-card,.menu-preview-fold,.login-panel,.notification-card,.skeleton-card) {background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme] :is(.calendar-day,.profile-order-card,.ration-live-menu,.ration-live-meal,.trial-copy,.login-copy) :is(h1,h2,h3,strong,b) {color:var(--ui-text)}
html[data-theme] :is(.calendar-day,.profile-order-card,.ration-live-menu,.ration-live-meal,.trial-copy,.login-copy) :is(p,small) {color:var(--ui-muted)}
html[data-theme] :is(.status-pill,.ration-status-pill,.pill,.profile-plan-summary-kcal,.weekly-menu-intro .chip,.weekly-day-panel > header .chip,.profile-orders-head .chip) {color:var(--ui-link);background:var(--ui-soft);border-color:var(--ui-border)}
html[data-theme] :is(.glass-circle,.panel-chevron,.icon-button,.ration-kcal-scroll-help button) {color:var(--ui-link);background:var(--ui-surface);border-color:var(--ui-border)}
html[data-theme] :is(.weekly-day-tab,.ration-live-day-tabs button,.subscription-switch button,.profile-recipient-tab,.profile-recipient-add,.week-replacement-option) {background:var(--ui-soft);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme] :is(.weekly-day-tab.active,.ration-live-day-tabs button.active,.subscription-switch button.active,.profile-recipient-tab.selected,.week-replacement-option.is-selected) {background:var(--ui-selected);color:var(--ui-link);border-color:var(--ui-link)}
html[data-theme] .weekly-day-tab :is(strong,small) {color:inherit}
html[data-theme] .week-save-bar {background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme] .ration-live-photo-empty {background:var(--ui-soft);color:var(--ui-muted)}
html[data-theme] .week-replacement-option :is(strong,small) {color:inherit}
html[data-theme] .week-replacement-heading {color:var(--ui-text)}
html[data-theme] .login-screen {background:var(--ui-bg)}
html[data-theme] .login-panel {border:1px solid var(--ui-border)}
html[data-theme] .auth-channel-switch {background:var(--ui-soft);border-color:var(--ui-border)}
html[data-theme] .auth-channel-switch button {color:var(--ui-text);background:transparent}
html[data-theme] .auth-channel-switch button.active {color:var(--ui-accent-ink);background:var(--ui-accent)}
html[data-theme] :is(.profile-menu-row,.secondary-button,.glass-circle,.glass-pill):hover {background:var(--ui-selected);color:var(--ui-text)}

@media(max-width:979px) {
  html[data-theme] .client-shell {display:block}
  html[data-theme] .desktop-sidebar {display:none}
  html[data-theme] .client-main {width:100%;min-width:0}
  html[data-theme] .app-header {grid-template-areas:"brand actions" "copy copy";width:100%;max-width:820px;padding:calc(18px + env(safe-area-inset-top)) 14px 10px;gap:18px 10px}
  html[data-theme] .mobile-brand {display:flex;align-items:center;margin:0}
  html[data-theme] .mobile-brand strong {font-size:34px;line-height:1;letter-spacing:-1.4px}
  html[data-theme] .header-actions {max-width:46vw;flex-wrap:wrap}
  html[data-theme] .recipient-switch {max-width:min(110px,28vw);min-width:0}
  html[data-theme] .header-copy h1 {font-size:30px}
  html[data-theme] .header-copy p {font-size:12px;margin-top:8px}
  html[data-theme] .app-content,html[data-theme] body.profile-view .app-content {width:100%;max-width:820px;margin:0 auto;padding:10px 14px calc(112px + env(safe-area-inset-bottom))}
  html[data-theme] .mobile-navigation {
    position:fixed!important;z-index:999!important;inset:auto 0 0!important;width:100%!important;max-width:100vw!important;
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;gap:0;
    height:calc(85px + env(safe-area-inset-bottom));padding:5px max(5px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));
    background:var(--ui-nav)!important;border-top:1px solid var(--ui-border);box-shadow:0 -4px 20px var(--ui-shadow);
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible;
  }
  html[data-theme] .mobile-nav {min-width:0;width:100%;max-width:100%;min-height:0;display:grid;grid-template-rows:43px auto;align-items:center;justify-items:center;gap:3px;padding:3px 1px 2px;color:var(--ui-muted);background:transparent;border:0;border-radius:14px}
  html[data-theme] .mobile-nav > span {display:flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;transform:none}
  html[data-theme] .mobile-nav .visual-icon,html[data-theme] .mobile-nav .ui-icon {width:26px;height:26px}
  html[data-theme] .mobile-nav b {color:inherit;font-size:11px;line-height:1.2;font-weight:600;text-align:center;white-space:normal;margin:0}
  html[data-theme] .mobile-nav.active {color:var(--ui-link);background:var(--ui-selected)}
  html[data-theme] .central-nav > span {width:43px;height:43px;margin:0;transform:none;align-self:center;background:var(--ui-selected);border:1px solid var(--ui-link);color:var(--ui-link);box-shadow:0 2px 10px var(--ui-shadow)}
  html[data-theme] .central-nav.active > span {background:var(--ui-accent);color:var(--ui-accent-ink);border-color:var(--ui-link)}
  html[data-theme] .central-nav b {color:inherit}
  html[data-theme] .mobile-nav .nav-count {background:var(--ui-accent);color:var(--ui-accent-ink);top:1px;right:10%}
  html[data-theme] .ration-sticky-summary {padding:13px 11px}
  html[data-theme] .ration-sticky-summary > div > strong {font-size:21px}
  html[data-theme] .ration-sticky-summary .lime-button {font-size:12px}
}
@media(min-width:980px) {
  html[data-theme] .mobile-navigation {display:none!important}
  html[data-theme] .mobile-brand {display:none}
  html[data-theme] .reference-hero .hero-copy {max-width:62%}
  html[data-theme] .program-hero.reference-hero {padding:25px}
  html[data-theme] .reference-hero h2 {font-size:34px}
  html[data-theme] .meal-copy h3 {font-size:23px}
}
@media(min-width:761px) {
  html[data-theme] .visual-meal {--meal-icon-size:56px;column-gap:16px;padding:21px 20px 16px;min-height:225px}
  html[data-theme] .program-tile {--program-icon-size:60px;gap:15px;padding:21px 17px}
}

/* Horizontal store cards follow the supplied reference: photo left, details right. */
html[data-theme] .products-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
html[data-theme] .shop-product {display:grid;grid-template-columns:clamp(88px,25vw,118px) minmax(0,1fr);gap:12px;align-items:start;min-width:0;padding:12px;overflow:hidden;border-radius:21px}
html[data-theme] .shop-product-media {position:relative;isolation:isolate;width:100%;aspect-ratio:1;overflow:hidden;border-radius:14px;background:var(--ui-soft)}
html[data-theme] .shop-product-media .product-photo {position:absolute;inset:0;z-index:1;display:block;width:100%;height:100%;max-width:100%;max-height:none;aspect-ratio:auto;object-fit:cover;object-position:center;border:0;border-radius:0;margin:0;background:var(--ui-soft)}
html[data-theme] .shop-product-media .product-photo[data-original-photo="true"] {object-position:right center}
html[data-theme] .shop-product-media .product-photo.image-unavailable {visibility:hidden}
html[data-theme] .shop-product-fallback {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--ui-link)}
html[data-theme] .shop-product-fallback .visual-icon {width:52px;height:52px}
html[data-theme] .shop-product-portion {position:static;inset:auto;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--ui-muted);font-size:12px;font-weight:500}
html[data-theme] .shop-product-copy {display:flex;flex:1;flex-direction:column;gap:8px;min-width:0;padding:0}
html[data-theme] .shop-product-copy h3 {margin:0;color:var(--ui-text);font-size:19px;line-height:1.3}
html[data-theme] .shop-product-description {margin:0;font-size:13px;line-height:1.5;color:var(--ui-muted)}
html[data-theme] .shop-product-composition {font-size:13px;line-height:1.5;color:var(--ui-muted)}
html[data-theme] .shop-product-composition summary {cursor:pointer;color:var(--ui-link);font-weight:650}
html[data-theme] .shop-product-composition p {margin:8px 0 0;color:var(--ui-muted);font-size:13px}
html[data-theme] .shop-product .nutrition-row {display:flex;flex-wrap:wrap;gap:5px;margin:0;color:var(--ui-muted);font-size:11px}
html[data-theme] .shop-product .nutrition-row > span {padding:4px 6px;border-radius:8px;background:var(--ui-soft);color:var(--ui-muted)}
html[data-theme] .shop-product .product-price {display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:6px}
html[data-theme] .shop-product .product-price > strong {font-size:22px;line-height:1.3;color:var(--ui-text)}
html[data-theme] .shop-product .product-price .primary-button {flex:0 1 auto;width:auto;min-width:0;min-height:44px;padding:10px 9px;font-size:12px}

/* One tap in the top bar; settings keep the same saved preference. */
html[data-theme] .theme-toggle {display:flex;align-items:center;justify-content:center;width:40px;height:42px;min-width:40px;min-height:42px;flex:none;padding:8px;border:1px solid var(--ui-border);border-radius:13px;color:var(--ui-link);background:var(--ui-soft)}
html[data-theme] .theme-toggle .ui-icon {width:23px;height:23px;fill:none;stroke:currentColor}
html[data-theme="dark"] .theme-toggle .theme-moon,html[data-theme="light"] .theme-toggle .theme-sun {display:none}
html[data-theme] .header-actions {flex-wrap:wrap;justify-content:flex-end;gap:7px}

/* All profile routes use the same SVG size and themed icon containers. */
html[data-theme] .profile-ui-icon {display:block;flex:none;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;color:var(--ui-link)}
html[data-theme] :is(.profile-icon,.profile-list-icon) {display:grid;place-items:center;flex:none;width:36px;height:36px;min-width:36px;border:1px solid var(--ui-border);border-radius:11px;color:var(--ui-link);background:var(--ui-soft)}
html[data-theme] .profile-row-icon {display:grid;place-items:center;width:30px;height:30px;min-width:0;color:var(--ui-link)}
html[data-theme] .profile-chevron .profile-ui-icon {width:18px;height:18px}
html[data-theme] .profile-delivery-icon .profile-ui-icon {width:42px;height:42px}
html[data-theme] .profile-layout .profile-list-item {display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px;min-width:0}
html[data-theme] .profile-list-item > div:not(.profile-item-actions) {flex:1;min-width:0}
html[data-theme] .profile-item-actions {display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
html[data-theme] :is(.profile-layout,.profile-overview) :is(h2,h3,strong) {color:var(--ui-text)}
html[data-theme] :is(.profile-layout,.profile-overview) :is(p,small) {color:var(--ui-muted)}
html[data-theme] .visual-icon [fill^="url("] {fill:currentColor}
html[data-theme="light"] .visual-tile {background:var(--ui-selected);color:var(--ui-link);border-color:var(--ui-border);box-shadow:none}
html[data-theme="light"] .visual-tile::after,html[data-theme="light"] .hero-card::after {content:none}
html[data-theme="light"] .visual-tile .visual-icon {filter:none}
html[data-theme="light"] :is(.program-tile,.program-hero,.visual-photo-link,.visual-meal,.app-banner) {background:var(--ui-soft)}
html[data-theme] :is(.glass-circle,.panel-chevron) {border-radius:11px;background:var(--ui-selected);color:var(--ui-link);border-color:var(--ui-border);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}

/* Orange is reserved for the three ration facts in both palettes. */
html[data-theme] .ration-facts article {display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:14px 8px}
html[data-theme] .ration-facts article > .visual-tile {width:34px;height:34px;border:0;border-radius:10px;background:transparent;color:var(--ui-fact-icon);box-shadow:none}
html[data-theme] .ration-facts .visual-tile::after {content:none}
html[data-theme] .ration-facts .visual-icon {width:28px;height:28px;color:var(--ui-fact-icon);filter:none}
html[data-theme] .ration-facts article > div {width:100%;min-width:0}
@media(max-width:620px) {
  html[data-theme] .products-grid {grid-template-columns:minmax(0,1fr)}
  html[data-theme] .header-actions {max-width:min(190px,62vw)}
}
@media(max-width:620px) {
  html[data-theme] .ration-fields-grid:not(.macro-fields),html[data-theme] .ration-fields-grid.three {grid-template-columns:minmax(0,1fr)}
  html[data-theme] .payment-methods-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  html[data-theme] .product-price > .primary-button {width:100%;flex-basis:100%}
  html[data-theme] .plan-features > div {grid-template-columns:minmax(0,1fr)}
  html[data-theme] .plan-features > div > span {display:grid;grid-template-columns:25px minmax(0,1fr);text-align:left;gap:5px 10px}
  html[data-theme] .plan-features > div > span .visual-icon {grid-row:1/3}
}
@media(max-width:359px) {
  html[data-theme] .products-grid {grid-template-columns:minmax(0,1fr)}
  html[data-theme] .macro-field {padding:11px 9px}
  html[data-theme] .macro-field > span {font-size:12px;gap:5px;grid-template-columns:21px minmax(0,1fr)}
  html[data-theme] .macro-field > span .visual-icon {width:21px;height:21px}
  html[data-theme] .goal-choice label {font-size:11px}
  html[data-theme] .payment-method-card {grid-template-columns:28px minmax(0,1fr) 17px;gap:6px;padding:10px 8px}
  html[data-theme] .payment-method-icon {width:28px;height:28px;font-size:13px}
  html[data-theme] .payment-method-copy strong {font-size:11px}
  html[data-theme] .payment-method-copy small {font-size:10px}
}
@media(prefers-reduced-motion:reduce) {
  html[data-theme] *,html[data-theme] *::before,html[data-theme] *::after {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}
}
