:root {
  --bg: #0b0b10; --bg2: #111118; --card: #16161f; --card2: #1c1c27; --line: #262633; --line2: #33334a;
  --text: #ededf3; --muted: #8b8ba1; --dim: #5f5f75;
  --acc: #ff6a3d; --acc2: #ff9a5c; --acc-soft: rgba(255, 106, 61, .14); --vio: #8b7bff; --ok: #3ddc97; --bad: #ff5470; --warn: #ffc85c;
  --r: 14px; --r2: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; } .mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; padding: 12px 24px; background: rgba(11, 11, 16, .82);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -.02em; }
.logo svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 13px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.on { color: var(--text); background: var(--card2); }
.top .sp { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.chip:hover { border-color: var(--line2); }
.chip.gift { background: linear-gradient(90deg, rgba(255, 106, 61, .18), rgba(139, 123, 255, .18)); border-color: rgba(255, 106, 61, .35); }
.chip b { color: var(--acc2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line2); font-weight: 700;
  text-decoration: none; font-size: 14px; }

/* ---------- кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--card2); font-weight: 650; cursor: pointer; text-decoration: none; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--dim); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.pri { background: linear-gradient(135deg, var(--acc), #ff4d6d); border-color: transparent; color: #fff; box-shadow: 0 6px 24px rgba(255, 90, 60, .25); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.big { padding: 15px 22px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.wide { width: 100%; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.inp { width: 100%; padding: 11px 13px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; outline: none; }
.inp:focus { border-color: var(--acc); }
textarea.inp { resize: vertical; min-height: 120px; line-height: 1.5; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 10px 0 16px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--acc); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--acc-soft); border-color: rgba(255, 106, 61, .55); color: var(--text); }
.tabs { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 13px; gap: 2px; }
.tabs > * { flex-shrink: 0; white-space: nowrap; }
.tabs button { padding: 8px 16px; border: 0; background: none; border-radius: 10px; color: var(--muted); font-weight: 650; cursor: pointer; }
.tabs button.on { background: var(--card2); color: var(--text); }

/* ---------- раскладка ---------- */
main { min-height: calc(100vh - 140px); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 60px; }
.narrow { max-width: 560px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 22px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2 > * { min-width: 0; }
.grid2.wl { grid-template-columns: 1.25fr 1fr; align-items: start; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead h1 { font-size: 30px; margin: 0; }

/* ---------- студия ---------- */
.studio { display: grid; grid-template-columns: 420px 1fr; gap: 22px; align-items: start; }
.panel { position: sticky; top: 76px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; max-height: calc(100vh - 92px); overflow: auto; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; }
.panel h3:first-of-type { margin-top: 16px; }
.mpick { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; text-align: left; }
.mpick:hover { border-color: var(--dim); }
.mpick .ic { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.mpick .t { flex: 1; min-width: 0; }
.mpick .t b { display: block; }
.mpick .t span { font-size: 12px; color: var(--muted); }
.mlist { display: grid; gap: 6px; margin-top: 8px; }
.mlist button { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; }
.mlist button:hover { background: var(--bg2); }
.mlist button.on { border-color: rgba(255, 106, 61, .5); background: var(--acc-soft); }
.mlist .ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; }
.mlist .t { flex: 1; min-width: 0; }
.mlist .t b { display: block; font-size: 14px; }
.mlist .t span { display: block; font-size: 12px; color: var(--muted); }
.mlist .pr { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--card2); color: var(--acc2); margin-left: 6px; vertical-align: 1px; }
.drop { display: block; border: 1.5px dashed var(--line2); border-radius: 14px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--acc); color: var(--text); background: var(--acc-soft); }
.refs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.refs .r { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); }
.refs .r img { width: 100%; height: 100%; object-fit: cover; }
.refs .r em { position: absolute; left: 4px; bottom: 3px; font-style: normal; font-size: 10px; font-weight: 700; background: rgba(0, 0, 0, .65); padding: 0 4px; border-radius: 4px; }
.refs .r button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; }
.opt { margin-bottom: 12px; }
.opt > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.go { position: sticky; bottom: -18px; margin: 18px -18px -18px; padding: 14px 18px 18px; background: linear-gradient(transparent, var(--card) 22%); }
.go .note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.counter { font-size: 12px; color: var(--dim); text-align: right; margin-top: 4px; }

/* ---------- карточки генераций ---------- */
.feedhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.feed { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; transition: .15s; display: flex; flex-direction: column; }
.gcard:hover { border-color: var(--line2); transform: translateY(-2px); }
.gmedia { position: relative; aspect-ratio: 1 / 1; background: var(--bg2); overflow: hidden; }
.gmedia img, .gmedia video { width: 100%; height: 100%; object-fit: cover; }
.gmedia .badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.gmedia .cnt { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: rgba(0, 0, 0, .6); }
.gmedia .play { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
.gmedia .play::after { content: ""; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.gwait { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  background: radial-gradient(120% 90% at 30% 20%, rgba(255, 106, 61, .22), transparent 60%), radial-gradient(100% 80% at 80% 90%, rgba(139, 123, 255, .22), transparent 60%), var(--bg2); }
.gwait::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); background-size: 250% 100%; animation: sh 1.8s linear infinite; }
@keyframes sh { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.gwait b { font-size: 26px; display: block; }
.gwait span { font-size: 12px; color: var(--muted); }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 10px; width: 140px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--vio)); transition: width .6s; }
.gfail { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 18px; font-size: 13px; color: var(--muted); background: repeating-linear-gradient(135deg, var(--bg2), var(--bg2) 10px, #14141c 10px, #14141c 20px); }
.gfail b { color: var(--bad); display: block; margin-bottom: 4px; }
.ginfo { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.ginfo .p { font-size: 13px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.ginfo .m { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); gap: 8px; }
.gid { font-family: var(--mono); font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); cursor: copy; white-space: nowrap; }
.gid:hover { color: var(--text); border-color: var(--line2); }
.empty { text-align: center; padding: 60px 20px; border: 1.5px dashed var(--line); border-radius: var(--r2); color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* ---------- фильтры истории ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters .inp { width: 260px; padding: 9px 12px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }

/* ---------- просмотр ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 8, .8); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.mbox { background: var(--card); border: 1px solid var(--line2); border-radius: 22px; width: min(1180px, 100%); max-height: calc(100vh - 48px); display: grid; grid-template-columns: 1fr 380px; overflow: hidden; position: relative; }
.mbox.small { width: min(460px, 100%); display: block; padding: 26px; overflow: auto; }
.mclose { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card2); cursor: pointer; font-size: 18px; line-height: 1; }
.vmedia { background: #000; display: flex; flex-direction: column; min-height: 0; }
.vmedia .main { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; }
.vmedia .main img, .vmedia .main video { max-height: calc(100vh - 140px); width: auto; max-width: 100%; object-fit: contain; border-radius: 8px; }
.vmedia .thumbs { display: flex; gap: 8px; padding: 10px; justify-content: center; }
.vmedia .thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity: .6; }
.vmedia .thumbs img.on { border-color: var(--acc); opacity: 1; }
.vside { padding: 22px; overflow: auto; border-left: 1px solid var(--line); }
.vside .idrow { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.vside .idrow .gid { font-size: 14px; padding: 5px 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13px; margin: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.prompt { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-done { color: var(--ok); background: rgba(61, 220, 151, .1); } .st-run, .st-queued { color: var(--warn); background: rgba(255, 200, 92, .1); }
.st-failed, .st-blocked { color: var(--bad); background: rgba(255, 84, 112, .1); }

/* ---------- кредиты ---------- */
.bal { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat b { display: block; font-size: 30px; letter-spacing: -.02em; margin-top: 6px; }
.stat.main { background: linear-gradient(135deg, rgba(255, 106, 61, .2), rgba(139, 123, 255, .14)); border-color: rgba(255, 106, 61, .3); }
.stat small { color: var(--muted); font-size: 12px; }
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.pack { padding: 16px 14px; border-radius: 16px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; text-align: left; position: relative; }
.pack:hover { border-color: var(--dim); }
.pack.on { border-color: var(--acc); background: var(--acc-soft); }
.pack b { display: block; font-size: 22px; }
.pack span { font-size: 13px; color: var(--muted); }
.pack em { position: absolute; top: -9px; right: 10px; font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--ok); color: #062; }
.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.method { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; font-weight: 650; }
.method.on { border-color: var(--acc); background: var(--acc-soft); }
.method small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.method .mi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plus { color: var(--ok); font-weight: 700; } .minus { color: var(--text); font-weight: 700; } .zero { color: var(--muted); }
.tblwrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); overflow: auto; }
.bars { display: grid; gap: 10px; }
.bars div { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.bars i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--acc), var(--vio)); min-width: 3px; }
.banner { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; border: 1px solid; font-size: 14px; }
.banner.ok { border-color: rgba(61, 220, 151, .4); background: rgba(61, 220, 151, .08); }
.banner.wait { border-color: rgba(255, 200, 92, .4); background: rgba(255, 200, 92, .08); }
.banner.bad { border-color: rgba(255, 84, 112, .4); background: rgba(255, 84, 112, .08); }

/* ---------- вход ---------- */
.auth { max-width: 440px; margin: 30px auto; }
.oauth { display: grid; gap: 10px; margin-bottom: 18px; }
.oauth .btn { justify-content: flex-start; padding: 13px 16px; }
.oauth .btn i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; color: #fff; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code { font-size: 30px; letter-spacing: 12px; text-align: center; font-family: var(--mono); }
.giftbox { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: linear-gradient(90deg, rgba(255, 106, 61, .14), rgba(139, 123, 255, .14)); border: 1px solid rgba(255, 106, 61, .3); margin-bottom: 18px; font-size: 14px; }
.giftbox .gi { font-size: 26px; }

/* ---------- главная ---------- */
.hero { position: relative; padding: 80px 24px 70px; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(40% 50% at 30% 40%, rgba(255, 106, 61, .25), transparent 70%), radial-gradient(40% 50% at 70% 50%, rgba(139, 123, 255, .22), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(36px, 6vw, 68px); max-width: 900px; margin: 0 auto 18px; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--acc), var(--acc2), var(--vio)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.hero .row { justify-content: center; }
.facts { display: flex; gap: 28px; justify-content: center; margin-top: 40px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.facts b { color: var(--text); }
.sect { max-width: 1240px; margin: 0 auto; padding: 50px 24px; }
.sect > h2 { font-size: 34px; margin-bottom: 8px; }
.sect > p.lead { color: var(--muted); margin: 0 0 28px; font-size: 16px; }
.demo { margin-bottom: 26px; }
.demo-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.demo-h b { font-size: 20px; }
.demo-h .btn { margin-left: auto; }
.demo-row { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.demo-row::-webkit-scrollbar { display: none; }
.demo-row a { scroll-snap-align: start; text-decoration: none; color: var(--muted); font-size: 13px; }
.demo-row img { display: block; width: 100%; height: auto; aspect-ratio: 720 / 402; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 6px; transition: transform .2s; }
.demo-row a:hover img { transform: translateY(-3px); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.mcard { padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: .15s; }
.mcard:hover { border-color: var(--line2); transform: translateY(-2px); }
.mcard .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; margin-bottom: 14px; }
.mcard b { font-size: 17px; }
.mcard p { color: var(--muted); font-size: 14px; margin: 6px 0 12px; min-height: 42px; }
.mcard .pr { font-size: 13px; font-weight: 700; color: var(--acc2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps div { padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.steps i { font-style: normal; font-size: 13px; font-weight: 800; color: var(--acc); }
.steps b { display: block; font-size: 18px; margin: 8px 0 6px; }
.steps p { color: var(--muted); margin: 0; font-size: 14px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 16px; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.doc { max-width: 820px; }
.doc h2 { font-size: 20px; margin-top: 28px; }
.doc p, .doc li { color: #cfcfdb; }

footer { border-top: 1px solid var(--line); padding: 26px 24px; color: var(--muted); font-size: 13px; }
footer .in { max-width: 1240px; margin: 0 auto; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }

/* ---------- уведомления ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { padding: 12px 16px; border-radius: 13px; background: var(--card2); border: 1px solid var(--line2); box-shadow: 0 10px 40px rgba(0, 0, 0, .45); font-size: 14px; animation: tin .2s; }
.toast.bad { border-color: rgba(255, 84, 112, .55); }
.toast.ok { border-color: rgba(61, 220, 151, .5); }
.toast a { color: var(--acc2); font-weight: 650; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- телефоны ---------- */
@media (max-width: 980px) {
  .studio { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
  .mbox { grid-template-columns: 1fr; overflow: auto; }
  .vside { border-left: 0; border-top: 1px solid var(--line); }
  .bal { grid-template-columns: 1fr 1fr; }
  .packs { grid-template-columns: 1fr 1fr; }
  .steps, .grid2, .grid2.wl { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; overflow: auto; }
  .logo { font-size: 16px; gap: 8px; }
  .logo svg { width: 28px; height: 28px; }
  .wrap { padding: 20px 14px 50px; }
  .feed { grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters .inp { width: 100%; }
  .tbl .hm { display: none; }
  .bars div { grid-template-columns: 90px 1fr auto; }
}

/* инструкция «как сделать мультфильм» */
.guide { max-width: 1100px; }
.guide h1 { font-size: 38px; margin: 10px 0 10px; }
.guide .lead { color: var(--muted); font-size: 17px; max-width: 760px; margin: 0 0 26px; }
.gflow { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; counter-reset: none; }
.gflow li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 2px; position: relative; }
.gflow i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.gflow span { color: var(--muted); font-size: 13px; }
.gstep { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; padding: 34px 0; border-top: 1px solid var(--line); }
.gstep:has(> .gtext:only-child) { grid-template-columns: minmax(0, 760px); }
.gstep > * { min-width: 0; }
.gnum { color: var(--acc); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.gstep h2 { font-size: 26px; margin: 4px 0 12px; }
.gtext p, .gtext li { color: #cfcfdb; line-height: 1.6; }
.gtext ol, .gtext ul { padding-left: 20px; margin: 0 0 14px; }
.gtext li { margin-bottom: 4px; }
.gtip { background: rgba(255, 106, 61, .08); border: 1px solid rgba(255, 106, 61, .3); border-radius: 12px; padding: 12px 14px; margin: 14px 0; color: #e6e6ef; line-height: 1.55; }
.gcard2 { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: #cfcfdb; }
.gcard2 span { flex: 1; }
.gshot { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.gshot img { display: block; width: 100%; height: auto; }
.gsub { font-size: 18px; margin: 0 0 12px; }
.gscenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.gsc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.gsc-h { font-weight: 800; }
.gsc-p { background: var(--bg2); border-radius: 10px; padding: 10px 12px; }
.gsc-p em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--acc); text-transform: uppercase; letter-spacing: .05em; }
.gsc-p p { margin: 4px 0 8px; font-size: 13.5px; color: #cfcfdb; line-height: 1.5; }
.gcta { margin: 20px 0 10px; padding: 28px; border-radius: 18px; background: var(--card); border: 1px solid var(--line2); display: grid; justify-items: center; text-align: center; gap: 6px; }
.gcta b { font-size: 22px; }
.gcta span { color: var(--muted); margin-bottom: 10px; }
@media (max-width: 980px) {
  .gstep { grid-template-columns: 1fr; gap: 18px; }
  .gscenes { grid-template-columns: 1fr; }
  .gflow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .guide h1 { font-size: 28px; }
  .gstep { padding: 26px 0; }
  .gcard2 { flex-direction: column; }
}

/* партнёрская программа */
.ref { max-width: 1100px; }
.refhero { padding: 20px 0 10px; }
.refhero h1 { font-size: clamp(28px, 4.4vw, 44px); letter-spacing: -.03em; max-width: 860px; margin: 6px 0 12px; }
.refhero .lead { color: var(--muted); font-size: 17px; max-width: 720px; margin: 0 0 22px; }
.refnums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 30px 0 36px; }
.refnums div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.refnums b { display: block; font-size: 30px; letter-spacing: -.02em; color: var(--acc2, var(--acc)); }
.refnums span { color: var(--muted); font-size: 13.5px; }
.refh { font-size: 22px; margin: 30px 0 14px; }
.doc-mini ul { padding-left: 18px; margin: 0; }
.doc-mini li { color: #cfcfdb; font-size: 14px; line-height: 1.55; margin-bottom: 8px; }
.refcopy { display: flex; gap: 10px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 14px; }
.refcopy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.refcopy code.big { font-size: 20px; font-weight: 800; letter-spacing: .06em; color: var(--acc); }
.refbal { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.paybadge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid; }
.paybadge.ok { color: var(--ok); border-color: rgba(61, 220, 151, .4); }
.paybadge.wait { color: #ffc85c; border-color: rgba(255, 200, 92, .4); }
.paybadge.bad { color: #ff5470; border-color: rgba(255, 84, 112, .4); }
details.promo { margin: 4px 0 14px; }
details.promo summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details.promo .row { margin-top: 8px; flex-wrap: nowrap; }
details.promo .inp { text-transform: uppercase; }
@media (max-width: 980px) { .refnums, .refbal { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .refnums b { font-size: 24px; } .refcopy code.big { font-size: 17px; } }

/* согласия при регистрации */
.consents { display: grid; gap: 10px; margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); }
.consents .check { margin: 0; font-size: 13.5px; line-height: 1.45; }
.consents.mini { padding: 12px 14px; }
.consents .check.need { animation: needpd .9s ease; }
.consents .check.need span { color: #ff8a9c; }
@keyframes needpd { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* мультфильм Нейрокота в инструкции */
.gcat { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: center; margin: 0 0 44px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.gcat-v video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; display: block; }
.gcat-t h2 { margin: 4px 0 10px; }
.gcat-t p { color: var(--muted); line-height: 1.55; margin: 0 0 14px; }
.gcat-ref { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.gcat-ref img { width: 120px; border-radius: 10px; display: block; }
.gcat-ref b { color: var(--text, #fff); }
@media (max-width: 860px) { .gcat { grid-template-columns: 1fr; padding: 12px; } }

.doc .todo { color: #ffc85c; background: rgba(255, 200, 92, .08); border-radius: 6px; padding: 0 4px; }

footer .dev { flex-basis: 100%; order: 3; font-size: 12.5px; opacity: .8; }
footer .dev a { color: var(--text, #fff); text-decoration: underline; text-underline-offset: 2px; }

/* плашка «выбираем выгодные модели» на главной */
.sect.pick-wrap { padding-top: 10px; padding-bottom: 10px; }
.pick { display: flex; gap: 20px; align-items: flex-start; padding: 26px 28px; border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 138, 92, .10), rgba(139, 123, 255, .08)); }
.pick-ic { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .06); }
.pick h2 { font-size: 24px; margin: 2px 0 8px; }
.pick p { color: var(--muted); margin: 0 0 14px; line-height: 1.55; max-width: 860px; }
.pick-pts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
@media (max-width: 640px) { .pick { flex-direction: column; padding: 20px; gap: 12px; } .pick h2 { font-size: 20px; } }
.pick-ic svg { width: 34px; height: 34px; }

/* кнопка «Видеоурок» на главной */
.lesson { display: inline-flex; align-items: center; gap: 14px; margin: 22px auto 0; padding: 8px 18px 8px 8px; max-width: 100%;
  border-radius: 999px; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, rgba(255, 106, 61, .7), rgba(139, 123, 255, .6)) border-box;
  border: 1px solid transparent; color: var(--text); text-decoration: none; text-align: left; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .2s ease, box-shadow .2s ease; }
.lesson:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255, 90, 60, .22); text-decoration: none; }
.lesson-th { position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: visible; }
.lesson-th img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.lesson-th::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--acc); opacity: 0; animation: lessonring 2.2s ease-out infinite; }
.lesson-pl { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--acc), #ff4d6d); color: #fff; box-shadow: 0 0 0 3px var(--card); }
.lesson-pl svg { width: 13px; height: 13px; margin-left: 2px; }
.lesson-tx { display: grid; gap: 2px; min-width: 0; }
.lesson-tx small { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--acc2); }
.lesson-tx b { font-size: 15.5px; line-height: 1.25; }
.lesson-go { flex: none; margin-left: 4px; font-size: 18px; color: var(--muted); transition: transform .2s ease, color .2s ease; }
.lesson:hover .lesson-go { transform: translateX(3px); color: var(--text); }
@keyframes lessonring { 0% { transform: scale(.95); opacity: .8; } 100% { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lesson-th::before { animation: none; } }
@media (max-width: 520px) { .lesson { padding-right: 14px; gap: 12px; } .lesson-tx b { font-size: 14.5px; } .lesson-go { display: none; } }
