@font-face { font-family: "Manrope"; src: url("/fonts/manrope-cyrillic-5.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope-latin-6.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+20BD; }

:root {
  --bg: #f6f1ea;
  --card: #fffdfa;
  --ink: #2b2420;
  --muted: #6f625a;
  --line: #e4d8ca;
  --accent: #b4532a;
  --accent-dark: #8f3f1d;
  --ok: #3d7a4a;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.oniq { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.o-top { max-width: 760px; margin: 0 auto; padding: 16px 20px 0; }
.o-brand { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.o-main { max-width: 760px; margin: 0 auto; padding: 12px 20px 40px; }
.o-foot { max-width: 760px; margin: 0 auto; padding: 24px 20px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.o-foot p { margin: 4px 0; }

h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.12; letter-spacing: -0.02em; margin: 8px 0 14px; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 0 0 6px; }
.o-eyebrow { margin: 18px 0 0; color: var(--accent); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.o-eyebrow:empty { display: none; }
.o-lead { font-size: 18px; color: var(--muted); margin: 0 0 16px; }
.o-fine { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.o-hero { padding: 8px 0 12px; }
.o-ticks { list-style: none; padding: 0; margin: 0 0 18px; }
.o-ticks li { padding-left: 26px; position: relative; margin: 6px 0; }
.o-ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 800; }
.o-ticks:empty { display: none; }

.o-block { margin: 28px 0; }
.o-steps { margin: 0; padding-left: 22px; }
.o-steps li { margin: 6px 0; }

.o-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border-radius: 14px; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; width: 100%; }
.o-btn--main { background: var(--accent); color: #fff; }
.o-btn--main:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.o-btn[disabled] { opacity: 0.6; cursor: progress; }
.o-link { border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; padding: 12px 0 0; }

.sample { display: grid; gap: 12px; }
.sample__item, .o-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.sample__item p { margin: 0; white-space: pre-line; }

.o-form { display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.fld { display: grid; gap: 6px; }
.fld > span, .fld legend { font-weight: 700; font-size: 15px; }
.fld i { font-style: normal; font-weight: 400; color: var(--muted); }
.fld small { color: var(--muted); font-size: 13px; }
.fld input, .fld select, .fld textarea, .o-contact input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }
.fld textarea { resize: vertical; min-height: 96px; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .o-contact input:focus { outline: none; border-color: var(--accent); }
.fld.is-bad input, .fld.is-bad select, .fld.is-bad textarea { border-color: #c0392b; }
.fld--checks { border: 0; padding: 0; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check--consent { font-size: 14px; color: var(--muted); }
.o-error { color: #b03a2e; font-weight: 600; margin: 8px 0 0; }

.o-prices .price-tier { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 10px 0; }
.o-prices .price-tier--full { border-color: var(--accent); }
.o-prices .price-tier ul { margin: 8px 0 0; padding-left: 20px; }
.prices__free { font-weight: 700; color: var(--ok); }
.prices__note { color: var(--muted); font-size: 14px; }

.o-faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
.o-faq summary { font-weight: 700; cursor: pointer; }
.o-faq p { margin: 8px 0 0; }

.catalog { display: grid; gap: 12px; }
.catalog__item { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); text-decoration: none; }
.catalog__item span { color: var(--muted); }

.o-order h1 { margin-top: 6px; }
.o-order > section + section { margin-top: 14px; }
.o-wait { text-align: center; padding: 28px 18px; }
.o-spinner { display: inline-block; width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: o-spin 0.9s linear infinite; }
@keyframes o-spin { to { transform: rotate(360deg); } }

.o-sections { display: grid; gap: 14px; margin-bottom: 18px; }
.o-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.o-section p { margin: 0; white-space: pre-line; }
.o-section--locked p { filter: blur(5px); user-select: none; -webkit-user-select: none; pointer-events: none; }
.o-section--locked::after { content: "🔒 Откроется после оплаты"; position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); background: rgba(255, 253, 250, 0.94); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; white-space: nowrap; }

.o-offer { display: grid; gap: 14px; border-color: var(--accent); }
.o-offer h2 { margin: 0; }
.o-tier { display: grid; gap: 8px; }
.o-tier .o-ticks { margin: 0; }
.o-contact { display: grid; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.o-contact__row { display: grid; gap: 8px; }
@media (min-width: 560px) { .o-contact__row { grid-template-columns: 1fr auto; } .o-contact__row .o-btn { width: auto; } }

.o-files__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.o-files__list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.o-files__list .o-btn { width: auto; min-height: 42px; padding: 8px 16px; }
.o-files__kind { color: var(--muted); font-size: 13px; margin-left: 6px; }

.doc { max-width: 760px; }
.doc h2 { margin-top: 26px; }
.doc .o-note { background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 12px; padding: 12px 14px; }

/* ---------- Телефон прежде всего: поля, шаги, фото ---------- */
.fld input, .fld select, .fld textarea, .o-contact input { font-size: 16px; min-height: 48px; }
.fld textarea { min-height: 112px; }
.o-btn { min-height: 52px; }
.o-btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.o-btn--ghost:hover { border-color: var(--accent); }
:focus-visible { outline: 3px solid #1f6feb; outline-offset: 2px; }
.fld.is-bad input, .fld.is-bad select, .fld.is-bad textarea { border-color: #b03a2e; }
.fld .fld__err, .fld small.fld__err { color: #b03a2e; font-weight: 700; font-size: 14px; }
.fld--photos.is-bad .photo-list, .fld--photos.is-bad .o-photo-note { outline: 2px solid #b03a2e; border-radius: 12px; }
.fld--photos { display: grid; gap: 8px; }
.fld__label { font-weight: 700; font-size: 15px; }

.o-progress { display: grid; gap: 8px; }
.o-progress__label { margin: 0; font-weight: 700; font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.o-progress__bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.o-progress__bar i { display: block; height: 100%; background: var(--accent); transition: width 0.25s; }
.o-step-note { margin: -4px 0 0; color: var(--muted); font-size: 15px; }
.o-groupcount { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff7e6; font-size: 14px; font-weight: 600; }
.o-groupcount.is-ok { background: #e9f4ec; color: var(--ok); }

.o-actions { display: grid; gap: 10px; position: sticky; bottom: 0; margin: 6px -18px -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--card) 70%, rgba(255, 253, 250, 0)); border-radius: 0 0 var(--radius) var(--radius); }
.o-back { min-height: 44px; }

.o-draft { background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.o-draft__row { display: grid; gap: 8px; }

.photo-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.photo-list:empty { display: none; }
.photo-item { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #eee; border: 1px solid var(--line); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cover { position: absolute; left: 6px; top: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.photo-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 4px; padding: 6px; background: linear-gradient(to top, rgba(0,0,0,.55), transparent); }
.photo-tools button { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: rgba(255,255,255,.92); font-size: 16px; cursor: pointer; }
.photo-tools button[disabled] { opacity: .35; }
.o-photo-note { color: var(--muted); font-size: 13px; }

.o-upload-wrap { display: grid; gap: 6px; }
.o-upload { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.o-upload i { display: block; height: 100%; width: 0; background: var(--ok); transition: width 0.2s; }

.o-sticky-cta { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; box-shadow: 0 10px 30px rgba(43, 36, 32, .25); transition: transform .25s, opacity .25s; }
.o-sticky-cta.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .o-sticky-cta { display: none; } }

/* ---------- Страница заказа ---------- */
.o-stages { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; text-align: left; max-width: 320px; margin-inline: auto; }
.o-stages li { padding-left: 28px; position: relative; color: var(--muted); }
.o-stages li::before { content: "○"; position: absolute; left: 4px; }
.o-stages li.is-active { color: var(--ink); font-weight: 700; }
.o-stages li.is-active::before { content: "●"; color: var(--accent); }
.o-stages li.is-done::before { content: "✓"; color: var(--ok); font-weight: 800; }

.o-grid { display: grid; gap: 16px; }
.o-grid__main > section + section, .o-grid__main > details + section { margin-top: 14px; }
.o-gallery { position: relative; }
.o-gallery__track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-radius: var(--radius); }
.o-gallery__track::-webkit-scrollbar { display: none; }
.o-gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.o-gallery__slide img { display: block; width: 100%; height: auto; }
.o-gallery__dots { display: flex; justify-content: center; gap: 8px; padding-top: 10px; }
.o-gallery__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.o-gallery__dots i.is-on { background: var(--accent); }
.o-gallery__note { text-align: center; }

.o-trouble { margin-top: 10px; font-size: 14px; color: var(--muted); }
.o-trouble summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.o-trouble__form { display: grid; gap: 8px; }
.o-trouble__form textarea { width: 100%; padding: 12px; font: inherit; border: 1.5px solid var(--line); border-radius: 12px; }

.o-collect-box { display: grid; gap: 12px; }
.o-collect-box h2, .o-collect-box p { margin: 0; }
.o-collect-count { font-weight: 700; color: var(--accent); }
.o-share { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.o-share .o-btn { min-height: 48px; padding: 8px 6px; font-size: 14px; }
.o-share #share-native, .o-share #share-copy { grid-column: 1 / -1; }
.o-wishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.o-wish { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.o-wish.is-hidden { opacity: .5; }
.o-wish img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.o-wish__body p { margin: 4px 0; font-size: 15px; white-space: pre-line; }
.o-wish__body .o-link { padding: 8px 0; min-height: 44px; }

.o-prices-grid { display: grid; gap: 12px; }
.o-tier { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; position: relative; background: #fff; }
.o-tier--full { border-color: var(--accent); }
.o-badge { position: absolute; top: -11px; left: 14px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.o-contact input { margin-top: 6px; }

.o-howto { margin: 12px 0 0; }
.o-howto summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.o-rebuild { margin-top: 14px; display: grid; gap: 6px; }
.o-feedback { display: grid; gap: 12px; }
.o-feedback h2 { margin: 0; }
.o-stars { display: flex; gap: 6px; }
.o-star { width: 52px; height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 28px; line-height: 1; color: #cfc3b5; cursor: pointer; }
.o-star.is-on { color: #e0a100; border-color: #e0a100; }
.o-feedback form { display: grid; gap: 12px; }

.o-thanks { display: grid; gap: 10px; }
.o-count { text-align: right; }

@media (min-width: 560px) { .o-draft__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .o-main.o-order, .o-main.o-collect { max-width: 1040px; }
  .o-grid.has-gallery { grid-template-columns: minmax(300px, 400px) 1fr; gap: 32px; align-items: start; }
  .o-grid.has-gallery .o-grid__side { position: sticky; top: 16px; }
  .o-prices-grid { grid-template-columns: 1fr 1fr; }
  .o-prices-grid .o-tier--full { order: 2; }
  .o-actions { position: static; margin: 6px 0 0; padding: 0; background: none; grid-template-columns: auto 1fr; }
  .o-actions .o-btn { width: auto; min-width: 200px; }
  .o-share { grid-template-columns: repeat(4, auto); }
  .o-share #share-native, .o-share #share-copy { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
