/* Вариант А — «Светлый шоурум» (artifacts/style-options.md) */
:root {
  --bg: #F3EEE6;
  --surface: #FBF8F3;
  --text: #2A2520;
  --muted: #6E6458;
  --accent: #7E5536;
  --line: #E0D6C8;
  --err: #A3392B;
  --head: "Cormorant Garamond", Georgia, serif;
  --body: "Golos Text", system-ui, sans-serif;
  --bar-h: 148px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.4;
  overflow-x: hidden;
}

.page {
  max-width: 480px; margin: 0 auto;
  padding: 32px 20px calc(var(--bar-h) + 28px + env(safe-area-inset-bottom));
}
/* Экран после отправки — одна колонка по центру */
.done { padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); }
.done-card {
  max-width: 560px; margin: 0 auto; padding: 32px 20px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
}
.done-mark { display: block; color: var(--accent); margin: 0 0 18px; }
.done h1:focus { outline: none; }
.steps { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 18px 44px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--surface);
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: var(--line);
}
.steps b { display: block; font-weight: 500; }
.steps span { display: block; font-size: 14px; color: var(--muted); line-height: 1.45; }
.summary { background: var(--bg); border-radius: 16px; padding: 18px 16px; margin: 0 0 24px; }
.summary-title { font-family: var(--head); font-size: 24px; font-weight: 600; margin: 0 0 10px; }
.summary dl { margin: 0 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary p { margin: 0; }
.summary .lbl { font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.summary .sum {
  font-family: var(--head); font-size: 46px; font-weight: 600; line-height: 1.05;
  font-variant-numeric: lining-nums tabular-nums; white-space: nowrap;
}
.summary .calc { font-size: 13px; color: var(--muted); margin-top: 4px; }
.done .note { margin-top: 12px; }
.warm { margin: 24px 0 0; text-align: center; font-family: var(--head); font-size: 20px; font-style: italic; color: var(--muted); }

h1 {
  font-family: var(--head); font-weight: 500; font-size: 36px; line-height: 1.05;
  letter-spacing: -.01em; margin: 0 0 10px;
}
.lead { margin: 0 0 28px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.sec { margin: 0 0 28px; }
.sec-title { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 12px; }

/* Поля */
.dims, .form { display: grid; gap: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; min-width: 0; height: 52px; padding: 0 14px;
  font: inherit; font-size: 17px; color: var(--text);
  font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  touch-action: manipulation; appearance: none;
}
.field input::placeholder { color: var(--muted); opacity: .7; }
.field input[aria-invalid="true"] { border-color: var(--err); }
.hint, .err { margin: 6px 0 0; font-size: 13px; line-height: 1.4; }
.hint { color: var(--muted); }
.err { color: var(--err); }

input:focus-visible, button:focus-visible,
.mat input:focus-visible ~ .nm, .switch input:focus-visible + .track {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Материал */
.mats { display: grid; gap: 10px; }
.mat {
  position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
  min-height: 64px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.mat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mat:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mat:has(input:checked) b { font-weight: 600; }
.sw { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; }
.sw-ldsp { background: repeating-linear-gradient(100deg, #D9C3A0 0 6px, #CFB68F 6px 9px, #DCC8A7 9px 15px); }
.sw-mdf { background: #E9E4DA; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.sw-veneer { background: repeating-linear-gradient(95deg, #6B4A33 0 4px, #5A3D2A 4px 6px, #7A563C 6px 11px); }
.nm { flex: 1; min-width: 0; font-size: 16px; }
.nm b { display: block; font-weight: 500; }
.nm small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.pr { align-self: flex-start; margin-top: 2px; font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Опции */
.opts { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 0; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt-text { display: flex; flex-direction: column; min-width: 0; cursor: pointer; }
.opt .t { font-size: 16px; }
.opt .s { font-size: 13px; color: var(--muted); }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; min-width: 52px; min-height: 44px; align-items: center; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.track { width: 52px; height: 30px; border-radius: 15px; background: var(--line); position: relative; transition: background .2s; pointer-events: none; }
.track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(22px); }

.stepper { display: inline-flex; align-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 22px; }
.stepper button {
  width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent;
  font: inherit; font-size: 20px; line-height: 1; color: var(--text); cursor: pointer; touch-action: manipulation;
}
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper output { min-width: 32px; text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; }

/* Контакты и отправка */
.contacts-lead { margin: 0 0 4px; font-size: 15px; line-height: 1.5; }
.form .field input { font-size: 16px; }
#turnstile { min-height: 65px; }
.cta {
  width: 100%; min-height: 56px; border: 0; border-radius: 16px; cursor: pointer; touch-action: manipulation;
  background: var(--accent); color: var(--surface); font: inherit; font-size: 16px; font-weight: 600;
}
.cta:disabled { opacity: .45; cursor: default; }
.cta:not(:disabled):active { transform: scale(.98); }
.note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.send-err { margin: 0; font-size: 14px; color: var(--err); line-height: 1.45; }

/* Итог — закреплён внизу; скрыт, пока открыта клавиатура (фокус в текстовом поле) */
.total {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-width: 480px; margin: 0 auto; min-height: var(--bar-h);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px -18px rgba(42,37,32,.35);
}
.total p { margin: 0; }
.total .lbl { font-size: 13px; color: var(--muted); }
.total .sum {
  font-family: var(--head); font-size: 46px; font-weight: 600; line-height: 1.05;
  font-variant-numeric: lining-nums tabular-nums; white-space: nowrap;
}
.total .surcharge, .total .calc { font-size: 13px; color: var(--muted); line-height: 1.45; }
body.typing .total, body.sent .total { display: none; }

[hidden] { display: none !important; }

@media (max-width: 380px) {
  h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .track, .track::after { transition: none; }
  .cta:not(:disabled):active { transform: none; }
}
