/* EditsCut — сайт (лендинг + кабинет). Те же токены, что у Mini App (тема telegram-native, светлые значения),
   чтобы бот, Mini App и сайт выглядели одним продуктом. */
:root {
  --bg: #f2f4f8; --surface: #ffffff; --surface-2: #f6f7fb; --text: #0d1017; --text-muted: #6b7280;
  --line: rgba(13, 16, 23, .08); --accent-solid: #2f7bf6; --accent: var(--accent-solid);
  --accent-2: color-mix(in srgb, var(--accent-solid) 10%, var(--surface)); --on-accent: #ffffff;
  --success: #22b35e; --warning: #f5b544; --danger: #e5484d;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-1: 12px; --fs-2: 14px; --fs-3: 16px; --fs-4: 18px; --fs-5: 22px; --fs-6: 28px; --fs-7: 36px;
  --fs-8: clamp(36px, 5.2vw, 60px);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(15, 20, 35, .05); --shadow-2: 0 10px 30px rgba(15, 20, 35, .08);
  --shadow-3: 0 14px 34px color-mix(in srgb, var(--accent-solid) 32%, transparent);
  --ease: cubic-bezier(.2, .6, .2, 1); --dur: .2s; --maxw: 1180px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--fs-3); line-height: 1.5;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { display: block; }
.hidden { display: none !important; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.muted { color: var(--text-muted); }
.accent-text { color: var(--accent-solid); }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 48px; padding: 0 var(--sp-5);
  border-radius: var(--r-md); font-weight: 700; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-3); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { background: var(--surface); box-shadow: var(--shadow-1); }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: var(--fs-4); padding: 0 var(--sp-6); }

/* ---------- шапка ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav__in { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: var(--fs-4); letter-spacing: -.02em; }
.logo__mark { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.nav__links { display: flex; gap: var(--sp-5); font-weight: 600; font-size: var(--fs-2); color: var(--text-muted); }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; gap: var(--sp-2); }
.nav__cta .btn { min-height: 42px; font-size: var(--fs-2); padding: 0 var(--sp-4); }

/* ---------- лендинг ---------- */
.hero { padding-top: var(--sp-8); padding-bottom: var(--sp-7); display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--sp-7); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-full); background: var(--accent-2);
  color: var(--accent-solid); font-weight: 700; font-size: var(--fs-1); letter-spacing: .02em; }
.hero h1 { font-size: var(--fs-8); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; margin: var(--sp-4) 0; }
.hero p.lead { font-size: var(--fs-4); color: var(--text-muted); max-width: 540px; }
.hero__cta { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }
.hero__facts { display: flex; gap: var(--sp-6); margin-top: var(--sp-6); flex-wrap: wrap; }
.fact b { display: block; font-size: var(--fs-6); letter-spacing: -.02em; }
.fact span { font-size: var(--fs-2); color: var(--text-muted); }

.phone { position: relative; width: min(320px, 80vw); aspect-ratio: 9 / 18.5; margin: 0 auto; border-radius: 44px; background: #0d1017;
  padding: 12px; box-shadow: 0 30px 60px rgba(15, 20, 35, .18); }
.phone__screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; position: relative; background: #151a2a; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.float { position: absolute; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; font-size: var(--fs-2); font-weight: 600; }
.float .ico { width: 30px; height: 30px; border-radius: 10px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; }
.float--a { left: -18%; top: 16%; } .float--b { right: -16%; top: 46%; } .float--c { left: -8%; bottom: 12%; }

.section { padding: var(--sp-8) 0; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; line-height: 1.1; font-weight: 800; text-align: center; }
.section .sub { text-align: center; color: var(--text-muted); max-width: 620px; margin: var(--sp-3) auto 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-top: var(--sp-7); }
.step { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-1); }
.step__n { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; }
.step h3 { font-size: var(--fs-5); margin: var(--sp-4) 0 var(--sp-2); letter-spacing: -.01em; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-top: var(--sp-7); }
.feature { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-1); }
.feature .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; }
.feature h3 { font-size: var(--fs-4); margin: var(--sp-4) 0 var(--sp-1); }
.feature p { color: var(--text-muted); font-size: var(--fs-2); }

.styles-row { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; margin-top: var(--sp-6); }
.style-card { width: 150px; text-align: center; }
.style-card img { width: 150px; height: 200px; object-fit: cover; border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.style-card b { display: block; margin-top: var(--sp-2); font-size: var(--fs-2); }

.price { max-width: 560px; margin: var(--sp-7) auto 0; background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-6);
  box-shadow: var(--shadow-2); text-align: center; }
.price b.big { display: block; font-size: 52px; letter-spacing: -.03em; line-height: 1; }

.faq { max-width: 760px; margin: var(--sp-7) auto 0; display: grid; gap: var(--sp-2); }
.faq details { background: var(--surface); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-1); }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-solid); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: var(--sp-2); color: var(--text-muted); }

.final { margin: var(--sp-7) 0 var(--sp-8); border-radius: 28px; padding: var(--sp-8) var(--sp-5); text-align: center; color: var(--on-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-solid) 85%, #fff), var(--accent-solid) 55%, color-mix(in srgb, var(--accent-solid) 78%, #000)); }
.final h2 { color: inherit; }
.final .btn { background: var(--on-accent); color: var(--accent-solid); margin-top: var(--sp-5); }
.footer { border-top: 1px solid var(--line); padding: var(--sp-6) 0; color: var(--text-muted); font-size: var(--fs-2); }
.footer .wrap { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }

/* ---------- вход ---------- */
.login-card { max-width: 420px; margin: var(--sp-8) auto; background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-7) var(--sp-6);
  text-align: center; box-shadow: var(--shadow-2); }
.login-card h2 { font-size: var(--fs-6); letter-spacing: -.02em; margin-bottom: var(--sp-2); }
#tg-login { display: flex; justify-content: center; margin: var(--sp-5) 0 var(--sp-3); min-height: 48px; }

/* ---------- кабинет: три колонки, как в макете ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr) 380px; gap: var(--sp-5); padding: var(--sp-5) 0 var(--sp-7); align-items: start; }
.side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: var(--sp-3); }
.menu { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-2); box-shadow: var(--shadow-1); }
.menu button { width: 100%; display: flex; align-items: center; gap: var(--sp-3); padding: 11px 12px; border-radius: 12px; font-weight: 600; color: var(--text-muted); }
.menu button.on { background: var(--accent-2); color: var(--accent-solid); }
.balance { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--shadow-1); }
.balance b { font-size: var(--fs-6); letter-spacing: -.02em; }
.me { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; }

.panel { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-1); }
.panel + .panel { margin-top: var(--sp-4); }
.panel h3 { font-size: var(--fs-4); letter-spacing: -.01em; margin-bottom: var(--sp-3); display: flex; justify-content: space-between; align-items: baseline; }
.title-row h1 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; line-height: 1.1; }
.title-row p { color: var(--text-muted); margin: var(--sp-2) 0 var(--sp-4); }

.work { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 260px; width: 100%;
  border: 2px dashed color-mix(in srgb, var(--accent-solid) 35%, transparent); border-radius: var(--r-md); background: var(--surface-2); text-align: center; padding: var(--sp-5);
  transition: background var(--dur) var(--ease); }
.drop.over { background: var(--accent-2); }
.drop .ico { width: 60px; height: 60px; border-radius: 18px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; }
.bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: var(--sp-3); }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent-solid); transition: width .3s var(--ease); }
.player { border-radius: var(--r-md); overflow: hidden; background: #0d1017; aspect-ratio: 9 / 16; max-height: 560px; display: grid; place-items: center; color: #8a90a0; }
.player video { width: 100%; height: 100%; object-fit: contain; }
.pics { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }
.pics > * { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.pics img { width: 100%; height: 100%; object-fit: cover; }
.pics .add { display: grid; place-items: center; color: var(--accent-solid); border: 1.5px dashed color-mix(in srgb, var(--accent-solid) 40%, transparent); background: var(--surface); }

.rows .row { display: flex; align-items: center; gap: var(--sp-3); padding: 12px 0; width: 100%; text-align: left; }
.rows .row + .row { border-top: 1px solid var(--line); }
.row__thumb { width: 42px; height: 56px; border-radius: 10px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; flex: none; }
.row__body { flex: 1; display: flex; flex-direction: column; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-1); color: var(--text-muted); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.chip.ok i { background: var(--success); } .chip.work i { background: var(--accent-solid); } .chip.bad i { background: var(--danger); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.opt { position: relative; border: 2px solid var(--line); border-radius: var(--r-md); padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.opt b { font-size: var(--fs-2); } .opt span { font-size: 11px; color: var(--text-muted); line-height: 1.25; }
.opt .ico { color: var(--accent-solid); }
.opt.on { border-color: var(--accent-solid); background: var(--accent-2); }
.styles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.style { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.style img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 2px solid transparent; }
.style b { font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.2; }
.style.on img { border-color: var(--accent-solid); } .style.on b { color: var(--accent-solid); }
.toggle { display: flex; align-items: center; gap: var(--sp-3); padding: 12px 0; width: 100%; text-align: left; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; flex: none; }
.toggle__body { flex: 1; display: flex; flex-direction: column; } .toggle__body b { font-size: var(--fs-2); }
.switch { width: 46px; height: 28px; border-radius: 28px; background: var(--line); position: relative; flex: none; transition: background var(--dur) var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--on-accent); box-shadow: var(--shadow-1); transition: transform var(--dur) var(--ease); }
.toggle.on .switch { background: var(--accent-solid); } .toggle.on .switch::after { transform: translateX(18px); }
.label { font-weight: 700; font-size: var(--fs-2); margin: var(--sp-4) 0 var(--sp-2); }
.label:first-child { margin-top: 0; }

.progress { display: flex; flex-direction: column; gap: 10px; margin-top: var(--sp-2); }
.check { display: flex; align-items: center; gap: var(--sp-3); }
.check i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.check.done i { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.check.now i { border-color: var(--accent-solid); }
.edit-box { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.edit-box input { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); outline: 0; }
.edit-box input:focus { border-color: var(--accent-solid); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--surface);
  padding: 11px 18px; border-radius: 14px; font-size: var(--fs-2); opacity: 0; pointer-events: none; transition: all var(--dur) var(--ease); z-index: 60; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast--act { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; }
.toast.on.toast--act { pointer-events: auto; }
.toast__btn { font: inherit; font-weight: 700; color: var(--surface); padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 16%, transparent); }
.toast__btn:hover { background: color-mix(in srgb, var(--surface) 26%, transparent); }
.cfm { position: fixed; inset: 0; margin: auto; height: fit-content; border: 0; padding: 0; background: transparent; max-width: calc(100vw - 32px); color: var(--text); }
.cfm::backdrop { background: rgba(10, 14, 25, .42); backdrop-filter: blur(3px); }
.cfm[open] { animation: cfm-in .18s var(--ease); }
@keyframes cfm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.cfm__box { width: 420px; max-width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 22px;
  background: var(--surface); box-shadow: 0 24px 70px rgba(10, 14, 25, .28); }
.cfm__t { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.cfm__p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.45; }
.cfm__b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cfm__b .btn { min-height: 44px; padding: 0 18px; font-size: 14.5px; box-shadow: none; }
.cfm .btn--danger { background: var(--danger); color: #fff; }
@media (max-width: 480px) { .cfm__b { flex-direction: column-reverse; } .cfm__b .btn { width: 100%; } }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .side .menu { flex: 1 1 100%; display: flex; }
  .side .menu button { justify-content: center; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: var(--sp-6); text-align: center; }
  .hero p.lead { margin: 0 auto; } .hero__cta, .hero__facts { justify-content: center; }
  .float { display: none; }
  .steps, .features { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .work { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .nav__cta .btn--ghost { display: none; }
  .styles { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* кабинет шире лендинга: три колонки + две карточки в центре */
#cabinet.wrap { max-width: 1440px; }
.app { grid-template-columns: 220px minmax(0, 1fr) 360px; }
.seg .opt { padding: 12px 4px; min-width: 0; }
.seg .opt b { font-size: 12px; letter-spacing: -.01em; }
@media (max-width: 1280px) { .work { grid-template-columns: 1fr; } }

/* цены: пакеты */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 880px; margin: 24px auto 0; }
.plan { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 20px; padding: 24px; display: grid; gap: 6px; text-align: center; }
.plan--best { border-color: var(--accent); box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 22%, transparent); }
.plan__price { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.plan__tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

/* ---------- лендинг v2: до/после, галерея стилей, настройки, где работает, бета ---------- */
.ba { position: relative; height: 600px; }
.ba__phone { position: absolute; margin: 0; width: 280px; aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; background: #0d1017;
  border: 8px solid #0d1017; box-shadow: 0 30px 60px rgba(15, 20, 35, .20); }
.ba__phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba__phone figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px;
  background: rgba(13, 16, 23, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 12px; font-weight: 600;
  border-radius: 12px; padding: 8px 10px; }
.ba__phone .dot { width: 8px; height: 8px; border-radius: 50%; background: #f5b544; flex: none; }
.ba__phone .dot--ok { background: var(--success); }
.ba__phone--before { left: 0; top: 60px; transform: rotate(-5deg); filter: saturate(.92); }
.ba__phone--before figcaption { font-weight: 500; }
.ba__phone--after { right: 0; top: 0; transform: rotate(3deg); z-index: 2; }
.ba .float { z-index: 3; }
.ba .float--a { left: auto; right: -4%; top: 58%; }
.ba .float--c { left: 18%; bottom: 0; }

.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); margin-top: var(--sp-7); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-2); display: block;
  transition: transform .3s var(--ease); }
.gallery figure:hover img { transform: translateY(-4px); }
.gallery figcaption { margin-top: var(--sp-3); }
.gallery figcaption b { display: block; font-size: var(--fs-3); }
.gallery figcaption span { font-size: var(--fs-2); color: var(--text-muted); }

.tune { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: center; }
.tune h2 { text-align: left; margin: var(--sp-3) 0; }
.ticks { list-style: none; display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.ticks li { display: flex; gap: var(--sp-3); align-items: center; font-weight: 600; }
.ticks li > span { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; flex: none; }
.tune__mock { display: flex; gap: var(--sp-4); align-items: center; justify-content: center; }
.tune__frame { position: relative; width: 230px; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-2); flex: none; }
.tune__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tune__safe { position: absolute; left: 0; right: 0; top: 12%; bottom: 18%; border-top: 1px dashed rgba(255,255,255,.6); border-bottom: 1px dashed rgba(255,255,255,.6); }
.tune__cap { position: absolute; left: 8%; right: 8%; top: 52%; text-align: center; color: #fff; font-weight: 800; font-size: 15px; line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.tune__cap em { font-style: normal; background: var(--accent-solid); border-radius: 4px; padding: 0 3px; }
.tune__panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: var(--sp-4); display: grid; gap: var(--sp-3); width: 270px; }
.tune__row { display: grid; gap: 6px; }
.tune__row b { font-size: 13px; }
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pills i { font-style: normal; font-size: 12px; font-weight: 600; text-align: center; padding: 7px 4px; border-radius: 10px; background: var(--surface-2); color: var(--text-muted); }
.pills i.on { background: var(--accent-2); color: var(--accent-solid); box-shadow: inset 0 0 0 1.5px var(--accent-solid); }
.tune__wish { font-size: 13px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; color: var(--text-muted); }

.where { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-top: var(--sp-7); }
.where__card { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--sp-2); }
.where__card .ico { width: 48px; height: 48px; border-radius: 15px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; }
.where__card h3 { font-size: var(--fs-5); margin-top: var(--sp-2); }
.where__card p { flex: 1; }
.where__card .btn { align-self: flex-start; margin-top: var(--sp-3); min-height: 42px; font-size: var(--fs-2); background: var(--accent-2); color: var(--accent-solid); box-shadow: none; }

.beta { display: grid; grid-template-columns: 280px 1fr; gap: var(--sp-7); align-items: center; background: var(--surface); border-radius: 28px;
  padding: var(--sp-6); box-shadow: var(--shadow-2); }
.beta__pic { margin: 0; position: relative; }
.beta__pic img { width: 100%; height: auto; border-radius: var(--r-lg); display: block; }
.beta__pic figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(13,16,23,.62); color: #fff; font-size: 12px; font-weight: 600; border-radius: 12px; padding: 8px 10px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.beta h2 { text-align: left; margin: var(--sp-3) 0; }
.beta p { max-width: 560px; margin-bottom: var(--sp-5); }
.faq summary h3 { font-size: var(--fs-3); font-weight: 700; display: inline; }

@media (max-width: 1080px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .tune { grid-template-columns: 1fr; gap: var(--sp-6); }
  .tune h2 { text-align: center; } .tune__text { text-align: center; } .ticks { justify-content: center; }
}
@media (max-width: 860px) {
  .ba { height: 520px; max-width: 420px; margin: 0 auto; width: 100%; }
  .ba__phone { width: 230px; }
  .where { grid-template-columns: 1fr; }
  .beta { grid-template-columns: 1fr; text-align: center; } .beta h2 { text-align: center; } .beta p { margin-inline: auto; }
  .beta__pic { max-width: 240px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .tune__mock { flex-direction: column; }
  .ba { height: 460px; } .ba__phone { width: 196px; border-width: 6px; border-radius: 26px; }
  .ba .float { display: none; }
}
#landing { overflow-x: clip; }
@media (max-width: 560px) {
  .ba__phone--before { left: 4%; top: 50px; }
  .ba__phone--after { right: 4%; }
}

/* ---------- кабинет v2 (компьютер): меню | работа | стиль — по макету ---------- */
.small { font-size: 13px; }
.app2 { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-5) 0 var(--sp-7); align-items: start; }
.side2 { position: sticky; top: 88px; display: flex; flex-direction: column; gap: var(--sp-4); min-height: calc(100vh - 120px); }
.menu2 { display: flex; flex-direction: column; gap: 2px; }
.menu2 button { display: flex; align-items: center; gap: var(--sp-3); padding: 11px 14px; border-radius: 14px; font-weight: 600; color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.menu2 button:hover { background: var(--surface); color: var(--text); }
.menu2 button.on { background: var(--accent-2); color: var(--accent-solid); }
.side2__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-3); background: var(--surface); border-radius: var(--r-lg);
  padding: var(--sp-4); box-shadow: var(--shadow-1); }
.bal { display: flex; gap: var(--sp-3); align-items: center; }
.bal__ico { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; flex: none; }
.bal b { display: block; font-size: var(--fs-5); line-height: 1.1; letter-spacing: -.02em; }
.bal span { font-size: 12px; color: var(--text-muted); }
.btn--soft { background: var(--accent-2); color: var(--accent-solid); min-height: 42px; font-size: var(--fs-2); }
.side2 .me { padding: 0; border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.side2 .me b { font-size: 14px; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-5); align-items: start; }
.col2 { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.col2 .panel + .panel { margin-top: 0; }
.cards2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); }
.panel h3 .count { margin-right: auto; font-size: 12px; font-weight: 700; color: var(--accent-solid); background: var(--accent-2); border-radius: 999px; padding: 2px 9px; margin-left: 8px; }
.panel h3 .link, .link { font-size: 13px; font-weight: 600; color: var(--accent-solid); margin-left: auto; }
.panel h3 { gap: 6px; }
.drop { min-height: 200px; }
.drop--ok { border-style: solid; }
.recent { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.recent button { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--text-muted); }
.recent img { width: 100%; height: 100%; object-fit: cover; }
.recent span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(13,16,23,.6); border-radius: 6px; padding: 1px 5px; }

.preview2 { display: flex; flex-direction: column; }
.frame2 { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: #0d1017; }
.frame2 img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s ease; }
.frame2--empty { display: grid; place-items: center; align-content: center; gap: 10px; color: #8a90a0; background: var(--surface-2); text-align: center; padding: 20px; }
.safe2 { position: absolute; left: 0; right: 0; top: 12%; bottom: 18%; border-top: 1px dashed rgba(255,255,255,.55); border-bottom: 1px dashed rgba(255,255,255,.55); pointer-events: none; }
.cap2 { position: absolute; left: 7%; right: 7%; transform: translateY(-50%); text-align: center; color: #fff; font-weight: 800; line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0,0,0,.7); transition: top .25s var(--ease), font-size .2s var(--ease); }
.cap2 em { font-style: normal; background: var(--accent-solid); border-radius: 5px; padding: 0 4px; }
.preview2 .player { max-height: 520px; }
.row2 { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.row2 .btn { flex: 1; min-height: 44px; font-size: var(--fs-2); }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-3); }
.chips2 button { font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.chips2 button:hover { border-color: var(--accent-solid); color: var(--accent-solid); }
.btn--danger-soft { margin-top: var(--sp-4); background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); min-height: 44px; }

.q2 { display: grid; grid-template-columns: 44px minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; padding: 10px 0; }
.q2 + .q2 { border-top: 1px solid var(--line); }
.q2__body { display: flex; flex-direction: column; min-width: 0; }
.q2__body b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q2__bar { margin: 0; }
.thumb2 { width: 44px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; flex: none; }
.thumb2 img { width: 100%; height: 100%; object-fit: cover; }

.t2 { width: 100%; border-collapse: collapse; font-size: 14px; }
.t2 th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.t2 td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t2 tr:last-child td { border-bottom: 0; }
.t2__name { display: flex; align-items: center; gap: var(--sp-3); font-weight: 600; text-align: left; }
.t2__name .thumb2 { width: 36px; height: 46px; }
.fmt { font-size: 12px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-muted); }
.icon-btn:hover { background: var(--accent-2); color: var(--accent-solid); }

.style2 { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.style2 .styles { margin-bottom: 6px; }
.kv { display: flex; align-items: center; gap: var(--sp-3); padding: 8px 0; transition: opacity var(--dur) var(--ease); }
.kv > span { font-size: 13px; font-weight: 600; width: 78px; flex: none; }
.kv .pills2, .kv input[type=range] { flex: 1; }
.is-off { opacity: .4; pointer-events: none; }
.pills2 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 3px; }
.pills2 button { font-size: 12.5px; font-weight: 600; padding: 7px 4px; border-radius: 9px; color: var(--text-muted); }
.pills2 button.on { background: var(--surface); color: var(--accent-solid); box-shadow: var(--shadow-1); }
.looks2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.looks2 button { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.looks2 span { width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  background: linear-gradient(160deg, #caa27a, #6b5a4d 55%, #2c2a2e); }
.looks2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.looks2 b { font-size: 11px; color: var(--text-muted); }
.looks2 .on span { border-color: var(--accent-solid); } .looks2 .on b { color: var(--accent-solid); }
.style2 input[type=range] { accent-color: var(--accent-solid); }
.wish2 { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); resize: vertical; outline: 0; font-size: 14px; }
.wish2:focus { border-color: var(--accent-solid); }
.avatar2 { display: grid; grid-template-columns: 1fr 240px; gap: var(--sp-6); align-items: center; }
.avatar2 img { width: 100%; height: auto; border-radius: var(--r-lg); }
.plans .plan .btn { min-height: 42px; font-size: var(--fs-2); }

@media (max-width: 1280px) { .grid2 { grid-template-columns: 1fr; } .style2 { position: static; max-height: none; } }
@media (max-width: 1080px) {
  .app2 { grid-template-columns: 1fr; }
  .side2 { position: static; min-height: 0; }
  .menu2 { flex-direction: row; overflow-x: auto; }
  .side2__foot { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .side2 .me { display: none; }
}
@media (max-width: 760px) { .cards2 { grid-template-columns: 1fr; } .q2 { grid-template-columns: 44px 1fr auto; } .q2__bar { display: none; }
  .t2 th:nth-child(3), .t2 td:nth-child(3), .t2 th:nth-child(4), .t2 td:nth-child(4) { display: none; } .avatar2 { grid-template-columns: 1fr; } }
.main2 .plans { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); max-width: none; }
.app2 > *, .grid2 > * { min-width: 0; }
@media (max-width: 1080px) { .menu2 button { white-space: nowrap; flex: none; } .menu2 { scrollbar-width: none; } }

/* ---------- логотип ---------- */
.logo__img { width: 36px; height: 36px; border-radius: 11px; display: block; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-solid) 28%, transparent); }
/* Кнопка Telegram Login: iframe в тёмной теме системы рисует чёрные углы — фон страницы светлый, говорим это iframe. */
#tg-login iframe { color-scheme: light; border-radius: 14px; }

/* ---------- подвал: тёмный, колонки, оплата, нижняя строка ---------- */
.foot { background: #10141d; color: #aeb4c2; margin-top: var(--sp-6); font-size: var(--fs-2); }
.foot a { color: #aeb4c2; transition: color var(--dur) var(--ease); }
.foot a:hover { color: #fff; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: var(--sp-7); padding-top: var(--sp-8); padding-bottom: var(--sp-7); }
.foot__brand p { margin: var(--sp-4) 0 var(--sp-5); line-height: 1.6; max-width: 320px; }
.foot .logo--light { color: #fff; }
.foot__cta { min-height: 44px; font-size: var(--fs-2); }
.foot .foot__cta { color: #fff; }
.foot__col { display: flex; flex-direction: column; gap: 12px; }
.foot__col b { color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.foot__pay { border-top: 1px solid rgba(255,255,255,.07); }
.foot__pay .wrap { display: flex; align-items: center; gap: var(--sp-5); padding-top: var(--sp-4); padding-bottom: var(--sp-4); flex-wrap: wrap; }
.foot__pay .muted { color: #7d8496; margin-left: auto; }
.pay { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 7px 12px; color: #fff; font-weight: 600; }
.pay__star { font-size: 15px; line-height: 1; }
.foot__bar { background: #0a0d13; }
.foot__bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: var(--sp-4); }
.foot__bar b { color: var(--accent-solid); letter-spacing: .04em; }
.foot__social { display: flex; align-self: stretch; }
.foot__social a { width: 56px; display: grid; place-items: center; border-left: 1px solid rgba(255,255,255,.07); }
.foot__social a:last-child { border-right: 1px solid rgba(255,255,255,.07); }
.foot__social a:hover { background: rgba(255,255,255,.05); }
@media (max-width: 960px) { .foot__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } .foot__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot__grid { grid-template-columns: 1fr; } .foot__pay .muted { margin-left: 0; }
  .foot__bar .wrap { flex-direction: column; justify-content: center; padding: var(--sp-4) 0 0; } .foot__social { align-self: center; height: 48px; } }

.prem { font-size: 11px; font-weight: 800; color: #9a6b00; background: #fff4d6; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.sets2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sets2 > div { display: flex; border-radius: 10px; background: var(--surface-2); border: 1.5px solid transparent; overflow: hidden; }
.sets2 > div.on { border-color: var(--accent-solid); background: var(--accent-2); }
.sets2 button:first-child { flex: 1; font-size: 12.5px; font-weight: 600; padding: 8px 6px; text-align: left; }
.sets2 .on button:first-child { color: var(--accent-solid); }
.sets2 button:last-child { width: 30px; display: grid; place-items: center; color: var(--accent-solid); }
.menu2__admin { display: flex; align-items: center; gap: var(--sp-3); padding: 11px 14px; border-radius: 14px; font-weight: 600; color: #9a6b00; }
.menu2__admin:hover { background: #fff4d6; }

/* В кабинете шапка по ширине кабинета: логотип над меню, «Выйти» над правой колонкой */
body.is-cab .nav .wrap { max-width: 1440px; }

/* Партнёрам (кабинет) */
.partner2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.partner2__main { grid-row: span 2; }
.code2 { color: var(--accent-solid); letter-spacing: .06em; }
.links2 { display: grid; gap: 10px; margin-top: 16px; }
.link2 { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.link2 code { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv2 b { display: block; font-size: 28px; letter-spacing: -.02em; } .kv2 span { color: var(--text-muted); font-size: 13px; }
.ok2 { display: flex; gap: 8px; align-items: center; color: var(--success); font-weight: 600; }
@media (max-width: 900px) { .partner2 { grid-template-columns: 1fr; } .partner2__main { grid-row: auto; } .link2 { grid-template-columns: 1fr; } }
.partner2 .panel + .panel { margin-top: 0; }
.promo2 { display: grid; gap: 10px; }
.promo2 input { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); outline: 0; font: inherit;
  text-transform: uppercase; letter-spacing: .06em; min-width: 0; }
.promo2 input::placeholder { text-transform: none; letter-spacing: 0; }
.promo2 input:focus { border-color: var(--accent-solid); }

/* Тарифы в кабинете: кнопки по ширине карточки, рубли — компактными строками */
.main2 .plan { padding: 22px 16px; min-width: 0; align-content: start; }
.main2 .plan__price { font-size: clamp(28px, 2.6vw, 36px); }
.plan__sub { font-size: 14px; }
.plan__pay { display: grid; gap: 8px; margin-top: 12px; }
.plan__pay .btn { width: 100%; min-width: 0; padding: 0 10px; white-space: normal; min-height: 44px; font-size: 14px; }
.plan__alt { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.plan__alt button { min-height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; padding: 0 6px; }
.plan__alt button:hover { border-color: var(--accent-solid); color: var(--accent-solid); }

/* Студия в кабинете */
.sd-pics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.sd-pics > * { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--text-muted); }
.sd-pics img { width: 100%; height: 100%; object-fit: cover; }
.sd-add { border: 1.5px dashed color-mix(in srgb, var(--accent-solid) 40%, transparent); color: var(--accent-solid) !important; background: var(--surface) !important; cursor: pointer; }
.sd-clear { margin-top: 8px; font-size: 13px; color: var(--accent-solid); background: none; border: 0; cursor: pointer; padding: 0; }
.sd-model { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 12px 14px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); margin-top: 10px; cursor: pointer; }
.sd-model > span { display: flex; flex-direction: column; gap: 4px; }
.sd-model.on { border-color: var(--accent-solid); background: var(--accent-2); }
.sd-model > b { white-space: nowrap; }
.sd-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.sd-consent input { margin-top: 3px; accent-color: var(--accent-solid); }
.sd-job { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sd-job:last-child { border-bottom: 0; }
.sd-job > span { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; flex: none; }
.sd-job > div { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }

/* «Ролик по теме» (только админы) */
.tv-job { padding: 14px 0; border-bottom: 1px solid var(--line); }
.tv-job:last-child { border-bottom: 0; }
.tv-job .sd-job { padding: 0; border: 0; }
.tv-job .bar { margin-top: 10px; }
.tv-script { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-muted); white-space: pre-wrap; }
.tv-script summary { cursor: pointer; color: var(--accent-solid); font-weight: 600; }
.tv-err { margin-top: 8px; font-size: 12px; color: var(--danger); overflow-wrap: anywhere; }

/* ===== SEO-страницы (site_pages.py) ===== */
.crumbs { padding-top: 18px; font-size: 13px; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); } .crumbs a:hover { color: var(--accent-solid); }
.hero--solo { grid-template-columns: 1fr; text-align: center; padding-bottom: var(--sp-5); }
.hero--solo .lead { margin: 0 auto; } .hero--solo .hero__cta { justify-content: center; }
.nav__links a[aria-current] { color: var(--accent-solid); }
.tag-new { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-solid); color: var(--on-accent); font-size: 11px; font-weight: 700; vertical-align: middle; }
.xlinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; max-width: 880px; margin: 24px auto 0; }
.xlink { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); color: var(--text); }
.xlink > span:nth-child(2) { flex: 1; }
.xlink > svg { transform: rotate(90deg); color: var(--text-muted); }
.xlink:hover { box-shadow: var(--shadow-2); } .xlink:hover > svg { color: var(--accent-solid); }
.xlink .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; flex: none; }
.ptable { max-width: 880px; margin: 24px auto 0; overflow-x: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-1); }
.ptable table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable th { text-align: left; font-size: 12px; color: var(--text-muted); font-weight: 600; padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable td .muted { font-size: 13px; }
.mlist { max-width: 760px; margin: 20px auto 0; display: grid; gap: 10px; color: var(--text-muted); }
.mlist b { color: var(--text); }
.page .section .sub a { text-decoration: underline; }
@media (max-width: 760px) {
  .page .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ptable table { font-size: 14px; }
}
@media (min-width: 961px) { .page .foot__grid { grid-template-columns: 1.3fr repeat(4, 1fr); gap: var(--sp-6); } }
.doc { max-width: 760px; padding-top: var(--sp-6); padding-bottom: var(--sp-8); }
.doc h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -.03em; font-weight: 800; margin-bottom: 6px; }
.doc h2 { font-size: 21px; margin: 28px 0 8px; }
.doc p { color: var(--text-muted); margin-top: 8px; line-height: 1.6; }

/* «Как в образце» в панели стиля */
.ref-pick { border: 1.5px dashed color-mix(in srgb, var(--accent-solid) 40%, transparent); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.ref-pick[disabled] { opacity: .7; cursor: progress; }
.ref { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-bottom: 12px; border-radius: 14px; background: var(--accent-2); }
.ref__head { display: flex; align-items: center; gap: 8px; }
.ref__head b { flex: 1; font-size: 14px; }
.ref__head .ico { width: 30px; height: 30px; border-radius: 10px; background: var(--surface); color: var(--accent-solid); display: grid; place-items: center; }
.ref__head .chip-btn { font-size: 13px; font-weight: 600; color: var(--accent-solid); background: var(--surface); border-radius: 999px; padding: 5px 12px; }
.ref__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ref__chips span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface); color: var(--accent-solid); }
.ref__chips .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent); }

/* Моя внешность */
.lk-intro { display: flex; gap: 20px; align-items: flex-start; max-width: 760px; }
.lk-ico { width: 56px; height: 56px; flex: none; border-radius: 18px; background: var(--accent-2); color: var(--accent-solid); display: grid; place-items: center; }
.lk-points { margin: 12px 0 18px; padding-left: 18px; display: grid; gap: 6px; }
.lk-drop { margin-top: 14px; min-height: 120px; width: 100%; }
.lk-drop[disabled] { opacity: .75; cursor: progress; }
.lk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 16px; }
.lk-slot { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background .15s; }
.lk-slot.need { border-color: var(--accent-solid); }
.lk-slot.over { border-color: var(--accent-solid); background: var(--accent-2); }
.lk-pics { display: flex; gap: 8px; margin-bottom: 6px; }
.lk-pics > * { position: relative; flex: 1; max-width: 50%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.lk-pics > :only-child { max-width: 100%; }
.lk-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lk-pics span button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lk-add { display: grid; place-items: center; color: var(--accent-solid); border: 1.5px dashed color-mix(in srgb, var(--accent-solid) 40%, transparent) !important; background: var(--surface) !important; cursor: pointer; }
.lk-del { display: block; margin: 22px 0 0; font-size: 13px; font-weight: 600; color: var(--danger, #e5484d); background: none; border: 0; cursor: pointer; padding: 0; }
.sd-me { display: inline-flex; align-items: center; gap: 6px; margin-left: 0; }
.sd-pics + .sd-clear + .sd-me, .sd-pics + .sd-me { margin-top: 8px; }

/* ---------- История: ролики, название, описание, где опубликован ---------- */
.hs-lead { margin: -4px 0 8px; }
.hs { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.hs:last-child { border-bottom: 0; }
.hs .hs__thumb { width: 52px; height: 66px; border-radius: 12px; }
.hs__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hs__title { font-weight: 700; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.hs__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hs__kind { font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.hs__pub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hs__desc { font-size: 13px; color: var(--text-muted); white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.hs__act { display: flex; align-items: center; gap: 2px; }
.hs__act .btn { min-height: 36px; padding: 0 14px; margin-left: 6px; gap: 6px; }
.pl { --pl: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; line-height: 1;
  padding: 6px 9px; border-radius: 999px; color: var(--pl); background: color-mix(in srgb, var(--pl) 10%, var(--surface)); white-space: nowrap; }
a.pl:hover { background: color-mix(in srgb, var(--pl) 18%, var(--surface)); }
.pl--instagram { --pl: #d62976; } .pl--youtube { --pl: #e5001f; } .pl--tiktok { --pl: #0d1017; } .pl--telegram { --pl: #1d93d2; }
.pl--vk { --pl: #0077ff; } .pl--other { --pl: #5b6472; }
.hs-edit { grid-column: 2 / -1; display: grid; gap: 14px; margin-top: 8px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.hs-f { display: flex; flex-direction: column; gap: 6px; }
.hs-f > span { display: flex; justify-content: space-between; font-weight: 700; font-size: var(--fs-2); }
.hs-f em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hs-edit input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); outline: 0; font-size: 14px; min-width: 0; }
.hs-edit .wish2 { background: var(--surface); }
.hs-edit input:focus, .hs-edit textarea:focus { border-color: var(--accent-solid); }
.hs-edit .is-bad, .hs-edit .is-bad:focus { border-color: var(--danger); }
.hs-f--date input { max-width: 220px; }
.hs-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.hs-link { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; }
.hs-link .pl { justify-content: center; }
.hs-err { color: var(--danger); font-size: 13px; font-weight: 600; }
.hs-edit .row2 { margin-top: 0; justify-content: flex-start; }
.hs-edit .row2 .btn { flex: none; padding: 0 20px; }
@media (max-width: 900px) { .hs-links { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .hs { grid-template-columns: 44px minmax(0, 1fr); }
  .hs .hs__thumb { width: 44px; height: 56px; }
  .hs__act { grid-column: 2; }
  .hs__act .btn { margin-left: auto; }
  .hs-edit { grid-column: 1 / -1; padding: 12px; }
  .hs-link { grid-template-columns: 1fr; gap: 4px; }
  .hs-link .pl { justify-self: start; }
  .hs-f--date input { max-width: none; }
}

/* ---------- Публикации: все ролики владельца (в т.ч. сделанные вне бота) — план, подпись, где вышли ---------- */
.pbx .btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; gap: 6px; border-radius: 12px; }
.pbx .btn--danger { background: var(--danger); color: #fff; }
.pb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--sp-3); }
.pb-head h3 { margin: 0; }
.pb-head .btn { box-shadow: none; }
.pb-tools { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 4px 0 6px; }
.pb-filter { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; min-width: 0; }
.pb-search { position: relative; flex: 1 1 240px; max-width: 340px; margin-left: auto; display: flex; align-items: center; }
.pb-search > svg { position: absolute; left: 12px; color: var(--text-muted); pointer-events: none; }
.pb-search input { width: 100%; height: 38px; padding: 0 36px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.pb-search input::-webkit-search-cancel-button { display: none; }
.pb-search input::placeholder { color: var(--text-muted); }
.pb-search input:focus { border-color: var(--accent-solid); background: var(--surface); }
.pb-search__x { position: absolute; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--text-muted); }
.pb-search__x:hover { background: var(--line); color: var(--text); }
@media (max-width: 720px) { .pb-search { max-width: none; margin-left: 0; flex-basis: 100%; } }
.pb-filter::-webkit-scrollbar { display: none; }
.pb-filter button { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; padding: 7px 12px 7px 14px;
  border-radius: 999px; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--line);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.pb-filter button:hover { color: var(--text); }
.pb-filter button span { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 20px; text-align: center;
  padding: 1px 6px; border-radius: 999px; background: var(--surface); color: var(--text-muted); }
.pb-filter button.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.pb-filter button.on span { background: color-mix(in srgb, var(--surface) 18%, transparent); color: var(--surface); }
.pb-list { display: flex; flex-direction: column; }
.pb { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pb:last-child { border-bottom: 0; }
.pb--open { display: block; }
.pb--new { border-bottom: 1px solid var(--line); }
.pb__thumb { width: 72px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--accent-2); color: var(--accent-solid);
  display: grid; place-items: center; flex: none; align-self: start; box-shadow: inset 0 0 0 1px var(--line); }
.pb__thumb--wide { width: 128px; aspect-ratio: 16 / 9; }
.pb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb__thumb--big { width: 120px; }
.pb__thumb--big.pb__thumb--wide { width: 100%; max-width: 220px; }
.pb__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pb__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.pb__title { font-weight: 700; font-size: 16px; line-height: 1.35; letter-spacing: -.005em; overflow-wrap: anywhere; min-width: 0; flex: 1 1 260px; }
.pb-status { --st: var(--text-muted); flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; line-height: 1;
  padding: 6px 10px; border-radius: 999px; color: color-mix(in srgb, var(--st) 85%, var(--text)); background: color-mix(in srgb, var(--st) 11%, var(--surface)); white-space: nowrap; }
.pb-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--st); }
.pb-status--scheduled { --st: #c98a00; } .pb-status--published { --st: var(--success); } .pb-status--ready { --st: var(--accent-solid); }
.pb__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.pb__num { font-variant-numeric: tabular-nums; font-weight: 600; }
.pb__file { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pb__desc { font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; border-radius: 8px; }
.pb__desc.is-open { display: block; -webkit-line-clamp: unset; }
.pb__note { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.pb__note svg { flex: none; margin-top: 2px; }
.pb__act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.pl--auto em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-left: 4px;
  padding: 2px 5px; border-radius: 6px; background: color-mix(in srgb, var(--pl) 14%, transparent); }
.cp { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.cp--state { gap: 8px; justify-items: start; }
.cp__h { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.cp__all { margin-left: 8px; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent-solid); background: none; border: 0; padding: 2px 4px; cursor: pointer; }
.cp__nets { display: flex; flex-wrap: wrap; gap: 6px; }
.cp__net { position: relative; }
.cp__net input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cp__net span { display: inline-block; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-muted); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.cp__net input:checked + span { background: var(--accent-2); color: var(--accent-solid); border-color: transparent; }
.cp__net input:focus-visible + span { outline: 2px solid var(--accent-solid); outline-offset: 2px; }
.cp__when { display: grid; gap: 4px; max-width: 260px; }
.cp__when input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); font-size: 14px; min-height: 40px; }
.cp__foot { display: flex; flex-wrap: wrap; gap: 8px; }
.cp__st { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-muted); }
.cp__st--published { color: var(--success); }
.cp__st--failed { color: var(--danger, #d23); }
.pb-empty { display: flex; flex-direction: column; gap: 6px; padding: 28px 4px 12px; }
.pb-empty b { font-size: 15px; }
/* форма */
.pb-edit { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.pb-edit__head { display: flex; align-items: center; justify-content: space-between; }
.pb-edit__head b { font-size: 16px; }
.pb-edit__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.pb-edit__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.pb-edit .hs-f { min-width: 0; }
.pb-pic { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 176px; }
.pb-pic__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-pic .muted { font-size: 12px; line-height: 1.35; }
.pb-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pb-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pb-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.pb-seg__i { position: relative; display: block; min-width: 0; }
.pb-seg__i input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pb-seg__i span { display: block; text-align: center; font-size: 13px; font-weight: 600; padding: 8px 4px; border-radius: 9px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.pb-seg__i input:checked + span { background: var(--accent-2); color: var(--accent-solid); }
.pb-seg__i input:focus-visible + span { outline: 2px solid var(--accent-solid); outline-offset: -2px; }
.pb-edit input:not([type=radio]):not([type=file]) { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface);
  outline: 0; font-size: 14px; min-width: 0; min-height: 42px; }
.pb-edit .wish2 { background: var(--surface); }
.pb-edit input:focus, .pb-edit textarea:focus { border-color: var(--accent-solid); }
.pb-edit .is-bad, .pb-edit .is-bad:focus { border-color: var(--danger); }
.pb-edit__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pb-edit__foot .btn { min-height: 44px; padding: 0 20px; font-size: 14px; box-shadow: none; }
.pb-edit__del { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--danger); padding: 10px 6px; border-radius: 10px; }
.pb-edit__del:hover { background: color-mix(in srgb, var(--danger) 9%, transparent); }
@media (max-width: 900px) { .pb-row3 { grid-template-columns: 1fr 1fr; } .pb-row3 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .pb-edit__grid { grid-template-columns: minmax(0, 1fr); }
  .pb-seg__i span { font-size: 12px; padding: 8px 2px; letter-spacing: -.01em; text-overflow: clip; }
  .pb-pic { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .pb-pic .muted { flex-basis: 100%; }
  .pb-row2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pb { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .pb__thumb { width: 56px; border-radius: 10px; }
  .pb__thumb--wide { width: 56px; aspect-ratio: 1; }
  .pb__thumb--big { width: 96px; } .pb__thumb--big.pb__thumb--wide { width: 170px; aspect-ratio: 16 / 9; }
  .pb__title { flex-basis: 100%; font-size: 15px; }
  .pb__act { margin-left: -68px; width: calc(100% + 68px); }
  .pb__act { flex-wrap: nowrap; }
  .pb__act .btn { flex: 1 1 auto; padding: 0 12px; }
  .pb-edit { padding: 14px; border-radius: 16px; margin: 0 -6px; }
  .pb-row3 { grid-template-columns: 1fr 1fr; }
  .pb-edit .hs-links { grid-template-columns: 1fr; }
  .pb-edit .hs-link { grid-template-columns: 1fr; gap: 4px; }
  .pb-edit .hs-link .pl { justify-self: start; }
  .pb-edit__foot .btn--primary { flex: 1; }
}
