/* Sirime — стили витрины и админки. Токены — из макетов design/*.dc.html (.day / .night). */

/* ---------- токены ---------- */
:root, .day {
  --bg:#FAF8F3; --surface:#FFFFFF; --ink:#2B2622; --ink2:#6F665B; --line:#E7DFD1;
  --btn:#E3A94C; --btnInk:#2B2622; --accentInk:#5A4527;
  --panel:#FAF8F3; --motif:#8A7A62; --rim:#CFC4B2; --frame:#3A342C; --rib:rgba(43,38,34,.10);
  --glow:0; --kanji:rgba(43,38,34,.08); --focus:#5A4527;
}
:root[data-theme="night"], .night {
  --bg:#1D1A16; --surface:#26221D; --ink:#F1EBDF; --ink2:#A79C8C; --line:#3A342C;
  --btn:#E3A94C; --btnInk:#1D1A16; --accentInk:#E3A94C;
  --panel:#F3D9A6; --motif:#5A4527; --rim:#E3A94C; --frame:#120F0C; --rib:rgba(90,69,39,.28);
  --glow:1; --kanji:rgba(227,169,76,.16); --focus:#E3A94C;
}
:root {
  --font-text:'Zen Kaku Gothic New', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display:'Alegreya', Georgia, 'Times New Roman', serif;
  --font-jp:'Shippori Mincho', 'Hiragino Mincho ProN', serif;
  --bad:#B5654F; --ok:#5C8A5C;
  /* имена из старой вёрстки — их использует админка */
  --paper:var(--bg); --card:var(--surface); --muted:var(--ink2); --glow-soft:var(--panel);
}
:root[data-theme="night"] { --bad:#E08B73; }

/* ---------- база ---------- */
*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; scroll-behavior:smooth; scroll-padding-top:16px; }
body {
  margin:0; min-height:100vh; background:var(--bg); color:var(--ink);
  font-family:var(--font-text); font-size:15px; line-height:1.6;
  -webkit-font-smoothing:antialiased; transition:background-color .6s, color .6s;
}
a { color:var(--ink); }
a:hover { color:var(--accentInk); }
button, input, select, textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
img { max-width:100%; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
[hidden] { display:none !important; }
.wrap { max-width:1120px; margin:0 auto; padding:0 clamp(16px, 4vw, 48px); }
.muted { color:var(--ink2); }
.small { font-size:14px; }
.sr-only { 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:16px; top:-100px; z-index:50; padding:10px 16px; border-radius:999px; background:var(--ink); color:var(--bg); text-decoration:none; }
.skip:focus { top:12px; color:var(--bg); }
.jp { font-family:var(--font-jp); font-weight:600; color:var(--ink2); }
.only-sm { display:none; }
:root[data-theme="night"] .when-day, :root:not([data-theme="night"]) .when-night { display:none; }

/* ---------- кнопки ---------- */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:40px; padding:0 16px; border-radius:999px; border:1.5px solid transparent;
  background:transparent; color:var(--ink); font-size:14px; font-weight:500; line-height:1.2;
  text-decoration:none; text-align:center; transition:background-color .2s, color .2s, border-color .2s;
}
.btn-lg { min-height:46px; padding:0 24px; font-size:15px; }
.btn-accent { background:var(--btn); color:var(--btnInk); font-weight:700; }
.btn-accent:hover { background:#EDB862; color:var(--btnInk); }
.btn-line { border-color:var(--ink); }
.btn-line:hover { background:var(--ink); color:var(--bg); }
.btn-ghost { border-color:var(--line); }
.btn-ghost:hover { border-color:var(--ink); color:var(--ink); }
.btn-ink { background:var(--ink); color:var(--bg); }
.btn-ink:hover { color:var(--bg); background:var(--accentInk); }
.btn[disabled] { opacity:.6; cursor:progress; }
.wide { width:100%; }
.ico { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.link-btn { background:none; border:0; padding:6px 0; color:var(--ink2); text-decoration:underline; text-underline-offset:3px; font-size:14px; min-height:32px; }
.link-btn:hover { color:var(--ink); }
.icon-btn { width:40px; height:40px; flex:none; border-radius:50%; border:1.5px solid var(--line); background:transparent; color:var(--ink); display:inline-flex; align-items:center; justify-content:center; }
.icon-btn:hover { border-color:var(--ink); }

/* ---------- шапка ---------- */
.site-header { display:flex; flex-wrap:wrap; align-items:center; gap:12px 28px; padding:14px 0; }
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo-mark { width:30px; height:30px; flex:none; display:block; fill:none; stroke:var(--ink); stroke-linecap:round; }
.logo-word { width:72px; height:24px; flex:none; display:block; overflow:visible; }
.logo-word text { font-family:var(--font-jp); font-weight:500; font-size:24px; letter-spacing:.04em; fill:#E3A94C; }
.logo-lg { gap:12px; }
.logo-lg .logo-mark { width:34px; height:34px; }
.logo-lg .logo-word { width:78px; height:26px; }
.main-nav { display:flex; flex-wrap:wrap; gap:4px 24px; flex:1 1 auto; font-size:14px; }
.main-nav a { text-decoration:none; padding:10px 0; color:var(--ink2); }
.main-nav a:hover { color:var(--ink); }
.site-header { position:relative; }
/* «…в корзине» — плашка под кнопкой корзины, чтобы не сдвигать шапку */
.header-status { position:absolute; right:0; top:calc(100% - 8px); z-index:15; padding:6px 14px; border-radius:999px; background:var(--ink); color:var(--bg); font-size:14px; box-shadow:0 8px 20px rgba(29,26,22,.18); }
.header-status:empty { display:none; }
/* «Свет» и «Корзина» — круглые иконки; подписи остаются для экранных дикторов */
.theme-btn, .cart-btn { position:relative; }
.theme-btn .btn-label, .cart-btn .btn-label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.cart-btn .count { position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; border-radius:9px; font-size:11px; padding:0 4px; }
.count {
  min-width:22px; height:22px; border-radius:11px; background:var(--btn); color:var(--btnInk);
  font-size:13px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; padding:0 6px;
}

/* ---------- SVG-лампы ---------- */
.lamp { display:block; overflow:visible; }
.l-body { fill:var(--panel); stroke:var(--rim); stroke-width:1.5; transition:fill .6s, stroke .6s; }
.l-ribs { fill:none; stroke:var(--rib); stroke-width:1; }
.l-mfill { fill:var(--motif); transition:fill .6s; }
.l-mline { fill:none; stroke:var(--motif); stroke-width:4; stroke-linecap:round; transition:stroke .6s; }
.l-mdots { fill:var(--panel); transition:fill .6s; }
.l-frame { fill:var(--frame); }
.lamp-icon { width:48px; height:66px; flex:none; }
.lamp-icon .l-body { stroke-width:3; }
.lamp-icon .l-ribs { stroke:var(--motif); stroke-width:2; }
.lamp-mini { width:72px; height:99px; flex:none; }
.lamp-mini .l-body, .lamp-mini .l-mdots { fill:#FAF8F3; }
.lamp-mini .l-body { stroke-width:2; }

/* ---------- первый экран ---------- */
.hero { display:flex; flex-wrap:wrap; align-items:flex-start; gap:48px; padding:28px 0 72px; }
.hero-text { flex:1 1 480px; min-width:0; display:flex; gap:28px; }
.hero-vert { writing-mode:vertical-rl; font-family:var(--font-jp); font-size:20px; letter-spacing:.35em; color:var(--ink2); padding-top:6px; font-size:16px; }
.hero-copy { min-width:0; }
.display { margin:0; font-family:var(--font-display); font-weight:500; font-size:clamp(36px, 4.4vw, 62px); line-height:1.02; letter-spacing:-.01em; max-width:11ch; }
.hero-lead { margin:20px 0 0; max-width:30em; font-size:16px; color:var(--ink2); }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.hero-price { margin:22px 0 0; font-size:13px; color:var(--ink2); }
.hero-media { flex:0 1 380px; min-width:0; margin:0 0 0 auto; }
.hero-frame { position:relative; width:100%; max-width:380px; margin:0 auto; aspect-ratio:4 / 5; background:var(--bg); border-radius:6px; overflow:hidden; }
.hero-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.hero-stub { position:absolute; inset:0; }
.hero-floor { position:absolute; left:0; right:0; bottom:0; height:46%; background:radial-gradient(ellipse 60% 70% at 50% 100%, rgba(227,169,76,.28), rgba(227,169,76,0)); }
.hero-glow { position:absolute; left:50%; top:52%; width:70%; aspect-ratio:1; transform:translate(-50%, -50%); background:radial-gradient(closest-side, rgba(227,169,76,.45), rgba(227,169,76,0)); }
.hero-lamps { position:absolute; left:0; right:0; bottom:12%; display:flex; align-items:flex-end; justify-content:center; gap:4%; }
.hero-toro { width:24%; height:auto; }
.hero-andon { width:27%; height:auto; }
.hero-side .l-body { stroke:none; }
.print { width:40%; animation:sirimePrint 2.8s steps(28, end) .3s both; }
.print .lamp { width:100%; height:auto; }
.hero-line { position:absolute; left:8%; right:8%; bottom:12%; height:1px; background:rgba(227,169,76,.35); }
@keyframes sirimePrint { from { clip-path:inset(100% 0 0 0); } to { clip-path:inset(0 0 0 0); } }

/* ---------- секции ---------- */
.section { padding:64px 0; border-top:1px solid var(--line); }
.h2 { margin:0; font-family:var(--font-display); font-weight:500; font-size:clamp(28px, 3vw, 40px); line-height:1.08; }
.h3 { margin:0; font-family:var(--font-display); font-weight:500; font-size:clamp(24px, 2.4vw, 30px); line-height:1.1; }
.h4 { margin:0; font-size:17px; font-weight:700; line-height:1.4; }
.section-head { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:24px 48px; }
.section-intro { max-width:640px; }
#catalog .section-intro { max-width:560px; }
.section-intro p { margin:10px 0 0; }

/* каталог */
.filters { display:flex; flex-wrap:wrap; gap:8px; }
.chip { min-height:44px; padding:0 18px; border-radius:999px; border:1.5px solid var(--line); background:transparent; color:var(--ink); font-size:15px; transition:background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color:var(--ink); }
.chip[aria-pressed="true"] { background:var(--ink); color:var(--bg); border-color:var(--ink); }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:40px 28px; margin-top:32px; }
.empty { grid-column:1 / -1; }
.card { display:flex; flex-direction:column; min-width:0; }
.card-art { position:relative; display:flex; align-items:flex-end; justify-content:center; height:270px; background:var(--surface); border-radius:4px; overflow:hidden; text-decoration:none; transition:background-color .6s; }
.kanji { position:absolute; top:14px; left:16px; font-family:var(--font-jp); font-size:44px; line-height:1; color:var(--kanji); }
.halo { position:absolute; inset:0; background:radial-gradient(circle at 50% 56%, rgba(227,169,76,.42), rgba(227,169,76,0) 58%); opacity:var(--glow); transition:opacity .8s; }
.card-lamp { position:relative; width:146px; height:200px; margin-bottom:22px; transition:transform .4s; }
.card-art:hover .card-lamp { transform:translateY(-4px); }
.card-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* настоящие фото вертикальные (2:3): карточка с фото повторяет их пропорции, чтобы лампа была видна целиком */
.card-art:has(.card-photo) { height:auto; aspect-ratio:2 / 3; }
.card-form { margin:14px 0 0; font-size:13px; color:var(--ink2); }
.card-head { display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
.card-title { margin:0; font-family:var(--font-display); font-weight:500; font-size:22px; line-height:1.15; }
.card-title a { text-decoration:none; }
.card-title a:hover { text-decoration:underline; text-underline-offset:4px; text-decoration-thickness:1px; }
.card-price { font-size:16px; font-weight:700; white-space:nowrap; }
.card-desc { margin:8px 0 0; font-size:15px; line-height:1.6; color:var(--ink2); }
.card-add { align-self:flex-start; margin-top:12px; }
.cart-status-inline { display:none; }

/* формы */
.forms-list { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:28px 32px; margin-top:28px; }
.form-item { display:flex; gap:20px; align-items:flex-start; }
.form-item p { margin:4px 0 0; font-size:14px; }

/* пластик */
.plastic { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.1fr); gap:40px 64px; align-items:center; }
.plastic-text { min-width:0; max-width:460px; }
.plastic-text > p { margin:12px 0 0; }
.compare { margin:0; padding:20px 32px 28px; background:var(--surface); border-radius:4px; transition:background-color .6s; }
.compare-svg { width:100%; max-width:420px; height:auto; display:block; margin:0 auto; overflow:visible; }
.cf { fill:var(--frame); }
.cp { fill:var(--panel); stroke:var(--rim); stroke-width:1.5; transition:fill .6s; }
.cr { fill:none; stroke:var(--rib); stroke-width:1; }
.cd { stroke:var(--ink2); stroke-width:1.5; stroke-dasharray:3 4; }
.cl { fill:var(--surface); stroke:var(--frame); stroke-width:3; }
.cs { fill:none; stroke:var(--rim); stroke-width:5.5; stroke-linecap:round; }
.ch { stroke:var(--frame); stroke-width:7; stroke-linecap:round; }
/* подписи по центру под фонарями: в рисунке 420 px они стоят на x = 100 и x = 290 */
.compare figcaption { display:grid; grid-template-columns:4fr 40fr 5fr 40fr 11fr; max-width:420px; margin:16px auto 0; font-size:14px; color:var(--ink2); text-align:center; }
.compare figcaption > span:first-child { grid-column:2; }
.compare figcaption > span:last-child { grid-column:4; }
.compare strong { display:block; color:var(--ink); }
.facts { margin:28px 0 0; }
.facts > div { display:grid; grid-template-columns:90px minmax(0, 1fr); gap:16px; padding:14px 0; border-top:1px solid var(--line); }
.facts > div:last-child { border-bottom:1px solid var(--line); }
.facts dt { font-weight:700; }
.facts dd { margin:0; color:var(--ink2); }

/* шаги */
.steps { list-style:none; padding:0; margin:28px 0 0; display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:28px 24px; }
.steps li { display:flex; flex-direction:column; gap:10px; }
.step-n { font-family:var(--font-display); font-size:30px; line-height:1; color:var(--accentInk); }
.steps .h4 { font-size:16px; }
.steps p { margin:0; font-size:14px; }

/* фото покупателей */
.photos { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:20px; margin-top:40px; }
.photos figure { margin:0; }
.photos img { display:block; width:100%; height:260px; object-fit:cover; border-radius:4px; }

/* вопросы */
.faq { margin-top:20px; border-bottom:1px solid var(--line); }
.faq details { border-top:1px solid var(--line); }
.faq summary { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:48px; padding:6px 0; cursor:pointer; font-weight:700; list-style:none; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:'+'; flex:none; font-weight:400; font-size:24px; line-height:1; color:var(--ink2); }
.faq details[open] summary::after { content:'−'; }
.faq p { margin:0 0 20px; max-width:46em; }

/* доставка */
.cols3 { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:28px; margin-top:24px; }
.cols3 p { margin:8px 0 0; }
.cta-box { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; margin-top:36px; padding:24px 32px; background:var(--surface); border-radius:4px; transition:background-color .6s; }
.cta-box > div { max-width:560px; }
.cta-title { margin:0; font-family:var(--font-display); font-size:23px; line-height:1.2; }
.cta-box .muted { margin:4px 0 0; }

/* ---------- подвал ---------- */
.site-footer { padding:0 0 32px; font-size:14px; color:var(--ink2); }
.foot-top { display:flex; flex-wrap:wrap; gap:32px 40px; padding-top:44px; border-top:1px solid var(--line); }
.foot-brand { flex:2 1 320px; display:flex; flex-direction:column; gap:12px; min-width:0; max-width:420px; }
.foot-brand > p { margin:0; }
.support-box { margin-top:8px; padding:16px; background:var(--surface); border-radius:4px; transition:background-color .6s; }
.support-title { margin:0; font-weight:700; color:var(--ink); }
.support-text { margin:4px 0 0; font-size:14px; }
.support-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.support-mail { display:inline-flex; align-items:center; min-height:44px; padding:0 4px; }
.foot-nav { flex:1 1 150px; }
.foot-h { margin:0; font-size:15px; font-weight:700; color:var(--ink); }
.foot-nav ul { list-style:none; padding:0; margin:14px 0 0; display:flex; flex-direction:column; gap:8px; }
.foot-nav a { text-decoration:none; }
.foot-nav a:hover { text-decoration:underline; text-underline-offset:3px; }
.subscribe { flex:1 1 200px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.subscribe p { margin:4px 0 0; font-size:14px; }
.subscribe label { font-size:14px; color:var(--ink); }
.subscribe input { min-height:44px; padding:0 14px; border-radius:4px; border:1.5px solid var(--line); background:var(--surface); color:var(--ink); font-size:15px; }
.form-msg { min-height:20px; }
.pay-badges { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin-top:48px; font-size:14px; }
.pay-badges > span:first-child { margin-right:6px; }
.badge { padding:4px 10px; border:1px solid var(--line); border-radius:4px; font-size:13px; font-weight:700; color:var(--ink); }
.foot-bottom { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px 32px; margin-top:32px; padding-top:20px; border-top:1px solid var(--line); font-size:13px; }
.pay-badges + .foot-bottom { margin-top:24px; }
.foot-legal { display:flex; flex-wrap:wrap; gap:8px 24px; }

.support-fab {
  position:fixed; right:20px; bottom:20px; z-index:20; display:inline-flex; align-items:center; gap:10px;
  min-height:44px; padding:0 18px 0 14px; border-radius:999px; background:var(--ink); color:var(--bg);
  font-weight:700; font-size:14px; text-decoration:none; box-shadow:0 10px 28px rgba(29,26,22,.28);
}
.support-fab:hover { color:var(--bg); background:var(--accentInk); }
:root[data-theme="night"] .support-fab:hover { color:var(--btnInk); }

/* ---------- виды (одна страница с клиентским роутингом) ---------- */
.view { display:none; }
body[data-view="home"] #view-home, body[data-view="product"] #view-product,
body[data-view="legal"] #view-legal, body[data-view="admin"] #view-admin, body[data-view="category"] #view-category { display:block; }
body[data-view="admin"] .site-footer, body[data-view="admin"] .support-fab { display:none; }

/* ---------- страница товара ---------- */
.crumbs { font-size:13px; color:var(--ink2); padding:4px 0 20px; }
.crumbs span[aria-hidden] { margin:0 8px; }
.pdp { display:flex; flex-wrap:wrap; gap:36px 48px; align-items:flex-start; }
.pdp-media { flex:1 1 480px; min-width:0; }
.viewer { position:relative; height:540px; background:var(--surface); border-radius:6px; overflow:hidden; display:flex; flex-direction:column; align-items:center; justify-content:center; transition:background-color .6s; }
.viewer-kanji { position:absolute; top:28px; left:32px; font-family:var(--font-jp); font-size:90px; line-height:1; color:var(--line); }
.viewer-halo { position:absolute; inset:0; background:radial-gradient(circle at 50% 46%, rgba(227,169,76,.5), rgba(227,169,76,0) 52%); opacity:var(--glow); transition:opacity .8s; }
.viewer-stage { position:relative; width:100%; display:flex; align-items:center; justify-content:center; }
.viewer-lamp { width:240px; height:330px; margin-bottom:44px; }
.viewer-canvas { position:relative; width:min(380px, 100%); height:430px; display:block; touch-action:pan-y; cursor:grab; margin-bottom:44px; }
.viewer-photo-only .viewer-kanji, .viewer-photo-only .viewer-halo { display:none; }
/* только фото: рамка повторяет пропорции снимка (2:3), без полей по бокам */
.viewer.viewer-photo-only { height:auto; aspect-ratio:2 / 3; width:min(100%, 440px, calc((100svh - 150px) * 2 / 3)); margin:0; background:transparent; }
/* колонка с фото по ширине фото, остальное место — описанию и кнопке заказа */
.pdp-media:has(.viewer-photo-only) { flex:0 1 auto; }
@media (max-width:860px) { .pdp-media:has(.viewer-photo-only) { flex-basis:100%; } .viewer.viewer-photo-only { margin:0 auto; } .viewer-photo-only ~ .thumbs { margin-left:auto; margin-right:auto; } }
.viewer-photo-only .viewer-photo { object-fit:cover; }
.viewer-photo-only ~ .thumbs { width:min(100%, 440px, calc((100svh - 150px) * 2 / 3)); }
.viewer-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.viewer-hint { position:absolute; top:28px; right:32px; margin:0; font-size:14px; color:var(--ink2); }
.seg { position:absolute; bottom:24px; left:50%; transform:translateX(-50%); display:flex; padding:4px; border-radius:999px; background:var(--bg); border:1px solid var(--line); transition:background-color .6s; }
.seg button { min-height:44px; padding:0 20px; border-radius:999px; border:0; background:transparent; color:var(--ink); font-size:15px; white-space:nowrap; }
.seg button[data-lit="0"][aria-pressed="true"] { background:var(--ink); color:var(--bg); }
.seg button[data-lit="1"][aria-pressed="true"] { background:var(--btn); color:var(--btnInk); }
.thumbs { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; margin-top:12px; }
.thumb { height:88px; padding:0; border-radius:4px; background:var(--surface); border:1.5px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:13px; color:var(--ink2); overflow:hidden; }
.thumb[aria-pressed="true"] { border:2px solid var(--ink); }
.thumb img { width:100%; height:100%; object-fit:cover; }
.pdp-info { flex:1 1 360px; min-width:0; max-width:460px; }
.pdp-kicker { margin:0; font-size:14px; color:var(--ink2); }
.pdp-kicker .jp { font-weight:500; color:inherit; }
.pdp-title { margin:8px 0 0; font-family:var(--font-display); font-weight:500; font-size:clamp(32px, 3.4vw, 46px); line-height:1.04; }
.pdp-price { margin:12px 0 0; font-size:24px; font-weight:700; line-height:1.2; }
.pdp-desc { margin:14px 0 0; }
.sizes { border:0; padding:0; margin:24px 0 0; min-width:0; }
.sizes legend { padding:0; font-weight:700; font-size:15px; }
.sizes-list { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:12px; }
.size-btn { display:flex; flex-direction:column; align-items:center; gap:2px; min-height:44px; padding:10px 6px; border-radius:12px; border:1px solid var(--line); background:transparent; color:var(--ink); font-size:14px; }
.size-btn strong { font-size:17px; }
.size-btn span { color:var(--muted); }
.size-btn[aria-pressed="true"] { border:2px solid var(--ink); padding:9px 5px; }
.shades { border:0; padding:0; margin:24px 0 0; min-width:0; }
.shades legend { padding:0; font-weight:700; font-size:15px; }
.shades-list { display:flex; gap:12px; margin-top:12px; }
.swatch { width:40px; height:40px; border-radius:50%; border:2px solid var(--line); box-shadow:inset 0 0 0 3px var(--bg); }
.swatch[aria-pressed="true"] { border-color:var(--ink); }
.buy-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.qty { display:inline-flex; align-items:center; border:1.5px solid var(--line); border-radius:999px; }
.qty button { width:44px; height:44px; border:0; border-radius:50%; background:transparent; color:var(--ink); font-size:20px; }
.qty output { min-width:28px; text-align:center; font-weight:700; }
.grow { flex:1 1 220px; }
.status { margin:12px 0 0; min-height:24px; font-size:15px; color:var(--ink2); }
.perks { list-style:none; padding:0; margin:4px 0 0; display:grid; grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:12px 20px; font-size:14px; color:var(--ink2); }
.perks strong { display:block; color:var(--ink); }
.ask { margin:16px 0 0; font-size:15px; }
.city-box { margin-top:16px; padding:18px; background:var(--surface); border-radius:4px; transition:background-color .6s; }
.city-box label { display:block; font-weight:700; font-size:15px; }
.city-box p { margin:12px 0 0; font-size:15px; }
.input, .city-box input, .field input, .field select, .field textarea {
  display:block; width:100%; min-height:48px; padding:0 16px; border-radius:4px;
  border:1.5px solid var(--line); background:var(--bg); color:var(--ink); font-size:16px;
}
.city-box input { margin-top:8px; }
.field textarea { padding:12px 16px; min-height:88px; resize:vertical; }
.specs { margin:28px 0 0; }
.specs > div { display:grid; grid-template-columns:130px minmax(0, 1fr); gap:16px; padding:10px 0; border-top:1px solid var(--line); }
.specs > div:last-child { border-bottom:1px solid var(--line); }
.specs dt { color:var(--ink2); }
.specs dd { margin:0; }
.pdp-about { display:flex; flex-wrap:wrap; gap:24px 56px; padding:64px 0 56px; }
.h2s { flex:0 1 360px; margin:0; font-family:var(--font-display); font-weight:500; font-size:clamp(26px, 2.6vw, 34px); line-height:1.1; }
.pdp-about > div { flex:1 1 480px; min-width:0; max-width:640px; }
.pdp-about p { margin:0; }
.pdp-about p + p { margin-top:16px; }
.related { padding:0 0 64px; }
.pdp + .related { padding-top:64px; }
.related-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:20px; margin-top:20px; }
.related-item { display:flex; align-items:center; gap:20px; padding:20px; background:var(--surface); border-radius:4px; text-decoration:none; transition:background-color .6s; }
.related-item img { width:72px; height:99px; object-fit:cover; border-radius:2px; flex:none; }
.related-item > span { display:flex; flex-direction:column; }
.related-form { font-size:14px; color:var(--ink2); }
.related-name { font-family:var(--font-display); font-size:20px; line-height:1.15; }
.related-price { margin-top:4px; font-weight:700; }
.not-found { padding:48px 0 96px; }

/* ---------- корзина ---------- */
.cart {
  position:fixed; inset:0 0 0 auto; margin:0; padding:0; border:0;
  width:min(460px, 100%); max-width:100%; height:100%; max-height:none;
  background:var(--bg); color:var(--ink); box-shadow:-20px 0 60px rgba(0,0,0,.25);
}
.cart[open] { display:flex; flex-direction:column; animation:cartIn .25s ease-out; }
.cart::backdrop { background:rgba(29,26,22,.5); }
@keyframes cartIn { from { transform:translateX(40px); opacity:0; } to { transform:none; opacity:1; } }
.cart-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 24px; border-bottom:1px solid var(--line); }
.cart-head h2 { margin:0; font-family:var(--font-display); font-weight:500; font-size:32px; line-height:1.1; }
.cart-body { flex:1; overflow:auto; padding:0 24px 32px; }
.cart-list { list-style:none; padding:0; margin:0; }
.cart-item { display:grid; grid-template-columns:56px minmax(0, 1fr); gap:6px 16px; align-items:center; padding:18px 0; border-bottom:1px solid var(--line); }
.cart-item .lamp-mini, .cart-item img { width:56px; height:77px; grid-row:span 2; object-fit:cover; border-radius:2px; }
.cart-info { display:flex; flex-direction:column; min-width:0; }
.cart-name { font-family:var(--font-display); font-size:22px; line-height:1.15; text-decoration:none; }
.cart-meta { font-size:14px; color:var(--ink2); }
.cart-ctrl { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.qty-sm button { width:40px; height:40px; font-size:18px; }
.cart-line-price { font-weight:700; white-space:nowrap; }
.cart-total { display:flex; align-items:baseline; justify-content:space-between; padding:20px 0 4px; font-size:18px; }
.cart-total strong { font-size:26px; }
.cart-note { margin:4px 0 20px; font-size:14px; color:var(--ink2); }
.promo { display:flex; gap:8px; margin-top:16px; }
.promo input { flex:1; min-width:0; min-height:42px; padding:0 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface, transparent); color:var(--ink); font:inherit; text-transform:uppercase; }
.promo .btn { min-height:42px; flex:none; }
.promo-msg { margin:8px 0 0; font-size:14px; color:var(--ink2); }
.promo-msg.bad { color:var(--bad); }
.cart-disc { display:flex; justify-content:space-between; padding-top:14px; font-size:15px; color:var(--ink2); }
.cart-empty, .cart-done { padding:32px 0; }
.cart-done h3 { margin:0 0 8px; font-family:var(--font-display); font-weight:500; font-size:28px; }
.checkout { margin-top:8px; padding-top:20px; border-top:1px solid var(--line); }
.field { display:flex; flex-direction:column; gap:6px; margin-top:16px; }
.field label { font-weight:700; font-size:15px; }
.field label span { font-weight:400; color:var(--ink2); }
.form-err { min-height:22px; margin:12px 0 8px; color:var(--bad); font-size:14px; }

/* ---------- юридические страницы ---------- */
.legal-page { max-width:760px; margin:0 auto; padding:24px 0 100px; }
.legal-page h1 { margin:0 0 6px; font-family:var(--font-display); font-weight:500; font-size:clamp(34px, 4vw, 48px); line-height:1.1; }
.legal-page .legal-updated { color:var(--ink2); font-size:14px; margin:0 0 30px; }
.legal-page h2 { margin:36px 0 12px; font-size:19px; }
.legal-page p, .legal-page li { font-size:16px; line-height:1.75; color:var(--ink2); }
.legal-page ul { padding-left:20px; }
.legal-page .requisites { display:grid; grid-template-columns:max-content 1fr; gap:8px 20px; margin:0; font-size:16px; line-height:1.6; }
.legal-page .requisites dt { color:var(--ink2); }
.legal-page .requisites dd { margin:0; }
@media (max-width:640px) { .legal-page .requisites { grid-template-columns:1fr; gap:2px; } .legal-page .requisites dd { margin-bottom:10px; } }
.legal-note { margin-top:40px; padding:16px 18px; border-radius:4px; font-size:14px; color:var(--ink2); background:var(--surface); }
.back { display:inline-flex; align-items:center; gap:8px; min-height:44px; margin:0 0 20px; color:var(--ink2); font-size:15px; text-decoration:none; }
.back:hover { color:var(--ink); }

/* ---------- анимации: уважаем настройки системы ---------- */
/* визуал шагов «От заказа до вашей полки» */
.steps li { position:relative; }
.step-art { display:block; width:100%; height:108px; margin-bottom:8px; background:var(--surface); border-radius:4px; transition:background-color .6s; overflow:visible; }
.sa-line { fill:none; stroke:var(--ink); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.sa-line-thin { fill:none; stroke:var(--ink2); stroke-width:2; stroke-linecap:round; }
.sa-ink { fill:var(--ink); }
.sa-surf { fill:var(--surface); stroke:var(--ink); stroke-width:2.5; stroke-linejoin:round; transition:fill .6s; }
.sa-paper { fill:var(--panel); stroke:var(--rim); stroke-width:2; transition:fill .6s, stroke .6s; }
.sa-amber { fill:#E3A94C; }
.sa-pin-dot { fill:var(--surface); }
.sa-check { fill:none; stroke:#2B2622; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.sa-check-inv { fill:none; stroke:var(--surface); stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.sa-dash { fill:none; stroke:var(--ink2); stroke-width:2; stroke-dasharray:3 5; stroke-linecap:round; }
.sa-layer { fill:none; stroke:var(--motif); stroke-width:2.6; stroke-linecap:round; }
.sa-hot { fill:none; stroke:#E3A94C; stroke-width:3; stroke-linecap:round; }
.sa-halo { fill:#E3A94C; opacity:.22; }
.sa-lit { fill:#F3D9A6; stroke:#E3A94C; stroke-width:2; }
.sa-litrib { fill:none; stroke:rgba(122,80,30,.28); stroke-width:1.2; }
@media (min-width: 1040px) { /* 5 колонок по 170px + 4 промежутка по 24px помещаются в одну строку с ~1030px */
  .steps li:not(:last-child)::after { content:""; position:absolute; top:54px; left:100%; width:24px; border-top:2px dashed var(--line); }
}
@media (max-width: 640px) {
  .step-art { height:100px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { transition:none !important; animation:none !important; }
}

/* ---------- планшет ---------- */
@media (max-width: 900px) {
  .hero { padding-bottom:56px; }
  .viewer { height:480px; }
  .viewer-canvas { height:380px; }
  .plastic { grid-template-columns:1fr; }
  .plastic-text { max-width:none; }
}

/* ---------- телефон (макет home-mobile, 390 px) ---------- */
@media (max-width: 640px) {
  .hide-sm { display:none !important; }
  .only-sm { display:inline; }
  body { font-size:16px; line-height:1.6; }

  .site-header { flex-wrap:nowrap; gap:8px; padding:14px 0; }
  .logo { flex:1 1 auto; }
  .logo-mark { width:32px; height:32px; }
  .logo-word { width:74px; height:24px; }
  .main-nav, .header-status { display:none; }
  .theme-btn, .cart-btn { position:relative; width:44px; height:44px; min-height:44px; padding:0; border-radius:50%; flex:none; }
  .theme-btn .ico { width:20px; height:20px; }
  .only-sm-ico { display:block; }
  .btn-label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .cart-btn .count { position:absolute; top:-4px; right:-4px; min-width:20px; height:20px; border-radius:10px; font-size:12px; padding:0 5px; }

  .hero { flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:0; padding:24px 0 56px; }
  .hero-text, .hero-copy { display:contents; }
  .hero-vert { display:none; }
  .hero-price { order:5; margin-top:16px; }
  .display { order:1; font-size:42px; line-height:1.02; max-width:none; }
  .hero-lead { order:2; margin-top:18px; font-size:16px; }
  .hero-media { order:3; flex:none; width:100%; margin:32px 0 0; }
  .hero-frame { max-width:none; }
  .hero-actions { order:4; flex-direction:column; gap:10px; margin-top:32px; }
  .hero-actions .btn { width:100%; font-size:16px; }

  .section { padding:48px 0; }
  .h2 { font-size:32px; line-height:1.08; }
  #catalog { padding:48px 0 40px; }
  #catalog .h2 { font-size:36px; line-height:1.05; }
  #catalog .section-intro p { display:none; }
  .section-head { display:block; }
  .filters { flex-wrap:nowrap; overflow-x:auto; margin:20px -16px 0; padding:0 16px 4px; scrollbar-width:none; }
  .filters::-webkit-scrollbar { display:none; }
  .chip { flex:none; padding:0 16px; }
  .grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:32px 14px; margin-top:28px; }
  .card-art { height:220px; }
  .kanji { top:10px; left:12px; font-size:34px; }
  .halo { background:radial-gradient(circle at 50% 56%, rgba(227,169,76,.45), rgba(227,169,76,0) 60%); }
  .card-lamp { width:118px; height:162px; margin-bottom:18px; }
  .card-form { margin-top:10px; font-size:13px; }
  .card-head { flex-direction:column; align-items:flex-start; gap:2px; }
  .card-title { font-size:21px; }
  .card-price { font-size:16px; }
  .card-desc { display:none; }
  .card-add { align-self:stretch; margin-top:10px; }
  .cart-status-inline { display:block; margin:16px 0 0; min-height:24px; font-size:14px; color:var(--ink2); }

  .forms-list { grid-template-columns:1fr; gap:24px; margin-top:24px; }
  .form-item { gap:16px; }
  .lamp-icon { width:48px; height:66px; }
  .form-item .h4 { font-size:17px; }
  .plastic { gap:28px; }
  .compare { padding:16px 16px 20px; }
  .facts { margin-top:20px; }
  .facts > div { grid-template-columns:1fr; gap:4px; }
  .steps { margin-top:28px; gap:28px; }
  .faq { margin-top:20px; }

  #delivery { padding:0; border-top:0; }
  .cta-box { flex-direction:column; align-items:stretch; margin:0; padding:28px 24px; gap:20px; }
  .cta-title { font-size:26px; }
  .cta-box .muted { font-size:15px; }
  .cta-box .btn { width:100%; }

  .site-footer { margin-top:48px; padding-bottom:120px; }
  .foot-top { flex-direction:column; gap:0; padding-top:40px; }
  .foot-brand { max-width:none; gap:8px; }
  .support-box { margin-top:20px; padding:18px; }
  .support-actions { flex-direction:column; gap:0; }
  .support-actions .btn { width:100%; min-height:48px; }
  .support-mail { justify-content:center; margin-top:10px; min-height:32px; font-size:14px; }
  .foot-nav { margin-top:28px; }
  .foot-nav ul { gap:0; margin-top:10px; }
  .foot-nav a { display:flex; align-items:center; min-height:44px; }
  .pay-badges { margin-top:20px; }
  .foot-bottom { flex-direction:column; gap:6px; margin-top:24px; padding-top:20px; }
  .foot-bottom > span:first-child { order:2; margin-top:6px; }
  .foot-legal { flex-direction:column; gap:6px; }
  .support-fab { right:16px; bottom:16px; }

  .crumbs { padding:4px 0 16px; }
  .pdp { gap:32px; }
  .pdp-media, .pdp-info { flex-basis:100%; }
  .viewer { height:440px; }
  .viewer-kanji { top:16px; left:18px; font-size:72px; }
  .viewer-hint { top:18px; right:18px; font-size:13px; }
  .viewer-lamp { width:210px; height:288px; margin-bottom:56px; }
  .viewer-canvas { height:340px; margin-bottom:60px; }
  .seg { bottom:16px; }
  .seg button { padding:0 16px; }
  .thumb { height:76px; }
  .pdp-price { font-size:26px; }
  .specs > div { grid-template-columns:130px minmax(0, 1fr); }
  .pdp-about { padding:64px 0 56px; }
  .pdp + .related { padding-top:56px; }
  .related { padding-bottom:56px; }
  .related-list { gap:16px; margin-top:24px; }

  .cart-head { padding:14px 16px; }
  .cart-body { padding:0 16px 32px; }
}

/* ---------- админка (из прежней вёрстки, перекрашена токенами) ---------- */
.admin-wrap { max-width:1240px; margin:0 auto; padding:24px clamp(16px, 4vw, 48px) 100px; }
.admin-wrap h1, .admin-wrap h2 { font-family:var(--font-display); font-weight:500; }
.admin-login { max-width:340px; margin:80px auto; text-align:center; }
.admin-login h2 { margin:0 0 20px; font-size:30px; }
.admin-login .field input { text-align:left; }
.admin-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:30px; border-bottom:1px solid var(--line); }
.admin-tabs button { padding:12px 4px; margin-right:26px; background:none; border:none; border-bottom:2px solid transparent; font-size:15px; color:var(--ink2); }
.admin-tabs button.active { color:var(--ink); border-color:var(--btn); }
.admin-metrics { display:grid; grid-template-columns:repeat(4, 1fr); gap:18px; margin-bottom:40px; }
.metric { background:var(--surface); border:1px solid var(--line); border-radius:4px; padding:18px 20px; }
.metric .num { font-family:var(--font-display); font-size:28px; }
.metric .lbl { font-size:13px; color:var(--ink2); margin-top:4px; }
.chart-row { display:grid; grid-template-columns:1.5fr 1fr; gap:20px; margin-bottom:46px; }
.chart-card { background:var(--surface); border:1px solid var(--line); border-radius:4px; padding:22px; }
.chart-card h3 { font-size:15px; font-weight:500; margin:0 0 16px; color:var(--ink2); }
.chart-card canvas { max-height:230px; }
.admin-table { width:100%; border-collapse:collapse; margin-bottom:50px; font-size:14px; }
.admin-table th, .admin-table td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.admin-table th { color:var(--ink2); font-weight:500; font-size:13px; }
.admin-table td.num, .admin-table th.num { text-align:right; }
.table-scroll { overflow-x:auto; }
.admin-products { display:flex; flex-direction:column; gap:14px; }
.admin-product { background:var(--surface); border:1px solid var(--line); border-radius:4px; padding:20px; }
.admin-product summary { cursor:pointer; font-family:var(--font-display); font-size:20px; display:flex; justify-content:space-between; align-items:center; list-style:none; gap:14px; }
.admin-product summary::-webkit-details-marker { display:none; }
.admin-product summary .meta { font-family:var(--font-text); font-size:13px; color:var(--ink2); flex:1; text-align:right; }
.admin-form { margin-top:18px; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; }
.admin-form .full { grid-column:1 / -1; }
.admin-form .field label, .sale-form .field label { font-size:13px; font-weight:500; color:var(--ink2); }
.admin-form .field input, .admin-form .field select, .sale-form .field input, .sale-form .field select { min-height:42px; font-size:14px; background:var(--surface); }
.admin-form .field textarea { font-size:14px; background:var(--surface); }
.photo-edit { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.photo-edit input[type=file] { width:auto; min-height:0; padding:6px 0; border:0; background:none; }
.photo-preview { width:72px; height:72px; object-fit:cover; border-radius:2px; border:1px solid var(--line); }
.gallery-edit { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:8px; }
.gallery-edit figure { margin:0; display:flex; flex-direction:column; align-items:center; gap:4px; }
.photo-hint { font-size:12px; color:var(--ink2); margin:6px 0 0; }
.photo-hint.warn { color:var(--bad); }
.row-actions { display:flex; gap:10px; grid-column:1 / -1; margin-top:10px; }
.abtn { padding:10px 18px; border-radius:999px; font-size:14px; border:1.5px solid var(--ink); background:none; color:var(--ink); }
.abtn:hover { background:var(--ink); color:var(--bg); }
.abtn.danger { border-color:var(--bad); color:var(--bad); }
.abtn.danger:hover, .abtn.danger.confirming { background:var(--bad); color:#fff; }
.abtn.primary { background:var(--ink); color:var(--bg); }
.abtn.small { padding:6px 12px; font-size:12.5px; }
.sale-form { display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; background:var(--surface); border:1px solid var(--line); border-radius:4px; padding:20px; margin-bottom:30px; align-items:end; }
.order-items { margin:0; padding-left:18px; }
@media (max-width: 860px) {
  .admin-metrics { grid-template-columns:repeat(2, 1fr); }
  .admin-form, .chart-row { grid-template-columns:1fr; }
  .sale-form { grid-template-columns:1fr 1fr; }
}

/* ---------- страницы категорий ---------- */
.cat-head { position:relative; padding:8px 0 8px; max-width:720px; }
.cat-jp { display:block; font-family:var(--font-jp, var(--font-display)); font-size:15px; letter-spacing:.2em; color:var(--ink2); margin-bottom:10px; }
.cat-title { margin:0; font-family:var(--font-display); font-weight:500; font-size:clamp(34px, 4vw, 56px); line-height:1.04; }
.cat-lead { margin:18px 0 0; font-size:17px; color:var(--ink2); max-width:36em; }
.cat-catalog { padding:8px 0 48px; }
.cat-text p { margin:14px 0 0; max-width:46em; line-height:1.65; }
.cat-links { display:flex; flex-wrap:wrap; gap:10px; list-style:none; margin:20px 0 0; padding:0; }
.cat-links .chip { text-decoration:none; display:inline-flex; align-items:center; }
.form-item h3 a { color:inherit; text-decoration-thickness:1px; text-underline-offset:3px; }

/* ---------- шапка закреплена при прокрутке ---------- */
.header-bar { position:sticky; top:0; z-index:30; background:var(--bg); transition:background-color .6s, box-shadow .2s; }
.header-bar.scrolled { box-shadow:0 1px 0 var(--line); }
html { scroll-padding-top:84px; }
.menu-btn, .nav-sm { display:none; }
/* телефон: меню прячется за кнопкой-бургером */
@media (max-width: 640px) {
  html { scroll-padding-top:76px; }
  .menu-btn { display:inline-flex; width:44px; height:44px; }
  .site-header.nav-open .main-nav {
    display:flex; flex-direction:column; flex-wrap:nowrap; gap:0; position:absolute; left:-16px; right:-16px; top:100%; z-index:31;
    padding:4px 16px 16px; background:var(--bg); border-bottom:1px solid var(--line); box-shadow:0 16px 24px rgba(29,26,22,.12); font-size:17px;
  }
  .site-header.nav-open .main-nav a { display:block; padding:12px 0; border-bottom:1px solid var(--line); color:var(--ink); }
  .site-header.nav-open .main-nav a:last-child { border-bottom:0; }
}

/* согласие на рассылку: галочка в заказе и подпись под подпиской */
.checkout .check { display:flex; gap:10px; align-items:flex-start; margin:4px 0 14px; font-size:14px; line-height:1.4; color:var(--ink2); cursor:pointer; }
.checkout .check input { flex:none; width:18px; height:18px; margin:1px 0 0; accent-color:var(--ink); }
.subscribe .sub-note { margin:8px 0 0; font-size:12px; line-height:1.4; color:var(--ink2); }
