:root {
  --bg: #f3f6f6;
  --surface: #ffffff;
  --surface-alt: #edf5f4;
  --border: #dde5e4;
  --text: #17181a;
  --text-muted: #6b7280;
  --accent: #0ABAB5;
  --accent-hover: #099b97;
  --accent-soft: #e2f7f6;
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --error: #dc2626;
  --error-soft: #fef2f2;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --accent-text: #17332f;
}

:root[data-theme="dark"] {
  --bg: #1c1c1f;
  --surface: #26262a;
  --surface-alt: #2e2e33;
  --border: #3c3c40;
  --text: #f5f5f6;
  --text-muted: #9b9b9e;
  --accent: #0ABAB5;
  --accent-hover: #2fd4cf;
  --accent-soft: rgba(10, 186, 181, 0.14);
  --success: #22c55e;
  --success-soft: #16281c;
  --error: #f87171;
  --error-soft: #2c1a1c;
  --warn: #fbbf24;
  --warn-soft: #2b2415;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.app { display: flex; flex-direction: column; min-height: 100vh; }
.app.login-page { align-items: center; justify-content: center; }
.app.login-page main.content { padding: 0; max-width: none; width: auto; margin: 0; flex: none; }

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 800; font-size: 18px; letter-spacing: 0.2px; }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { font-size: 14px; color: var(--text-muted); padding: 6px 2px; border-bottom: 2px solid transparent; }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); border-bottom-color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.linklike { background: none; border: none; color: var(--text-muted); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: var(--text); }

main.content { flex: 1; padding: 32px 40px; max-width: 1080px; width: 100%; margin: 0 auto; }
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  main.content { padding: 20px; }
}

h1 { font-size: 24px; margin: 0 0 4px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.muted { color: var(--text-muted); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.panel.narrow { max-width: 560px; }

.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 16px; }

input, select, textarea, button {
  font: inherit;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 90px; resize: vertical; font-family: inherit; }

button, a.button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.12s ease;
}
button:hover, a.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.secondary, a.button.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
button.secondary:hover, a.button.secondary:hover { background: var(--surface-alt); }
/* Ссылкам-кнопкам те же поля и рамка, что у <button> (раньше выглядели как подсвеченный текст). */
a.button { padding: 10px 13px; border-width: 1px; border-style: solid; border-radius: 8px; }
button.small, a.button.small { padding: 7px 12px; font-size: 13px; }
button:disabled { opacity: 0.6; cursor: default; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text-muted);
}
.badge-generated { background: var(--success-soft); color: var(--success); }
.badge-error { background: var(--error-soft); color: var(--error); }
.badge-draft { background: var(--warn-soft); color: var(--warn); }
.badge-generating { background: var(--warn-soft); color: var(--warn); }

.generating-panel { display: flex; gap: 14px; align-items: center; }
.spinner { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--warn-soft); border-top-color: var(--warn); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.flashes { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.flash-success { background: var(--success-soft); color: var(--success); }
.flash-error { background: var(--error-soft); color: var(--error); }

.center-box {
  width: 100%;
  max-width: 340px;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.center-box h1 { text-align: center; margin-bottom: 4px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: 140px;
}
.project-card:hover { border-color: var(--accent); }
.project-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-card-title { font-weight: 600; font-size: 15px; }
.project-card-brief { font-size: 13px; line-height: 1.4; margin: 0; }

.preview-frame { width: 100%; height: 70vh; min-height: 480px; border: none; display: block; background: #fff; }

/* ---------- конструктор ---------- */

.badge-builder { background: var(--accent-soft); color: var(--text); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.niche-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.niche-card { position: relative; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.niche-card:hover { border-color: var(--accent); }
.niche-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.niche-card input { position: absolute; opacity: 0; pointer-events: none; }
.niche-name { font-size: 16px; font-weight: 700; }
.niche-meta { font-size: 13px; font-weight: 400; }
.niche-swatch { width: 28px; height: 6px; border-radius: 3px; margin-top: 10px; }

main.content.content-wide { max-width: none; padding: 0; display: flex; }
.editor { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; flex: 1; min-height: 0; height: calc(100vh - 63px); }
.editor-side { overflow-y: auto; border-right: 1px solid var(--border); background: var(--surface); padding: 18px 18px 28px; }
.editor-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.small-link { font-size: 13px; }
.title-input { font-size: 18px; font-weight: 700; padding: 6px 8px; margin-left: -8px; border-color: transparent; background: transparent; }
.title-input:hover { border-color: var(--border); }
#save-status.err { color: var(--error); font-weight: 600; }
.editor-foot { margin-top: 24px; }
button.danger { color: var(--error); border-color: var(--error); }

.ed-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; margin: 22px 0 8px; }
.ed-panel { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); }
.ed-panel.is-off .ed-panel-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 50%, transparent); }
.ed-panel > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.ed-panel > summary::-webkit-details-marker { display: none; }
.ed-panel > summary::before { content: "›"; display: inline-block; width: 10px; color: var(--text-muted); transition: transform .15s; }
.ed-panel[open] > summary::before { transform: rotate(90deg); }
.ed-panel-title { flex: 1; min-width: 0; }
.ed-panel-tools { display: flex; align-items: center; gap: 4px; }
.ed-panel-body { padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); padding-top: 12px; }

.f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.f input[type=text], .f textarea, .f select { font-size: 14px; padding: 8px 10px; }
.f textarea { min-height: 64px; }

.icon-btn { background: transparent; border: 1px solid transparent; color: var(--text-muted); padding: 2px 7px; font-size: 13px; font-weight: 500; border-radius: 6px; }
.icon-btn:hover:not(:disabled) { background: var(--surface-alt); border-color: var(--border); color: var(--text); }
.icon-btn:disabled { opacity: .3; }

.switch { position: relative; display: inline-flex; width: 34px; height: 20px; flex: none; cursor: pointer; margin-left: 4px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-ui { width: 100%; height: 100%; border-radius: 999px; background: var(--border); transition: background .15s; position: relative; pointer-events: none; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px var(--accent-soft); }

.items { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px dashed var(--border); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.item-tools { display: flex; align-items: center; gap: 2px; }
.item-num { flex: 1; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.add-item { align-self: flex-start; }

.img-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.img-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-alt); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.swatch.active { box-shadow: 0 0 0 2px var(--text); }
.swatches input[type=color] { width: 34px; height: 30px; padding: 2px; cursor: pointer; }

.editor-preview { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--bg); }
.seg-btn { background: transparent; border: 0; color: var(--text-muted); padding: 6px 12px; font-size: 13px; font-weight: 600; border-radius: 6px; }
.seg-btn:hover { background: transparent; color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.preview-stage { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 16px; }
.preview-stage iframe { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 10px; background: #fff; transition: width .25s ease; }
.preview-stage.mobile iframe { width: 390px; max-width: 100%; border-radius: 28px; border-width: 8px; border-color: #1d1d1f; }

@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; height: auto; }
  .editor-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .preview-stage { height: 80vh; }
}

.layout-pick { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-right: auto; }
.layout-pick select { padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.layout-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.layout-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; white-space: normal; padding: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-weight: 400; }
.layout-card:hover { background: var(--surface-alt); border-color: var(--accent); }
.layout-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--surface); }
.layout-card-name { font-weight: 700; font-size: 13.5px; }
.layout-card-desc { font-size: 11.5px; line-height: 1.35; color: var(--text-muted); }

/* --- Сайт из Яндекс Карт --- */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.import-check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.import-check input { width: 18px; height: 18px; }
.import-note { font-size: 13px; margin: 0; }
.import-history-title { margin: 0 0 10px; }
.import-history { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.import-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 13.5px; }
.import-row:hover { border-color: var(--accent); }
.import-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-url-line { overflow-wrap: anywhere; }
.import-badge-done { background: var(--success-soft); color: var(--success); }
.import-badge-error { background: var(--error-soft); color: var(--error); }
.import-badge-pending, .import-badge-running, .import-badge-need_niche { background: var(--warn-soft); color: var(--warn); }
.import-progress { display: flex; align-items: center; gap: 14px; }
.import-spinner { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: import-spin 0.9s linear infinite; }
@keyframes import-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .import-spinner { animation-duration: 3s; } }
.import-summary { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* ---- сайт как услуга: вкладки проекта, настройки, заявки, подписки, Директ ---- */
.project-head { margin-bottom: 10px; }
.project-head h1 { margin-top: 4px; }
.ptabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.ptabs a { padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ptabs a:hover { color: var(--text); }
.ptabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.panel + .panel, .panel + form, form + .panel, .stack + .panel, .cols2 + .panel, .panel + .cols2 { margin-top: 16px; }
.hint { font-size: 12.5px; font-weight: 400; line-height: 1.45; margin: 6px 0 0; }
.note-warn { background: var(--warn-soft); color: var(--text); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 12px; }
.note-warn a, .hint a { text-decoration: underline; }
.settings-block { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.settings-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 6px; }
.chat-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chat-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 14px; }
.row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-actions input { width: auto; flex: 1; min-width: 200px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid2 .span2 { grid-column: 1 / -1; }
.check-line { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.check-line input { width: auto; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.pages-list { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.pages-list ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.8; }
.pages-list a { text-decoration: underline; }
code { font-size: 12.5px; background: var(--surface-alt); padding: 1px 5px; border-radius: 5px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--text); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a { text-decoration: underline; text-decoration-color: var(--border); }
.tbl tr.is-test td { background: var(--surface-alt); }
.tbl tr.is-spam td { opacity: .55; }
.nowrap { white-space: nowrap; }
.cell-text { max-width: 320px; white-space: pre-line; }
.cell-small { font-size: 12.5px; max-width: 260px; }
.panel .tbl td, .panel .tbl th { padding-left: 0; }
.sub-state { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); margin-bottom: 16px; font-size: 15px; }
.sub-state.sub-overdue { background: var(--error-soft); border-color: var(--error); }
.sub-state.sub-soon { background: var(--warn-soft); border-color: var(--warn); }
.sub-state.sub-ok { background: var(--success-soft); border-color: var(--success); }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cols2 > .stack > .panel + .panel { margin-top: 0; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-alt); white-space: nowrap; }
.pill-ok { background: var(--success-soft); color: var(--success); }
.pill-soon, .pill-unpaid { background: var(--warn-soft); color: var(--warn); }
.pill-overdue { background: var(--error-soft); color: var(--error); }
.copy-block { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.copy-block textarea { font-size: 13px; min-height: 0; width: 100%; }
.counted { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.counted .muted { grid-column: 1 / -1; font-size: 11.5px; }
.counter { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--error); font-weight: 700; }
.ad-preview { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; background: var(--bg); font-family: Arial, sans-serif; }
.ad-title { color: #1a0dab; font-size: 16px; }
:root[data-theme="dark"] .ad-title { color: #8ab4f8; }
.ad-url { color: var(--success); font-size: 13px; margin: 2px 0; }
.ad-text { font-size: 13.5px; }
.steps-list { margin: 0 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.steps-list a { text-decoration: underline; }
.editor-tabs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-top: 4px; }
.editor-tabs a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border); }
.editor-tabs a:hover { color: var(--text); }
.preview-actions { display: flex; align-items: center; gap: 10px; }
.page-pick select { padding: 6px 8px; font-size: 13px; }
.add-blocks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (max-width: 860px) { .cols2, .grid2 { grid-template-columns: 1fr; } .settings-block { grid-template-columns: 1fr; } }
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; border: 1px solid var(--border); }
.niche-group + .niche-group { margin-top: 18px; }
.niche-group h3 { margin-bottom: 10px; }
.order-dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin: 16px 0 0; font-size: 14px; }
.order-dl dt { color: var(--text-muted); font-weight: 600; }
.order-dl dd { margin: 0; }
.row-actions .pill { text-decoration: none; }
.opt-groups { display: grid; gap: 16px; margin: 6px 0 4px; }
.opt-title { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 8px; }
.opt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.opt-card { position: relative; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 14px 14px 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; color: var(--text); font-weight: 400; }
.opt-card input { position: absolute; left: 14px; top: 16px; width: auto; accent-color: var(--accent); }
.opt-card b { font-size: 14.5px; }
.opt-card span { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.opt-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* мини-превью анимаций в карточках выбора */
.mo-prev { position: relative; display: block; width: 100%; height: 74px; margin: 2px 0 8px; border-radius: 8px; overflow: hidden; background: var(--surface-alt); font-style: normal; }
.mo-prev i, .mo-prev s { position: absolute; display: block; text-decoration: none; }
.mo-calm i { left: 12px; right: 12px; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--text) 16%, transparent); animation: mo-calm 3.6s ease infinite; }
.mo-calm i:nth-child(1) { top: 14px; right: 40%; }
.mo-calm i:nth-child(2) { top: 32px; animation-delay: .25s; }
.mo-calm i:nth-child(3) { top: 50px; right: 28%; animation-delay: .5s; }
@keyframes mo-calm { 0%, 12% { opacity: 0; transform: translateY(8px); } 30%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.mo-live { background: #121216; }
.mo-live i { width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: mo-tw 2.4s ease-in-out infinite alternate; }
.mo-live i:nth-child(1) { left: 14%; top: 22%; } .mo-live i:nth-child(2) { left: 70%; top: 16%; animation-delay: -.8s; }
.mo-live i:nth-child(3) { left: 40%; top: 30%; animation-delay: -1.6s; } .mo-live i:nth-child(4) { left: 88%; top: 34%; animation-delay: -.4s; }
.mo-live i:nth-child(5) { left: -10%; right: -10%; top: auto; bottom: 12px; width: auto; height: 18px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 34px, transparent 34px 46px); transform: rotate(-4deg); opacity: .9; animation: mo-run 2.2s linear infinite; }
@keyframes mo-tw { from { opacity: .2; } to { opacity: 1; } }
@keyframes mo-run { from { background-position: 0 0; } to { background-position: -92px 0; } }
.mo-flow i { width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, transparent), transparent 66%); animation: mo-drift 5s ease-in-out infinite alternate; }
.mo-flow i:nth-child(1) { left: -10px; top: -30px; }
.mo-flow i:nth-child(2) { right: 0; top: 0; background: radial-gradient(circle, rgba(255, 170, 120, .7), transparent 66%); animation-duration: 6.5s; animation-direction: alternate-reverse; }
.mo-flow i:nth-child(3) { left: 38%; top: 10px; background: radial-gradient(circle, rgba(150, 120, 255, .55), transparent 66%); animation-duration: 7.5s; }
@keyframes mo-drift { to { transform: translate(40px, 12px) scale(1.2); } }
.mo-cinema { background: linear-gradient(135deg, #5a4636, #1d1712); }
.mo-cinema i { left: 0; right: 0; height: 50%; background: #0b0b0d; z-index: 1; animation: mo-veil 3.6s cubic-bezier(.77,0,.18,1) infinite; }
.mo-cinema i:nth-child(1) { top: 0; } .mo-cinema i:nth-child(2) { bottom: 0; --dir: 1; }
.mo-cinema s { left: 14px; top: 30px; width: 60%; height: 12px; border-radius: 2px; background: #fff; animation: mo-wipe 3.6s cubic-bezier(.77,0,.18,1) infinite; }
@keyframes mo-veil { 0%, 25% { transform: none; } 45%, 90% { transform: translateY(calc(var(--dir, -1) * 100%)); } 100% { transform: none; } }
@keyframes mo-wipe { 0%, 45% { clip-path: inset(0 100% 0 0); } 65%, 90% { clip-path: inset(0); } 100% { clip-path: inset(0 100% 0 0); } }
.mo-play i { width: 18px; height: 18px; bottom: 10px; border-radius: 50%; background: var(--accent); animation: mo-bounce .9s cubic-bezier(.34,1.56,.64,1) infinite alternate; }
.mo-play i:nth-child(1) { left: 14%; }
.mo-play i:nth-child(2) { left: 36%; border-radius: 4px; background: #ffd23f; animation-delay: -.3s; }
.mo-play i:nth-child(3) { left: 58%; width: 0; height: 0; border-radius: 0; background: none; border: 10px solid transparent; border-bottom: 18px solid #3ecf8e; border-top: 0; animation-delay: -.6s; }
.mo-play i:nth-child(4) { left: 80%; background: #ff7ab6; animation-delay: -.15s; }
@keyframes mo-bounce { from { transform: translateY(0) rotate(0); } to { transform: translateY(-36px) rotate(25deg); } }
@media (prefers-reduced-motion: reduce) { .mo-prev i, .mo-prev s { animation: none; } }
