:root {
  /* тёмная тема с салатовым акцентом (в духе Higgsfield) — одинаковая во всех клиентах Telegram */
  --bg: #0b0b0c;
  --bg2: #0b0b0c;
  --card: #17171a;
  --card2: #222226;
  --text: #f4f4f5;
  --hint: #8e8e96;
  --link: #d4f542;
  --a1: #d4f542;
  --a2: #d4f542;
  --grad: #d4f542;
  --on-a: #0b0b0c;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #ff5a5f;
  --line: rgba(255, 255, 255, .09);
  --soft: rgba(212, 245, 66, .12);
  --r: 20px;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg2); color: var(--text); }
body { font: 15px/1.42 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; padding: 0 0 calc(150px + env(safe-area-inset-bottom)); overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { font: inherit; color: var(--text); }
main { padding: 14px 16px 0; max-width: 640px; margin: 0 auto; }
h1 { font-size: 26px; line-height: 1.15; margin: 6px 0 4px; letter-spacing: -.02em; }
h2 { font-size: 20px; margin: 22px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 16px; margin: 0 0 6px; }
.hint { color: var(--hint); font-size: 13px; }
.muted { color: var(--hint); }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.err { color: var(--err); }
.ok { color: var(--ok); }
.boot { display: flex; justify-content: center; padding-top: 40vh; }

/* шапка и навигация */
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.back { width: 36px; height: 36px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: var(--shadow); flex: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--a1); white-space: nowrap; }
.badge.gold { background: linear-gradient(135deg, #ffcf5c, #ff8a3d); color: #3b1d00; }
.badge.grad { background: var(--grad); color: var(--on-a); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; color: var(--hint); padding: 4px 10px; border-radius: 12px; min-width: 64px; }
.tabbar button i { font-style: normal; font-size: 21px; filter: grayscale(1); opacity: .7; transition: .2s; }
.tabbar button.on { color: var(--text); font-weight: 600; }
.tabbar button.on i { filter: none; opacity: 1; transform: translateY(-1px); }
.go { position: fixed; left: 16px; right: 16px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 19; max-width: 608px; margin: 0 auto;
  background: var(--grad); color: var(--on-a); border-radius: 16px; padding: 15px 16px; font-weight: 700; font-size: 16px; box-shadow: 0 8px 30px rgba(212,245,66,.18); transition: transform .15s, opacity .2s; }
.go:active { transform: scale(.98); }
.go:disabled { background: color-mix(in srgb, var(--hint) 55%, var(--card)); box-shadow: none; }
.go small { display: block; font-weight: 500; font-size: 12px; opacity: .9; margin-top: 1px; }

/* карточки */
.card { background: var(--card); border-radius: var(--r); padding: 14px; margin-top: 12px; border: 1px solid var(--line); }
.card.flat { box-shadow: none; background: var(--bg2); }
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 20px 18px; margin-top: 14px; color: var(--on-a); background: var(--grad); box-shadow: 0 14px 34px color-mix(in srgb, var(--a1) 35%, transparent); text-align: left; width: 100%; }
.hero b { display: block; font-size: 21px; letter-spacing: -.01em; }
.hero span { display: block; opacity: .9; margin-top: 4px; font-size: 14px; max-width: 80%; }
.hero .em { position: absolute; right: -6px; bottom: -14px; font-size: 86px; opacity: .9; transform: rotate(-8deg); }
.hero .cta { display: inline-block; margin-top: 14px; background: rgba(255,255,255,.22); padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tool { background: var(--card); border-radius: var(--r); padding: 14px; text-align: left; box-shadow: var(--shadow); min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .15s; }
.tool:active { transform: scale(.97); }
.tool i { font-style: normal; font-size: 28px; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--soft); }
.tool b { display: block; margin-top: 10px; font-size: 15px; }
.tool small { color: var(--hint); font-size: 12px; }

/* формы */
label, .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--hint); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
textarea, input[type=text], select { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); outline: none; transition: border-color .15s; }
textarea { min-height: 96px; resize: vertical; }
textarea:focus, input[type=text]:focus { border-color: var(--a1); }
.card textarea, .card input[type=text] { background: var(--card2); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--card); border-radius: 20px; padding: 8px 13px; font-size: 14px; box-shadow: var(--shadow); transition: .15s; text-align: left; }
.chip.on { background: var(--grad); color: var(--on-a);  }
.chip small { display: block; font-size: 11px; opacity: .75; }
.chips.flat .chip { box-shadow: none; background: var(--card); border: 1px solid var(--line); font-size: 13px; padding: 7px 11px; }
.card .chips.flat .chip { background: var(--bg2); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { white-space: nowrap; flex: none; }
.chips.flat .chip.on { background: var(--grad); }
.seg { display: flex; background: var(--card); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); gap: 4px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--hint); }
.seg button.on { background: var(--grad); color: var(--on-a); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pick { background: var(--card); border-radius: 16px; padding: 12px 6px 10px; text-align: center; box-shadow: var(--shadow); border: 2px solid transparent; transition: .15s; position: relative; }
.pick i { font-style: normal; font-size: 30px; display: block; line-height: 1.2; }
.pick span { display: block; font-size: 12px; margin-top: 4px; font-weight: 600; }
.pick.on { border-color: var(--a1); background: var(--soft); }
.pick.on::after { content: "✓"; position: absolute; top: 6px; right: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--a1); color: var(--on-a); font-size: 11px; line-height: 18px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 38px; height: 38px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font-size: 20px; font-weight: 700; }
.stepper b { min-width: 34px; text-align: center; font-size: 18px; }
.fmt { display: flex; gap: 8px; }
.fmt button { flex: 1; background: var(--card); border-radius: 14px; padding: 10px 6px; box-shadow: var(--shadow); border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.fmt button i { display: block; border: 2.5px solid currentColor; border-radius: 4px; opacity: .6; }
.fmt button.on { border-color: var(--a1); color: var(--a1); }
.fmt button.on i { opacity: 1; }
input[type=range] { width: 100%; accent-color: var(--a1); }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--line); border-radius: var(--r); padding: 28px 16px; background: var(--card); text-align: center; color: var(--hint); }
.upload img { max-width: 100%; max-height: 300px; border-radius: 12px; }

/* мастер */
.wsteps { display: flex; gap: 6px; margin: 10px 0 2px; }
.wsteps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: .3s; }
.wsteps i.done { background: var(--grad); }
.wtitle { display: flex; justify-content: space-between; align-items: baseline; }
.wtitle small { color: var(--hint); font-weight: 600; }

/* голоса */
.vtabs { margin-bottom: 10px; }
.voices { display: flex; flex-direction: column; gap: 8px; }
.voice { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); border: 2px solid transparent; text-align: left; width: 100%; }
.voice.on { border-color: var(--a1); background: var(--soft); }
.voice .play { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: var(--on-a); display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.voice .play.off { background: var(--bg2); color: var(--hint); }
.voice b { display: block; font-size: 15px; }
.voice small { color: var(--hint); font-size: 12px; }
.voice .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.voice.on .check { background: var(--a1); border-color: var(--a1); box-shadow: inset 0 0 0 3px var(--card); }

/* персонажи */
.heroes { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.heroes .card { margin: 0; display: flex; gap: 10px; align-items: flex-start; }
.heroes .card i { font-style: normal; font-size: 30px; line-height: 1; }
.heroes .card textarea { min-height: 54px; margin-top: 6px; font-size: 14px; padding: 8px 10px; }

/* сцены */
.scene { position: relative; }
.scene .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.scene .num { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: var(--on-a); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.scene .f { font-size: 12px; font-weight: 600; color: var(--hint); margin: 10px 0 4px; }
.scene textarea { min-height: 56px; font-size: 14px; }
.scene input[type=text] { font-size: 14px; }
.iconbtn { padding: 6px 10px; border-radius: 10px; background: var(--bg2); font-size: 13px; font-weight: 600; }
.iconbtn.ai { background: var(--soft); color: var(--a1); }
.writing { text-align: center; padding: 26px 16px; }
.writing .pen { font-size: 46px; animation: wr 1.2s ease-in-out infinite; display: inline-block; }
@keyframes wr { 0%,100% { transform: rotate(-10deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-4px); } }

/* статус задач */
.st { font-size: 14px; }
.st .top { display: flex; align-items: center; gap: 8px; margin: 0; }
.spin { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--a1); border-radius: 50%; animation: s .9s linear infinite; flex: none; }
@keyframes s { to { transform: rotate(360deg); } }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 9px 0 5px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 3px; transition: width .8s; }
.times { display: flex; justify-content: space-between; gap: 12px; color: var(--hint); font-size: 12px; font-variant-numeric: tabular-nums; }
.stages { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.stages span { padding: 4px 10px; border-radius: 12px; background: var(--bg2); color: var(--hint); font-size: 12px; font-weight: 600; }
.stages span.done { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.stages span.now { background: var(--grad); color: var(--on-a); }

/* медиа и работы */
.media { width: 100%; border-radius: 14px; display: block; background: #0003; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.shot { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.shot .pic { aspect-ratio: var(--ar, 16/9); background: var(--bg2) center/cover; display: flex; align-items: center; justify-content: center; position: relative; }
.shot .pic video, .shot .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(2px); font-size: 12px; font-weight: 600; padding: 8px; text-align: center; }
.shot .cap { padding: 8px 10px; font-size: 12px; }
.shot .cap p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shot .acts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.works { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.work { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); text-align: left; }
.work .pic { aspect-ratio: 1; background: var(--soft) center/cover; display: flex; align-items: center; justify-content: center; font-size: 40px; position: relative; }
.work .pic em { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; }
.work .t { padding: 8px 10px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work .t small { display: block; font-weight: 400; color: var(--hint); font-size: 11px; }
.empty { text-align: center; color: var(--hint); padding: 40px 20px; }
.empty i { font-style: normal; font-size: 46px; display: block; margin-bottom: 8px; }

/* профиль и админка */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--grad) center/cover; color: var(--on-a); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; flex: none; }
.usage { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.usage i { display: block; height: 100%; background: var(--grad); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.tile { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.tile b { font-size: 22px; display: block; }
.tile small { color: var(--hint); font-size: 12px; }
.plan { border: 2px solid transparent; }
.plan.cur { border-color: var(--a1); }
.plan ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.list .item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list select { width: auto; padding: 6px 8px; font-size: 13px; box-shadow: none; background: var(--bg2); }
.pill { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: var(--bg2); color: var(--hint); }

/* шторка, тост */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; animation: fade .2s; }
.sheet { width: 100%; max-height: 88vh; overflow: auto; background: var(--bg2); border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .25s; }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 50; background: rgba(20,20,28,.92); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14px; max-width: 90%; animation: fade .2s; }
.btn { display: block; width: 100%; text-align: center; padding: 13px; border-radius: 14px; font-weight: 700; background: var(--card); box-shadow: var(--shadow); margin-top: 10px; }
.btn.primary { background: var(--grad); color: var(--on-a); }
.btn.danger { color: var(--err); }


/* портреты героев */
.hpic { width: 64px; height: 64px; border-radius: 14px; background: var(--bg2) center/cover; flex: none; display: flex; align-items: center; justify-content: center; font-size: 26px; position: relative; overflow: hidden; }
.hpic .spin { width: 22px; height: 22px; }
.hrow { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.hrow .h { flex: none; width: 92px; text-align: center; font-size: 12px; font-weight: 600; }
.hrow .h .hpic { width: 92px; height: 92px; margin-bottom: 4px; }

/* ---------- главная в стиле Higgsfield ---------- */
.hdr { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 22px; font-weight: 700; font-size: 14px; background: var(--card2); color: var(--text); }
.pill.lime { background: var(--a1); color: var(--on-a); }
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px 0 18px; }
.brand .logo { width: 44px; height: 44px; border-radius: 13px; background: var(--a1); display: flex; align-items: center; justify-content: center; }
.brand b { font-size: 30px; letter-spacing: -.02em; }
.composer { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 14px 12px 12px 16px; }
.composer textarea { background: none; border: 0; padding: 4px 4px 10px 0; min-height: 52px; max-height: 180px; resize: none; font-size: 16px; box-shadow: none; }
.composer textarea:focus { border: 0; }
.ctools { display: flex; align-items: center; gap: 8px; }
.cbtn { height: 42px; min-width: 42px; padding: 0 14px; border-radius: 21px; background: var(--card2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.cbtn.icon { padding: 0; font-size: 20px; }
.cbtn.go2 { margin-left: auto; background: var(--a1); color: var(--on-a); font-weight: 800; padding: 0 16px; }
.cbtn.go2:disabled { opacity: .45; }
.attach { display: inline-flex; align-items: center; gap: 8px; background: var(--card2); border-radius: 12px; padding: 4px 8px 4px 4px; margin-bottom: 8px; font-size: 13px; }
.attach img, .attach video { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.mtabs { display: flex; gap: 6px; margin: 12px 0 2px; justify-content: center; }
.mtabs button { padding: 7px 14px; border-radius: 18px; font-weight: 600; font-size: 13px; color: var(--hint); }
.mtabs button.on { background: var(--card2); color: var(--text); }
.cards { display: flex; gap: 12px; overflow-x: auto; margin: 22px -16px 0; padding: 0 16px 6px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.pcard { flex: none; width: 210px; text-align: left; }
.pcard .img { width: 210px; height: 210px; border-radius: 18px; background: var(--card2) center/cover; position: relative; overflow: hidden; }
.pcard .img em { position: absolute; left: 10px; top: 10px; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: var(--a1); color: var(--on-a); }
.pcard b { display: block; margin-top: 8px; font-size: 15px; }
.pcard small { color: var(--hint); font-size: 12px; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 600; }
.mini i { font-style: normal; font-size: 24px; display: block; margin-bottom: 4px; }
/* шторки списков и настроек */
.sheet { background: #121214; }
.shead { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 12px; }
.shead b { font-size: 17px; }
.shead .x { position: absolute; right: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--card2); font-size: 18px; color: var(--hint); }
.shead .bk { position: absolute; left: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--card2); font-size: 18px; color: var(--hint); }
.sgroup { display: flex; align-items: center; gap: 8px; color: var(--hint); font-weight: 600; margin: 16px 0 8px; font-size: 14px; }
.mitem { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 10px; border-radius: 16px; }
.mitem.on { background: var(--card); }
.mitem .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.mitem b { font-size: 16px; font-weight: 600; }
.mitem small { display: block; color: var(--hint); font-size: 13px; margin-top: 2px; }
.mitem .ck { width: 24px; height: 24px; border-radius: 50%; background: var(--a1); color: var(--on-a); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; flex: none; }
.tag { display: inline-block; font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; font-style: italic; }
.tag.new { background: var(--a1); color: var(--on-a); }
.tag.top { background: linear-gradient(90deg, #3b82f6, #22d3ee); color: #fff; }
.tag.prem { background: linear-gradient(90deg, #f5c542, #f59e0b); color: #1a1205; }
.srow { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 2px; font-size: 16px; }
.srow .si { width: 24px; text-align: center; color: var(--hint); font-size: 18px; flex: none; }
.srow b { font-weight: 600; flex: 1; }
.srow .sv { color: var(--text); font-weight: 500; }
.srow .dd { width: 28px; height: 28px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--hint); flex: none; }
.slider { position: relative; flex: 0 0 52%; height: 46px; background: var(--card2); border-radius: 12px; overflow: hidden; }
.slider .fill { position: absolute; inset: 0 auto 0 0; background: rgba(212, 245, 66, .22); }
.slider span { position: absolute; left: 14px; top: 13px; font-weight: 700; pointer-events: none; }
.slider input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.toggle { width: 52px; height: 30px; border-radius: 15px; background: var(--card2); position: relative; flex: none; transition: .2s; }
.toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle.on { background: var(--a1); }
.toggle.on::after { left: 25px; }
.apply { display: block; width: 100%; margin-top: 18px; padding: 16px; border-radius: 30px; background: var(--a1); color: var(--on-a); font-weight: 800; font-size: 17px; }
.top h1 { font-size: 22px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.back { background: var(--card2); box-shadow: none; }
.tabbar { background: rgba(11, 11, 12, .92); }
.tabbar button.on { color: var(--a1); }
.tool, .work, .tile, .voice, .pick, .chip, .seg, .fmt button, .stepper button { box-shadow: none !important; border: 1px solid var(--line); }
.voice.on, .pick.on, .fmt button.on { border-color: var(--a1); }
.work .pic, .hpic { background-color: var(--card2); }

/* загрузка внутри приложения — в стиле экрана-заставки */
.splash-mini { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.splash-mini .lg2 { width: 46px; height: 46px; border-radius: 14px; background: var(--a1); animation: pulse2 1.4s ease-in-out infinite; }
.splash-mini .ln { width: 110px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.splash-mini .ln i { display: block; width: 40%; height: 100%; background: var(--a1); border-radius: 2px; animation: run2 1.1s ease-in-out infinite; }
@keyframes pulse2 { 50% { transform: scale(.9); opacity: .7; } }
@keyframes run2 { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.spin { border-top-color: var(--a1); }
.spchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--hint); padding: 4px 10px; margin: -4px 0 6px -6px; border-radius: 12px; }
.spchip:active { background: var(--card2); }
/* профиль */
.phead { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 0 6px; }
.phead b { font-size: 22px; margin-top: 12px; }
.pava { width: 92px; height: 92px; border-radius: 50%; background: var(--card2) center/cover; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--a1); }
.pcred { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin-top: 16px; }
.pcred .big { font-size: 30px; display: block; margin-top: 2px; }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.pst { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; }
.pst b { display: block; font-size: 20px; }
.pst small { color: var(--hint); font-size: 11px; }
.plancard { flex: none; width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.plancard.cur { border-color: var(--a1); }
.plancard .price { font-size: 26px; font-weight: 800; margin: 8px 0 4px; color: var(--a1); }
.plancard .price small { font-size: 13px; color: var(--hint); font-weight: 500; }
.plancard ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--hint); }
.faq { border-bottom: 1px solid var(--line); padding: 13px 0; }
.faq:last-child { border-bottom: 0; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::after { content: "⌄"; float: right; color: var(--hint); }
.faq[open] summary::after { content: "⌃"; }
.faq .hint { margin-top: 8px; font-size: 14px; }

/* герои проекта: плитки и карточка-лист персонажа */
.htiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.htile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: left; min-width: 0; }
.htile b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htile small { color: var(--hint); font-size: 11px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.htile.add { border-style: dashed; }
.hthumb { width: 100%; aspect-ratio: 3/4; border-radius: 10px; background: var(--card2) center top/cover; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--hint); }
.hthumb .spin { width: 24px; height: 24px; }
.hcard { background: #c9c9cf; color: #141416; border-radius: 18px; padding: 10px 12px 14px; }
.hcard .hsheet { width: 100%; border-radius: 12px; display: block; background: #b4b4bb; }
.hcard .hsheet.empty { aspect-ratio: 3/2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; box-sizing: border-box; }
.hcard .hsheet.empty i { font-style: normal; font-size: 44px; }
.hcard .hsheet.empty small { color: #3a3a40; font-size: 13px; }
.hcard label { color: #3a3a40; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; margin-top: 10px; }
.hcard input, .hcard textarea { background: transparent; border: 0; border-bottom: 1px dashed rgba(0,0,0,.25); border-radius: 0; color: #141416; padding: 6px 2px; box-shadow: none; }
.hcard input::placeholder, .hcard textarea::placeholder { color: #6b6b72; }
.hcard .hname { font-size: 34px; font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; margin-top: 8px; }
.hcard .habout { min-height: 0; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.hcard textarea { resize: none; overflow: hidden; }
.hcard .hlist { min-height: 60px; font-size: 14px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.6; }
.hcard textarea { min-height: 52px; font-size: 14px; }
.hstatus { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; font-weight: 700; color: #2a2a2f; }
.hstatus .spin { width: 16px; height: 16px; border-color: rgba(0,0,0,.15); border-top-color: #141416; }
.hcard .hvoice { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 0; background: rgba(0,0,0,.08); color: #141416; text-align: left; font-size: 18px; }
.hcard .hvoice small { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #3a3a40; }
.hcard .hvoice b { font-size: 15px; }

/* галерея из профиля */
button.pst { border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; }
button.pst:active { transform: scale(.97); }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 12px -8px 0; }
.gtile { aspect-ratio: 1; border: 0; padding: 0; border-radius: 6px; background: var(--card2) center/cover; position: relative; overflow: hidden; }
.gtile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.gtile em { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 11px; padding: 2px 6px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; }

/* витрина «Сделано у нас»: две колонки, разные форматы, правая колонка со сдвигом */
.mason { display: flex; gap: 10px; align-items: flex-start; }
.mcol { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mcol.shift { margin-top: 38px; }
.mcard { position: relative; width: 100%; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--card2) center/cover; text-align: left; color: #fff; transition: transform .15s; }
.mcard:active { transform: scale(.97); }
.mcard.tall { aspect-ratio: 1 / 1.45; }
.mcard.sq { aspect-ratio: 1; }
.mcard.wide { aspect-ratio: 1 / .72; }
.mcard em { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: var(--a1); color: #0b0b0c; }
.mcard .mt { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.mcard .mt b { display: block; font-size: 14px; line-height: 1.2; }
.mcard .mt small { display: block; font-size: 11px; opacity: .8; margin-top: 2px; }

/* форматы под соцсети в настройках */
.soctitle { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--hint); margin: 4px 0 8px; }
.chips.social { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 2px; scrollbar-width: none; }
.chips.social::-webkit-scrollbar { display: none; }
.chips.social .chip { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); box-shadow: none; }
.chips.social .chip b { font-size: 13px; white-space: nowrap; }
.chips.social .chip small { font-size: 11px; color: var(--hint); white-space: nowrap; }
.chips.social .chip.on { border-color: var(--a1); background: rgba(212, 245, 66, .12); color: var(--text); }
.chips.social .chip.on b { color: var(--a1); }
.shint { margin: -4px 0 10px 40px; font-size: 12px; }

/* ================= Новый интерфейс: навигация, главная, студии ================= */
.ic { flex: none; display: block; }
main { padding-top: 0; }
body { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }

/* шапка */
.tnav { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px; margin: 0 -16px 6px; padding: 10px 16px;
  background: linear-gradient(var(--bg) 70%, rgba(11,11,12,0)); }
.tbtn { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.tbtn:active, .tgift:active, .tcred:active, .tava:active { transform: scale(.94); }
.tgift { height: 40px; padding: 0 13px; border-radius: 20px; display: flex; align-items: center; color: var(--a1); background: rgba(212,245,66,.12); border: 1px solid rgba(212,245,66,.28); }
.tcred { height: 40px; padding: 0 14px; border-radius: 20px; display: flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--line); }
.tcred .ic { color: var(--a1); }
.tcred b { font-size: 15px; } .tcred small { color: var(--a1); font-size: 11px; margin-left: 3px; }
.tava { width: 42px; height: 42px; border-radius: 50%; background: var(--a1) center/cover; color: var(--on-a); font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: center; }

/* нижняя панель с плавающей «＋» */
.tabbar { align-items: flex-end; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(13,13,15,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.tabbar button { min-width: 58px; gap: 4px; font-size: 11px; color: var(--hint); }
.tabbar button .ic { opacity: .85; }
.tabbar button.on { color: var(--a1); font-weight: 700; }
.tabbar button.fab { color: var(--text); margin-top: -26px; }
.tabbar button.fab i { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--a1); color: var(--on-a);
  box-shadow: 0 0 0 5px var(--bg), 0 8px 28px rgba(212,245,66,.35); filter: none; opacity: 1; transition: transform .15s; }
.tabbar button.fab:active i { transform: scale(.92) rotate(90deg); }
.go { bottom: calc(86px + env(safe-area-inset-bottom)); }

/* заголовки секций */
.shd { margin: 30px 0 14px; }
.shd .row { gap: 9px; } .shd .row > .ic { color: var(--a1); }
.shd h2 { margin: 0; font-size: 21px; }
.shd .hint { margin-top: 6px; font-size: 14px; line-height: 1.4; }
.lnk { display: flex; align-items: center; gap: 4px; color: var(--a1); font-weight: 700; font-size: 14px; }
.foot { text-align: center; margin: 26px 0 6px; }

/* главная: поле идеи */
.ideabox { position: relative; margin-top: 4px; padding: 20px 16px 16px; border-radius: 26px; background: linear-gradient(160deg, #1a1c12, #121214 55%); border: 1px solid rgba(212,245,66,.16); overflow: hidden; }
.ideaglow { position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%; background: radial-gradient(rgba(212,245,66,.28), transparent 65%); pointer-events: none; }
.ideabox h1 { position: relative; font-size: 27px; margin: 0 0 6px; }
.ideabox > .hint { position: relative; font-size: 14px; }
.qbox { position: relative; margin-top: 14px; background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 20px; padding: 12px 12px 12px 14px; }
.qbox textarea { background: none; border: 0; padding: 0; min-height: 46px; resize: none; font-size: 16px; box-shadow: none; }
.qbox textarea:focus { border: 0; outline: none; }
.qgo { margin-top: 8px; width: 100%; height: 48px; border-radius: 15px; background: var(--a1); color: var(--on-a); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.qgo:active { transform: scale(.98); }
.qchips { position: relative; margin-top: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.qchips::-webkit-scrollbar { display: none; }
.qchips .chip { flex: none; background: rgba(255,255,255,.06); border: 1px solid var(--line); box-shadow: none; font-size: 13px; }
.card.wk { width: 100%; text-align: left; display: block; }

/* «Начни отсюда» 2×2 */
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scard { position: relative; aspect-ratio: 1 / 1.08; border-radius: 20px; overflow: hidden; background: var(--card2) center/cover; text-align: left; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px; color: #fff; border: 1px solid var(--line); transition: transform .15s; }
.scard::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0,0,0,.86)); }
.scard:active { transform: scale(.97); }
.scard .kick, .scard b { position: relative; }
.scard .kick { color: var(--a1); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.scard b { font-size: 16px; line-height: 1.2; margin-top: 3px; }

/* тренды */
.segp { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 12px; }
.segp button { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--hint); }
.segp button i { font-style: normal; opacity: .7; font-weight: 600; }
.segp button.on { background: var(--a1); color: var(--on-a); }
.hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.tcard { position: relative; flex: none; width: 168px; aspect-ratio: 1 / 1.5; border-radius: 20px; overflow: hidden; background: var(--card2) center/cover; scroll-snap-align: start; border: 1px solid var(--line); }
.tcard em { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 4px; font-style: normal; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); }
.tfoot { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 10px 10px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; }
.tfoot b { display: block; font-size: 15px; margin-bottom: 8px; }
.tgo { width: 100%; height: 36px; border-radius: 12px; background: var(--a1); color: var(--on-a); font-weight: 800; font-size: 14px; }
.tgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tgrid2 .tcard { width: auto; }
.trhero { position: relative; aspect-ratio: 4 / 3.6; max-height: 46vh; width: 100%; background-position: center 25%; border-radius: 22px; background: var(--card2) center/cover; border: 1px solid var(--line); margin-top: 6px; }
.trhero em { position: absolute; left: 10px; top: 10px; font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; }
.upslot { width: 100%; min-height: 150px; border-radius: 20px; border: 1.5px dashed rgba(212,245,66,.45); background: rgba(212,245,66,.05); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; color: var(--text); overflow: hidden; }
.upslot .ic { color: var(--a1); }
.upslot span { color: var(--hint); font-size: 13px; text-align: center; }
.upslot img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 14px; }

/* инструменты */
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool2 { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; text-align: left; border-radius: 20px; background: var(--card); border: 1px solid var(--line); overflow: hidden; padding: 0 0 12px; transition: transform .15s; }
.tool2:active { transform: scale(.97); }
.tool2 .timg { aspect-ratio: 16 / 10; background: var(--card2) center/cover; margin-bottom: 10px; }
.tool2 b { display: block; padding: 0 12px; font-size: 16px; }
.tool2 small { display: block; padding: 3px 12px 0; color: var(--hint); font-size: 12px; line-height: 1.35; }

/* недавние */
.rcard { position: relative; flex: none; width: 150px; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--card2) center/cover; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; padding: 8px; text-align: left; color: #fff; scroll-snap-align: start; }
.rcard::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,.8)); }
.rcard b { position: relative; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard em { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: rgba(0,0,0,.55); }
.rcard .spin { position: absolute; left: 50%; top: 45%; margin: -12px; }
.empty2 { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 18px; border-radius: 22px; border: 1.5px dashed var(--line); }
.empty2 > .ic { color: var(--a1); width: 58px; height: 58px; padding: 16px; border-radius: 18px; background: rgba(212,245,66,.1); border: 1px solid rgba(212,245,66,.25); }
.empty2 b { font-size: 17px; } .empty2 span { color: var(--hint); font-size: 14px; }
.empty2 .pill { margin-top: 8px; display: flex; align-items: center; gap: 6px; }

/* ссылки внизу главной */
.links { display: grid; gap: 10px; margin-top: 26px; }
.lrow { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.lrow b { display: block; font-size: 16px; } .lrow small { display: block; color: var(--hint); font-size: 13px; margin-top: 2px; }
.lrow > .ic { color: var(--hint); }
.lic { width: 46px; height: 46px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--a1); background: rgba(212,245,66,.1); border: 1px solid rgba(212,245,66,.22); }

/* боковое меню */
#drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#drawer .dbg { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s; backdrop-filter: blur(3px); }
#drawer .dpanel { position: absolute; left: 0; top: 0; bottom: 0; width: min(82vw, 340px); background: #111113; border-right: 1px solid var(--line); transform: translateX(-102%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1); overflow-y: auto; padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }
#drawer.open { pointer-events: auto; } #drawer.open .dbg { opacity: 1; } #drawer.open .dpanel { transform: none; }
.dhead { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; }
.dhead .logo { width: 38px; height: 38px; border-radius: 11px; background: var(--a1); display: flex; align-items: center; justify-content: center; }
.dhead b { font-size: 20px; flex: 1; }
.dx { color: var(--hint); }
.dsec { color: var(--hint); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin: 18px 8px 6px; }
.ditem { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; font-size: 15px; text-align: left; }
.ditem .ic { color: var(--hint); }
.ditem:active, .dtool:active { background: var(--card2); }
.dtools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dtool { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; text-align: left; }
.dtool .ic { color: var(--a1); }

/* шторки «Создать» и «Ещё» */
.csec { color: var(--hint); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin: 14px 0 8px; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cstart { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--card2) center/cover; border: 1px solid rgba(212,245,66,.3); display: flex; align-items: flex-end; padding: 8px; color: #fff; text-align: left; }
.cstart::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0,0,0,.8)); }
.cstart span { position: relative; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.cstart .ic { color: var(--a1); }
.ctools3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ctool { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 13px; text-align: center; }
.ctool .ic { color: var(--a1); }
.crow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; color: var(--text); }
.crow .ic { color: var(--hint); } .crow small { display: block; color: var(--hint); font-size: 12px; }

/* студия */
.sthead { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.sthead h1 { font-size: 24px; margin: 0; } .sthead .hint { font-size: 13px; }
.sthead .lic { width: 52px; height: 52px; border-radius: 16px; }
.composer { border-radius: 24px; padding: 12px; background: var(--card); }
.slots { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.slots::-webkit-scrollbar { display: none; }
.slot { position: relative; flex: none; width: 76px; height: 76px; border-radius: 16px; border: 1.5px dashed rgba(255,255,255,.18); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--hint); overflow: hidden; }
.slot span { font-size: 11px; max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.assist { border: 1.5px solid rgba(212,245,66,.55); background: rgba(212,245,66,.08); color: var(--a1); }
.slot.full { border-style: solid; }
.slot.full img, .slot.full video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot.full span { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6); color: #fff; padding: 2px; max-width: none; }
.slot.full i { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-style: normal; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.slot .spin { width: 20px; height: 20px; }
.composer textarea { min-height: 80px; padding: 4px 2px 8px; }
.qsets { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); }
.qset { flex: none; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--card2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.qset span { color: var(--hint); font-size: 10px; }
.qset.icon { padding: 0 11px; font-size: 16px; }
.kcreate { margin-top: 10px; width: 100%; height: 52px; border-radius: 16px; background: var(--a1); color: var(--on-a); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.kcreate small { font-weight: 600; opacity: .65; font-size: 12px; }
.kcreate:disabled { opacity: .45; }
.kcreate:active { transform: scale(.98); }

/* обучение и «пригласи друга» */
.guide { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); margin-top: 10px; }
.guide b { font-size: 15px; } .guide p { margin: 4px 0 0; color: var(--hint); font-size: 13px; line-height: 1.45; }
.invhero { text-align: center; padding: 18px 10px 10px; }
.invic { width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 30px; display: flex; align-items: center; justify-content: center; color: var(--on-a); background: var(--a1); box-shadow: 0 10px 40px rgba(212,245,66,.3); }
.invhero .hint { font-size: 14px; line-height: 1.5; }
.invhero b { color: var(--a1); }
.linkbox { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.linkbox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--hint); }

/* ===== упрощение: спокойнее, удобнее ===== */
.tnav { gap: 10px; padding: 10px 16px 8px; }
.tlogo { width: 34px; height: 34px; border-radius: 10px; background: var(--a1); display: flex; align-items: center; justify-content: center; }
.tlogo svg { width: 20px; height: 20px; }
.tbrand { font-size: 19px; letter-spacing: -.01em; }
.tcred { height: 36px; padding: 0 12px; }

/* нижняя панель: три вкладки */
.tabbar { justify-content: space-around; align-items: center; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); }
.tabbar button { flex: 1; max-width: 120px; }
.tabbar button.mid i { width: 46px; height: 32px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--card2); color: var(--text); filter: none; opacity: 1; }
.tabbar button.mid.on i { background: var(--a1); color: var(--on-a); }
.tabbar button.mid.on { color: var(--text); }
.go { bottom: calc(70px + env(safe-area-inset-bottom)); }

/* главная: спокойный блок идеи */
.ideabox { background: var(--card); border: 1px solid var(--line); }
.ideabox h1 { font-size: 24px; }
.scard .kick { color: rgba(255,255,255,.75); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12px; }
.shd .row > .ic { color: var(--hint); }

/* «Создать»: переключатель типа и список способов */
.modeseg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin: 4px 0 8px; }
.modeseg button { flex: 1; height: 38px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--hint); }
.modeseg button.on { background: var(--card2); color: var(--text); }
.stsub { margin: 0 2px 12px; }
.ways { display: grid; gap: 8px; }
.way { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.way .lic { width: 40px; height: 40px; border-radius: 12px; }
.way b { display: block; font-size: 15px; } .way small { display: block; color: var(--hint); font-size: 12px; margin-top: 1px; }
.way > .ic { color: var(--hint); }

/* профиль */
.phead2 { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.phead2 .pava { width: 56px; height: 56px; font-size: 22px; margin: 0; flex: none; }
.phead2 b { font-size: 18px; }
.mgroup { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-top: 12px; overflow: hidden; }
.mrow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; font-size: 15px; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow > .ic:first-child { color: var(--a1); }
.mrow > .ic:last-child { color: var(--hint); }
.mv { color: var(--hint); font-size: 14px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtitle { color: var(--hint); font-size: 13px; font-weight: 600; margin: 20px 4px -4px; }

/* тарифы */
.plan2 { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-top: 10px; }
.plan2.cur { border-color: var(--a1); }
.plan2 b { font-size: 17px; }
.plan2 ul { margin: 8px 0 0; padding-left: 18px; color: var(--hint); font-size: 14px; line-height: 1.6; }
.price2 { font-weight: 700; color: var(--a1); }
.psub { color: var(--hint); font-size: 12px; font-weight: 700; margin: 12px 4px 6px; }

/* выбор модели */
.msec { color: var(--hint); font-size: 12px; font-weight: 700; margin: 6px 2px 6px; }
.msec ~ .msec { margin-top: 16px; }
.mitem2 { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 6px; text-align: left; }
.mitem2.on { border-color: var(--a1); }
.mitem2 b { font-size: 15px; }
.mitem2 em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--a1); margin-left: 8px; }
.mitem2 small { display: block; color: var(--hint); font-size: 12px; margin-top: 2px; }
.mprice { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }
.mprice small { display: block; font-weight: 500; color: var(--hint); font-size: 11px; }
.mitem2 .ck { color: var(--a1); font-weight: 800; }
.mfam { width: 100%; display: flex; align-items: center; gap: 8px; padding: 13px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 6px; text-align: left; }
.mfam b { font-size: 15px; } .mfam span { flex: 1; color: var(--hint); font-size: 13px; text-align: right; } .mfam i { font-style: normal; color: var(--hint); transition: transform .2s; }
.mfam.open i { transform: rotate(180deg); }
.mfamlist { padding-left: 10px; border-left: 2px solid var(--line); margin: 0 0 8px 6px; }

/* поле создания: компактные кнопки под текстом */
.composer textarea { min-height: 96px; padding: 6px 4px 10px; font-size: 16px; }
.slots { margin: 0 0 10px; gap: 6px; }
.slot { width: auto; height: 34px; padding: 0 12px; flex-direction: row; gap: 6px; border-radius: 17px; border: 1px solid var(--line); background: var(--card2); color: var(--text); }
.slot span { font-size: 13px; max-width: 140px; }
.slot .ic { color: var(--hint); }
.slot.assist { border: 1px solid rgba(212,245,66,.45); background: rgba(212,245,66,.08); color: var(--a1); }
.slot.assist .ic { color: var(--a1); }
.slot.full { padding: 0 10px 0 3px; border-style: solid; }
.slot.full img, .slot.full video { position: static; width: 28px; height: 28px; border-radius: 14px; object-fit: cover; }
.slot.full span { position: static; background: none; color: var(--text); padding: 0; }
.slot.full i { position: static; width: 18px; height: 18px; background: var(--card); }
.qsets { border-top: 0; padding-top: 0; }
.qset { background: transparent; border: 1px solid var(--line); }

/* «Создать»: плашка проекта сверху */
.projbar { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 9px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin: 2px 0 10px; text-align: left; }
.projbar .lic { width: 36px; height: 36px; border-radius: 11px; }
.projbar small { display: block; color: var(--hint); font-size: 11px; }
.projbar b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.projbar .phint { color: var(--hint); font-size: 12px; white-space: nowrap; }
.projbar > .ic { color: var(--hint); }
.pen { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.pen summary { color: var(--hint); font-size: 13px; cursor: pointer; }
.pen p { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--text); opacity: .85; }

/* главная: заголовок, лента лучших работ, что умеет студия */
.homehead { padding: 8px 2px 4px; }
.homehead h1 { font-size: 28px; line-height: 1.12; margin: 6px 0 8px; }
.homehead .hint { font-size: 14px; line-height: 1.45; }
.homego { margin-top: 14px; width: 100%; height: 50px; border-radius: 16px; background: var(--a1); color: var(--on-a); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.homego:active { transform: scale(.98); }
.fcard { position: relative; width: 100%; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--card2); text-align: left; color: #fff; display: block; }
.fcard.tall { aspect-ratio: 1 / 1.45; } .fcard.sq { aspect-ratio: 1; } .fcard.wide { aspect-ratio: 1 / .72; }
.fcard video, .fcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.fcard .mt { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 10px 9px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.fcard .mt b { display: block; font-size: 14px; } .fcard .mt small { display: block; font-size: 11px; opacity: .8; margin-top: 1px; }
.fplay { position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.5); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.fsame { position: absolute; right: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 10px; background: var(--a1); color: var(--on-a); opacity: 0; transition: opacity .2s; }
.fcard:active .fsame, .fcard:hover .fsame { opacity: 1; }
.cangrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.can { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.can .lic { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 4px; }
.can b { font-size: 14px; } .can small { color: var(--hint); font-size: 12px; line-height: 1.35; }

/* мои проекты */
.sprow { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 14px; }
.sprow + .sprow { border-top: 1px solid var(--line); }
.sprow > button.grow { text-align: left; padding: 10px 0; }
.sprow b { display: block; font-size: 15px; } .sprow small { display: block; color: var(--hint); font-size: 12px; margin-top: 2px; }
.sprow.on b { color: var(--a1); }
.sprow .ck { color: var(--a1); font-weight: 800; margin-right: 4px; }
.spedit { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--hint); }
.spedit:active { background: var(--card2); }
.apply .ic { display: inline-block; vertical-align: -3px; }

/* тарифы и оплата */
.paytabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.paybox { padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.paybox b { display: block; font-size: 15px; } .paybox small { display: block; color: var(--hint); font-size: 12px; margin-top: 3px; line-height: 1.35; }
.paybox.lime { border-color: rgba(212,245,66,.5); background: rgba(212,245,66,.07); }
.paybox.lime b { color: var(--a1); }
.price2 small { font-weight: 500; color: var(--hint); font-size: 12px; }
.pcredit { margin-top: 6px; font-size: 14px; }
.pcredit b { color: var(--text); } .pcredit span { color: var(--a1); font-size: 12px; font-weight: 700; margin-left: 4px; }
.plan2 .apply { margin-top: 10px; padding: 12px; }
.plan2 .badge { margin-top: 8px; display: inline-block; }
.topups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.topup { height: 48px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 16px; }
.topup:active { border-color: var(--a1); }
.homehead { padding-bottom: 10px; }
.tpl { position: relative; flex: none; width: 150px; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: var(--card2) center/cover; border: 1px solid var(--line); scroll-snap-align: start; color: #fff; text-align: left; }
.tpl .mt { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 9px 8px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.tpl .mt b { display: block; font-size: 13px; } .tpl .mt small { display: block; font-size: 11px; opacity: .8; }
#feed .mason + .mason { margin-top: 10px; }

/* тарифы: подписка */
.subhero { margin-top: 6px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, #d4f542, #9be15d); color: #0b0b0c; }
.subhero b { display: block; font-size: 22px; letter-spacing: -.01em; }
.subhero span { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; opacity: .8; line-height: 1.4; }
.sub { position: relative; margin-top: 10px; padding: 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.sub.hot { border: 2px solid var(--a1); background: linear-gradient(180deg, rgba(212,245,66,.10), var(--card) 60%); }
.sub.cur { border-color: var(--a1); }
.subtag { position: absolute; top: -10px; right: 14px; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 10px; background: var(--a1); color: #0b0b0c; }
.sub b { font-size: 19px; }
.subprice { font-size: 22px; font-weight: 900; } .subprice small { font-size: 13px; font-weight: 600; color: var(--hint); }
.subget { margin-top: 4px; font-size: 15px; } .subget b { font-size: 17px; color: var(--a1); } .subget em { font-style: normal; font-size: 12px; font-weight: 800; color: #0b0b0c; background: var(--a1); padding: 2px 7px; border-radius: 8px; margin-left: 4px; }
.sub ul { margin: 10px 0 0; padding-left: 18px; color: var(--text); opacity: .85; font-size: 14px; line-height: 1.7; }
.sub .apply { margin-top: 12px; }
.sub .badge { margin-top: 10px; display: inline-block; }
/* проекты: жанры сеткой */
.chips.genres { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.genres .chip { box-shadow: none; border: 1px solid var(--line); font-size: 13px; padding: 7px 11px; }
.heromodel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0 6px; }

/* ---- главная как Explore: плитки разделов ---- */
.tiles { display: flex; gap: 10px; overflow-x: auto; margin: 4px -16px 14px; padding: 0 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: none; width: 104px; display: flex; flex-direction: column; gap: 6px; background: none; border: 0; padding: 0; text-align: left; scroll-snap-align: start; color: var(--text); }
.tile span { display: block; width: 104px; height: 130px; border-radius: 16px; background: var(--card2) center/cover; border: 1px solid var(--line); }
.tile b { font-size: 13px; padding-left: 2px; }
.tile:active span { transform: scale(.97); }
.homehead h1 { font-size: 24px; }

/* ---- «Создать» как в Higgsfield: строка под полем ---- */
.hfbrand { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 14px; font-size: 22px; }
.hfbrand .tlogo { width: 34px; height: 34px; }
.projchip { display: flex; align-items: center; gap: 6px; margin: 0 auto 12px; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.projchip span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer.hf { padding: 12px; }
.crow { display: flex; align-items: center; gap: 6px; }
.crow .grow { flex: 1; }
.cb { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; min-width: 0; }
.cb span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb.icon { width: 38px; padding: 0; justify-content: center; flex: none; }
.cgo { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 13px; border: 0; background: var(--a1); color: #111; font-weight: 800; font-size: 14px; white-space: nowrap; flex: none; }
.cgo:disabled { opacity: .5; }

/* ---- выбор модели: заголовки разделов ---- */
.msechead { width: 100%; display: flex; align-items: center; gap: 8px; padding: 14px 4px 8px; background: none; border: 0; color: var(--text); font-size: 17px; text-align: left; }
.msechead b { font-size: 17px; } .msechead span { flex: 1; text-align: right; color: var(--hint); font-size: 13px; font-weight: 500; }
.mic { width: 34px; height: 34px; border-radius: 10px; background: var(--card2); display: flex; align-items: center; justify-content: center; flex: none; color: var(--a1); }
.shead .bk { background: none; border: 0; color: var(--text); font-size: 26px; padding: 0 10px 0 0; line-height: 1; }

/* ---- нижнее меню на 5 вкладок ---- */
.tabbar button { min-width: 0; flex: 1; padding: 4px 2px; }
.tabh { font-size: 26px; margin: 6px 2px 12px; }
/* ---- поиск и авторы ---- */
.sbox { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 46px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--hint); margin-bottom: 6px; }
.sbox input { flex: 1; border: 0; background: none; padding: 0; height: 100%; font-size: 16px; box-shadow: none; color: var(--text); }
.sbox input:focus { border: 0; outline: none; }
.ava { flex: none; border-radius: 50%; background: var(--card2) center/cover; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--a1); border: 1px solid var(--line); text-transform: uppercase; }
.accs { display: flex; flex-direction: column; gap: 6px; }
.acc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--text); }
.acc b { display: block; font-size: 15px; } .acc small { color: var(--hint); font-size: 12px; }
.ptile { position: relative; width: 100%; aspect-ratio: 1 / 1.2; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: var(--card2); color: #fff; text-align: left; display: block; }
.ptile img, .ptile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ptile .mt { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 9px 8px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.ptile .mt b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ptile .mt small { font-size: 11px; opacity: .8; }
.pplay { position: absolute; top: 8px; left: 8px; font-style: normal; font-size: 11px; background: rgba(0,0,0,.55); border-radius: 8px; padding: 2px 7px; }
.pmus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.pbio { font-size: 13px; margin-top: 4px; line-height: 1.4; }
.fcard .ftag { position: absolute; top: 8px; left: 8px; font-style: normal; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.55); border-radius: 8px; padding: 3px 8px; }

/* ---- подписки ---- */
.favs { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px; scrollbar-width: none; }
.favs::-webkit-scrollbar { display: none; }
.fav { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; padding: 0; color: var(--text); }
.fav span:last-child { font-size: 11px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav .ava { border: 2px solid var(--a1); }
.fposts .ptile { flex: none; width: 140px; }
.astats { display: flex; align-items: center; gap: 16px; margin: 6px 2px 14px; font-size: 13px; color: var(--hint); }
.astats b { color: var(--text); font-size: 15px; }
.astats .pill { margin-left: auto; }
/* ---- готовые проекты ---- */
.kits { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.kit { display: flex; gap: 12px; padding: 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--text); align-items: stretch; }
.kcov { flex: none; width: 92px; height: 92px; border-radius: 14px; background: var(--card2) center/cover; }
.kbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.kbody b { font-size: 16px; } .kbody small { color: var(--hint); font-size: 12px; }
.kheroes { display: flex; align-items: center; margin-top: 8px; }
.kh { width: 30px; height: 30px; border-radius: 50%; background: var(--card2) center 15%/cover; border: 2px solid var(--card); margin-right: -8px; }
.kheroes em { font-style: normal; font-size: 12px; color: var(--hint); margin-left: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kitcov { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--card2) center/cover; object-fit: cover; display: block; }
.kitheroes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kithero { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.kithero span { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; background: var(--card2) center/cover; margin-bottom: 6px; }
.kithero b { font-size: 14px; display: block; } .kithero small { font-size: 11px; color: var(--hint); line-height: 1.35; display: block; margin-top: 2px; }
.kidea { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13px; margin-bottom: 6px; line-height: 1.4; }
.kitideas { margin-top: 12px; } .kitideas .chips { margin-top: 6px; } .kitideas .chip { text-align: left; white-space: normal; line-height: 1.3; }
.trrow .fcard { flex: none; width: 128px; }
.linkbtn { background: none; border: 0; color: var(--a1); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 2px; padding: 4px; }
#tplf { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px; scrollbar-width: none; }
#tplf::-webkit-scrollbar { display: none; }
#tplf .chip { flex: none; }

/* ---- выбор модели: вкладки типов и компактные строки ---- */
.mtabs { display: flex; width: 100%; margin-bottom: 10px; }
.mtabs button { flex: 1; justify-content: center; padding: 9px 4px; font-size: 13px; }
.mtabs button.on { background: var(--card2); color: var(--text); }
.msbox { height: 42px; margin-bottom: 4px; }
.mrow2 { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: none; border: 0; text-align: left; color: var(--text); }
.mrow2 + .mrow2 { border-top: 1px solid var(--line); border-radius: 0; }
.mrow2.on { background: var(--card); border-radius: 12px; }
.mrow2.on + .mrow2 { border-top-color: transparent; }
.mrow2 b { display: block; font-size: 15px; font-weight: 600; } .mrow2 small { display: block; color: var(--hint); font-size: 12px; margin-top: 1px; }
.mrow2 .mp { font-weight: 700; font-size: 14px; white-space: nowrap; } .mrow2 .mp small { display: inline; font-weight: 500; margin: 0; }
.mrow2 .ck { width: 16px; color: var(--a1); font-weight: 800; text-align: center; }
#mslist .msec { margin-top: 14px; }

/* ---- плашка проекта над полем: по ширине текста, не шире 2/3 ---- */
.projchip { display: flex; width: fit-content; min-width: 120px; max-width: 66%; justify-content: center; }
.projchip span { max-width: none; min-width: 0; flex: 0 1 auto; }

/* ---- что нейросеть знает о проекте (под полем «Создать») ---- */
.projctx { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding: 8px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 12px; color: var(--hint); line-height: 1.35; }
.projctx .pcav .hthumb { width: 26px; height: 26px; border-radius: 50%; margin: 0 -6px 0 0; border: 2px solid var(--card); font-size: 12px; }
.projctx .grow { margin-left: 10px; }
/* ---- работы проекта ---- */
.spworks { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.spworks .hint { grid-column: 1 / -1; }
.swk { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--card2) center/cover; border: 1px solid var(--line); overflow: hidden; color: #fff; text-align: left; padding: 0; }
.swk b { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px; font-size: 10px; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.75)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swk em { position: absolute; top: 5px; left: 5px; font-style: normal; font-size: 10px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 1px 5px; }
.swk .spin { position: absolute; top: 50%; left: 50%; margin: -10px; }
/* ---- библиотека героев ---- */
.libgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.libgrid.big { grid-template-columns: 1fr 1fr; }
.libh { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; text-align: left; color: var(--text); }
.libh span { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; background: var(--card2) center 20%/cover; margin-bottom: 5px; }
.libh b { display: block; font-size: 13px; } .libh small { display: block; font-size: 11px; color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdbig { width: 100%; aspect-ratio: 3 / 4; max-height: 52vh; border-radius: 16px; background: var(--card2) center/contain no-repeat; }
.madeby { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--hint); margin: 8px 0; }
.madeby b { color: var(--text); }

/* ---- админка: доход и расход ---- */
#finp { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
#finp .chip { flex: none; }
.fintiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.fint { padding: 12px 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fint small { color: var(--hint); font-size: 12px; } .fint b { font-size: 19px; white-space: nowrap; } .fint span { color: var(--hint); font-size: 11px; line-height: 1.3; }
.fint.ok b { color: var(--a1); } .fint.bad b { color: #ff7a7a; }
.finbars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 10px 8px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 12px; }
.fb { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; position: relative; }
.fb i, .fb u { display: block; width: 45%; min-height: 1px; border-radius: 3px 3px 0 0; }
.fb i { background: var(--a1); } .fb u { background: #ff7a7a; }
.fb small { position: absolute; bottom: -18px; font-size: 10px; color: var(--hint); }

/* ---- каталог по клиентам ---- */
.crow2 { width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 6px; text-align: left; color: var(--text); }
.crow2 b { display: block; font-size: 15px; } .crow2 small { display: block; color: var(--hint); font-size: 12px; margin-top: 2px; line-height: 1.35; }
.cms { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; color: var(--hint); }
.cm b { color: var(--text); } .cm.ok { color: var(--a1); } .cm.bad { color: #ff7a7a; }
.evrow { display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: start; }
.evrow:last-child { border-bottom: 0; }
.evi { grid-row: 1 / 3; font-size: 18px; line-height: 1.2; }
.evrow b { display: block; font-size: 14px; font-weight: 600; } .evrow small { display: block; color: var(--hint); font-size: 12px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.evr { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; } .evr small { font-weight: 500; font-size: 11px; }
.evr.ok { color: var(--a1); } .evr.muted { color: var(--hint); text-decoration: line-through; }
.evt { grid-column: 3; text-align: right; color: var(--hint); font-size: 11px; }

/* ---- остатки на счетах нейросетей ---- */
.balc { padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px; }
.balc.low { border-color: #ff7a7a; }
.balc b { font-size: 15px; }
.balv { font-size: 24px; font-weight: 800; margin: 4px 0 2px; } .balv small { font-size: 13px; font-weight: 500; color: var(--hint); }
.balc.low .balv { color: #ff7a7a; }

/* ---- шаблоны: витрина ---- */
.tplpage h2 { margin: 0; }
.tplpage #tplf { position: sticky; top: 0; z-index: 5; background: var(--bg); margin: 0 -16px 6px; padding: 6px 16px 8px; }
/* карусель с живыми превью */
.feat { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 4px -16px 0; padding: 0 16px; scrollbar-width: none; }
.feat::-webkit-scrollbar { display: none; }
.fc { position: relative; flex: none; width: calc(100vw - 32px); max-width: 560px; aspect-ratio: 4 / 3.4; border-radius: 22px; overflow: hidden; border: 0; padding: 0;
      scroll-snap-align: center; background: var(--card2); color: #fff; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.fc video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fcg { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, transparent 28%, transparent 45%, rgba(0,0,0,.85) 100%); }
.fcb { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.fcb b { font-size: 22px; line-height: 1.15; } .fcb small { font-size: 13px; opacity: .85; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcb .row { margin-top: 8px; align-items: center; }
.fgo { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px; background: var(--a1); color: #111; font-weight: 800; font-size: 13px; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 2px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: .25s; }
.dots i.on { width: 18px; background: var(--a1); }
/* бейдж и подпись — одинаковые на всех карточках */
.bdg { position: absolute; top: 10px; left: 10px; z-index: 2; font-style: normal; font-size: 11px; font-weight: 700; color: #fff;
       padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 30px 10px 10px; background: linear-gradient(transparent, rgba(0,0,0,.82)); display: flex; flex-direction: column; gap: 1px; }
.cap b { font-size: 14px; line-height: 1.2; } .cap small { font-size: 11px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avs { display: flex; margin-top: 6px; } .avs i { width: 24px; height: 24px; border-radius: 50%; background: var(--card2) center 18%/cover; border: 2px solid rgba(255,255,255,.85); margin-right: -7px; }
.fcb .avs i { width: 30px; height: 30px; }
/* полки */
.shelfh { display: flex; align-items: flex-end; gap: 8px; margin: 22px 2px 10px; }
.shelfh h2 { font-size: 19px; } .shelfh small { display: block; color: var(--hint); font-size: 12px; margin-top: 2px; }
.shelf { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.kc, .tc, .vc, .pc, .gk, .gt { position: relative; flex: none; border-radius: 18px; overflow: hidden; border: 0; padding: 0; background: var(--card2); color: #fff; text-align: left; scroll-snap-align: start; }
.kc img, .tc img, .vc img, .pc img, .gk img, .gt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.kc:active img, .tc:active img, .vc:active img, .pc:active img, .gk:active img, .gt:active img { transform: scale(1.04); }
.kc { width: 158px; aspect-ratio: 3 / 4.2; }
.tc { width: 128px; aspect-ratio: 9 / 15; }
.vc { width: 220px; aspect-ratio: 16 / 11; }
.pc { width: 140px; aspect-ratio: 1; }
.hb { flex: none; width: 76px; background: none; border: 0; padding: 0; text-align: center; color: var(--text); scroll-snap-align: start; }
.hb i { display: block; width: 68px; height: 68px; margin: 0 auto 6px; border-radius: 50%; background: var(--card2) center 15%/cover; border: 2px solid var(--line); }
.hb b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb small { display: block; font-size: 10px; color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* сетка раздела */
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.gk { aspect-ratio: 3 / 4; } .gt { aspect-ratio: 3 / 4; }
.tplpage > h2 { margin: 16px 2px 10px; font-size: 19px; }
/* поле выбора файла: невидимое, но не display:none — иначе в Telegram на iPhone окно выбора может не открыться */
.fileinp { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; left: -9999px; }

/* =====================================================================================
   KADR — ДИЗАЙН-СИСТЕМА v2: Premium iOS Glass + Cinematic Studio
   Фиолетовый — действия и активные элементы. Лаймовый — только баланс, успех и выбранное.
   Стекло — навигация, шторки, панель создания, поиск и плавающие меню; остальное лежит прямо на фоне.
   ===================================================================================== */
:root {
  --bg: #090B12; --bg2: #090B12; --bg-2: #10131D;
  --glass: rgba(225, 232, 255, .065); --glass-on: rgba(225, 232, 255, .12); --glass-line: rgba(255, 255, 255, .13);
  --card: rgba(225, 232, 255, .055); --card2: #161A26;
  --text: #F5F6FC; --hint: #969BAF;
  --a1: #A78BFA; --a2: #A78BFA; --link: #B9A3FF; --grad: #A78BFA; --on-a: #120E20; --soft: rgba(167, 139, 250, .14);
  --lime: #B8F36B; --ok: #A8E6A1; --warn: #F4C779; --err: #FF777F;
  --line: rgba(255, 255, 255, .08);
  --r-xs: 10px; --r-s: 14px; --r-m: 18px; --r-l: 24px;
  --blur: saturate(170%) blur(22px);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 8px 30px rgba(0, 0, 0, .28);
}
html, body { background: var(--bg); }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif; letter-spacing: -.005em;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(167, 139, 250, .10), transparent 60%),
              radial-gradient(900px 500px at -10% 30%, rgba(120, 140, 255, .06), transparent 60%), var(--bg); background-attachment: fixed; }
h1 { font-weight: 750; letter-spacing: -.025em; } h2 { font-weight: 700; letter-spacing: -.02em; }
.hint, small { color: var(--hint); }
.ic { flex: none; }

/* стекло */
.glass, .tabbar, .sheet, .composer, .sbox, .projchip, .projctx, #sheet {
  background: var(--glass) !important; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line) !important; box-shadow: var(--glass-shadow);
}
#sheet { background: rgba(16, 19, 29, .82) !important; border-bottom: 0 !important; border-radius: var(--r-l) var(--r-l) 0 0; }

/* нижняя панель: матовое стекло, активная вкладка — цветом */
.tabbar { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); border-radius: 26px; padding: 6px 6px 6px !important;
  background: rgba(16, 19, 29, .62) !important; }
.tabbar button { color: var(--hint); font-size: 10.5px; font-weight: 600; gap: 3px; }
.tabbar button.on { color: var(--a1); }
.tabbar button.mid i { width: 46px; height: 46px; border-radius: 50%; background: var(--a1) !important; color: var(--on-a) !important;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(167, 139, 250, .35); margin-top: -6px; }
.tabbar button.mid.on span, .tabbar button.mid span { color: var(--text); }
body { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* кнопки: одна главная на экране — фиолетовая, остальные спокойные */
.apply, .btn.primary, .cgo, .pill.lime, #go, .fgo { background: var(--a1) !important; color: var(--on-a) !important; font-weight: 700; border: 0; }
.btn, .pill, .iconbtn { background: var(--glass); border: 1px solid var(--glass-line); color: var(--text); }
.pill.lime { box-shadow: 0 6px 18px rgba(167, 139, 250, .25); }
.apply, .btn { border-radius: var(--r-s); min-height: 48px; }
.btn.danger { color: var(--err); background: rgba(255, 119, 127, .08); border-color: rgba(255, 119, 127, .2); }

/* чипы и сегменты */
.chip { background: var(--glass); border: 1px solid var(--glass-line); color: var(--text); font-weight: 600; }
.chip.on { background: var(--glass-on); border-color: rgba(167, 139, 250, .55); color: #fff; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .25); }
.segp { background: var(--glass); border: 1px solid var(--glass-line); }
.segp button.on { background: var(--glass-on); color: var(--text); }

/* списки: строка с иконкой и стрелкой, без отдельной карточки на пункт */
.mgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.mrow { border-bottom: 1px solid var(--line); } .mgroup .mrow:last-child { border-bottom: 0; }
.mrow .ic:first-child { color: var(--hint); }
.mv { color: var(--hint); }

/* поля ввода */
input[type=text], input[type=search], textarea { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s); }
input:focus, textarea:focus { border-color: rgba(167, 139, 250, .6) !important; outline: none; }
.sbox input, .composer textarea { background: none !important; border: 0 !important; }

/* выбранное и успешное — лаймовый */
.ok, .ck, .mrow2 .ck { color: var(--lime) !important; }
.mitem2.on, .mrow2.on { box-shadow: inset 0 0 0 1px rgba(184, 243, 107, .5); }
.balv, .pcred .big { color: var(--lime); }

/* карточки контента — прямо на фоне, единые радиусы */
.kc, .tc, .vc, .pc, .gk, .gt, .fcard, .fc, .ptile { border-radius: var(--r-m) !important; }
.bdg { display: inline-flex; align-items: center; gap: 4px; background: rgba(9, 11, 18, .5) !important; border: 1px solid rgba(255, 255, 255, .14); }
.bdg .ic { width: 12px; height: 12px; }

/* ---- верхняя панель: знак Kadr · баланс · аватар ---- */
.tnav { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; }
.tnav .tlogo { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(145deg, #B9A3FF, #8C6CF2) !important; box-shadow: 0 4px 14px rgba(167,139,250,.35); }
.tbrand { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.tcred { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--hint); }
.tcred b { color: var(--lime); font-size: 14px; font-weight: 700; }
.tava { width: 34px; height: 34px; border-radius: 50%; background: var(--card2) center/cover; border: 1px solid var(--glass-line); color: var(--a1); font-weight: 800; text-transform: uppercase; }

/* ---- hero ---- */
.hero { position: relative; height: 300px; margin: 0 -16px; overflow: hidden; border-radius: 0 0 28px 28px; }
.hero video, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heroshade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,11,18,.15) 0%, rgba(9,11,18,0) 35%, rgba(9,11,18,.55) 70%, var(--bg) 100%); }
.herotxt { position: absolute; left: 20px; right: 20px; bottom: 56px; }
.herotxt h1 { font-size: 30px; line-height: 1.08; margin: 0 0 6px; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.herotxt p { margin: 0; font-size: 15px; color: rgba(245,246,252,.86); text-shadow: 0 1px 10px rgba(0,0,0,.5); }

/* ---- стеклянная панель создания (наезжает на hero) ---- */
.homecomp { position: relative; margin: -40px 0 0; padding: 12px !important; border-radius: var(--r-l) !important; z-index: 2; }
.homecomp textarea { min-height: 56px !important; font-size: 16px; }
.homecomp .cb.icon { width: 40px; height: 40px; border-radius: 12px; background: var(--glass-on) !important; border: 1px solid var(--glass-line); color: var(--text); }
.cgo.round { width: 44px; height: 44px; padding: 0; border-radius: 50%; justify-content: center; box-shadow: 0 6px 18px rgba(167,139,250,.35); }
.exrow { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px; scrollbar-width: none; }
.exrow::-webkit-scrollbar { display: none; }
.exch { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 13px; color: var(--text); white-space: nowrap; }

/* ---- быстрые действия: компактные кнопки с иконкой ---- */
.quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 18px 0 4px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; background: none; color: var(--text); }
.qa i { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--glass); border: 1px solid var(--glass-line); color: var(--a1); }
.qa span { font-size: 10.5px; font-weight: 600; line-height: 1.15; text-align: center; color: var(--hint); }
.qa:active i { background: var(--glass-on); }

/* ---- мои проекты ---- */
.hp { flex: none; width: 150px; text-align: left; background: none; color: var(--text); padding: 0; scroll-snap-align: start; }
.hpc { position: relative; display: block; width: 150px; aspect-ratio: 4 / 3; border-radius: var(--r-m); background: var(--card2) center/cover; border: 1px solid var(--line); margin-bottom: 7px; }
.hpc .spin { position: absolute; top: 50%; left: 50%; margin: -10px; }
.hp b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hp small { font-size: 11.5px; }

/* ---- лента трендов ---- */
.htbig, .htsm { position: relative; display: block; width: 100%; border-radius: var(--r-m); overflow: hidden; background: var(--card2); color: #fff; text-align: left; padding: 0; }
.htbig { aspect-ratio: 16 / 10; margin-bottom: 10px; } .htsm { aspect-ratio: 3 / 4; }
.htbig img, .htsm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.htgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.htbig .cap b { font-size: 20px; } .htbig .cap small { font-size: 13px; white-space: normal; }
.tg { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--a1); margin-bottom: 2px; }
.rep { display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; font-size: 12px; font-weight: 700; color: #fff; opacity: .9; }
.hero { height: 320px; }
.herotxt { bottom: 74px; }
.herotxt h1 { font-size: 28px; }
.homecomp { margin-top: -52px; }
.cgo.round .ic { stroke-width: 2.4; width: 22px; height: 22px; }
.heroshade { background: linear-gradient(180deg, rgba(9,11,18,.10) 0%, rgba(9,11,18,0) 25%, rgba(9,11,18,.72) 62%, var(--bg) 96%); }
.heroshade { background: linear-gradient(180deg, rgba(9,11,18,.05) 0%, rgba(9,11,18,0) 22%, rgba(9,11,18,.55) 52%, rgba(9,11,18,.92) 80%, var(--bg) 100%); }
.herotxt h1 { text-shadow: 0 2px 24px rgba(0,0,0,.7); }
.herotxt { top: 22px; bottom: auto; }
.heroshade { background: linear-gradient(180deg, rgba(9,11,18,.78) 0%, rgba(9,11,18,.35) 30%, rgba(9,11,18,0) 50%, rgba(9,11,18,.4) 78%, var(--bg) 100%); }

/* ---- экран «Создание» ---- */
.crhead { display: flex; align-items: center; gap: 8px; padding: 6px 0 8px; }
.crhead h1 { margin: 0; font-size: 28px; }
.hdbtn { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--glass); border: 1px solid var(--glass-line); color: var(--text); }
.crseg { display: flex; width: 100%; margin: 2px 0 12px; }
.crseg button { flex: 1; justify-content: center; padding: 10px 4px; font-size: 13.5px; }
.crseg button .ic { opacity: .8; }
.crseg button.on { color: var(--text); box-shadow: inset 0 0 0 1px rgba(167,139,250,.45); }
.crcomp { padding: 12px !important; border-radius: var(--r-l) !important; }
.crcomp textarea { min-height: 110px !important; font-size: 16px; }
.crcomp .crow { gap: 8px; flex-wrap: wrap; }
.crcomp .cb { height: 36px; border-radius: 12px; background: var(--glass-on) !important; border: 1px solid var(--glass-line); font-weight: 600; }
.crcomp .cb span { max-width: 170px; }
.mcard { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-m); background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--text); }
.mcard .mic { width: 40px; height: 40px; border-radius: 12px; background: var(--soft) !important; color: var(--a1) !important; }
.mcard b { display: block; font-size: 15.5px; } .mcard small { display: block; font-size: 12.5px; margin-top: 1px; }
.mcard .mp { font-weight: 700; font-size: 13.5px; white-space: nowrap; color: var(--text); }
.mtitle { margin: 16px 4px 8px !important; font-size: 12px !important; font-weight: 700 !important; letter-spacing: .06em; text-transform: uppercase; color: var(--hint) !important; }
.costline { display: flex; justify-content: space-between; align-items: center; margin: 16px 4px 10px; font-size: 14px; color: var(--hint); }
.costline b { color: var(--text); font-size: 16px; }
.crgo { width: 100%; height: 54px; border-radius: 16px; background: var(--a1); color: var(--on-a); font-weight: 750; font-size: 16.5px; border: 0;
  box-shadow: 0 10px 28px rgba(167,139,250,.32), inset 0 1px 0 rgba(255,255,255,.35); }
.crgo:disabled { opacity: .45; box-shadow: none; }
/* тренды: редакционная карточка и сетка второго уровня */
.gk.big, .gt.big { display: block; width: 100%; aspect-ratio: 16 / 11; margin-bottom: 10px; }
.gk.big .cap b, .gt.big .cap b { font-size: 19px; } .gk.big .cap small, .gt.big .cap small { font-size: 12.5px; white-space: normal; }
.cap small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cap .rep { margin-top: 6px; }
.tplpage #tplf { top: 0; }
.rep { white-space: nowrap; } .tc .rep, .kc .rep, .vc .rep, .pc .rep { font-size: 11px; }
/* этапы генерации */
.stages2 { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 10px 0 6px; }
.stages2 span { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--hint); }
.stages2 span.done { color: var(--ok); border-color: rgba(168,230,161,.25); }
.stages2 span.now { color: var(--text); border-color: rgba(167,139,250,.55); background: var(--soft); }
.st.err { color: var(--err); background: rgba(255,119,127,.06); border: 1px solid rgba(255,119,127,.2); border-radius: var(--r-s); padding: 12px; }
/* профиль */
.phead3 { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.phead3 .pava { width: 64px; height: 64px; border-radius: 50%; background: var(--card2) center/cover; border: 1px solid var(--glass-line); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: var(--a1); }
.phead3 b { font-size: 19px; }
.substat { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--hint); }
.substat.on { color: var(--a1); border-color: rgba(167,139,250,.4); }
.balcard { display: flex; align-items: center; gap: 12px; padding: 16px; margin-bottom: 14px; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--glass-shadow); }
.balcard small { display: block; font-size: 12.5px; } .balcard b { display: block; font-size: 28px; font-weight: 800; color: var(--lime); margin: 2px 0; letter-spacing: -.02em; }
.balcard span { display: block; font-size: 11.5px; color: var(--hint); line-height: 1.35; }
.crgo.small { width: auto; height: 44px; padding: 0 16px; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.mgroup + .mgroup { margin-top: 12px; }
/* результат */
.resmedia { width: 100%; border-radius: var(--r-l); background: #000; display: block; max-height: 70vh; object-fit: contain; }
.resmeta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 2px 12px; font-size: 13px; color: var(--hint); }
.resmeta .ok { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.resacts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.resacts .btn { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 0 6px; }
#app .crgo .ic { vertical-align: -4px; margin-right: 4px; }
/* нижняя кнопка действия — над стеклянной панелью, не перекрывается */
#go.go { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); border-radius: 16px; min-height: 52px; z-index: 19;
  box-shadow: 0 10px 28px rgba(167,139,250,.32), inset 0 1px 0 rgba(255,255,255,.35); }
#go.go:disabled { opacity: 1; background: rgba(167,139,250,.35) !important; color: rgba(18,14,32,.8) !important; box-shadow: none; }
/* подписка: спокойная иерархия, без кислотных градиентов */
.subhero { background: linear-gradient(160deg, rgba(167,139,250,.20), rgba(167,139,250,.06)) !important; border: 1px solid rgba(167,139,250,.3); color: var(--text) !important; }
.subhero b { color: var(--text) !important; } .subhero span { color: rgba(245,246,252,.85) !important; }
.subhero small { display: block; margin-top: 8px; font-size: 12px; color: var(--hint); }
.sub.hot { border-color: rgba(167,139,250,.55) !important; }
.subtag { background: var(--a1) !important; color: var(--on-a) !important; }
.subget b, .subget em { color: var(--lime) !important; }
/* когда снизу есть кнопка действия — контент не прячется под ней */
body:has(#go:not(.hidden)) { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
/* поле выбора файла: невидимое, но живое (без pointer-events:none и не за краем экрана) — его открывает <label for> */
.fileinp { position: fixed !important; left: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: auto !important; z-index: -1; }
label.upslot, label.cb, label.mrow, label.btn, label.upload { cursor: pointer; -webkit-user-select: none; user-select: none; }

/* =====================  v3: по макетам (лайм — главное действие, фиолетовый — акценты)  ===================== */
:root { --cta: #B8F36B; --on-cta: #0E1206; }
/* главное действие экрана — лайм */
.crgo, #go.go, .apply, .btn.primary, .pill.lime, .fgo { background: var(--cta) !important; color: var(--on-cta) !important;
  box-shadow: 0 8px 24px rgba(184,243,107,.22), inset 0 1px 0 rgba(255,255,255,.45) !important; }
#go.go:disabled, .crgo:disabled { background: rgba(184,243,107,.28) !important; color: rgba(14,18,6,.7) !important; box-shadow: none !important; }
/* iOS: без системной «кнопки воспроизведения» поверх роликов-превью */
video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
video::-webkit-media-controls { display: none !important; }
video[controls]::-webkit-media-controls { display: flex !important; }

/* нижняя панель — как на макете */
.tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 68px; border-radius: 30px; padding: 0 6px !important; align-items: center;
  background: rgba(20, 23, 34, .66) !important; }
.tabbar button { flex: 1; justify-content: center; height: 100%; font-size: 11px; font-weight: 600; color: #8D92A6; }
.tabbar button .ic { width: 24px; height: 24px; }
.tabbar button.on { color: var(--cta); }
.tabbar button.mid { position: relative; }
.tabbar button.mid i { width: 58px; height: 58px; margin-top: -26px; background: var(--cta) !important; color: var(--on-cta) !important;
  box-shadow: 0 8px 26px rgba(184,243,107,.35), 0 0 0 6px rgba(9,11,18,.55) !important; }
.tabbar button.mid i .ic { width: 28px; height: 28px; stroke-width: 2.2; }
.tabbar button.mid span { color: var(--text) !important; margin-top: 2px; }

/* ---- главная ---- */
.homebg { position: absolute; top: 0; left: 0; right: 0; height: 640px; background: var(--bg) center top / cover no-repeat; z-index: 0; pointer-events: none; }
.homebg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,11,18,.35) 0%, rgba(9,11,18,.05) 30%, rgba(9,11,18,.35) 60%, rgba(9,11,18,.92) 86%, var(--bg) 100%); }
.homewrap { position: relative; z-index: 1; }
.hhead { display: flex; align-items: center; gap: 10px; padding: 6px 0 18px; }
.hlogo { width: 44px; height: 44px; border-radius: 13px; background: var(--cta); display: flex; align-items: center; justify-content: center; }
.hlogo svg { width: 26px; height: 26px; }
.hhead b { font-size: 23px; font-weight: 750; letter-spacing: -.02em; }
.hbal { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 21px; background: rgba(225,232,255,.09); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #C9CDDD; font-weight: 700; font-size: 15px; }
.hbal span { color: var(--text); }
.hava { width: 44px; height: 44px; border-radius: 50%; background: var(--card2) center/cover; border: 1px solid var(--glass-line); color: var(--a1); font-weight: 800; font-size: 17px; text-transform: uppercase; }
.htitle { font-size: 40px; line-height: 1.04; font-weight: 800; letter-spacing: -.035em; margin: 26px 0 12px; text-shadow: 0 2px 20px rgba(0,0,0,.45); }
.htitle span { color: #B79CFF; }
.hsub { margin: 0 0 26px; font-size: 16.5px; line-height: 1.35; color: rgba(245,246,252,.78); text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hquick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.hq { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1 / 1.04; padding: 6px 2px; border-radius: 20px;
  background: rgba(225,232,255,.075); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12); color: var(--text); text-align: center; cursor: pointer; }
.hq .ic { color: #C3B0FF; width: 28px; height: 28px; }
.hq span { font-size: 11px; font-weight: 600; line-height: 1.15; }
.hq:active { background: rgba(225,232,255,.14); }
.hprompt { position: relative; border-radius: 26px; padding: 16px 14px 14px; background: rgba(225,232,255,.075); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 40px rgba(0,0,0,.35);
  background-image: radial-gradient(260px 120px at 0% 0%, rgba(167,139,250,.16), transparent 70%), radial-gradient(240px 120px at 100% 100%, rgba(184,243,107,.10), transparent 70%); }
.hpin { display: flex; gap: 10px; align-items: flex-start; color: #C3B0FF; }
.hpin textarea { flex: 1; background: none !important; border: 0 !important; padding: 0 !important; min-height: 26px; font-size: 17px; color: var(--text); resize: none; box-shadow: none !important; }
.hpin textarea::placeholder { color: #9AA0B4; }
.hpbar { display: flex; align-items: center; margin: 22px 0 12px; }
.hpimg { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(225,232,255,.1); border: 1px solid var(--glass-line); color: #D8DBE8; cursor: pointer; }
.hpgo { width: 50px; height: 50px; border-radius: 50%; background: var(--cta); color: var(--on-cta); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(184,243,107,.3); }
.hpgo .ic { stroke-width: 2.3; }
.hpchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.hpchips::-webkit-scrollbar { display: none; }
.hpc { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(225,232,255,.09); border: 1px solid var(--glass-line); font-size: 13px; font-weight: 600; color: var(--text); }
.hpc .ic { color: #C3B0FF; }
.hsec { display: flex; align-items: center; justify-content: space-between; margin: 28px 2px 12px; }
.hsec h2 { margin: 0; font-size: 21px; }
.hlink { display: inline-flex; align-items: center; gap: 4px; color: #C9CDDD; font-size: 14px; font-weight: 600; }
.hrow { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hrow::-webkit-scrollbar { display: none; }
.pcard { position: relative; flex: none; width: 212px; height: 156px; border-radius: 20px; background: var(--card2) center/cover; border: 1px solid var(--glass-line); overflow: hidden; text-align: left; color: #fff; scroll-snap-align: start; padding: 0; }
.pcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.78)); }
.pplay { position: absolute; left: 12px; bottom: 58px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(9,11,18,.55); border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pplay .ic { fill: #fff; stroke: none; margin-left: 2px; }
.pcap { position: absolute; left: 12px; right: 36px; bottom: 12px; z-index: 2; }
.pcap b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pcap small { display: block; font-size: 12px; color: rgba(255,255,255,.75); margin-top: 2px; }
.pmore { position: absolute; right: 8px; bottom: 14px; z-index: 2; color: #fff; transform: rotate(90deg); }
.pcard .spin { position: absolute; top: 40%; left: 50%; margin: -10px; z-index: 2; }
.tcard2 { position: relative; flex: none; width: 186px; height: 148px; border-radius: 20px; background: var(--card2) center/cover; border: 1px solid var(--glass-line); overflow: hidden; text-align: left; color: #fff; scroll-snap-align: start; padding: 0; }
.tcard2::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.75)); }
.tbadge { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(9,11,18,.5); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tbadge .ic { color: var(--cta); }
.tcap { position: absolute; left: 12px; right: 10px; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.tcap b { flex: 1; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tplay { flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(9,11,18,.55); border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; }
.tplay .ic { fill: #fff; stroke: none; margin-left: 2px; }
@media (max-width: 360px) { .htitle { font-size: 34px; } .hq span { font-size: 10px; } .hq .ic { width: 24px; height: 24px; } }
/* метки-кнопки (выбор фото) не наследуют стиль подписей полей */
label.hq, label.hpimg, label.cb, label.mrow, label.upslot, label.btn, label.upload {
  text-transform: none !important; letter-spacing: normal !important; margin: 0; font-weight: inherit; color: inherit; }
label.hq { font-size: inherit; display: flex; }
label.hq span { font-size: 11px; font-weight: 600; }
label.upslot { display: flex; font-size: 15px; }
label.mrow { display: flex; font-size: 15px; font-weight: 400; }
label.cb { display: flex; font-size: 13px; font-weight: 600; }
.hquick { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.hq { min-width: 0; aspect-ratio: auto; height: 84px; padding: 8px 2px; }
.hq span { font-size: 10.5px !important; line-height: 1.15; word-break: break-word; hyphens: auto; max-width: 100%; }
.hq .ic { width: 26px; height: 26px; }
.hq span { font-size: 10px !important; letter-spacing: -.015em; word-break: normal !important; hyphens: manual !important; white-space: normal; }
.hquick { gap: 6px; }
/* «Создание» по макету */
.crthumbs { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.crth { position: relative; width: 64px; height: 64px; flex: none; border-radius: 14px; background: var(--card2) center/cover; border: 1px solid var(--glass-line); }
.crth button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: #2A2E3C; border: 1px solid var(--glass-line); color: var(--text); display: flex; align-items: center; justify-content: center; }
.crth.add { display: flex; align-items: center; justify-content: center; background: rgba(225,232,255,.08); color: var(--text); cursor: pointer; }
.crthhint { font-size: 12.5px; color: var(--hint); }
.crchips { display: flex; gap: 8px; margin: 12px 0 2px; overflow-x: auto; scrollbar-width: none; }
.crchips::-webkit-scrollbar { display: none; }
.crchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 13.5px; font-weight: 600; color: var(--text); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crchip .ic { color: #C3B0FF; }
.crchip.on { border-color: rgba(167,139,250,.55); background: var(--soft); }
.mbadge { display: inline-block; margin-left: 8px; vertical-align: 2px; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(184,243,107,.14); color: var(--cta); border: 1px solid rgba(184,243,107,.3); }
.crbal { text-align: center; margin-top: 10px; font-size: 13px; color: var(--hint); }
.crbal .hlink { display: inline; color: var(--cta); font-size: 13px; }
.crseg button.on { background: rgba(225,232,255,.14) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14) !important; }
.mcard b { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.mcard .mbadge { margin: 0 !important; position: static !important; background: rgba(184,243,107,.14) !important; color: var(--cta) !important; font-size: 10.5px !important; }
/* тренды по макету */
.tbig { position: relative; display: block; width: 100%; height: 190px; border-radius: 22px; background: var(--card2) center/cover; border: 1px solid var(--glass-line); overflow: hidden; text-align: left; color: #fff; margin: 4px 0 10px; padding: 0; }
.tbg { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.78)); }
.tbc { position: absolute; left: 16px; right: 60px; bottom: 14px; display: flex; flex-direction: column; gap: 2px; }
.tbc b { font-size: 21px; line-height: 1.15; } .tbc small { font-size: 13px; color: rgba(255,255,255,.8); }
.tbplay { position: absolute; right: 14px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(9,11,18,.5); border: 1px solid rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tbplay .ic { fill: #fff; stroke: none; margin-left: 2px; }
.tcats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tcat { position: relative; height: 112px; border-radius: 18px; background: var(--card2) center/cover; border: 1px solid var(--glass-line); overflow: hidden; text-align: left; color: #fff; padding: 0; }
.tcc { position: absolute; left: 12px; right: 12px; bottom: 10px; } .tcc b { display: block; font-size: 15px; } .tcc small { display: block; font-size: 12px; color: rgba(255,255,255,.8); }
.tplpage .sbox { margin-bottom: 8px; }
/* проект по макету */
.pjhead { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); margin-bottom: 12px; }
.pjcov { width: 64px; height: 64px; flex: none; border-radius: 14px; background: var(--card2) center/cover; border: 1px solid var(--line); }
.pjhead b { display: block; font-size: 17px; line-height: 1.2; } .pjhead small { display: block; font-size: 12.5px; margin-top: 3px; }
.pjtabs { display: flex; width: 100%; margin-bottom: 8px; }
.pjtabs button { flex: 1; justify-content: center; padding: 9px 2px; font-size: 13px; }
.prj .shots { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.prj .shots::-webkit-scrollbar { display: none; }
.prj .shot { flex: none; width: 150px; scroll-snap-align: start; background: none; border: 0; padding: 0; }
.prj .shot .pic { border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 4 !important; }
.prj .shot .pic img, .prj .shot .pic video { width: 100%; height: 100%; object-fit: cover; }
.prj .shot .cap p { font-size: 12.5px; line-height: 1.3; margin: 6px 2px 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prj .shot .acts .iconbtn { font-size: 12px; padding: 5px 10px; }
.pjchars { display: flex; gap: 14px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.pjch { flex: none; width: 72px; text-align: center; background: none; border: 0; padding: 0; color: var(--text); }
.pjch span { display: flex; align-items: center; justify-content: center; width: 66px; height: 66px; margin: 0 auto 6px; border-radius: 50%; background: var(--card2) center 18%/cover; border: 2px solid var(--glass-line); font-weight: 800; font-size: 20px; color: var(--a1); }
.pjch b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjch.add span { background: var(--glass); color: var(--text); border-style: dashed; }
.pjnew { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; margin-top: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--text); }
.pjnew .mic { width: 40px; height: 40px; border-radius: 12px; background: var(--soft) !important; color: var(--a1) !important; display: flex; align-items: center; justify-content: center; }
.pjnew b { display: block; font-size: 15px; } .pjnew small { display: block; font-size: 12px; }
.pjgo { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.prj .pjpane .btn { margin-top: 10px; }
/* этапы генерации — вертикальный список */
.stagesv { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 10px; }
.stagesv div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--hint); }
.stagesv i { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); font-style: normal; }
.stagesv .done { color: var(--text); } .stagesv .done i { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.stagesv .now { color: var(--text); font-weight: 600; } .stagesv .now i { border-color: rgba(167,139,250,.6); }
.spin.s { width: 12px; height: 12px; border-width: 2px; }

/* =====================  ДНЕВНАЯ ТЕМА  ===================== */
.hthemebtn { width: 36px; height: 36px; border-radius: 12px; margin-left: 4px; display: flex; align-items: center; justify-content: center;
  background: rgba(225,232,255,.09); border: 1px solid var(--glass-line); color: #E9EBF5; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
html[data-theme="light"] {
  --bg: #F3F4F9; --bg2: #F3F4F9; --bg-2: #FFFFFF;
  --glass: rgba(255,255,255,.72); --glass-on: rgba(255,255,255,.95); --glass-line: rgba(16,19,29,.09);
  --card: #FFFFFF; --card2: #E8EAF2; --text: #11131C; --hint: #5F6577; --line: rgba(16,19,29,.08);
  --a1: #7C5CF0; --link: #6B4CE6; --soft: rgba(124,92,240,.10); --on-a: #FFFFFF;
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 22px rgba(16,19,29,.07);
  color-scheme: light;
}
html[data-theme="light"] body { background: radial-gradient(1100px 560px at 85% -10%, rgba(124,92,240,.10), transparent 60%), var(--bg); }
html[data-theme="light"] .tabbar { background: rgba(255,255,255,.78) !important; box-shadow: 0 8px 28px rgba(16,19,29,.10); }
html[data-theme="light"] .tabbar button { color: #7A8094; }
html[data-theme="light"] .tabbar button.on { color: #4C8A0F; }
html[data-theme="light"] .tabbar button.mid i { box-shadow: 0 8px 22px rgba(120,170,40,.35), 0 0 0 6px rgba(243,244,249,.85) !important; }
html[data-theme="light"] #sheet { background: rgba(255,255,255,.94) !important; }
html[data-theme="light"] .mgroup, html[data-theme="light"] .mcard, html[data-theme="light"] .pjnew { background: #FFFFFF; box-shadow: 0 2px 10px rgba(16,19,29,.04); }
html[data-theme="light"] .chip, html[data-theme="light"] .crchip, html[data-theme="light"] .exch { background: #FFFFFF; color: var(--text); }
html[data-theme="light"] .chip.on { background: rgba(124,92,240,.12); color: var(--text); border-color: rgba(124,92,240,.45); }
html[data-theme="light"] .crchip .ic, html[data-theme="light"] .hpc .ic, html[data-theme="light"] .hpin { color: var(--a1); }
html[data-theme="light"] .tbadge, html[data-theme="light"] .bdg { color: #fff; }
html[data-theme="light"] input[type=text], html[data-theme="light"] input[type=search], html[data-theme="light"] textarea { background: #FFFFFF; color: var(--text); }
html[data-theme="light"] .balcard b, html[data-theme="light"] .balv, html[data-theme="light"] .ok, html[data-theme="light"] .ck { color: #4C8A0F !important; }
html[data-theme="light"] .mbadge { color: #4C8A0F !important; }
html[data-theme="light"] .hlink, html[data-theme="light"] .linkbtn { color: #4F5466; }
html[data-theme="light"] .htitle span { color: #C9B6FF; }
/* главная: шапка и плитки лежат на фото — оставляем светлый текст; ниже фото — светлая страница */
html[data-theme="light"] .homebg::after { background: linear-gradient(180deg, rgba(9,11,18,.30) 0%, rgba(9,11,18,.05) 30%, rgba(9,11,18,.30) 55%, rgba(243,244,249,.85) 84%, var(--bg) 100%); }
html[data-theme="light"] .hhead b, html[data-theme="light"] .htitle, html[data-theme="light"] .hsub { color: #fff; }
html[data-theme="light"] .hq { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; }
html[data-theme="light"] .hq .ic { color: #E2D8FF; }
html[data-theme="light"] .hprompt { background: rgba(255,255,255,.82); border-color: rgba(16,19,29,.08); box-shadow: 0 14px 40px rgba(16,19,29,.12); }
html[data-theme="light"] .hpin textarea { color: var(--text); } html[data-theme="light"] .hpin textarea::placeholder { color: #7A8094; }
html[data-theme="light"] .hpimg, html[data-theme="light"] .hpc { background: #F1F2F7; color: var(--text); border-color: rgba(16,19,29,.08); }
html[data-theme="light"] .hbal { background: rgba(255,255,255,.2); color: #fff; } html[data-theme="light"] .hbal span { color: #fff; }
html[data-theme="light"] .hthemebtn { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); color: #fff; }
html[data-theme="light"] .hsec h2 { color: var(--text); }
html[data-theme="light"] .crgo:disabled, html[data-theme="light"] #go.go:disabled { color: rgba(17,19,28,.55) !important; }
/* живые превью трендов */
.tc video, .gt video, .kc video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard2 video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tcard2::after { z-index: 1; } .tcard2 .tbadge, .tcard2 .tcap { z-index: 2; }
.trhero.vid { position: relative; overflow: hidden; padding: 0; }
.trhero.vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.trhero.vid em { position: absolute; top: 10px; left: 10px; }

/* =====================  v4: KadrAI — медиа без обрезки, стили, проекты  ===================== */
/* картинка или ролик целиком (contain), поля — размытая копия того же кадра */
.fitbg { position: absolute; inset: -14%; z-index: 0; background: var(--card2) center/cover no-repeat; filter: blur(20px) saturate(1.25) brightness(.62); transform: translateZ(0); pointer-events: none; }
.kc img, .tc img, .vc img, .pc img, .gk img, .gt img, .kc video, .tc video, .gk video, .gt video, .fcard img, .fcard video,
.tcard2 img, .tcard2 video, .pcard img, .tbig img, .tbig video, .tcat img, .trhero.fit img, .trhero.fit video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain !important; z-index: 1; display: block; }
.kc:active img, .tc:active img, .gk:active img, .gt:active img { transform: none; }
.cap, .bdg, .tbadge, .tcap, .pcap, .pplay, .pmore, .tbg, .tbc, .tbplay, .tcc, .mt, .ftag, .rep { z-index: 2; }
.tbg, .tcard2::after, .pcard::after { z-index: 1; }
.tbg { z-index: 2 !important; } .tbc, .tbplay, .tcc { z-index: 3 !important; }
.pcard::after, .tcard2::after { z-index: 2 !important; } .pcap, .pplay, .pmore, .tcap, .tbadge, .vmark, .pcard .spin { z-index: 3 !important; }
/* пропорции карточек — как у самих роликов: тренды вертикальные 9:16, готовые проекты — горизонтальные */
.tc { width: 132px; aspect-ratio: 9 / 16; }
.gt { aspect-ratio: 9 / 16; }
.gt.big { aspect-ratio: 4 / 5; }
.kc { width: 236px; aspect-ratio: 16 / 11; }
.gk, .gk.big { aspect-ratio: 16 / 11; }
.tcard2 { width: 138px; height: auto; aspect-ratio: 9 / 16; }
.tbig { height: auto; aspect-ratio: 4 / 5; max-height: 62vh; }
.tcat { height: 132px; }
.pcard { width: 168px; height: 212px; }
.trhero.fit { position: relative; overflow: hidden; padding: 0; width: 100%; aspect-ratio: 9 / 13; max-height: 64vh; background: var(--card2); }
.trhero.fit em { position: absolute; z-index: 3; top: 10px; left: 10px; }
.media { max-height: 72vh; object-fit: contain; background: #000; }
/* значки на видео: маленькая стеклянная метка «это ролик» в правом верхнем углу */
.vmark { position: absolute; top: 9px; right: 9px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(9,11,18,.5); border: 1px solid rgba(255,255,255,.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; pointer-events: none; }
.vmark .ic { fill: #fff; stroke: none; margin-left: 1px; }
.tbadge, .bdg { max-width: calc(100% - 50px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcap b { font-size: 13.5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
/* публикации — естественные пропорции в «кирпичной» сетке */
.mason .ptile, .fposts .ptile { aspect-ratio: auto; }
.mason .ptile img, .mason .ptile video { position: static; height: auto; display: block; object-fit: contain; }
.ptile .pmus { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }

/* бренд: KadrAI */
.brai { color: var(--cta); margin-left: 1px; }
.htitle span { color: var(--cta); text-shadow: 0 0 26px rgba(184,243,107,.35); }
html[data-theme="light"] .htitle span { color: #C8F58A; }
.hlogo { box-shadow: 0 6px 20px rgba(184,243,107,.35); }
.hhead .hthemebtn { margin-left: 2px; order: 9; }
/* иконки второго тона */
.ic .icf { transition: fill-opacity .2s; }
.tabbar button.on .ic .icf { fill-opacity: .35; }
.hq .ic { color: #CDBBFF; }
.hq.hot { background: linear-gradient(160deg, rgba(184,243,107,.28), rgba(184,243,107,.08)); border-color: rgba(184,243,107,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 24px rgba(184,243,107,.18); }
.hq.hot .ic { color: var(--cta); }
html[data-theme="light"] .hq.hot { background: linear-gradient(160deg, rgba(184,243,107,.5), rgba(184,243,107,.2)); }
html[data-theme="light"] .hq.hot .ic { color: #E9FFD0; }

/* главная: фото видно — затемнение только сверху под текстом и снизу к странице */
.homebg { height: 760px; background-position: center 38%; }
.homebg::after { background: linear-gradient(180deg, rgba(9,11,18,.55) 0%, rgba(9,11,18,.12) 26%, rgba(9,11,18,0) 45%, rgba(9,11,18,.15) 66%, rgba(9,11,18,.9) 90%, var(--bg) 100%); }
html[data-theme="light"] .homebg::after { background: linear-gradient(180deg, rgba(9,11,18,.5) 0%, rgba(9,11,18,.1) 26%, rgba(9,11,18,0) 45%, rgba(9,11,18,.12) 66%, rgba(243,244,249,.88) 90%, var(--bg) 100%); }
.hq { background: rgba(14,16,28,.38); }
.hprompt { background-color: rgba(14,16,28,.55); }

/* «Создание»: проект и стили выделены */
.crproj { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 0; padding: 12px 14px; border-radius: 18px; text-align: left; color: var(--text);
  background: linear-gradient(135deg, rgba(167,139,250,.20), rgba(167,139,250,.06)); border: 1px solid rgba(167,139,250,.45); box-shadow: 0 8px 24px rgba(167,139,250,.12); }
.crproj.on { background: linear-gradient(135deg, rgba(184,243,107,.20), rgba(184,243,107,.05)); border-color: rgba(184,243,107,.55); }
.crproj .cpi { flex: none; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(167,139,250,.22); color: #D7CBFF; }
.crproj.on .cpi { background: var(--cta); color: var(--on-cta); }
.crproj small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #C3B0FF; }
.crproj.on small { color: var(--cta); }
.crproj b { display: block; font-size: 16px; margin-top: 1px; }
.crproj em { display: block; font-style: normal; font-size: 12.5px; color: var(--hint); margin-top: 2px; line-height: 1.3; }
.crproj .pcavs { display: flex; margin-top: 6px; } .crproj .pcavs .hthumb { width: 24px; height: 24px; border-radius: 50%; margin-right: -6px; border: 2px solid var(--bg); font-size: 11px; }
.sthead { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 4px 10px; }
.sthead b { font-size: 17px; } .sthead small { color: var(--hint); font-size: 12.5px; }
.strow { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.strow::-webkit-scrollbar { display: none; }
.stt { position: relative; flex: none; width: 92px; height: 122px; border-radius: 16px; overflow: hidden; padding: 0; border: 2px solid transparent; background: var(--card2); color: #fff; scroll-snap-align: start; text-align: left; }
.stt i { position: absolute; inset: 0; background: center/cover no-repeat; animation: kb 7s ease-in-out infinite alternate; }
.stt:nth-child(3n) i { animation-duration: 8.5s; animation-name: kb2; } .stt:nth-child(3n+1) i { animation-delay: -3s; }
.stt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.8)); }
.stt b { position: absolute; left: 8px; right: 6px; bottom: 7px; z-index: 2; font-size: 12.5px; line-height: 1.15; }
.stt.none { display: flex; align-items: center; justify-content: center; background: var(--glass); border: 1px dashed var(--glass-line); color: var(--hint); }
.stt.none::after { display: none; } .stt.none b { position: static; text-align: center; color: var(--text); font-size: 12px; padding: 0 6px; }
.stt.on { border-color: var(--cta); box-shadow: 0 0 0 3px rgba(184,243,107,.25), 0 8px 22px rgba(184,243,107,.2); transform: translateY(-2px); }
.stt.on::before { content: ""; position: absolute; top: 7px; right: 7px; z-index: 3; width: 20px; height: 20px; border-radius: 50%; background: var(--cta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17 19 7'/%3E%3C/svg%3E") center/13px no-repeat; }
.stt { transition: transform .2s, box-shadow .2s, border-color .2s; }
@keyframes kb { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.18) translate(-5%, -4%); } }
@keyframes kb2 { from { transform: scale(1.15) translate(4%, 2%); } to { transform: scale(1.02) translate(-2%, -3%); } }
@media (prefers-reduced-motion: reduce) { .stt i { animation: none; } }
.fsts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* подписка */
.subhero2 { position: relative; overflow: hidden; margin-top: 6px; padding: 20px 18px; border-radius: 24px; color: #0b0b0c;
  background: radial-gradient(220px 160px at 100% 0%, rgba(255,255,255,.55), transparent 70%), linear-gradient(135deg, #C9F78A, #B8F36B 45%, #9BE15D); box-shadow: 0 14px 36px rgba(184,243,107,.25); }
.subhero2 small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.subhero2 b { display: block; font-size: 26px; line-height: 1.08; letter-spacing: -.02em; margin: 6px 0 8px; }
.subhero2 span { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; opacity: .85; }
.subhero2 em { font-style: normal; background: #0b0b0c; color: var(--cta); padding: 1px 7px; border-radius: 8px; }
.trial { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(167,139,250,.05)); border: 1px solid rgba(167,139,250,.4); }
.trial .tri { flex: none; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(167,139,250,.25); color: #E0D6FF; }
.trial b { display: block; font-size: 16px; } .trial small { display: block; font-size: 12.5px; color: var(--hint); margin-top: 3px; line-height: 1.35; }
.sub2 { position: relative; margin-top: 12px; padding: 18px 16px 16px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); }
.sub2.hot { border: 1.5px solid var(--cta); box-shadow: 0 10px 34px rgba(184,243,107,.16); background: linear-gradient(180deg, rgba(184,243,107,.08), var(--glass) 60%); }
.sub2.cur { border-color: rgba(167,139,250,.7); }
.sub2 .subtag { position: absolute; top: -11px; left: 16px; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--cta); color: #0b0b0c; }
.sub2 .subtag.alt { background: #A78BFA; color: #fff; }
.s2t { font-size: 20px; } .s2f { display: block; color: var(--hint); font-size: 12.5px; margin-top: 2px; }
.sub2 .subprice { font-size: 22px; font-weight: 800; white-space: nowrap; } .sub2 .subprice small { font-size: 13px; color: var(--hint); font-weight: 600; }
.s2get { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(184,243,107,.10); border: 1px solid rgba(184,243,107,.25); }
.s2get span { font-size: 13px; color: var(--hint); } .s2get b { font-size: 24px; color: var(--cta); text-align: right; }
.s2get em { grid-column: 1 / -1; font-style: normal; font-size: 13px; font-weight: 700; color: var(--text); }
.s2en { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; font-size: 13px; color: var(--text); line-height: 1.35; } .s2en .ic { flex: none; color: #C3B0FF; margin-top: 1px; }
.s2ul { list-style: none; padding: 0; margin: 12px 0 14px; display: grid; gap: 7px; }
.s2ul li { display: flex; gap: 8px; align-items: center; font-size: 14px; } .s2ul .ic { flex: none; color: var(--cta); stroke-width: 2.4; }
.sub2 .apply { width: 100%; }
.sub2.hot .apply { background: var(--cta); color: var(--on-cta); }
.cmpt { overflow-x: auto; border-radius: 18px; border: 1px solid var(--glass-line); background: var(--glass); }
.cmpt table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmpt th, .cmpt td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cmpt td:first-child, .cmpt th:first-child { text-align: left; color: var(--hint); white-space: normal; padding-left: 12px; }
.cmpt tr:last-child td { border-bottom: 0; } .cmpt th { font-size: 12.5px; } .cmpt th.hot { color: var(--cta); }
html[data-theme="light"] .s2get b, html[data-theme="light"] .cmpt th.hot, html[data-theme="light"] .s2ul .ic { color: #4C8A0F; }
/* шаги, кэшбэк */
.steps3 { display: grid; gap: 8px; margin: 14px 0 6px; }
.steps3 div { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 14px; }
.steps3 i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 13px; background: var(--cta); color: var(--on-cta); }
.cbhero { margin-top: 6px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(167,139,250,.25), rgba(184,243,107,.12)); border: 1px solid rgba(167,139,250,.35); }
.cbhero b { display: block; font-size: 19px; line-height: 1.2; } .cbhero span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--hint); line-height: 1.45; }
.cbv { position: relative; flex: none; width: 112px; height: 168px; border-radius: 16px; overflow: hidden; padding: 0; background: var(--card2); border: 2px solid transparent; color: #fff; display: flex; align-items: center; justify-content: center; }
.cbv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.cbv b { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px 7px 7px; font-size: 11.5px; line-height: 1.2; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.8));
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cbv.on { border-color: var(--cta); box-shadow: 0 0 0 3px rgba(184,243,107,.25); }
.cbcap { white-space: pre-wrap; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px dashed var(--glass-line); font-size: 14px; line-height: 1.45; margin-bottom: 8px; user-select: text; -webkit-user-select: text; }
.invhero h1 { line-height: 1.12; }
.sub2 .subtag { right: auto; }
/* главная: под заголовком — открытое окно, в котором видно фото целиком */
.homebg { height: 700px; background-size: 100% auto; background-position: center bottom; }
.hgap { height: 190px; }
.htitle { margin-top: 14px; }
.hsub { margin-bottom: 0; }
@media (min-height: 860px) { .hgap { height: 230px; } }
.strow { position: relative; }
.tbig .vmark { display: none; }
.cmpt table { table-layout: fixed; font-size: 12.5px; }
.cmpt th, .cmpt td { padding: 9px 4px; white-space: normal; }
.cmpt td:first-child, .cmpt th:first-child { width: 28%; padding-left: 10px; }
#cbcopy { display: flex; align-items: center; justify-content: center; gap: 8px; }
/* главная v5: первый экран — по высоте телефона (Telegram даёт --tg-viewport-stable-height), фото видно в окне .hgap */
.homebg { height: 720px; background-color: #090B12; background-repeat: no-repeat; background-size: 100% auto; background-position: center 0; }
.homebg::after { background: linear-gradient(180deg, rgba(9,11,18,.62) 0%, rgba(9,11,18,.25) 22%, rgba(9,11,18,0) 34%, rgba(9,11,18,0) 62%, rgba(9,11,18,.55) 80%, var(--bg) 100%) !important; }
html[data-theme="light"] .homebg::after { background: linear-gradient(180deg, rgba(9,11,18,.62) 0%, rgba(9,11,18,.25) 22%, rgba(9,11,18,0) 34%, rgba(9,11,18,0) 62%, rgba(9,11,18,.5) 80%, var(--bg) 100%) !important; }
.hhero { display: flex; flex-direction: column; min-height: calc(var(--tg-viewport-stable-height, 100svh) - 104px - env(safe-area-inset-bottom)); }
.hhead { padding: 4px 0 8px; }
.htitle { font-size: clamp(30px, 9.4vw, 40px); margin: 10px 0 8px; }
.hsub { font-size: 15px; margin: 0; }
.hgap { flex: 1 1 auto; height: auto !important; min-height: 130px; }
.hquick { gap: 6px; margin-bottom: 10px; }
.hq { aspect-ratio: auto; height: 76px; padding: 6px 1px; border-radius: 18px; gap: 6px; }
.hq .ic { width: 24px; height: 24px; }
.hq span, label.hq span { font-size: clamp(9.5px, 2.65vw, 11px); letter-spacing: -.01em; }
.hprompt { padding: 12px 12px 10px; border-radius: 22px; }
.hpin textarea { font-size: 16px; }
.hpbar { margin: 10px 0 10px; }
.hpimg { width: 40px; height: 40px; border-radius: 12px; }
.hpgo { width: 44px; height: 44px; }
.hpc { height: 32px; padding: 0 12px; font-size: 12.5px; }
@media (max-height: 700px) { .hsub { display: none; } .hgap { min-height: 90px; } .hpchips { display: none; } }
/* «Создание»: проект и стиль — одна строка */
.crrow2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.crpick { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px 8px 8px; border-radius: 16px; text-align: left; color: var(--text);
  background: var(--glass); border: 1px solid rgba(167,139,250,.35); }
.crpick.on { border-color: rgba(184,243,107,.6); background: linear-gradient(135deg, rgba(184,243,107,.14), rgba(184,243,107,.03)); }
.crpick .cpk { flex: none; width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: rgba(167,139,250,.2); color: #D7CBFF; }
.crpick.on .cpk { background: rgba(184,243,107,.22); color: var(--cta); }
.crpick .cpk.img { background: center/cover; border: 1px solid rgba(255,255,255,.2); }
.crpick .grow { min-width: 0; }
.crpick small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hint); }
.crpick b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crpick > .ic:last-child { flex: none; color: var(--hint); }
.crhint { display: flex; align-items: center; gap: 2px; margin: 8px 2px 0; font-size: 12px; color: var(--hint); min-width: 0; }
.crhint .hthumb { width: 22px; height: 22px; border-radius: 50%; margin-right: -6px; border: 2px solid var(--bg); font-size: 10px; flex: none; }
.crhint span { margin-left: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 8px; }
.stgrid .stt { width: auto; height: auto; aspect-ratio: 3 / 4; }
/* карточки в форме своей картинки (класс .fitted ставится, когда картинка загрузилась) */
.tcard2, .tc, .kc, .pcard { width: auto !important; flex: none; }
.tcard2 { height: 228px; aspect-ratio: 9 / 16; }
.tc { height: 228px; aspect-ratio: 9 / 16; }
.kc { height: 160px; aspect-ratio: 16 / 11; }
.pcard { height: 160px; aspect-ratio: 4 / 3; }
.fitted .fitbg { display: none; }
.fitted > img, .fitted > video { object-fit: cover !important; }
/* сетки — «кирпичами»: у каждой карточки своя высота */
.tgrid { display: block !important; columns: 2; column-gap: 10px; }
.tgrid > * { display: block; width: 100%; break-inside: avoid; margin: 0 0 10px; }
.gt { aspect-ratio: 9 / 16; } .gk { aspect-ratio: 16 / 11; }
/* главный тренд — компактно: ролик слева в своих пропорциях, текст справа */
.tbig2 { display: flex; gap: 14px; width: 100%; margin: 4px 0 12px; padding: 10px; border-radius: 22px; text-align: left; color: var(--text);
  background: radial-gradient(260px 160px at 100% 0%, rgba(167,139,250,.22), transparent 70%), var(--glass); border: 1px solid var(--glass-line); }
.tbmedia { position: relative; flex: none; height: 196px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--card2); }
.tbmedia img, .tbmedia video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tbmedia .vmark { top: 7px; right: 7px; }
.tbc2 { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.tbc2 b { font-size: 21px; line-height: 1.15; } .tbc2 small { font-size: 13px; color: var(--hint); line-height: 1.4; }
.tbrep { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 9px 14px; border-radius: 999px; background: var(--cta); color: var(--on-cta); font-weight: 700; font-size: 13.5px; }
/* категории: название слева, превью целиком справа */
.tcats { gap: 8px; }
.tcat2 { display: flex; align-items: center; gap: 8px; min-width: 0; height: 96px; padding: 6px 6px 6px 12px; border-radius: 18px; text-align: left; color: var(--text); background: var(--glass); border: 1px solid var(--glass-line); overflow: hidden; }
.tcc2 { flex: 1; min-width: 0; } .tcc2 b { display: block; font-size: 14.5px; line-height: 1.2; } .tcc2 small { display: block; font-size: 12px; color: var(--hint); margin-top: 3px; }
.tcthumb { position: relative; flex: none; height: 84px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--card2); }
.tcthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* страница тренда: пример в своих пропорциях */
.trhero2 { display: flex; justify-content: center; margin-top: 6px; }
.trhero2 > span { position: relative; display: block; max-width: 100%; }
.trhero2 img, .trhero2 video { display: block; max-width: 100%; max-height: 56vh; width: auto; height: auto; border-radius: 20px; background: var(--card2); }
.trhero2 em { position: absolute; top: 10px; left: 10px; font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; }
.hbal { white-space: nowrap; flex: none; }
@media (max-width: 380px) { .hhead { gap: 7px; } .hbal { padding: 0 11px; height: 38px; font-size: 14px; } .hava, .hlogo { width: 40px; height: 40px; } .hhead b { font-size: 20px; } .hthemebtn { width: 34px; height: 34px; } }
.trhero2 img, .trhero2 video { max-height: 46vh; }
/* «Продолжить работу»: узкие вертикальные кадры — карточка не уже 140px (подпись читается), кадр целиком */
.pcard { min-width: 140px; }
.pcard.fitted .fitbg { display: block; }
.pcard.fitted > img { object-fit: contain !important; }
/* быстрее на телефоне: размытые подложки только у «Продолжить работу» (размытие — дорогая операция для видеокарты телефона) */
.fitbg { display: none; }
.pcard .fitbg { display: block; filter: blur(14px) brightness(.6); }
.stt i { will-change: transform; }

/* Во весь экран в Telegram: сверху отступ под часы телефона и кнопки Telegram («Закрыть», «…»).
   Переменные ставит telegram-web-app.js; в обычном браузере и в окне с рамкой они 0 */
:root { --tg-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
body { padding-top: var(--tg-top); }
.tnav { top: var(--tg-top); }
.toast { top: calc(14px + env(safe-area-inset-top) + var(--tg-top)); }
.hhero { min-height: calc(var(--tg-viewport-stable-height, 100svh) - 104px - env(safe-area-inset-bottom) - var(--tg-top)); }
.homebg { margin-top: calc(-1 * var(--tg-top)); }  /* фото главной — до самого верха экрана, под часы и кнопки Telegram */
/* правки по проверке экранов (06.11) */
.libgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.libgrid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tplpage #tplf { top: var(--tg-top); }
/* неактивная нижняя кнопка — плотная, текст под ней не просвечивает */
#go.go:disabled, .crgo:disabled { background: #2a2f22 !important; color: rgba(214,240,180,.75) !important; }
html[data-theme="light"] #go.go:disabled, html[data-theme="light"] .crgo:disabled { background: #e3e8d6 !important; color: rgba(17,19,28,.6) !important; }
/* значок ролика не наезжает на подпись карточки */
.tc .bdg { max-width: calc(100% - 44px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* кнопка с иконкой: иконка и текст в одну строку */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn .ic { display: inline-block; flex: none; }
.cmpt td { word-break: normal; overflow-wrap: anywhere; padding-right: 6px; }
.sheet { max-height: calc(100vh - var(--tg-top) - 12px); }
/* админ: правка витрины из приложения */
.adminbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.adminbar .pill, .hedit { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed rgba(184,243,107,.55); background: rgba(184,243,107,.08); color: var(--text); }
.hedit { margin: 4px 0 0; padding: 6px 12px; border-radius: 14px; font-size: 13px; position: relative; z-index: 2; }

.mrec { font-style: normal; font-size: 11px; font-weight: 700; color: #0b0b0c; background: #B8F36B; border-radius: 8px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
