/* ================= tokens ================= */
:root {
  --canvas: #F4F5F8;
  --paper: #FFFFFF;
  --sunken: #ECEEF2;
  --ink: #16181D;
  --ink-2: #3A3F49;
  --muted: #646B78;
  --faint: #6A707C;
  --line: #E4E7ED;
  --line-strong: #D3D7DF;
  --banana: #FFD83D;
  --banana-ink: #16181D;
  --banana-soft: #FFF6CC;
  --blue: #2E5BFF;
  --green: #12A150;
  --red: #E5383B;
  --shadow-pop: 0 18px 48px -12px rgba(22, 24, 29, .22);
  --r-tile: 20px;
  --r-panel: 24px;
  --r-field: 14px;
  --rail: 248px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
[data-theme="dark"] {
  --canvas: #0F1115;
  --paper: #181B21;
  --sunken: #12141A;
  --ink: #EDEFF3;
  --ink-2: #C9CDD5;
  --muted: #9AA1AE;
  --faint: #858C99;
  --line: #262A33;
  --line-strong: #343945;
  --banana-soft: #2D2812;
  --blue: #6E8CFF;
  --shadow-pop: 0 18px 48px -12px rgba(0, 0, 0, .6);
}

/* ================= base ================= */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--canvas);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 28px); }
h3 { font-size: 18px; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--banana); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { transform: scale(1.8); opacity: .4; } }

/* ================= buttons & fields ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--banana); border-color: var(--banana); color: var(--banana-ink); }
.btn.primary:hover { background: #FFCF0F; border-color: #FFCF0F; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunken); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { min-height: 54px; padding: 0 28px; font-size: 16.5px; }
.btn.block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 0;
  background: transparent; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--sunken); }
.iconbtn .ic { width: 20px; height: 20px; }

.field { display: block; }
.field > .lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field > .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-field); border: 1px solid var(--line-strong);
  background: var(--paper); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.counter { font-size: 12.5px; color: var(--faint); text-align: right; margin-top: 4px; }

.template-editor-panel { scroll-margin-top: 85px; margin-bottom: 16px; }
.template-editor .textarea { min-height: 0; }
.template-form-section { border-top: 1px solid var(--line); padding-top: 16px; }
.template-form-section:first-child { border-top: 0; padding-top: 0; }
.template-form-section > summary { font-weight: 700; cursor: pointer; }
.template-form-section[open] > summary { margin-bottom: 16px; }
.template-form-row { border: 1px solid var(--line); border-radius: var(--r-field); padding: 14px; --gap: 10px; }
.template-form-row [data-file-status]:empty { display: none; }
.template-checks { min-width: 0; border: 0; padding: 0; }
.template-checks legend { font-weight: 600; margin-bottom: 8px; }
.template-checks > * + * { margin-top: 8px; }
.template-review { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.template-review video { width: min(100%, 320px); max-height: 320px; background: #1d2027; border-radius: var(--r-field); }

/* выбор вариантов */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choices.cols-1 { grid-template-columns: 1fr; }
.choice {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: var(--r-field);
  border: 1px solid var(--line-strong); background: var(--paper); cursor: pointer; text-align: left; font-weight: 500;
}
.choice:hover { border-color: var(--ink-2); }
.choice.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--banana-soft); }
.choice .sub { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 500; }
.seg { display: inline-flex; background: var(--sunken); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600;
  font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--sunken); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip.yellow { background: var(--banana-soft); color: var(--ink); }
.chip.green { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.chip.red { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.chip.blue { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }

/* ================= shell ================= */
.shell { min-height: 100vh; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line); background: var(--canvas); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; font-weight: 800;
  letter-spacing: -0.02em; font-size: 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: #16181D; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 22px; height: 22px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none;
  color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--sunken); }
.nav a.on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--line); }
.nav .ic { width: 20px; height: 20px; flex: none; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.balance {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--paper);
  border: 1px solid var(--line); text-decoration: none;
}
.balance b { font-size: 18px; letter-spacing: -0.01em; }
.coin { width: 26px; height: 26px; border-radius: 50%; background: var(--banana); display: grid; place-items: center; flex: none;
  font-size: 13px; font-weight: 800; color: var(--banana-ink); }
.main { margin-left: var(--rail); min-height: 100vh; }
.page { max-width: 1180px; margin: 0 auto; padding: 32px 32px 80px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; color: var(--muted); max-width: 60ch; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500;
  font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.back .ic { width: 16px; height: 16px; }

.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 900px) {
  .rail { display: none; }
  .main { margin-left: 0; padding-bottom: calc(72px + var(--safe-b)); }
  .page { padding: 18px 16px 40px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 30;
    padding: 10px 14px; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; font-size: 16px; white-space: nowrap; }
  .topbar .brand-mark { width: 30px; height: 30px; border-radius: 10px; }
  .topbar .balance { padding: 6px 12px 6px 6px; border-radius: 999px; }
  .topbar .balance b { font-size: 15px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30;
    padding: 6px 6px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; text-decoration: none;
    color: var(--faint); font-size: 11px; font-weight: 600; border-radius: 12px; }
  .tabbar a .ic { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.make .ic { width: 44px; height: 30px; padding: 4px 10px; border-radius: 12px; background: var(--banana); color: var(--banana-ink); }
}

/* ================= panels ================= */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 24px; }
.panel.flat { background: transparent; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
@media (max-width: 600px) { .panel { padding: 18px; border-radius: 20px; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; display: flex; justify-content: flex-end; align-items: center; gap: 4px; flex-wrap: wrap; text-align: right; }
.kv dt { align-self: center; }
.table-wrap.tall { max-height: 520px; overflow-y: auto; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--sunken); font-size: 14.5px; color: var(--ink-2); }
.notice.yellow { background: var(--banana-soft); }
.notice .ic { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 8px; }

/* ================= landing ================= */
.land-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1240px; margin: 0 auto;
  padding: 18px 24px; }
.hero { max-width: 1240px; margin: 0 auto; padding: 24px 24px 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px;
  align-items: center; min-height: min(760px, calc(100vh - 80px)); }
.hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.0; letter-spacing: -0.045em; max-width: 12ch; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 46ch; margin-top: 22px; }
.hero .cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero .proof { margin-top: 28px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.hero .proof b { color: var(--ink); font-size: 17px; display: block; letter-spacing: -0.01em; }
/* стена роликов — главный акцент страницы */
.wall { position: relative; height: min(700px, 82vh); overflow: hidden; border-radius: 32px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent); }
.wall-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; height: 100%; }
.wall-col { display: flex; flex-direction: column; gap: 14px; animation: drift 46s linear infinite; }
.wall-col:nth-child(2) { animation-duration: 58s; animation-direction: reverse; margin-top: -120px; }
.wall-col:nth-child(3) { animation-duration: 52s; margin-top: -40px; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .wall-col { animation: none !important; } }
.wall .reel { flex: none; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 8px; gap: 28px; }
  .wall { height: 360px; border-radius: 24px; order: -1; }
  .land-top { padding: 12px 16px; }
  .land-top .brand { white-space: nowrap; font-size: 16px; }
  .hide-m { display: none; }
}
.land-section { max-width: 1240px; margin: 0 auto; padding: 56px 24px; }
.land-section > h2 { margin-bottom: 8px; }
.land-section > .sub { color: var(--muted); margin-bottom: 28px; max-width: 60ch; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { padding: 22px; border-radius: var(--r-panel); background: var(--paper); border: 1px solid var(--line); }
.feature .ic { width: 26px; height: 26px; margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature.big { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.feature.big p { color: color-mix(in srgb, var(--paper) 70%, transparent); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-2); max-width: 70ch; }
.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-in { max-width: 1240px; margin: 0 auto; padding: 28px 24px 40px; display: flex; gap: 24px; justify-content: space-between;
  flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.footer a { color: var(--ink-2); }
.main .footer-in { padding-left: 32px; padding-right: 32px; }

/* ================= reels / trends ================= */
.reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 600px) { .reels { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.reel {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-tile); overflow: hidden; background: #1d2027;
  text-decoration: none; color: #fff; display: block; isolation: isolate;
}
.reel video, .reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.78)); z-index: 1; }
.reel-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; z-index: 2; }
.reel-title { font-weight: 700; font-size: 15px; line-height: 1.25; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reel-price { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(255,255,255,.16); backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 700; }
.reel-badge { position: absolute; top: 10px; left: 10px; z-index: 2; height: 24px; padding: 0 9px; border-radius: 999px;
  background: var(--banana); color: var(--banana-ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; }
.reel:hover .reel-title { text-decoration: underline; text-underline-offset: 3px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }

/* ================= tools hub ================= */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--r-panel); background: var(--paper);
  border: 1px solid var(--line); text-decoration: none; transition: border-color .15s; }
.tool:hover { border-color: var(--ink-2); }
.tool .ti { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sunken); flex: none; }
.tool .ti .ic { width: 24px; height: 24px; }
.tool h3 { font-size: 17px; }
.tool p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.tool .price { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tool.hot .ti { background: var(--banana); color: var(--banana-ink); }
.group-title { font-size: 15px; color: var(--muted); font-weight: 600; margin: 28px 0 12px; }

/* ================= wizard ================= */
.wiz { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.wiz-aside { position: sticky; top: 24px; }
.wiz-aside .reel { max-width: 340px; }
.aside-info { margin-top: 14px; }
@media (max-width: 900px) {
  .wiz { grid-template-columns: 1fr; gap: 18px; }
  .wiz-aside { position: static; display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; }
  .wiz-aside .reel { max-width: 104px; border-radius: 14px; }
  .wiz-aside .aside-info { margin-top: 0; }
  .wiz-aside .aside-info h3 { font-size: 16px; }
  .wiz-aside .aside-info .chip { height: 24px; font-size: 12px; padding: 0 9px; }
}
.steps { display: flex; gap: 6px; margin-bottom: 20px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--ink); }
.step-head { margin-bottom: 18px; }
.step-head .k { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.step-head p { color: var(--muted); margin-top: 8px; }
.wiz-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.wiz-actions .btn.primary { min-width: 180px; }
@media (max-width: 600px) {
  .wiz-actions { position: sticky; bottom: calc(72px + var(--safe-b)); background: var(--canvas); box-shadow: 0 -14px 14px -2px var(--canvas);
    padding: 10px 0 10px; margin-left: -4px; margin-right: -4px; z-index: 5; }
  .wiz-actions .btn { flex: 1; }
}
.summary { display: flex; flex-direction: column; gap: 10px; }
.summary .line { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sunken); font-size: 15px; }
.summary .line .k { color: var(--muted); min-width: 110px; }
.summary .line .v { font-weight: 600; }
.summary .line .tag { color: var(--faint); font-weight: 500; }
.cost-big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }

/* ================= uploader ================= */
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 150px; padding: 22px; border-radius: var(--r-panel); border: 1.5px dashed var(--line-strong); background: var(--paper);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--ink); background: var(--banana-soft); }
.drop .ic { width: 28px; height: 28px; color: var(--muted); }
.drop b { font-size: 16px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--sunken); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .n { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink);
  color: var(--paper); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.thumb .x { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6);
  color: #fff; cursor: pointer; display: grid; place-items: center; }
.thumb .x .ic { width: 14px; height: 14px; }
.thumb .bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.4); }
.thumb .bar i { display: block; height: 100%; background: var(--banana); border-radius: 4px; width: 0; transition: width .2s; }
.thumb .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; }
.photo-slot { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
.photo-slot + .photo-slot { margin-top: 10px; }
.photo-slot .pic { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--sunken); flex: none; display: grid; place-items: center; position: relative; }
.photo-slot .pic img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .pic .ic { width: 26px; height: 26px; color: var(--faint); }
.photo-slot .pic input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot .txt b { display: block; }
.photo-slot .txt span { color: var(--muted); font-size: 14px; }

/* ================= chat ================= */
.chat { display: flex; flex-direction: column; height: calc(100vh - 64px); max-width: 860px; margin: 0 auto; }
.chat-head { padding: 22px 24px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.msg { max-width: 82%; }
.msg.me { align-self: flex-end; background: var(--paper); border: 1px solid var(--line); padding: 12px 16px; border-radius: 20px 20px 6px 20px; }
.msg.ai { align-self: flex-start; padding: 2px 4px; }
.msg.ai .body { white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; }
.msg .imgs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.msg .imgs img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.msg .meta { margin-top: 8px; display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: 12.5px; }
.typing { display: inline-flex; gap: 5px; padding: 10px 0; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.composer { padding: 12px 24px 22px; }
.composer-box { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 26px; background: var(--paper);
  border: 1px solid var(--line-strong); box-shadow: 0 6px 24px -12px rgba(0,0,0,.16); }
.composer-box textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; padding: 10px 4px; max-height: 200px; min-height: 44px; line-height: 1.45; }
.composer .attach { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.composer .attach .thumb { width: 64px; }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--banana); color: var(--banana-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.send[disabled] { opacity: .4; }
.send .ic { width: 20px; height: 20px; }
.chat-empty { margin: auto; text-align: center; max-width: 520px; padding: 40px 0; }
.chat-empty h2 { margin-bottom: 10px; }
.chat-empty .row { justify-content: center; margin-top: 18px; }
@media (max-width: 900px) {
  .chat { height: calc(100vh - 58px - 72px - var(--safe-b)); height: calc(100dvh - 58px - 72px - var(--safe-b)); }
  .chat-head, .chat-log, .composer { padding-left: 14px; padding-right: 14px; }
  .msg { max-width: 92%; }
}

/* ================= works ================= */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 600px) { .works { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.work { border-radius: var(--r-tile); background: var(--paper); border: 1px solid var(--line); overflow: hidden; text-decoration: none; display: block; }
.work .pv { aspect-ratio: 4 / 5; background: var(--sunken); position: relative; display: grid; place-items: center; overflow: hidden; }
.work .pv img, .work .pv video { width: 100%; height: 100%; object-fit: cover; }
.work .pv .ic { width: 34px; height: 34px; color: var(--faint); }
.work .info { padding: 12px 14px; }
.work .info b { font-size: 14.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work .info span { font-size: 12.5px; color: var(--muted); }
.progress { width: 70%; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 40%; background: var(--ink); border-radius: 6px; animation: indet 1.6s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.result-media { border-radius: var(--r-panel); overflow: hidden; background: #000; }
.result-media video, .result-media img { width: 100%; max-height: 78vh; object-fit: contain; margin: 0 auto; }
.result-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .result-wrap { grid-template-columns: 1fr; } }
.waiting { text-align: center; padding: 56px 20px; }
.waiting .progress { margin: 22px auto; }
.pre { white-space: pre-wrap; font-size: 14px; background: var(--sunken); border-radius: 16px; padding: 16px; max-height: 420px; overflow: auto; line-height: 1.5; }

/* ================= tariffs ================= */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 22px; border-radius: var(--r-panel); background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.plan .name { font-weight: 700; font-size: 17px; }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .old { color: var(--faint); text-decoration: line-through; font-size: 15px; margin-left: 6px; font-weight: 500; letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.plan li { display: flex; gap: 8px; }
.plan li .ic { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 2px; }
.plan .btn { margin-top: auto; }
.plan.current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.plan.pop { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan.pop ul { color: color-mix(in srgb, var(--paper) 80%, transparent); }
.plan.pop .muted, .plan.pop .price small, .plan.pop .old { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }
.trial {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 26px 28px; border-radius: var(--r-panel);
  background: var(--banana); color: var(--banana-ink); margin-bottom: 18px;
}
.trial h2 { font-size: clamp(22px, 3vw, 30px); }
.trial p { margin-top: 6px; max-width: 58ch; }
.trial .btn { background: var(--banana-ink); color: #fff; border-color: var(--banana-ink); }
@media (max-width: 700px) { .trial { grid-template-columns: 1fr; padding: 22px; } }

/* ================= profile ================= */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
.sub-card .big { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.list { display: flex; flex-direction: column; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.list .li:last-child { border-bottom: 0; }

/* ================= stats / admin ================= */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.stat .k { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.stat .s { font-size: 12.5px; color: var(--faint); margin-top: 4px; }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th { color: var(--muted); font-weight: 600; font-size: 13px; background: var(--sunken); }
table.t tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px; font-weight: 600;
  font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.tabs button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.owner { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--paper); }
.owner .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--faint); flex: none; }
.owner.web .dot { background: var(--green); box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 18%, transparent); }
.owner.paused .dot { background: var(--red); }

/* ================= modal / toast ================= */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 17, 21, .45); display: grid; place-items: center; padding: 16px;
  animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; background: var(--paper); border-radius: 28px; padding: 28px; box-shadow: var(--shadow-pop);
  max-height: calc(100vh - 32px); overflow-y: auto; animation: rise .2s ease-out; position: relative; }
.modal.wide { max-width: 560px; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.modal h2 { margin-bottom: 8px; padding-right: 30px; }
.modal .x { position: absolute; top: 16px; right: 16px; }
@media (max-width: 600px) {
  .overlay { place-items: end center; padding: 0; }
  .modal { border-radius: 26px 26px 0 0; max-width: none; padding: 24px 20px calc(24px + var(--safe-b)); }
}
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 16px; font-size: 14.5px; font-weight: 500;
  box-shadow: var(--shadow-pop); animation: rise .2s ease-out; pointer-events: auto; text-align: center; }
.toast.bad { background: var(--red); color: #fff; }
@media (max-width: 900px) { #toasts { bottom: calc(86px + var(--safe-b)); } }
.tg-box { display: flex; justify-content: center; min-height: 48px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-input { letter-spacing: .4em; font-size: 22px; text-align: center; font-weight: 700; }
.acc { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-strong);
  background: var(--paper); cursor: pointer; text-align: left; width: 100%; }
.acc:hover { border-color: var(--ink); }
.acc + .acc { margin-top: 8px; }

.is-chat .footer { display: none; }

/* ================= главная: первый экран — все функции сразу ================= */
.home { max-width: 1240px; }
.launch { display: flex; flex-direction: column; min-height: calc(100svh - 64px); }
.home-hero { padding: 0 0 20px; text-align: center; }
.home-hero .hello { color: var(--muted); font-weight: 500; font-size: 15px; margin-bottom: 2px; }
.home-hero h1 { font-size: clamp(34px, 4.2vw, 54px); letter-spacing: -0.045em; }
.ask { display: flex; align-items: center; gap: 10px; max-width: 700px; margin: 18px auto 0; padding: 7px 7px 7px 18px;
  border-radius: 999px; background: var(--paper); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px -18px rgba(22,24,29,.35); }
.ask:focus-within { border-color: var(--ink-2); }
.ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; height: 44px; }
.ask-ic .ic { width: 22px; height: 22px; color: var(--muted); }
.ask-hints { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ask-hints .chip, .filters .chip { border: 0; cursor: pointer; height: 32px; padding: 0 14px; font-size: 13.5px; }
.ask-hints .chip:hover, .filters .chip:hover { background: var(--line); }
.filters .chip { height: 36px; padding: 0 16px; font-size: 14px; white-space: nowrap; }

/* сетка функций занимает остаток экрана */
.bento { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 14px; min-height: 420px; max-height: 620px; }
.tile-video { grid-column: span 2; grid-row: span 3; position: relative; overflow: hidden; border-radius: 28px; background: #16181D;
  color: #fff; text-decoration: none; display: grid; grid-template-columns: 1fr 1.05fr; gap: 18px; padding: 26px; isolation: isolate; min-height: 0; }
[data-theme="dark"] .tile-video { background: #1F232B; box-shadow: inset 0 0 0 1px #2A2E37; }
.tile-video h2 { font-size: clamp(30px, 3.4vw, 44px); margin: 14px 0 10px; letter-spacing: -0.04em; color: #fff; }
.tile-video p { color: rgba(255,255,255,.72); font-size: 15px; }
.tv-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.tv-txt .chip.yellow { background: var(--banana); color: var(--banana-ink); }
.tv-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.tv-price { color: rgba(255,255,255,.7); font-size: 14px; font-weight: 600; }
.tv-reels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-content: center; margin: -26px -26px -26px 0;
  padding: 0 26px 0 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent); }
.tv-reels .reel { border-radius: 18px; }
.tv-reels .reel:nth-child(even) { transform: translateY(40px); }
.tv-reels .reel::after { display: none; }
.tile-video:hover .btn.primary { background: #FFCF0F; }

.tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; transition: border-color .15s, box-shadow .15s; min-width: 0; min-height: 0; overflow: hidden; }
.tile:hover { border-color: var(--ink-2); box-shadow: 0 10px 24px -18px rgba(22,24,29,.45); }
.tile .ti, .mode .ti, .mini-link .ti { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--sunken); flex: none; }
.tile .ti .ic, .mode .ti .ic, .mini-link .ti .ic { width: 22px; height: 22px; }
.tile-txt b { display: block; font-size: 16.5px; letter-spacing: -0.01em; }
.tile-txt span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; line-height: 1.35; }
.tile-price { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--ink-2); }
/* у каждой функции свой цвет — легче находить глазами */
.tile[data-tone] .ti { --tone: var(--ink); background: color-mix(in srgb, var(--tone) 13%, var(--paper)); color: var(--tone); }
.tile[data-tone="blue"] .ti { --tone: #2E6BFF; }
.tile[data-tone="green"] .ti { --tone: #12A150; }
.tile[data-tone="purple"] .ti { --tone: #8B5CF6; }
.tile[data-tone="orange"] .ti { --tone: #F2711C; }
.tile[data-tone="pink"] .ti { --tone: #E5486B; }
.tile[data-tone="yellow"] .ti { background: var(--banana); color: var(--banana-ink); }

/* одна согласованная анимация при открытии главной */
@media (prefers-reduced-motion: no-preference) {
  .launch .bento > * { animation: tilein .45s cubic-bezier(.2, .7, .2, 1) both; }
  .launch .bento > :nth-child(2) { animation-delay: .05s; } .launch .bento > :nth-child(3) { animation-delay: .1s; }
  .launch .bento > :nth-child(4) { animation-delay: .15s; } .launch .bento > :nth-child(5) { animation-delay: .2s; }
  .launch .bento > :nth-child(6) { animation-delay: .25s; } .launch .bento > :nth-child(7) { animation-delay: .3s; }
}
@keyframes tilein { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* невысокие экраны ноутбуков */
@media (min-width: 901px) and (max-height: 820px) {
  .home-hero .hello { display: none; }
  .ask-hints { display: none; }
  .home-hero { padding-bottom: 16px; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .tile-txt span { display: none; }
  .tile { padding: 14px; }
}
@media (max-width: 1100px) and (min-width: 601px) {
  .launch { min-height: 0; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(120px, auto); max-height: none; }
  .tile-video { grid-row: auto; min-height: 320px; }
}

/* телефон: «рабочий стол» из плиток — всё влезает в один экран */
@media (max-width: 600px) {
  .launch { min-height: calc(100svh - 58px - 72px - var(--safe-b) - 18px); }
  .home-hero { padding: 4px 0 14px; }
  .home-hero .hello { display: none; }
  .home-hero h1 { font-size: 32px; }
  .ask { margin-top: 12px; padding-left: 14px; }
  .ask input { font-size: 16px; height: 40px; }
  .ask .send { width: 40px; height: 40px; }
  .ask-hints { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; gap: 10px;
    min-height: 0; max-height: none; flex: none; }
  .tile-video { grid-row: auto; grid-template-columns: minmax(0, 1fr) 128px; gap: 8px; padding: 18px; border-radius: 24px; min-height: 0; }
  .tile-video h2 { font-size: 30px; margin: 10px 0 0; }
  .tile-video p { display: none; }
  .tv-cta { padding-top: 12px; gap: 10px; }
  .tv-cta .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
  .tv-price { font-size: 13px; }
  .tv-reels { display: block; position: relative; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; overflow: visible; }
  .tv-reels .reel { position: absolute; width: 62px; top: 50%; border-radius: 12px; box-shadow: 0 8px 20px -6px rgba(0,0,0,.6); }
  .tv-reels .reel:nth-child(1) { left: 0; transform: translateY(-50%) rotate(-9deg); }
  .tv-reels .reel:nth-child(2) { left: 33px; transform: translateY(-58%); z-index: 2; width: 66px; }
  .tv-reels .reel:nth-child(3) { left: 68px; transform: translateY(-50%) rotate(9deg); }
  .tv-reels .reel:nth-child(4) { display: none; }
  .tile { display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 1px;
    align-items: center; padding: 12px; border-radius: 18px; }
  .tile .ti { width: 38px; height: 38px; border-radius: 12px; grid-row: span 2; }
  .tile .ti .ic { width: 20px; height: 20px; }
  .tile-txt { min-width: 0; align-self: end; }
  .tile-txt b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile-txt span { display: none; }
  .tile-price { margin: 0; align-self: start; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.home .trial { margin-top: 18px; margin-bottom: 0; }
.home-sec { margin-top: 48px; }
.home-sec > h2 { margin-bottom: 16px; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .steps3 { grid-template-columns: 1fr; } }

/* ================= ленты трендов ================= */
.rib { margin-top: 40px; }
.rib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rib-head p { margin-top: 4px; }
.rib-btn[disabled] { opacity: .3; pointer-events: none; }
.rib-track { display: grid; grid-auto-flow: column; grid-auto-columns: 196px; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -32px; padding: 0 32px 4px; scroll-padding: 0 32px; }
.rib-track::-webkit-scrollbar { display: none; }
.rib-track > .reel { scroll-snap-align: start; }
@media (max-width: 900px) {
  .rib { margin-top: 30px; }
  .rib-btn { display: none; }
  .rib-track { grid-auto-columns: 40vw; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; }
}
@media (max-width: 380px) { .rib-track { grid-auto-columns: 44vw; } }

/* ================= раздел «Видео» ================= */
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mode { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; min-width: 0; }
.mode:hover { border-color: var(--ink-2); }
.mode b { display: block; font-size: 15.5px; }
.mode span span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.mode:first-child .ti { background: var(--banana); color: var(--banana-ink); }
@media (max-width: 1100px) { .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .modes { grid-template-columns: 1fr; gap: 8px; } .mode { padding: 12px 14px; } }

/* ================= картинки ================= */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > aside { position: sticky; top: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split > aside { position: static; } }
.hype h3 { margin: 12px 0 6px; }
.mini-link { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 8px 0; }
.mini-link b { display: block; font-size: 15px; }
.mini-link span span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.mini-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.lbl-s { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.hype-strip { display: none; }
@media (max-width: 900px) {
  .hype-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
  .hype-strip .chip { text-decoration: none; height: 32px; }
  .hype-btns { display: none; }
}
@media (max-width: 600px) {
  .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; border-radius: 16px; }
  .seg button { padding: 8px 6px; border-radius: 12px; font-size: 13px; line-height: 1.25; }
}
@media (max-width: 600px) {
  .owner { flex-wrap: wrap; }
  .owner .grow { flex-basis: calc(100% - 30px); }
  .owner .btn { width: 100%; }
  .page-head h1 { font-size: 30px; }
}

.choice .ic { width: 20px; height: 20px; flex: none; }
.summary .line .v { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) and (min-width: 601px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); }
  .tile-video { grid-column: span 3; min-height: 230px; max-height: 260px; }
}
@media (max-width: 600px) and (max-height: 700px) {
  .home-hero { padding: 0 0 10px; }
  .home-hero h1 { font-size: 26px; }
  .ask { margin-top: 8px; }
  .tile-video { padding: 14px 16px; }
  .tile-video h2 { font-size: 26px; margin-top: 6px; }
  .tv-cta { padding-top: 8px; }
  .bento { gap: 8px; }
  .tile { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .launch { min-height: 0; }
  .tile-txt b { white-space: normal; font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .home .rib { margin-top: 22px; }
}

/* ================= вход через Telegram ================= */
.login { text-align: left; }
.login-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #2AABEE; color: #fff; margin-bottom: 14px; }
.login-ic .ic { width: 28px; height: 28px; }
.login h2 { margin-bottom: 6px; }
.login-steps { margin: 16px 0 18px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.login-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.login-steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--sunken);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; }
#tgo[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.login-wait { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--banana-soft); font-size: 14px; font-weight: 500; }
.login-wait[hidden], .login-qr[hidden] { display: none; }
.spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-qr { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 16px; }
.login-qr .qr { flex: none; width: 132px; height: 132px; border-radius: 10px; overflow: hidden; background: #fff; }
.login-qr .qr svg { width: 100%; height: 100%; display: block; }
.login-qr p { margin-top: 4px; }
.login-help { margin-top: 16px; font-size: 14px; }
.login-help summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 6px 0; min-height: 32px; }
.login-help ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font: inherit; }

/* ================= поддержка ================= */
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.nav a .grow { flex: 1; }
.helpbtn { position: relative; }
.dot-badge { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--canvas); }
.support .chat-head p { margin-top: 4px; max-width: 60ch; }
.msg .who { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.msg .who .ic { width: 15px; height: 15px; }
.msg.ai.admin { background: color-mix(in srgb, var(--blue) 8%, var(--paper)); border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
  padding: 12px 16px; border-radius: 20px 20px 20px 6px; }
.msg.ai.admin .who { color: var(--blue); }
.msg .body a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.msg.sys { align-self: center; max-width: 92%; text-align: center; font-size: 13.5px; color: var(--muted); background: var(--sunken);
  padding: 8px 14px; border-radius: 14px; }
.msg.me .body { white-space: pre-wrap; word-wrap: break-word; }
.msg .imgs img { cursor: zoom-in; }
.helpful { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.helpful .chip, .quick .chip { border: 0; cursor: pointer; min-height: 36px; height: auto; padding: 6px 14px; font-size: 14px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: auto; padding-top: 6px; }
.contact-ask { margin-bottom: 10px; padding: 12px 14px; border-radius: 16px; background: var(--banana-soft); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sup-admin { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
.sup-list { padding: 14px; max-height: 76vh; overflow-y: auto; display: grid; gap: 6px; }
.sup-item { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; text-decoration: none; border: 1px solid transparent; }
.sup-item:hover { background: var(--sunken); }
.sup-item.on { border-color: var(--line-strong); background: var(--sunken); }
.sup-msgs { max-height: 52vh; overflow-y: auto; display: grid; gap: 10px; padding-right: 4px; }
.sup-m { padding: 10px 14px; border-radius: 14px; background: var(--sunken); }
.sup-m.user { background: var(--paper); border: 1px solid var(--line); }
.sup-m.admin { background: color-mix(in srgb, var(--blue) 9%, var(--paper)); }
.sup-m.system { background: transparent; border: 1px dashed var(--line); }
.sup-m .body { white-space: pre-wrap; word-wrap: break-word; margin-top: 4px; font-size: 15px; }
@media (max-width: 900px) {
  .sup-admin { grid-template-columns: 1fr; }
  .sup-list { max-height: 40vh; }
  .support .chat-head { padding-top: 14px; }
  .support .chat-head h2 { font-size: 22px; }
}
.support .chat-empty { padding: 12px 0 0; }
@media (max-width: 900px) {
  .support .chat-head { flex-wrap: nowrap; align-items: flex-start; }
  .support .chat-head p { font-size: 13.5px; }
  .support #human { flex: none; }
  .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick .chip { justify-content: center; text-align: center; white-space: normal; line-height: 1.25; padding: 8px 10px; min-height: 44px; }
}
.sm-only { display: none; }
@media (max-width: 900px) { .sm-only { display: inline; } .lg-only { display: none; } }

/* ================= пальцы: крупные цели нажатия на телефонах ================= */
@media (pointer: coarse) {
  button.chip, a.chip, .seg button, .filters .chip { min-height: 40px; }
  .back { min-height: 40px; padding-right: 8px; }
  .faq summary { padding: 6px 0; min-height: 40px; align-items: center; }
  .tabbar a { font-size: 12px; min-height: 52px; }
  .footer a, .link-pad { display: inline-block; padding: 6px 0; }
}
.kv dd .kv-val { overflow-wrap: anywhere; }
.panel-title .chip { white-space: nowrap; }
@media (max-width: 600px) {
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { font-size: 13.5px; margin-top: 10px; }
  .kv dd { justify-content: space-between; text-align: left; }
  .kv dd .btn.sm { margin-right: -10px; }
  .panel-title { flex-wrap: wrap; }
}
.sup-item .faint, .sup-m .faint { color: var(--muted); }
