/* Oku Tana: манга. Тушь на бумаге, кадры с чёрной рамкой, скринтон-точки вместо серого, один красный акцент.
   Цвет на странице дают принты и фото курток. Служебные страницы спокойные: манга там только в рамках, кнопках и заголовках. */
:root {
  --bg: #f7f5ef;          /* бумага */
  --paper: #ffffff;       /* кадры */
  --ink: #0c0c0d;         /* тушь: текст, рамки, кнопки */
  --muted: #55524b;       /* второстепенный текст: 7:1 на бумаге */
  --kana: #5d5a54;        /* японские подписи */
  --line: #0c0c0d;
  --hair: rgba(12, 12, 13, .2);   /* тонкие разделители внутри кадра */
  --soft: #eceae3;        /* нейтральная подложка там, где точки мешают (наведение, мелкие превью) */
  --accent: #e3122a;      /* единственный акцент: тень главной кнопки, подчёркивания, знак */
  --accent-d: #c40f24;    /* красный под белый текст: 6:1 */
  --pink: var(--accent);      /* старые имена: ими пользуются админка и конструктор */
  --pink-d: var(--accent-d);
  --yellow: #ffd23f;      /* статусы заказов и админка, на витрине не используется */
  --sky: #bfe3f5;
  --mint: #bfe8d3;
  --red: #c40f24;         /* ошибки */
  --ok: #157347;
  --warn: #8a5a00;
  --r: 0px;
  --r-sm: 0px;
  --bw: 2.5px;            /* рамка кадра */
  --gut: 12px;            /* гуттер между кадрами */
  --shadow: none;
  --shadow-sm: none;
  --pop: 4px 4px 0 var(--accent);   /* жёсткая тень главной кнопки */
  /* скринтон: точки в шахматном порядке, светлый и тёмный. Пишется так: background: var(--tone-l), var(--paper) */
  --dot-l: radial-gradient(circle, rgba(12, 12, 13, .5) 0 1.1px, transparent 1.5px);
  --dot-d: radial-gradient(circle, var(--ink) 0 1.5px, transparent 1.9px);
  --tone-l: var(--dot-l) 0 0 / 8px 8px, var(--dot-l) 4px 4px / 8px 8px;
  --tone-d: var(--dot-d) 0 0 / 6px 6px, var(--dot-d) 3px 3px / 6px 6px;
  --head: 'Dela Gothic One', 'Noto Sans JP', system-ui, sans-serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --jp: 'Noto Sans JP', 'Manrope', system-ui, sans-serif;
  --text: var(--ink);
  --card: var(--paper);
  --card2: var(--soft);
  --line2: var(--ink);
  --danger: var(--red);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 16px/26px var(--ui); display: flex; flex-direction: column; background: var(--bg); overflow-x: clip; }
main { flex: 1; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--accent); }
a:hover { text-decoration-color: var(--ink); }
img { max-width: 100%; display: block; }
h1, h2 { font-family: var(--head); font-weight: 400; margin: 0 0 .5em; letter-spacing: 0; }
h1 { font-size: clamp(28px, 4vw, 52px); line-height: 1.1; }
h2 { font-size: clamp(24px, 2.8vw, 36px); line-height: 1.14; }
h3 { font: 800 19px/26px var(--ui); margin: 0 0 .5em; }
h4 { font: 800 15px/22px var(--ui); margin: 0 0 .5em; }
small, .small { font-size: 13px; line-height: 20px; }
.muted { color: var(--muted); }
.wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section.tight { padding-top: 8px; }
[id] { scroll-margin-top: 84px; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* японские подписи: мелко, одним стилем */
.kana, .jp, .eyebrow, .section-head .jp { font: 500 12px/18px var(--jp); letter-spacing: .18em; color: var(--kana); }
.eyebrow { display: block; text-transform: uppercase; margin-bottom: 10px; }
.section-head .jp { display: block; margin-bottom: 6px; }
.hl { background: linear-gradient(transparent 80%, var(--accent) 80%, var(--accent) 94%, transparent 94%); }
.hl-pink { background: var(--accent-d); color: #fff; padding: 0 .18em; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 14px; border-bottom: var(--bw) solid var(--ink); }
.section-head h2 { margin: 0; }
.section-head .muted { margin-top: 6px; }

/* ---------- манга: общие детали ---------- */
/* ярлык раздела «Глава 01»: чёрная плашка с наклоном */
.chapter { display: inline-block; font: 400 13px/16px var(--head); letter-spacing: .04em; color: #fff; background: var(--ink); padding: 6px 12px 5px; margin: 0 0 14px; transform: rotate(-4deg); transform-origin: 0 100%; white-space: nowrap; }
.chapter [lang=ja] { font: 700 11px/16px var(--jp); letter-spacing: .12em; margin-left: 8px; opacity: .85; }
.pg { font: 700 12px/18px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
/* вертикальная японская подпись по краю кадра */
.vjp { position: absolute; right: 8px; top: 12px; writing-mode: vertical-rl; font: 500 11px/14px var(--jp); letter-spacing: .32em; color: var(--ink); background: var(--paper); padding: 8px 3px; border: 1.5px solid var(--ink); pointer-events: none; user-select: none; z-index: 2; }
/* звукоподражание катаканой: графика на фоне кадра */
.sfx { position: absolute; font: 400 clamp(64px, 9vw, 132px)/.9 var(--head); color: var(--paper); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; letter-spacing: -.04em; transform: rotate(-9deg); white-space: nowrap; pointer-events: none; user-select: none; z-index: 2; }
/* облачко реплики с хвостиком вниз-влево */
.bubble { position: relative; display: inline-block; max-width: 260px; margin: 0 0 18px; padding: 12px 18px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 22px; font: 700 15px/21px var(--ui); color: var(--ink); }
.bubble::before, .bubble::after { content: ''; position: absolute; width: 0; height: 0; border-style: solid; border-color: transparent; }
.bubble::before { left: 28px; bottom: -18px; border-width: 18px 16px 0 0; border-top-color: var(--ink); }
.bubble::after { left: 30.5px; bottom: -11.4px; border-width: 13.9px 12.4px 0 0; border-top-color: var(--paper); }
/* «взрывное» облачко: цена и остаток тиража. Не больше двух на экран */
.burst { position: relative; display: inline-grid; place-items: center; min-width: 150px; padding: 30px 34px; background: var(--ink); color: #fff; text-align: center; font: 800 15px/20px var(--ui); transform: rotate(-6deg); isolation: isolate;
  clip-path: polygon(49.4% 3%, 58.4% 14.7%, 70.8% 7%, 72.8% 19.5%, 86.6% 18.9%, 82.3% 33.2%, 98.1% 38.8%, 86.9% 49%, 98.5% 61.5%, 83.8% 66.5%, 85.5% 80.3%, 72.4% 79.6%, 71.4% 91.7%, 59.2% 88.2%, 51.1% 98.5%, 41.3% 86.5%, 29.6% 92%, 27.9% 79.5%, 12.1% 79.4%, 15.7% 67.1%, 3.7% 60.7%, 11.2% 49.2%, 2.5% 40.1%, 14.4% 32.8%, 13.3% 19.8%, 28.2% 20.7%, 28.4% 5.8%, 40.7% 13.2%); }
.burst::before { content: ''; position: absolute; inset: 5px; z-index: -1; background: var(--accent-d); clip-path: inherit; }
.burst b { display: block; font: 800 24px/28px var(--ui); white-space: nowrap; }
.burst.white { color: var(--ink); }
.burst.white::before { background: var(--paper); }

/* ---------- полоса над шапкой: одна фраза, без движения ---------- */
.ticker { background: var(--ink); color: #fff; text-align: center; font: 800 12px/32px var(--ui); letter-spacing: .1em; text-transform: uppercase; height: 32px; overflow: hidden; white-space: nowrap; padding: 0 12px; }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 3px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; min-height: 44px; }
.logo svg { flex: none; }
.logo span { display: flex; flex-direction: column; }
.logo b { font: 400 21px/24px var(--head); letter-spacing: .06em; }
.logo small { font: 500 9px/12px var(--jp); letter-spacing: .62em; color: var(--kana); margin-top: 1px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); padding: 8px 12px; font-weight: 800; font-size: 13px; line-height: 24px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; transition: background-color .12s, color .12s; }
.nav a:hover { box-shadow: inset 0 -3px 0 var(--accent); }
.nav a.active { background: var(--ink); color: #fff; box-shadow: none; }
.head-icons { display: flex; align-items: center; gap: 4px; }
.ic-link, .burger { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); background: none; border: 0; border-radius: 0; cursor: pointer; padding: 0; text-decoration: none; }
.ic-link:hover, .burger:hover { background: var(--ink); color: #fff; }
.ic-link.active { box-shadow: inset 0 -3px 0 var(--accent); }
.ic-link.active svg { stroke-width: 2.4; }
.ic-link svg, .burger svg { width: 24px; height: 24px; }
.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 0; background: var(--accent-d); color: #fff; font: 800 11px/18px var(--ui); text-align: center; }
.burger { display: none; }
.site-header.minimal .wrap { justify-content: space-between; }
.site-header .secure { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.site-header .secure svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 860px) {
  .site-header .wrap { height: 56px; gap: 8px; }
  .head-icons { margin-left: auto; gap: 0; }
  .burger { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 4px 16px 12px; background: var(--paper); border-bottom: 3px solid var(--ink); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; min-height: 44px; border-bottom: 1px solid var(--hair); font-size: 15px; }
  .nav a:hover { box-shadow: none; }
  .nav a:last-child { border-bottom: 0; }
  .nav a.active { background: none; color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); padding-left: 12px; }
  .logo b { font-size: 19px; }
}

/* ---------- кнопки, поля ---------- */
/* главная кнопка: чёрная плашка, жёсткая красная тень, при нажатии вдавливается на величину тени */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 0; border: var(--bw) solid var(--ink);
  cursor: pointer; font: 800 15px/20px var(--ui); color: #fff; background: var(--ink); text-decoration: none; text-align: center; transition: background-color .14s, color .14s, transform .14s, box-shadow .14s; }
.btn:hover { background: #2b2b2e; }
.btn:active { transform: translate(2px, 2px); }
.btn[disabled], .btn.disabled { background: #d8d5cc; border-color: #d8d5cc; color: #55524b; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.disabled { pointer-events: none; }
.btn-ghost, .btn-yellow, .btn-sky, .btn-cyan { background: var(--paper); color: var(--ink); }
.btn-ghost:hover, .btn-yellow:hover, .btn-sky:hover, .btn-cyan:hover { background: var(--ink); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger { background: var(--paper); color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13px; border-width: 2px; }
.btn-lg { min-height: 54px; padding: 12px 26px; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.btn-main { box-shadow: var(--pop); }   /* одна главная кнопка на экран */
.btn-main:hover { background: var(--ink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--accent); }
.btn-main:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--accent); }
.btn-main[disabled], .btn-main.disabled { box-shadow: none; transform: none; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.link-btn:hover { text-decoration-color: var(--ink); }

input, select, textarea { width: 100%; min-height: 46px; padding: 10px 13px; border-radius: 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 16px/24px var(--ui); outline: none; }
textarea { min-height: 0; }
input::placeholder, textarea::placeholder { color: #6f6b62; }
input:focus, select:focus, textarea:focus { box-shadow: 3px 3px 0 var(--accent); }
input[type=range] { min-height: 0; padding: 0; accent-color: var(--ink); background: none; border: 0; box-shadow: none; }
input[type=range]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
input[type=color] { padding: 2px; height: 40px; min-height: 40px; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; flex: none; accent-color: var(--ink); box-shadow: none; padding: 0; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 13px; line-height: 20px; color: var(--ink); margin: 0 0 6px; font-weight: 800; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.card { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 0; }
.pad { padding: 24px; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-width: 48px; min-height: 40px; padding: 8px 16px; border-radius: 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 700 14px/20px var(--ui); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.seg button:hover { box-shadow: 2px 2px 0 var(--ink); transform: translate(-1px, -1px); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; transform: none; }
.seg button.off, .seg button[disabled] { color: var(--muted); border-style: dashed; border-color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; }
.seg button.off { text-decoration: line-through; }
.seg.need button:not(.on) { border-color: var(--red); }
.seg .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-left: 6px; vertical-align: middle; }
.seg button.on .dot { background: #fff; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }

/* ---------- бейджи: только факты. Ярлык с наклоном, красный только у тиража, дропа и скидки ---------- */
.tags { position: absolute; left: 10px; top: 12px; display: flex; flex-wrap: wrap; gap: 8px; z-index: 2; }
.tag, .viz-tag { display: inline-block; padding: 4px 8px; border-radius: 0; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font: 800 11px/14px var(--ui); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tags .tag { transform: rotate(-4deg); }
.tag.limited, .tag.drop, .tag.sale { background: var(--accent-d); color: #fff; }
.tag.off { color: var(--red); border-color: var(--red); }
.tag.soldout { background: var(--ink); color: #fff; }
.viz-tag { position: absolute; left: 10px; bottom: 10px; z-index: 2; pointer-events: none; text-decoration: none; border-width: 1.5px; font-weight: 700; font-size: 10px; padding: 3px 7px; }
a.viz-tag { pointer-events: auto; }
a.viz-tag:hover { text-decoration: underline; }
.sticker { display: inline-block; font: 800 12px/16px var(--ui); letter-spacing: .06em; text-transform: uppercase; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 0; padding: 6px 12px; box-shadow: var(--pop); transform: rotate(-4deg); }
.price { font: 800 17px/24px var(--ui); color: var(--ink); white-space: nowrap; }
.price .old { color: var(--muted); text-decoration: line-through; font-weight: 600; font-size: .7em; margin-left: 6px; }
.price.sale .now { color: var(--red); }

/* ---------- каталог: карточка это кадр с подписью ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 14px; }
.grid-cards.g4 { grid-template-columns: repeat(4, 1fr); }
.grid-cards > .empty, .grid-cards > .spinner { grid-column: 1 / -1; }
.dcard { position: relative; isolation: isolate; display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; background: var(--paper); border: var(--bw) solid var(--ink); transition: transform .15s; }
/* тень-скринтон: появляется при наведении, кадр сдвигается ей навстречу */
.dcard::after { content: ''; position: absolute; inset: calc(var(--bw) * -1); z-index: -1; background: var(--tone-d); opacity: 0; transition: opacity .15s, transform .15s; pointer-events: none; }
.dcard .ph { position: relative; aspect-ratio: 4 / 5; background: var(--tone-l), var(--paper); border-radius: 0; overflow: hidden; }
.dcard .ph > a { position: absolute; inset: 0; display: block; }
.dcard .ph .tags { right: 54px; pointer-events: none; }  /* не залезать под сердечко */
.dcard .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .18s; }
.dcard .ph img.back { opacity: 0; }
@media (hover: hover) {
  .dcard:hover { transform: translate(-3px, -3px); z-index: 1; }
  .dcard:hover::after { opacity: 1; transform: translate(9px, 9px); }
  .dcard:hover .ph img.back { opacity: 1; }
  .dcard:hover .ph img.main { opacity: 0; }  /* превью без фона: иначе второе фото ложится поверх первого */
  .dcard:hover .ph img.main ~ .viz-tag { opacity: 0; }  /* подпись относится к визуализации, а не к кадру при наведении */
  .dcard:hover .title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--accent); }
}
.fav { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; padding: 0; }
.fav svg { width: 22px; height: 22px; }
.fav.on svg { fill: var(--accent); stroke: var(--accent); }
.dcard .fav { position: absolute; right: 0; top: 0; z-index: 3; background: var(--paper); border-left: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); }
.dcard .fav:hover { background: var(--ink); color: #fff; }
.dcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; color: inherit; text-decoration: none; background: var(--paper); border-top: var(--bw) solid var(--ink); }
.dcard .title { font: 800 16px/22px var(--ui); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.dcard .desc { color: var(--muted); font-size: 13px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.dcard .price { font-size: 20px; line-height: 26px; font-weight: 800; }
.dcard.sold .ph img { filter: grayscale(1); }
.card.dcard { overflow: visible; }
.card.dcard .ph { border-radius: 0; }
.card.dcard .body { padding: 10px 12px 12px; }
@media (max-width: 860px) {
  .grid-cards, .grid-cards.g4 { grid-template-columns: repeat(2, 1fr); gap: 12px 10px; }
  .dcard .desc { display: none; }
  .dcard .body { padding: 8px 10px 10px; }
  .dcard .title { font-size: 13px; line-height: 18px; }
  .dcard .price { font-size: 17px; line-height: 24px; }
  .dcard .ph .tags { left: 6px; top: 8px; right: 46px; gap: 6px; }
  .dcard .tag { font-size: 10px; padding: 2px 5px; }
  .dcard .viz-tag { left: 6px; bottom: 6px; }
}

/* ---------- модалки, тосты, таблицы ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(12, 12, 13, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: var(--paper); border: 3px solid var(--ink); border-radius: 0; padding: 28px 24px 24px; position: relative; box-shadow: 8px 8px 0 var(--ink); }
.modal.wide { width: min(900px, 100%); }
.modal:focus { outline: none; }
.modal h3 { padding-right: 36px; }
.modal .x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border-radius: 0; border: 0; background: transparent; color: var(--ink); font-size: 26px; cursor: pointer; line-height: 1; }
.modal .x:hover { background: var(--ink); color: #fff; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: var(--paper); border: 2px solid var(--ink); color: var(--ink); min-height: 40px; padding: 8px 16px; border-radius: 0; font: 700 14px/20px var(--ui); cursor: pointer; }
.tabs button:hover { box-shadow: 2px 2px 0 var(--ink); }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.msg { min-height: 20px; font-size: 13px; line-height: 20px; margin-top: 8px; font-weight: 700; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--ok); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; border: 2px solid var(--paper); border-radius: 0; padding: 12px 16px; font-weight: 700; font-size: 14px; line-height: 20px; }
.toast.ok { box-shadow: inset 5px 0 0 #5fd39a; }
.toast.err { background: var(--red); }
body.has-buybar .toasts { bottom: 84px; }
body.studio-page .toasts { top: 80px; bottom: auto; }  /* в конструкторе внизу кнопки «Сохранить» и «В 3D» */

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.tbl th { font-weight: 800; font-size: 12px; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; border-bottom: var(--bw) solid var(--ink); }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--soft); }
.status { display: inline-block; padding: 2px 9px; border-radius: 0; font-size: 12px; line-height: 18px; font-weight: 800; border: 1.5px solid var(--ink); background: var(--paper); white-space: nowrap; }
.status.awaiting_payment { background: #ffe9a6; }
.status.paid { background: var(--mint); }
.status.cutting, .status.printing, .status.sewing, .status.qc { background: var(--sky); }
.status.shipped { background: #d9cffa; }
.status.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.status.cancelled, .status.overdue { background: var(--red); border-color: var(--red); color: #fff; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--hair); border-top-color: var(--ink); animation: spin .8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
/* служебные пометки: покупатель их не видит, только локальный тест (payment_mode = stub) и админка */
.test-note { display: none; background: #fff6d6; border: 1.5px dashed var(--ink); border-radius: 0; padding: 8px 12px; font-size: 13px; line-height: 20px; font-weight: 600; }
html.stub .test-note, .adm .test-note { display: block; }

/* ---------- подвал ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--ink); color: #e8e5dc; padding: 48px 0 28px; font-size: 14px; line-height: 22px; margin-top: 56px; }
.site-footer .wrap { position: relative; z-index: 1; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .cols > div:first-child { max-width: 380px; }
.site-footer b { color: #fff; display: block; margin-bottom: 12px; font: 800 12px/18px var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.site-footer b.brand { font: 400 20px/26px var(--head); letter-spacing: .06em; text-transform: none; }
.site-footer b.brand span { font: 500 12px/18px var(--ui); letter-spacing: 0; color: #a8a498; margin-left: 8px; }
.site-footer a { display: block; color: #e8e5dc; text-decoration: none; padding: 4px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.site-footer .muted { color: #a8a498; }
.site-footer .socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.site-footer .socials:empty { display: none; }
.site-footer .socials a { display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 4px 14px; border: 2px solid #e8e5dc; border-radius: 0; font-weight: 800; font-size: 13px; }
.site-footer .socials a:hover { background: #fff; color: var(--ink); text-decoration: none; }
.site-footer .legal { border-top: 2px solid #3a3a3d; margin-top: 32px; padding-top: 16px; font-size: 12px; line-height: 18px; color: #a8a498; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer .legal a { display: inline; padding: 0; color: #a8a498; }
.site-footer .foot-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 13px; line-height: 20px; }
.site-footer .foot-links a { color: #c9c5ba; }
.site-footer .foot-links + .legal { margin-top: 12px; }
/* катакана на фоне подвала: контур, как фоновая графика кадра */
.foot-kana { position: absolute; right: -12px; top: -.4em; z-index: 0; font: 400 clamp(90px, 15vw, 200px)/1 var(--head); color: transparent; -webkit-text-stroke: 1.5px #2f2f33; letter-spacing: -.02em; white-space: nowrap; pointer-events: none; user-select: none; }
@media (max-width: 760px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .site-footer .cols > div:first-child { grid-column: 1 / -1; }
  .site-footer a { padding: 11px 0; }
  .site-footer .legal a { display: inline-block; padding: 8px 0; }
}

/* ---------- cookie ---------- */
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 150; max-width: 400px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 0; padding: 14px 16px; font-size: 13px; line-height: 20px; box-shadow: 5px 5px 0 var(--ink); }
.cookie .row { margin-top: 10px; }
.cookie .short { display: none; }
@media (max-width: 760px) {
  /* на телефоне: одна полоса у нижнего края, товар не закрывает */
  .cookie { left: 0; right: 0; bottom: 0; max-width: none; border-width: 3px 0 0; box-shadow: none; padding: 6px 8px 6px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .cookie .long { display: none; }
  .cookie .short { display: block; flex: 1; min-width: 150px; }
  .cookie .row { margin: 0; flex: none; gap: 6px; }
  .cookie .btn-sm { min-height: 44px; }
  body.has-buybar .cookie { bottom: 68px; }
}
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 22px; margin: 0 0 10px; cursor: pointer; }
label.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; }
label.check.req span::after { content: ' *'; color: var(--red); }
@media (max-width: 600px) { .row.stack { flex-direction: column; gap: 0; align-items: stretch !important; } }
/* iOS приближает страницу, если шрифт поля меньше 16px */
@media (max-width: 860px) { input, select, textarea { font-size: 16px !important; } }
.note { background: var(--paper); border: 2px solid var(--ink); border-left-width: 8px; border-radius: 0; padding: 12px 16px; margin: 0 0 20px; font-size: 15px; line-height: 22px; }

/* ---------- главная ---------- */
/* первый экран: разворот из двух кадров с косым гуттером, за кадрами линии скорости */
.hero { position: relative; padding: 26px 0 30px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg at 72% 46%, var(--ink) 0 .4deg, transparent .4deg 4.6deg), repeating-conic-gradient(from 2.1deg at 72% 46%, var(--ink) 0 .18deg, transparent .18deg 2.9deg);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 72% 46%, transparent 0 22%, #000 80%); mask-image: radial-gradient(ellipse 70% 90% at 72% 46%, transparent 0 22%, #000 80%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: stretch; }
.hero-text, .hero-pic { --cut: 64px; position: relative; background: var(--ink); }
.hero-text { padding: 3px; clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.hero-text > .in { height: 100%; padding: 40px calc(var(--cut) + 30px) 40px 40px; background: var(--paper); clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.hero-pic { min-height: 560px; margin-left: calc(var(--gut) - var(--cut)); clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%); }
.hero-pic > .in { position: absolute; inset: 3px; overflow: hidden; background: var(--tone-l), var(--paper); clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%); }
.hero-pic picture { display: block; width: 100%; height: 100%; }
.hero-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-pic img.render { object-fit: contain; padding: 4% 0 4% 8%; }  /* запасной кадр: снимок 3D-куртки без фона, за ним скринтон */
.hero-pic .sfx { right: 10px; bottom: 26px; }
.hero-pic .vjp { right: 12px; top: 14px; }
.hero-pic .viz-tag { left: 14px; bottom: 12px; }
.hero h1 { font-size: clamp(28px, 3.5vw, 48px); margin-bottom: 16px; }
.hero p.lead { font-size: 17px; line-height: 27px; max-width: 31em; margin: 0; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 24px 0 20px; padding-right: 5px; }
/* цена: «взрывное» облачко поверх стыка двух кадров */
.hero-burst { position: absolute; z-index: 3; top: -18px; left: calc(24px + (100% - 48px) * .55); margin-left: -96px; }
.hero .facts { margin: 0; font-size: 14px; line-height: 22px; color: var(--muted); max-width: 34em; }
.hero .facts b { color: var(--ink); font-weight: 800; }
@media (max-width: 1100px) {
  .hero-text > .in { padding: 36px calc(var(--cut) + 16px) 32px 28px; }
}
/* как это работает: кадры по порядку */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gut); counter-reset: step; }
.step { position: relative; background: var(--paper); border: var(--bw) solid var(--ink); padding: 16px 16px 18px; }
.card.step { border-radius: 0; }
.step .n { font: 400 40px/40px var(--head); color: var(--ink); margin-bottom: 12px; }
.step .n::after { content: ''; display: block; width: 34px; height: 5px; margin-top: 8px; background: var(--accent); }
.step h3 { font-size: 18px; line-height: 24px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 14px; line-height: 22px; color: var(--muted); }
/* чётные кадры залиты тушью: чередование, как на странице манги */
.steps .step:nth-child(even) { background: var(--ink); color: #fff; }
.steps .step:nth-child(even) .n { color: #fff; }
.steps .step:nth-child(even) p { color: #d8d5cc; }
.steps .step:nth-child(even) a { color: #fff; }
.steps .step:nth-child(even) a:hover { text-decoration-color: #fff; }
/* конструктор: кадр с Рэном и облачком, рядом что можно сделать и цены */
.builder { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--gut); align-items: stretch; }
.ren-koma { position: relative; margin: 0; min-height: 460px; overflow: hidden; background: var(--paper); border: var(--bw) solid var(--ink); }
/* скринтон только по углам кадра: под самим рисунком точки легли бы на лицо */
.ren-koma::before { content: ''; position: absolute; inset: 0; background: var(--tone-d); clip-path: polygon(0 0, 30% 0, 0 17%, 0 100%, 0 78%, 26% 100%, 0 100%); }
.ren-koma::after { content: ''; position: absolute; inset: 0; background: var(--tone-l); clip-path: polygon(100% 62%, 100% 100%, 62% 100%); }
.ren-koma img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; }
.ren-koma img.cut, .err-page img.cut, .about-pic img.cut { mix-blend-mode: multiply; }  /* ren.jpg на белом: белое пропускает скринтон в углах кадра */
.ren-koma .bubble { position: absolute; right: 10px; top: 14px; max-width: 168px; margin: 0; z-index: 2; }
.ren-koma .vjp { left: 8px; right: auto; top: auto; bottom: 12px; }
.builder-text { padding: 26px 28px 28px; background: var(--paper); border: var(--bw) solid var(--ink); }
.builder-text h2 { margin-bottom: 12px; }
.builder-text > p { margin: 0 0 14px; max-width: 44em; }
.can { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-size: 15px; line-height: 22px; }
.can li { position: relative; padding-left: 18px; }
.can li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; background: var(--ink); transform: rotate(45deg); }
/* лестница цен: прайс-лист строками */
.price-list { border-top: var(--bw) solid var(--ink); max-width: 880px; margin-bottom: 22px; }
.price-list > div { display: grid; grid-template-columns: 200px 1fr auto; gap: 4px 20px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.price-list > div:last-child { border-bottom: var(--bw) solid var(--ink); }
.price-list b { font-weight: 800; }
.price-list p { margin: 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.price-list .v { font: 800 19px/26px var(--ui); white-space: nowrap; }
/* лимитки и дропы: чёрный кадр, показывается только когда они есть */
.drops { position: relative; overflow: hidden; background: var(--ink); color: #fff; border: var(--bw) solid var(--ink); padding: 26px 28px 30px; }
.drops .sfx { position: absolute; right: 12px; top: 6px; color: transparent; -webkit-text-stroke: 2px #3a3a3d; transform: rotate(-4deg); z-index: 0; }
.drops > * { position: relative; z-index: 1; }
.drops h2 { color: #fff; margin-bottom: 6px; }
.drops > p { margin: 0 0 20px; color: #d8d5cc; max-width: 40em; }
.drops .chapter { background: var(--accent-d); }
.drops .grid-cards { color: var(--ink); }
.drops .dcard { border-color: var(--paper); }
.drops .drops-burst { position: absolute; right: 22px; top: 10px; z-index: 2; text-decoration: none; }
.drops .drops-burst:hover { transform: rotate(-3deg) scale(1.03); }
/* доверие: полоса на скринтоне, внутри белые кадры */
.trust-band { background: var(--tone-l), var(--bg); border-top: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); }
.trust-band .section-head { border-bottom: 0; padding-bottom: 0; }
.trust-band .section-head h2 { background: var(--bg); box-shadow: -8px 0 0 var(--bg), 8px 0 0 var(--bg); }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gut); }
.trust > div { background: var(--paper); border: var(--bw) solid var(--ink); padding: 16px 18px 18px; }
.trust .ic { display: inline-block; font: 500 19px/24px var(--jp); letter-spacing: 0; color: #fff; background: var(--ink); padding: 3px 7px 5px; margin-bottom: 10px; }
.trust h3 { font-size: 17px; line-height: 24px; margin: 0 0 6px; }
.trust p { margin: 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.mascots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; align-items: center; }
.about-pic { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 0; padding: 0; }
.about-pic img { width: 100%; height: 400px; object-fit: cover; object-position: 50% 8%; }
.about-pic figcaption { font-size: 13px; line-height: 20px; color: var(--ink); background: var(--paper); border-top: var(--bw) solid var(--ink); padding: 10px 14px; }
/* вопросы и ответы */
.faq .wrap > * { max-width: 820px; }
.faq .wrap > .faq-grid { max-width: none; display: grid; grid-template-columns: minmax(0, 820px) minmax(0, 300px); gap: 24px 56px; align-items: start; justify-content: space-between; }
.faq-side { position: sticky; top: 100px; padding-top: 6px; }
.faq-side .bubble { margin-bottom: 26px; }
.faq-side > p:not(.bubble) { margin: 0 0 16px; font-size: 15px; line-height: 23px; color: var(--muted); }
.faq details { border-bottom: 2px solid var(--ink); }
.faq details:first-of-type { border-top: var(--bw) solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 28px; height: 28px; font: 800 20px/24px var(--ui); text-align: center; color: var(--ink); border: 2px solid var(--ink); background: var(--paper); }
.faq details[open] summary::after { content: '\2212'; background: var(--ink); color: #fff; }
.faq summary:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.faq details p { margin: 0 0 16px; color: var(--ink); max-width: 46em; }
@media (max-width: 960px) {
  .mascots { grid-template-columns: 1fr; gap: 28px; }
  .faq .wrap > .faq-grid { grid-template-columns: 1fr; }
  .faq-side { position: static; }
  .steps, .trust { grid-template-columns: repeat(2, 1fr); }
  .price-list > div { grid-template-columns: 1fr auto; }
  .price-list p { grid-column: 1 / -1; grid-row: 2; }
  /* разворот складывается в столбик: сначала товар, потом текст; косой край убираем */
  .hero { --pich: clamp(320px, 48vh, 600px); padding: 10px 0 18px; }
  .hero .wrap { display: flex; flex-direction: column; gap: 10px; padding: 0 10px; }
  .hero-text, .hero-pic, .hero-text > .in, .hero-pic > .in { clip-path: none; }
  .hero-pic { order: -1; margin: 0; min-height: 0; height: var(--pich); }
  /* на телефоне кнопки идут сразу за заголовком, чтобы попасть в первый экран */
  .hero-text > .in { display: flex; flex-direction: column; align-items: flex-start; height: auto; padding: 22px 18px 22px; }
  .hero .cta { order: 1; align-self: stretch; margin: 4px 0 18px; }
  .hero p.lead { order: 2; margin-bottom: 12px; }
  .hero .facts { order: 3; }
  .hero-pic img.render { padding: 4% 0; }
  .hero-pic .sfx { left: 8px; right: auto; top: 12px; bottom: auto; }
  .hero-burst { top: calc(var(--pich) - 76px); left: auto; right: 16px; margin: 0; }
  .builder { grid-template-columns: 1fr; }
  .ren-koma { min-height: 0; height: 380px; }
  /* Рэн целиком и слева, облачко справа от головы, а не на лице */
  .ren-koma img { object-fit: contain; object-position: 12% 100%; }
  .ren-koma::before { clip-path: polygon(100% 100%, 100% 58%, 64% 100%); }
  .ren-koma::after { display: none; }
  .ren-koma .vjp { left: auto; right: 10px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .section { padding-top: 40px; padding-bottom: 40px; }
  .section-head { margin-bottom: 16px; padding-bottom: 12px; }
  .hero h1 { margin-bottom: 12px; }
  .hero p.lead { font-size: 16px; line-height: 24px; }
  .hero-burst { min-width: 132px; padding: 24px 26px; }
  .hero-burst b { font-size: 21px; line-height: 26px; }
  .hero .cta { gap: 12px; }
  .hero .cta .btn { flex: 1 1 140px; padding-left: 8px; padding-right: 8px; white-space: nowrap; font-size: 14px; letter-spacing: 0; text-transform: none; }
  .builder-text { padding: 20px 16px 22px; }
  .can { grid-template-columns: 1fr; }
  .drops { padding: 20px 14px 22px; }
  .drops .drops-burst { position: relative; right: auto; top: auto; margin: -8px 0 6px -10px; }
}
@media (max-width: 520px) {
  .steps, .trust { grid-template-columns: 1fr; gap: 10px; }
  .trust > div { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding: 14px; }
  .trust .ic { grid-row: 1 / span 2; align-self: start; margin: 0; text-align: center; }
  .step { display: grid; grid-template-columns: 58px 1fr; column-gap: 12px; padding: 14px; }
  .step .n { grid-row: 1 / span 2; font-size: 32px; line-height: 34px; margin: 0; }
  .step .n::after { width: 26px; }
}

/* ---------- страницы с текстом ---------- */
.page { padding-top: 40px; padding-bottom: 64px; }
.page .doc { max-width: 720px; }
.page .doc h1 { font-size: clamp(28px, 3.4vw, 42px); }
.page .doc h2 { margin-top: 1.7em; padding-top: 14px; border-top: var(--bw) solid var(--ink); font: 800 21px/28px var(--ui); letter-spacing: 0; }
.page .doc p, .page .doc li { font-size: 16px; line-height: 26px; }
.page .doc li { margin-bottom: 6px; }
.page .doc ul { padding-left: 20px; list-style: square; }
.err-page { min-height: 62vh; display: grid; place-items: center; padding: 48px 16px; }
.err-page .box { display: grid; grid-template-columns: 220px minmax(0, 440px); gap: 36px; align-items: center; }
.err-page .code { display: inline-block; font: 400 13px/16px var(--head); letter-spacing: .04em; color: #fff; background: var(--ink); padding: 6px 12px 5px; margin-bottom: 14px; transform: rotate(-4deg); transform-origin: 0 100%; }
.err-page img { width: 220px; height: 280px; object-fit: cover; object-position: 50% 10%; border-radius: 0; }
.err-page .pic { width: 220px; height: 280px; border: var(--bw) solid var(--ink); background: var(--paper); overflow: hidden; }
.err-page .pic img { width: 100%; height: 100%; }
.err-page .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 640px) { .err-page .box { grid-template-columns: 1fr; gap: 24px; } .err-page img, .err-page .pic { width: 160px; height: 200px; } .err-page .pic img { width: 100%; height: 100%; } }

/* ---------- карточка товара ---------- */
.crumbs { font-size: 12px; line-height: 20px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 18px 0 0; }
.crumbs a { text-decoration: none; color: var(--muted); display: inline-block; padding: 6px 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.pdp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; padding: 12px 0 56px; }
.pdp-media { position: sticky; top: 84px; align-self: start; min-width: 0; }
.viewer { position: relative; border-radius: 0; border: var(--bw) solid var(--ink); overflow: hidden; background: var(--tone-l), var(--paper); aspect-ratio: 4 / 5; max-height: calc(100vh - 300px); min-height: 400px; width: 100%; }  /* вместе с миниатюрами помещается в первый экран */
.viewer > canvas:not(.mock) { position: absolute; inset: 0; display: block; }
/* !important: 3D-холсту display задаёт сам three.js (inline), без этого куртка оставалась под картинкой галереи */
.viewer:not(.live) > canvas, .viewer:not(.live) .viewer-tools { display: none !important; }
.viewer .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer .still.photo { object-fit: cover; cursor: zoom-in; }
.viewer.live .still, .viewer.live .viz-tag, .viewer.live .go3d { display: none; }
.viewer .go3d { position: absolute; right: 12px; bottom: 12px; z-index: 3; background: var(--paper); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.viewer .go3d:hover { background: var(--ink); color: #fff; }
.viewer .hint3d { position: absolute; left: 0; right: 0; top: 12px; text-align: center; font-size: 12px; line-height: 18px; font-weight: 700; color: var(--muted); pointer-events: none; z-index: 2; }
.viewer:not(.live) .hint3d { display: none; }
.viewer-tools { position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.viewer-tools button, .viewer-tools .seg button { background: var(--paper); border: 2px solid var(--ink); color: var(--ink); border-radius: 0; min-height: 36px; min-width: 0; padding: 6px 12px; font: 700 12px/18px var(--ui); cursor: pointer; box-shadow: none; transform: none; }
.viewer-tools button.on, .viewer-tools .seg button.on { background: var(--ink); color: #fff; }
.viewer-tools .seg { gap: 6px; }
.gal { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 2px; }
.gal button { position: relative; width: 64px; height: 80px; flex: none; padding: 0; border: 2px solid var(--hair); border-radius: 0; background: var(--paper); cursor: pointer; overflow: hidden; font: 800 12px/16px var(--ui); color: var(--ink); }
.gal button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal button:hover { border-color: var(--ink); }
.gal button.on { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.gal-note { font-size: 13px; line-height: 20px; color: var(--muted); margin: 8px 0 0; }
.pdp .info { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pdp .info h1 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 8px; }
.pdp .info > .tags { position: static; }
.pdp .info > .tags .tag { transform-origin: 0 100%; }
.pdp .price { font-size: 30px; line-height: 36px; font-weight: 800; }
.opt-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 20px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.opt-label a { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13px; padding: 12px 0; margin: -12px 0; }
.stock-line { font-size: 13px; line-height: 20px; color: var(--muted); margin-top: 8px; }
.stock-line.in { color: var(--ok); font-weight: 700; }
.stock-line.err { color: var(--red); font-weight: 700; }
.buy-row { display: flex; gap: 12px; padding: 0 5px 5px 0; }
.buy-row .btn { flex: 1; min-width: 0; }
.buy-row .fav { width: 54px; height: 54px; flex: none; border: var(--bw) solid var(--ink); border-radius: 0; background: var(--paper); }
.buy-row .fav:hover { background: var(--ink); color: #fff; }
.under-buy { font-size: 14px; line-height: 22px; margin: -8px 0 0; }
.perks { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 22px; border-top: 2px solid var(--ink); }
.perks li { position: relative; padding: 10px 0 10px 20px; border-bottom: 1px solid var(--hair); }
.perks li::before { content: ''; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; background: var(--ink); transform: rotate(45deg); }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; border-top: 2px solid var(--ink); }
.spec td { padding: 10px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.spec td:first-child { color: var(--muted); width: 38%; padding-right: 12px; font-weight: 700; }
.pdp-more { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px 48px; padding: 48px 0; border-top: 3px solid var(--ink); }
.pdp-more h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 14px; }
.pdp-more h3 { font-size: 18px; line-height: 24px; margin: 28px 0 8px; }
.pdp-more h3:first-child { margin-top: 0; }
.pdp-more p { margin: 0 0 12px; }
.pdp-more ul { margin: 0 0 12px; padding-left: 20px; list-style: square; }
.pdp-more li { margin-bottom: 6px; }
.scheme { margin-top: 20px; }
.scheme canvas { display: block; width: 100%; height: auto; background: var(--paper); border: 2px solid var(--ink); border-radius: 0; }
.scheme figcaption { font-size: 13px; line-height: 20px; color: var(--muted); margin-top: 8px; }
.pdp-more .faq { margin-top: 28px; }
.pdp-more .faq details p { font-size: 14px; line-height: 22px; }
figure { margin: 0; }
/* липкая панель покупки на телефоне */
.buybar { display: none; }
@media (max-width: 960px) {
  .pdp, .pdp-more { grid-template-columns: 1fr; gap: 24px; }
  .pdp-more { padding: 40px 0; gap: 36px; }
  .pdp-media { position: static; }
  .viewer { max-height: none; min-height: 0; }
  /* телефон на боку и низкое окно: окно просмотра не выше экрана, иначе куртка целиком не видна (на 844×390 оно было высотой 995 px) */
  .viewer { width: min(100%, calc((100vh - 24px) * .8)); margin-inline: auto; }
}
@media (max-width: 760px) {
  .pdp-media { margin: 0 -16px; }
  .viewer { border-width: var(--bw) 0; }
  .gal, .gal-note { padding-left: 16px; padding-right: 16px; }
  .buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; align-items: center; gap: 12px; padding: 8px 16px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 3px solid var(--ink); transform: translateY(110%); transition: transform .18s; }
  .buybar.show { transform: none; }
  .buybar .t { flex: 1; min-width: 0; font-size: 15px; line-height: 20px; font-weight: 800; }
  .buybar .t b { display: block; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buybar .btn { flex: none; min-height: 48px; margin: 0 4px 4px 0; box-shadow: var(--pop); }
  .buybar .btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--accent); }
  .buybar .btn[disabled] { box-shadow: none; transform: none; }
}

/* ---------- корзина и оформление: спокойно, манга только в рамках и кнопках ---------- */
.cart-list { border-top: var(--bw) solid var(--ink); }
.cart-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; padding: 20px 0; align-items: start; border-bottom: 1px solid var(--hair); }
.cart-list .cart-item:last-child { border-bottom: var(--bw) solid var(--ink); }
.card.cart-item { background: none; border-width: 0 0 1px; border-color: var(--hair); border-radius: 0; }
.cart-item img { width: 120px; height: 150px; object-fit: cover; border-radius: 0; border: 2px solid var(--ink); background: var(--paper); }
.cart-item .name { font-weight: 800; font-size: 17px; line-height: 24px; }
.cart-item .name a { text-decoration: none; }
.cart-item .name a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.cart-item .meta { color: var(--muted); font-size: 14px; line-height: 22px; }
.cart-item .ship { font-size: 13px; line-height: 20px; margin-top: 8px; }
.cart-item .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-item .del { font-size: 13px; color: var(--muted); display: inline-block; padding: 12px 0; }
.cart-item.off img { filter: grayscale(1); opacity: .7; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 0; overflow: hidden; background: var(--paper); }
.qty button { background: transparent; color: var(--ink); border: 0; width: 40px; height: 40px; cursor: pointer; font-size: 18px; font-weight: 700; }
.qty button:hover { background: var(--ink); color: #fff; }
.qty button[disabled] { opacity: .35; cursor: not-allowed; background: none; color: var(--ink); }
.qty span { min-width: 28px; text-align: center; font-weight: 800; font-size: 14px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; padding: 36px 0 64px; }
.layout-2 > * { min-width: 0; }
.summary { position: sticky; top: 90px; padding: 24px; }
.summary h3 { margin-bottom: 14px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; font-size: 15px; line-height: 22px; }
.summary .total { font: 800 21px/28px var(--ui); border-top: var(--bw) solid var(--ink); padding-top: 14px; margin-top: 14px; }
.summary .it { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 14px; line-height: 20px; }
.summary .it img { width: 56px; height: 70px; object-fit: cover; border-radius: 0; border: 1.5px solid var(--ink); background: var(--paper); }
.summary .it .tag { border-width: 1.5px; font-size: 10px; padding: 1px 5px; }
.summary .btn-main { width: calc(100% - 4px); }   /* место под жёсткую тень, чтобы она не вылезала за рамку блока */
.trust-lines { list-style: none; margin: 18px 0 0; padding: 0; font-size: 13px; line-height: 20px; color: var(--muted); }
.trust-lines li { padding: 8px 0; border-top: 1px solid var(--hair); }
.pay-note { font-size: 13px; line-height: 20px; color: var(--muted); margin: 12px 0 0; text-align: center; }
.points { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.point { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 2px solid var(--hair); border-radius: 0; cursor: pointer; background: var(--paper); font-weight: 400; font-size: 15px; line-height: 22px; margin: 0; }
.point:hover { border-color: var(--ink); }
.point.on { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.point input { margin-top: 3px; width: 18px; height: 18px; }
.narrow { width: min(520px, 100%); margin: 0 auto; }
@media (max-width: 960px) {
  .layout-2 { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
  .summary { position: static; }
}
@media (max-width: 600px) {
  .cart-item { grid-template-columns: 96px 1fr; gap: 14px; }
  .cart-item img { width: 96px; height: 120px; }
  .cart-item .right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .pad, .summary { padding: 18px 16px; }
}

/* 2D-персонаж в окне просмотра (js/mockup2d.js): переворот спереди/сзади */
canvas.mock { position: absolute; left: 0; right: 0; top: 3%; height: 88%; width: 100%; object-fit: contain; z-index: 1; transform-origin: 50% 100%; }
canvas.mock[hidden] { display: none; }
canvas.mock.flip { animation: mock-flip .36s ease-in-out; }
@keyframes mock-flip { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(0.02); } }

/* персонализация (js/extras.js) */
.extras { border: 2px solid var(--ink); border-radius: 0; background: var(--paper); padding: 0 16px; }
.extras summary { font-weight: 800; font-size: 15px; cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; min-height: 48px; }
.extras summary::-webkit-details-marker { display: none; }
.extras summary::before { content: '+'; font-weight: 800; font-size: 20px; line-height: 1; width: 14px; text-align: center; }
.extras[open] summary::before { content: '\2212'; }
.extras[open] { padding-bottom: 16px; }
.extras summary .muted { margin-left: auto; font-weight: 800; color: var(--ink); }
.extras .check { display: flex; gap: 10px; align-items: center; margin: 6px 0 10px; font-weight: 400; font-size: 14px; line-height: 22px; color: var(--ink); cursor: pointer; min-height: 32px; }
.extras .check input { width: 20px; height: 20px; }
.ex-lining { display: grid; gap: 8px; margin-bottom: 10px; }
.ex-preview { background: #2a2a2e; border-radius: 0; padding: 12px; text-align: center; font-size: 24px; line-height: 30px; min-height: 30px; overflow-wrap: anywhere;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px); }
.ex-colors { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.ex-count { font-size: 12px; line-height: 16px; color: var(--muted); text-align: right; margin-top: -4px; }
.ex-colors .swatch { width: 28px; height: 28px; }
.ex-head { font-size: 14px; line-height: 22px; margin: 12px 0 8px; }
.ex-patches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ex-patch { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ex-pick { border: 2px solid var(--hair); border-radius: 0; background: var(--paper); padding: 6px 4px 4px; cursor: pointer; font: 700 11px/16px var(--ui); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; }
.ex-pick:hover { border-color: var(--ink); }
.ex-pick img { width: 44px; height: 44px; }
.ex-patch.on .ex-pick { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ex-patch select { font-size: 12px; line-height: 18px; padding: 4px 6px; min-height: 36px; }
.extras-line { font-size: 13px; line-height: 20px; color: var(--muted); margin-top: 4px; display: block; }
@media (max-width: 560px) { .ex-patches { grid-template-columns: repeat(3, 1fr); } }

/* админка: живые фото дизайна */
.m-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.m-ph { position: relative; width: 88px; height: 110px; border: 2px solid var(--ink); border-radius: 0; overflow: hidden; background: #fff; }
.m-ph img { width: 100%; height: 100%; object-fit: cover; }
.m-ph-tools { position: absolute; right: 3px; top: 3px; display: flex; gap: 3px; }
.m-ph-tools button { width: 24px; height: 24px; border: 1.5px solid var(--ink); border-radius: 0; background: #fff; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }

/* дропы и тираж */
.drop-box { border: var(--bw) solid var(--ink); border-radius: 0; background: var(--paper); padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; box-shadow: 5px 5px 0 var(--ink); margin: 0 5px 5px 0; }
.drop-box .count { font: 800 26px/32px var(--ui); font-variant-numeric: tabular-nums; }
.drop-box form { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.drop-box input[type=email] { flex: 1 1 200px; }
.drop-box .consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 20px; font-weight: 400; flex-basis: 100%; }
.edition { display: flex; flex-direction: column; gap: 8px; font-weight: 800; font-size: 14px; line-height: 20px; }
.edition .bar { height: 10px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); overflow: hidden; }
.edition .bar i { display: block; height: 100%; background: var(--accent-d); }

@media (pointer: coarse) {
  .btn-sm { min-height: 44px; }
  .link-btn { min-height: 44px; }
  .seg button, .tabs button { min-height: 44px; }
  .viewer-tools button, .viewer-tools .seg button { min-height: 44px; padding: 10px 14px; }
  .qty button { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:active, .btn-main:hover, .btn-main:active, .dcard:hover, .seg button:hover { transform: none; }
}
