/* Сайт craftgen (W27): общее для обеих вёрсток — токены темы, типографика, кнопки,
 * карточки, листы, анимации. Своё у компьютера — site-d.css, у телефона — site-m.css,
 * у конфигуратора — config.css (поверх style.css Mini App).
 *
 * Токены — те же имена, что у Mini App (--page, --card, --accent…): конфигуратор
 * сайта берёт тему отсюда. Селектор html[data-mode] сильнее :root из style.css.
 * Движение: всё анимированное выключается при prefers-reduced-motion (внизу файла).
 * Строгий CSP: ни одного style= в разметке; цвета карточек — классы tone-N.
 */
html[data-mode] {
  --page: #f6f1ea;
  --card: #fffdf9;
  --card-2: #f0e8dd;
  --text: #1f1b17;
  --muted: #645b53;         /* 5.6:1 на --page */
  --head: #7a5536;
  --accent: #a94f26;        /* белый текст на нём — 5.4:1 */
  --accent-text: #ffffff;
  --accent-ink: #8f421f;
  --accent-soft: #f3dccd;
  --line: #e4d9cb;
  --danger: #b3261e;
  --ok: #2e7d32;
  --stage-bg: #ece4d8;
  --shadow: 0 1px 2px rgb(60 40 20 / 8%), 0 8px 24px -12px rgb(60 40 20 / 28%);
  --shadow-lg: 0 2px 6px rgb(60 40 20 / 10%), 0 24px 48px -20px rgb(60 40 20 / 40%);
  --radius: 18px;
  --radius-sm: 12px;
  --tap: 44px;
  --gutter: 16px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html[data-mode]:not([data-theme="light"]) {
    --page: #171513;
    --card: #221f1c;
    --card-2: #2b2723;
    --text: #f1ebe3;
    --muted: #b1a79c;
    --head: #d9b08b;
    --accent: #e58b55;
    --accent-text: #1b1714;
    --accent-ink: #f2a676;
    --accent-soft: #3a2a20;
    --line: #36312c;
    --danger: #f2877f;
    --ok: #7bc47f;
    --stage-bg: #1e1b18;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 60%);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 35%), 0 24px 48px -20px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ основа */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 5vw, 56px); letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
img, video, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main { display: block; min-height: 60vh; }
main:focus { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px;
        background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--head); margin: 0 0 12px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
      stroke-linejoin: round; flex: none; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft);
        color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }

/* ------------------------------------------------------------------ кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--spring), background-color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.btn:active { transform: scale(.96); }
.btn .ic { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-on-accent { background: var(--accent-text); color: var(--accent); border-color: transparent; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer;
  text-decoration: none; transition: background-color .2s, transform .18s var(--spring);
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn[aria-current] { color: var(--accent-ink); }
.count {
  position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--accent-text);
  font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}
.count.bump { animation: bump .5s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more .ic { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.more:hover .ic { transform: translateX(4px); }

/* ------------------------------------------------------------------ шапка */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
        font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.logo-mark { width: 30px; height: 30px; }
.lm-a { fill: var(--accent); }
.lm-b { fill: none; stroke: var(--accent-text); stroke-width: 1.6; stroke-linejoin: round; opacity: .85; }
.hd { view-transition-name: site-header; }
.lang { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; }
.lang a { min-width: 36px; min-height: 32px; display: grid; place-items: center; padding: 0 8px; border-radius: 999px;
          color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.lang a[aria-current] { background: var(--text); color: var(--page); }

/* ------------------------------------------------------------------ чипы и поиск */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gutter);
                margin: 0 calc(-1 * var(--gutter)); scroll-snap-type: x proximity; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer;
  font-weight: 600; font-size: 15px; scroll-snap-align: start;
  transition: background-color .2s, color .2s, border-color .2s, transform .18s var(--spring);
}
.chip:active { transform: scale(.94); }
.chip[aria-checked="true"], .chip[aria-pressed="true"] {
  background: var(--text); color: var(--page); border-color: var(--text); animation: pop .3s var(--spring);
}
@keyframes pop { 0% { transform: scale(.92); } 100% { transform: scale(1); } }
.chip-n { font-size: 12px; opacity: .65; font-variant-numeric: tabular-nums; }
.chip .chk { width: 0; height: 16px; opacity: 0; margin-right: -6px; transition: width .2s, opacity .2s, margin .2s; }
.chip[aria-pressed="true"] .chk { width: 16px; opacity: 1; margin-right: 0; }
.search { position: relative; }
.search .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; min-height: 52px; padding: 0 18px 0 48px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ------------------------------------------------------------------ рисунки видов */
.art { display: block; width: 100%; height: 100%; }
.tone-0 { --t1: #e9c9a4; --t2: #c9895a; --t3: #fff5e6; }
.tone-1 { --t1: #b9c9ac; --t2: #6f8a5c; --t3: #f4f8ef; }
.tone-2 { --t1: #e8b9b0; --t2: #b9645a; --t3: #fff1ee; }
.tone-3 { --t1: #b7a6cf; --t2: #6f5c94; --t3: #f6f2fc; }
.tone-4 { --t1: #a9c6d9; --t2: #4f7d99; --t3: #f0f7fb; }
.tone-5 { --t1: #e0c36b; --t2: #a3812a; --t3: #fffaea; }
.art-bg { fill: var(--t3); }
.art-a { fill: var(--t1); }
.art-b { fill: var(--t2); }
.art-l { fill: none; stroke: var(--t2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art-f { fill: #ffb347; }
@media (prefers-color-scheme: dark) {
  html[data-mode]:not([data-theme="light"]) .art-bg { fill: color-mix(in srgb, var(--t2) 22%, #1b1815); }
}

/* ------------------------------------------------------------------ секции */
.sec { padding: clamp(40px, 7vw, 88px) 0 0; }
.sec-head { margin-bottom: 24px; }
.sec-head p { margin: 0; }
.page-head { padding: clamp(24px, 5vw, 56px) 0 24px; }
.page-head h1 { margin-bottom: 12px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 18px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--muted); }

/* шаги «Как это работает» */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: s; }
.step { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.step h3 { margin: 2px 0 6px; }
.step p { margin: 0 0 6px; }
.step-n {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font: 700 20px/1 var(--serif);
}

/* «Почему» */
.whys { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.why { padding: 24px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.why-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
          background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px; }
.why p { margin: 0; }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 18px 0; font-weight: 600; font-size: 17px; min-height: var(--tap);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease);
}
.faq[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq p { color: var(--muted); padding: 0 0 18px; margin: 0; max-width: 70ch; }
.faq[open] p { animation: drop .35s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* полоса-призыв */
.band { margin: clamp(48px, 8vw, 96px) var(--gutter) 0; padding: clamp(28px, 5vw, 56px); border-radius: 28px;
        background: var(--accent); color: var(--accent-text); text-align: center; }
.band h2 { color: inherit; }
.band p { opacity: .92; max-width: 56ch; margin: 0 auto 22px; }

/* ------------------------------------------------------------------ карточки изделий */
.pgrid { display: grid; gap: 16px; }
.pcard {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard-media { display: block; aspect-ratio: 1; background: var(--card-2); overflow: hidden; }
.pcard-media .vt, .preset-media .vt { display: block; width: 100%; height: 100%; }
/* превью пресета (W30): <picture> на всю рамку; ролик по наведению — поверх, проявляется */
.pcard-media, .kcard-art, .kind-hero-art, .quick-media { position: relative; }
.pcard-media picture, .preset-media picture, .kcard-art picture, .kind-hero-art picture { display: block; width: 100%; height: 100%; }
.kcard-art img, .kind-hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* рамка 4:3, кадр квадратный: изделие целиком, поля — цветом фона кадра (clip.js) */
.kcard-art picture[class], .kind-hero-art picture[class] { background: #f3efe8; }
.kcard-art picture.thumb-dark, .kind-hero-art picture.thumb-dark { background: #4a4542; }
.kcard-art picture[class] img, .kind-hero-art picture[class] img { object-fit: contain; }
.kcard-art img { transition: transform .8s var(--ease); }
.kcard a:hover .kcard-art img { transform: scale(1.05); }
.pcard-media .hover-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
                           transition: opacity .35s var(--ease); pointer-events: none; }
.pcard-media.playing .hover-clip { opacity: 1; }
.pcard-media img, .pcard-media .art { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .pcard-media img, .pcard:hover .pcard-media .art { transform: scale(1.05); }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.pcard-body h3 { margin: 0; font-size: 17px; }
.pcard-body h3 a { color: var(--text); text-decoration: none; }
.pcard-body h3 a::after { content: ""; position: absolute; inset: 0 0 64px; }   /* вся карточка — ссылка */
.pcard-body p { margin: 0; }
.pcard-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; position: relative; z-index: 1; }
.pcard-actions .btn { flex: 1; padding: 0 10px; }
.pcard.out { display: none; }
.pcard.in-filter { animation: rise .4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
/* картинка ещё грузится — скелетон */
.pcard-media img { background: linear-gradient(100deg, var(--card-2) 30%, var(--card) 50%, var(--card-2) 70%) 0 0 / 300% 100%;
                   animation: shimmer 1.4s linear infinite; }
.pcard-media img.ready { animation: none; background: none; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* виды на главной */
.kinds { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.kcard a {
  display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.kcard a:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.kcard-art { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.kcard-art .art { transition: transform .8s var(--ease); }
.kcard a:hover .kcard-art .art { transform: scale(1.07) rotate(1.5deg); }
.kcard-text { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; align-items: flex-start; }
.kcard-text strong { font: 600 22px/1.2 var(--serif); }

/* ------------------------------------------------------------------ герой */
.hero-stage { position: relative; overflow: hidden; border-radius: 32px;
              background: radial-gradient(120% 90% at 50% 30%, var(--card) 0%, var(--stage-bg) 70%); }
.hero-poster { position: absolute; inset: 12% 18%; transition: opacity .8s var(--ease); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .9s var(--ease);
               touch-action: pan-y; cursor: grab; }
.hero-canvas:active { cursor: grabbing; }
.hero-stage.live .hero-canvas { opacity: 1; }
.hero-stage.live .hero-poster { opacity: 0; }
.hero-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 12px;
             border-radius: 999px; background: color-mix(in srgb, var(--card) 80%, transparent); font-size: 13px;
             color: var(--muted); opacity: 0; transition: opacity .6s; pointer-events: none; }
.hero-stage.live .hero-hint { opacity: 1; }
.hero-stage.touched .hero-hint { opacity: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* постер дышит, пока 3D не поднялся */
.hero-poster .art { animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1.5deg); } }

/* ------------------------------------------------------------------ страница вида и пресета */
.kind-hero { display: grid; gap: 24px; align-items: center; padding: 24px 0 0; }
.kind-hero-art { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.facts-grid { display: grid; gap: 16px; padding-top: 48px; }
.fact { padding: 22px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.fact h2 { font-size: 22px; }
.swatch-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.swatch-list li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.sw { width: 26px; height: 26px; filter: drop-shadow(0 0 1px rgb(0 0 0 / 40%)); }
.ticks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { color: var(--ok); margin-top: 1px; }
.ticks.big li { font-size: 17px; padding: 10px 0; }
.preset { display: grid; gap: 28px; padding-top: 16px; }
.preset-media { border-radius: 28px; overflow: hidden; aspect-ratio: 1; background: var(--card-2); box-shadow: var(--shadow); }
.preset-media img, .preset-media video, .preset-media .art { width: 100%; height: 100%; object-fit: cover; display: block; }
.preset-info h2 { font-size: 20px; margin-top: 28px; }
.preset-info .btn-lg { margin: 4px 0 8px; }
.params { display: grid; gap: 0; margin: 0; }
.params > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.params dt { color: var(--muted); }
.params dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* переходы между страницами: картинка изделия «перелетает» из карточки на страницу */
.preset-media .vt { view-transition-name: pmedia; }
::view-transition-group(pmedia) { animation-duration: .45s; animation-timing-function: var(--ease); }

/* ------------------------------------------------------------------ каталог */
.results { color: var(--muted); font-size: 14px; margin: 16px 0 12px; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }
.otiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.otiles li.out { display: none; }
.otile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px;
         background: var(--card); color: var(--text); text-decoration: none; font-size: 13px; text-align: center;
         box-shadow: var(--shadow); transition: transform .2s var(--spring); min-height: var(--tap); }
.otile:hover { transform: translateY(-3px); }
.otile svg { width: 56px; height: 56px; color: var(--text); --o-det: var(--card); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.o-body { fill: currentColor; }
.o-det { fill: var(--o-det, var(--card)); }

/* быстрый просмотр и сравнение — нативный <dialog> */
.quick { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(760px, calc(100vw - 32px)); width: 100%; }
.quick::backdrop { background: rgb(20 14 8 / 45%); backdrop-filter: blur(3px); }
.quick[open] { animation: dlg-in .35s var(--ease); }
.quick[open]::backdrop { animation: fade .3s; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.quick-card { background: var(--card); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow: auto; }
.quick-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.quick-head h2 { margin: 0; font-size: 24px; }
.quick-grid { display: grid; gap: 18px; }
.quick-media { border-radius: 18px; overflow: hidden; aspect-ratio: 1; background: var(--card-2); }
.quick-media img, .quick-media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.quick h3 { font-size: 15px; margin: 14px 0 6px; color: var(--head); }

/* ------------------------------------------------------------------ корзина (панель и страница) */
.drawer-scrim { position: fixed; inset: 0; z-index: 60; background: rgb(20 14 8 / 40%); }
.drawer-scrim.open { animation: fade .3s; }
.drawer { position: fixed; z-index: 61; display: flex; flex-direction: column; background: var(--card); color: var(--text);
          box-shadow: var(--shadow-lg); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 20px; }
.drawer-head h2 { margin: 0; font-size: 22px; }
.drawer-body { flex: 1; overflow: auto; padding: 4px 20px; overscroll-behavior: contain; }
.drawer-foot { padding: 12px 20px calc(16px + var(--safe-bottom)); border-top: 1px solid var(--line); }
.drawer-foot p { margin: 0 0 10px; }
.citem { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 14px 0;
         border-bottom: 1px solid var(--line); }
.citem.enter { animation: rise .45s var(--spring); }
.citem.leave { animation: leave .3s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; } }
.citem-art { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--card-2); }
.citem-art img, .citem-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.citem h3 { font-size: 16px; margin: 0 0 4px; }
.citem ul { margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.citem-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--accent-ink); cursor: pointer; text-decoration: underline;
            text-underline-offset: 3px; min-height: 32px; }
.skel { height: 64px; border-radius: 12px; margin: 14px 0;
        background: linear-gradient(100deg, var(--card-2) 30%, var(--page) 50%, var(--card-2) 70%) 0 0 / 300% 100%;
        animation: shimmer 1.4s linear infinite; }
.cart-empty { text-align: center; padding: 40px 0; color: var(--muted); }
.cart-foot { display: grid; gap: 14px; padding: 18px 0 40px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.consent-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.form-msg { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text); }
.form-msg.bad { background: color-mix(in srgb, var(--danger) 14%, var(--card)); }

/* ------------------------------------------------------------------ вход и сохранённые */
.login-card { padding: 22px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); margin-bottom: 24px; }
.login label { display: block; font-weight: 600; margin-bottom: 6px; }
.login-row { display: flex; gap: 10px; flex-wrap: wrap; }
.login-row input { flex: 1 1 220px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line);
                   background: var(--page); font-size: 16px; }
.login-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.login .form-msg { margin-top: 12px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sitem { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sitem h3 { margin: 0 0 2px; font-size: 16px; }
.sitem .row { display: flex; gap: 8px; }

/* ------------------------------------------------------------------ контакты, документы, 404 */
.contact-grid { display: grid; gap: 16px; }
.ccard { padding: 24px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.ccard .ic { width: 30px; height: 30px; color: var(--accent-ink); margin-bottom: 10px; }
.ccard h2 { font-size: 22px; }
.ccard p { margin: 0 0 6px; }
.legal section { margin-bottom: 28px; }
.legal h2 { font-size: 22px; }
.draft { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, #e0a64b 22%, var(--card));
         border-left: 4px solid #c58a2b; font-weight: 600; }
.note-card { padding: 24px; border-radius: var(--radius); background: var(--accent-soft); margin: 40px 0; }
.nf { padding: 64px 16px; }
.nf-code { font: 700 clamp(80px, 18vw, 160px)/1 var(--serif); color: var(--accent-soft); margin: 0; }

/* ------------------------------------------------------------------ тост */
.toast {
  position: fixed; left: 50%; z-index: 80; transform: translateX(-50%); bottom: calc(24px + var(--safe-bottom));
  padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--page); font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px);
}
.toast.show { animation: toast-in .45s var(--spring); }
.toast a { color: inherit; font-weight: 700; }
.toast span, .toast a { white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 20px) scale(.95); } }
/* «капля» летит от кнопки к корзине (site.js, Web Animations) */
.fly { position: fixed; z-index: 90; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
       background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); pointer-events: none; }

/* ------------------------------------------------------------------ появление при прокрутке */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ подвал */
.ft { margin-top: clamp(56px, 9vw, 112px); padding: 40px var(--gutter) calc(32px + var(--safe-bottom));
      background: var(--card); border-top: 1px solid var(--line); }
.ft h2 { font: 700 13px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 12px; }
.ft ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ft ul a { color: var(--text); text-decoration: none; display: inline-block; padding: 6px 0; }
.ft ul a:hover { color: var(--accent-ink); }
.ft-brand p { color: var(--muted); max-width: 36ch; }
.ft-rights { color: var(--muted); font-size: 14px; margin: 24px 0 0; }

/* ------------------------------------------------------------------ переходы страниц (View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .25s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .35s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
::view-transition-group(site-header) { animation-duration: 0s; }

/* ------------------------------------------------------------------ без движения */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
