/* Сайт и кабинет клиента PROFITROLLO: телефон 375 px и компьютер, светлая тема бренда. © 2026 FLUX CRM. Все права защищены.
   Только свои шрифты и файлы (CSP): Onest self-host (ниже), ни одного внешнего адреса. Цвета — токены на :root.
   25.10.2026 (задача CRM №773, канва «Вселенная FLUX — дизайн», доски CakeHome.dc.html/Cake.dc.html): акцент
   #B8235F, фон #FBF4F6, шрифт Onest вместо системного — те же имена переменных, новые значения. */
:root {
  color-scheme: light;
  --ink: #1A1916; --muted: #5F5A52; --line: #F0DCE4; --accent: #B8235F; --accent-dark: #8C1846; --pink: #FBE3EC; --bg: #FBF4F6; --soft: #FFFFFF;
  --ok: #2F7D4F; --warn: #8A5A00; --warn-bg: #FFF4DC; --err-bg: #FDE8EC; --info-bg: #F3EEEC;
  --radius: 14px; --gutter: 16px; --tabbar: 64px; --wide: 900px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Onest self-host (переменный по начертанию 400-800, те же 4 подмножества, что у feldefel-sait — latin/latin-ext
   для румынских ă â î ș ț, cyrillic/cyrillic-ext для русского; 92 КБ все 4 файла, без внешнего Google Fonts). */
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
body.modal-open { overflow: hidden; }
img, svg { max-width: 100%; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 19px; line-height: 1.3; margin: 24px 0 8px; }
h3 { font-size: 16px; margin: 16px 0 6px; }
p { margin: 0 0 12px; }
a { color: var(--accent-dark); }
b { font-weight: 650; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; }
.error { color: var(--accent-dark); font-size: 15px; min-height: 0; }
.error:empty { display: none; }
.lead { font-size: 17px; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.noscript { padding: var(--gutter); }
@media (max-width: 899px) { .only-wide { display: none !important; } }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.stack { display: grid; gap: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* ── шапка и навигация ── */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.top, .foot { padding-left: max(var(--gutter), calc((100vw - 1120px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100vw - 1120px) / 2 + var(--gutter))); }
.brand { font-weight: 800; letter-spacing: .06em; color: var(--accent); text-decoration: none; font-size: 16px; }
/* переключатель брендов (.flux-brandswitch — flux-module/ui/tokens.css, задача CRM №773): сама «вывеска» —
   стиль прежнего .brand, раскрывающаяся панель мест — из пакета. */
.top > .flux-brandswitch > summary { font-weight: 800; letter-spacing: .06em; color: var(--accent); font-size: 16px; min-height: 40px; }
.top > .flux-brandswitch > summary::after { border-color: var(--accent); }
.nav { display: none; gap: 20px; margin-right: auto; margin-left: 28px; }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 500; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-link.on { border-bottom-color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 8px; }
.langs { display: flex; gap: 2px; }
.lang { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 7px; border-radius: 8px; cursor: pointer; min-height: 36px; }
.lang.on { background: var(--ink); color: #fff; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tab { flex: 1; display: grid; justify-items: center; gap: 0; padding: 8px 4px; text-decoration: none; color: var(--muted); font-size: 12px; min-height: var(--tabbar); align-content: center; }
.tab i { font-style: normal; font-size: 18px; line-height: 1.2; }
.tab.on { color: var(--accent); font-weight: 650; }
body.route-c { padding-bottom: 0; }
body.route-c .tabbar { display: none; }
.foot { padding: 24px var(--gutter) 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); margin-top: 32px; }
.foot p { margin: 0 0 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; }
.foot { padding-left: max(var(--gutter), calc((100vw - 1120px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100vw - 1120px) / 2 + var(--gutter))); }

/* ── страницы ── */
.page { max-width: 1120px; margin: 0 auto; padding: 20px var(--gutter) 8px; }
.page.narrow { max-width: 640px; }
.home .hero { padding: 8px 0 12px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.trust li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.grid4 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.tile { display: grid; align-content: end; min-height: 110px; padding: 14px; border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--soft); border: 1px solid var(--line); }
.tile span { color: var(--muted); font-size: 13px; }
.how-list { list-style: none; counter-reset: how; padding: 0; margin: 0; display: grid; gap: 14px; }
.how-list li { counter-increment: how; display: grid; gap: 2px; padding-left: 44px; position: relative; }
.how-list li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--pink); color: var(--accent-dark); display: grid; place-items: center; font-weight: 700; }
.how-list span { color: var(--muted); }

/* ── кнопки, чипы, карточки, поля ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-link { background: transparent; color: var(--accent-dark); text-decoration: underline; min-height: 40px; padding: 0 6px; font-weight: 500; }
.btn-icon { min-height: 40px; width: 40px; padding: 0; background: #fff; border-color: var(--line); color: var(--ink); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
h1:focus { outline: none; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 15px; padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.off, .chip[disabled] { background: var(--soft); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.chip-note-inline { display: block; font-size: 12px; color: var(--muted); }
.chip.off .chip-note-inline { color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 12px; }
.card h2 { margin-top: 4px; }
.start-card { display: grid; gap: 4px; text-decoration: none; color: var(--ink); position: relative; padding-right: 44px; min-height: 84px; align-content: center; }
.start-card span { color: var(--muted); font-size: 14px; }
.start-card i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--accent); font-size: 20px; }
.start-card.lead-card { background: var(--accent); border-color: var(--accent); color: #fff; }
.start-card.lead-card span { color: #F9E6EC; }
.start-card.lead-card i { color: #fff; }
.start-card.disabled { opacity: .55; }
/* главная по доске CakeHome.dc.html (задача CRM №773): плитки без стрелки, больше свободного места под текст */
.starts .start-card { padding-right: 16px; }

/* ── главная: фото-шапка, горизонтальная лента популярных, партнёрские плитки, «честно про печать» ── */
.hero-photo { padding: 0; overflow: hidden; }
.hero-photo-ph { height: 250px; background: var(--pink); position: relative; }
.hero-photo-ph span { position: absolute; left: 14px; bottom: 10px; font-size: 12px; color: var(--accent-dark); }
.hero-photo-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-static { background: var(--bg); border-radius: 999px; padding: 6px 10px; font-size: 13px; color: var(--muted); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.hcard { flex: 0 0 150px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.hcard-ph { display: block; height: 120px; background: var(--pink); }
.hcard-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; }
.hcard-body b { font-size: 14px; }
.hcard-body span { font-size: 13px; color: var(--muted); }
.grid2-equal { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.partner-tile { display: flex; flex-direction: column; gap: 4px; color: #fff; text-decoration: none; }
.partner-tile.party { background: #8E3A1E; border-color: #8E3A1E; }
.partner-tile.business { background: #2F5D8A; border-color: #2F5D8A; }
.partner-tile span { color: rgba(255, 255, 255, .85); font-size: 12px; }
.print-honest p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (min-width: 640px) { .hero-photo { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; } .hero-photo-ph { height: auto; } }
.card.draft { background: var(--pink); border-color: var(--pink); }
.card.offer { background: var(--soft); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--pink); color: var(--accent-dark); font-size: 13px; font-weight: 600; }
.badge.ok { background: #E6F4EA; color: var(--ok); }
.badge.dark { background: var(--ink); color: #fff; }
.field { margin: 0 0 16px; display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 600; }
input[type="text"], input[type="tel"], input[type="search"], textarea, select { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #CDBFBA; border-radius: 12px; padding: 12px 14px; min-height: 48px; }
textarea { resize: vertical; min-height: 96px; }
.code-input { letter-spacing: .4em; font-size: 24px; text-align: center; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.banner { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--info-bg); margin: 0 0 12px; font-size: 15px; }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.banner-error { background: var(--err-bg); color: var(--accent-dark); }
#netbar .banner { margin: 0; border-radius: 0; justify-content: center; text-align: center; }
.file-input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 8px; }
.photos { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.photo { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.photo img, .thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.photo-info { display: grid; gap: 2px; min-width: 0; flex: 1; }
.photo-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatches { display: flex; gap: 4px; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: none; }
.thumbs { display: flex; gap: 8px; margin: 8px 0; }

/* ── конструктор ── */
.constructor { display: grid; gap: 16px; }
.c-head { display: grid; gap: 10px; margin-bottom: 8px; }
/* живой эскиз торта (доска Cake.dc.html, задача CRM №773) — круг с текстом, тот же цвет, что уйдёт в бриф */
.preview-wrap { background: var(--pink); border-radius: var(--radius); padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.cake-preview { display: flex; align-items: center; justify-content: center; padding: 14px 0; }
.cake-circle { width: 200px; height: 200px; border-radius: 50%; box-shadow: 0 18px 40px rgba(120, 20, 60, .18), inset 0 0 0 10px rgba(0, 0, 0, .04); display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; text-align: center; transition: background .15s; }
.cake-circle.no-color { background: var(--soft); border: 1.5px dashed var(--line); }
.cake-text { font-size: 20px; line-height: 1.15; font-weight: 800; word-break: break-word; }
.print-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; }
.print-toggle b { display: block; font-size: 14px; }
.print-toggle .muted { display: block; font-size: 12px; }
.print-toggle .check { gap: 0; }
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 8px 0 0; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; flex: 1; }
.step b { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; flex: none; background: #fff; }
.step-cur { color: var(--ink); font-weight: 650; }
.step-cur b { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-past b { background: var(--pink); color: var(--accent-dark); border-color: var(--pink); }
.colors { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.color { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.color-name { display: grid; flex: 1; min-width: 0; }
.gift-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 20px; letter-spacing: .02em; }
.facts { margin: 0 0 12px; display: grid; gap: 8px; }
.fact { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.fact dt { color: var(--muted); font-size: 14px; grid-column: 1; }
.fact dd { margin: 0; font-weight: 500; grid-column: 1; }
.fact .btn { grid-column: 2; grid-row: 1 / span 2; }
.rounds { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.round { border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.round.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.round.pending { color: var(--muted); border-style: dashed; cursor: default; }
.result-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.preview { margin: 8px 0 12px; max-width: 520px; }
.pic { position: relative; background: var(--soft); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; aspect-ratio: 1 / 1; display: block; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-small { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 12px; flex: none; }
.design-pic { aspect-ratio: 4 / 3; border-radius: 12px; margin-bottom: 8px; }
.design-pic.big { aspect-ratio: 16 / 10; margin: 12px 0; }
.pic-broken::after { content: "🎂"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; opacity: .5; }
.is-pending .pic { background: linear-gradient(110deg, var(--soft) 30%, #fff 50%, var(--soft) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.preview figcaption { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.tagline { font-size: 12px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.checks ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.checks li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.checks li span { color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.state { padding: 14px 16px; border-radius: 14px; border-left: 5px solid var(--line); background: var(--soft); margin: 0 0 14px; }
.state > b { display: block; font-size: 17px; margin-bottom: 4px; }
.state p { margin: 0 0 8px; color: var(--muted); }
.state blockquote { margin: 8px 0; padding: 8px 12px; background: #fff; border-radius: 10px; font-style: italic; }
.state-wait { border-left-color: var(--accent); }
.state-error { border-left-color: #C0392B; background: var(--err-bg); }
.state-conflict { border-left-color: var(--warn); background: var(--warn-bg); }
.state-quota, .state-designer { border-left-color: var(--ink); }
.state-offline { border-left-color: var(--muted); }
.state-card .state { margin: 8px 0; }
.state-actions { padding-left: 18px; color: var(--muted); font-size: 14px; margin: 0; }
.skeleton { display: grid; gap: 10px; }
.skeleton i { display: block; height: 16px; border-radius: 8px; background: linear-gradient(110deg, var(--soft) 30%, #fff 50%, var(--soft) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i:first-child { width: 60%; height: 22px; }
@keyframes shimmer { to { background-position-x: -200%; } }
.c-aside, .c-bottom { }
.c-bottom { position: sticky; bottom: 0; padding: 10px var(--gutter); background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.chat-panel { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-panel > p { padding: 12px 14px; margin: 0; }
.chat-host { padding: 0; }
.chat-frame { width: 100%; height: 520px; border: 0; display: block; background: var(--soft); }
.chat-host.big .chat-frame { height: 68vh; min-height: 420px; }
.chat-host .hint, .chip-note { padding: 8px 14px; margin: 0; }
.chat-host .state { margin: 12px; }
.chat .chat-host { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 12px 0; }

/* ── магазин ── */
.options { display: grid; gap: 8px; margin: 6px 0 12px; }
.option { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-height: 60px; }
.option.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.option.on .dot { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, #fff 50%); }
.option-text { display: grid; flex: 1; min-width: 0; }
.option-text span { color: var(--muted); font-size: 14px; }
.option-price { color: var(--muted); font-size: 14px; white-space: nowrap; }
.facts-card { display: grid; gap: 4px; background: var(--soft); margin-top: 16px; }
.summary { font-weight: 600; margin: 12px 0; }
.line { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.line-info { display: grid; min-width: 0; }
.stepper { display: flex; align-items: center; gap: 10px; }
.addons { display: grid; gap: 8px; margin: 8px 0 12px; }
.addon { display: flex; gap: 12px; align-items: center; justify-content: space-between; text-align: left; width: 100%; font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-height: 60px; background: #fff; }
.addon.on { border-color: var(--accent); background: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
.addon-text { display: grid; min-width: 0; }
.addon-text span { color: var(--muted); font-size: 14px; }
.addon-mark { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }
.addon.on .addon-mark { color: var(--accent-dark); }
.promo { display: flex; gap: 8px; margin: 12px 0; }
.promo input { flex: 1; }
.totals { margin: 16px 0 8px; display: grid; gap: 6px; }
.total { display: flex; justify-content: space-between; gap: 12px; }
.total.strong { font-size: 19px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.co-grid { display: grid; gap: 16px; }
.slot { display: grid; gap: 2px; background: var(--soft); }
.contract ul { padding-left: 20px; margin: 8px 0; }
.contract li { margin-bottom: 8px; font-size: 15px; }
.status .timeline { margin-top: 12px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.timeline i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; flex: none; }
.tl-done { color: var(--ink); }
.tl-done i { background: var(--accent); border-color: var(--accent); }
.tl-cur { color: var(--ink); font-weight: 700; }
.tl-cur i { border-color: var(--accent); }
.docs { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.docs li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.cert { background: var(--soft); }
.project { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); margin: 0; }
.project-text { display: grid; flex: 1; min-width: 0; }
.project-wrap { display: grid; gap: 6px; }
.design-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 12px 0; }
.design { display: grid; gap: 4px; text-decoration: none; color: var(--ink); align-content: start; margin: 0; padding: 12px; }
.design .badge { justify-self: start; }
.empty { text-align: center; padding: 32px 0; }
.profile h3 { margin-top: 12px; }

/* ── окно и уведомления ── */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(38,23,31,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sheet-head h2 { margin: 0; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 16px; }
.icon-btn { border: 0; background: transparent; font-size: 20px; cursor: pointer; min-width: 40px; min-height: 40px; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 8px; z-index: 60; pointer-events: none; padding: 0 var(--gutter); }
body.route-c #toasts { bottom: 76px; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: 480px; font-size: 15px; box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: opacity .3s; }
.toast-error { background: var(--accent-dark); }
.toast.out { opacity: 0; }

/* ── компьютер ── */
@media (min-width: 640px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .design-grid { grid-template-columns: repeat(3, 1fr); }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .nav { display: flex; }
  .only-narrow { display: none !important; }
  h1 { font-size: 34px; }
  .page { padding-top: 32px; }
  .home .hero { padding: 24px 0 20px; max-width: 760px; }
  .home h1 { font-size: 44px; }
  .grid4 { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(5, 1fr); }
  .design-grid { grid-template-columns: repeat(4, 1fr); }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .constructor.with-chat { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .constructor:not(.with-chat) { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .c-main { min-width: 0; max-width: 720px; }
  .c-head { grid-template-columns: 1fr auto; align-items: start; }
  .c-result { display: grid; grid-template-columns: minmax(0, 1fr); }
  .co-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .co-side { position: sticky; top: 80px; }
  .overlay { align-items: center; }
  .sheet { border-radius: 20px; }
  #toasts { bottom: 24px; }
  .chat-frame { height: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
