/* EIWA · base: reset, type, links, focus, header, footer, 404. Tokens live in tokens.css. */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { background-color: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--header-h); scrollbar-gutter: stable; }
body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, video, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
/* :where() keeps this at one attribute's weight, so any component class declared later wins — at ul[role=list]'s
   full weight it zeroed the phone category strip's side padding and the loyalty visit list's indent (2026-10-07) */
:where(ul, ol)[role='list'] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 300; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--paper); }

/* Lenis (smooth scroll) — recommended base styles */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
html.is-locked { overflow: hidden; }

/* ---------- type helpers ---------- */
.sc { font-variant: all-small-caps; letter-spacing: var(--tracking-sc); }
.jp {
  font-family: var(--font-jp);
  font-weight: 200;
  color: var(--pink-ink);
  letter-spacing: .2em;
  font-feature-settings: normal;
}
.label { font-size: var(--fs-label); color: var(--mute); }
/* phones: small-caps labels you can read (client, iPhone, 2026-10-08: «ИМЯ», «метро», «1 / 9», «акция · весь
   октябрь» read as 9–10 px grey). Every label, meta line, counter and caption reads these three tokens: 15 px small
   caps (glyphs as tall as 11–12 px capitals), tracking .06em instead of .12em, the darker grey (--ink-2, AA on paper).
   Labels with a size of their own are lifted in the ONE block at the end of panels.css / home.css / menu.css. */
@media (max-width: 767px) {
  :root { --fs-label: .9375rem; --tracking-sc: .06em; --mute: var(--ink-2); }
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- links ---------- */
/* .link — always underlined; on hover the line runs out to the right and back in from the left */
.link { position: relative; display: inline-block; padding-bottom: 2px; }
.link::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}
/* hover effects only where a pointer really hovers: on touch a tap would leave them stuck on */
@media (hover: hover) { .link:hover::after { animation: link-rerun .7s var(--ease-out); } }
@keyframes link-rerun {
  0% { transform: scaleX(1); transform-origin: right; }
  45% { transform: scaleX(0); transform-origin: right; }
  46% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}
/* .nav-link — line appears on hover and on the current page */
.nav-link { position: relative; display: inline-block; padding-block: .25rem; }
.nav-link::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease-out);
}
.nav-link[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
@media (hover: hover) { .nav-link:hover::after { transform: scaleX(1); transform-origin: left; } }

/* square-cornered blocks only — never pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 2.75rem;
  padding: .625rem 1.375rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  font-variant: all-small-caps;
  letter-spacing: var(--tracking-sc);
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}
.btn--line { background: transparent; color: currentColor; border-color: currentColor; }
/* phones: square blocks a thumb can't miss, with type to match (client, 2026-10-06) */
@media (max-width: 599px) {
  .btn { min-height: 3.375rem; padding: .875rem 1.5rem; font-size: 1.125rem; }
}
/* the PRIMARY call to action (client, iPhone, 2026-10-07: «кнопки акцентно» — a solid filled button with an arrow,
   rounded like the Din Tai Fung reference — the client's own decision for the calls to action, over the square rule):
   brand pink, ink type, 600, «→» at the end. One per screen — it is that screen's pink, so the glyphs beside it go
   grey. Used by the hero «Заказать», «Забронировать стол» (site menu, booking panel), «В заказ», «Получить код»,
   the phone's floating order button — and the checkout submit (js/ui/cart-panel.js). */
.btn--accent {
  min-height: 3.25rem;
  padding: .875rem 1.75rem;
  background: var(--pink);
  border: 1px solid var(--pink);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  /* the label in real capitals, not small caps: 15 px (desktop) / 16 px (phones) reads as the size it is
     (client, iPhone, 2026-10-08: the text inside the pink buttons was too small) */
  font-variant: normal;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .9375rem;
  --focus: var(--ink);
  transition: background-color var(--dur-fast) linear, border-color var(--dur-fast) linear;
}
.btn--accent::after {
  content: '→'; content: '→' / '';
  flex: none;
  position: relative; top: -.06em; /* the arrow's bar on the capitals' middle, not on the x-height */
  font-variant: normal; letter-spacing: 0; font-weight: 400;
  transition: transform var(--dur) var(--ease-out);
}
@media (hover: hover) {
  .btn--accent:not(:disabled):not([aria-disabled='true']):hover { background: var(--pink-ink); border-color: var(--pink-ink); }
  .btn--accent:not(:disabled):not([aria-disabled='true']):hover::after { transform: translateX(.25em); }
}
.btn--accent:not(:disabled):not([aria-disabled='true']):active { background: var(--pink-ink); border-color: var(--pink-ink); }
.btn--accent:focus-visible { outline: 2px solid var(--ink); outline-offset: .1875rem; }
.is-dark .btn--accent:focus-visible, .hero .btn--accent:focus-visible { outline-color: #fff; }
/* not ready yet: the outline — never a faded pink slab */
.btn--accent:disabled, .btn--accent[aria-disabled='true'] {
  background: transparent; border-color: rgba(28, 28, 28, .35); color: var(--ink-2);
  cursor: default;
}
.btn--accent:disabled::after, .btn--accent[aria-disabled='true']::after { opacity: .5; }
@media (max-width: 767px) {
  .btn--accent { min-height: 3.5rem; font-size: 1rem; }
}
/* the SECONDARY action beside it (order, payment, 404, delivery pages): the same pill and the same type, an ink
   outline, no arrow. Links stay links. */
.btn--outline {
  min-height: 3.25rem;
  padding: .875rem 1.75rem;
  background: transparent;
  border-color: var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-variant: normal;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .9375rem;
  transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear;
}
@media (hover: hover) { .btn--outline:not(:disabled):hover { background: var(--ink); color: var(--paper); } }
.btn--outline:focus-visible { outline: 2px solid var(--ink); outline-offset: .1875rem; }
.btn--outline:disabled, .btn--outline[aria-busy='true'] { border-color: var(--line-strong); color: var(--ink-2); cursor: default; }
/* «Позвонить · +7 963 …»: the number in plain figures beside the word */
.btn__aside { font-weight: 400; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; opacity: .72; }
@media (max-width: 767px) {
  .btn--outline { min-height: 3.5rem; font-size: 1rem; }
}
/* order.html: «Позвонить +7 963 …» / «К оплате →» / «Повторить заказ» span the column on a phone */
@media (max-width: 479px) {
  .ord__note .btn, .ord-repeat { width: 100%; padding-inline: 1.25rem; }
}
/* the side panels end in that pink button (booking, order, dish): their title glyph steps back to grey */
.panel:not(.news-modal) .panel__jp { color: var(--mute); }
/* the same on the pages whose next step is the pink pill (order, payment, delivery, terms): one pink per screen */
.ord__inner:has(.ord__note .btn--accent) .ord__jp, .pay__inner:has(.btn--accent) .pay__jp, .doc__head:has(.btn--accent) .doc__jp { color: var(--mute); }
/* phones: panel titles carry the sheet (client, 2026-10-07: «любые заголовки акцентнее») */
@media (max-width: 767px) {
  .panel:not(.news-modal) .panel__title { font-size: 1.75rem; font-weight: 600; letter-spacing: .01em; }
  .panel:not(.news-modal) .panel__jp { font-size: .9375rem; font-weight: 200; letter-spacing: .2em; }
}

/* ---------- touch ---------- */
/* no double-tap-to-zoom wait on anything tappable */
a, button, summary, label, input, select, textarea, [role='button'], [role='radio'] { touch-action: manipulation; }

/* fingers: every control answers in at least 44 × 44 px. Controls whose look is smaller than that keep it and
   get an invisible hit area instead (::before, centred, only ever growing): the underlined links, the header
   logo, the header nav (tablets in landscape) and «Заказ», the round −/+ steppers (cart, dish cards, booking
   guests, points) and the tag filters. */
@media (pointer: coarse) {
  .link, .header__logo, .header__cart, .header__menu-contacts a,
  .bk-step, .qty__step, .rail__tag { position: relative; }
  .link::before, .header__logo::before, .nav-link::before, .header__cart::before, .header__menu-contacts a::before,
  .bk-step::before, .qty__step::before, .rail__tag::before {
    content: '';
    position: absolute;
    inset: min(0px, calc((100% - 2.75rem) / 2));
  }
}

/* ---------- focus ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: .1875rem; }
.is-dark, .header--light { --focus: #fff; }

.skip-link {
  position: fixed; left: var(--gutter); top: calc(.75rem + var(--safe-t));
  z-index: calc(var(--z-header) + 10);
  padding: .625rem 1rem;
  background: var(--ink); color: var(--paper);
  transform: translateY(calc(-100% - 1rem - var(--safe-t)));
}
.skip-link:focus-visible { transform: none; outline-color: var(--ink); }

/* ---------- page shell ---------- */
main { display: block; }
body:not(.page--home) main { padding-top: var(--header-h); }

/* ---------- header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  color: var(--ink);
}
/* the bar's backdrop is its own layer (backdrop-filter on .header itself would trap the fixed menu) */
.header::before {
  content: '';
  position: absolute; inset: 0;
  background: transparent; /* the colour is the bar's own background-color (below): Safari 26 samples only that */
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
  pointer-events: none;
}
.header--solid::before { opacity: 1; }
.header--light { color: #fff; }
.header--light::before { opacity: 0; }
/* iOS 26 Safari draws the page edge to edge and fills the strip under the status bar with the background-color of
   the fixed element it hit-tests 4px below the top edge — one opaque colour, no backdrop-filter, no pseudo-element
   in front of it (iPhone 17, 2026-10-06). So the bar carries a real opaque colour in every state; over the untouched
   hero it stays transparent on purpose (the video runs up under the clock). */
.header { transition: background-color var(--dur) var(--ease-out); }
.header--solid:not(.header--light) { background-color: var(--paper); }
body:not(.page--home) .header:not(.header--light) { background-color: var(--paper); } /* light pages: always, whatever the scroll state */

.header__bar {
  position: relative; z-index: 2;
  display: flex; align-items: center;
  height: 100%;
  padding-top: var(--safe-t); /* the bar sits below the notch; its backdrop runs up behind it */
  padding-inline: var(--gutter);
}
.header__logo { display: grid; flex: none; padding-block: .5rem; }
.header__logo img { grid-area: 1 / 1; height: 1.375rem; width: auto; transition: opacity var(--dur-fast) linear; }
.header__logo-light { opacity: 0; }
.header--light .header__logo-ink { opacity: 0; }
.header--light .header__logo-light { opacity: 1; }

.header__nav {
  display: flex; gap: clamp(1.25rem, 2.4vw, 2.25rem);
  margin-left: clamp(2rem, 4.4vw, 4.5rem);
  font-size: 1rem;
}
.header__actions {
  display: flex; align-items: center; gap: clamp(1.125rem, 2.2vw, 2rem);
  margin-left: auto;
  font-size: 1rem;
}
.header__cart {
  min-height: 2.5rem;
  padding: .5rem .875rem;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.header__cart-sep { opacity: .45; padding-inline: .2em; }
/* «№ 1042 · Готовится» while an order from this browser is open (js/ui/active-order.js); phones: the order button */
.header__order { font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* below 1180 the nav, «Забронировать» and «Заказ» fill the bar: the order is then in the cart panel's «Ваш заказ…»
   (and on phones on the floating order button) */
@media (max-width: 1179px) { .header__order { display: none; } }
/* the phone, quiet, beside «Забронировать» — only where the bar has room for it (from 1180) */
.header__tel { display: none; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .72; }
@media (hover: hover) { .header__tel { transition: opacity var(--dur-fast) linear; } .header__tel:hover { opacity: 1; } }
@media (min-width: 1180px) { .header__tel { display: inline-block; } }
/* once «Заказ · 2 · 1 980 ₽» (and an open order's «№ 1042 · Готовится») take the bar, the phone steps aside:
   with all four the bar ran past its right edge at 1180 (2026-10-07) */
.header__actions:has(.header__cart:not([hidden])) .header__tel { display: none; }
.header__toggle { display: none; min-height: 2.75rem; padding-inline: .25rem; font-size: 1rem; }
/* closed: two thin lines in the header's colour (ink, or white over the hero) — the word «Меню» is the food menu
   inside it; the name «Меню сайта» stays for screen readers. Open: the word «Закрыть», as before */
.header__toggle-label { display: inline-flex; align-items: center; }
.header__toggle-icon {
  position: relative; display: block;
  width: 1.5rem; height: .5625rem;
  border-block: 1.5px solid currentColor;
}
.header__toggle:not([aria-expanded='true']) { min-width: 2.75rem; justify-content: flex-end; } /* the lines end on the gutter, the target stays 44 px */
.header__toggle:not([aria-expanded='true']) .header__toggle-text {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.header__toggle[aria-expanded='true'] .header__toggle-icon { display: none; }

/* full-screen menu (phones) */
.header__menu {
  position: fixed; inset: 0 0 auto;
  z-index: 1;
  display: flex; flex-direction: column;
  height: 100vh;
  height: 100dvh; /* the visible area, whatever Safari's toolbars are doing */
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) calc(var(--gutter) + var(--safe-b));
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.header__menu-list { border-bottom: 1px solid var(--line); }
.header__menu-list a {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: .875rem 0 .75rem;
  border-top: 1px solid var(--line);
  font-size: clamp(2.125rem, 9vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
}
.header__menu-list .jp { font-size: 1rem; color: var(--mute-lg); } /* one pink per screen: none here */
.header__menu-book { align-self: flex-start; margin-top: 2rem; }
.header__menu-contacts {
  margin-top: auto;
  padding-top: 2.5rem;
  display: grid; gap: .375rem;
  font-size: .9375rem;
  color: var(--ink-2);
}
.header__menu-contacts a { color: var(--ink); }
.header--menu-open { color: var(--ink); --focus: var(--ink); }
.header--menu-open::before { opacity: 0; }
.header--menu-open .header__logo-ink { opacity: 1; }
.header--menu-open .header__logo-light { opacity: 0; }

@media (max-width: 899px) {
  .header__logo img { height: 1.125rem; }
  .header__nav, .header__book { display: none; }
  .header__toggle { display: inline-flex; align-items: center; }
  .header__actions { gap: 1rem; }
  .header__cart { min-height: 2.25rem; padding: .375rem .625rem; font-size: .9375rem; }
}
/* any width: once anything scrolls under the bar over a dark block (the hero past its very top, «Сезон сейчас»),
   the white logo and nav get a quiet dark backdrop — content never runs behind them. Over light blocks it is the
   paper one (.header--solid). Only the untouched hero at scrollY ≈ 0 keeps the bar fully transparent. */
.header--light.header--dim:not(.header--menu-open)::before {
  opacity: 1;
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, .08);
}
.header--light.header--dim:not(.header--menu-open) { background-color: rgb(21, 21, 21); }
.header--menu-open { background-color: var(--paper); }
@media (max-width: 359px) {
  /* SE 1st gen: logo · «Заказ · 2» · Меню fit one row; the sum is in the panel */
  .header__actions { gap: .75rem; }
  .header__cart { padding-inline: .5rem; }
  .header__cart [data-cart-total], .header__cart [data-cart-count] + .header__cart-sep { display: none; }
}
@media (min-width: 900px) {
  .header__menu { display: none !important; }
}
/* phone menu: six destinations, then the phone (a big target), address and hours; «Забронировать стол» at the thumb */
@media (max-width: 899px) {
  .header__menu-list a { padding: .75rem 0 .625rem; font-size: clamp(1.75rem, 7.6vw, 3rem); }
  .header__menu-contacts { margin: 1.75rem 0 1.5rem; padding-top: 0; gap: .125rem; }
  .header__menu-tel {
    justify-self: start;
    display: inline-flex; align-items: center;
    min-height: 2.75rem;
    font-size: 1.625rem; font-weight: 300; line-height: 1.2;
    font-variant-numeric: tabular-nums;
  }
  .header__menu-book { align-self: stretch; margin-top: auto; }
}

/* ---------- floating order button (js/ui/order-fab.js): «Заказ · 2 · 1 540 ₽ →» at the thumb ---------- */
/* phones only (tablets and desktop keep the header «Заказ» and the menu's order bar). It replaces the bottom bar
   «Меню · Заказ · Бронь» (client, iPhone, 2026-10-07); the header with the logo and the menu button stays in view.
   Opaque pink (.btn--accent), no blur. Gone while a panel or the site menu is open (html.is-locked) — so it never
   covers the checkout or booking buttons; above the cookie strip while that shows (--cookie-clear). */
.ofab { display: none; }
@media (max-width: 767px) {
  :root { --ofab-b: calc(1rem + var(--safe-b)); --ofab-h: 3.5rem; }
  body.has-cookie { --ofab-b: calc(var(--cookie-clear, 4.5rem) + .75rem); }
  .has-ofab .header__cart { display: none; } /* the floating button says it once, at the thumb */
  /* bottom LEFT, and never wider than the screen less 1 rem + 7 rem: the dish rows keep their «+» and «− n +» in the
     right column, the left side is the photo (client, iPhone, 2026-10-08: the button covered the «+») */
  .ofab {
    position: fixed; left: max(1rem, var(--safe-x)); bottom: var(--ofab-b);
    z-index: calc(var(--z-header) - 4);
    display: inline-flex; gap: .625rem;
    max-width: calc(100vw - 8rem - 2 * var(--safe-x));
    min-height: var(--ofab-h);
    padding: .875rem 1.125rem .875rem 1.25rem;
    font-size: 1rem; letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 .5rem 1.5rem rgba(28, 28, 28, .16);
    transition: background-color var(--dur-fast) linear, border-color var(--dur-fast) linear,
      opacity var(--dur-fast) linear, visibility 0s;
  }
  .ofab[hidden] { display: none !important; }
  .ofab__text { display: inline-flex; align-items: baseline; min-width: 0; overflow: hidden; white-space: nowrap; }
  .ofab__sep { padding-inline: .35em; opacity: .55; }
  /* 320–359 px: «2 · 1 540 ₽ →» — the word steps aside so the sum is never cut (the label still says «Открыть заказ») */
  @media (max-width: 359px) { .ofab__word, .ofab__word + .ofab__sep { display: none; } }
  html.is-locked .ofab { visibility: hidden; opacity: 0; transition: opacity var(--dur-fast) linear, visibility 0s var(--dur-fast); }
  /* the end of the page scrolls clear of it */
  .is-ofab-on .footer { padding-bottom: calc(var(--ofab-b) + var(--ofab-h) + 1.5rem); }
}
@media print { .ofab { display: none !important; } }

/* ---------- footer ---------- */
.footer {
  padding: var(--section-y) var(--gutter) calc(var(--gutter) + var(--safe-b));
}
.footer__contacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem var(--gutter);
  padding: 0;
  list-style: none;
  margin-bottom: clamp(2.5rem, 6vw, 6rem);
}
.footer__contacts li { display: grid; gap: .25rem; align-content: start; }
.footer__contacts li > * { justify-self: start; }
.footer__logo { width: 100%; height: auto; }
/* the seller (settings.legal, js/ui/footer-legal.js): one small quiet line under the logo */
.footer__legal { margin-top: 1rem; font-size: .8125rem; color: var(--mute); }
/* documents: three quiet links under the logo (privacy, consent, delivery terms) */
.footer__docs { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: 1.25rem; font-size: .875rem; color: var(--ink-2); }
.footer__docs .link[aria-current='page'] { color: var(--ink); }
@media (max-width: 899px) {
  .footer__contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .footer__contacts { grid-template-columns: 1fr; }
}

/* ---------- 404 ---------- */
.nf {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid; place-items: center;
  padding: var(--gutter);
  text-align: center;
  overflow: hidden;
}
.nf__inner { position: relative; display: grid; justify-items: center; }
.nf__code {
  display: block;
  font-size: clamp(8.25rem, 26vw, 22.5rem);
  font-weight: 200;
  line-height: .86;
  letter-spacing: -.03em;
  color: var(--ghost);
}
.nf__title {
  display: block;
  margin-top: clamp(1rem, 2vw, 1.75rem);
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0;
}
.nf__home { margin-top: 1.75rem; } /* the pink pill (.btn--accent) — the koi stays the picture */
.nf__koi {
  --w: clamp(2.5rem, 5.4vw, 5.25rem);
  position: absolute;
  left: calc(50% - var(--w) / 2);
  top: 16%; /* rises out of the «0» */
  width: var(--w);
  opacity: .9;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- the admin's live preview of the home page (server/site.js previewPage: <html data-preview>) ----------
   motionless and shown at once, like reduced motion (js/motion/setup.js isPreview): nothing waits for a scroll or a
   timer, so a frame reloaded on every keystroke looks like the page at rest */
/* no scrollbar of its own: the frame is exactly 393 / 1440 px of page, as on a phone (overlay scrollbars) */
html[data-preview] { scroll-behavior: auto; scrollbar-gutter: auto; scrollbar-width: none; }
html[data-preview]::-webkit-scrollbar { display: none; }
html[data-preview] *, html[data-preview] *::before, html[data-preview] *::after {
  animation-duration: .01ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
  transition-delay: 0s !important;
}
html[data-preview] .hero [data-intro] { opacity: 1; }
html[data-preview].is-arriving::after, html[data-preview] .page-fade { display: none; }

/* ---------- page transitions (spec §5; the leaving half lives in js/motion/transitions.js) ---------- */
/* arriving: right after an in-site transition (the inline script in <head> sets html.is-arriving) the page starts as
   a sheet of --ink and clears in 0.3 s. First visits, reloads and external entries get no sheet at all.
   Pure CSS from there — nothing to hang, and the opacity rule keeps the page visible if animations are unavailable */
html.is-arriving::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  animation: page-in .3s var(--ease-out) both;
}
@keyframes page-in { from { opacity: 1; } to { opacity: 0; } }
/* leaving: made by JS on click; blocks a second click while it covers the page */
.page-fade {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-in-out);
}
.page-fade.is-on { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  html.is-arriving::after, .page-fade { display: none; }
}

/* ---------- consent line under the forms (js/ui/consent-note.js, loyalty.html) ---------- */
.consent-note { margin-top: .875rem; font-size: .8125rem; line-height: 1.45; color: var(--mute); }
.consent-note .link { display: inline; color: var(--ink-2); padding-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.consent-note .link::after { display: none; }
.bk-actions .consent-note { margin-top: .125rem; font-size: .75rem; line-height: 1.35; } /* under the sticky button: two short lines */

/* ---------- cookie notice (js/ui/cookie-notice.js): one quiet line at the bottom ---------- */
.cookie {
  position: fixed; left: var(--gutter); bottom: calc(1.25rem + var(--safe-b));
  z-index: calc(var(--z-header) - 3);
  display: flex; align-items: center; gap: .75rem 1.5rem;
  max-width: min(36rem, calc(100vw - 2 * var(--gutter)));
  padding: .875rem 1rem .875rem 1.25rem;
  background: rgba(243, 243, 242, .94);
  -webkit-backdrop-filter: blur(.75rem); backdrop-filter: blur(.75rem);
  border: 1px solid var(--line);
  box-shadow: 0 .5rem 1.5rem rgba(28, 28, 28, .08);
  font-size: .9375rem; line-height: 1.35; color: var(--ink);
  transition: opacity var(--dur-fast) linear, transform var(--dur-fast) linear;
}
.cookie.is-gone { opacity: 0; transform: translateY(.5rem); }
.cookie__text { flex: 1 1 auto; min-width: 0; }
.cookie__actions { display: flex; align-items: center; gap: 1.25rem; flex: none; }
.cookie__ok { min-height: 2.5rem; padding-inline: 1.125rem; }
.cookie__more { white-space: nowrap; }
html.is-locked .cookie { visibility: hidden; }
.has-order-bar .cookie { bottom: calc(1.25rem + 3.25rem + .75rem + var(--safe-b)); } /* desktop menu: above «В заказе …» */
@media (max-width: 899px) {
  .cookie { left: var(--gutter); right: var(--gutter); max-width: none; bottom: calc(1rem + var(--safe-b)); }
}
/* phones: a slim opaque strip (~56 px) on the bottom edge, not a floating card over the content —
   the text in two short lines, «Хорошо» and «Подробнее» beside it; the page gets the strip's height below */
@media (max-width: 599px) {
  .cookie, .has-order-bar .cookie {
    left: 0; right: 0; bottom: 0;
    gap: .875rem;
    min-height: 3.5rem;
    padding: .4375rem calc(var(--gutter) + var(--safe-x)) calc(.4375rem + var(--safe-b));
    background: var(--paper);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border: 0; border-top: 1px solid var(--line);
    box-shadow: none;
    font-size: .8125rem; line-height: 1.3; color: var(--ink-2);
  }
  .cookie__ok { min-height: 2.5rem; padding: .5rem 1rem; font-size: .9375rem; }
}
/* every width: while the notice shows, the page ends as much lower as the notice reaches up (--cookie-clear, measured
   by js/ui/cookie-notice.js whatever the text wraps to), so the last links scroll clear of it — they sat under it
   until it was answered (QA 2026-10-08: «карта гостя» on delivery, the consent links on loyalty). With the order
   button on, the footer already clears both (it stands above the notice). */
body.has-cookie { padding-bottom: calc(var(--cookie-clear, calc(3.5rem + var(--safe-b))) + .75rem); }
@media (max-width: 767px) { body.has-cookie.is-ofab-on { padding-bottom: 0; } } /* the order button: phones only */
@media (prefers-reduced-motion: reduce) { .cookie { transition: none; } }
/* touch screens: no live blur behind the notice — the same paper, opaque */
@media (pointer: coarse) {
  .cookie { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media print { .cookie { display: none !important; } }

/* ---------- toast (js/ui/toast.js): one quiet line at a time — «Добавлено: … · Отменить» ---------- */
.toast {
  position: fixed; right: var(--gutter); bottom: calc(1.25rem + var(--safe-b));
  z-index: calc(var(--z-header) - 2);
  display: flex; align-items: center; gap: 1.25rem;
  max-width: min(28rem, calc(100vw - 2 * var(--gutter)));
  min-height: 3.25rem;
  padding: .5rem 1.125rem;
  background: var(--ink); color: var(--paper);
  font-size: 1rem; line-height: 1.3;
  box-shadow: 0 .625rem 1.875rem rgba(28, 28, 28, .18);
  --focus: var(--paper);
  opacity: 1; transform: none; visibility: visible;
  transition: opacity var(--dur-fast) linear, transform var(--dur) var(--ease-out), visibility 0s;
}
.toast:not(.is-on) { opacity: 0; transform: translateY(.5rem); visibility: hidden; transition: opacity var(--dur-fast) linear, transform var(--dur-fast) linear, visibility 0s var(--dur-fast); }
.toast__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.toast__action { flex: none; font-size: .9375rem; color: var(--paper); }
.has-order-bar .toast { bottom: calc(1.25rem + 3.25rem + .75rem + var(--safe-b)); } /* desktop menu: above «В заказе …» */
@media (max-width: 899px) {
  .toast { left: var(--gutter); right: var(--gutter); max-width: none; justify-content: space-between; }
}
@media (max-width: 767px) {
  .is-ofab-on .toast { bottom: calc(var(--ofab-b) + var(--ofab-h) + .75rem); } /* above the floating order button */
}
html.is-locked .toast { visibility: hidden; opacity: 0; }

/* ---------- skeletons: quiet blocks in the shape of what is loading (news, season, menu index, dishes) ---------- */
/* in index.html / menu.html; the page scripts replace them with the real content, so nothing jumps */
.skel__line { display: block; height: .875rem; margin-top: .625rem; background: var(--paper-2); }
.skel__line--s { width: 38%; }
.skel__line--m { width: 62%; }
.skel__line--l { width: 86%; height: 1.25rem; }
.skel .news-card__media, .skel .dish__media, .skel .ko__media { background: var(--paper-2); }
.is-dark .skel__line, .is-dark .skel .ko__media { background: rgba(255, 255, 255, .06); }
html:not(.js) .skel, html:not(.js) .menu-skel { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .skel, .menu-skel { animation: skel-pulse 1.6s ease-in-out infinite; }
}
@keyframes skel-pulse { 50% { opacity: .55; } }
