:root {
  --ink: #3f1521; --ink-2: #6b4650; --muted: #9a8086;
  --paper: #f7f2f0; --card: #ffffff; --line: #eadcda;
  --poppy: #8e2b3a; --poppy-ink: #6e1f2e; --poppy-soft: #f5e3e3;
  --lilac: #e7c6cb; --marigold: #d9b26f;
  --display: 'Dela Gothic One', 'Golos Text', system-ui, sans-serif;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gut: clamp(16px, 4vw, 48px);
  --max: 1320px;
}
/* ---------- темы: светлая (по умолчанию), мягкая светлая, мягкая тёмная, тёмная */
:root { --on-ink: #ffffff; --deep: #3f1521; color-scheme: light; }
:root[data-theme="soft"] {
  --ink: #3f1521; --ink-2: #5f3d47; --muted: #8c727a;
  --paper: #ece1dd; --card: #f7f0ed; --line: #dbc9c5; --poppy-soft: #e8d1d2; --lilac: #dfbcc2;
}
:root[data-theme="dusk"] {
  --ink: #f6e9eb; --ink-2: #dcc3c9; --muted: #b0959c; --on-ink: #2a1c21; --deep: #22141a;
  --paper: #3a2a30; --card: #47363c; --line: #5b464d;
  --poppy: #c3566a; --poppy-ink: #e58598; --poppy-soft: #5a3942; --lilac: #7a5560; --marigold: #d6ad69;
  color-scheme: dark;
}
:root[data-theme="dark"] {
  --ink: #f3e6e9; --ink-2: #cdb2b9; --muted: #957a82; --on-ink: #170d10; --deep: #0d0608;
  --paper: #170d10; --card: #23161b; --line: #38262c;
  --poppy: #b8455a; --poppy-ink: #de7084; --poppy-soft: #3b1d25; --lilac: #5c3944; --marigold: #cfa25c;
  color-scheme: dark;
}
:root[data-theme="dusk"] .f input, :root[data-theme="dusk"] .f select, :root[data-theme="dusk"] .f textarea,
:root[data-theme="dark"] .f input, :root[data-theme="dark"] .f select, :root[data-theme="dark"] .f textarea { color: var(--ink); }
.theme-btn { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; position: relative; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; list-style: none; margin: 0; padding: 5px; background: var(--card); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.18), 0 0 0 1px var(--line); min-width: 200px; text-align: left; }
.theme-menu li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); }
.theme-menu li:hover { background: var(--paper); }
.theme-menu li[aria-selected="true"] { font-weight: 700; color: var(--poppy); }
.theme-menu i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--poppy); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
.muted { color: var(--muted); }

/* ---------- шапка поверх поля */
.top { position: fixed; z-index: 30; inset: 0 0 auto 0; display: flex; align-items: center; gap: 22px; padding: 14px var(--gut); transition: background .25s, box-shadow .25s; }
.top.solid { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 20px var(--display); letter-spacing: -.01em; }
.links { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 15px; }
.links a { text-decoration: none; }
.links a:hover { color: var(--poppy); }
.top-phone { font-weight: 700; text-decoration: none; font-size: 15px; }
.cart-btn { border: 0; background: var(--ink); color: var(--on-ink); border-radius: 99px; padding: 8px 8px 8px 18px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.cart-btn b { background: var(--marigold); color: var(--ink); border-radius: 99px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 13px; padding: 0 7px; }
.cart-btn.bump { animation: bump .4s; }
@keyframes bump { 35% { transform: scale(1.1) rotate(-3deg); } }
@media (max-width: 860px) { .links, .top-phone { display: none; } .theme-wrap { margin-left: auto; } }
.theme-wrap { position: relative; }

/* ---------- первый экран: поле */
.hero { position: relative; height: min(92vh, 860px); min-height: 560px; overflow: hidden; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: default; touch-action: pan-y; }
.hero-copy { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: clamp(96px, 16vh, 150px) var(--gut) 0; pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.season { margin: 0 0 14px; font-weight: 600; color: var(--ink-2); }
.hero h1 { font: clamp(40px, 7.4vw, 108px)/.95 var(--display); letter-spacing: -.03em; max-width: 11ch; text-wrap: balance; text-shadow: 0 0 30px color-mix(in srgb, var(--paper) 90%, transparent), 0 0 8px color-mix(in srgb, var(--paper) 80%, transparent); }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--card) 85%, transparent); padding: 7px 14px; border-radius: 99px; }
@media (max-width: 600px) { .hero { height: 78vh; min-height: 520px; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 99px; padding: 15px 28px; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--poppy); color: #fff; }
.btn.primary:hover { background: var(--poppy-ink); }
.btn.dark { background: var(--ink); color: var(--on-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- ряд категорий с иконками */
.catalog { max-width: var(--max); margin: 0 auto; padding: 18px var(--gut) 64px; scroll-margin-top: 64px; }
.rail { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 12px; scrollbar-width: none; position: sticky; top: 56px; z-index: 10; background: var(--paper); margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: var(--gut); }
.rail::-webkit-scrollbar { display: none; }
.rail button { flex: none; width: 104px; border: 0; background: none; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; line-height: 1.2; text-align: center; color: var(--ink); }
.rail .ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.rail .ic svg, .rail .ic img { width: 52px; height: 52px; object-fit: contain; }
.rail button:hover .ic { background: var(--card); }
.rail button.on .ic { background: var(--poppy-soft); }
.rail button.on span { color: var(--poppy); font-weight: 600; }
.rail .more .ic { background: var(--card); }
.cat-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 22px 0 18px; }
.cat-head h2 { font: clamp(26px, 3.4vw, 40px)/1.05 var(--display); letter-spacing: -.02em; }
.sort { margin-left: auto; position: relative; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; opacity: .75; }
.foot-legal a { color: inherit; }
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; background: var(--card); color: var(--ink); text-transform: uppercase; }
.promo-msg { font-size: 13px; color: var(--poppy); min-height: 0; }
.promo-msg:empty { display: none; }
.chk.consent { align-items: flex-start; font-size: 13px; line-height: 1.4; }
.chk.consent input { margin-top: 2px; flex: none; }
.chk.consent a { color: var(--poppy); }
.sort-btn { min-width: 196px; justify-content: space-between; }
.sort-btn { display: inline-flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 9px 16px; font-weight: 600; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sort-btn:hover, .sort.open .sort-btn { border-color: var(--ink); }
.sort-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--poppy-soft); border-color: var(--poppy); }
.sort-btn svg { transition: transform .2s; color: var(--muted); }
.sort.open .sort-btn svg { transform: rotate(180deg); }
.sort-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 5px; background: var(--card); border-radius: 18px; box-shadow: 0 16px 40px rgba(63,21,33,.16), 0 0 0 1px var(--line); animation: sortIn .16s ease-out; }
.sort-menu li { padding: 8px 11px; border-radius: 12px; font-size: 14px; white-space: nowrap; cursor: pointer; font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sort-menu li:hover { background: var(--paper); }
.sort-menu li[aria-selected="true"] { color: var(--poppy); font-weight: 700; }
.sort-menu li[aria-selected="true"]::after { content: '✓'; font-size: 12px; }
@keyframes sortIn { from { opacity: 0; transform: translateY(-4px); } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(14px, 2vw, 26px) clamp(14px, 2vw, 22px); }
.card { display: flex; flex-direction: column; text-align: left; cursor: pointer; }
.card .pic { aspect-ratio: 4/5; border-radius: 22px; background: var(--card) center/cover no-repeat; position: relative; overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .pic img { transform: scale(1.04); }
.badges { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--card); }
.badge.hit { background: var(--marigold); } .badge.new { background: var(--ink); color: var(--on-ink); } .badge.sale { background: var(--poppy); color: #fff; }
.badge.season { background: var(--lilac); } .badge.premium { background: #000; color: #fff; }
.card .add { position: absolute; right: 12px; bottom: 12px; border: 0; background: var(--card); color: var(--ink); border-radius: 99px; padding: 10px 16px; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 6px 18px rgba(63,21,33,.16); }
.card .add:hover, .card .add.in { background: var(--ink); color: var(--on-ink); }
.card.off .pic { filter: grayscale(.7); opacity: .7; }
.card .meta { padding: 12px 4px 0; display: flex; flex-direction: column; gap: 2px; }
.card .price { font: 20px var(--display); letter-spacing: -.02em; }
.old { color: var(--muted); text-decoration: line-through; font-size: 15px; margin-left: 8px; font-family: var(--font); }
.card .name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.card .lead { font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; } .card .pic { border-radius: 16px; } .card .add { padding: 8px 12px; font-size: 13px; right: 8px; bottom: 8px; } .card .price { font-size: 17px; } .card .name { font-size: 14px; } .rail button { width: 84px; font-size: 12px; } .rail .ic { width: 56px; height: 56px; } .rail .ic svg { width: 44px; height: 44px; } }

/* ---------- инфо и подвал */
.info { max-width: var(--max); margin: 0 auto; padding: 8px var(--gut) 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; scroll-margin-top: 70px; }
.info h3 { font: 20px var(--display); margin-bottom: 8px; }
.info p { margin: 0; color: var(--ink-2); max-width: 38ch; }
@media (max-width: 720px) { .info { grid-template-columns: 1fr; gap: 22px; } }
.foot { background: var(--deep); color: #f1dfe2; padding: 48px var(--gut) calc(48px + env(safe-area-inset-bottom)); }
.foot-brand { max-width: var(--max); margin: 0 auto 28px; font: clamp(44px, 11vw, 150px)/.9 var(--display); letter-spacing: -.04em; color: var(--marigold); }
.foot-cols { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.foot-cols b { display: block; color: #c9a5ad; font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.foot-cols a { color: #fff; }
@media (max-width: 720px) { .foot-cols { grid-template-columns: 1fr 1fr; } }

/* ---------- карточка товара */
dialog.product { border: 0; padding: 0; border-radius: 26px; width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--card); color: var(--ink); }
dialog.product::backdrop { background: rgba(63,21,33,.55); }
.pd { display: grid; grid-template-columns: 1.05fr 1fr; }
.gal { background: var(--paper); display: flex; flex-direction: column; }
.gal .main { aspect-ratio: 4/5; background: center/cover no-repeat; }
.gal .thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.gal .thumbs button { width: 56px; height: 56px; border-radius: 10px; border: 2px solid transparent; background: center/cover; flex: none; cursor: pointer; padding: 0; }
.gal .thumbs button.on { border-color: var(--ink); }
.pd .txt { padding: 30px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.pd h2 { font: 30px/1.05 var(--display); letter-spacing: -.02em; padding-right: 40px; }
.pd .price { font: 28px var(--display); }
.pd .x { position: absolute; top: 14px; right: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 9px 14px; cursor: pointer; text-align: left; }
.opts button b { display: block; font-size: 15px; } .opts button small { color: var(--muted); }
.opts button.on { border-color: var(--ink); background: var(--ink); color: var(--on-ink); } .opts button.on small { color: #e8cdd2; }
.attrs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.attrs dt { color: var(--muted); } .attrs dd { margin: 0; }
.label-s { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
@media (max-width: 760px) {
  dialog.product { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 94vh; }
  .pd { grid-template-columns: 1fr; } .gal .main { aspect-ratio: 1.15; } .pd .txt { padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); }
}
.x { border: 0; background: var(--paper); width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 99px; background: var(--card); }
.qty button { border: 0; background: none; width: 38px; height: 38px; font-size: 20px; font-weight: 700; cursor: pointer; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }

/* ---------- корзина и оформление */
.drawer-bg { position: fixed; inset: 0; background: rgba(63,21,33,.5); z-index: 50; }
.drawer { position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--card); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(63,21,33,.25); animation: slide .24s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 22px var(--display); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px calc(22px + env(safe-area-inset-bottom)); }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line .pic { width: 64px; height: 64px; border-radius: 14px; background: center/cover; }
.line .n { font-weight: 600; line-height: 1.25; } .line .p { font-size: 14px; color: var(--muted); }
.sum { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; }
.sum.total { font: 22px var(--display); padding-top: 12px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.f { display: flex; flex-direction: column; gap: 5px; position: relative; }
.f > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.f input, .f select, .f textarea { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); width: 100%; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--ink); }
.f input.bad { border-color: var(--poppy); background: var(--poppy-soft); }
.f small { color: var(--muted); font-size: 12px; }
.f textarea { min-height: 60px; resize: vertical; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border-radius: 99px; padding: 4px; }
.toggle button { border: 0; background: none; padding: 10px; border-radius: 99px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.toggle button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 6px rgba(63,21,33,.12); }
.chk { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: var(--poppy); }
.mapbox { height: 260px; border-radius: 14px; overflow: hidden; background: var(--paper); }
.map-link { border: 0; background: none; padding: 0; color: var(--poppy); font-weight: 600; cursor: pointer; text-align: left; font-size: 14px; }
.zone { font-size: 14px; padding: 8px 12px; border-radius: 12px; background: var(--paper); }
.zone.bad { background: var(--poppy-soft); color: var(--poppy-ink); }
.err { background: var(--poppy-soft); color: var(--poppy-ink); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; padding: 30px 6px; }
.done .big { font: 30px/1.1 var(--display); margin: 18px 0 10px; }
.empty-cart { text-align: center; padding: 40px 10px; color: var(--muted); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 11px 18px; border-radius: 99px; font-weight: 600; }
@media (max-width: 420px) { .f2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.geo-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; margin-top: 4px; box-shadow: 0 12px 30px rgba(63,21,33,.15); overflow: hidden; }
.geo-suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.geo-suggest button small { display: block; color: var(--muted); font-size: 12px; }
.geo-suggest button:hover, .geo-suggest button.on { background: var(--paper); }
.leaflet-container { font: inherit; }
.addon { border-bottom: 1px solid var(--line); padding: 4px 0; display: block; cursor: default; }
.addon-head { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.addon-head input { width: 20px; height: 20px; accent-color: var(--poppy); }
.addon-head span { flex: 1; }
.addon-body { padding: 4px 0 10px 30px; display: flex; flex-direction: column; gap: 8px; }
.opts.small button { padding: 6px 10px; border-radius: 10px; } .opts.small b { font-size: 13px; }
.addon-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.addon-text { flex: 1; min-width: 180px; border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.subline { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0 6px 76px; font-size: 14px; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.subline small { display: block; color: var(--muted); }
.x-sm { border: 0; background: var(--paper); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.emoji-ic { font-size: 40px; line-height: 1; display: grid; place-items: center; width: 100%; height: 100%; }

/* фото в карточке не растягивается от длинного списка допов */
.pd { align-items: start; }
.pd .gal { position: sticky; top: 0; align-self: start; }
@media (max-width: 760px) { .pd .gal { position: static; } }
.hero.no-field { height: auto; min-height: 0; padding-bottom: 40px; }
/* конструктор букета */
.bd .bd-sum { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.bd .bd-sum span { background: var(--card); border-radius: 99px; padding: 4px 10px; font-size: 13px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 14px; font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.bd .blist { display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--line); }
.bd .brow { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.bd .brow img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.bd .brow b { display: block; font-weight: 600; } .bd .brow small { color: var(--muted); }
.bd .brow.on { background: linear-gradient(90deg, var(--poppy-soft), transparent 70%); }
.small-add { border: 1.5px solid var(--ink); background: var(--card); border-radius: 99px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.bd-foot { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.bd-foot b { font: 24px var(--display); }
.qty button:disabled { opacity: .3; cursor: default; }

/* ---------- политика конфиденциальности */
.legal-page .top { position: sticky; }
.legal { max-width: 760px; margin: 0 auto; padding: 110px 20px 80px; line-height: 1.6; }
.legal h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 5vw, 42px); line-height: 1.1; margin: 0 0 12px; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; }
.legal ul { padding-left: 20px; } .legal li { margin: 6px 0; }
.legal a { color: var(--poppy); }
:root[data-theme="dusk"] .card .pic img, :root[data-theme="dark"] .card .pic img { filter: brightness(.9) saturate(.95); }

/* ---------- страница заказа */
.track h1 { margin-bottom: 18px; }
.tsteps { list-style: none; padding: 0; margin: 0 0 18px; display: flex; gap: 0; }
.tsteps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; text-align: center; color: var(--muted); position: relative; }
.tsteps li i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); position: relative; z-index: 1; }
.tsteps li::before { content: ''; position: absolute; top: 7px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.tsteps li:first-child::before { display: none; }
.tsteps li.st-done, .tsteps li.st-now { color: var(--ink); }
.tsteps li.st-done i, .tsteps li.st-done::before, .tsteps li.st-now::before { background: var(--poppy); }
.tsteps li.st-now i { background: var(--poppy); box-shadow: 0 0 0 5px var(--poppy-soft); }
.tsteps li.st-now span { font-weight: 700; }
.tphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tphotos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; }

/* ---------- телефон: никакой прокрутки вбок, поля не шире экрана, без приближения при вводе */
html, body { max-width: 100%; overflow-x: hidden; }
.drawer { max-width: 100vw; overflow: hidden; }
.drawer-body { overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.f2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f, .f2 > *, .f3 > *, .promo-row > * { min-width: 0; }
.f input, .f select, .f textarea, .promo-row input { min-width: 0; max-width: 100%; box-sizing: border-box; }
.f input[type="date"], .f input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-height: 48px; text-align: left; line-height: 1.3; }
.f input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.hp { position: absolute !important; left: 0 !important; top: 0; width: 1px !important; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.logo span { white-space: nowrap; }
.toast { white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  input, select, textarea { font-size: 16px; } /* iOS не приближает страницу при вводе */
  .top { gap: 10px; padding: 10px 16px; }
  .logo { font-size: 18px; }
  .cart-btn { padding: 6px 6px 6px 14px; }
  .drawer-head { padding: 12px 16px; }
  .drawer-body { padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); }
  .promo-row .btn { padding-left: 12px; padding-right: 12px; }
  .hero-actions { gap: 12px; margin-top: 22px; }
  .hero-note { font-size: 14px; }
  .sort-btn { min-width: 0; padding: 8px 12px; font-size: 14px; }
  .sort-menu { left: auto; min-width: 190px; }
  /* карточка и конструктор — шторкой снизу, картинка не съедает экран */
  dialog.product { max-height: 92dvh; }
  .gal .main { aspect-ratio: auto; height: 38vh; background-size: contain; background-repeat: no-repeat; }
  .bd .gal .main { height: 28vh; }
  .bd .blist { max-height: none; }
  .pd { position: relative; } .pd .txt { position: static; }
  .pd .x { position: absolute; top: 10px; right: 10px; z-index: 3; background: var(--card); box-shadow: 0 4px 14px rgba(0,0,0,.15); }
  .pd h2 { font-size: 26px; }
  .tsteps li span { font-size: 10.5px; }
  .legal { padding-top: 84px; }
}
@media (max-width: 420px) { .f2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 340px) { .theme-btn { width: 36px; height: 36px; } .cart-btn span { display: none; } .cart-btn { padding: 6px; } }

/* ---------- конструктор: отдельная кнопка, не в ряду категорий */
.builder-cta { display: flex; align-items: center; gap: 16px; width: 100%; margin: 4px 0 26px; padding: 12px 20px 12px 12px; border: 1.5px solid var(--line); border-radius: 22px; cursor: pointer; text-align: left; color: var(--ink);
  background: linear-gradient(100deg, var(--poppy-soft), var(--card) 70%); transition: border-color .2s, transform .2s, box-shadow .2s; }
.builder-cta:hover { border-color: var(--poppy); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(63,21,33,.12); }
.builder-cta .bc-art { width: 72px; height: 72px; flex: none; border-radius: 16px; background: var(--card) center/120% no-repeat; }
.builder-cta .bc-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.builder-cta b { font: 20px/1.15 var(--display); letter-spacing: -.01em; }
.builder-cta small { color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.builder-cta .bc-go { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--poppy); color: #fff; display: grid; place-items: center; font-size: 20px; }
.btn.ghost-light { background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink); border: 1.5px solid var(--line); }
@media (max-width: 600px) { .builder-cta { gap: 12px; padding: 10px 14px 10px 10px; margin-bottom: 18px; } .builder-cta .bc-art { width: 58px; height: 58px; } .builder-cta b { font-size: 17px; } .builder-cta small { font-size: 13px; } .builder-cta .bc-go { width: 36px; height: 36px; font-size: 17px; } }

/* ---------- личный кабинет */
.olist { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 24px; }
.ocard { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1.5px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); background: var(--card); }
.ocard:hover { border-color: var(--poppy); }
.ocard img, .ocard .oph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--poppy-soft); }
.ocard .oinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ocard .oinfo b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard small { color: var(--muted); }
.ostatus { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--poppy-soft); color: var(--poppy-ink); }
.ostatus.s-done { background: #e2f0e6; color: #2f6b45; } .ostatus.s-cancelled { background: var(--line); color: var(--muted); }
.claim { margin: 10px 0 18px; border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 16px; background: var(--card); }
.claim summary { cursor: pointer; font-weight: 700; }
.f-claim { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
@media (max-width: 600px) { .f-claim .f3 { grid-template-columns: minmax(0, 1fr); } .ocard { gap: 10px; } .ostatus { font-size: 11px; padding: 3px 8px; } }
.code-box { display: inline-block; font: 30px/1 var(--display); letter-spacing: .12em; padding: 10px 18px; border-radius: 14px; background: var(--poppy-soft); color: var(--poppy-ink); margin: 4px 0; }
.orders-link { font-weight: 600; text-decoration: none; font-size: 15px; }
.my-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; margin-left: auto; }
.my-btn svg { width: 19px; height: 19px; }
.my-btn b { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--poppy); color: #fff; font-size: 11px; display: grid; place-items: center; }
.my-btn[hidden] + .theme-wrap { margin-left: auto; }
@media (min-width: 861px) { .my-btn { margin-left: 0; } }
.my-btn:not([hidden]) + .theme-wrap { margin-left: 0; }
.tsteps li time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -2px; }
.acc-me, .acc-login { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); margin: 6px 0 14px; }
.acc-login { flex-direction: column; align-items: flex-start; }
.acc-me b, .acc-login b { display: block; } .acc-me small, .acc-login small { color: var(--muted); display: block; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.row-btns .btn { padding: 10px 18px; font-size: 15px; }
.login-btn { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); gap: 10px; }
.login-btn:hover { border-color: var(--ink); }
.acc-bonus { margin: 0 0 12px; }
.acc-rem { border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 16px; margin-bottom: 14px; background: var(--card); }
.acc-rem .rrow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.acc-rem .rrow:first-of-type { border-top: 0; }
.link-btn { border: 0; background: none; color: var(--poppy); cursor: pointer; padding: 0; font-size: 13px; }
