/* Only palette variables change in light mode; dimensions/layout remain in their original stylesheets. */
:root[data-theme="light"] {
  --ls-page: #f9ede4;
  --ls-surface: #fffaf4;
  --ls-surface-muted: #eee4d7;
  --ls-ink: #24211d;
  --ls-muted: #716459;
  --ls-line: #d8c7b4;
  --ls-accent-ink: #805900;
  --bg: #f9ede4;
  --gold: #ffd000;
  --gold-2: #ffde55;
  color-scheme: light;
  background: #f9ede4;
}
html[data-theme="light"] body { --gold: #ffd000; --gold-2: #ffde55; background: var(--ls-page); color: var(--ls-ink); }
html[data-theme="light"] .hero__sub { color: var(--ls-muted); }
/* Keep the existing media slots, but do not draw a broken-image glyph for an empty placeholder. */
html[data-theme="light"] img[src=""] { visibility: hidden; }
html[data-theme="light"] .perk__icon { color: #ffc400; }
html[data-theme="light"] .perk p { color: var(--ls-muted); }
html[data-theme="light"] :is(.header,.footer,.side-menu__panel,.menu-cats,.card,.perks__grid,.checkout-panel,.dish__card,.cart-variant-dialog,.bottom) {
  background-color: var(--ls-surface);
  border-color: var(--ls-line);
}
/* The main-site footer stays dark in both themes; keep its text and social icons high-contrast. */
html[data-theme="light"] .footer {
  background:#191919;
  background-color:#191919;
  border-color:transparent;
  color:#eee9df;
}
html[data-theme="light"] .footer .footer__title { color:#fff; }
html[data-theme="light"] .footer :is(.footer__text,.footer__text a,.footer__nav a,.footer__nav a:visited,.footer__social a) { color:#eee9df; }
html[data-theme="light"] .footer .footer__copy { color:#d0c9c0; }
html[data-theme="light"] .footer :is(.footer__text a,.footer__nav a,.footer__social a):hover { color:#ffd000; }
html[data-theme="light"] :is(.card,.perks__grid,.checkout-panel,.dish__card,.cart-variant-dialog,.btn--ghost) {
  box-shadow: 0 8px 24px rgba(88,58,30,.09);
}
html[data-theme="light"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  background-color: var(--ls-surface); color: var(--ls-ink); border-color: var(--ls-line);
}
html[data-theme="light"] :is(.city,.phone,.burger,.btn--ghost) {
  background-color: var(--ls-surface); color: var(--ls-ink); border-color: var(--ls-line);
}
html[data-theme="light"] :is(.cart,.btn--gold,.card__add,.checkout-submit,.cart-checkout) {
  background-color: var(--gold); color: var(--ls-ink); border-color: #e5b900;
}
html[data-theme="light"] .nav__link.is-active { background: var(--gold); color: var(--ls-ink); border-radius: 999px; }
html[data-theme="light"] body .tabbar { background: var(--ls-surface); border-color: var(--ls-line); box-shadow: 0 6px 20px rgba(88,58,30,.1); }
html[data-theme="light"] :is(.tabbar__item,.bottom a) { color: var(--ls-muted); }
html[data-theme="light"] :is(.tabbar__item.is-active,.bottom [aria-current]) {
  background: var(--gold); color: var(--ls-ink); border-radius: 12px;
}
html[data-theme="light"] .tabbar__item svg { fill: none; stroke: currentColor; }
html[data-theme="light"] .tabbar__item.is-active svg { fill: var(--ls-ink); stroke: var(--ls-ink); }
html[data-theme="light"] .tabbar__badge { background: var(--gold); color: var(--ls-ink); }
/* Decorative background, fetched only when this light-only rule matches. No layout space or pointer target. */
html[data-theme="light"] body[data-site-home] .hero__plate::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: max(50%, 680px);
  right: 0;
  background: url("/media/backgrounds/hero-food-cream-v1-befbfefaa7499650.webp") right center / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 85% 78% at 60% 45%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 78% at 60% 45%, #000 55%, transparent 100%);
  pointer-events: none;
  user-select: none;
}
html[data-theme="light"] video.side-fire,
html[data-theme="light"] video.tel-bg { display: none !important; }
html[data-theme="light"] .cart-variant-dialog {
  background: var(--ls-surface) !important;
  color: var(--ls-ink) !important;
  border-color: var(--ls-line) !important;
}
html[data-theme="light"] .cart-variant-dialog button {
  background: #f5c518 !important;
  color: #211b10 !important;
}
html[data-theme="light"] [role="alert"] { color: #8f3020 !important; }
html[data-theme="light"] #cart-list [style*="color:"] { color: var(--ls-muted) !important; }
/* Compact control; overrides generic staff/courier button sizing only for this button. */
button.site-theme-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 6px !important;
  margin: 0 !important;
  border: 1px solid #b39020 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #c69500 !important;
  cursor: pointer;
}
button.site-theme-toggle svg { display: block; width: 20px; height: 20px; flex: none; }
html[data-theme="light"] button.site-theme-toggle { color: #24211d !important; background: #ffd000 !important; border-color: #e5b900 !important; }
button.site-theme-toggle:focus-visible { outline: 2px solid #d1a000; outline-offset: 3px; }
button.site-theme-toggle--fixed { position: fixed; top: 12px; right: 12px; z-index: 100; background: var(--ls-surface,#17130b) !important; }
@media (max-width: 980px) {
  html[data-theme="light"] body[data-site-home] .hero__plate::after {
    inset: 0;
    width: calc(100% + 7px);
    right: -7px;
    background-image:
      linear-gradient(to bottom, rgba(249,237,228,.9), rgba(249,237,228,.5) 22%, transparent 48%),
      linear-gradient(to right, rgba(249,237,228,.88), rgba(249,237,228,.55) 35%, rgba(249,237,228,.08) 68%, transparent),
      url("/media/backgrounds/hero-food-cream-mobile-v1-a93ac736c35788f9.webp");
    /* Full-banner composition, 5% smaller than its natural full-width fit. */
    background-size: 100% 100%, 100% 100%, 95% auto;
    background-position: center, center, right center;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 100%), linear-gradient(to bottom, transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 100%), linear-gradient(to bottom, transparent, #000 4%, #000 96%, transparent);
    mask-composite: intersect;
  }
  html[data-theme="light"] .card__add[aria-label^="Добавить в корзину:"] {
    position: relative;
    font-size: 0 !important;
    color: transparent;
  }
  html[data-theme="light"] .card__add[aria-label^="Добавить в корзину:"]::before {
    content: "+";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #24211d;
    font-size: 26px;
    font-weight: 800;
  }
  body[data-site-home] .perks { display: none !important; }
  header .phone__number { display: none !important; }
  header a.site-header-phone,
  .header__tools .phone { display: inline-flex; align-items: center; justify-content: center; padding: 8px; min-width: 34px; }
}

/* Calendar icon only; preserve all input styling and dark mode. */
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator { filter: brightness(0) saturate(100%); opacity: 1; }
/* Targeted mobile controls and light-theme contrast. */
html[data-theme="light"] .burger__bars span { background-color: #24211d; }
html[data-theme="light"] body[data-site-home] #delivery-go { background: transparent; color: #24211d; }
@media (max-width: 980px) {
  .card__add[aria-label^="Выбрать порцию:"] { font-size: 0 !important; color: transparent !important; }
  .card__add[aria-label^="Выбрать порцию:"]::before { content: "+"; color: #24211d; font-size: 28px; }
}
