/* Общая разметка. Цвета, шрифты, радиусы и вариант раскладки — в style-*.css */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--font); min-height: 100vh;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2 { font-family: var(--font-head); margin: 0; }

html:not([data-screen="gen"]) .screen.gen,
html[data-screen="gen"] .screen.cat { display: none; }
html:not([data-screen="gen"]) .only-gen { display: none; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top-h, 56px);
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: var(--top-bg, var(--bg)); border-bottom: 1px solid var(--line);
}
.brand { min-height: 44px; display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--brand-ink, var(--text)); }
.logo { display: block; height: 26px; }
.logo svg { height: 100%; width: auto; display: block; }
.lab {
  font: 600 13px/1 var(--font-mono); letter-spacing: .04em; padding: 5px 7px;
  border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink);
}
.topnav { display: flex; gap: 18px; flex: 1; min-width: 0; }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.topnav a:hover { color: var(--text); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-btn, var(--radius-sm));
  border: 1px solid transparent; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 15px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { border-color: var(--line); background: var(--surface); }
.btn.ghost:hover { border-color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.accent { background: var(--print); color: var(--print-ink); }
.btn.big { min-height: 52px; font-size: 16px; width: 100%; }
.btn.print {
  width: 100%; font-weight: 500; font-size: 14px; color: var(--muted);
  border: 1px dashed var(--line); background: transparent;
}
.btn.print b { color: var(--print); font-weight: 700; }
.btn.print:hover { border-color: var(--print); }

/* ---------- каталог ---------- */
.screen.cat { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 48px 0 28px; }
.eyebrow { margin: 0 0 10px; font: 500 13px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text, var(--accent)); }
.hero h1 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.1; max-width: 18ch; letter-spacing: var(--head-ls, -.01em); }
.lead { color: var(--muted); max-width: 56ch; margin: 14px 0 22px; font-size: 16px; }
.search {
  display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 0 14px; min-height: 48px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted);
}
.search input { flex: 1; align-self: stretch; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 16px; color: var(--text); }
.chips { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 14px; border-radius: var(--radius-chip, 999px);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; color: var(--muted);
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap, 14px); padding-bottom: 32px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-hover, none); }
.card-ico { display: grid; place-items: center; height: 120px; border-radius: var(--radius-sm); background: var(--stage-bg); color: var(--accent-text, var(--accent)); }
.card-ico svg { width: 72px; height: 72px; }
.card.soon .card-ico { color: var(--muted); }
.card-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font: 600 17px/1.25 var(--font-head); }
.card-desc { color: var(--muted); font-size: 14px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; }
.fmt { font: 500 12px/1 var(--font-mono); color: var(--muted); }
.badge { font: 600 12px/1 var(--font); padding: 5px 8px; border-radius: var(--radius-chip, 999px); background: var(--ok-bg); color: var(--ok); white-space: nowrap; }
.badge.beta { background: var(--beta-bg); color: var(--beta); }
.badge.soon { background: var(--surface-2); color: var(--muted); }

.print-cta {
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 24px; margin-bottom: 32px; border-radius: var(--radius);
  background: var(--print-bg); border: 1px solid var(--print-line, transparent);
}
.print-cta h2 { font-size: 22px; }
.print-cta p { margin: 6px 0 0; color: var(--muted); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot-links { display: flex; gap: 16px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

/* ---------- генератор ---------- */
.screen.gen { display: grid; grid-template-columns: var(--panel-w, 360px) 1fr; grid-template-areas: "panel stage"; height: calc(100vh - var(--top-h, 56px)); }
html[data-screen="gen"] .screen.gen { display: grid; }
.stage { grid-area: stage; position: relative; background: var(--stage-bg); overflow: hidden; min-width: 0; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.stage-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.seg { pointer-events: auto; display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow, none); }
.seg button { min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: calc(var(--radius-sm) - 2px); cursor: pointer; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--text); color: var(--bg); }
.dims { position: absolute; left: 14px; bottom: 14px; font: 400 13px/1 var(--font-mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 8px 10px; border-radius: var(--radius-sm); }
.dims b { color: var(--text); font-weight: 500; }
.fit { position: absolute; right: 14px; bottom: 14px; font-size: 13px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); }
.fit.bad { background: var(--bad-bg); color: var(--bad); }

.panel { grid-area: panel; overflow-y: auto; background: var(--panel-bg, var(--surface)); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 6px; }
.panel-head h1 { font-size: 20px; line-height: 1.2; }
.panel-tags { display: flex; align-items: center; gap: 4px; flex: none; }
.reset { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--muted); font: 500 13px/1 var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.reset:hover { color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; padding: 10px 18px; }
.lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
select {
  min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); font-size: 15px; width: 100%;
}
.group { border-top: 1px solid var(--line); }
.group summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  min-height: 44px; padding: 0 12px; gap: 4px; font: 600 14px/1.2 var(--font-head);
}
.group summary::-webkit-details-marker { display: none; }
/* заголовок группы — плашка с лёгким оттенком акцента и стрелкой, чтобы не сливался с настройками */
.group summary { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.group summary > b { flex: 1; font: inherit; }
.group summary:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.group[open] > summary { margin-bottom: 6px; }
.group summary::after {
  content: ""; width: 8px; height: 8px; margin: 0 4px 4px 0; flex: none;
  border: solid var(--accent-text, var(--accent)); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform .15s;
}
.group[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
@media (prefers-reduced-motion: reduce) { .group summary::after { transition: none; } }
.group > :not(summary) { margin-left: 12px; margin-right: 12px; }
.group > :last-child { margin-bottom: 8px; }
.rng { display: flex; flex-direction: column; gap: 4px; padding: 2px 0; }
.rng-row { display: flex; align-items: center; gap: 12px; }
.rng input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); height: 28px; }
.num { display: flex; align-items: center; width: 76px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding-right: 8px; }
.num input { align-self: stretch; width: 100%; min-width: 0; border: 0; background: transparent; padding: 0 0 0 8px; font: 500 14px/1 var(--font-mono); outline: 0; -moz-appearance: textfield; }
.num input::-webkit-inner-spin-button { display: none; }
.num i { font-style: normal; font-size: 12px; color: var(--muted); }
.minmax { font: 400 11px/1 var(--font-mono); color: var(--muted); opacity: .8; }
.hint { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 6px; }
/* расчёт по параметрам (размеры, поправки) — заметка с полосой; без заливки, чтобы не путалась с полем */
.hint.calc { color: var(--text); padding: 2px 0 2px 10px; border-left: 3px solid var(--accent); }
/* пояснения спрятаны за «i» в заголовке группы (кнопку добавляет страница); расчёты видны всегда */
.panel .group:not(.info-on) .hint:not(.calc) { display: none; }
.g-i { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 -6px 0 auto; flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; }
.g-i::before { content: "i"; display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 50%; font: italic 600 13px/1 Georgia, serif; }
.g-i:hover, .g-i[aria-expanded="true"] { color: var(--accent-text, var(--accent)); }
.g-i[hidden] { display: none; }
/* мышь — плотнее; на пальцах цели остаются от 44px */
@media (pointer: fine) {
  .panel .group summary { min-height: 36px; }
  .g-i { width: 32px; height: 32px; margin-right: -4px; }
  .panel .num { min-height: 32px; }
  .panel .rng input[type=range] { height: 24px; }
  .panel .seg button { min-height: 36px; }
  .panel select, .panel input[type=text] { min-height: 36px; }
  .panel .switch { min-height: 32px; }
}
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
/* текстовые поля, строки надписи, сегменты на всю ширину (табличка) */
.panel input[type=text] {
  min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); font-size: 15px; width: 100%; min-width: 0; outline: 0;
}
.panel input[type=text]:focus, select:focus { border-color: var(--accent); }
.line { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.line-row { display: flex; align-items: center; gap: 8px; }
.line-row input[type=text] { flex: 1; }
.line-row .num { flex: none; width: 86px; }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; }
.field.flat { padding: 6px 0; }
.lbl.gap { display: block; margin-top: 10px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* «Площа друку» → «Довільна»: три поля в ряд */
.bed-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.bed-nums[hidden] { display: none; }
.bed-num { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bed-num .num { width: 100%; }
.group .chips { margin-top: 4px; }
.dl-more { display: flex; gap: 8px; }
.dl-more .btn { border-color: var(--line); background: var(--surface); flex: 1; flex-direction: column; gap: 2px; min-height: 48px; line-height: 1.1; }
.dl-more small { font-size: 11px; color: var(--muted); font-weight: 400; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button, .swatch-pick { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--c); cursor: pointer; padding: 0; }
.swatches button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatch-pick { overflow: hidden; background: conic-gradient(#f33, #fd0, #3c5, #3ae, #25f, #f4a, #f33); }
.swatch-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.actions { margin-top: auto; position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px 18px 18px; background: var(--panel-bg, var(--surface)); border-top: 1px solid var(--line); }

/* ---------- телефон ---------- */
@media (max-width: 899px) {
  .only-wide { display: none; }
  .topnav { gap: 12px; }
  .hero { padding: 28px 0 20px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 10px; gap: 8px; }
  .card-ico { height: 86px; }
  .card-ico svg { width: 52px; height: 52px; }
  .card-title { font-size: 14px; }
  .card-desc { display: none; }
  .card-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .print-cta { padding: 18px; }
  .print-cta .btn { width: 100%; }

  .screen.gen, html[data-screen="gen"] .screen.gen { display: block; height: auto; }
  .stage { position: sticky; top: var(--top-h, 56px); height: 42vh; z-index: 5; border-bottom: 1px solid var(--line); }
  .stage-top { top: 10px; }
  .seg button { padding: 0 10px; font-size: 13px; }
  .dims, .fit { bottom: 10px; font-size: 12px; padding: 6px 8px; }
  .dims { left: 10px; } .fit { right: 10px; max-width: 52%; }
  .fit.bad { bottom: 44px; max-width: calc(100% - 20px); } /* длинное предупреждение — над размерами, не поверх */
  .panel { overflow: visible; border-right: 0; }
  .actions { box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
}
@media (max-width: 420px) {
  .top { gap: 8px; padding: 0 12px; }
  .back { font-size: 13px; }
  .login { padding: 0 12px; }
  .fit { max-width: 48%; }
}

/* C · «Лабораторія» — модель на весь екран, панель плаває поверх. Unbounded (як у Epic3D) + Manrope, фіолетовий */
:root {
  --font: "Manrope", system-ui, sans-serif;
  --font-head: "Unbounded", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 20px; --radius-sm: 12px; --radius-btn: 14px; --radius-chip: 999px;
  --panel-w: 380px; --head-ls: -.02em;

  --bg: #F4F3F8; --surface: #FFFFFF; --surface-2: #F1F0F6; --line: #E2E0EC;
  --text: #15131F; --muted: #625F72;
  --accent: #5B4CF0; --accent-ink: #FFFFFF; --accent-text: #4A3BDB;
  --print: #15131F; --print-ink: #FFFFFF; --print-bg: #E9E6FD; --print-line: transparent;
  --ok: #157347; --ok-bg: #E2F4EA; --beta: #8A5A00; --beta-bg: #FBF0D9; --bad: #B42318; --bad-bg: #FDE7E5; --bad-ink: #fff;
  --stage-bg: radial-gradient(120% 90% at 50% 30%, #FFFFFF 0%, #E9E7F3 100%);
  --model: #8E84F7; --model-edge: #2A2170; --grid: #D9D6E8; --grid-strong: #B5B0CF;
  --shadow: 0 10px 40px rgba(30,20,90,.12); --shadow-hover: 0 14px 40px rgba(30,20,90,.14);
  --top-bg: rgba(244,243,248,.8);
}
:root[data-theme="dark"] {
  --bg: #0B0A12; --surface: #15131F; --surface-2: #1D1A2A; --line: #2B2840;
  --text: #EEEDF6; --muted: #A09CB6;
  --accent: #8579FF; --accent-ink: #0B0A12; --accent-text: #A9A0FF;
  --print: #EEEDF6; --print-ink: #0B0A12; --print-bg: #1C1838;
  --ok: #5BD08F; --ok-bg: #11271B; --beta: #F2C14E; --beta-bg: #2B230F; --bad: #FF8A80; --bad-bg: #331614; --bad-ink: #2A0B08;
  --stage-bg: radial-gradient(120% 90% at 50% 30%, #1E1B2E 0%, #0B0A12 100%);
  --model: #7C70F5; --model-edge: #D6D1FF; --grid: #1F1C2E; --grid-strong: #34304C;
  --shadow: 0 10px 40px rgba(0,0,0,.5); --shadow-hover: 0 14px 40px rgba(0,0,0,.5);
  --top-bg: rgba(11,10,18,.8);
}
.top { backdrop-filter: blur(12px); }
.lab { background: var(--text); color: var(--bg); border-radius: 999px; }
.hero h1 { font-weight: 600; font-size: clamp(26px, 4.2vw, 44px); }
.panel-head h1 { font-size: 17px; font-weight: 600; }
.card-title { font-size: 15px; font-weight: 500; }
.print-cta h2 { font-size: 20px; font-weight: 600; }
.group summary { font-family: var(--font); font-weight: 700; }
.card-ico { background: var(--stage-bg); }
.card { box-shadow: var(--shadow); border-color: transparent; }
.btn.print b { color: var(--accent-text); }

@media (min-width: 900px) {
  .screen.gen, html[data-screen="gen"] .screen.gen { display: block; position: relative; }
  .stage { position: absolute; inset: 0; }
  .panel {
    position: absolute; top: 16px; right: 16px; bottom: 16px; width: var(--panel-w);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
  }
  /* непрозрачный низ: настройки прокручиваются под кнопками и не должны просвечивать */
  .actions { background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
  .stage-top { right: calc(var(--panel-w) + 32px); }
  .fit { right: calc(var(--panel-w) + 32px); }
}
@media (max-width: 899px) {
  .panel { border-radius: var(--radius) var(--radius) 0 0; }
}


/* ---------- сайт: дополнения к макету ---------- */
.lang { display: flex; gap: 2px; }
.lang a { min-width: 44px; min-height: 44px; display: grid; place-items: center; text-decoration: none; font: 500 13px/1 var(--font-mono); color: var(--muted); border-radius: var(--radius-sm); }
.lang a[aria-current] { color: var(--text); background: var(--surface-2); }
.notice { margin: 10px 18px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.notice b { display: block; color: var(--text); margin-bottom: 4px; }
.stage-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }
.stage-msg svg { width: 120px; height: 120px; color: var(--accent-text); opacity: .5; }
/* ссылка «Админка» — в шапке, только админу (раньше висела над сценой и закрывала размеры) */
.admin-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 12px; border-radius: 10px; background: #B42318; color: #fff; text-decoration: none; font: 500 13px/1 var(--font-mono); }
.admin-link svg { flex: none; }
@media (max-width: 600px) { .admin-link { padding: 0; } .admin-link span { display: none; } }
.seo { max-width: 860px; margin: 0 auto; padding: 40px 16px 8px; }
.seo h2 { font-size: 22px; margin: 28px 0 12px; }
.seo p, .seo li { color: var(--muted); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.empty { color: var(--muted); padding: 24px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.foot { align-items: center; }
.foot-lang { display: none; }
@media (max-width: 599px) {
  .top .lang { display: none; }
  .foot-lang { display: flex; }
}

/* ---------- вход: кнопка в шапке, меню, окно ---------- */
.auth-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 220px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-chip); background: var(--surface); cursor: pointer;
  font-weight: 600; font-size: 14px;
}
.auth-btn:hover { border-color: var(--text); }
.auth-btn svg { flex: none; color: var(--accent-text, var(--accent)); }
.auth-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-btn.in .auth-txt { font-weight: 500; color: var(--muted); }
.auth-menu {
  position: fixed; z-index: 40; top: calc(var(--top-h, 56px) + 6px); right: 12px; width: min(300px, calc(100vw - 24px));
  padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.auth-menu p { margin: 0; font-size: 13px; color: var(--muted); }
.auth-menu b { display: block; color: var(--text); font-size: 15px; overflow-wrap: anywhere; }

dialog.auth {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0;
  border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
dialog.auth::backdrop { background: rgba(10, 8, 25, .55); }
.auth-card { position: relative; padding: 28px 24px 24px; }
.auth-card h2 { font-size: 22px; line-height: 1.2; padding-right: 40px; }
.auth-x { position: absolute; top: 12px; right: 12px; }
.auth-sub { margin: 8px 0 0; color: var(--muted); }
.auth-who b { color: var(--text); overflow-wrap: anywhere; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.auth-form.busy { opacity: .7; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.auth-field input, .auth-pass {
  min-height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2);
}
.auth-field input { padding: 0 14px; font-size: 16px; width: 100%; min-width: 0; outline: 0; } /* 16px — iPhone не приближает */
.auth-field input:focus, .auth-pass:focus-within { border-color: var(--accent); }
.auth-pass { display: flex; align-items: stretch; }
.auth-pass input { border: 0; background: transparent; min-height: 46px; flex: 1; }
.auth-eye { width: 48px; flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: var(--radius-sm); }
.auth-eye[aria-pressed="true"] { color: var(--accent-text, var(--accent)); }
.auth-hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.auth-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0 0; cursor: pointer; font-size: 14px; }
.auth-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.auth-check a { color: var(--accent-text, var(--accent)); }
.auth-check small { display: block; color: var(--muted); font-size: 13px; }
.auth-err { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bad-bg); color: var(--bad); font-size: 14px; }
.auth-err[hidden] { display: none; }
.auth-link { border: 0; background: none; padding: 0 4px; min-height: 44px; color: var(--accent-text, var(--accent)); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.auth-who .auth-link { min-height: 44px; padding: 0 4px; }
.auth-forgot { align-self: center; }
.auth-sent { margin: 16px 0 0; }
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translateX(-50%);
  padding: 12px 18px; border-radius: var(--radius-chip); background: var(--ok-bg); color: var(--ok); font-weight: 600; box-shadow: var(--shadow);
}
/* на телефоне окно сверху: клавиатура занимает низ экрана */
@media (max-width: 599px) {
  dialog.auth { margin: 16px auto auto; max-height: calc(100dvh - 24px); }
  .auth-card { padding: 22px 18px 18px; }
  .auth-card h2 { font-size: 20px; }
  .auth-btn { padding: 0; width: 44px; justify-content: center; border-color: transparent; background: transparent; }
  .auth-btn .auth-txt { display: none; }
  .auth-btn.in svg { color: var(--accent-text, var(--accent)); }
}

/* ---------- документы: условия, политика, новый пароль ---------- */
.screen.doc { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.doc-body { padding: 36px 0 24px; }
.doc-body h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.15; }
.doc-body h2 { font-size: 18px; margin: 28px 0 8px; }
.doc-body p, .doc-body li { color: var(--muted); }
.doc-body b { color: var(--text); }
.doc-date { font: 400 13px/1.4 var(--font-mono); }
.doc-form, .doc-msg { max-width: 420px; }
.doc-msg { margin-top: 20px; }
mark.todo { background: var(--beta-bg); color: var(--beta); padding: 0 4px; border-radius: 4px; }
.foot-links { flex-wrap: wrap; }

/* ---------- окно cookies (consent.js) ---------- */
.ck { position: fixed; z-index: 60; left: 16px; bottom: 16px; max-width: 440px; padding: 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow, none); color: var(--text); font-size: 14px; line-height: 1.45; }
.ck p { margin: 0 0 12px; }
.ck a { color: var(--accent-text, var(--accent)); }
.ck-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ck-btns .btn { flex: 1 1 auto; color: var(--text); }
.foot-ck { min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
@media (max-width: 520px) { .ck { left: 8px; right: 8px; bottom: 8px; max-width: none; } }

/* ---------- сцена генератора (createStage из core): одинаковая во всех генераторах ---------- */
.dims:empty, .fit:empty, .no-dims .dims { display: none; }
.g3-cube { position: absolute; left: 14px; bottom: 14px; z-index: 3; width: 96px; height: 96px; }
.g3-cube .c { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.g3-cube .f { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; display: grid; place-items: center; padding: 0; border: 1px solid color-mix(in srgb, var(--text) 45%, transparent); background: color-mix(in srgb, var(--text) 16%, var(--surface)); color: var(--text); font: 600 10px/1 var(--font-body, var(--font, inherit)); backface-visibility: hidden; cursor: pointer; }
.g3-cube .f:hover, .g3-cube .f:focus-visible { background: var(--accent); color: var(--on-accent, #fff); }
.g3-cube svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.g3-cube text { font: 700 11px/1 var(--font-mono); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.g3-stage.has-cube .dims { left: 128px; }
@media (max-width: 899px) {
  .g3-cube { left: 8px; bottom: 8px; transform: scale(.82); transform-origin: 0 100%; }
  .g3-stage.has-cube .dims { left: 98px; }
  /* рядом с кубиком места на две плашки нет — «помещается» встаёт над размерами */
  .g3-stage.has-cube .fit { left: 98px; right: auto; bottom: 44px; max-width: calc(100% - 108px); }
}

/* ---------- обратная связь: кнопка в конце настроек и окно (feedback.js, в стиле окна входа) ---------- */
.fb-open { display: flex; align-items: center; justify-content: center; gap: 6px; align-self: center; min-height: 44px; margin: 6px auto 10px; padding: 0 14px;
  border: 0; background: none; color: var(--muted); font: 500 13px/1 var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fb-open:hover { color: var(--accent-text, var(--accent)); }
.fb-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.fb-seg button { min-height: 44px; padding: 6px 8px; border: 0; border-radius: calc(var(--radius-sm) - 2px); background: transparent; color: var(--muted); font: 600 14px/1.2 var(--font); cursor: pointer; }
.fb-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.08)); }
dialog.fb textarea { min-height: 120px; padding: 12px 14px; font: 16px/1.45 var(--font); width: 100%; min-width: 0; resize: vertical;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); outline: 0; }
dialog.fb textarea:focus { border-color: var(--accent); }
dialog.fb .auth-field label { display: flex; justify-content: space-between; gap: 8px; }
.fb-cnt { font: 400 12px/1.4 var(--font-mono); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
dialog.fb .fb-ctx { margin: 0; }
dialog.fb .auth-hint + .auth-hint { margin-top: -8px; }

/* ---------- новости ---------- */
.news-list { display: grid; gap: 14px; margin-top: 22px; }
.news-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.news-card:not(:has(img)) { grid-template-columns: 1fr; }
.news-card .news-cover { width: 100%; height: auto; aspect-ratio: 1.9; object-fit: cover; border-radius: var(--radius-sm); margin: 0; }
.news-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.news-card-title { font: 600 19px/1.25 var(--font-head); overflow-wrap: anywhere; }
.news-card-desc { color: var(--muted); font-size: 15px; }
.news-back { margin: 0 0 14px; font-size: 14px; }
.news-back a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-text, var(--accent)); text-decoration: none; }
.news-item h1 { margin: 6px 0 18px; overflow-wrap: anywhere; }
.news-cover { display: block; width: 100%; height: auto; border-radius: var(--radius); margin: 0 0 22px; background: var(--stage-bg); }
.news-text { font-size: 17px; line-height: 1.65; }
.news-text p, .news-text li { color: var(--text); }
.news-text h2 { font-size: 22px; margin: 30px 0 10px; }
.news-text h3 { font-size: 18px; margin: 24px 0 8px; }
.news-text a { color: var(--accent-text, var(--accent)); overflow-wrap: anywhere; }
.news-draft { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 14px; }
@media (max-width: 640px) {
  .news-card { grid-template-columns: 1fr; gap: 12px; }
  .news-text { font-size: 16px; }
}

/* страница подписки: галочки по темам */
.sub-form .sub-check { padding: 10px 0; }
.sub-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 14px; }
.logo img { height: 100%; width: auto; display: block; }

/* ---------- главная: блоки (home-page.tsx) ---------- */
.home > section, .home > .h-blk { margin-bottom: 56px; }
.home > .foot { margin-top: 8px; }
.h-h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; letter-spacing: var(--head-ls, -.01em); margin: 0 0 16px; }
.h-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.h-head a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: 14px; }
.btn.dark { background: var(--print); color: var(--print-ink); border-radius: 999px; }
.btn.dark:hover { filter: brightness(1.15); }
.btn.outline { background: transparent; border: 1.5px solid var(--text); color: var(--text); border-radius: 999px; }
.btn.outline:hover { background: var(--surface); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
/* тона блоков: только пресеты, цвета вручную не меняются */
.tone-lav { --tone: var(--print-bg); }
.tone-mint { --tone: var(--ok-bg); }
.tone-sun { --tone: var(--beta-bg); }
.tone-plain { --tone: var(--surface); }
.print-cta[class*="tone-"] { background: var(--tone); }
.print-cta .btn.dark { flex: none; }

/* плашка над шапкой */
.h-bar { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 52px; font-size: 14px; text-align: center; background: var(--print-bg); color: var(--text); }
.h-bar.tone-promo { background: var(--ok-bg); }
.h-bar.tone-warn { background: var(--beta-bg); }
.h-bar a { color: inherit; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.h-bar a:hover { text-decoration: underline; }
.h-bar-x { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: var(--radius-sm); }
.h-bar-x:hover { color: var(--text); }
.h-bar[hidden] { display: none; }

/* главный баннер */
.h-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding: 48px 0 0; }
.h-hero.solo, .h-hero.v-text { grid-template-columns: minmax(0, 1fr); }
.h-hero.v-text .h-hero-text { text-align: center; margin: 0 auto; max-width: 760px; }
.h-hero.v-text h1, .h-hero.v-text .lead { margin-left: auto; margin-right: auto; }
.h-hero.v-text .h-chips, .h-hero.v-text .h-cta { justify-content: center; }
.h-hero h1 { font-size: clamp(28px, 4.4vw, 48px); line-height: 1.1; max-width: 18ch; font-weight: 600; letter-spacing: var(--head-ls, -.01em); }
.h-hero .lead { margin: 16px 0 18px; }
.h-hero.v-promo { padding: 40px; border-radius: var(--radius); background: var(--tone, var(--print-bg)); margin-top: 32px; }
.h-hero.v-promo h1 { max-width: 22ch; }
.h-chips { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.h-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.h-chips svg { color: var(--ok); flex: none; }
.h-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.h-cta .btn { min-height: 50px; padding: 0 24px; }
.h-show { display: flex; flex-direction: column; background: var(--surface); border-radius: calc(var(--radius) + 4px); padding: 12px; box-shadow: var(--shadow); text-decoration: none; transition: transform .15s; }
.h-show:hover { transform: translateY(-2px); }
.h-show-pic { position: relative; display: block; }
.h-show-pic .card-ico, .h-show-pic .card-pic { height: auto; aspect-ratio: 4 / 3; }
.h-show-pic .card-ico svg { width: 120px; height: 120px; }
.h-show-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 6px 4px; }
.h-show-body .card-title { font-size: 19px; }
.h-show-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

/* фото карточки: подложка, режим, тёмная тема */
.card-pic { position: relative; display: block; height: 120px; border-radius: var(--radius-sm); overflow: hidden; background: var(--print-bg); }
.card-pic.bg-mint { background: var(--ok-bg); }
.card-pic.bg-sun { background: var(--beta-bg); }
.card-pic.bg-white { background: #fff; }
.card-pic.bg-none { background: var(--stage-bg); }
.card-pic img { display: block; width: 100%; height: 100%; }
.card-pic .pic-dark { display: none; }
:root[data-theme="dark"] .card-pic .pic-dark { display: block; }
:root[data-theme="dark"] .card-pic .pic-light { display: none; }
.card-top { position: relative; display: block; }
.flag { position: absolute; top: 8px; left: 8px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 12px/1 var(--font); }

/* сетка генераторов */
.h-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.h-cats { margin-top: 0; min-width: 0; max-width: 100%; }
.h-cats .chip span { opacity: .6; margin-left: 2px; }
.h-cats .chip:not(.on):hover { color: var(--text); border-color: var(--text); }
.h-search { flex: 0 1 320px; }
/* Сетка главной: колонки сами по ширине (не уже --minw), но не больше --cols в ряд; неполный ряд не растягивается. */
.h-grid {
  --gap: 14px; gap: var(--gap); padding-bottom: 0;
  grid-template-columns: repeat(auto-fill, minmax(max(min(var(--minw, 300px), 100%), calc((100% - (var(--cols, 99) - 1) * var(--gap)) / var(--cols, 99))), 1fr));
}
.h-grid .card[hidden] { display: none; }
.h-grid .card-pic, .h-grid .card-ico { height: var(--pich, 210px); }
.h-grid.pic-compact { --pich: 120px; } .h-grid.pic-normal { --pich: 160px; } .h-grid.pic-large { --pich: 210px; }
.h-grid.no-desc .card-desc { display: none; }
.h-grid .card-top { overflow: hidden; border-radius: var(--radius-sm); }
.h-grid .card-pic img, .h-grid .card-ico svg { transition: transform .25s ease; }
@media (hover: hover) {
  .h-grid .card:hover .card-pic img, .h-grid .card:hover .card-ico svg { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .h-grid .card-pic img, .h-grid .card-ico svg { transition: none; } }
.h-trust { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.h-trust a { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.h-trust a:hover { text-decoration: underline; }
.h-hero.v-text .h-trust { justify-content: center; }

/* как это работает */
.h-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.h-steps li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.h-step-n { display: flex; align-items: center; justify-content: space-between; color: var(--accent-text); margin-bottom: 6px; }
.h-step-n i { font: 500 13px/1 var(--font-mono); font-style: normal; color: var(--muted); }
.h-steps b { font: 600 17px/1.3 var(--font-head); }
.h-steps span:last-child { color: var(--muted); font-size: 14px; }
.h-privacy { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.h-privacy svg { color: var(--ok); flex: none; }

/* новости */
.h-news-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.h-news-item { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; }
.h-news-item img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 4px; }
.h-news-item time { font: 500 12px/1.2 var(--font-mono); color: var(--muted); }
.h-news-item b { font-weight: 600; }
.h-news-item:hover b { color: var(--accent-text); }

/* вопросы */
.h-faq-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 20px; max-width: 860px; }
.h-faq-list details + details { border-top: 1px solid var(--line); }
.h-faq-list summary { list-style: none; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 600; }
.h-faq-list summary::-webkit-details-marker { display: none; }
.h-faq-list summary::after { content: "+"; flex: none; font-size: 22px; font-weight: 400; color: var(--accent-text); }
.h-faq-list details[open] summary::after { content: "\2013"; }
.h-faq-list p { margin: 0 0 16px; color: var(--muted); }

/* подписка и идея */
.h-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.h-sub.one { grid-template-columns: 1fr; }
.h-sub-box { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.h-sub-box.idea { background: var(--print-bg); box-shadow: none; }
.h-sub-box h2 { font-size: 20px; font-weight: 600; }
.h-sub-box p { margin: 0; color: var(--muted); }
.h-sub-box .btn { margin-top: 6px; }
.h-sub-box .h-sub-ok { color: var(--ok); font-weight: 600; }

/* SEO-текст */
.h-seo details { border-top: 1px solid var(--line); }
.h-seo summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; cursor: pointer; }
.h-seo summary::-webkit-details-marker { display: none; }
.h-seo summary .h-h2 { margin: 0; font-size: 18px; }
.h-more { color: var(--accent-text); font-weight: 600; font-size: 14px; white-space: nowrap; }
.h-seo details[open] .h-more { display: none; }
.h-seo-body { max-width: 860px; color: var(--muted); }
.h-seo-body h2 { font-size: 20px; color: var(--text); margin: 24px 0 8px; }
.h-seo-body h3 { font-size: 17px; color: var(--text); margin: 18px 0 6px; font-family: var(--font); }

/* предпросмотр в конструкторе */
.h-blk { position: relative; outline: 2px dashed transparent; outline-offset: 6px; border-radius: 6px; cursor: pointer; }
.h-blk:hover { outline-color: var(--accent); }
.h-blk.h-noted { outline-color: var(--beta); }
.h-blk.h-sel { outline: 2px solid var(--accent); }
.h-blk > section { margin-bottom: 0; }
.h-note { position: absolute; top: -18px; right: 0; z-index: 2; padding: 3px 10px; border-radius: 999px; background: var(--beta-bg); color: var(--beta); font: 600 12px/1.2 var(--font); }
.h-blk.h-off { padding: 10px; border: 1.5px dashed var(--line); text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.h-blk.h-off:hover, .h-blk.h-off.h-sel { border-color: var(--accent); outline-color: transparent; color: var(--text); }
.h-empty { padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
[data-bar].h-sel { outline: 2px solid var(--accent); outline-offset: -2px; }

@media (max-width: 899px) {
  .home > section, .home > .h-blk { margin-bottom: 44px; }
  .h-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 28px; }
  .h-hero.v-promo { padding: 24px 20px; margin-top: 20px; }
  .h-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .h-chips li { flex: none; }
  .h-cta { flex-direction: column; }
  .h-cta .btn { width: 100%; }
  .h-grid { --gap: 12px; }
  .h-grid .card { padding: 14px; gap: 10px; }
  .h-grid .card-title { font-size: 16px; }
  .h-grid:not(.no-desc) .card-desc { display: block; }
  .h-grid .card-meta { flex-direction: row; align-items: center; }
  .h-trust a { min-height: 44px; display: inline-flex; align-items: center; }
  .h-filter { flex-direction: column; align-items: stretch; }
  .h-cats { margin-right: -16px; padding-right: 16px; }
  .h-search { flex: none; max-width: none; }
  .h-steps, .h-news-list, .h-sub { grid-template-columns: minmax(0, 1fr); }
  .h-steps li { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 16px 18px; }
  .h-step-n { margin: 0; }
  .h-step-n svg { display: none; }
  .h-step-n i { color: var(--accent-text); font-size: 14px; }
  .h-steps b { font-size: 15px; }
  .h-steps span:last-child { flex-basis: 100%; padding-left: 32px; }
  .h-faq-list { padding: 0 16px; }
  .h-sub-box { padding: 20px; }
  .h-sub-box .btn { width: 100%; }
  .h-bar { padding: 0 48px 0 16px; justify-content: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .h-show, .card { transition: none; } }
.h-step-pic { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 8px; }
@media (max-width: 899px) {
  .h-steps.with-pic li { flex-direction: column; align-items: stretch; }
  .h-steps.with-pic span:last-child { padding-left: 0; }
}

/* ---------- меню шапки (Контент → Главная → «Шапка и меню»); на узком экране — за кнопкой-бургером ---------- */
.topnav .menu { display: flex; gap: 18px; min-width: 0; }
.burger { display: none; }
#gens, #how, #faq { scroll-margin-top: calc(var(--top-h, 56px) + 12px); }
@media (max-width: 1023px) {
  .burger { display: inline-flex; }
  .topnav .menu { display: none; }
  .top.open .menu {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0;
    padding: 6px 16px 12px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }
  .top.open .menu a { min-height: 48px; font-size: 16px; color: var(--text); border-bottom: 1px solid var(--line); }
  .top.open .menu a:last-child { border-bottom: 0; }
}

/* блог: генераторы под статьёй */
.post-gens { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-gens h2 { margin: 0 0 14px; }
.post-gens .grid { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }

/* ---------- вход: Google, ссылка на почту; страница /login/ ---------- */
.auth-g { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; }
.auth-google:hover { border-color: var(--text); }
.auth-google svg { flex: none; }
.auth-fine { margin: 0; font-size: 13px; color: var(--muted); }
.auth-fine a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 8px 0 -8px; color: var(--muted); font-size: 14px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-alt { align-self: flex-start; padding: 0; }
.auth-new { display: flex; flex-direction: column; }
.auth-new[hidden] { display: none; }
.auth-new .auth-hint { margin: 0; }
.auth-mail { color: var(--accent-text, var(--accent)); }
.auth-sent-note { margin: 0; font-size: 14px; color: var(--muted); min-height: 1em; }
.screen.login { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.login-head { padding: 36px 0 20px; }
.login-head h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; }
.login-head .lead { margin: 10px 0 0; color: var(--muted); max-width: 640px; }
.login-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: start; padding-bottom: 40px; }
.login-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 320px; }
.login-form .auth-card h2 { padding-right: 0; }
.login-get { background: var(--text); color: var(--bg); border-radius: var(--radius); padding: 28px 24px; }
.login-get h2 { font-size: 20px; margin: 0 0 16px; color: inherit; }
.login-get ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.login-get li { position: relative; padding: 12px 0 12px 34px; border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); line-height: 1.4; }
.login-get li:first-child { border-top: 0; }
.login-get li::before { content: ''; position: absolute; left: 0; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
@media (max-width: 820px) { .login-grid { grid-template-columns: 1fr; } }

/* ---------- кабинет /account/ ---------- */
.auth-ava { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--font); text-transform: uppercase; }
.auth-menu .btn { justify-content: flex-start; text-decoration: none; }
.screen.acc { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.acc-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; padding: 28px 0 40px; }
.acc-nav { position: sticky; top: calc(var(--top-h, 56px) + 16px); display: flex; flex-direction: column; gap: 2px; }
.acc-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius-sm); text-decoration: none; color: var(--muted); font-weight: 500; }
.acc-nav a:hover { color: var(--text); background: var(--surface); }
.acc-nav a[aria-current="page"] { color: var(--text); background: var(--surface); border-color: var(--line); font-weight: 600; }
.acc-nav .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.acc-h { font-size: clamp(24px, 4vw, 34px); line-height: 1.15; margin: 0 0 6px; overflow-wrap: anywhere; }
.acc-lead { margin: 0 0 20px; color: var(--muted); max-width: 66ch; }
.acc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.acc-card { min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.acc-main > .acc-card + .acc-card, .acc-main > .acc-card + .acc-cards { margin-top: 16px; }
.acc-card.wide { grid-column: 1 / -1; }
.acc-card h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: 17px; }
.acc-card h2 a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; font: 600 14px/1 var(--font); color: var(--accent-text, var(--accent)); }
.acc-card p { margin: 0 0 10px; }
.acc-card p:last-child { margin-bottom: 0; }
.acc-main .muted { color: var(--muted); font-size: 14px; }
.acc-big { font: 700 22px/1.2 var(--font-head); }
.acc-feats { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.acc-empty { text-align: center; padding: 36px 20px; }
.acc-empty h2 { justify-content: center; font-size: 20px; }
.acc-empty .btn { margin-top: 8px; }
.acc-lim { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.acc-lim li > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.acc-bar { height: 8px; margin-top: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.acc-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.acc-bar.full i { background: var(--bad); }
.acc-gens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.acc-gen { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; }
.acc-gen:hover { border-color: var(--accent); }
.acc-gen .ico { display: grid; place-items: center; height: 72px; margin-bottom: 4px; border-radius: calc(var(--radius-sm) - 2px); background: var(--stage-bg); color: var(--accent-text, var(--accent)); }
.acc-gen .ico svg { width: 44px; height: 44px; }
.acc-gen b { font-size: 14px; overflow-wrap: anywhere; }
.acc-gen small { color: var(--muted); font-size: 12px; }
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line); }
.acc-list li:first-child { border-top: 0; }
.acc-list .main { display: flex; flex-direction: column; min-width: 0; }
.acc-list .main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.acc-list small { color: var(--muted); font-size: 13px; }
.acc-row-link { text-decoration: none; min-height: 44px; justify-content: center; flex: 1; }
.acc-row-link:hover b { color: var(--accent-text, var(--accent)); }
.acc-act { flex: none; min-height: 44px; padding: 0 12px; font-size: 13px; }
.acc-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.acc-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.acc-tag.new { background: var(--accent); color: var(--accent-ink); }
.acc-tag.ok, .acc-tag.st-done { background: var(--ok-bg); color: var(--ok); }
.acc-tag.st-rejected { background: var(--bad-bg); color: var(--bad); }
.acc-tag.st-work, .acc-tag.st-plan { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent-text, var(--accent)); }
.acc-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-text, var(--accent)); font-weight: 600; text-decoration: none; }
.acc-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 12px; }
.acc-filters label, .acc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.acc-filters select, .acc-filters input, .acc-form input, .acc-form select, .acc-form textarea {
  min-height: 44px; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 16px;
}
.acc-filters select { max-width: 220px; }
.acc-form { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.acc-form textarea { width: 100%; padding: 10px 12px; resize: vertical; font: inherit; font-size: 16px; }
.acc-form input:focus, .acc-form select:focus, .acc-form textarea:focus, .acc-filters input:focus, .acc-filters select:focus { outline: 0; border-color: var(--accent); }
.acc-form .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acc-msg { margin: 0; font-size: 14px; }
.acc-msg:empty { display: none; }
.acc-msg.ok { color: var(--ok); }
.acc-msg.err { color: var(--bad); }
.acc-msg a { color: inherit; }
.acc-flash { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-bg); }
.acc-flash.err { background: var(--bad-bg); }
.acc-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.acc-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.acc-card > .acc-switch:first-child { border-top: 0; padding-top: 0; }
.acc-switch > span:first-child { font-weight: 600; }
.acc-switch small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.acc-switch .sw { display: flex; align-items: center; gap: 10px; flex: none; }
.acc-switch .saved, .acc-switch .sw em { font-style: normal; font-size: 13px; color: var(--ok); }
.acc-switch .sw em.muted { color: var(--muted); }
.acc-switch .saved.err { color: var(--bad); }
.acc-switch input { position: relative; flex: none; width: 50px; height: 30px; margin: 7px 0; border-radius: 15px; background: var(--line); appearance: none; -webkit-appearance: none; cursor: pointer; transition: background .15s; }
.acc-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.acc-switch input:checked { background: var(--accent); }
.acc-switch input:checked::after { transform: translateX(20px); }
.acc-switch input:disabled { cursor: default; opacity: .6; }
.acc-switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acc-unsub { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.acc-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.acc-thread li { max-width: 88%; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.acc-thread li.me { align-self: flex-end; }
.acc-thread li.team { align-self: flex-start; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.acc-thread small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.acc-thread p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.acc-card .acc-note { margin-top: 14px; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
.acc-table th, .acc-table td { padding: 10px 8px; border-top: 1px solid var(--line); text-align: left; }
.acc-table th { border-top: 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.acc-table th:not(:first-child), .acc-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.acc-table td a { color: inherit; }
.acc-table tr.full td { color: var(--bad); }
.acc-meth { list-style: none; margin: 0; padding: 0; }
.acc-meth li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--line); }
.acc-meth li:first-child { border-top: 0; }
.acc-email { overflow-wrap: anywhere; }
.acc-danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.acc-del { background: var(--bad); border-color: var(--bad); color: var(--bad-ink, #fff); }
.acc-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 20px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.acc-banner .acc-msg { flex-basis: 100%; }
@media (max-width: 899px) {
  .acc-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 16px; }
  .acc-nav { position: static; flex-direction: row; gap: 8px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
  .acc-nav::-webkit-scrollbar { display: none; }
  .acc-nav a { flex: none; border-color: var(--line); border-radius: var(--radius-chip); background: var(--surface); white-space: nowrap; }
  .acc-nav a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
  .acc-nav a[aria-current="page"] .n { background: var(--bg); color: var(--text); }
  .acc-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .acc-card { padding: 16px; }
  .acc-gens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acc-list li { flex-wrap: wrap; }
  .acc-list li .acc-act { margin-left: auto; }
  .acc-filters label { flex: 1 1 140px; }
  .acc-filters select { max-width: none; }
  .acc-thread li { max-width: 100%; }
  .acc-table th, .acc-table td { padding: 8px 4px; white-space: normal; overflow-wrap: anywhere; }
  .acc-table th { font-size: 12px; }
  .acc-table td a { display: flex; align-items: center; min-height: 44px; }
}

/* ---------- движение (19.10.2026): всё один раз, только transform/opacity/clip-path; при «уменьшить движение» выключено ---------- */
/* Главная: карточки поднимаются волной, блоки ниже проявляются при прокрутке. Класс rv ставит home.js — без JS всё видно сразу. */
html.rv .h-grid .card:not(.in), html.rv .rv-sec:not(.in) { opacity: 0; transform: translateY(18px); }
html.rv .h-grid .card.in, html.rv .rv-sec.in { animation: g3-up .55s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) backwards; }
@keyframes g3-up { from { opacity: 0; transform: translateY(18px); } }
/* иконка генератора при наведении «печатается» слоями снизу вверх */
@keyframes g3-print { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (hover: hover) {
  .h-grid .card:hover .card-ico svg { animation: g3-print .7s steps(9, end); }
}

/* Генератор: модель мягко проявляется при открытии */
@keyframes g3-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.g3-stage #view { animation: g3-in .6s cubic-bezier(.2, .7, .2, 1) both; }
/* Скачивание: кнопка становится галочкой, стрелка «уходит» вниз */
.btn[data-download] { position: relative; overflow: hidden; }
.btn[data-download] .dl-ok { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; }
.btn[data-download] .dl-ok svg { width: 24px; height: 24px; }
.btn[data-download] .dl-ok path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.btn[data-download].done > :not(.dl-ok) { opacity: 0; }
.btn[data-download].done { color: transparent; }
.btn[data-download].done .dl-ok { opacity: 1; color: var(--accent-ink); animation: g3-drop .45s cubic-bezier(.2, .7, .2, 1); }
.btn[data-download]:not(.primary).done .dl-ok { color: var(--ok); }
.btn[data-download].done .dl-ok path { animation: g3-check .4s .12s ease-out forwards; }
.btn[data-download][aria-busy="true"]::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%;
  background: currentColor; opacity: .5; animation: g3-busy 1s ease-in-out infinite;
}
@keyframes g3-drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes g3-check { to { stroke-dashoffset: 0; } }
@keyframes g3-busy { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

@media (prefers-reduced-motion: reduce) {
  html.rv .h-grid .card:not(.in), html.rv .rv-sec:not(.in) { opacity: 1; transform: none; }
  html.rv .h-grid .card.in, html.rv .rv-sec.in { animation: none; }
  .h-grid .card:hover .card-ico svg, .g3-stage #view,
  .btn[data-download].done .dl-ok, .btn[data-download][aria-busy="true"]::after { animation: none; }
  .btn[data-download].done .dl-ok path { animation: none; stroke-dashoffset: 0; }
}
@media print { html.rv .h-grid .card:not(.in), html.rv .rv-sec:not(.in) { opacity: 1; transform: none; } }

/* Главная: живая 3D-модель в витрине и в карточках сетки (home3d.js) — проявляется поверх фото/иконки, фон-подложка остаётся */
[data-h3d] .card-ico { position: relative; }
[data-h3d] .h3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s ease; touch-action: pan-y; cursor: grab; }
.h3d-on .h3d-canvas { opacity: 1; }
.h3d-on .card-pic img, .h3d-on .card-ico svg { opacity: 0; transition: opacity .6s ease; }
.toast.bad { background: var(--bad-bg); color: var(--bad); }
@media (prefers-reduced-motion: reduce) { [data-h3d] .h3d-canvas, .h3d-on .card-pic img, .h3d-on .card-ico svg { transition: none; } }

/* Карточка генератора (сетка главной, предпросмотр «Карточки»): картинка во всю ширину со статусом поверх,
   название, описание, до трёх пунктов «что умеет», форматы чипами и кнопка. Вся карточка — одна ссылка. */
.card.gc { padding: 0; gap: 0; overflow: hidden; }
.card.gc .card-top { border-radius: 0; overflow: hidden; }
.card.gc .card-pic, .card.gc .card-ico { height: auto; aspect-ratio: 16 / 9; border-radius: 0; }
.card.gc .card-ico svg { width: 88px; height: 88px; }
.h-grid.pic-normal .card.gc .card-pic, .h-grid.pic-normal .card.gc .card-ico { aspect-ratio: auto; height: 160px; }
.h-grid.pic-compact .card.gc .card-pic, .h-grid.pic-compact .card.gc .card-ico { aspect-ratio: auto; height: 120px; }
.card-tags { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.card-tags .flag { position: static; }
.card-tags .badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 1px 6px rgba(0, 0, 0, .14);
}
.card-tags .badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.card-tags .badge.beta::before { background: var(--beta); }
.card-tags .badge.soon::before { background: var(--muted); }
.card.gc .card-body { padding: 18px 20px 0; gap: 8px; }
.card.gc .card-title { font: 600 19px/1.25 var(--font-head); }
.card.gc .card-desc { display: block; font-size: 14px; line-height: 1.5; }
.card-feat { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--text); }
.card-feat li { position: relative; padding-left: 22px; }
.card-feat li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-text); font-weight: 700; }
.card.gc .card-meta { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding: 16px 20px 0; }
.fmt-chip { font: 500 12px/1 var(--font-mono); padding: 6px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.card-go {
  display: flex; align-items: center; min-height: 44px; margin: 16px 20px 20px; padding: 0 16px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font: 600 15px/1.2 var(--font); transition: filter .15s;
}
.card.gc:hover .card-go, .card.gc:focus-visible .card-go { filter: brightness(1.1); }
.card.gc.soon .card-go { background: var(--surface-2); color: var(--muted); }
@media (max-width: 899px) {
  .card.gc .card-body { padding: 16px 16px 0; }
  .card.gc .card-meta { padding: 14px 16px 0; }
  .card-go { margin: 14px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) { .card-go { transition: none; } }

/* «3D-перегляд»: страница заказчика до PIN и закрытая ссылка (review.tsx); сам просмотр — стили пакета review */
.rv-body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); }
.rv-gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; box-sizing: border-box; }
.rv-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; box-sizing: border-box; }
.rv-card h1 { margin: 0; font: 700 22px/1.2 var(--font-head); }
.rv-card p { margin: 0; line-height: 1.45; }
.rv-card .btn { width: 100%; }
.rv-logo { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; }
.rv-shop { font-weight: 700; }
.rv-code { width: 100%; max-width: 200px; min-height: 56px; padding: 0 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: 600 28px/1 var(--font-mono); letter-spacing: .4em; text-align: center; box-sizing: border-box; }
.rv-code:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.rv-card .rv-msg { min-height: 1.3em; color: var(--bad); font-size: 14px; }
.rv-made { margin: 0; padding: 14px 16px 18px; text-align: center; font-size: 13px; color: var(--muted); }
.rv-made a { color: var(--accent-text); }

.rvp { display: flex; flex-direction: column; gap: 12px; }
.rvp-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rvp-logo > span { width: 100%; font-weight: 600; }
.rvp-logo img { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: var(--surface-2); }
.rvp-logo [hidden] { display: none; }
.rvp-logo .btn { min-height: 44px; }
.rvp-pal { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rvp-pal legend { font-weight: 600; padding: 0; }
.rvp-pal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rvp-row { display: flex; align-items: center; gap: 8px; }
.rvp-row input[type=color] { width: 48px; height: 44px; padding: 2px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); flex: none; }
.rvp-row input[name=cname] { flex: 1; min-width: 0; }
.rvp-row .btn { min-height: 44px; flex: none; }

.rvp-item { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; display: flex; min-width: 0; color: var(--text); }
.rvp-del { color: var(--bad); }
.rvp-dlg-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.rvp-dlg-row .btn { min-height: 44px; }
.rvp-dlg .auth-err { margin-top: 12px; }
.rvp-item img, .rvp-ph { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
