/* v20 «Корпоративні набори» — общее. Телефон: v20-m.css, компьютер: v20-d.css. */
:root {
  --bg: #f4f0ea;
  --bg2: #ebe5dc;
  --card: #fffdf9;
  --ink: #1d1a17;
  --ink2: #5d554d;
  --line: #ddd4c8;
  --ok: #2d7a4f;
  --bad: #b3361f;
  --wait: #a26b12;
  --brand: #2f5d50;
  --on-brand: #fffaf3;
  --accent: #b5562f;
  --stage-a: #e9e2d7;
  --stage-b: #d8cfc2;
  --r: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --bg2: #1f1c19;
    --card: #23201c;
    --ink: #f3ede4;
    --ink2: #b6ab9e;
    --line: #3a352f;
    --ok: #6cc595;
    --bad: #ff8a70;
    --wait: #e7b45a;
    --accent: #ec8a5c;
    --stage-a: #26221e;
    --stage-b: #1b1815;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }

/* ---------- шапка */
.top {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
}
.logo { display: flex; align-items: baseline; gap: 6px; color: var(--ink); text-decoration: none; min-width: 0; }
.logo b { font-size: 19px; letter-spacing: -0.02em; }
.logo span { color: var(--ink2); font-size: 14px; }
.demo-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink2);
}
.lang {
  margin-left: auto; min-width: 44px; min-height: 36px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 99px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px;
}

/* ---------- заголовок: строки выезжают из масок */
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.kin { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.04; }
/* маска с запасом под выносы глифов и курсивный наклон: поле внутри строки, а не обрезка по ней */
.kin .ln { display: block; clip-path: inset(0 -0.3em); padding: 0.12em 0 0.2em; margin: -0.12em 0 -0.2em; }
.kin .ln > span { display: inline-block; animation: rise 0.9s cubic-bezier(.2,.75,.15,1) both; }
.kin .ln:nth-child(2) > span { animation-delay: 0.12s; }
.kin .ln:nth-child(3) > span { animation-delay: 0.24s; }
.kin .ln-accent > span { font-style: italic; color: var(--brand); transition: color 0.4s; }
@media (prefers-color-scheme: dark) { .kin .ln-accent > span { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
.lead { color: var(--ink2); margin: 12px 0 0; max-width: 46ch; }

/* ---------- сцена */
.stage {
  position: relative; overflow: hidden; border-radius: var(--r);
  background: radial-gradient(120% 90% at 50% 30%, var(--stage-a), var(--stage-b));
  transition: background 0.5s;
  touch-action: none;
}
.stage.on-dark { --stage-a: #3a3631; --stage-b: #201d1a; }
.stage.on-light { --stage-a: #faf6ef; --stage-b: #e8e0d4; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.stage-ph { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 0.4s; }
.stage.live .stage-ph { opacity: 0; pointer-events: none; }
.ph-box { width: 46%; aspect-ratio: 1.7; border-radius: 6px; background: var(--brand); opacity: 0.35; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.18; } }

.pill {
  position: absolute; left: 12px; top: 12px; z-index: 2; max-width: calc(100% - 24px);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--ink);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.12);
}
.pill-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--wait); }
[data-state=ok] > .pill-dot { background: var(--ok); }
[data-state=bad] > .pill-dot, [data-state=off] > .pill-dot { background: var(--bad); }
[data-state=building] > .pill-dot { animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.stage-tools { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 20px); }
.tool {
  min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 90%, transparent); font-size: 14px; font-weight: 600;
}
.tool-icon { width: 40px; padding: 0; display: grid; place-items: center; }
.tool-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.focus-name { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: color-mix(in srgb, var(--card) 85%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hint { position: absolute; left: 12px; bottom: 14px; z-index: 1; margin: 0; font-size: 12px; color: var(--ink2); pointer-events: none; transition: opacity 0.5s; max-width: 55%; }
.stage.touched .hint, .stage.focused .hint { opacity: 0; }
.stage.on-dark .hint { color: #d8cfc4; }
.no3d { position: absolute; inset: auto 12px 60px; margin: 0; font-size: 14px; color: var(--ink2); }

/* ---------- блоки */
.block { padding: 20px 0 6px; }
.block-h { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.count { font-size: 14px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.note { margin: 6px 0 10px; font-size: 14px; color: var(--ink2); min-height: 1.45em; transition: color 0.2s; }
.note.is-warn { color: var(--bad); font-weight: 600; }
.help { margin: 6px 0 0; font-size: 13px; color: var(--ink2); }
.muted { color: var(--ink2); font-size: 13px; margin: 6px 0 0; }
.demo-note { font-weight: 600; color: var(--accent); }
.label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }

/* полка изделий */
.shelf { list-style: none; margin: 0; padding: 0; }
.card {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; padding: 8px 8px 10px; border-radius: var(--r);
  background: var(--card); border: 1.5px solid var(--line);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:active { transform: scale(0.97); }
.card[aria-pressed=true] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.card-img { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #2b2724; margin-bottom: 6px; }
.card-img img, .thumb-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { background: linear-gradient(135deg, #cbbda9, #8f8070); }
.card-check {
  position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%;
  background: rgb(255 255 255 / 0.85); border: 1.5px solid rgb(0 0 0 / 0.15);
  transition: background 0.2s, transform 0.25s cubic-bezier(.3,1.6,.5,1);
}
.card-check::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: #333; }
.card[aria-pressed=true] .card-check { background: var(--brand); border-color: transparent; transform: scale(1.08); }
.card[aria-pressed=true] .card-check::after { content: "✓"; color: var(--on-brand); }
.card-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink2); }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.card-tag { margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--ink2); }
.card-tag.is-text { color: var(--brand); font-weight: 600; }
@media (prefers-color-scheme: dark) { .card-tag.is-text { color: color-mix(in srgb, var(--brand) 45%, #fff); } }
.fly { position: fixed; z-index: 40; border-radius: 10px; pointer-events: none; object-fit: cover; }

/* бренд */
input[type=text], input[type=number], input[type=date] {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card);
}
#name { font-size: 18px; font-weight: 700; letter-spacing: 0.04em; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.sw { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; padding: 3px; background: none; }
.sw i { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15); }
.sw[data-sw=forest] i { background: #2f5d50; }
.sw[data-sw=navy] i { background: #24344d; }
.sw[data-sw=berry] i { background: #7a2e4a; }
.sw[data-sw=sand] i { background: #cdb48f; }
.sw[data-sw=graphite] i { background: #3d3f44; }
.sw[data-sw=coral] i { background: #e0705c; }
.sw-custom i { background: conic-gradient(#e0705c, #cdb48f, #2f5d50, #24344d, #7a2e4a, #e0705c); position: relative; }
.sw-custom i::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: inherit; }
.sw[aria-checked=true] { border-color: var(--ink); }
.color-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; right: 0; bottom: 0; }

/* тираж */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .label { margin-top: 14px; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.stepper button { border: 0; background: var(--bg2); font-size: 20px; min-height: 44px; }
.stepper input { border: 0; border-radius: 0; text-align: center; min-width: 0; padding: 8px 2px; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ship { border: 0; padding: 0; margin: 0; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; margin-bottom: 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.radio:has(input:checked) { border-color: var(--brand); }
.radio input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }

/* протокол */
.proof-list { display: grid; gap: 10px; margin-top: 10px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.pcard.is-bad { border-color: var(--bad); }
.pcard.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.pcard header { display: flex; align-items: center; gap: 8px; }
.pcard h3 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pkind { color: var(--ink2); font-weight: 600; }
.pdot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--wait); }
.is-ok .pdot { background: var(--ok); }
.is-bad .pdot, .is-off .pdot { background: var(--bad); }
.is-building .pdot { animation: blink 1s ease-in-out infinite; }
.pfocus { flex: none; min-width: 44px; min-height: 32px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg2); font-size: 12px; font-weight: 700; }
.pcard dl { margin: 8px 0 0; display: grid; grid-template-columns: minmax(0, 38%) 1fr; gap: 4px 12px; font-size: 14px; }
.pcard dt { color: var(--ink2); overflow-wrap: anywhere; }
.pcard dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ptips-h, .pbad-h { margin: 10px 0 4px; font-size: 13px; font-weight: 700; }
.pbad-h { color: var(--bad); }
.ptips, .pbad { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink2); }
.pbad { color: var(--ink); }
.pfix { margin-top: 10px; }
.pcard > .btn { margin-top: 10px; }

/* кнопки */
.btn {
  min-height: 48px; padding: 0 20px; border-radius: 99px; border: 0; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2;
}
.btn-primary { background: var(--brand); color: var(--on-brand); transition: background 0.3s, opacity 0.2s, transform 0.15s; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary[aria-disabled=true] { opacity: 0.55; }
.btn-primary:disabled { opacity: 0.5; cursor: progress; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); min-height: 44px; font-size: 15px; }
.wide { width: 100%; margin-top: 12px; }
.cta-why { margin: 8px 0 0; font-size: 13px; color: var(--ink2); }

/* листы */
.sheet {
  border: 0; padding: 8px 16px 20px; margin: 0; color: var(--ink); background: var(--bg);
  width: 100%; max-width: 100%;
}
.sheet::backdrop { background: rgb(0 0 0 / 0.35); }
.grip { display: grid; place-items: center; height: 24px; touch-action: none; cursor: grab; }
.grip span { width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kp-sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: 15px; }
.kp-sum dt { color: var(--ink2); }
.kp-sum dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.kp-sum ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2); }
.price { font-weight: 700; margin: 0 0 6px; }
.link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.link-row input { font-size: 13px; min-width: 0; }
.kp-status { min-height: 1.4em; font-size: 14px; color: var(--ink2); margin: 8px 0 0; }

.foot { padding: 28px 0 16px; font-size: 13px; color: var(--ink2); }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--ink2); }
.fatal { padding: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stage-canvas { scroll-behavior: auto; }
}
