.auth-mobile-help { display: none; }
.home-order-steps { display: none; }
html:has(.menu-story-viewer[open]) { overflow: hidden; }
.menu-story-viewer {
  box-sizing: border-box; width: min(100%, 480px); max-width: 100%; height: 100dvh; max-height: 100dvh;
  margin: auto; padding: 0; border: 0; background: #1b1917; color: white;
}
.menu-story-viewer[open] { display: flex; flex-direction: column; }
.menu-story-viewer::backdrop { background: #171410c9; }
.story-tools { flex: none; display: flex; align-items: center; padding: max(6px, env(safe-area-inset-top)) 10px 4px; }
.story-meter { display: flex; gap: 4px; flex: 1; }
.story-meter span { flex: 1; height: 3px; background: #ffffff59; border-radius: 9px; overflow: hidden; }
.story-meter i { display: block; height: 100%; background: white; transform-origin: left; }
.story-tool, .story-return, .story-edge { background: transparent; color: white; border: 0; cursor: pointer; }
.story-tool { font: 600 23px/1 var(--font); width: 42px; height: 44px; }
.story-tool[hidden] { display: none; }
.story-stage { flex: 1; min-height: 0; position: relative; touch-action: none; }
.story-stage img, .story-stage video { width: 100%; height: 100%; object-fit: contain; }
.story-edge { position: absolute; inset-block: 0; width: 50%; }
.story-edge.prev { left: 0; } .story-edge.next { right: 0; }
.story-return { flex: none; min-height: 44px; padding-bottom: env(safe-area-inset-bottom); font: 500 14px var(--font); }
@media (max-width:719px) {
  .auth-form .auth-mobile-help { display: block; margin: 4px auto 0; min-height: 44px; }
  .story-tool.icon-x .icon { width: 22px; height: 22px; filter: brightness(0) invert(1); }

  :root { --menu-safe-top: env(safe-area-inset-top, 0px); }
  /* The native iOS shell adds body padding. The menu protects its own controls. */
  body:has(.catalog-screen:not([inert]) .mobile-hero) { padding-top: 0; }
  .mobile-hero > .catalog-header::before { content: none; }
  .menu-col > .side-col:has(.mobile-hero) { display: block; padding: 0; margin: 0 -16px; }
  .side-col:has(.mobile-hero) .catalog-cart-actions { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
  .catalog-cart-actions:has(.mobile-hero) > :is(.featured-promotion,.catalog-cutoff,.delivery-preorder-action):not([hidden]) { width: auto; margin: 7px 12px; align-self: stretch; }
  .mobile-hero.promo { position: relative; display: block; width: 100%; padding: 0; margin: 0; }
  .mobile-hero .mobile-story-frame { position: relative; width: 100%; height: auto; aspect-ratio: 1; overflow: hidden; border-radius: 0 0 24px 24px; }
  .catalog-cart-actions:has(.home-order-rail:not([hidden])) .mobile-story-frame { border-radius: 24px; }
  .story-covers { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .story-covers::-webkit-scrollbar,.home-order-rail .current-order-slot::-webkit-scrollbar { display: none; }
  .story-cover { --band: #ed3b01; position: relative; flex: 0 0 100%; min-width: 0; height: 100%; padding: 0; border: 0; background: var(--band); color: white; text-align: left; scroll-snap-align: start; }
  .story-cover.nutrition { --band: #30271f; } .story-cover.kitchen { --band: #92201a; }
  .story-cover img { position: absolute; inset: 0 0 auto; width: 100%; height: 70%; object-fit: cover; object-position: 50% 7%; }
  .story-cover.nutrition img { object-position: 50% 13%; } .story-cover.kitchen img { object-position: 50% 70%; }
  .story-cover::after { content: ""; position: absolute; inset: 0 0 auto; height: 29%; background: linear-gradient(#0b0807b8,#0b08076b 45%,transparent); }
  .story-band { position: absolute; inset: auto 0 0; height: 33%; background: var(--band); display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 17px 20px; }
  .story-band strong { font: 600 clamp(21px,6vw,29px)/1.03 var(--font); letter-spacing: -.035em; }
  .story-cta { font: 500 13px/16px var(--font); padding: 9px 12px; border-radius: 24px; background: #fff7ee; color: #231810; }
  .story-dots { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; }
  .story-dot { display: grid; place-items: center; padding: 0 4px; height: 25px; border: 0; background: transparent; }
  .story-dot::after { display: block; content: ""; width: 6px; height: 6px; border-radius: 9px; background: #fffb; }
  .story-dot[aria-current=true]::after { width: 19px; background: white; }
  .mobile-hero > header.catalog-header { display: flex; position: absolute; inset: max(10px,var(--menu-safe-top)) 14px auto; width: auto; min-height: 44px; height: auto; max-width: none; margin: 0; padding: 0; align-items: center; justify-content: space-between; gap: 8px; background: transparent; box-shadow: none; z-index: 2; pointer-events:none; }
  .catalog-cart-actions:has(.home-order-rail:not([hidden])) .mobile-hero > header.catalog-header { top: 10px; }
  @media (prefers-color-scheme: light) {
    .catalog-cart-actions:not(:has(.home-order-rail:not([hidden]))) .mobile-story-frame::after {
      content: ""; position: absolute; inset: 0 0 auto; height: var(--menu-safe-top); pointer-events: none;
      background: linear-gradient(#ffffffc4, #ffffff85 75%, transparent);
    }
  }
  .mobile-hero > header.catalog-header > * { pointer-events: auto; }
  .mobile-hero .catalog-header .logo { display: none; }
  .mobile-hero .catalog-header .vpn-brand { flex: none; order: 1; }
  .mobile-hero .catalog-header .top-actions { display: flex; order: 2; width: auto; margin: 0 0 0 auto; flex: none; gap: 0; }
  .mobile-hero .catalog-header .support { display: none; }
  .mobile-hero .catalog-header .top-actions.native-controls .support { display: grid; background: transparent; }
  .mobile-hero .catalog-header .profile { flex: none; width: 44px; }
  .mobile-hero .catalog-header .top-actions :is(.login-btn,.account-circle) { width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; display: grid; place-items: center; background: transparent; color: white; }
  .mobile-hero .catalog-header :is(.login-btn,.account-circle) > span:not(.unread-dot) { display: none; }
  .mobile-hero .catalog-header :is(.login-btn,.account-circle) > .icon { display: block; width: 24px; height: 24px; filter: brightness(0) invert(1); }
  .mobile-hero .catalog-header .catalog-place { display: flex; flex: 0 1 auto; width: auto; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent; color: white; gap: 8px; }
  .mobile-hero .catalog-place .fulfill-icon { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border: 0; background: none; }
  .mobile-hero .catalog-place .fulfill-icon img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
  .mobile-hero .catalog-place .fulfill-chevron { width: 12px; height: 12px; filter: brightness(0) invert(1); }
  .mobile-hero .catalog-place .fulfill-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
  .mobile-hero .catalog-place .fulfill-line { margin: 0; font: 600 16px/20px var(--font); color: white; }
  .mobile-hero .catalog-place .fulfill-caption { display: block; margin: 0; color: white; font: 500 13px/17px var(--font); text-align: left; }
  .mobile-hero .fulfill-caption::first-letter { text-transform: uppercase; }
  .mobile-hero .fulfill-mode { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mobile-hero > :is(.catalog-cutoff,.delivery-preorder-action):not([hidden]) { margin: 7px 12px; }
  .mobile-hero .vpn-disclosure .vpn-message { inset-inline: auto 0; max-width: calc(100vw - 76px); }
  .home-order-rail .current-order-slot { margin-block-end: 0; }
  .home-order-rail.multiple .feedback-invite .order-short-mark { display: none; }
  .home-order-rail.multiple .feedback-actions { gap: 2px; }
  .home-order-rail.multiple .feedback-actions > * { padding-inline: 4px; font-size: 12px; }
  .home-order-rail.multiple .is-pay { grid-template-columns: 1fr; }
  .home-order-rail.multiple .pay-clock { justify-self: start; }
  .menu-col:has(.mobile-hero) > .chips { top: var(--menu-safe-top); height: 44px; min-height: 44px; }
  .menu-col:has(.mobile-hero) .chip-line { padding-inline-start: 0; }
  .menu-col:has(.mobile-hero) .chip-line > :is(.chip,.promo-shortcut) { height: 32px; min-height: 32px; }
  .chip-line .promo-shortcut { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: none; background: transparent; color: var(--ink); }
  .chip-line .ogni-shortcut > span { display: none; }
  .chip-line .ogni-shortcut::after { content: "За Огни"; font: 500 14px var(--font); }
  .chip-line .ogni-shortcut img { width: 18px; height: 18px; }
  .menu-col:has(.mobile-hero) .category { scroll-margin-top: calc(50px + var(--menu-safe-top)); }
  .menu-col:has(.mobile-hero) > .category:first-of-type { margin-top: 6px; }
  .home-order-rail { margin: calc(9px + var(--menu-safe-top)) 10px 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--white); }
  .home-order-rail[hidden],.home-order-controls[hidden] { display: none; }
  .home-order-controls { display: flex; align-items: center; padding: 3px 8px 0 14px; gap: 2px; }
  .home-order-controls strong { margin-right: auto; font: 600 13px/18px var(--font); }
  .home-order-controls output { font: 500 12px/16px var(--font); color: var(--muted); }
  .home-order-controls button { width: 27px; height: 27px; border: 0; background: transparent; color: var(--ink); font: 20px/1 var(--font); }
  .home-order-controls button:disabled { opacity: .4; }
  .home-order-rail .current-order-slot { width: 100%; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .home-order-rail .current-order-slot > .order-short { box-sizing: border-box; scroll-snap-align: start; flex: 0 0 100%; min-width: 0; min-height: 48px; width: auto; margin: 0; padding: 9px 13px; border-radius: 0; border: 0; background: transparent; color: var(--ink); }
  .home-order-rail.multiple .current-order-slot > .order-short { flex-basis: 50%; }
  .home-order-rail .order-short + .order-short { border-left: 1px solid var(--line); }
  .home-order-rail .order-short:has(.home-order-steps) { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px; }
  .home-order-rail .order-short:has(.home-order-steps) .order-short-copy { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 3px; }
  .home-order-rail.multiple .order-short:has(.home-order-steps) .order-short-copy { flex-direction: column-reverse; align-items: flex-start; }
  .home-order-rail .order-short-copy strong { font: 600 16px/20px var(--font); }
  .home-order-rail .order-short-copy .muted { color: var(--muted); font: 500 12px/16px var(--font); }
  .home-order-rail .order-short:has(.home-order-steps) .order-short-mark { width: 8px; height: 8px; margin: 0 2px 0 4px; align-self: center; font-size: 0; border: solid var(--muted); border-width: 1.5px 1.5px 0 0; border-radius: 0; background: transparent; transform: rotate(45deg); }
  .home-order-rail .order-short:has(.home-order-steps) .order-short-mark > svg,.home-order-rail .order-short:has(.home-order-steps) .order-short-mark::after { display: none; }
  .home-order-steps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; color: var(--muted); font: 500 11px/14px var(--font); }
  .home-order-steps > span::before { display: block; content: ""; height: 3px; margin-bottom: 3px; border-radius: 4px; background: var(--line); }
  .home-order-steps .current { color: var(--action); }
  .home-order-steps .current::before { background: var(--action); }
  .home-order-steps .done::before { background: #c88862; }
  .home-order-rail.multiple .home-order-steps { font-size: 0; line-height: 0; }
}
