@font-face {
  font-family: 'Inter';
  src: url('./assets/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* Токены — по DS Intimlife: Inter, #222 / #6A6A6A, серые F7…B0, бренд #FE133A */
:root {
  --ink: #222222;
  --ink-2: #6a6a6a;
  --ink-3: #b0b0b0;
  --line: #ebebeb;
  --line-2: #dddddd;
  --bg: #f7f7f7;
  --bg-2: #f1f1f1;
  --surface: #ffffff;
  --brand: #fe133a;
  --brand-hover: #e00b30;
  --ok: #1f8a5b;
  --warn: #b26a00;
  --warn-bg: #fff4e0;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .04);
  --shadow-2: 0 6px 20px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
  --shadow-3: 0 24px 64px rgba(0, 0, 0, .18), 0 4px 16px rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss03';
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
em { font-style: normal; }
.muted { color: var(--ink-3); font-weight: 400; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app[hidden] { display: none; }
body.is-busy, body.is-busy * { cursor: progress !important; }

/* ---------- вход ---------- */
.login-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: rgba(247, 247, 247, .96); backdrop-filter: blur(6px); }
.login {
  width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px;
  padding: 32px 28px 28px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-2); border: 1px solid var(--line);
}
.login .brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
.login h1 { font-size: 22px; letter-spacing: -.02em; font-weight: 650; margin-top: 4px; }
.login .hint { margin-top: -8px; }
.login .btn { height: 44px; margin-top: 4px; }
.login-note { padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 12px 16px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.main { min-width: 0; padding: 28px 32px 120px; }

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--brand);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; letter-spacing: -.02em;
}
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; text-decoration: none;
  color: var(--ink); font-weight: 500;
  transition: background .15s;
}
.nav-item:hover { background: var(--bg); }
.nav-item.on { background: var(--bg-2); }
.nav-item svg { width: 18px; height: 18px; color: var(--ink-2); flex: none; }
.nav-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item em { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-item .dot { flex: none; }
.nav-item .dirty { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.nav-label {
  display: flex; justify-content: space-between;
  padding: 18px 10px 6px; color: var(--ink-2); font-size: 12px; font-weight: 500;
}
.nav-label em { color: var(--ink-3); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink-3)); flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.nav-new {
  display: flex; align-items: center; gap: 10px; margin-top: 4px;
  padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left;
  color: var(--ink-2); font-weight: 500;
}
.nav-new:hover { background: var(--bg); color: var(--ink); }
.nav-new svg { width: 18px; height: 18px; }
.side-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.side-foot p { margin-bottom: 8px; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--bg); border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #000; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { color: #c4122f; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.link { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link.sm { font-size: 12px; color: var(--ink-2); }
.link.sm:hover { color: var(--ink); }

.icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center;
  border: 0; border-radius: 8px; background: none; color: var(--ink-2);
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn:disabled { opacity: .3; background: none; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }

input[type=text], input[type=search], input[type=tel], input[type=number], input:not([type]), textarea, select {
  width: 100%; min-height: 40px; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.45; }
input:hover, textarea:hover, select:hover { border-color: var(--ink-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(34, 34, 34, .08); }
input.invalid { border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .flabel { font-size: 13px; font-weight: 500; color: var(--ink); }
.field .req { color: var(--brand); }
.hint { color: var(--ink-2); font-size: 13px; }
.hint.lead { margin-bottom: 18px; max-width: 640px; }
.ferr { color: var(--brand); font-size: 12px; min-height: 0; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border-radius: 11px; }
.seg button {
  height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  color: var(--ink-2); font-weight: 500; font-size: 13px; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg button em { color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg.sm button { height: 28px; padding: 0 10px; font-size: 12px; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 99px; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 500;
}
.pill.ok { background: #e7f5ee; color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- страница ---------- */
.page { max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; font-weight: 650; }
.page-head .sub { margin-top: 6px; color: var(--ink-2); max-width: 620px; }
.page-head .sub a { color: var(--ink-2); }
.page-head .sub a:hover { color: var(--ink); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.actions { display: flex; gap: 8px; flex: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.search { position: relative; flex: 0 1 300px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 36px; }
.toolbar select { width: auto; min-width: 180px; }

/* ---------- библиотека анкет ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 28px 18px; }
.tile { display: block; padding: 0; border: 0; background: none; text-align: left; }
.tile-photo { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--bg-2); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.tile:hover .tile-photo { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tile-flag {
  position: absolute; left: 8px; top: 8px; right: 8px;
  padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .94);
  color: var(--warn); font-size: 11px; font-weight: 600; line-height: 1.3;
}
.tile-body { padding: 10px 2px 0; }
.tile-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.tile-name.empty { color: var(--ink-3); }
.tile-specs, .tile-city { color: var(--ink-2); font-size: 13px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sites { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
  font-size: 11px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.chip.none { border-style: dashed; color: var(--ink-3); }
.empty-state { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: 16px; }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* заглушка фото */
.ph {
  position: absolute; inset: 0; display: grid; place-items: end center; overflow: hidden;
  background: linear-gradient(165deg, hsl(var(--h) 42% 80%), hsl(calc(var(--h) + 24) 30% 52%));
}
.ph svg { width: 78%; height: auto; color: hsl(var(--h) 30% 96% / .7); margin-bottom: -2px; }
.ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 12px; font-weight: 500; background: var(--bg-2); }

/* ---------- страница сайта ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.tabs a {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 10px 12px 12px; text-decoration: none; color: var(--ink-2); font-weight: 500;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); }
.tabs a.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.tabs a em { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.tabs a em.ok { color: var(--ok); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 40px; align-items: start; }
.split-main { min-width: 0; max-width: 720px; }
.split-side { position: sticky; top: 20px; }

.block { margin-bottom: 28px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.block-head h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.block-head h3 em { color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.block-head p { color: var(--ink-2); font-size: 13px; margin-top: 2px; }

.dlist {
  list-style: none; margin: 0; padding: 6px; min-height: 64px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s, background .15s;
}
.dlist.over { border-color: var(--ink); background: #fcfcfc; }
.drow {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 4px; border-radius: 10px;
  background: var(--surface); cursor: grab; user-select: none;
  transition: background .12s;
}
.drow:hover { background: var(--bg); }
.drow.dragging { opacity: .35; }
.drow .grip { color: var(--ink-3); display: grid; place-items: center; width: 18px; }
.drow .grip svg { width: 16px; height: 16px; }
.drow .num { width: 20px; text-align: right; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.drow-photo { position: relative; width: 40px; height: 52px; border-radius: 8px; overflow: hidden; flex: none; background: var(--bg-2); }
.drow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drow-main b { font-weight: 600; }
.drow-main small { color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow-acts { display: flex; gap: 0; opacity: 0; transition: opacity .15s; }
.drow:hover .drow-acts, .drow:focus-within .drow-acts { opacity: 1; }
.dmarker { height: 2px; margin: 3px 8px; border-radius: 2px; background: var(--brand); list-style: none; }
.dempty { padding: 18px 14px; color: var(--ink-2); font-size: 13px; text-align: center; list-style: none; }

.tgroup { padding: 20px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.tgroup > h3 { font-size: 15px; font-weight: 650; margin-bottom: 14px; letter-spacing: -.01em; }
.tgroup > .hint { margin-top: 10px; }
.tfield { display: flex; flex-direction: column; gap: 6px; }
.tfield + .tfield { margin-top: 14px; }
.tlabel { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 500; }
.tstate { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.tfield.own .tstate { color: var(--ink); }
.tfield.own .tstate::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--brand); vertical-align: 1px; }
.tlabel .link { margin-left: auto; }
.tfield:not(.own) textarea, .tfield:not(.own) input { color: var(--ink-2); }

.snippet { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.snippet small { display: block; color: var(--ink-2); font-size: 12px; }
.snippet b { display: block; margin: 2px 0 4px; color: #1a0dab; font-weight: 400; font-size: 17px; }
.snippet p { color: #4d5156; font-size: 13px; }

.theme-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-card {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 12px; text-align: left;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.theme-card:hover { border-color: var(--ink-3); }
.theme-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme-card b { margin-top: 6px; }
.theme-card small { color: var(--ink-2); font-size: 12px; }
.tc-thumb { display: block; height: 92px; border-radius: 9px; overflow: hidden; position: relative; }
.tc-vellume { background: linear-gradient(180deg, #2b2730 0 52%, #fff 52%); }
.tc-vellume::after { content: ''; position: absolute; left: 12%; right: 12%; top: 42%; height: 18%; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.tc-editorial { background: #f4f1ec; }
.tc-editorial::before { content: 'Aa.'; position: absolute; left: 12px; top: 8px; font-size: 38px; letter-spacing: -.04em; color: #2c2229; }
.tc-editorial::after { content: ''; position: absolute; left: 12px; bottom: 12px; width: 44%; height: 14px; border-radius: 99px; border: 1.5px solid #2c2229; }

.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-row input[type=color] { width: 44px; height: 40px; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; }
.color-row input.hex { width: 120px; font-family: ui-monospace, monospace; text-transform: lowercase; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); background: var(--c); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }

.asset-row { display: flex; align-items: center; gap: 14px; }
.asset-row + .asset-row { margin-top: 14px; }
.asset-thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--bg-2); flex: none; display: grid; place-items: center; color: var(--ink-3); font-size: 11px; }
.asset-thumb.wide { width: 112px; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset-row .grow { flex: 1; min-width: 0; }
.asset-row .grow b { display: block; font-weight: 500; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .full { grid-column: 1 / -1; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.goal { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg); margin-bottom: 14px; }
.goal p { grid-column: 1 / -1; color: var(--ink-2); font-size: 13px; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
.goal code { padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.out { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--bg); }
.out code { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.radio-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.radio-list .check.disabled { color: var(--ink-3); cursor: default; }
.inline-field { display: flex; gap: 10px; align-items: center; }
.inline-field input { flex: 1; }

/* ---------- предпросмотр ---------- */
.preview-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13px; font-weight: 500; }
.preview-head .muted { font-size: 12px; }
.preview-head .muted.warn { color: var(--brand); }
.device {
  width: 392px; height: calc(100vh - 92px); max-height: 860px; min-height: 480px;
  padding: 8px; border-radius: 34px; background: #1d1d1f; box-shadow: var(--shadow-2);
}
.screen { position: relative; height: 100%; overflow-y: auto; border-radius: 27px; background: #fff; scrollbar-width: none; }
.screen.is-frame { overflow: hidden; }
.site-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.preview-head .seg { margin: -4px 0; }
.preview-note { margin-top: 10px; font-size: 12px; max-width: 392px; }
.lp-ed-photo { height: 190px; margin: 0 16px 6px; border-radius: 12px; overflow: hidden; background: var(--bg-s); }
.lp-ed-photo img { width: 100%; height: 100%; object-fit: cover; }
.screen::-webkit-scrollbar { display: none; }

/* ---------- drawer / modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20, 20, 20, .38); animation: fade .2s var(--ease); }
.drawer {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(1000px, 94vw);
  display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-3);
  animation: slide .28s var(--ease);
}
.drawer > header, .modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.drawer > header small, .modal > header small { color: var(--ink-2); font-size: 12px; font-weight: 500; }
.drawer > header h2, .modal > header h2 { font-size: 22px; letter-spacing: -.02em; font-weight: 650; margin-top: 2px; }
.drawer-body { flex: 1; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.drawer-form { padding: 22px 24px 32px; display: flex; flex-direction: column; gap: 26px; }
.drawer-form h3 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.drawer-side { padding: 22px 24px; background: var(--bg); border-left: 1px solid var(--line); }
.drawer-side .sticky { position: sticky; top: 0; }
.drawer-side h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.drawer > footer, .modal > footer { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.spacer { flex: 1; }
.form-error { color: var(--brand); font-size: 13px; font-weight: 500; text-align: right; }

.photo-field { display: flex; gap: 16px; align-items: flex-start; }
.photo-box {
  position: relative; width: 150px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; flex: none;
  background: var(--bg-2); border: 1px dashed transparent;
}
.photo-box.drop { border-color: var(--ink); }
.photo-box.empty { border-color: var(--line-2); display: grid; place-items: center; text-align: center; color: var(--ink-2); font-size: 12px; padding: 12px; }
.photo-field .col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.place-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.place-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; }
.place-row + .place-row { border-top: 1px solid var(--line); }
.place-row .name { flex: 1; font-weight: 500; }

.card-stage { display: grid; place-items: center; padding: 22px; border-radius: 16px; margin: 12px 0; transition: background .2s; }
.card-stage .lc { width: 200px; }

.modal-wrap { position: fixed; inset: 0; z-index: 51; display: grid; place-items: center; padding: 24px; pointer-events: none; }
.modal {
  pointer-events: auto; width: min(760px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-3);
  animation: pop .22s var(--ease);
}
.modal.wide { width: min(1100px, 100%); }
.modal-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
#modal .scrim { z-index: 50; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px 12px; margin-top: 16px; }
.pick { position: relative; display: block; padding: 0; border: 0; background: none; text-align: left; }
.pick .tile-photo { border: 2px solid transparent; transition: border-color .15s; }
.pick.on .tile-photo { border-color: var(--ink); }
.pick .box {
  position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 7px; z-index: 1;
  background: rgba(255, 255, 255, .92); border: 1.5px solid var(--ink-3); display: grid; place-items: center;
}
.pick.on .box { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick .box svg { width: 14px; height: 14px; }
.pick:disabled { cursor: default; }
.pick:disabled .tile-photo { opacity: .45; }
.pick .note { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.pick:disabled .note { color: var(--warn); }

.dropzone {
  display: grid; place-items: center; gap: 6px; padding: 48px 24px; text-align: center;
  border: 1.5px dashed var(--line-2); border-radius: 16px; background: var(--bg); color: var(--ink-2);
  transition: border-color .15s, background .15s;
}
.dropzone.drop { border-color: var(--ink); background: #fff; }
.dropzone svg { width: 28px; height: 28px; color: var(--ink); }
.dropzone b { color: var(--ink); font-size: 15px; }

.btable { width: 100%; border-collapse: separate; border-spacing: 0; }
.btable th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 0 6px 8px; white-space: nowrap; }
.btable td { padding: 4px 3px; vertical-align: middle; }
.btable input { min-height: 36px; padding: 6px 9px; border-radius: 8px; font-size: 13px; }
.btable .w-xs { width: 66px; }
.btable .w-s { width: 156px; }
.btable .thumb { position: relative; width: 42px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.btable .state { font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.btable .state.ok { color: var(--ok); }
.btable .state.no { color: var(--warn); }
.batch-place { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 16px; background: var(--bg); border-radius: 12px; }
.batch-place select { width: auto; min-height: 36px; }

/* ---------- плашка сохранения, тосты ---------- */
#savebar { position: fixed; z-index: 30; left: 248px; right: 0; bottom: 20px; display: flex; justify-content: center; pointer-events: none; }
.savebar {
  pointer-events: auto; display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 18px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-3);
  animation: rise .25s var(--ease);
}
.savebar .btn { height: 34px; }
.savebar .btn.ghost { color: #fff; }
.savebar .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.savebar small { display: block; color: rgba(255, 255, 255, .6); font-size: 12px; }

.toasts { position: fixed; z-index: 60; right: 20px; top: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  max-width: 420px; padding: 12px 16px; border-radius: 12px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-2); border: 1px solid var(--line); font-weight: 500;
  animation: drop .25s var(--ease);
}
.toast small { display: block; color: var(--ink-2); font-weight: 400; margin-top: 2px; }
.toast.warn { border-color: #f1d6a8; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }

.static { animation: none !important; }
.lp .lc.hl { outline: 2px solid var(--brand); outline-offset: 3px; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- лендинг в предпросмотре ---------- */
.lp { --fg: #2b2730; --fg-2: #6f6873; --bg-l: #ffffff; --bg-s: #f6f3f0; --card: #ffffff; min-height: 100%; background: var(--bg-l); color: var(--fg); font-size: 12px; line-height: 1.4; }
.lp-editorial.lp-light { --fg: #2c2229; --fg-2: #7a6c72; --bg-l: #f7f5f1; --bg-s: #efebe4; --card: transparent; }
.lp-editorial.lp-dark { --fg: #efe9df; --fg-2: #a59d91; --bg-l: #141318; --bg-s: #1d1b22; --card: transparent; }
.lp [data-slot] { border-radius: 4px; transition: background .2s, box-shadow .2s; }
.lp [data-slot].hl { background: rgba(254, 19, 58, .1); box-shadow: 0 0 0 2px var(--brand); }
.lp-tab { display: flex; align-items: center; gap: 6px; padding: 9px 14px 8px; background: #f1f1f1; color: #444; font-size: 11px; border-bottom: 1px solid #e3e3e3; }
.lp-tab i { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); flex: none; }
.lp-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.lp-logo { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; letter-spacing: -.01em; }
.lp-logo i { width: 18px; height: 18px; border-radius: 6px; background: var(--accent); }
.lp-logo img { height: 20px; width: auto; max-width: 90px; object-fit: contain; }
.lp-menu { width: 18px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; opacity: .8; }
.lp-age { display: inline-grid; place-items: center; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 5px; border: 1px solid currentColor; font-size: 10px; font-weight: 600; vertical-align: 6px; letter-spacing: 0; }

.lp-hero { position: relative; }
.lp-vellume .lp-top { position: relative; }
.lp-vellume .lp-bar { position: absolute; z-index: 2; left: 0; right: 0; top: 0; color: #fff; }
.lp-vellume .lp-hero-photo {
  height: 300px; position: relative; overflow: hidden;
  background:
    radial-gradient(90% 70% at 78% 18%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 70%),
    radial-gradient(70% 60% at 10% 90%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    linear-gradient(170deg, #3a3340, #17141a 85%);
}
.lp-vellume .lp-hero-photo::after {
  content: 'фото первого экрана'; position: absolute; right: 14px; top: 50px;
  color: rgba(255, 255, 255, .45); font-size: 10px; letter-spacing: .02em;
}
.lp-vellume .lp-hero-photo:has(img)::after { content: none; }
.lp-vellume .lp-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.lp-vellume .lp-hero-photo:has(img)::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .55)); }
.lp-vellume .lp-hero-copy { position: absolute; left: 16px; right: 16px; bottom: 74px; color: #fff; }
.lp-vellume .lp-hero-copy h1 { font-size: 26px; line-height: 1.08; letter-spacing: -.02em; font-weight: 700; }
.lp-vellume .lp-hero-copy p { margin-top: 6px; font-size: 12px; opacity: .9; }
.lp-vellume .lp-search { position: relative; z-index: 2; margin: -54px 12px 0; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .14); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lp-vellume .lp-search span { padding: 7px 9px; border-radius: 9px; background: #f5f3f1; font-size: 11px; color: var(--fg-2); }
.lp-vellume .lp-search b { grid-column: 1 / -1; display: grid; place-items: center; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 600; }

.lp-editorial .lp-hero { padding: 18px 16px 8px; }
.lp-editorial .lp-hero-copy h1 { font-size: 38px; line-height: .98; letter-spacing: -.045em; font-weight: 400; }
.lp-editorial .lp-hero-copy p { margin-top: 12px; color: var(--fg-2); font-size: 12px; }
.lp-editorial .lp-search { margin: 16px 16px 0; display: grid; gap: 6px; }
.lp-editorial .lp-search span { padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); font-size: 11px; color: var(--fg-2); }
.lp-editorial .lp-search b { margin-top: 6px; display: inline-flex; justify-self: start; align-items: center; height: 32px; padding: 0 16px; border-radius: 99px; background: var(--fg); color: var(--bg-l); font-weight: 500; }
.lp-editorial .lp-age { display: none; }

.lp-sec { padding: 22px 0 6px; }
.lp-sec > :is(h2, p, .lp-kicker, .lp-skel, .lp-common) { margin-left: 16px; margin-right: 16px; }
.lp-sec h2 { font-size: 18px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.lp-editorial .lp-sec h2 { font-size: 24px; font-weight: 400; letter-spacing: -.035em; }
.lp-sec > p { margin-top: 4px; color: var(--fg-2); }
.lp-kicker { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.lp-row { display: flex; gap: 10px; overflow-x: auto; padding: 12px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lp-row::-webkit-scrollbar { display: none; }
.lp-row .lc { flex: 0 0 148px; scroll-snap-align: start; }
.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; padding: 12px 16px 6px; }
.lp-empty { margin: 12px 16px 0; padding: 18px 12px; border: 1.5px dashed color-mix(in srgb, var(--fg) 25%, transparent); border-radius: 12px; text-align: center; color: var(--fg-2); font-size: 11px; }
.lp-common { margin-top: 2px; padding: 12px; border-radius: 12px; background: var(--bg-s); color: var(--fg-2); font-size: 10px; }
.lp-common b { display: block; font-size: 11px; color: var(--fg); margin-bottom: 6px; }
.lp-skel { display: flex; gap: 6px; margin-top: 10px; }
.lp-skel i { height: 44px; flex: 1; border-radius: 9px; background: var(--bg-s); }
.lp-about { margin-top: 18px; padding: 22px 16px; background: var(--bg-s); }
.lp-about h2 { margin: 0 !important; }
.lp-about p { margin-top: 8px; color: var(--fg-2); }
.lp-foot { padding: 18px 16px 28px; color: var(--fg-2); font-size: 10px; }

/* единая карточка анкеты */
.lc { display: flex; flex-direction: column; background: var(--card); border-radius: 14px; color: var(--fg); }
.lc-photo { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--bg-s); }
.lc-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 2px 2px; flex: 1; }
.lc-name { font-weight: 650; font-size: 13px; letter-spacing: -.01em; }
.lc-specs, .lc-extra { color: var(--fg-2); font-size: 11px; }
.lc-call { display: grid; place-items: center; height: 30px; margin-top: auto; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 11.5px; }
.lc-body .lc-call { margin-top: 8px; }
.lp-vellume .lc { box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .05); padding: 6px; }
.lp-vellume .lc-body { padding: 8px 4px 2px; }
.lp-vellume .lc-call { background: var(--accent); color: #fff; }
.lp-editorial .lc-name { font-size: 14px; font-weight: 500; }
.lp-editorial .lc-specs { padding-top: 5px; margin-top: 3px; border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent); }
.lp-editorial .lc-call { border: 1px solid var(--fg); border-radius: 99px; color: var(--fg); background: transparent; }
.lp-editorial.lp-dark .lc-call { border-color: var(--accent); color: var(--accent); }

@media (max-width: 1240px) {
  .split { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
  .device { width: 340px; }
}
@media (max-width: 1060px) {
  .split { grid-template-columns: 1fr; }
  .split-side { position: static; order: -1; }
  .device { height: 560px; margin: 0 auto; }
  .drawer-body { grid-template-columns: 1fr; }
  .drawer-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .main { padding: 20px 16px 120px; }
  #savebar { left: 0; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
