:root {
  --bg: #050f22; --bg2: #071a3a;
  --card: rgba(18, 42, 84, .55); --card-hi: rgba(26, 60, 116, .6);
  --line: rgba(110, 170, 255, .16); --line-hi: rgba(90, 200, 255, .45);
  --text: #eef5ff; --muted: #93a9cc; --dim: #5f7598;
  --cyan: #38d4ff; --blue: #2f7bff; --grad: linear-gradient(135deg, #3fe0ff 0%, #2f7bff 100%);
  --ok: #3ee8b5; --soon: #8fa6d6; --new: #ffcf5a;
  --r: 22px; --nav-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: #050f22; overscroll-behavior: none; }
body {
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text);
  background: transparent;
  min-height: 100vh; overflow-x: hidden; overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 80% -10%, #0d3a7a 0%, transparent 60%), radial-gradient(90% 50% at -10% 30%, #0a2a5c 0%, transparent 60%), linear-gradient(180deg, #071a3a, #050f22 40%); }
main { padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 28px); max-width: 720px; margin: 0 auto; }

/* header */
.top { position: sticky; top: 0; max-width: none; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; max-width: 720px; margin: 0 auto;
  background: #061226; border-bottom: 1px solid rgba(110,170,255,.10); transform: translateZ(0); will-change: transform; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; font-size: 18px; }
.brand span { color: #fff; font-size: 21px; letter-spacing: .2px; }
.brand img { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 1px var(--line-hi), 0 6px 20px rgba(47,123,255,.35); }
.balance { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10,30,62,.7); font-size: 13px; color: var(--muted); }
.balance b { color: var(--text); font-size: 15px; }
.dot { width: 8px; height: 8px; transform: rotate(45deg); background: var(--cyan); border-radius: 2px; box-shadow: 0 0 10px var(--cyan); }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--line-hi); margin-top: 6px;
  background: linear-gradient(180deg, #0b3a8a, #041637 70%); box-shadow: 0 20px 60px rgba(0,40,120,.35); }
.hero-crab { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 300px; object-fit: cover; object-position: 50% 40%;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 60%, transparent 100%); }
@keyframes bob { 50% { transform: translateY(-6px); } }
.hero-text { position: relative; z-index: 2; padding: 16px 20px 20px; display: flex; flex-direction: column; }
.pill { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-hi); background: rgba(5,20,50,.75); }
.hero h1 { font-size: 32px; line-height: 1.05; margin: 214px 0 10px; font-weight: 800; letter-spacing: -.5px; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.hero p { margin: 0 0 18px; color: #c9dbf5; font-size: 14px; line-height: 1.45; }
@media (min-width: 560px) {
  .hero-crab { left: auto; right: -6%; width: 62%; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
  .hero h1 { margin-top: 40px; font-size: 40px; } .hero p { max-width: 50%; } .hero-text { min-height: 400px; }
}
.cta { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 20px; width: min(100%, 300px);
  background: linear-gradient(135deg, #ffffff, #d9f5ff); color: #06224d; box-shadow: 0 10px 30px rgba(56,212,255,.35); }
.cta-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; }
.cta-ico svg { fill: #fff; stroke: none; }
.cta-txt { display: flex; flex-direction: column; text-align: left; flex: 1; }
.cta-txt b { font-size: 16px; } .cta-txt small { color: #4b6a92; font-size: 12px; }
.cta-arr { font-size: 20px; }

/* section headings */
.eyebrow { display: block; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 28px; }
h2 { margin: 4px 0 14px; font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.block-head { display: flex; align-items: end; justify-content: space-between; }
.block-head a { color: var(--cyan); text-decoration: none; font-size: 14px; margin-bottom: 16px; }

/* mode cards */
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode { position: relative; text-align: left; min-height: 150px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.mode:active { transform: scale(.97); }
.mode::after { content: ""; position: absolute; width: 120px; height: 120px; right: -40px; top: -40px; border-radius: 50%; background: radial-gradient(circle, var(--glow, rgba(47,123,255,.45)), transparent 70%); }
.mode .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(120,170,255,.12); border: 1px solid var(--line); color: var(--cyan); }
.mode h4 { margin: auto 0 4px; font-size: 16px; font-weight: 700; }
/* the photo section (28.10, Mikhail: variant A): the example fills the card, the text sits on a dark fade at the bottom */
.modes.with-pv .mode { min-height: 200px; padding: 12px; background: #000; justify-content: flex-end; }
.modes.with-pv .mode::after { display: none; }
.modes.with-pv .mode::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(3,10,25,0) 25%, rgba(3,10,25,.78) 58%, rgba(3,10,25,.96) 100%); }
.modes.with-pv .mode-pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.modes.with-pv .mode .ico { position: absolute; z-index: 2; top: 10px; left: 10px; width: 34px; height: 34px; border-radius: 11px; background: rgba(5,15,34,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-color: rgba(255,255,255,.18); color: #fff; }
.modes.with-pv .mode .ico svg { width: 18px; height: 18px; }
.modes.with-pv .mode h4, .modes.with-pv .mode p { position: relative; z-index: 2; }
.modes.with-pv .mode h4 { margin: 0 0 3px; font-size: 15.5px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.modes.with-pv .mode p { color: #d3e0f5; font-size: 12px; }
.modes.with-pv .status { z-index: 3; top: 12px; right: 12px; left: auto; }
.modes .mode.wide { grid-column: 1 / -1; } /* 3.11: «AI-монтаж» — a long button across the row, no preview */
.modes.with-pv .mode.wide { grid-column: 1 / -1; min-height: 0; aspect-ratio: 780 / 500; } /* «Прокачать фото» — across the whole row: the original → six results */
.modes.with-pv .mode.wide::before { background: linear-gradient(180deg, rgba(3,10,25,0) 58%, rgba(3,10,25,.92) 100%); }
.modes.with-pv .mode.wide .mode-pv { object-position: 50% 50%; }
.modes.with-pv .mode.wide .ico { display: none; }
.mode p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.status { position: absolute; z-index: 1; top: 12px; right: 12px; font-size: 9.5px; font-weight: 800; letter-spacing: 1px; padding: 5px 8px; border-radius: 999px; text-transform: uppercase; }
.status.work { color: var(--ok); background: rgba(62,232,181,.12); }
.status.test { color: #ffd479; background: rgba(255,212,121,.12); }
.status.soon { color: var(--soon); background: rgba(143,166,214,.12); }
.status.new { color: #2a1a00; background: var(--new); right: auto; left: 64px; top: 22px; }

/* templates */
.tpl-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
.tpl-row::-webkit-scrollbar { display: none; }
.tpl { flex: 0 0 62%; max-width: 240px; scroll-snap-align: start; aspect-ratio: 9/14; border-radius: var(--r); position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.12); text-align: left; padding: 14px; display: flex; flex-direction: column;
  background: radial-gradient(60% 40% at 70% 25%, hsla(var(--h), 90%, 65%, .9), transparent 70%), linear-gradient(160deg, hsl(var(--h), 70%, 32%), #050f22 85%); }
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tpl-grid .tpl { max-width: none; }
.tpl .num { font-weight: 800; color: rgba(255,255,255,.55); font-size: 14px; }
.tpl .play { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); }
.tpl .play svg { fill: #fff; stroke: none; width: 20px; }
.tpl .meta { margin-top: auto; font-size: 12px; color: #dbe8ff; }
.tpl h4 { margin: 4px 0 2px; font-size: 17px; }
.tpl p { margin: 0; font-size: 12px; color: #b8c9e6; }
.tpl .soon-tag { position: absolute; top: 12px; right: 12px; font-size: 9.5px; font-weight: 800; letter-spacing: 1px; padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,.35); color: #cfe0ff; }
.chips { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; white-space: nowrap; }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }

/* compact template strip under each section */
.mini-head { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 8px; }
.mini-head span { font-size: 13px; font-weight: 700; color: var(--muted); }
.mini-head a { font-size: 13px; color: var(--cyan); text-decoration: none; }
.mini-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
.mini-row::-webkit-scrollbar { display: none; }
.mini { flex: 0 0 104px; aspect-ratio: 9/14; scroll-snap-align: start; position: relative; overflow: hidden; border-radius: 16px; padding: 9px; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid rgba(255,255,255,.10);
  background: radial-gradient(70% 45% at 70% 25%, hsla(var(--h), 90%, 65%, .75), transparent 70%), linear-gradient(165deg, hsl(var(--h), 65%, 30%), #061430 85%); }
.mini:active { transform: scale(.97); }
.mini b { font-size: 12.5px; line-height: 1.2; font-weight: 700; }
.mini small { font-size: 10.5px; color: #b8c9e6; margin-top: 2px; }
.mini-play { position: absolute; top: 36%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.28); display: grid; place-items: center; }
.mini-play svg { width: 13px; height: 13px; fill: #fff; stroke: none; }
.mini-soon { position: absolute; top: 7px; right: 7px; font-size: 8.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; padding: 3px 6px; border-radius: 999px; background: rgba(0,0,0,.35); color: #cfe0ff; }
@media (min-width: 560px) { .mini { flex-basis: 128px; } }

/* generic */
.card { border-radius: var(--r); border: 1px solid var(--line); background: var(--card); padding: 16px; }
.btn { padding: 13px 18px; border-radius: 16px; background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(47,123,255,.35); }
.btn.ghost { background: transparent; border: 1px solid var(--line-hi); box-shadow: none; }
.btn:disabled { opacity: .5; }
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line-hi); border-radius: var(--r); }
.empty img { width: 84px; height: 84px; border-radius: 26px; object-fit: cover; }
.empty h3 { margin: 14px 0 4px; } .empty p { color: var(--muted); margin: 0 0 18px; }
.sub-h { font-size: 15px; margin: 24px 0 10px; color: var(--muted); font-weight: 600; }

/* profile */
.wallet { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, rgba(47,123,255,.35), rgba(56,212,255,.12)); border-color: var(--line-hi); }
.wallet small { color: var(--muted); } .wallet .big b { font-size: 36px; font-weight: 800; } .wallet .big span { color: var(--muted); }
.wallet img { width: 64px; height: 64px; border-radius: 20px; object-fit: cover; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack { border-radius: 18px; border: 1px solid var(--line); background: var(--card); padding: 14px 8px; text-align: center; }
.pack .s { font-size: 20px; font-weight: 800; } .pack .t { color: var(--muted); font-size: 12px; margin-top: 4px; }
.pack.best { border-color: var(--line-hi); background: var(--card-hi); }
.history { display: flex; flex-direction: column; gap: 8px; }
.h-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(18,42,84,.35); border: 1px solid var(--line); font-size: 14px; }
.h-item small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.h-item .d { font-weight: 700; } .h-item .d.plus { color: var(--ok); } .h-item .d.minus { color: #ff8a8a; }
.h-empty { color: var(--dim); font-size: 14px; }
.admin label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.admin input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5,15,34,.6); color: var(--text); font: inherit; font-size: 16px; }
.admin input:focus { outline: none; border-color: var(--cyan); }
.adm-list { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 12px; max-height: 220px; overflow: auto; }
.adm-user { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: rgba(18,42,84,.5); font-size: 14px; text-align: left; }
.adm-user.sel { outline: 1px solid var(--cyan); }
.adm-user span { color: var(--muted); }
.adm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-msg { margin-top: 10px; font-size: 14px; min-height: 18px; color: var(--ok); }
.adm-msg.err { color: #ff8a8a; }

/* bottom nav */
.tabs { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); max-width: 696px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 7px;
  border-radius: 26px; border: 1px solid var(--line); background: rgba(8,24,52,.97); transform: translateZ(0); box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; color: var(--muted); border-radius: 20px; }
.tabs button.on { color: var(--cyan); background: rgba(56,212,255,.12); }
.tabs button.on svg { fill: rgba(56,212,255,.25); }

/* sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0,5,15,.72); }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-width: 720px; margin: 0 auto; max-height: 86vh; overflow: auto; padding: 10px 20px calc(24px + var(--safe-b));
  border-radius: 28px 28px 0 0; border: 1px solid var(--line-hi); border-bottom: 0; background: linear-gradient(180deg, #0c2550, #061430); animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.2); margin: 0 auto 16px; }
.sh-head { display: flex; gap: 14px; align-items: center; }
.sh-head .ico { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.sh-head h3 { margin: 0; font-size: 22px; } .sh-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sh-about { color: #c9dbf5; line-height: 1.5; font-size: 15px; margin: 18px 0; }
.sh-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.sh-steps div { border: 1px dashed var(--line-hi); border-radius: 16px; padding: 12px 8px; text-align: center; font-size: 12px; color: var(--muted); }
.sh-steps b { display: block; color: var(--text); font-size: 18px; margin-bottom: 4px; }
.sh-soon { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: rgba(56,212,255,.08); border: 1px solid var(--line-hi); font-size: 14px; color: #cfe6ff; }
.sh-soon img { width: 44px; height: 44px; border-radius: 14px; }
.sheet .btn { width: 100%; margin-top: 14px; }

/* «Оживить фото» */
.status.inline { position: static; display: inline-block; vertical-align: middle; margin-left: 6px; }
.an-pick { display: block; margin: 18px auto 0; width: min(62%, 240px); aspect-ratio: 9/16; border-radius: 20px; border: 1.5px dashed var(--line-hi); overflow: hidden; background: rgba(5,15,34,.5); cursor: pointer; position: relative; }
.an-pick.wide { width: 100%; aspect-ratio: 16/9; }
.an-pick canvas { width: 100%; height: 100%; display: block; }
.an-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 14px; color: var(--muted); }
.an-empty svg { width: 34px; height: 34px; color: var(--cyan); }
.an-empty b { color: var(--text); font-size: 15px; } .an-empty small { font-size: 12px; line-height: 1.35; }
.an-change { position: absolute; right: 8px; bottom: 8px; font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; }
.an-label { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.an-label span { font-weight: 400; color: var(--dim); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: rgba(5,15,34,.55); border: 1px solid var(--line); }
.seg button { padding: 10px 6px; border-radius: 12px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--grad); color: #fff; font-weight: 700; }
.an-models { display: flex; flex-direction: column; gap: 8px; }
.an-model { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.an-model.on { border-color: var(--cyan); background: var(--card-hi); box-shadow: 0 0 0 1px var(--cyan) inset; }
.an-dot { flex: 0 0 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-hi); }
.an-model.on .an-dot { border-color: var(--cyan); background: radial-gradient(circle, var(--cyan) 45%, transparent 50%); }
.an-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.an-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .an-top b { font-size: 16px; }
.an-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; color: var(--ok); background: rgba(62,232,181,.12); }
.an-tag.warn { color: #ffd479; background: rgba(255,212,121,.12); }
.an-body small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.an-price { font-size: 12px; color: var(--cyan); font-weight: 600; margin-top: 2px; }
.sheet textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5,15,34,.6); color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
.sheet textarea:focus { outline: none; border-color: var(--cyan); }
.an-note { font-size: 12px; color: var(--dim); text-align: center; margin: 10px 0 0; line-height: 1.4; }

/* templates tab */
.src-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.src-tabs::-webkit-scrollbar { display: none; }
.src-tabs button { flex: 0 0 auto; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5,15,34,.55); color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.src-tabs button.on { background: var(--grad); color: #fff; border-color: transparent; }
.src-tabs i, .chip i { font-style: normal; font-size: 11px; opacity: .75; margin-left: 2px; }
.src-tabs i.soon { font-size: 9.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: rgba(143,166,214,.18); }
.chips { margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.tc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 360px) { .tc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 560px) { .tc-grid { grid-template-columns: repeat(4, 1fr); } }
.tcard { position: relative; aspect-ratio: 3/4; border-radius: 16px; padding: 9px; text-align: left; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid rgba(255,255,255,.10);
  background: radial-gradient(80% 50% at 70% 25%, hsla(var(--h), 90%, 62%, .7), transparent 70%), linear-gradient(165deg, hsl(var(--h), 60%, 30%), #061430 88%); }
.tcard:active, .tmini:active { transform: scale(.97); }
.tc-ico { position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%); font-size: 34px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.tcard b { font-size: 12.5px; line-height: 1.2; font-weight: 700; }
.tcard small { font-size: 10.5px; color: #b8c9e6; margin-top: 3px; }
.tc-new, .mini-soon.new { position: absolute; top: 7px; left: 7px; right: auto; font-size: 8.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; padding: 3px 6px; border-radius: 999px; background: var(--new); color: #2a1a00; }
.tmini-ico { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-size: 30px; }
.tc-empty { grid-column: 1 / -1; }
.tc-sh-ico { background: linear-gradient(160deg, hsl(var(--h), 70%, 45%), hsl(var(--h), 70%, 28%)) !important; font-size: 26px; }
.tp-slots { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }
.tp-slots .an-pick { margin: 0 auto; }
.tp-slots.multi { grid-template-columns: repeat(3, 1fr); }
.tp-slots.multi .an-pick { width: 100%; }
.tp-slots.multi .an-empty small { display: none; }
.tp-slots.multi .an-empty b { font-size: 12px; }
.tp-slots.wide.multi { grid-template-columns: 1fr; }
.tp-slots.wide .an-pick { width: 100%; aspect-ratio: 16/9; }

/* projects */
#projects { display: flex; flex-direction: column; gap: 12px; }
.job { display: flex; gap: 14px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); align-items: flex-start; }
.job video, .job-wait { flex: 0 0 116px; width: 116px; aspect-ratio: 9/16; border-radius: 14px; background: #000; object-fit: cover; }
.job video.wide, .job-wait.wide { flex-basis: 150px; width: 150px; aspect-ratio: 16/9; }
.job-wait { display: grid; place-items: center; background: rgba(5,15,34,.6); border: 1px dashed var(--line-hi); font-size: 26px; }
.job-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.job-info b { font-size: 15px; }
.job-st { font-size: 13px; font-weight: 700; color: var(--cyan); }
.job.done .job-st { color: var(--ok); } .job.failed .job-st { color: #ff8a8a; }
.job-info small { color: var(--muted); font-size: 12.5px; line-height: 1.35; } .job-info .job-date { color: var(--dim); }
.job-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.small { padding: 8px 14px; font-size: 13px; align-self: flex-start; border-radius: 12px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(56,212,255,.2); border-top-color: var(--cyan); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--nav-h) + 26px + var(--safe-b)); transform: translateX(-50%); padding: 12px 18px; border-radius: 14px; background: #0f2c5c; border: 1px solid var(--line-hi); font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 90vw; }
a.balance, a.btn { text-decoration: none; color: inherit; display: inline-flex; }
a.btn { color: #fff; }

/* «Свободный монтаж» */
.mt-big { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; padding: 18px; border-radius: 22px; margin-top: 6px;
  border: 1px solid var(--line-hi); background: linear-gradient(160deg, rgba(56,212,255,.28), rgba(10,30,62,.75) 70%); }
.mt-big b { font-size: 18px; } .mt-big span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.mt-scen { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-scen span { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--dim); font-size: 13px; }
.mt-scen i { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--soon); margin-left: 4px; }
.mt-crab { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 12px; }
.mt-crab img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; flex: none; }
.mt-crab p, .mt-crab > div { margin: 0; padding: 12px 14px; border-radius: 4px 18px 18px 18px; background: var(--card-hi); border: 1px solid var(--line); font-size: 14px; line-height: 1.45; flex: 1; }
.mt-crab > div p { padding: 0; border: 0; background: none; margin-top: 4px; }
.mt-add { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mt-files { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; max-height: 240px; overflow-y: auto; }
.mt-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.mt-file b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mt-file small { color: var(--dim); } .mt-file button { width: 32px; height: 32px; border-radius: 10px; color: var(--muted); }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; } .mt-chips .chip { min-height: 38px; }
.mt-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 6px; }
.mt-wait img { width: 96px; height: 96px; border-radius: 28px; object-fit: cover; box-shadow: 0 12px 40px rgba(47,123,255,.4); }
.mt-wait img.bob { animation: bob 2.4s ease-in-out infinite; }
.mt-wait b { font-size: 18px; } .mt-wait span { font-size: 13px; color: var(--muted); }
.mt-x { font-size: 40px; }
.mt-bar { width: 100%; height: 8px; border-radius: 8px; background: rgba(110,170,255,.15); overflow: hidden; }
.mt-bar i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
.mt-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-facts span { padding: 6px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mt-warn { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4; }
.mt-warn div { padding: 8px 10px; border-radius: 12px; background: rgba(255,207,90,.08); border: 1px solid rgba(255,207,90,.3); }
.mt-shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mt-shot { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 0; }
.mt-shot img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.mt-shot small { font-size: 10px; color: var(--muted); text-align: center; }
.mt-shot.off img { opacity: .25; } .mt-shot.off::after { content: "убран"; position: absolute; top: 40%; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 700; }
.mt-text { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5,15,34,.55); color: var(--text); font: inherit; font-size: 14px; margin-top: 6px; }
.mt-tmeta { display: block; font-size: 11px; color: var(--dim); margin: 3px 0 0 4px; }
.sh-body .btn + .btn, #sheetBody .btn + .btn { margin-top: 8px; }
.job-btns.rate .btn.on { background: var(--grad); color: #fff; border-color: transparent; }

/* free montage v2 (mockup look) */
.sheet.tall { max-height: 94vh; padding-bottom: 0; }
.mt-top { display: flex; align-items: center; gap: 10px; padding: 4px 0 8px; }
.mt-back { width: 44px; height: 44px; flex: none; border-radius: 14px; border: 1px solid var(--line); background: rgba(10,30,62,.7); display: grid; place-items: center; }
.mt-back svg { width: 20px; height: 20px; }
.mt-tt { display: flex; flex-direction: column; min-width: 0; }
.mt-tt span { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--cyan); }
.mt-tt b { font-size: 17px; }
.mt-dots { display: flex; gap: 6px; margin: 0 0 12px; }
.mt-dots i { flex: 1; height: 4px; border-radius: 4px; background: rgba(110,170,255,.18); }
.mt-dots i.on { background: var(--cyan); }
.mt-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }
.mt-foot { position: sticky; bottom: 0; margin: 0 -20px; padding: 12px 20px calc(16px + var(--safe-b)); background: #061226; border-top: 1px solid rgba(110,170,255,.12); display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.mt-foot .btn { margin-top: 0 !important; min-height: 52px; font-size: 16px; }
.mt-note { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.4; }
.mt-h { margin: 0; font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.4px; }
.mt-lead { margin: -4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.mt-scen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mt-sc { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; min-height: 128px; padding: 14px; border-radius: 20px;
  border: 1px solid rgba(110,170,255,.14); background: linear-gradient(160deg, hsla(var(--h),70%,45%,.14), rgba(10,30,62,.7) 70%); }
.mt-sc.ok { border-color: var(--line-hi); background: linear-gradient(160deg, hsla(var(--h),70%,45%,.5), rgba(10,30,62,.7) 70%); }
.mt-sc.wide { grid-column: span 2; min-height: 118px; padding-right: 80px; }
.mt-sc:disabled { cursor: default; }
.mt-sc b { font-size: 15px; line-height: 1.2; } .mt-sc small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.mt-sc-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: hsla(var(--h),75%,50%,.35); }
.mt-sc.ok .mt-sc-ico { background: hsla(var(--h),75%,50%,.85); }
.mt-badge { position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(143,166,214,.16); color: #a9bce0; }
.mt-badge.ok { background: rgba(62,232,181,.18); color: var(--ok); }
.mt-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.mt-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--cyan); }
.mt-eyebrow.warn { color: var(--new); } .mt-eyebrow i { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--dim); }
.mt-tip { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.mt-tip svg, .mt-good svg { width: 18px; height: 18px; flex: none; stroke: var(--ok); stroke-width: 2.4; margin-top: 1px; }
.mt-small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.mt-kit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mt-kit div { aspect-ratio: 9 / 14; border-radius: 14px; display: flex; align-items: flex-end; padding: 6px; background: linear-gradient(160deg, hsl(var(--h),55%,42%), hsl(calc(var(--h) + 30),50%,18%)); }
.mt-kit span { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; background: rgba(5,15,34,.7); }
.mt-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px; border-radius: 22px; border: 1.5px dashed var(--line-hi); background: rgba(10,30,62,.5); cursor: pointer; text-align: center; }
.mt-drop b { font-size: 16px; } .mt-drop small { font-size: 12px; color: var(--muted); }
.mt-plus { width: 48px; height: 48px; padding: 12px; border-radius: 16px; background: var(--grad); stroke: #fff; stroke-width: 2.4; box-sizing: border-box; }
.mt-sum { font-size: 13px; color: var(--muted); } .mt-sum b { color: var(--text); }
.mt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mt-th { position: relative; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, #1d4f8a, #0b1f3f); }
.mt-th img, .mt-th video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.mt-th span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 5px; background: rgba(5,15,34,.75); }
.mt-th button { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; border-radius: 10px; background: rgba(5,15,34,.7); font-size: 12px; }
.mt-good, .mt-bad { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.mt-good { background: rgba(62,232,181,.1); border: 1px solid rgba(62,232,181,.35); }
.mt-bad { background: rgba(255,207,90,.08); border: 1px solid rgba(255,207,90,.3); }
.mt-bad svg { width: 18px; height: 18px; flex: none; stroke: var(--new); margin-top: 1px; }
.mt-q { font-size: 15px; font-weight: 700; }
.mt-gt { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; } .mt-gt i { font-style: normal; font-weight: 400; color: var(--dim); }
.mt-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid rgba(110,170,255,.22); background: rgba(10,30,62,.7); color: #c9dbf5; }
.mt-chip.on { border-color: var(--cyan); background: rgba(56,212,255,.18); color: var(--text); }
.mt-wait img.big { width: 120px; height: 120px; border-radius: 32px; }
.mt-stages { gap: 12px; }
.mt-stages div { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #7d93b8; }
.mt-stages i { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 1.5px solid var(--dim); }
.mt-stages .done { color: var(--text); } .mt-stages .done i { background: var(--ok); border-color: var(--ok); }
.mt-stages .now { color: var(--text); font-weight: 700; } .mt-stages .now i { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.mt-crab small { color: var(--muted); font-size: 12px; }
.mt-row-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .mt-row-h small { font-size: 12px; color: var(--muted); text-align: right; }
.mt-mom { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.mt-mom.off { opacity: .45; }
.mt-mom img { width: 40px; height: 64px; flex: none; border-radius: 9px; object-fit: cover; background: linear-gradient(160deg, #1d4f8a, #0b1f3f); }
.mt-mom > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mt-mom b { font-size: 14px; font-weight: 600; line-height: 1.3; } .mt-mom small { font-size: 12px; color: var(--muted); }
.mt-ck { width: 44px; height: 44px; flex: none; display: grid; place-items: center; margin: -8px -4px -8px -6px; }
.mt-ck::before { content: ""; position: absolute; }
.mt-ck { position: relative; }
.mt-ck svg { width: 26px; height: 26px; padding: 5px; box-sizing: border-box; border-radius: 8px; background: var(--cyan); stroke: #061226; stroke-width: 3.4; }
.mt-ck:not(.on)::after { content: ""; width: 26px; height: 26px; box-sizing: border-box; border-radius: 8px; border: 1.5px solid var(--dim); }
.mt-wish { margin: 0; font-size: 14px; line-height: 1.45; } .mt-wish i { color: var(--dim); }
.mt-plan { display: flex; flex-direction: column; gap: 6px; }
.mt-plan > div { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.mt-plan i { font-style: normal; width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(56,212,255,.15); color: var(--cyan); }
.mt-plan b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; } .mt-plan small { font-size: 12px; color: var(--muted); }
.mt-tx { gap: 2px; padding: 10px 14px; } .mt-tx small { font-size: 12px; color: var(--muted); }
/* «Своя музыка» */
.mt-song { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1.5px dashed var(--line-hi); background: rgba(10,30,62,.5); cursor: pointer; }
.mt-song.on { border-style: solid; cursor: default; }
.mt-song-i { font-size: 24px; flex: none; }
.mt-song-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mt-song-t b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-song-t small { font-size: 12px; color: var(--muted); }
.mt-song button { width: 36px; height: 36px; border-radius: 10px; background: rgba(5,15,34,.7); font-size: 13px; flex: none; }

/* «Кинорежиссёр»: storyboard */
.fm-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-fr { display: flex; flex-direction: column; gap: 6px; }
.fm-fr img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; background: linear-gradient(160deg, #1d4f8a, #0b1f3f); }
.fm-fr b { font-size: 12px; line-height: 1.35; font-weight: 600; color: var(--text); }
.fm-redo { display: flex; flex-direction: column; gap: 6px; }
.fm-redo .mt-text { margin-top: 0; font-size: 13px; padding: 9px 10px; }
.fm-ex { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.fm-exi { margin: 0; flex: none; width: 168px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.fm-exi video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; background: #0b1f3f; }
.fm-exi b { font-size: 13px; } .fm-exi small { display: block; font-size: 11px; color: var(--muted); }
/* «Город с высоты»: the photo in the exact 9:16 frame the video will have, the route drawn over it */
.fl-box { position: relative; width: min(100%, 250px); aspect-ratio: 9 / 16; margin: 12px auto 8px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.fl-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; user-select: none; }
.fl-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.fl-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 12px; border-radius: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; pointer-events: none; white-space: nowrap; }
.fl-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 6px; }
.fl-row .btn.small { align-self: auto; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin: 0; }
/* languages: nothing is shown until the dictionary is loaded (no flash of keys) */
body.i18n-wait header, body.i18n-wait main, body.i18n-wait nav { visibility: hidden; }
.lang-seg { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); margin-bottom: 18px; }
.adm-langs { margin-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.adm-langs table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.adm-langs td, .adm-langs th { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); font-weight: 500; }
.adm-langs th { color: var(--text); font-weight: 700; }
/* the language button in the header: always visible, also for guests */
.top-r { display: flex; align-items: center; gap: 8px; }
.lang-btn { display: flex; align-items: center; gap: 5px; padding: 9px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10,30,62,.7); color: var(--muted); font-size: 12px; }
.lang-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang-btn b { color: var(--text); font-size: 13px; letter-spacing: .3px; }
.lang-list { display: grid; gap: 8px; margin-top: 6px; }
.lang-list button { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font-size: 15px; color: var(--text); }
.lang-list button.on { border-color: var(--line-hi); box-shadow: 0 0 0 1px var(--line-hi) inset; }
.lang-list button i { font-style: normal; color: var(--muted); font-size: 12px; }
/* narrow phones: the guest «Войти через Telegram» pill keeps only «Войти», so the header never overflows */
@media (max-width: 400px) { .balance.guest span:last-child { display: none; } .top-r { gap: 6px; } }

/* templates tab: four big rows on top (24.10) */
.tpl-hubs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.thub { position: relative; min-height: 96px; border-radius: 18px; padding: 12px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; overflow: hidden;
  border: 1px solid rgba(110,170,255,.14); color: #fff;
  background: radial-gradient(80% 70% at 85% 10%, hsla(var(--h), 90%, 60%, .55), transparent 70%), linear-gradient(160deg, hsl(var(--h), 55%, 26%), #061430 90%); }
.thub.on { border-color: hsla(var(--h), 90%, 70%, .9); box-shadow: 0 0 0 1px hsla(var(--h), 90%, 70%, .6), 0 8px 24px hsla(var(--h), 90%, 50%, .25); }
.thub:active { transform: scale(.97); }
.thub-ico { position: absolute; top: 10px; left: 12px; font-size: 24px; }
.thub b { font-size: 15.5px; font-weight: 800; }
.thub small { font-size: 11px; color: #b8c9e6; line-height: 1.25; }
.thub i { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(5,15,34,.5); }
.tpl-head { margin-bottom: 2px; }
.tpl-head h3 { margin: 0; font-size: 17px; }
.tpl-head h3 i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-films { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.mfilm { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; text-align: left; color: #fff; border: 1px solid rgba(110,170,255,.14);
  background: linear-gradient(160deg, hsla(var(--h),70%,45%,.45), rgba(10,30,62,.75) 70%); }
.mfilm.soon { opacity: .6; }
.mfilm:active { transform: scale(.98); }
.mfilm-ico { flex: 0 0 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: hsla(var(--h),75%,50%,.6); }
.mfilm-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mfilm-body b { font-size: 15px; } .mfilm-body small { font-size: 12px; color: #b8c9e6; line-height: 1.3; }
.mfilm-price { font-size: 11.5px; font-weight: 700; color: #ffd27a; margin-top: 2px; }
.tp-marks { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
/* previews on template buttons (24.10) */
.hubt, .thub { isolation: isolate; cursor: pointer; }
.hubt { display: flex; flex-direction: column; justify-content: flex-end; color: #fff; }
.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; pointer-events: none; }
.hubt:has(.pv)::after, .thub:has(.pv)::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(3,10,25,.85)); pointer-events: none; }
.hub-up { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: rgba(5,15,34,.7); border: 1px solid rgba(255,255,255,.25); z-index: 2; }
/* «Песня с нуля» in «Проекты» (24.10) */
.job-song { flex: 0 0 auto; width: 88px; aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-size: 34px; background: linear-gradient(160deg, hsl(265,60%,40%), #061430); }
.job-audio { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.job-audio span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.job-audio audio { width: 100%; height: 36px; }
.job-lyrics summary { font-size: 12.5px; color: var(--cyan); cursor: pointer; margin-top: 4px; }
.job-lyrics pre { white-space: pre-wrap; font: inherit; font-size: 12.5px; line-height: 1.45; color: #cfdcf3; margin: 6px 0 0; }
.sg-kind { margin-bottom: 14px; }
/* «Сниппет-клип» templates (24.10) */
.sp-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.sp-tpl { position: relative; overflow: hidden; isolation: isolate; min-height: 74px; border-radius: 16px; padding: 10px 12px; text-align: left; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  border: 1px solid rgba(110,170,255,.14); background: linear-gradient(160deg, hsla(var(--h),70%,45%,.4), rgba(10,30,62,.75) 70%); }
.sp-tpl.on { border-color: hsla(var(--h),90%,70%,.9); box-shadow: 0 0 0 1px hsla(var(--h),90%,70%,.6); grid-column: 1 / -1; min-height: 210px; }
.sp-tpl.soon { opacity: .55; }
.sp-tpl video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .85; }
.sp-tpl.on::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(3,10,25,.85)); }
.sp-tpl b { font-size: 14.5px; } .sp-tpl small { font-size: 11.5px; color: #c6d4ee; line-height: 1.3; }
.sp-mat button { font-size: 12.5px; padding-left: 4px; padding-right: 4px; }

/* «Сниппет-клип»: the person's songs behind one button (26.10) */
.sp-mysongs { width: 100%; text-align: left; border-style: solid; }
.sp-chev { font-size: 14px; color: var(--muted); flex: none; }
.sp-songlist { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; padding: 2px; }
.sp-songrow { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(10,30,62,.5); border: 1px solid var(--line-hi); }
.sp-songrow > b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-ver { display: flex; align-items: center; gap: 8px; }
.sp-ver span { font-size: 12px; color: var(--muted); flex: none; width: 62px; }
.sp-ver audio { flex: 1; min-width: 0; height: 32px; }
.sp-ver .mt-chip { flex: none; }
.sp-live { width: 100%; text-align: left; border-style: solid; }
.sp-live.on { border-color: var(--accent, #7cc4ff); }
.sp-tog { width: 44px; height: 26px; border-radius: 13px; background: rgba(255,255,255,.15); position: relative; flex: none; transition: background .2s; }
.sp-tog i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
.sp-tog.on { background: var(--accent, #3bb4ff); }
.sp-tog.on i { left: 21px; }
.sp-date { display: flex; gap: 10px; align-items: center; }
.sp-date input { flex: 1; min-width: 0; color-scheme: dark; }
.sp-date input:disabled { opacity: .4; }
.sp-live .mt-song-t b { white-space: normal; }
.clip-ex { width: 100%; cursor: default; margin-bottom: 4px; }

/* ---------- «Фото» (27.10) ---------- */
.ph-modes { grid-template-columns: repeat(4, 1fr); }
.ph-modes button { font-size: 13px; padding: 0 4px; }
.ph-ideas { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.ph-ideas::-webkit-scrollbar { display: none; }
.ph-ideas .mt-chip { flex: none; min-height: 36px; font-size: 13px; padding: 0 13px; }
.ph-cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.ph-cats::-webkit-scrollbar { display: none; }
.ph-cats .mt-chip { flex: none; min-height: 38px; }
.ph-srcex { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 4px; }
.ph-srcex button { padding: 0; flex: none; }
.ph-srcex img { width: 78px; height: 104px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.ph-srcex small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.ph-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ph-card { position: relative; aspect-ratio: 3/4; border-radius: 18px; overflow: hidden; text-align: left; border: 1.5px solid var(--line);
  background: radial-gradient(120% 80% at 30% 10%, rgba(56,212,255,.22), transparent 60%), linear-gradient(160deg, #10305e, #071a3a); }
.ph-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-card-t { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(to top, rgba(3,10,24,.92), rgba(3,10,24,0)); }
.ph-card-t b { font-size: 13.5px; line-height: 1.2; color: #fff; }
.ph-card-t small { font-size: 11px; color: #bcd0ee; line-height: 1.25; }
.ph-card.on { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(56,212,255,.35); }
.ph-card.on::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--cyan); color: #04122a; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.ph-chosen { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; background: rgba(56,212,255,.1); border: 1px solid var(--line-hi); }
.ph-chosen b { font-size: 15px; } .ph-chosen span { font-size: 12.5px; color: var(--muted); }
.ph-slots { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-slot { position: relative; width: 96px; height: 120px; border-radius: 16px; border: 1.5px dashed var(--line-hi); background: rgba(10,30,62,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; overflow: hidden; }
.ph-slot span { font-size: 26px; color: var(--cyan); line-height: 1; } .ph-slot small { font-size: 11px; color: var(--muted); text-align: center; padding: 0 6px; }
.ph-slot.on { border-style: solid; border-color: var(--line); }
.ph-slot img { width: 100%; height: 100%; object-fit: cover; }
.ph-slot button { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; background: rgba(3,10,24,.75); color: #fff; font-size: 12px; }
.ph-nets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } /* RU: 7 networks in 4 + 3, EN: 4 in one row */
.ph-net { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 2px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(10,30,62,.6); }
.ph-net i { font-style: normal; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; }
.ph-net b { font-size: 10.5px; font-weight: 600; color: #c9dbf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ph-net.on { border-color: var(--cyan); background: rgba(56,212,255,.14); } .ph-net.on b { color: var(--text); }
.n-youtube i { background: #ff2d2d; } .n-instagram i { background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf); }
.n-tiktok i { background: #111; box-shadow: -2px 0 0 #25f4ee, 2px 0 0 #fe2c55; } .n-vk i { background: #0077ff; font-size: 12px; } .n-telegram i { background: #27a6e5; } .n-rutube i { background: #14191f; box-shadow: inset 0 0 0 2px #ff3c5f; } .n-dzen i { background: #000; font-size: 18px; }
.ph-ex { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.ph-ex { background: #06142b; }
.ph-ex img { display: block; width: 100%; max-height: 260px; object-fit: contain; } /* a vertical example shows whole, with its headline */
.ph-fmts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-fmt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 9px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(10,30,62,.6); }
.ph-fmt b { font-size: 12px; line-height: 1.2; text-align: center; } .ph-fmt small { font-size: 10.5px; color: var(--dim); }
.ph-shape { height: 38px; max-width: 70px; border-radius: 5px; border: 1.5px solid rgba(147,169,204,.6); background: rgba(56,212,255,.08); }
.ph-fmt.on { border-color: var(--cyan); background: rgba(56,212,255,.14); } .ph-fmt.on .ph-shape { border-color: var(--cyan); background: rgba(56,212,255,.3); }
.ph-input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-hi); background: rgba(5,15,34,.7); color: var(--text); font-size: 16px; font-weight: 700; }
.ph-mini { padding: 0; background: linear-gradient(160deg, #10305e, #071a3a); }
.ph-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-mini b, .ph-mini small { position: relative; z-index: 1; padding: 0 8px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.ph-mini b { margin-top: auto; } .ph-mini small { padding-bottom: 8px; }
.ph-mini::before { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(to top, rgba(3,10,24,.9), transparent); z-index: 1; }
.job-photos { display: grid; gap: 6px; border-radius: 14px; overflow: hidden; }
.job-photos.two { grid-template-columns: 1fr 1fr; }
.job-photos img { width: 100%; display: block; border-radius: 10px; background: rgba(5,15,34,.6); }
.job-pacts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.job-pact { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .job-pact span { font-size: 12px; color: var(--muted); min-width: 66px; }
.job.k-photo { flex-direction: column; } .job.k-photo .job-photos { width: 100%; } .job.k-photo .job-wait { width: 100%; flex-basis: auto; aspect-ratio: 16/9; }
.job.k-photo .job-info { width: 100%; }

/* ---------- «AI-блогер» (27.10) ---------- */
.bl-doors { display: flex; flex-direction: column; gap: 10px; }
.bl-door { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; text-align: left; border: 1.5px solid var(--line); background: rgba(10,30,62,.6); overflow: hidden; }
.bl-door.ok { border-color: var(--line-hi); } .bl-door.ex { min-height: 200px; align-items: flex-end; }
.bl-door video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.bl-door.ex::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3,10,24,.92), rgba(3,10,24,.1) 65%); z-index: 1; }
.bl-door > * { position: relative; z-index: 2; }
.bl-door.soon { opacity: .72; }
.bl-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(56,212,255,.14); flex: none; }
.bl-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; } .bl-t b { font-size: 15.5px; } .bl-t small { font-size: 12.5px; color: var(--muted); }
.bl-door .status { position: absolute; top: 10px; right: 10px; }
.bl-ex-soon { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); }
.bl-voices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bl-voice { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(10,30,62,.6); }
.bl-voice.on { border-color: var(--cyan); background: rgba(56,212,255,.14); }
.bl-voice button { font-size: 13.5px; font-weight: 700; text-align: left; padding: 4px 2px; color: var(--text); }
.bl-voice audio { width: 100%; height: 32px; }
.bl-parts { display: flex; flex-direction: column; gap: 10px; }
.bl-part { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(10,30,62,.55); }
.bl-part-h { display: flex; justify-content: space-between; align-items: baseline; } .bl-part-h small { color: var(--muted); font-size: 12px; }
.bl-part .ph-input { min-height: 42px; font-size: 15px; } .bl-part .bl-chip { font-weight: 500; font-size: 14px; }
.bl-foot { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.tk-files { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.tk-files span { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .tk-files button { width: 28px; height: 28px; border-radius: 8px; background: rgba(5,15,34,.7); }
.tk-phr { display: flex; flex-direction: column; gap: 6px; }
.tk-p { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10,30,62,.35); color: var(--dim); }
.tk-p.on { border-color: var(--line-hi); background: rgba(10,30,62,.7); color: var(--text); }
.tk-p i { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-hi); display: grid; place-items: center; font-style: normal; font-size: 13px; color: #04122a; }
.tk-p.on i { background: var(--cyan); border-color: var(--cyan); }
.tk-p span { font-size: 14px; line-height: 1.35; } .tk-p small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tk-p:not(.on) span { text-decoration: line-through; text-decoration-color: rgba(147,169,204,.5); }
.bl-door.ok-s { min-height: 0; }
button.bl-ex-soon { text-align: left; width: 100%; color: var(--cyan); }
.bl-out { border-radius: 14px; border: 1px solid var(--line-hi); background: rgba(5,15,34,.6); padding: 12px; }
.bl-out pre { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.45; margin: 0 0 10px; color: var(--text); }
.bl-foot2 { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-ex { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: rgba(56,212,255,.08); border: 1px solid var(--line-hi); font-size: 13.5px; }
.tk-ex b { font-size: 14.5px; } .tk-ex small { color: var(--muted); }
.mt-drop.on { border-style: solid; border-color: var(--cyan); }
.an-model.soon { opacity: .5; cursor: default; }
.mt-song.soon { opacity: .45; cursor: default; } /* 1.11: models shown as «скоро» in the AI-shot pickers */

/* «Прокачать фото»: look at an example big (28.10) */
.ph-zoom { position: absolute; z-index: 2; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff; background: rgba(5,15,34,.6); border: 1px solid rgba(255,255,255,.25); }
.ph-card.on .ph-zoom { left: 8px; }
.ph-view { position: fixed; inset: 0; z-index: 100; background: rgba(2,8,20,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.ph-view img { max-width: 100%; max-height: 82vh; border-radius: 16px; object-fit: contain; }
.ph-view b { color: #fff; font-size: 16px; }
.ph-view span { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 18px; background: rgba(255,255,255,.12); }

/* «Прокачать фото» → «Видео» (28.10) */
.ph-card.vid { aspect-ratio: 9 / 16; }
.ph-card.vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-view video { max-width: 100%; max-height: 82vh; border-radius: 16px; }
.ph-vidhead { margin: 22px 0 2px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(63,224,255,.16), rgba(47,123,255,.12)); border: 1px solid var(--line-hi); display: flex; flex-direction: column; gap: 4px; }
.ph-vidhead b { font-size: 17px; } .ph-vidhead span { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.ph-endrow { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.ph-footrow { display: flex; gap: 10px; align-items: center; }
.ph-footrow .btn { flex: 1; }
.ph-footthumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; border: 1.5px solid var(--cyan); flex: none; }
.ph-modelline { width: 100%; margin-bottom: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(5,15,34,.55); border: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: left; display: flex; justify-content: space-between; }
.ph-modelline i { font-style: normal; color: var(--cyan); }
.ph-modelpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.ph-modelpick button { padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5,15,34,.55); display: flex; flex-direction: column; gap: 2px; text-align: left; }
.ph-modelpick button.on { border-color: var(--cyan); background: rgba(56,212,255,.14); }
.ph-modelpick b { font-size: 12.5px; } .ph-modelpick small { font-size: 10.5px; color: var(--muted); }

/* «Прокачать фото»: a group is one row swiped sideways, edge to edge; the next card peeks out so it is clear there is more */
.ph-rowt { display: flex; align-items: baseline; gap: 8px; }
.ph-rowt i { font-style: normal; font-size: 12px; color: var(--muted, rgba(255,255,255,.5)); }
.ph-grid.ph-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 4px; scroll-padding: 0 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ph-grid.ph-row::-webkit-scrollbar { display: none; }
.ph-row .ph-card { flex: 0 0 42%; max-width: 220px; scroll-snap-align: start; }
.ph-row .ph-card.vid { flex-basis: 38%; max-width: 200px; }

/* «Шаблоны»: a card with its example clip — the clip fills the card, the name sits on a dark fade at the bottom */
.tcard.has-ex { background: #061430; }
.tcard .tc-ex { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.tcard.has-ex::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(transparent, rgba(3,10,25,.92)); z-index: 0; pointer-events: none; }
.tcard.has-ex b, .tcard.has-ex small, .tcard.has-ex .tc-new { position: relative; z-index: 1; }
.tcard.has-ex .tc-new { position: absolute; }
.tp-ex { display: block; width: min(46%, 200px); aspect-ratio: 9/16; object-fit: cover; margin: 4px auto 12px; border-radius: 16px; border: 1px solid var(--line); background: #061430; }

/* «Для музыкантов» (30.10): the song buttons — no picture, a glowing equaliser and ▶ that plays an example right on the card */
.modes.with-pv .mode.aud { background: radial-gradient(90% 70% at 70% 15%, rgba(140,90,255,.55), transparent 70%), linear-gradient(165deg, #2a1a5c, #071634 85%); }
.modes.with-pv .mode.aud[data-open="song-instr"] { background: radial-gradient(90% 70% at 70% 15%, rgba(56,212,255,.45), transparent 70%), linear-gradient(165deg, #0d3a5c, #071634 85%); }
.modes.with-pv .mode.aud::before { background: linear-gradient(180deg, rgba(3,10,25,0) 45%, rgba(3,10,25,.85) 100%); }
.mode-eq { position: absolute; z-index: 1; left: 12px; right: 12px; top: 54px; height: 54px; display: flex; align-items: flex-end; gap: 4px; opacity: .85; }
.mode-eq i { flex: 1; border-radius: 3px; background: linear-gradient(180deg, #8fe9ff, #7b5cff); height: 30%; animation: eq 1.6s ease-in-out infinite; animation-play-state: paused; }
.mode-eq i:nth-child(3n) { height: 60%; animation-delay: -.4s; } .mode-eq i:nth-child(4n+1) { height: 85%; animation-delay: -.9s; } .mode-eq i:nth-child(5n+2) { height: 45%; animation-delay: -1.2s; }
.mode.playing .mode-eq i { animation-play-state: running; animation-duration: .7s; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.mode-eq i { transform-origin: bottom; }
.mode-play { position: relative; z-index: 3; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; padding: 6px 11px 6px 6px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mode-play b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #2a1a5c; font-size: 10px; }
.mode-play.on { background: rgba(123,92,255,.55); }

/* 30.10: an example with sound inside the music screens */
.sp-watch { position: absolute; z-index: 3; top: 10px; left: 10px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(5,15,34,.62); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sg-ex { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(10,30,62,.6); }
.sg-ex img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.sg-ex div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sg-ex b { font-size: 13px; }
.sg-ex audio { width: 100%; height: 36px; }
.ex-top { cursor: pointer; }
.ex-top .ex-play { position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -60%); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #1a1040; background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(0,0,0,.4); pointer-events: none; }
/* 30.10: the example is on top of the screen now — the chosen tile stays a compact full-width row (3 kinds: 1 + 2) */
.sp-tpls .sp-tpl.on { min-height: 74px; }
.tp-exs { display: flex; justify-content: center; gap: 10px; margin: 4px 0 12px; }
.tp-exs .tp-ex { margin: 0; }
.tp-exs.two .tp-ex { width: min(46%, 180px); }

/* «Оживить фото» — the big button with 8 live examples (31.10) */
.mode.big-live { grid-column: 1 / -1; padding: 0; min-height: 0; display: block; width: 100%; text-align: left; color: #fff; font: inherit; }
.bl-grid { pointer-events: none; }
.modes .mode[data-open="director"] { grid-column: 1 / -1; min-height: 0; }
.bl-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.bl-tile { position: relative; padding: 0; border: 0; background: #0b1730; aspect-ratio: 3 / 4; overflow: hidden; display: block; }
.bl-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-tile video.next { opacity: 0; transition: opacity .6s; }
.bl-tile video.next.in { opacity: 1; }
.bl-tag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; border-radius: 10px; padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-decoration: none; text-transform: uppercase; }
.bl-foot { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px 16px; border: 0; background: linear-gradient(180deg, #13254a, #0b1730); color: #fff; text-align: left; font: inherit; }
.bl-foot > span { flex: 1; }
.bl-foot b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.bl-foot small { display: block; opacity: .8; font-size: 14px; margin-top: 4px; }
.bl-foot i { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px; background: #fff; color: #0b1730; display: grid; place-items: center; font-size: 22px; font-weight: 800; font-style: normal; }
.an-tpl-head { margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.an-tpl-head b { display: block; font-size: 18px; }
.an-tpl-head small { opacity: .7; }
/* «Исправить» — the talk with the crab (31.10) */
.fx-chat { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.fx-me { display: flex; justify-content: flex-end; margin: 2px 0 10px; }
.fx-me p { margin: 0; max-width: 80%; padding: 10px 14px; border-radius: 18px 4px 18px 18px; background: var(--accent, #2f7bff); color: #fff; font-size: 14px; }
.fx-btns { display: grid; gap: 8px; }
#sheet textarea#fxText { width: 100%; margin: 10px 0; }

/* 1.11: «Кинорежиссёр» — one ready mosaic clip; mini-film cards and buttons with live loops */
.bl-one { display: block; aspect-ratio: 730 / 484; background: #0b1730; pointer-events: none; }
.bl-one video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mfilm-ico.mfilm-live { flex: 0 0 72px; height: 96px; padding: 0; overflow: hidden; border-radius: 14px; background: #0b1730; }
.mfilm-live video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-scen.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt-sc.mini-live { position: relative; min-height: 210px; overflow: hidden; justify-content: flex-end; padding: 10px; }
.mt-sc.mini-live video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.mt-sc.mini-live::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(5,12,28,.9)); z-index: 0; }
.mt-sc.mini-live b, .mt-sc.mini-live small { position: relative; z-index: 1; }
.mini-ex video { width: 100%; border-radius: 16px; display: block; background: #0b1730; aspect-ratio: 9 / 16; max-height: 62vh; object-fit: cover; }
.fm-exi.mini-ex { width: 100%; max-width: 340px; margin: 0 auto; } /* 1.11: the example of a mini-film — big */
/* 1.11 «Кинорежиссёр» like «Тизер-анонс»: the first trailer with Katie across the card, the title and the description on it;
   under it the mini-films as live buttons (above «Оживить фото») */
.mode.film-pv { grid-column: 1 / -1; min-height: 0; aspect-ratio: 780 / 500; padding: 12px 16px 14px; background: #000; justify-content: flex-end; }
.mode.film-pv::after { display: none; }
.mode.film-pv::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(3,10,25,0) 55%, rgba(3,10,25,.92) 100%); }
.mode.film-pv .mode-pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mode.film-pv h4, .mode.film-pv p { position: relative; z-index: 2; }
.mode.film-pv h4 { margin: 0 0 3px; font-size: 18px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.mode.film-pv p { color: #d3e0f5; font-size: 12.5px; }
.mode.film-pv .status { z-index: 3; top: 12px; right: 12px; left: auto; }
.modes > .film-minis { grid-column: 1 / -1; }
.film-minis .mini { flex-basis: 112px; }
.mode.film-pv.tall { aspect-ratio: 780 / 688; }

/* «Genjutsu» (1.11) */
.gj-lead { margin: 0 0 4px; font-size: 13px; color: var(--muted, #9fb3d9); line-height: 1.4; }
.gj-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.gj-ph { position: relative; width: 72px; height: 96px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #061430; display: flex; align-items: center; justify-content: center; }
.gj-ph img { width: 100%; height: 100%; object-fit: cover; }
.gj-ph button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; }
.gj-add { font-size: 26px; color: var(--muted, #9fb3d9); cursor: pointer; border-style: dashed; }
.gj-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.gj-st { display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #061430; color: inherit; text-align: center; }
.gj-st img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #0a1d44; }
.gj-st small { font-size: 11px; line-height: 1.2; padding: 0 4px; }
.gj-st.on { outline: 2px solid var(--accent, #ff5a4e); outline-offset: -2px; }
.thub:last-child:nth-child(odd) { grid-column: 1 / -1; } /* 1.11: the fifth row button (Genjutsu) runs the full width */
/* «Cinema Studio» film templates (1.11) */
.cin-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.cin-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 14px; text-align: left; color: inherit;
  border: 1px solid var(--line); background: linear-gradient(135deg, hsla(var(--h), 70%, 45%, .28), rgba(5,15,34,.6)); }
.cin-tpl span { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.cin-tpl b { font-size: 14px; }
.cin-tpl small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.cin-tpl.on { outline: 2px solid var(--accent, #ff5a4e); outline-offset: -2px; }
.cin-more { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; margin: 10px 0 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5,15,34,.55); color: inherit; text-align: left; }
.cin-more b { font-size: 14px; } .cin-more small { grid-column: 1; font-size: 12px; color: var(--muted); line-height: 1.3; } .cin-more i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; color: var(--muted); }
.cin-tpl { position: relative; overflow: hidden; } .cin-tpl.has-ex { min-height: 150px; justify-content: flex-end; }
.cin-tpl video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.cin-tpl.has-ex::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(3,10,25,.85)); z-index: 0; }
.cin-tpl > span, .cin-tpl > b, .cin-tpl > small { position: relative; z-index: 1; }
.cin-range { width: 100%; margin: 8px 0 2px; accent-color: var(--accent, #ff5a4e); }
.cin-range-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }

/* 2.11 a series of covers: an optional photo of its own next to each cover's headline */
.ph-covrow { display: flex; gap: 10px; align-items: center; }
.ph-covrow .ph-input { flex: 1; min-width: 0; }
.ph-slot.sm { width: 60px; height: 76px; flex: none; border-radius: 12px; }
.ph-slot.sm span { font-size: 20px; } .ph-slot.sm small { font-size: 9.5px; padding: 0 3px; }
.ph-slot.sm button { width: 22px; height: 22px; font-size: 11px; }
/* «Киностудия» (2.11): chosen template on top, «how it works» (photo → film), the studio's films in a row */
.cin-chosen { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; padding: 9px 12px; border-radius: 14px; background: rgba(255,90,78,.14); border: 1px solid rgba(255,90,78,.45); }
.cin-chosen span { font-size: 20px; line-height: 1; } .cin-chosen b { flex: 1; font-size: 14px; }
.cin-chosen button { background: none; border: 0; color: var(--muted); font-size: 16px; padding: 2px 4px; }
.mt-gt.cin-sec { display: block; margin-top: 18px; }
.cin-how { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 6px 0 4px; }
.cin-how figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 9 / 16; background: #000; }
.cin-how img, .cin-how video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cin-how figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 11.5px; line-height: 1.25; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.cin-how i { font-style: normal; font-size: 22px; color: var(--muted); }
.cin-exs { display: flex; gap: 8px; overflow-x: auto; margin: 6px -2px 4px; padding: 0 2px 4px; scrollbar-width: none; }
.cin-exs::-webkit-scrollbar { display: none; }
.cin-ex { flex: 0 0 38%; position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; border: 0; padding: 0; background: #000; color: #fff; }
.cin-ex video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cin-ex b { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 12.5px; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
/* AI-монтаж (2.11): «Магия своего видео» — Genjutsu and PixVerse doors under the scenarios */
.mt-magic-h { margin-top: 22px; }
.mt-magic { margin: 8px 0 10px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(5,15,34,.45); }
.mt-magic-t { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; } .mt-magic-t b { font-size: 14px; } .mt-magic-t small { font-size: 12px; color: var(--muted); }
.mt-magic-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mt-magic-doors button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 0; color: inherit;
  background: linear-gradient(160deg, hsla(var(--h), 70%, 45%, .35), hsla(var(--h), 70%, 30%, .18)); }
.mt-magic-doors span { font-size: 22px; line-height: 1; } .mt-magic-doors b { font-size: 12.5px; }
/* «Шаблоны» (2.11): search, service cards, theme tiles */
.tpl-search { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; padding: 0 12px; height: 46px; border-radius: 16px; border: 1px solid var(--line); background: rgba(5,15,34,.6); }
.tpl-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.tpl-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text, #fff); font-size: 15px; outline: none; }
.tpl-search input::-webkit-search-cancel-button { display: none; }
.tpl-search button { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 6px; }
.tpl-found { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.svc-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
.svc-row::-webkit-scrollbar { display: none; }
.svc { position: relative; flex: 0 0 132px; height: 92px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); padding: 0; color: #fff; text-align: left;
  background: linear-gradient(150deg, hsla(var(--h), 70%, 45%, .55), hsla(var(--h), 70%, 22%, .9)); }
.svc .pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.svc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(3,10,25,.85)); }
.svc-ico { position: absolute; top: 7px; left: 9px; z-index: 1; font-size: 18px; }
.svc i { position: absolute; top: 7px; right: 8px; z-index: 1; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.45); }
.svc-t { position: absolute; left: 9px; right: 8px; bottom: 7px; z-index: 1; display: flex; flex-direction: column; gap: 1px; }
.svc-t b { font-size: 14px; line-height: 1.15; } .svc-t small { font-size: 10.5px; line-height: 1.2; opacity: .85; }
.svc.on { outline: 2px solid var(--accent, #ff5a4e); outline-offset: -2px; }
.theme-row { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 96px; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
.theme-row::-webkit-scrollbar { display: none; }
.theme { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; height: 74px; padding: 8px 9px; border-radius: 14px; border: 1px solid transparent; color: #fff; text-align: left;
  background: linear-gradient(150deg, hsla(var(--h), 75%, 55%, .45), hsla(var(--h), 70%, 25%, .55)); }
.theme span { position: absolute; top: 6px; left: 8px; font-size: 22px; line-height: 1; }
.theme b { font-size: 12.5px; line-height: 1.15; } .theme i { position: absolute; top: 7px; right: 8px; font-style: normal; font-size: 10.5px; opacity: .8; }
.theme.on { border-color: #fff; box-shadow: 0 0 0 1px #fff inset; }
.cin-view video { max-height: 72vh; } .cin-view .cin-same { width: min(320px, 100%); }
.cin-how figure[role=button] { cursor: pointer; }
/* 2.11 AI-монтаж: three doors and the chat with the crab */
.mt-doors { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.mt-door { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; border-radius: 20px; border: 1px solid var(--line-hi); color: inherit; font: inherit; cursor: pointer;
  background: linear-gradient(160deg, hsla(var(--h),70%,45%,.42), rgba(10,30,62,.7) 70%); }
.mt-door.main { padding: 18px 14px; background: linear-gradient(160deg, hsla(var(--h),75%,48%,.62), rgba(10,30,62,.75) 75%); }
.mt-door b { display: block; font-size: 16px; line-height: 1.2; } .mt-door small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.mt-door-i { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; background: hsla(var(--h),75%,50%,.55); overflow: hidden; }
.mt-door.main .mt-door-i { width: 58px; height: 58px; }
.mt-door-i img { width: 100%; height: 100%; object-fit: cover; }
.mt-talk { margin-bottom: 4px; }
.mt-talk .mt-crab { margin: 4px 0 8px; } .mt-talk .mt-crab p { white-space: pre-line; }
.mt-crab.typing p { display: flex; gap: 5px; align-items: center; flex: none; min-height: 20px; }
.mt-crab.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: mtDot 1s infinite ease-in-out; }
.mt-crab.typing i:nth-child(2) { animation-delay: .15s; } .mt-crab.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mtDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
#mtSay { margin-top: 6px; }
.mt-link { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.mt-change textarea { margin: 6px 0 8px; }
.gj-ph .mo-n { position: absolute; left: 4px; top: 4px; min-width: 20px; height: 20px; border-radius: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; display: grid; place-items: center; }
.fu-row { display: flex; gap: 12px; align-items: center; margin: 6px 0; }
.fu-row .mt-chips { margin: 0; }

/* 3.11: the row of cards under «AI-монтаж» — the same cards as under «Кинорежиссёр»; it spans the whole row of the grid */
.modes > .mt-cards { grid-column: 1 / -1; }
/* «Пересъёмка» screen */
.rs-ex { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 16/9; }
.rs-hero { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 10px; margin: 8px 0; background: rgba(255,255,255,.04); }
.rs-hero.keep { opacity: .65; }
.rs-h-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.rs-h-body { margin-top: 8px; display: grid; gap: 8px; }
.rs-phs { display: flex; align-items: center; gap: 8px; }
.rs-phs small { color: #b8c9e6; font-size: 11.5px; }
.rs-ph { width: 54px; height: 54px; border-radius: 12px; border: 1px dashed rgba(255,255,255,.35); display: grid; place-items: center; font-size: 22px; cursor: pointer; flex: 0 0 auto; }
.rs-ph.on { border-style: solid; border-color: #3ee8b5; color: #3ee8b5; }
.rs-who { width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25); color: #fff; padding: 9px 10px; font: inherit; }
.mini.is-soon .tmini-ico { opacity: .75; } .mini.is-soon small { color: var(--muted); text-transform: lowercase; } /* 4.11: doors not built yet */
