*, *::before { box-sizing: border-box; }
/* Светлая тема по умолчанию; тёмную включает кнопка (public/js/theme.js ставит data-theme="dark" на <html>). */
:root {
  --bg: #f6f4ef; --card: #ffffff; --line: rgba(17, 17, 17, .1); --line-strong: rgba(17, 17, 17, .22);
  --text: #141414; --muted: #5c5b57; --dim: #8b8a85; --danger: #c0392b;
  --accent: #141414; --accent-ink: #ffffff; --accent-hover: #3a3a3a;
  --field: #ffffff; --field-focus: #ffffff; --soft: rgba(17, 17, 17, .04); --ring: rgba(17, 17, 17, .08);
  --gold: #9a7420; --ok: #1e7a3c; --warn: #8a6416; --swatch-edge: rgba(17, 17, 17, .14);
  color-scheme: light;
  --f-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 6px; --chamfer: 12px;
}
:root[data-theme="dark"] {
  --bg: #050505; --card: #0d0d0d; --line: rgba(255, 255, 255, .1); --line-strong: rgba(255, 255, 255, .24);
  --text: #f4f4f2; --muted: #a6a6a2; --dim: #71716d; --danger: #ff7a7a;
  --accent: #ffffff; --accent-ink: #000000; --accent-hover: #d9d9d6;
  --field: #050505; --field-focus: #000000; --soft: rgba(255, 255, 255, .05); --ring: rgba(255, 255, 255, .06);
  --gold: #e8cf8f; --ok: #9be3a8; --warn: #e8cf8f; --swatch-edge: rgba(255, 255, 255, .18);
  color-scheme: dark;
}
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { margin: 0; font: 600 clamp(26px, 7vw, 40px)/1.15 var(--f-display); letter-spacing: -.01em; }
h2 { font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand .mark { width: 30px; height: auto; }
.brand-name { font: 600 18px/1 var(--f-display); letter-spacing: .01em; }
.brand-name small { display: block; margin-top: 4px; font: 500 9.5px/1 var(--f-mono); letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ''; width: 9px; height: 9px; background: currentColor; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }

/* Логотип и переключатель темы в одной строке */
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-toggle { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--card); color: var(--text); -webkit-tap-highlight-color: transparent; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-moon { fill: currentColor; }
.theme-toggle .i-sun { display: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .i-sun circle { fill: currentColor; stroke: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .theme-toggle:hover { border-color: var(--accent); } }

body.centered { min-height: 100svh; display: grid; place-items: center; padding: 16px; }
.notice-card { max-width: 440px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-align: center; }
.notice-card h1 { margin-top: 24px; font-size: 24px; }
.notice-card p { color: var(--muted); }
.contact-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; margin-top: 16px; }
.contact-row a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-underline-offset: 3px; }

/* ── Главная gift.cclab.kz: сайт продукта. Шапка, main и подвал — в одной колонке до 1120px. ── */
.landing-top, .landing, .landing-foot { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.landing-top { padding-top: 20px; padding-bottom: 4px; }
.top-links { display: flex; align-items: center; gap: 14px; }
.site-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--text); font: 500 13px/1 var(--f-mono); letter-spacing: .06em; text-decoration: none; }
.site-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.top-nav { display: none; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.top-nav a:hover { color: var(--text); }
@media (min-width: 960px) { .top-nav { display: flex; gap: 26px; } }

/* Кнопки: основная (.ui-btn, ниже в файле) и контурная */
/* Контур рисует фон кнопки, а заливку — ::before на 1px внутри: так обводка не обрывается на срезанных углах. */
.ghost-btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; background: var(--line-strong); color: var(--text); font: 600 16px/1 var(--f-body); text-decoration: none; clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer)); }
.ghost-btn::before { content: ''; position: absolute; inset: 1px; z-index: -1; background: var(--ghost-fill, var(--bg)); clip-path: polygon(calc(var(--chamfer) - .5px) 0, 100% 0, 100% calc(100% - var(--chamfer) + .5px), calc(100% - var(--chamfer) + .5px) 100%, 0 100%, 0 calc(var(--chamfer) - .5px)); }
.ghost-btn:hover { background: var(--accent); }
.ghost-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.landing .ui-btn { text-decoration: none; }

/* Первый экран: текст слева, телефоны с открыткой справа (на телефоне — под текстом) */
.hero { display: grid; gap: 36px; padding: 36px 0 8px; }
.hero .eyebrow { display: flex; margin: 0 0 18px; line-height: 1.35; }
.hero h1 { max-width: 13em; font-size: clamp(29px, 3.4vw + 12px, 50px); line-height: 1.1; }
.nowrap { white-space: nowrap; }
.lead { max-width: 34em; margin: 18px 0 0; color: var(--muted); font-size: clamp(17px, .6vw + 14px, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.hero-facts li { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 500 12px/1.2 var(--f-mono); letter-spacing: .03em; }
.hero-note { max-width: 30em; margin: 22px 0 0; padding-left: 14px; border-left: 2px solid var(--line-strong); color: var(--muted); font-size: 14.5px; }
.hero-art { margin: 0; }
.hero-stage { position: relative; width: min(100%, 440px); margin: 0 auto; aspect-ratio: 1 / 1.08; }
.hero-phone { position: absolute; width: 46%; aspect-ratio: 390 / 760; overflow: hidden; border: 6px solid #111; border-radius: 30px; background: #111; box-shadow: 0 0 0 1px var(--line-strong), 0 28px 60px -28px rgba(0, 0, 0, .55); }
.hero-phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-phone.is-back { top: 0; left: 9%; transform: rotate(-6deg); }
.hero-phone.is-front { top: 7%; right: 5%; z-index: 1; transform: rotate(4deg); }
.hero-card { position: absolute; bottom: 1%; left: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 38%; padding: 10px 10px 9px; border-radius: 6px; background: #fffdf8; color: #141414; text-decoration: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 20px 40px -18px rgba(0, 0, 0, .55); transform: rotate(-7deg); transition: transform .3s ease; }
.hero-card:hover { transform: rotate(-4deg) translateY(-4px); }
.hero-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hero-card-for { font: 600 clamp(11px, 1.2vw + 6px, 14px)/1 var(--f-display); }
.hero-qr, .hero-qr svg { display: block; width: 100%; height: auto; }
.hero-card-hint { color: #5c5b57; font: 500 9px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.hero-art figcaption { max-width: 24em; margin: 16px auto 0; color: var(--dim); font-size: 13px; text-align: center; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 40px; padding: 48px 0 16px; }
}

/* Разделы: подпись моноширинным, крупный заголовок, пояснение */
.l-sec { padding-top: 64px; scroll-margin-top: 12px; }
.sec-head { max-width: 42em; margin-bottom: 26px; }
.sec-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--muted); font: 500 12px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.sec-kicker::before { content: ''; flex: none; width: 9px; height: 9px; background: currentColor; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.landing h2 { margin: 0; color: var(--text); font: 600 clamp(24px, 2.4vw + 15px, 38px)/1.15 var(--f-display); letter-spacing: -.01em; text-transform: none; }
.sec-lead { margin: 12px 0 0; color: var(--muted); font-size: 17px; }
@media (min-width: 960px) { .l-sec { padding-top: 96px; } }

/* Как это работает: четыре шага */
.step-list, .who-list, .point-list { display: grid; margin: 0; padding: 0; list-style: none; }
.step-list { gap: 10px; }
.step-list li { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.step-num { margin-bottom: 6px; font: 600 26px/1 var(--f-display); }
.step-who { position: absolute; top: 18px; right: 18px; padding: 5px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.step-list b { font-size: 17px; font-weight: 700; line-height: 1.3; }
.step-list small { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* Для кого */
.who-list { gap: 10px; }
/* На телефоне значок слева от текста, на широком экране — над ним */
.who-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-content: start; column-gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.who-icon { display: grid; grid-row: span 2; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; }
.who-icon svg, .end-logo svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.who-list h3, .point-list h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.who-list p, .point-list p { margin: 0; color: var(--muted); font-size: 15px; }
@media (min-width: 640px) {
  .step-list, .who-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who-list li { display: block; padding: 20px; }
  .who-icon { margin-bottom: 14px; }
}
@media (min-width: 960px) { .step-list, .who-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Списки преимуществ: номер слева, заголовок и текст */
.point-list { column-gap: 32px; }
.point-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-content: start; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.point-num { grid-row: span 2; color: var(--dim); font: 500 12px/1.7 var(--f-mono); letter-spacing: .08em; }
.point-star { grid-row: span 2; width: 12px; height: 12px; margin-top: 5px; background: var(--text); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.point-list h3, .point-list p { grid-column: 2; }
@media (min-width: 640px) { .point-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .point-list.is-buyer { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Магазину: преимущества и пример последнего экрана открытки (в цветах шаблона «Цветение») */
.shop-grid { display: grid; gap: 28px; }
.shop-aside { display: grid; gap: 14px; align-content: start; }
.end-screen { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 20px 20px; border-radius: 22px; background: linear-gradient(165deg, #fbf2ec, #f2dcdc); color: #2d1d1f; text-align: center; box-shadow: 0 0 0 1px var(--line); }
.end-label { align-self: stretch; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px dashed rgba(45, 29, 31, .22); color: rgba(45, 29, 31, .62); font: 500 10.5px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.end-logo { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #fff; color: #c24a66; box-shadow: 0 8px 18px -10px rgba(120, 40, 60, .6); }
.end-name { font: 600 20px/1.2 var(--f-display); }
.end-sub { color: rgba(45, 29, 31, .72); font-size: 14px; }
.end-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.end-links span { padding: 8px 12px; border-radius: 99px; background: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 0 0 1px rgba(45, 29, 31, .08); }
.end-links span:first-child { background: #c24a66; color: #fff; }
.end-made { margin-top: 14px; color: rgba(45, 29, 31, .56); font: 500 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
@media (min-width: 960px) {
  .shop-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 48px; align-items: start; }
  .shop-aside { position: sticky; top: 24px; }
}

/* Шаблоны. На телефоне — строки: превью слева, название и описание справа.
   На широком экране — карточки с крупным превью, разделы идут в ряд. */
.tpl-groups { display: grid; }
.tpl-section { margin: 22px 0 10px; color: var(--muted); font: 500 12px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.tpl-list { display: grid; gap: 8px; }
.tpl-link { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: inherit; text-decoration: none; transition: border-color .2s ease; }
.tpl-link:hover { border-color: var(--line-strong); }
.tpl-link > span { min-width: 0; }
.tpl-thumb, .tpl-link i { display: block; flex: none; width: 64px; height: auto; aspect-ratio: 3 / 4; border-radius: 9px; object-fit: cover; object-position: 50% 30%; background: var(--swatch); box-shadow: 0 0 0 1px var(--line); transition: transform .25s ease, box-shadow .25s ease; }
.tpl-link i { background: linear-gradient(115deg, var(--swatch) 62%, var(--swatch-accent) 62%); }
.tpl-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tpl-link b { display: block; font-size: 15.5px; font-weight: 700; }
.tpl-link small { display: -webkit-box; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 13.5px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
@media (min-width: 640px) {
  .tpl-groups { display: flex; flex-wrap: wrap; gap: 8px 32px; }
  .tpl-list { display: flex; gap: 14px; }
  .tpl-link { flex-direction: column; align-items: stretch; gap: 10px; width: 164px; padding: 0; border: 0; background: none; }
  .tpl-thumb, .tpl-link i { width: 100%; border-radius: 14px; }
  .tpl-link:hover .tpl-thumb, .tpl-link:hover i { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-strong), 0 16px 30px -18px rgba(0, 0, 0, .55); }
  .tpl-link small { font-size: 13px; }
}

/* Частые вопросы: <details>, работает без скриптов */
.faq-list { max-width: 820px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0; font-size: 17px; font-weight: 600; line-height: 1.35; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ''; flex: none; width: 13px; height: 13px; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-item p { max-width: 44em; margin: 0 0 18px; color: var(--muted); }

/* Последний призыв: блок в цвете акцента (чёрный в светлой теме, белый в тёмной) */
.cta-block { margin-top: 72px; padding: 30px 22px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); }
.cta-block .sec-kicker { color: inherit; opacity: .72; }
.landing .cta-block h2 { max-width: 17em; color: inherit; }
.cta-text { max-width: 36em; margin: 14px 0 0; font-size: 17px; opacity: .82; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
/* На телефоне кнопки не помещаются в строку: каждая на всю ширину, а не лесенкой разной длины */
.hero-actions > *, .cta-actions > * { flex: 1 1 auto; }
@media (min-width: 640px) { .hero-actions > *, .cta-actions > * { flex: 0 0 auto; } }
.cta-block .ui-btn { border-color: var(--accent-ink); background: var(--accent-ink); color: var(--accent); }
.cta-block .ui-btn:hover { border-color: var(--accent-ink); background: color-mix(in srgb, var(--accent-ink) 86%, var(--accent)); }
.cta-block .ghost-btn { --ghost-fill: var(--accent); background: color-mix(in srgb, var(--accent-ink) 40%, transparent); color: inherit; }
.cta-block .ghost-btn:hover { background: var(--accent-ink); }
.cta-block .ui-btn:focus-visible, .cta-block .ghost-btn:focus-visible { outline-color: var(--accent-ink); }
.cta-block .contact-row { justify-content: flex-start; margin-top: 18px; }
.cta-block .contact-row a { color: inherit; }
@media (min-width: 760px) { .cta-block { padding: 48px; } }

.landing-foot { margin-top: 40px; padding-bottom: 40px; text-align: center; }
.landing-foot::before { content: ''; display: block; height: 1px; margin-bottom: 22px; background: var(--line); }
.made-by { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; text-decoration: none; }
.made-by .mark { width: 22px; height: auto; color: var(--text); flex: none; }
.made-by b { color: var(--text); font-weight: 600; }
.made-by:hover span { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .hero-card, .tpl-thumb, .tpl-link i, .faq-item summary::after { transition: none; } }

.catalog { max-width: 980px; margin: 0 auto; padding: 22px 20px 48px; }
.catalog .eyebrow { display: flex; margin: 28px 0 16px; }
.catalog-sub { max-width: 34em; margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 26px; }
.cat-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: border-color .2s, transform .2s; }
.cat-card:hover { border-color: var(--line-strong); }
.cat-art { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 196px; padding: 14px 16px 16px; overflow: hidden; color: var(--c-ink); text-decoration: none;
  background: radial-gradient(120% 90% at 80% 0%, var(--c-bg2), var(--c-bg) 70%); }
.cat-art:active { transform: scale(.99); }
.cat-tag { justify-self: start; padding: 6px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c-a) 22%, transparent); color: var(--c-ink); font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.cat-icon { position: absolute; top: 18px; right: 14px; width: 112px; height: 112px; opacity: .95; }
.cat-icon svg { width: 100%; height: 100%; overflow: visible; }
.cat-icon .i-a { fill: var(--c-a); }
.cat-icon .i-a2 { fill: var(--c-a2); }
.cat-icon .i-ink { fill: var(--c-ink); }
.cat-icon .i-stroke { stroke: var(--c-ink); }
.cat-name { align-self: end; max-width: 64%; font: 600 22px/1.15 var(--f-display); }
.cat-dots { display: flex; gap: 6px; margin-top: 10px; }
.cat-dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c-ink) 40%, transparent); }

/* Разделы по поводам: строка якорей (листается вбок на телефоне) и заголовок над сеткой каждого раздела. */
.cat-sections { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; margin: 22px -20px 0; padding: 10px 20px; overflow-x: auto; scrollbar-width: none; background: var(--bg); }
.cat-sections::-webkit-scrollbar { display: none; }
.cat-sections a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.cat-sections a:hover { border-color: var(--line-strong); }
.cat-sections small { color: var(--muted); font-size: 12.5px; }
.cat-section { scroll-margin-top: 70px; }
.cat-section h2 { margin: 34px 0 0; font: 600 22px/1.2 var(--f-display); }
.cat-section .cat-grid { margin-top: 14px; }
.cat-section .cat-tag { display: none; }

/* Карточка с превью: снимок первого экрана открытки, название и цвета поверх затемнения снизу. */
.cat-art.has-preview { min-height: 0; aspect-ratio: 4 / 5; background: var(--c-bg); color: #fff; }
.cat-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .5s ease; }
.cat-art.has-preview:hover .cat-preview { transform: scale(1.03); }
.cat-art.has-preview::after { content: ''; position: absolute; inset: 42% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); pointer-events: none; }
.cat-art.has-preview > :not(.cat-preview) { position: relative; z-index: 1; }
.cat-art.has-preview .cat-tag { background: rgba(0, 0, 0, .5); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cat-art.has-preview .cat-name { max-width: 100%; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.cat-art.has-preview .cat-dots i { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }

/* Шаги: шаблон → текст и фото → проверка */
.steps { display: flex; gap: 6px; margin: 22px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--dim); font-size: 12.5px; line-height: 1.15; }
.steps b { display: grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--muted); font: 600 11px/1 var(--f-mono); }
.steps li.on { border-color: var(--accent); color: var(--text); }
.steps li.on b { background: var(--accent); color: var(--accent-ink); }
.steps li.done { color: var(--muted); }
.steps li.done b { background: var(--line-strong); color: var(--text); }

/* Обложка формы в цветах палитры */
.form-hero { position: relative; display: grid; gap: 6px; margin-top: 12px; padding: 18px 18px 20px; overflow: hidden; border-radius: 16px; color: var(--p-ink);
  background: radial-gradient(120% 120% at 100% 0%, var(--p-bg2), var(--p-bg) 70%); transition: background .35s ease, color .35s ease; }
.form-hero::after { content: ''; position: absolute; top: -40px; right: -30px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--p-a), var(--p-a2)); opacity: .85; transition: background .35s ease; }
.form-hero > * { position: relative; z-index: 1; }
.form-hero b { max-width: 70%; font: 600 26px/1.15 var(--f-display); }
.form-hero small { max-width: 70%; font-size: 14px; opacity: .8; }
.hero-tag { justify-self: start; padding: 5px 9px; border-radius: 99px; background: color-mix(in srgb, var(--p-ink) 14%, transparent); font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }

/* Выбор палитры */
.palette-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.palette { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 4px 9px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.palette input { position: absolute; opacity: 0; pointer-events: none; }
.palette-art { position: relative; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 70% 25%, var(--p-bg2), var(--p-bg) 70%); box-shadow: inset 0 0 0 1px var(--swatch-edge); }
.palette-art i { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--p-a) 50%, var(--p-a2) 50%); box-shadow: 0 0 0 2px var(--card); }
.palette-name { font-size: 12.5px; color: var(--muted); text-align: center; }
.palette:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.palette:has(input:checked) .palette-name { color: var(--text); }
.palette:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.palette-preview { display: inline-flex; align-items: center; min-height: 40px; margin-top: 6px; color: var(--muted); font-size: 14px; text-underline-offset: 3px; }
/* Язык открытки: две карточки, в каждой — подпись шаблона над именем на этом языке. */
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-option { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lang-option input { position: absolute; opacity: 0; pointer-events: none; }
.lang-option b { font-size: 16px; font-weight: 600; }
.lang-option small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.lang-option:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.lang-option:has(input:checked) small { color: var(--text); }
.lang-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* В Manrope и Unbounded нет казахских букв (ә, ғ, қ, ң, ө, ұ, ү, һ): казахский текст целиком набираем Onest,
   иначе эти буквы браузер возьмёт из другого шрифта и слово «рассыплется». */
[lang="kk"] { font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.cat-body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 14px 16px 16px; }
.cat-body p { flex: 1; margin: 0; color: var(--muted); font-size: 14.5px; }
.cat-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cat-actions > a:first-child { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-size: 14.5px; text-underline-offset: 3px; }
.ui-btn.small { min-height: 44px; padding: 0 22px; font-size: 14.5px; text-decoration: none; --chamfer: 9px; }
.back-link { display: flex; align-items: center; min-height: 44px; margin-top: 14px; color: var(--muted); font-size: 14.5px; text-decoration: none; }
.form-head .back-link + h1 { margin-top: 6px; }
.form-head .back-link { margin-top: 10px; }

.form-wrap { max-width: 540px; margin: 0 auto; padding: 22px 20px 48px; }
.form-head { margin-bottom: 28px; }
.form-head h1 { margin-top: 32px; }
.form-sub { margin: 8px 0 0; color: var(--muted); }
.field { display: block; margin: 0 0 22px; padding: 0; border: 0; }
.field > span, .field > label, .field legend { display: block; margin-bottom: 8px; padding: 0; font: 500 12px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input:not([type=radio]):not([type=file]):not([type=checkbox]), textarea { width: 100%; min-height: 50px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--field); font-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--field-focus); box-shadow: 0 0 0 4px var(--ring); }
.chip:focus-visible, .ui-btn:focus-visible, .song-play:focus-visible, .thumb-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { resize: vertical; line-height: 1.5; }
.field-error, .form-error { display: block; margin: 7px 0 0; color: var(--danger); font-size: 13.5px; font-style: normal; }
.field-error:empty, .form-error:empty { display: none; }
.counter { display: block; margin-top: 6px; color: var(--dim); font: 500 12px/1 var(--f-mono); text-align: right; }

.chip { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; font-size: 14px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .chip:hover { border-color: var(--accent); } }

.field-hint { margin: -2px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.music-status { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.music-status:empty { display: none; }
.music-status.ok { color: var(--ok); }
.music-status.warn { color: var(--warn); }
.music-status.bad { color: var(--danger); }
/* Ошибку уже показывает проверка на месте, второй раз под полем её не дублируем. */
.music-status.bad ~ .field-error { display: none; }
.music-start { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.music-start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.music-start-row input.start-num { width: 64px; min-height: 44px; padding: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.music-start .field-hint { margin: 8px 0 0; font-size: 13px; }
.music-preview { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.music-preview iframe { display: block; width: 100%; height: var(--player-h, 180px); border: 0; }
.music-preview[data-service="youtube"] iframe { height: auto; aspect-ratio: 16 / 9; min-height: 200px; }
.text-picker { --tp-accent: var(--accent); margin: 0 0 12px; padding: 14px 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tp-title { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tp-accent); }
.tp-lang { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line-strong); border-radius: 99px; }
.tp-lang button { min-height: 34px; min-width: 50px; padding: 0 12px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.tp-lang button[aria-pressed="true"] { background: var(--tp-accent); color: var(--accent-ink); }
.tp-occasions { display: flex; gap: 8px; margin: 12px -14px 4px; padding: 2px 14px 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.tp-occasions::-webkit-scrollbar { display: none; }
.tp-occasions .chip { scroll-snap-align: start; }
.text-picker[data-lang="ru"] [data-l="kk"], .text-picker[data-lang="kk"] [data-l="ru"] { display: none; }
.tp-variants { display: grid; gap: 8px; }
.variant { display: block; width: 100%; padding: 12px 14px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; text-align: left; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; -webkit-tap-highlight-color: transparent; }
.variant small { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; font: 500 11px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.variant[aria-pressed="true"] { border-color: var(--tp-accent); background: var(--soft); }
.variant[aria-pressed="true"] small { color: var(--tp-accent); }
.variant[aria-pressed="true"] small::after { content: '✓ в тексте'; letter-spacing: .04em; }
.variant-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 15px; line-height: 1.45; color: var(--text); }
.variant:focus-visible, .tp-lang button:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--tp-accent, var(--accent)); outline-offset: 2px; }
@media (hover: hover) { .variant:hover { border-color: var(--text); } }
.message-foot { display: flex; align-items: center; gap: 12px; min-height: 30px; margin-top: 6px; }
.message-foot .counter { margin: 0 0 0 auto; }
.link-btn { min-height: 36px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
textarea.flash { animation: text-flash .7s ease; }
@keyframes text-flash { from { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); } }

.photo-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--card); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; font-size: 20px; }
.thumb.add { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; }
.thumb.add span { font-size: 28px; line-height: 1; }
.thumb.add small { font: 500 11px/1.6 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }

.song-list { display: grid; gap: 8px; }
.song { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 4px 8px 4px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; }
.song:has(input:checked) { border-color: var(--accent); }
.song input { flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.song-name { flex: 1; overflow-wrap: anywhere; }
.song-play { flex: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; font-size: 13px; }

.ui-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 600 16px/1 var(--f-body); clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer)); }
.ui-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ui-btn.wide { width: 100%; }
.ui-btn:disabled { opacity: .55; }
.form-note { margin: 12px 0 0; color: var(--dim); font-size: 13.5px; text-align: center; }

/* ---------- Юридические документы, согласие в форме, ссылки на документы ---------- */
.legal { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px 48px; }
.legal-doc .eyebrow { margin-top: 22px; }
/* «Конфиденциальности» — длинное слово: широкий заголовочный шрифт уменьшен, чтобы оно влезало в экран телефона */
.legal-doc h1 { margin: 14px 0 10px; font-size: clamp(22px, 6vw, 38px); overflow-wrap: break-word; }
.legal-lead { margin: 0 0 6px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.legal-meta { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.legal-meta a, .legal-doc a, .legal-back a { color: var(--text); text-underline-offset: 3px; }
.legal-doc section { padding: 18px 0 6px; border-top: 1px solid var(--line); }
.legal-doc h2 { margin: 0 0 10px; font: 600 18px/1.3 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--text); }
.legal-doc p, .legal-doc li { margin: 0 0 10px; font-size: 15.5px; line-height: 1.6; }
.legal-doc ul { margin: 0 0 12px; padding-left: 20px; }
.legal-back { margin-top: 24px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 18px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted); font-size: 13.5px; text-underline-offset: 3px; }
.catalog .legal-links { margin-top: 36px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 6px; font-size: 14px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.consent-links { margin: 0 0 4px 34px; font-size: 13.5px; }
.consent-links a { color: var(--text); text-underline-offset: 3px; }
