/* Sushi Kim — «Ночной самурай». Палитра логотипа: тушь, сине-серый (луна), белый. */

@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap; src: url('/fonts/manrope-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap; src: url('/fonts/manrope-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url('/fonts/manrope-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url('/fonts/manrope-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url('/fonts/manrope-cyrillic-800-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url('/fonts/manrope-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Caveat'; font-weight: 700; font-display: swap; src: url('/fonts/caveat-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Caveat'; font-weight: 700; font-display: swap; src: url('/fonts/caveat-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --night: #0d0f11;
  --ink: #0d0f11;
  --ink-2: #15191d;
  --ink-3: #1d2228;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --slate: #63788b;
  --slate-d: #4f6273;
  --slate-l: #9fb0c0;
  --moon: #8fa3b5;
  --paper: #ffffff;
  --text: #eef2f5;
  --muted: #9aa6b2;
  --ok: #7fd69a;
  --off: #e8a3a3;
  --radius: 20px;
  --radius-s: 12px;
  --gutter: 16px;
  --max: 1200px;
  --header-h: 60px;
  --tabbar-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 60px); }
body {
  margin: 0;
  font: 400 16px/1.55 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--night);
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.banner { background: var(--slate); color: var(--paper); text-align: center; font-weight: 600; font-size: 14px; padding: 8px var(--gutter); }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 40; background: rgba(13, 15, 17, .78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.header__in { max-width: var(--max); margin: 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter); }
.header__logo { flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: var(--slate); }
.header__logo img { height: 40px; width: auto; }
.header__nav { display: none; gap: 6px; margin-left: 24px; }
.header__nav a { position: relative; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: color .25s, background-color .25s; }
.header__nav a:hover { color: var(--paper); }
.header__nav a.is-active { color: var(--ink); background: var(--moon); }
.cart-btn {
  display: none; margin-left: 12px; position: relative; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--ink-2); color: var(--paper); cursor: pointer; font-weight: 700;
  transition: transform .2s var(--ease), border-color .2s;
}
.cart-btn:hover { border-color: var(--moon); }
.cart-btn__sum:empty { display: none; }
.cart-btn__count { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--moon); color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.15); } }

.status { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--paper); white-space: nowrap; }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); flex: 0 0 auto; }
.status.is-open .status__dot { background: var(--ok); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(127,214,154,.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(127,214,154,0); } }
.status--header { margin-left: auto; }
.status--header .status__hours { display: none; }
.status--hero { display: none; }

/* ---------- Экраны ---------- */
.screens { position: relative; min-height: 70vh; }
.js .screen:not(.is-active) { display: none; }
.screen.enter-right { animation: enterRight .42s var(--ease) both; }
.screen.enter-left { animation: enterLeft .42s var(--ease) both; }
.screen.leave { animation: leave .18s ease-in both; }
@keyframes enterRight { from { opacity: 0; transform: translateX(28px); } }
@keyframes enterLeft { from { opacity: 0; transform: translateX(-28px); } }
@keyframes leave { to { opacity: 0; transform: scale(.985); } }

/* ---------- Главный экран: луна и самурай ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: 560px; display: flex; align-items: flex-end; }
.hero__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__moon {
  position: absolute; left: 50%; top: 34px; width: 300px; height: 300px; margin-left: -150px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #a9bccc 0, var(--moon) 38%, var(--slate) 72%, var(--slate-d) 100%);
  box-shadow: 0 0 80px 10px rgba(99,120,139,.35), 0 0 220px 40px rgba(99,120,139,.18);
  will-change: transform;
}
.hero__moon::after { /* мазок-энсо вокруг луны */
  content: ''; position: absolute; inset: -16px; border-radius: 50%;
  border: 5px solid rgba(255,255,255,.08); border-left-color: transparent; transform: rotate(-30deg);
}
.hero__samurai { position: absolute; left: 50%; top: 52px; width: 560px; max-width: none; margin-left: -230px; height: auto; will-change: transform; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 70%; z-index: -1; background: linear-gradient(to bottom, rgba(13,15,17,0), var(--night) 72%); }
.hero__text { width: 100%; max-width: var(--max); margin: 0 auto; padding: 260px var(--gutter) 28px; }
.hero__slogan { margin: 0 0 6px; font-family: 'Caveat', cursive; font-size: clamp(30px, 8.5vw, 52px); line-height: 1.05; color: var(--moon); transform: rotate(-2deg); transform-origin: left; }
.hero__title { font-size: clamp(30px, 8.6vw, 60px); font-weight: 800; letter-spacing: -.02em; color: var(--paper); max-width: 14ch; }
.hero__lead { margin: 12px 0 22px; color: var(--muted); font-weight: 600; font-size: 15px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

.closed-note { max-width: var(--max); margin: 0 var(--gutter) 12px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--ink-2); border: 1px solid rgba(232,163,163,.3); font-size: 15px; }
@media (min-width: 1232px) { .closed-note { margin: 0 auto 12px; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; text-decoration: none; transition: transform .2s var(--ease), background-color .2s, box-shadow .25s, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
.btn--wide { width: 100%; }
.btn--moon { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 0 rgba(143,163,181,0); }
.btn--moon:hover { box-shadow: 0 0 28px 2px rgba(143,163,181,.45); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--moon); }
.btn--add { width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 24px; font-weight: 600; line-height: 1; background: var(--moon); color: var(--ink); }
.btn--add:hover:not(:disabled) { box-shadow: 0 0 22px rgba(143,163,181,.6); }
.btn--add.added { background: var(--ok); }

/* ---------- Категории ---------- */
.cats { position: sticky; top: var(--header-h); z-index: 30; background: rgba(13,15,17,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.cats__in { max-width: var(--max); margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--gutter); scrollbar-width: none; }
.cats__in::-webkit-scrollbar { display: none; }
.cats__link { flex: 0 0 auto; padding: 8px 15px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); background: var(--ink-2); border: 1px solid var(--line); transition: all .25s var(--ease); }
.cats__link:hover { color: var(--paper); }
.cats__link.is-active { background: var(--moon); color: var(--ink); border-color: var(--moon); }

/* ---------- Меню: ряды-карусели ---------- */
.menu { max-width: var(--max); margin: 0 auto; padding: 4px 0 32px; }
.menu__cat { padding-top: 26px; }
.menu__head { display: flex; align-items: baseline; gap: 10px; padding: 0 var(--gutter); margin-bottom: 14px; }
.menu__title { font-size: clamp(24px, 6.4vw, 34px); font-weight: 800; letter-spacing: -.01em; }
.menu__count { color: var(--muted); font-weight: 700; font-size: 14px; }
.menu__empty { color: var(--muted); padding: 0 var(--gutter); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 12px; overflow-x: auto; padding: 4px var(--gutter) 14px; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }

.card {
  position: relative; scroll-snap-align: start; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); border-color: rgba(143,163,181,.45); box-shadow: 0 14px 40px -18px rgba(143,163,181,.55); }
  .card:hover .card__media img { transform: scale(1.04); }
}
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--ink-3); overflow: hidden; }
.card__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card__ph { position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, var(--ink-3), var(--ink-2)); }
.card__moon { position: absolute; left: 50%; top: 46%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 38% 34%, #a9bccc, var(--moon) 40%, var(--slate) 80%); opacity: .85; box-shadow: 0 0 40px rgba(99,120,139,.35); }
.card__ph img { position: absolute; top: 6%; left: 50%; height: 100%; width: auto; max-width: none; transform: translateX(-60%); opacity: .95; }
.card.is-out .card__media > img, .card.is-out .card__ph { filter: grayscale(1) brightness(.5); }
.badge { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.badge--sale { left: 10px; background: var(--paper); color: var(--ink); }
.badge--out { right: 10px; background: rgba(13,15,17,.85); color: var(--paper); border: 1px solid var(--line-2); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 14px; flex: 1; }
.card__title { font-size: 18px; font-weight: 800; }
.card__desc { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__portion { margin: 0; color: var(--muted); font-size: 14px; }
.card__foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price__now { font-size: 20px; font-weight: 800; white-space: nowrap; }
.price__old { color: var(--muted); font-size: 14px; white-space: nowrap; }
.variants { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.variant { min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); transition: all .2s; }
.variant.is-active { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- Страницы: о нас, доставка, контакты ---------- */
.page { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: 48px 0 28px; }
.page-hero__moon { position: absolute; z-index: -1; right: -70px; top: -50px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #a9bccc, var(--moon) 38%, var(--slate) 75%); opacity: .22; box-shadow: 0 0 120px 20px rgba(99,120,139,.25); }
.page-hero__emblem { width: 84px; height: 84px; margin-bottom: 18px; border-radius: 50%; box-shadow: 0 0 40px rgba(143,163,181,.35); }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; color: var(--moon); }
.page-title { font-size: clamp(34px, 10vw, 60px); font-weight: 800; letter-spacing: -.02em; }
.page-lead { margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.status--page { margin-top: 16px; }
.prose { font-size: 18px; color: #d6dde3; }
.prose p { margin: 0 0 14px; }
.sub-title { font-size: 20px; font-weight: 800; margin: 28px 0 14px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.fact { display: grid; gap: 4px; padding: 16px; border-radius: var(--radius-s); background: var(--ink-2); border: 1px solid var(--line); }
.fact svg { color: var(--moon); margin-bottom: 6px; }
.fact b { font-size: 17px; }
.fact span { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; font-weight: 600; transition: border-color .2s; }
.chip:hover { border-color: var(--moon); }
.chip span { color: var(--muted); font-size: 13px; }
.info-row { display: grid; gap: 10px; margin: 28px 0 22px; padding: 16px; border-radius: var(--radius-s); background: var(--ink-2); border: 1px solid var(--line); }
.info-row div { display: flex; gap: 12px; align-items: center; }
.info-row svg { color: var(--moon); flex: 0 0 auto; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 64px; border-radius: var(--radius-s); background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: 2px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--moon); color: var(--ink); }
.steps span { color: var(--muted); font-size: 14px; }
.tiles { display: grid; gap: 10px; margin: 24px 0; }
.tile { padding: 18px; border-radius: var(--radius-s); background: var(--ink-2); border: 1px solid var(--line); }
.tile svg { color: var(--moon); }
.tile h3 { font-size: 18px; margin: 10px 0 4px; }
.tile p { margin: 0; color: var(--muted); }

.contact-list { display: grid; gap: 10px; margin-top: 8px; }
.contact { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius-s); background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; transition: border-color .25s, transform .25s var(--ease); }
a.contact:hover { border-color: var(--moon); transform: translateX(3px); }
.contact__icon { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(143,163,181,.14); color: var(--moon); }
.contact__body { display: grid; gap: 2px; min-width: 0; }
.contact__label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.contact__body b { font-size: 17px; overflow-wrap: anywhere; }
.contact__hint { font-size: 13px; color: var(--moon); }

.footer { border-top: 1px solid var(--line); }
.footer__in { max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter) 26px; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.footer img { border-radius: 50%; }
.footer p { margin: 0; }
.footer b { color: var(--paper); }

/* ---------- Нижняя панель (телефон) ---------- */
.tabbar {
  position: fixed; z-index: 45; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 0 4px; border-radius: 22px; background: rgba(21,25,29,.88); border: 1px solid var(--line-2);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.tabbar__item { position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 0; border: 0; background: none; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; transition: color .25s; }
.tabbar__item svg { transition: transform .3s var(--ease); }
.tabbar__item.is-active { color: var(--paper); }
.tabbar__item.is-active svg { transform: translateY(-2px); color: var(--moon); }
.tabbar__item.is-active::after { content: ''; position: absolute; bottom: -1px; width: 18px; height: 3px; border-radius: 2px; background: var(--moon); }
.tabbar__cart { color: var(--paper); }
.tabbar__badge { position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--moon); color: var(--ink); font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ---------- Анимации появления ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Планшет и ПК ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .rail { grid-auto-columns: 42%; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  :root { --header-h: 72px; --tabbar-h: 0px; }
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .header__logo img { height: 48px; }
  .header__nav { display: flex; }
  .cart-btn { display: inline-flex; }
  .status--header { margin-left: auto; }
  .status--header .status__hours { display: inline; }
  .hero { min-height: 620px; }
  .hero__moon { left: auto; right: 8%; margin-left: 0; top: 60px; width: 440px; height: 440px; }
  .hero__samurai { left: auto; right: 2%; margin-left: 0; top: 70px; width: 760px; }
  .hero::after { height: 45%; }
  .hero__text { padding: 120px var(--gutter) 70px; }
  .hero__title { max-width: 12ch; }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; padding-bottom: 4px; gap: 18px; }
  .contact-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1200px) {
  .rail { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Окно корзины ---------- */
html.drawer-open { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .25s; }
.drawer__panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; max-height: 92vh;
  display: flex; flex-direction: column; background: var(--ink-2); border-radius: 22px 22px 0 0;
  transform: translateY(100%); transition: transform .3s var(--ease); outline: none;
}
@supports (height: 1dvh) { .drawer__panel { max-height: 92dvh; } }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
@media (min-width: 700px) {
  .drawer__panel { left: auto; top: 0; width: 440px; max-height: none; border-radius: 0; transform: translateX(100%); }
}
.drawer__head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 20px; font-weight: 800; flex: 1; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--ink-3); }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 12px; background: var(--ink-2); }
.btn--wide { width: 100%; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; margin: 0; }
.warn, .blocked { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--ink-3); border-left: 3px solid var(--off); font-size: 14px; }
.warn { margin-top: 12px; }

.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.line {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'info del' 'qty sum';
  gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.line__info { grid-area: info; min-width: 0; }
.line__name { margin: 0; font-weight: 700; }
.line__price { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.line__price s { opacity: .7; }
.line__del { grid-area: del; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.line__del:hover { background: var(--ink-3); color: var(--paper); }
.line__sum { grid-area: sum; margin: 0; font-weight: 800; font-size: 17px; text-align: right; }
.qty { grid-area: qty; display: inline-flex; align-items: center; gap: 4px; background: var(--ink-3); border-radius: 999px; padding: 3px; justify-self: start; }
.qty__btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--ink-2); font-size: 20px; font-weight: 700; cursor: pointer; }
.qty__btn:disabled { opacity: .4; }
.qty__val { min-width: 28px; text-align: center; font-weight: 800; }

.free-hint { font-size: 14px; font-weight: 600; }
.progress { height: 6px; border-radius: 3px; background: var(--ink-3); margin-top: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--slate-l); border-radius: 3px; transition: width .4s var(--ease); }
.free-hint.is-done .progress i { background: var(--ok); }
.totals { margin: 0; display: grid; gap: 4px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals dt, .totals dd { margin: 0; }
.totals__total { color: var(--paper) !important; font-size: 20px; font-weight: 800; padding-top: 4px; }

/* Форма */
.form { display: grid; gap: 14px; align-content: start; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 6px; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--paper); background: var(--ink);
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-s); padding: 12px 14px; min-height: 48px;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--slate-l); box-shadow: 0 0 0 3px rgba(143,160,176,.25); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--ink); border-radius: var(--radius-s); padding: 4px; border: 1px solid rgba(255,255,255,.12); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: grid; place-items: center; min-height: 42px; border-radius: 9px; font-weight: 700; color: var(--muted); transition: background-color .2s, color .2s; }
.seg input:checked + span { background: var(--slate); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--paper); outline-offset: 2px; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.form-error { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: rgba(232,163,163,.12); color: var(--off); font-weight: 600; }

/* Отправка */
.send-lead { margin: 0 0 12px; }
.order-text {
  margin: 0 0 16px; padding: 14px; border-radius: var(--radius-s); background: var(--ink); border: 1px solid var(--line);
  font: 14px/1.5 'Manrope', system-ui, sans-serif; white-space: pre-wrap; word-break: break-word; max-height: 40vh; overflow: auto;
}
.send-btns { display: grid; gap: 10px; }
.btn--wa { background: #25d366; color: #0b2e17; }
.btn--tg { background: #2aabee; color: #06263a; }
.btn--max { background: var(--paper); color: var(--ink); }
.btn--outline { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.btn.is-disabled { opacity: .4; pointer-events: none; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 10px; font-size: 14px; }
.sr-copy { position: fixed; top: -1000px; left: 0; opacity: 0; }

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.4); opacity: 0; transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }


/* Плашка уведомлений — над нижней панелью */
.toast { bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom)); background: var(--paper); color: var(--ink); }
.drawer__panel { background: var(--ink-2); border-top: 1px solid var(--line-2); }
.drawer { z-index: 70; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__moon, .hero__samurai { transform: none !important; }
}

/* ===================== Заставка «Мазок тушью» ===================== */
.intro { display: none; }
.intro-on .intro {
  display: block; position: fixed; inset: 0; z-index: 100; color: var(--paper); cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none;
  /* страховка: если скрипт не загрузился, заставка сама исчезнет */
  animation: introFailsafe .4s 12s forwards;
}
.intro-on, .intro-on body { overflow: hidden; }
@keyframes introFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.intro.is-ready { animation: none; }

.intro__scene {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(ellipse at 50% 46%, #161a1f 0, var(--night) 70%); overflow: hidden;
}
.intro__stage { position: relative; width: min(112vw, 920px); aspect-ratio: 1000 / 260; display: grid; place-items: center; }

/* Мазок кистью — проявляется слева направо */
.intro__brush { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: scaleY(1.5);
  clip-path: inset(0 100% 0 0); animation: brushIn .75s cubic-bezier(.65,0,.25,1) .2s forwards; }
.intro__stroke { fill: var(--slate); }
.intro__dry { fill: none; stroke: var(--slate); stroke-width: 4; stroke-linecap: round; opacity: .7; }
@keyframes brushIn { to { clip-path: inset(0 0 0 0); } }

/* Надпись из логотипа — следом за кистью */
.intro__word { position: relative; width: min(82vw, 600px); height: auto;
  clip-path: inset(0 100% 0 0); animation: wordIn .7s cubic-bezier(.65,0,.25,1) .5s forwards;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
@keyframes wordIn { to { clip-path: inset(0 -5% 0 0); } }

/* Брызги туши */
.intro__drop { position: absolute; border-radius: 50%; background: var(--slate); transform: scale(0); animation: drop .35s cubic-bezier(.3,1.6,.5,1) forwards; }
.intro__drop--1 { left: 8%;  top: 22%; width: 14px; height: 14px; animation-delay: .55s; }
.intro__drop--2 { left: 3%;  top: 72%; width: 8px;  height: 8px;  animation-delay: .6s; }
.intro__drop--3 { left: 94%; top: 14%; width: 10px; height: 10px; animation-delay: .88s; }
.intro__drop--4 { left: 98%; top: 60%; width: 17px; height: 17px; animation-delay: .92s; }
.intro__drop--5 { left: 89%; top: 90%; width: 6px;  height: 6px;  animation-delay: .96s; }
@keyframes drop { to { transform: scale(1); } }

.intro__slogan { margin: 0; font-family: 'Caveat', cursive; font-size: clamp(28px, 7.5vw, 40px); color: var(--moon);
  opacity: 0; transform: translateY(8px); animation: sloganIn .7s ease 1.15s forwards; }
@keyframes sloganIn { to { opacity: 1; transform: none; } }

.intro__skip {
  position: absolute; z-index: 3; top: calc(14px + env(safe-area-inset-top)); right: 14px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(13,15,17,.6); color: var(--paper);
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.intro__skip:hover { border-color: var(--moon); }
.intro__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Уход: мазок «сметает» заставку вправо, под ней — сайт */
.intro.is-out { pointer-events: none; }
.intro.is-out .intro__skip { opacity: 0; transition: opacity .2s; }
.intro.is-out .intro__scene { animation: sweepOut .8s cubic-bezier(.7,0,.2,1) forwards; }
.intro.is-out .intro__stage { animation: stageOut .8s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes sweepOut { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes stageOut { to { transform: translateX(14%); } }
.intro.is-fade { transition: opacity .6s ease; opacity: 0; }
