/* TGI Studio — клиентски портал.
   Посока: тъмно смарагдово „студио“ с шампанско (цветовете на TGI Media),
   а всеки клиент оцветява портала със свой акцент (--accent). */
:root {
  --bg: #050C0A;
  --bg-2: #08120F;
  --surface: #0D1915;
  --surface-2: #12221D;
  --surface-3: #183029;
  --line: rgba(230, 207, 159, .10);
  --line-2: rgba(230, 207, 159, .20);
  --text: #F1ECE1;
  --muted: #9AA59F;
  --dim: #6B7872;
  --champ: #E6CF9F;
  --emerald: #2FBF8F;
  --accent: #E6CF9F;
  --accent-ink: #0A0F0D;
  --ok: #4ED99B;
  --warn: #FFC15C;
  --bad: #FF7D6E;
  --info: #93B4FF;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 18px;
  --r-sm: 12px;
  --side: 248px;
  --tab-h: 68px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overscroll-behavior-x: none;
  -webkit-tap-highlight-color: transparent;
}
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { overflow-wrap: break-word; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }

/* ── атмосфера ───────────────────────────────────────── */
.atmo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.atmo::before, .atmo::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.atmo::before { width: 70vmax; height: 70vmax; left: -25vmax; top: -40vmax; background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 32%, transparent), transparent); }
.atmo::after { width: 60vmax; height: 60vmax; right: -30vmax; bottom: -36vmax; background: radial-gradient(closest-side, rgba(47, 191, 143, .2), transparent); }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ── типография ──────────────────────────────────────── */
.eyebrow { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.display { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.06; margin: 0; text-wrap: balance; }
.h2 { font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: -.005em; margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .02em; }
.accent { color: var(--accent); }

/* ── бутони ──────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; max-width: 100%;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 14px; letter-spacing: .01em; text-decoration: none; text-align: center;
  transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s, filter .2s;
  -webkit-user-select: none; user-select: none;
}
.btn:hover { border-color: var(--champ); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: var(--ok); color: #04130C; border-color: transparent; }
.btn.bad { background: transparent; color: var(--bad); border-color: color-mix(in oklab, var(--bad) 55%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; padding: 0 10px; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.lg { min-height: 54px; padding: 0 24px; font-size: 15px; }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 13px; }
.btn.block { width: 100%; }
.danger-text { color: var(--bad) !important; }
.icon-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); text-decoration: none; padding: 0; }
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn.armed { border-color: var(--bad); color: var(--bad); }
.linkish { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 0; color: var(--muted); font-weight: 700; font-size: 13px; text-decoration: none; }
.linkish:hover { color: var(--text); }
.linkish svg.i { width: 15px; height: 15px; }

/* задръж за одобрение */
.btn.hold { overflow: hidden; touch-action: none; -webkit-touch-callout: none; }
.btn.hold > * { position: relative; z-index: 1; }
.hold-fill { position: absolute !important; z-index: 0 !important; inset: 0; background: rgba(255, 255, 255, .45); transform-origin: left center; transform: scaleX(var(--p, 0)); }

/* ── статуси ─────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.s-draft { color: var(--dim); background: rgba(255,255,255,.05); }
.s-review { color: var(--warn); background: color-mix(in oklab, var(--warn) 14%, transparent); }
.s-review::before { animation: pulse 1.8s infinite; }
.s-changes { color: var(--bad); background: color-mix(in oklab, var(--bad) 14%, transparent); }
.s-approved { color: var(--ok); background: color-mix(in oklab, var(--ok) 14%, transparent); }
.s-published { color: var(--info); background: color-mix(in oklab, var(--info) 14%, transparent); }
.r-new { color: var(--warn); background: color-mix(in oklab, var(--warn) 14%, transparent); }
.r-accepted { color: var(--info); background: color-mix(in oklab, var(--info) 14%, transparent); }
.r-done { color: var(--ok); background: color-mix(in oklab, var(--ok) 14%, transparent); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 currentColor; } 60% { box-shadow: 0 0 0 5px transparent; } }
.new-dot { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.when { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }
.when svg.i { width: 13px; height: 13px; }
.when.soon { color: var(--warn); }
.when.late { color: var(--bad); }
.okchip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--ok); background: color-mix(in oklab, var(--ok) 14%, transparent); }
.okchip svg.i { width: 12px; height: 12px; }

/* ── марка ───────────────────────────────────────────── */
.brandmark { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .08em; color: var(--text); }
.brandmark .dot { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; display: block; flex: none; box-shadow: 0 0 0 1px rgba(233,216,166,.16), 0 6px 18px -6px rgba(18,184,134,.55); }
.brandmark .dot .lg { width: 100%; height: 100%; display: block; }
.bm-t { display: grid; line-height: 1.25; }
.bm-t small { font-family: var(--f-mono); font-weight: 500; font-size: 10px; letter-spacing: .24em; color: var(--muted); }

/* ── вход ────────────────────────────────────────────── */
.login {
  width: 100%; max-width: 1240px; margin: 0 auto; min-height: calc(100dvh - 48px);
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 22px;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) var(--gut-r) 20px var(--gut);
}
.login-top { display: flex; align-items: center; justify-content: space-between; }
.login-hero { display: grid; gap: 14px; }
.login-title { font-size: clamp(27px, 8.2vw, 40px); }
.login-title em { font-style: normal; background: linear-gradient(100deg, var(--champ), #fff 45%, var(--emerald)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-sub { color: var(--muted); max-width: 46ch; margin: 0; font-size: 15px; }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.perks li { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 70%, transparent); font-size: 12.5px; font-weight: 700; color: var(--text); }
.perks svg.i { width: 14px; height: 14px; color: var(--champ); }
.login-panel { display: grid; }
.login-card { width: 100%; max-width: 440px; margin: 0 auto; padding: 24px 20px; border-radius: 26px; background: color-mix(in oklab, var(--surface) 86%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lc-head h2 { font-family: var(--f-display); font-weight: 600; font-size: 24px; margin: 0; }
.lc-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.eye:hover { color: var(--text); }
.demo-box { display: grid; gap: 12px; }
.demo-list { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-acc { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; min-width: 0; transition: border-color .2s, transform .15s; }
.demo-acc:hover { border-color: var(--line-2); transform: translateY(-1px); }
.demo-acc .av { width: 34px; height: 34px; font-size: 11px; }
.da-t { display: grid; min-width: 0; }
.da-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-t span { color: var(--muted); font-size: 11.5px; font-family: var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-visual { display: none; }
.login-foot { text-align: center; color: var(--dim); font-size: 12px; padding: 12px var(--gut-r) calc(env(safe-area-inset-bottom, 0px) + 16px) var(--gut); }
@media (min-width: 980px) {
  .login { grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); grid-template-areas: "top top" "hero panel" "perks panel"; align-content: center; column-gap: 56px; row-gap: 28px; padding-top: 40px; }
  .login-top { grid-area: top; }
  .login-hero { grid-area: hero; align-self: end; gap: 20px; }
  .login-title { font-size: clamp(32px, 4.2vw, 48px); }
  .perks { grid-area: perks; align-self: start; justify-content: flex-start; }
  .login-panel { grid-area: panel; }
  .login-card { padding: 30px; }
  .login-sub { font-size: 17px; }
}
@media (min-width: 1200px) {
  .login { grid-template-columns: minmax(0, 1fr) 230px minmax(360px, 420px); grid-template-areas: "top top top" "hero visual panel" "perks visual panel"; }
  .login-title { font-size: clamp(32px, 3.3vw, 46px); }
  .login-visual { grid-area: visual; display: grid; justify-items: center; gap: 16px; align-self: center; transform: rotate(4deg); }
  .login-visual .mphone { width: 200px; }
  .lv-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; transform: rotate(-6deg) translateX(-20px); box-shadow: 0 20px 40px rgba(0,0,0,.4); }
}

/* ── мокъпи (ръководство и вход) ─────────────────────── */
.mphone { width: 150px; display: grid; gap: 10px; }
.mscreen { position: relative; aspect-ratio: 9 / 17; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--line-2), 0 30px 60px rgba(0,0,0,.5);
  background: linear-gradient(165deg, color-mix(in oklab, var(--accent) 70%, #fff 10%), color-mix(in oklab, var(--accent) 35%, #0B1512)); }
.mblob { position: absolute; border-radius: 50%; filter: blur(14px); opacity: .7; }
.mblob.a { width: 70%; height: 40%; left: -10%; top: 12%; background: #fff; opacity: .25; }
.mblob.b { width: 80%; height: 45%; right: -25%; bottom: 8%; background: var(--emerald); opacity: .45; }
.mlabel { position: absolute; left: 10px; top: 10px; font-family: var(--f-mono); font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; white-space: pre; }
.mplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mplay svg.i { width: 18px; height: 18px; fill: #fff; stroke: none; margin-left: 3px; }
.mstamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg); font-family: var(--f-display); font-weight: 800; font-size: 15px; letter-spacing: .06em; color: var(--ok); border: 3px solid var(--ok); border-radius: 9px; padding: 4px 9px; background: rgba(4, 19, 12, .6); white-space: nowrap; }
.mscrub { position: relative; height: 18px; }
.mscrub .fillp { position: absolute; left: 0; right: 0; top: 8px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--text) 45%, var(--surface-3) 45%); }
.mscrub b { position: absolute; top: 1px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); border: 2px solid var(--bg); }
.mscrub b.ag { background: var(--champ); }
.mcard { width: min(100%, 290px); padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; gap: 10px; box-shadow: 0 24px 50px rgba(0,0,0,.35); }
.mbig { font-family: var(--f-display); font-size: 20px; line-height: 1.1; }
.mstat { display: flex; align-items: baseline; gap: 8px; }
.mstat b { font-family: var(--f-display); font-size: 34px; color: var(--accent); line-height: 1; }
.mstat span { color: var(--muted); font-size: 12px; }
.mrow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); font-size: 12px; font-weight: 700; min-width: 0; }
.mrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.mrow span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow em { font-style: normal; font-size: 10px; color: var(--warn); white-space: nowrap; }
.mbtn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border-radius: 999px; font-weight: 800; font-size: 12.5px; }
.mbtn svg.i { width: 15px; height: 15px; }
.mbtn.ok { background: var(--ok); color: #04130C; }
.mbtn.bad { border: 1px solid var(--bad); color: var(--bad); }
.mnote { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 8px 10px; border-radius: 4px 12px 12px 12px; background: var(--surface); }
.mduo { display: flex; align-items: center; justify-content: center; gap: 14px; }
.mduo .mphone { width: 96px; flex: none; }
.mduo .mcard { width: 180px; padding: 12px; gap: 8px; }
.mduo .mcard b { font-size: 12.5px !important; }
.mduo .mbtn { font-size: 11px; min-height: 32px; }
.mstack { position: relative; width: 150px; height: 200px; }
.mst { position: absolute; inset: 0; border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(165deg, color-mix(in oklab, var(--accent) 60%, #fff 8%), color-mix(in oklab, var(--accent) 30%, #0B1512)); box-shadow: 0 20px 40px rgba(0,0,0,.4); display: grid; align-content: space-between; justify-items: start; padding: 14px; }
.mst.c3 { transform: translate(26px, -16px) rotate(8deg) scale(.92); opacity: .45; }
.mst.c2 { transform: translate(13px, -8px) rotate(4deg) scale(.96); opacity: .7; }
.mst.c1 b { font-family: var(--f-display); font-size: 18px; color: #fff; }
.mst .badge { background: rgba(0,0,0,.5); }
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mcal span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 7px; font-size: 10px; color: var(--muted); background: var(--surface); }
.mcal span.on { color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.minst { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); }
.minst > div { display: grid; min-width: 0; }
.minst b { font-size: 13px; }
.minst span { font-size: 11.5px; color: var(--muted); }
.minst .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.minst .appicon { width: 40px; height: 40px; border-radius: 11px; overflow: hidden; display: block; flex: none; box-shadow: 0 6px 18px -6px rgba(18,184,134,.6); }
.minst .appicon .lg { width: 100%; height: 100%; display: block; }
.minst.app { border: 1px solid var(--accent); }

/* ── TikTok рамка (безопасна зона) ───────────────────── */
.safe { position: absolute; inset: 0; z-index: 2; pointer-events: none; font-size: 13px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.mscreen .safe { font-size: 7px; }
.safe::before, .safe::after { content: ""; position: absolute; background: repeating-linear-gradient(135deg, rgba(255,90,90,.20) 0 6px, rgba(255,90,90,.06) 6px 12px); border: 1px dashed rgba(255,120,120,.6); }
.safe::before { left: 0; right: 0; bottom: 0; height: 21%; border-width: 1px 0 0; }
.safe::after { right: 0; top: 36%; bottom: 21%; width: 17%; border-width: 0 0 0 1px; }
.sz-top { position: absolute; top: 4.5%; left: 0; right: 0; text-align: center; font-weight: 700; opacity: .85; white-space: pre; }
.sz-top b { border-bottom: 2px solid #fff; padding-bottom: 2px; }
.sz-side { position: absolute; right: 3%; bottom: 24%; display: grid; gap: 1.1em; justify-items: center; }
.sz-side i { width: 2.6em; height: 2.6em; border-radius: 50%; background: rgba(255,255,255,.28); border: 1px solid rgba(255,255,255,.5); }
.sz-side i:first-child { border-radius: 50%; background: rgba(255,255,255,.5); }
.sz-cap { position: absolute; left: 4%; right: 22%; bottom: 6%; display: grid; gap: .3em; }
.sz-cap b { font-size: 1.05em; }
.sz-cap span { opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── ръководство ─────────────────────────────────────── */
.tour { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(2, 6, 5, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--gut-r) calc(env(safe-area-inset-bottom, 0px) + 12px) var(--gut); animation: fade .2s; }
.tour-card { width: min(520px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 16px; padding: 18px 20px 20px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.tour-top { display: flex; align-items: center; justify-content: space-between; }
.tour-visual { height: 250px; display: grid; place-items: center; border-radius: 20px; background: radial-gradient(circle at 50% 40%, color-mix(in oklab, var(--accent) 18%, var(--bg-2)), var(--bg-2) 70%); overflow: hidden; padding: 12px; }
.tour-visual.in > * { animation: tourIn .45s var(--ease); }
@keyframes tourIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.tour-visual .mphone { width: 104px; }
.tour-body { display: grid; gap: 10px; }
.tour-body .display { font-size: clamp(21px, 5.2vw, 26px); }
.tour-text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; min-height: 4.8em; }
.tour-dots { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.tour-dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: var(--surface-3); transition: width .25s var(--ease), background .25s; }
.tour-dots button[aria-selected="true"] { width: 24px; background: var(--accent); }
.tour-nav { display: flex; justify-content: space-between; gap: 10px; }
.tour-nav .btn.primary { min-width: 130px; }
@media (max-height: 700px) { .tour-visual { height: 190px; } .tour-visual .mphone { width: 80px; } .tour-visual .mduo .mphone { width: 80px; } .tour-text { min-height: 0; font-size: 14px; } .tour-card { gap: 12px; } }

/* ── полета ──────────────────────────────────────────── */
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { width: 100%; }
.field > span, .label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.input, .field textarea, .field select {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder, textarea::placeholder { color: var(--dim); }
.input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input[type="date"].input { -webkit-appearance: none; appearance: none; display: block; }
.mono-in { font-family: var(--f-mono); letter-spacing: .04em; }
.hint { font-size: 12px; color: var(--dim); }
.err { color: var(--bad); font-size: 14px; font-weight: 600; margin: 0; }
.err:empty { display: none; }
.row2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pw-row { display: flex; gap: 8px; }
.pw-row .icon-btn { width: 48px; height: 48px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); max-width: 100%; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-weight: 700; font-size: 13px; color: var(--muted); }
.toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.colorin { width: 42px; height: 36px; border: 0; background: transparent; padding: 0; }
.drop { display: grid; gap: 6px; place-items: center; text-align: center; padding: 22px 16px; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--bg-2); color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 6%, var(--bg-2)); }
.drop b { color: var(--text); }
.drop-i { overflow-wrap: anywhere; font-size: 13px; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.mform { display: grid; gap: 16px; }

/* ── обвивка ─────────────────────────────────────────── */
.shell { min-height: 100dvh; }
.side { display: none; }
@media (min-width: 1000px) {
  .side { display: flex; flex-direction: column; gap: 22px; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); padding: 26px 18px; border-right: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 72%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 10; }
  .shell { padding-left: var(--side); }
  .topbar, .tabbar { display: none !important; }
}
.cobrand { display: grid; gap: 14px; }
.cobrand .cl { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.cobrand .cl > div { min-width: 0; }
.cobrand .cl b { font-family: var(--f-display); font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cobrand .cl > div > span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-chip { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 12px; letter-spacing: .02em; background: var(--accent); color: var(--accent-ink); flex: none; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; transition: background .2s, color .2s; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.nav .cnt { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.side .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: transparent; text-align: left; width: 100%; }
.me:hover { border-color: var(--line-2); }
.me > div { min-width: 0; flex: 1; }
.me b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me > div > span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-mono); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11px; background: var(--surface-3); color: var(--champ); flex: none; border: 1px solid var(--line-2); letter-spacing: .02em; }
.av.client { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-size: 12px; }

.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gut-r) 10px var(--gut);
  background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .who { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.who-t { display: grid; min-width: 0; line-height: 1.25; }
.who-t b { font-family: var(--f-display); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t small { font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.me-btn { border: 0; background: transparent; padding: 2px; border-radius: 50%; flex: none; }
.me-btn .av { width: 38px; height: 38px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  padding: 6px var(--gut-r) calc(env(safe-area-inset-bottom, 0px) + 6px) var(--gut);
  background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border-radius: 12px; text-decoration: none; color: var(--dim); font-size: 10.5px; font-weight: 700; min-width: 0; }
.tabbar a > span:not(.cnt) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar a svg.i { width: 22px; height: 22px; }
.tabbar:has(a:nth-child(5)) a { font-size: 9.5px; letter-spacing: -.01em; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg.i { color: var(--accent); }
.tabbar .cnt { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; }

.view { width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 22px var(--gut-r) calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 36px) var(--gut);
  display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); animation: rise .35s var(--ease); }
@media (min-width: 1000px) { .view { padding: 40px 44px 64px; gap: 34px; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view > * { min-width: 0; }

/* ── начало ──────────────────────────────────────────── */
.hero { display: grid; gap: 14px; padding-top: 4px; }
.hero h1 { font-size: clamp(30px, 7.6vw, 64px); }
.hero .lead { font-size: clamp(16px, 2.3vw, 19px); color: var(--muted); margin: 0; max-width: 48ch; }
.hero .lead b { color: var(--text); }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.hint-l { font-size: 13px; }
.lead { margin: 0; color: var(--muted); }
.sec { display: grid; gap: 14px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.sec-head a { font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }
.sec-head a:hover { color: var(--accent); }

.spot { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .spot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spot-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border-radius: var(--r); border: 1px solid color-mix(in oklab, var(--warn) 30%, var(--line)); background: linear-gradient(120deg, color-mix(in oklab, var(--warn) 7%, var(--surface)), var(--surface)); text-decoration: none; transition: transform .2s var(--ease), border-color .2s; min-width: 0; }
.spot-card:hover { transform: translateY(-2px); border-color: var(--warn); }
.spot-card .thumb { aspect-ratio: 9 / 14; border-radius: 12px; }
.spot-card .paper { padding: 10px 8px; }
.spot-card .paper q { font-size: 10px; -webkit-line-clamp: 4; }
.spot-card .paper .k { display: none; }
.sc-t { display: grid; gap: 5px; justify-items: start; min-width: 0; }
.sc-t .t { font-weight: 800; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.sc-t .go { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--warn); }

.stats { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 16px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; min-width: 0; }
.stat b { font-family: var(--f-display); font-weight: 700; font-size: clamp(26px, 7vw, 40px); line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.stat.hot b { color: var(--accent); }

.cols { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.rows { display: grid; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.rowlink { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; border-top: 1px solid var(--line); transition: background .2s; min-width: 0; }
.rowlink:first-child { border-top: 0; }
.rowlink:hover { background: var(--surface-2); }
.rl-t { display: grid; min-width: 0; gap: 1px; }
.rl-t .t { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-t .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowlink .badge, .rowlink .new-dot { justify-self: end; }
@media (max-width: 420px) { .rowlink .badge { padding: 0 8px; font-size: 11px; } .rowlink .badge::before { display: none; } }
.datebox { width: 44px; height: 48px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; align-content: center; line-height: 1; flex: none; }
.datebox b { font-family: var(--f-display); font-size: 16px; }
.datebox span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.cdot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.empty-row { padding: 22px 16px; color: var(--muted); font-size: 14px; text-align: center; }
.empty-row:empty { display: none; }

.box { padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 14px; min-width: 0; }
.box h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 18px; line-height: 1.25; }
.box > p { margin: 0; color: var(--muted); }
.box.decide { border-color: color-mix(in oklab, var(--warn) 45%, var(--line)); background: linear-gradient(140deg, color-mix(in oklab, var(--warn) 9%, var(--surface)), var(--surface)); }
.box.good { border-color: color-mix(in oklab, var(--ok) 35%, var(--line)); }
.box.bad { border-color: color-mix(in oklab, var(--bad) 35%, var(--line)); }
.box.idea { grid-template-columns: minmax(0, 1fr); align-items: center; background: linear-gradient(120deg, color-mix(in oklab, var(--accent) 10%, var(--surface)), var(--surface)); }
@media (min-width: 720px) { .box.idea { grid-template-columns: minmax(0, 1fr) auto; } }
.idea-t { display: grid; gap: 6px; }
.idea-t p { margin: 0; color: var(--muted); }
.box.idea .btn { justify-self: start; }
.warnbox { border-color: color-mix(in oklab, var(--warn) 40%, var(--line)); }
.welcome .wsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .welcome .wsteps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wstep { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.wstep > div { display: grid; gap: 3px; min-width: 0; }
.wstep b { font-size: 14px; }
.wstep span { font-size: 13px; color: var(--muted); }
.wn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 18%, transparent); color: var(--accent); flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btns .btn { flex: 1 1 auto; }
.page-head .btns .btn, .box.idea .btn, .hero-cta .btn { flex: 0 0 auto; }

.setup { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); background: linear-gradient(140deg, color-mix(in oklab, var(--accent) 10%, var(--surface)), var(--surface)); }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .setup-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.setup-list li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.sl-t { display: grid; min-width: 0; }
.sl-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred-card { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-2); }
.cc-head { display: flex; align-items: center; gap: 10px; }
.cc-head b { flex: 1; min-width: 0; }
.cc-head .logo-chip { width: 32px; height: 32px; font-size: 11px; }
.creds { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--accent); font-family: var(--f-mono); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

/* клиентски плочки */
.clients-strip { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .clients-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ccard { position: relative; overflow: hidden; display: grid; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .2s var(--ease), border-color .2s; min-width: 0; }
a.ccard:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ccard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: var(--c); opacity: .14; filter: blur(30px); pointer-events: none; }
.ccard .top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ccard .top > div { min-width: 0; }
.ccard .top b { font-family: var(--f-display); font-weight: 600; font-size: 16px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .top > div > span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ccard .nums div { display: grid; gap: 2px; }
.ccard .nums b { font-family: var(--f-display); font-size: 20px; font-variant-numeric: tabular-nums; }
.ccard .nums b.bad { color: var(--bad); }
.ccard .nums span { font-size: 11px; color: var(--muted); line-height: 1.25; }

/* ── съдържание ──────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head > div:first-child { display: grid; gap: 8px; min-width: 0; }
.page-head h1 { font-size: clamp(28px, 6.4vw, 44px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--muted); max-width: 100%; }
.chip .n { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-pressed="true"] .n { color: var(--bg); opacity: .6; }
.chip .cdot { width: 8px; height: 8px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: grid; gap: 10px; text-decoration: none; min-width: 0; align-content: start; }
.card .thumb { aspect-ratio: 3 / 4; border-radius: var(--r); transition: transform .3s var(--ease), box-shadow .3s; }
.card:hover .thumb { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.card .meta { display: grid; gap: 4px; padding: 0 2px; min-width: 0; }
.card .meta .t { font-weight: 800; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .meta .s { font-size: 12px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.thumb { position: relative; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ov { position: absolute; inset: 8px 8px auto 8px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.thumb .ov .badge { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(5, 12, 10, .66); max-width: 100%; }
@media (max-width: 420px) { .grid .thumb .ov .badge { height: 23px; padding: 0 8px; font-size: 11px; } }
.thumb .play { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(5,12,10,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.thumb .play svg.i { width: 15px; height: 15px; fill: #fff; stroke: none; }
.paper { position: absolute; inset: 0; padding: 44px 14px 14px; background: linear-gradient(160deg, color-mix(in oklab, var(--c, var(--accent)) 22%, var(--surface-2)), var(--surface)); display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.paper q { font-family: var(--f-display); font-weight: 600; font-size: clamp(12px, 1.6vw, 15px); line-height: 1.3; quotes: none; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.paper .k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.empty { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 44px 20px; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--muted); }
.empty b { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--text); }

/* ── материал ────────────────────────────────────────── */
.crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; min-width: 0; }
.crumbs .back { padding-left: 0; }
.crumbs .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.item { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .item { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 44px; } .stage { position: sticky; top: 24px; } }
.stage { display: grid; gap: 12px; justify-items: center; min-width: 0; }
.tools { width: min(100%, 340px); display: flex; justify-content: space-between; gap: 8px; }
.tool { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; font-weight: 800; color: var(--muted); font-family: var(--f-mono); }
.tool svg.i { width: 15px; height: 15px; }
.tool[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.phone { position: relative; width: min(100%, 340px); aspect-ratio: 9 / 16; border-radius: 32px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--line-2), 0 40px 90px rgba(0,0,0,.6); }
@media (max-width: 899px) { .phone { width: min(calc(100% - 14px), 320px, calc(62dvh * 9 / 16)); } }
.phone video, .phone img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.bigplay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; border: 0; background: transparent; transition: opacity .25s; }
.bigplay span { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.25); transition: transform .2s var(--ease); }
.bigplay:hover span { transform: scale(1.06); }
.bigplay svg.i { width: 28px; height: 28px; fill: #fff; stroke: none; margin-left: 4px; }
.playing .bigplay { opacity: 0; pointer-events: none; }
.vtag { position: absolute; top: 14px; left: 14px; z-index: 4; }
.vtag .badge { background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.vtag .badge::before { display: none; }
.vid-err { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 20px; color: var(--muted); font-size: 13px; }
.vid-err b { color: var(--text); }
.stamp { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 70; }
.stamp span { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 9vw, 54px); letter-spacing: .06em; color: var(--stamp, var(--ok)); border: 5px solid var(--stamp, var(--ok)); border-radius: 16px; padding: 10px 22px; transform: rotate(-12deg) scale(2.2); opacity: 0; background: rgba(4, 12, 10, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); white-space: nowrap; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.stamp.go span { animation: stamp 1.6s var(--ease) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-12deg) scale(2.2); } 18% { opacity: 1; transform: rotate(-12deg) scale(.94); } 26% { transform: rotate(-12deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: rotate(-12deg) scale(1); } }
.ctrl { width: min(100%, 340px); display: grid; gap: 10px; }
.ctrl-row { display: flex; align-items: center; gap: 10px; }
.ctrl-row .time { font-family: var(--f-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: 1; min-width: 0; }
.scrub { position: relative; height: 28px; }
.scrub .track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.scrub .fill { height: 100%; width: 0; background: var(--text); }
.scrub input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.markers { position: absolute; left: 0; right: 0; top: 0; height: 28px; pointer-events: none; }
.mk { position: absolute; top: 5px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); border: 2px solid var(--bg); pointer-events: auto; cursor: pointer; padding: 0; transition: transform .15s; }
.mk:hover, .mk.on { transform: rotate(-45deg) scale(1.25); }
.mk.agency { background: var(--champ); }
.mk.done { background: var(--ok); }
.vers { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; }
.vers button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.vers button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.kbd-hint { margin: 0; text-align: center; font-size: 11px; color: var(--dim); }
@media (hover: none), (max-width: 899px) { .kbd-hint { display: none; } }
.script-stage { width: 100%; max-width: 620px; padding: 24px 22px; border-radius: 24px; background: linear-gradient(170deg, color-mix(in oklab, var(--accent) 10%, var(--surface)), var(--surface)); border: 1px solid var(--line-2); }
.script-stage pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--f-body); font-size: 17px; line-height: 1.7; }
.script-stage .k { margin-bottom: 14px; }

.panel { display: grid; gap: 22px; min-width: 0; }
.info { display: grid; gap: 12px; min-width: 0; }
.info h1 { font-size: clamp(24px, 6vw, 36px); line-height: 1.12; overflow-wrap: anywhere; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tags .when { font-size: 12px; font-weight: 700; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: 13px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts svg.i { width: 15px; height: 15px; }
.plat { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-2); font-size: 11px; font-weight: 700; color: var(--text); white-space: nowrap; }
.texts { display: grid; gap: 22px; min-width: 0; }
.copyable { position: relative; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.copybtn { float: right; margin: -4px -6px 6px 10px; }
details.more { gap: 0; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more .chev { margin-left: auto; display: inline-grid; transition: transform .2s; }
details.more[open] .chev { transform: rotate(90deg); }
details.more[open] summary { margin-bottom: 12px; }
.script-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.65; }
.sep { border-top: 1px solid var(--line); padding-top: 14px; }
.tools-row { align-items: center; }
.tools-row .btn { flex: 0 0 auto; }
.mini-select { min-height: 36px !important; width: auto !important; padding: 0 12px !important; font-size: 13px !important; border-radius: 999px !important; }
.upl { display: grid; gap: 6px; }
.fixlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fixlist li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.fixlist .fx { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 0; }
.fixlist .fx svg.i { width: 14px; height: 14px; }
.fixlist li.done .fx { background: var(--ok); color: #04130C; border-color: transparent; }
.fixlist li.done .fl-t { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--muted) 60%, transparent); }
.fl-t { min-width: 0; overflow-wrap: anywhere; padding-top: 3px; font-size: 14px; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 14px; background: color-mix(in oklab, var(--bad) 10%, transparent); color: var(--bad); font-size: 14px; }
.danger-zone span { flex: 1 1 200px; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ev { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.ev-b { min-width: 0; }
.ev .head { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.ev .head b { font-size: 14px; }
.ev .head .verb { font-size: 13px; }
.ev .head time { font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
.ev .txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.ev .bubble { margin-top: 6px; padding: 11px 13px; border-radius: 4px 16px 16px 16px; background: var(--surface-2); border: 1px solid var(--line); }
.ev .bubble.resolved { opacity: .7; }
.ev.mine .bubble { background: color-mix(in oklab, var(--accent) 9%, var(--surface-2)); }
.ev.hl .bubble { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent); }
.resolve { margin-left: auto; border: 1px solid var(--line-2); background: transparent; border-radius: 999px; min-height: 26px; padding: 0 10px; font-size: 11px; font-weight: 800; color: var(--muted); }
.resolve:hover { color: var(--ok); border-color: var(--ok); }
.tstamp { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font-family: var(--f-mono); font-size: 11px; font-weight: 700; margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.tstamp svg.i { width: 12px; height: 12px; }
.vchip { font-family: var(--f-mono); font-size: 10px; color: var(--dim); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.composer { display: grid; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); }
.composer textarea { width: 100%; min-height: 76px; border: 0; background: transparent; resize: vertical; outline: none; font-size: 16px; line-height: 1.5; color: var(--text); }
.composer .bar { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.pin { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; font-family: var(--f-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.pin[aria-pressed="true"] { border-style: solid; border-color: var(--accent); color: var(--accent); }
.pin svg.i { width: 14px; height: 14px; }

/* ── преглед „един по един“ ──────────────────────────── */
body.rv-on { overflow: hidden; }
.rv { position: fixed; inset: 0; z-index: 35; background: var(--bg); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gut-r) calc(env(safe-area-inset-bottom, 0px) + 12px) var(--gut); }
.rv::before { content: ""; position: absolute; inset: -20% -20% auto; height: 60%; background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 22%, transparent), transparent); pointer-events: none; z-index: -1; }
.rv-top { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.rv-dots { flex: 1; display: flex; gap: 4px; min-width: 0; }
.rv-dots i { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-3); }
.rv-dots i.d { background: var(--accent); opacity: .5; }
.rv-dots i.c { background: var(--accent); }
.rv-body { display: grid; justify-items: center; align-content: start; gap: 14px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 4px 4px 12px; }
.rv-phone { width: min(calc(100% - 14px), 300px, calc(50dvh * 9 / 16)); }
.rv-prog { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.25); z-index: 4; overflow: hidden; }
.rv-prog i { display: block; height: 100%; width: 0; background: #fff; }
.rv-script { max-height: 50dvh; overflow-y: auto; }
.rv-info { width: 100%; max-width: 520px; display: grid; gap: 6px; text-align: center; justify-items: center; }
.rv-info .display { font-size: clamp(20px, 5.4vw, 28px); }
.rv-cap { margin: 4px 0 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rv-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; width: 100%; max-width: 560px; margin: 0 auto; padding-top: 10px; }
.rv-actions .hold { grid-column: 1 / -1; order: -1; }
.rv-sheet { width: 100%; max-width: 560px; margin: 0 auto; display: grid; gap: 10px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); }
.rv-sheet textarea { min-height: 84px; }
.rv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rv-row .btns .btn { flex: 0 0 auto; }
.rv-end { display: grid; justify-items: center; align-content: center; text-align: center; gap: 16px; padding: 20px; }
.rv-end .display { font-size: clamp(28px, 7vw, 48px); }
.rv-ok { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--ok) 16%, transparent); color: var(--ok); }
.rv-ok svg.i { width: 40px; height: 40px; stroke-width: 2.4; }
@media (min-width: 900px) {
  .rv-body { grid-template-columns: auto minmax(0, 420px); justify-content: center; align-items: center; align-content: center; gap: 40px; }
  .rv-phone { width: min(320px, calc(62dvh * 9 / 16)); }
  .rv-info { text-align: left; justify-items: start; }
  .rv-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); max-width: 760px; }
  .rv-actions .hold { grid-column: auto; order: 0; }
}

/* ── календар ────────────────────────────────────────── */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.cal-head .display { font-size: clamp(22px, 5vw, 32px); }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal { display: none; }
@media (min-width: 820px) {
  .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--line); gap: 1px; }
  .agenda { display: none !important; }
  .mini-cal { display: none !important; }
}
.cal .dow { background: var(--bg-2); padding: 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.cal .day { background: var(--surface); min-height: 108px; padding: 8px; display: grid; align-content: start; gap: 5px; min-width: 0; }
.cal .day.out { background: var(--bg-2); }
.cal .day.out .d { color: var(--dim); }
.cal .day.today .d { background: var(--accent); color: var(--accent-ink); }
.cal .d { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cal .ev-chip { display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 8px; background: var(--surface-2); text-decoration: none; font-size: 11.5px; font-weight: 700; min-width: 0; border-left: 3px solid var(--c, var(--accent)); }
.cal .ev-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev-chip:hover { background: var(--surface-3); }
.cal .day { cursor: pointer; transition: background .15s, box-shadow .15s; }
.cal .day:hover { background: var(--surface-2); }
.cal .day.out:hover { background: var(--surface); }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.cal .day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal .ev-more { font-size: 11px; font-weight: 800; color: var(--muted); padding-left: 4px; }
.cal .ev-chip.shoot { border-left-color: var(--champ); color: var(--champ); background: color-mix(in oklab, var(--champ) 10%, var(--surface)); }
.cal .ev-chip.shoot svg.i { width: 13px; height: 13px; flex: none; }
.cal-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: -10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cal-legend i.lg-shoot { background: var(--champ); }
/* панел за избрания ден */
.day-panel { display: grid; gap: 14px; scroll-margin-top: 80px; }
.day-panel.is-today { border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.dp-head { display: flex; align-items: center; gap: 10px; }
.dp-t { flex: 1; display: grid; text-align: center; line-height: 1.25; min-width: 0; }
.dp-t b { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.dp-t span { font-size: 12px; color: var(--muted); font-weight: 700; }
.day-panel.is-today .dp-t span { color: var(--accent); }
.dp-sec { display: grid; gap: 8px; }
.dp-k { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dp-k svg.i { width: 15px; height: 15px; color: var(--accent); }
.dp-k.shoot svg.i { color: var(--champ); }
.dp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-top: 1px solid var(--line); }
.dp-row:first-child { border-top: 0; }
.dp-row > .rowlink { border-top: 0; }
.redate { position: relative; flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; margin-right: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s; }
.redate:hover, .redate:focus-within { color: var(--text); border-color: var(--champ); }
.redate svg.i { width: 16px; height: 16px; pointer-events: none; }
.redate input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; font-size: 16px; }
.redate input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dp-empty { margin: 0; text-align: center; padding: 6px 0; }
.dp-add { justify-content: center; }
.agenda .day-g-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; }
.agenda .day-g-h svg.i { width: 15px; height: 15px; }
.agenda .day-g.today .day-g-h { color: var(--accent); }
.agenda > .h2 { margin: 6px 0 0; }
.agenda { display: grid; gap: 18px; }
.mini-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.mini-cal > span, .mini-cal > button { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; position: relative; }
.mini-cal > button { border: 0; background: transparent; color: var(--text); padding: 0; cursor: pointer; transition: background .15s, box-shadow .15s; }
.mini-cal > button:active { background: var(--surface-2); }
.mini-cal .sel { box-shadow: inset 0 0 0 2px var(--accent); }
.mini-cal .today.sel { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px color-mix(in oklab, var(--accent) 35%, transparent); }
.mini-cal em { position: absolute; top: 2px; right: 3px; font-style: normal; font-size: 9px; font-weight: 800; color: var(--accent); }
.mini-cal .today em { color: var(--accent-ink); }
.mini-cal .shoot::before { content: ""; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--champ); transform: translateX(-5px); }
.mini-cal .shoot.has::after { transform: translateX(5px); }
.mini-cal .dow { aspect-ratio: auto; font-size: 10px; color: var(--dim); font-weight: 800; padding-bottom: 4px; }
.mini-cal .out { color: var(--dim); opacity: .5; }
.mini-cal .today { background: var(--accent); color: var(--accent-ink); }
.mini-cal .has::after { content: ""; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.mini-cal .today.has::after { background: var(--accent-ink); }
.agenda .day-g { display: grid; gap: 8px; }
.agenda .day-g h3 { margin: 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.agenda .day-g.today h3 { color: var(--accent); }

/* ── заявки ──────────────────────────────────────────── */
.req { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.req .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.req .top b { font-size: 16px; overflow-wrap: anywhere; min-width: 0; }
.req p { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.req .s { font-size: 12px; color: var(--dim); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.req .s .cdot { width: 8px; height: 8px; }
.req .btns .btn { flex: 0 0 auto; }
.req-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .req-grid { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); } }

/* ── клиенти (админ) ─────────────────────────────────── */
.cgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.people { display: grid; gap: 8px; }
.people.narrow { max-width: 560px; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.person > div { min-width: 0; flex: 1; }
.person b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person > div > span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ccard.static .btns .btn { flex: 0 0 auto; }

/* ── модал, меню, тостове ────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 5, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 22px var(--gut-r) 0 var(--gut);
  display: grid; gap: 16px; animation: up .3s var(--ease); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 720px) { .modal { left: 50%; right: auto; bottom: auto; top: 50%; width: min(600px, calc(100vw - 40px)); max-height: 88dvh; border-radius: 26px; border-bottom: 1px solid var(--line-2); transform: translate(-50%, -50%); padding: 28px 28px 0; animation: pop .3s var(--ease); } }
@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } }
.modal .mh { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal .mh h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 20px; min-width: 0; overflow-wrap: anywhere; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 12px var(--gut-r) calc(env(safe-area-inset-bottom, 0px) + 16px) var(--gut); background: var(--surface); border-top: 1px solid var(--line); }
@media (min-width: 720px) { .modal .foot { margin: 0 -28px; padding: 14px 28px 22px; } }
body.locked { overflow: hidden; }
.menu { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top, 0px) + 62px); right: var(--gut-r); width: min(290px, calc(100vw - 32px)); padding: 8px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0,0,0,.5); display: grid; gap: 2px; animation: fade .15s; }
.menu .mi { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 0; background: transparent; text-align: left; font-weight: 700; font-size: 14px; text-decoration: none; }
.menu .mi:hover, .menu .mi:focus-visible { background: var(--surface-3); }
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; }
.menu .who span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; font-family: var(--f-mono); }
#toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 14px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
body.rv-on #toasts { bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); }
@media (min-width: 1000px) { #toasts { bottom: 28px; left: var(--side); } }
.toast { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.4); animation: up .25s var(--ease); }
.toast svg.i { color: #1E8F63; }
.demo-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 16px; font-size: 12px; font-weight: 700; color: #0A0F0D; background: var(--champ); text-align: center; }
.demo-banner button { border: 0; background: rgba(0,0,0,.12); border-radius: 999px; min-height: 26px; padding: 0 12px; font-weight: 800; font-size: 12px; color: inherit; }
.loading { min-height: 100dvh; display: grid; place-items: center; }
.loading .ring { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--champ); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* сътрудници: одобрение „и от…“ */
.endorse-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.endorse-strip .okchip { max-width: 100%; }

/* воден знак за сътрудници и наблюдатели */
.wm { position: absolute; inset: -35%; z-index: 3; pointer-events: none; user-select: none; -webkit-user-select: none; display: grid; grid-template-columns: repeat(3, 1fr); align-content: space-evenly; justify-items: center; gap: 34px 8px; transform: rotate(-26deg); animation: wmdrift 22s ease-in-out infinite alternate; }
.wm span { font: 700 11px/1 var(--f-body); letter-spacing: .06em; white-space: nowrap; color: rgba(255,255,255,.30); text-shadow: 0 0 3px rgba(0,0,0,.65), 0 0 1px rgba(0,0,0,.9); }
@keyframes wmdrift { from { transform: rotate(-26deg) translate(-3%, -2%); } to { transform: rotate(-26deg) translate(3%, 3%); } }
@media (prefers-reduced-motion: reduce) { .wm { animation: none; } }

/* брандове от сайта (табло на екипа) */
.pv-row .pv-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--champ); }
.pv-row .pv-ic svg.i { width: 16px; height: 16px; }
.small-empty { padding: 26px 18px; }

/* ═════════════ Режим „Снимки“ ═════════════ */
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.sh-tip { align-self: end; }
.sh-group .sec-head h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-live { width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 0 rgba(255,77,77,.6); animation: shLive 1.6s infinite; flex: none; }
@keyframes shLive { 70% { box-shadow: 0 0 0 8px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }
.sh-cards { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .sh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sh-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--c, var(--accent)); transition: border-color .2s, background .2s; }
.sh-card:hover { border-color: var(--line-2); }
.sh-card.done { background: color-mix(in oklab, var(--ok) 6%, var(--surface)); }
.sh-pick { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: transparent; color: var(--muted); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 16px; transition: background .2s, border-color .2s, color .2s, transform .2s; }
.sh-pick:hover { color: var(--text); border-color: var(--champ); }
.sh-pick.on { border-style: solid; border-color: transparent; background: var(--accent); color: var(--accent-ink); transform: scale(1.04); }
.sh-pick svg.i { width: 18px; height: 18px; }
.sh-c-main { display: grid; gap: 4px; min-width: 0; text-decoration: none; color: var(--text); }
.sh-c-top { display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-c-title { font-family: var(--f-display); font-weight: 600; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.sh-c-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.sh-c-prog { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.sh-c-prog .bar, .sh-h-prog .bar { flex: 1; max-width: 220px; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.sh-c-prog .bar i, .sh-h-prog .bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--emerald), var(--ok)); transition: width .4s var(--ease); }
.sh-card.done .sh-c-prog { color: var(--ok); }
.sh-date { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.sh-date svg.i { width: 15px; height: 15px; }
.sh-date input { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 6px 8px; font: inherit; font-size: 12.5px; min-width: 0; }
.sh-past { border-top: 1px solid var(--line); padding-top: 14px; }
.sh-past > summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 14px; list-style: none; margin-bottom: 14px; }
.sh-past > summary::-webkit-details-marker { display: none; }
.sh-past .sh-group { opacity: .8; }
.sh-selbar { position: fixed; z-index: 16; left: var(--gut); right: var(--gut-r); bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 12px); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 20px; background: color-mix(in oklab, var(--surface-2) 92%, transparent); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transform: translateY(140%); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .25s; }
.sh-selbar.on { transform: none; opacity: 1; pointer-events: auto; }
.sh-sel-n { display: grid; flex: 1; min-width: 0; font-weight: 800; font-size: 14px; }
.sh-sel-n small { font-weight: 600; font-size: 11.5px; color: var(--muted); }
@media (min-width: 1000px) { .sh-selbar { left: calc(var(--side) + 44px); right: 44px; bottom: 24px; max-width: 720px; margin: 0 auto; } }
@media (max-width: 400px) { .sh-selbar .btn.ghost { display: none; } }

/* сценарий в страницата на материала */
.script-stage.reader { max-width: 680px; }
.sh-reader { display: grid; gap: 14px; }
.sh-r-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sh-r-head .eyebrow { margin: 0; }
.sh-r-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-r-title { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.sh-reader.compact { padding-top: 12px; }
.sh-reader .sh-scene { gap: 8px; }
.sh-reader .sh-b { cursor: default; }
.sh-reader .sh-rep { font-size: 16px; }

/* режим за снимане */
body.shoot-on .topbar, body.shoot-on .tabbar { display: none !important; }
body.shoot-on .view { padding-top: 0; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
body.shoot-light { background: #f4f1ea; }
body.shoot-light .atmo, body.shoot-light .grain { display: none; }
.sh-run { --sh-page: var(--bg); --fs: 19px; --sh-card: var(--surface); --sh-card-2: var(--surface-2); --sh-line: var(--line); --sh-text: var(--text); --sh-muted: var(--muted); --sh-bar: color-mix(in oklab, var(--bg) 90%, transparent); display: grid; gap: 22px; color: var(--sh-text); max-width: 820px; width: 100%; margin: 0 auto; }
.sh-run.light { --sh-page: #f4f1ea; --sh-card: #ffffff; --sh-card-2: #f1ede4; --sh-line: rgba(20,30,25,.12); --sh-text: #111915; --sh-muted: #59645e; --sh-bar: rgba(244,241,234,.94); --accent: #0b7d5d; --accent-ink: #fff; }
.sh-bar { position: sticky; top: 0; z-index: 14; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gut-r) 10px var(--gut); display: grid; gap: 10px; background: var(--sh-bar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--sh-line); }
@media (min-width: 1000px) { .sh-bar { margin: 0 -44px; padding: 16px 44px 12px; } }
.sh-bar-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sh-back { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--sh-text); background: var(--sh-card); border: 1px solid var(--sh-line); }
.sh-bar-t { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.sh-bar-t b { font-family: var(--f-display); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-total { font-size: 12px; color: var(--sh-muted); font-weight: 700; }
.sh-prompt-btn { flex: none; }
@media (max-width: 380px) { .sh-prompt-btn span { display: none; } }
.sh-prog { height: 4px; border-radius: 99px; background: var(--sh-card-2); overflow: hidden; }
.sh-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--emerald), var(--ok)); transition: width .4s var(--ease); }
.sh-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-chars, .sh-tgroup { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-tgroup { padding-left: 8px; border-left: 1px solid var(--sh-line); }
@media (max-width: 640px) { .sh-tgroup { padding-left: 0; border-left: 0; } .sh-chars { width: 100%; } }
.sh-char { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--sh-line); background: var(--sh-card); color: var(--sh-text); font-weight: 800; font-size: 13px; white-space: nowrap; }
.sh-char i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.sh-char[aria-pressed="true"] { background: var(--c, var(--accent)); border-color: transparent; color: #0a0f0d; }
.sh-char[aria-pressed="true"] i { background: #0a0f0d; }
.sh-tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 9px; border-radius: 10px; border: 1px solid var(--sh-line); background: var(--sh-card); color: var(--sh-text); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.sh-tool svg.i { width: 16px; height: 16px; }
.sh-tool > span { display: none; }
.sh-tool[aria-pressed] > span { display: inline; }
.sh-tool[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
@media (max-width: 560px) { .sh-tool[aria-pressed] > span { display: none; } }
.sh-jump { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 0 var(--gut-r) 0 var(--gut); }
.sh-jump::-webkit-scrollbar { display: none; }
.sh-jump a { display: inline-flex; align-items: center; gap: 8px; flex: none; max-width: 240px; height: 32px; padding: 0 12px 0 4px; border-radius: 99px; background: var(--sh-card); border: 1px solid var(--sh-line); color: var(--sh-text); text-decoration: none; font-size: 12.5px; font-weight: 700; }
.sh-jump a b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sh-card-2); font-size: 11px; flex: none; }
.sh-jump a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-jump a em { font-style: normal; color: var(--sh-muted); font-size: 11.5px; flex: none; }
.sh-jump a.done b { background: var(--ok); color: #04130c; }
.sh-doc { display: grid; gap: 34px; }
.sh-script { display: grid; gap: 18px; scroll-margin-top: 140px; }
.sh-head { display: grid; gap: 6px; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, color-mix(in oklab, var(--c, var(--accent)) 14%, var(--sh-card)), var(--sh-card)); border: 1px solid var(--sh-line); }
.sh-h-top { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: var(--sh-muted); flex-wrap: wrap; }
.sh-h-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--accent)); color: #0a0f0d; font-family: var(--f-body); font-size: 11px; }
.sh-head h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: calc(var(--fs) * 1.15); line-height: 1.2; overflow-wrap: anywhere; }
.sh-h-sub { margin: 0; color: var(--sh-muted); font-size: 13px; }
.sh-h-prog { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: var(--sh-muted); }
.sh-script.done .sh-h-prog .txt { color: var(--ok); }
.sh-scene { display: grid; gap: 10px; }
.sh-sc-h { position: sticky; top: var(--sh-stick, 150px); z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; background: linear-gradient(var(--sh-page) 75%, transparent); }
.sh-reader .sh-sc-h { position: static; }
.sh-sc-n { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--sh-card-2, var(--surface-2)); border: 1px solid var(--sh-line, var(--line)); font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--champ); }
.sh-run.light .sh-sc-n { color: #8a6f3a; }
.sh-sc-h b { font-family: var(--f-display); font-weight: 600; font-size: calc(var(--fs, 17px) * .9); min-width: 0; overflow-wrap: anywhere; }
.sh-sc-c { font-style: normal; font-size: 12px; font-weight: 800; color: var(--sh-muted); }
.sh-sc-all { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--sh-line); background: var(--sh-card); color: var(--sh-text); font-size: 12px; font-weight: 800; }
.sh-sc-all svg.i { width: 14px; height: 14px; }
.sh-scene.done .sh-sc-c { color: var(--ok); }
.sh-b { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--sh-card, var(--surface)); border: 1px solid var(--sh-line, var(--line)); transition: opacity .25s, background .25s, border-color .25s, transform .15s; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.sh-b[role="button"] { cursor: pointer; }
.sh-b[role="button"]:active { transform: scale(.99); }
.sh-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sh-bm { display: grid; gap: 7px; min-width: 0; }
.sh-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-who b { font-family: var(--f-display); font-weight: 700; font-size: calc(var(--fs, 17px) * .78); letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.sh-run.light .sh-who b { filter: brightness(.62) saturate(1.4); }
.sh-dir { font-size: calc(var(--fs, 17px) * .72); font-style: italic; color: var(--sh-muted, var(--muted)); overflow-wrap: anywhere; }
.sh-tag { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; background: rgba(147,180,255,.16); color: #93b4ff; }
.sh-tag.cam { background: rgba(255,111,174,.16); color: #ff6fae; }
.sh-rep { margin: 0; font-size: var(--fs, 17px); line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.sh-note { margin: 0; font-size: 13px; color: var(--sh-muted, var(--muted)); font-style: italic; }
.t-line { border-left: 4px solid var(--c); }
.sh-lab { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sh-muted, var(--muted)); }
.sh-lab svg.i { width: 16px; height: 16px; color: var(--champ); }
.sh-lab .sh-dir { font-family: var(--f-body); letter-spacing: 0; text-transform: none; font-size: 12px; }
.sh-txt { margin: 0; font-size: calc(var(--fs, 17px) * .86); line-height: 1.55; color: var(--sh-text, var(--text)); overflow-wrap: anywhere; }
.t-action { background: var(--sh-card-2, var(--surface-2)); border-style: dashed; }
.t-sound .sh-lab svg.i { color: #bba6ff; }
.sh-screen { padding: 16px; border-radius: 12px; background: #000; color: #fff; text-align: center; font-family: var(--f-display); font-weight: 800; font-size: calc(var(--fs, 17px) * 1.05); letter-spacing: .03em; overflow-wrap: anywhere; }
.sh-n { margin: 0; padding: 0 4px; font-size: 13.5px; color: var(--sh-muted, var(--muted)); font-style: italic; overflow-wrap: anywhere; }
.sh-plain p { margin: 0 0 12px; font-size: var(--fs, 17px); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.sh-check { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--sh-line, var(--line-2)); color: transparent; transition: background .2s, border-color .2s, color .2s, transform .2s; flex: none; }
.sh-check svg.i { width: 18px; height: 18px; stroke-width: 3; }
.sh-by { font-size: 11.5px; font-weight: 700; color: var(--ok); min-height: 0; }
.sh-by:empty { display: none; }
.sh-b.done { opacity: .5; border-color: color-mix(in oklab, var(--ok) 30%, transparent); }
.sh-b.done .sh-rep, .sh-b.done .sh-txt, .sh-b.done .sh-screen { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in oklab, var(--ok) 80%, transparent); }
.sh-b.done .sh-check { background: var(--ok); border-color: var(--ok); color: #04130c; transform: scale(1.05); }
.has-char .t-line:not(.mine) { opacity: .42; }
.has-char .t-line.done:not(.mine) { opacity: .3; }
.t-line.mine { box-shadow: 0 0 0 2px var(--c), 0 14px 40px -18px var(--c); }
.t-line.mine .sh-rep { font-size: calc(var(--fs) * 1.08); }
.hide-done .sh-b.done { display: none; }
.hide-done .sh-scene.done { opacity: .55; }
.hide-done .sh-scene.done .sh-sc-h::after { content: "✓ заснета"; font-size: 12px; font-weight: 800; color: var(--ok); }
.sh-b.flash { animation: shFlash 1.2s ease; }
@keyframes shFlash { 0%, 100% { box-shadow: none; } 25% { box-shadow: 0 0 0 3px var(--accent), 0 0 40px -6px var(--accent); } }
.sh-next { position: fixed; z-index: 15; right: var(--gut-r); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px; border-radius: 99px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px; box-shadow: 0 18px 40px -10px rgba(0,0,0,.6); }
.sh-next[hidden] { display: none; }
@media (min-width: 1000px) { .sh-next { right: 44px; bottom: 28px; } }
.sh-end { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 30px 16px; border-radius: 22px; border: 1px dashed var(--sh-line); color: var(--sh-muted); }
.sh-end svg.i { width: 28px; height: 28px; color: var(--champ); }
.sh-end b { color: var(--sh-text); font-family: var(--f-display); font-size: 17px; }

/* ═════════════ Суфлер ═════════════ */
html.pr-lock, html.pr-lock body { overflow: hidden; }
.pr { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; touch-action: none; }
.pr-stage { position: absolute; inset: 0; overflow: hidden; cursor: pointer; }
.pr-text { padding: 38vh max(22px, env(safe-area-inset-right, 0px)) 62vh max(22px, env(safe-area-inset-left, 0px)); max-width: 1000px; margin: 0 auto; font-family: var(--f-body); font-weight: 700; line-height: 1.38; will-change: transform; transform-origin: 50% 0; }
.pr-text p { margin: 0 0 .55em; overflow-wrap: anywhere; }
.pr-line { margin-bottom: 1.1em; }
.pr-who { display: block; margin-bottom: .2em; font-size: .36em; letter-spacing: .14em; text-transform: uppercase; color: var(--c, #e6cf9f); font-weight: 800; }
.pr-scene, .pr-sep { font-size: .34em !important; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.4); margin: 1.2em 0 .6em !important; font-weight: 800; }
.pr-sep { color: #e6cf9f; }
.pr-raw { font-weight: 600; }
.pr-guide { position: absolute; left: 0; right: 0; top: 38vh; height: 0; border-top: 2px solid rgba(230,207,159,.55); pointer-events: none; z-index: 2; }
.pr-guide::before, .pr-guide::after { content: ""; position: absolute; top: -9px; border: 8px solid transparent; }
.pr-guide::before { left: 6px; border-left-color: #e6cf9f; }
.pr-guide::after { right: 6px; border-right-color: #e6cf9f; }
.pr-stage::before, .pr-stage::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.pr-stage::before { top: 0; height: 22vh; background: linear-gradient(#000, transparent); }
.pr-stage::after { bottom: 0; height: 30vh; background: linear-gradient(transparent, #000); }
.pr-count { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 34vmin; color: #e6cf9f; background: rgba(0,0,0,.55); pointer-events: none; }
.pr-count[hidden] { display: none; }
.pr-ui { position: absolute; inset: 0; z-index: 5; pointer-events: none; transition: opacity .35s; }
.pr.ui-off .pr-ui { opacity: 0; }
.pr-ui > * { pointer-events: auto; }
.pr-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 12px) max(14px, env(safe-area-inset-right, 0px)) 12px max(14px, env(safe-area-inset-left, 0px)); background: linear-gradient(rgba(0,0,0,.85), transparent); }
.pr-top b { flex: 1; font-family: var(--f-display); font-size: 15px; }
.pr-x, .pr-btn, .pr-play, .pr-ctl button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; display: inline-grid; place-items: center; }
.pr-x { width: 42px; height: 42px; border-radius: 12px; }
.pr-btn { height: 42px; min-width: 42px; padding: 0 12px; border-radius: 12px; grid-auto-flow: column; gap: 6px; font-weight: 700; font-size: 13px; }
.pr-btn[aria-pressed="true"] { background: #e6cf9f; color: #0a0f0d; border-color: transparent; }
.pr-chars { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 66px); left: 0; right: 0; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 0 14px; }
.pr-chars button { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.5); color: #fff; font-weight: 800; font-size: 12.5px; }
.pr-chars button[aria-pressed="true"] { background: var(--c, #e6cf9f); color: #0a0f0d; border-color: transparent; }
.pr-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 20px max(14px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(14px, env(safe-area-inset-left, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.9) 40%); }
.pr-play { width: 64px; height: 64px; border-radius: 50%; background: #e6cf9f; color: #0a0f0d; border: 0; order: 0; }
.pr-play svg.i { width: 26px; height: 26px; }
.pr-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,.65); font-weight: 700; }
.pr-ctl > span { letter-spacing: .08em; text-transform: uppercase; }
.pr-ctl button { width: 36px; height: 36px; border-radius: 10px; }
.pr-ctl button svg.i { width: 16px; height: 16px; }
.pr-v { min-width: 28px; text-align: center; font-family: var(--f-mono); color: #fff; font-size: 13px; }
@media (max-width: 520px) { .pr-bottom { gap: 8px; } .pr-ctl > span { display: none; } }


/* ── търсене в „Съдържание“ ── */
.qbar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.qbar:focus-within { border-color: var(--line-2); }
.qbar svg.i { width: 18px; height: 18px; color: var(--muted); flex: none; }
.qbar .input { border: 0; background: transparent; padding: 13px 0; min-width: 0; flex: 1; box-shadow: none; }
.qbar .input:focus { outline: none; box-shadow: none; }
.q-count { margin: 0 0 10px; }
.grid-box { min-width: 0; }

/* ── изтриване: само версия или всичко ── */
.del-menu { display: grid; gap: 8px; }
.del-menu .dz-t { font-size: 14px; color: var(--text); }
.dz-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.dz-opt:hover { border-color: var(--champ); }
.dz-opt > span { display: grid; gap: 2px; min-width: 0; }
.dz-opt b { font-size: 14px; }
.dz-opt small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.dz-opt svg.i { width: 20px; height: 20px; color: var(--champ); }
.dz-opt.bad { border-color: color-mix(in oklab, var(--bad) 45%, transparent); }
.dz-opt.bad b, .dz-opt.bad svg.i { color: var(--bad); }
.del-menu > .btn { justify-self: start; }

/* ── изтриване на коментар ── */
.c-del { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 26px; min-width: 26px; padding: 0 6px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--dim); font-size: 12px; font-weight: 800; cursor: pointer; }
.c-del svg.i { width: 14px; height: 14px; }
.c-del:hover { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 40%, transparent); }
.c-del.armed { color: var(--bad); border-color: var(--bad); background: color-mix(in oklab, var(--bad) 12%, transparent); }
.mini-cal .today.shoot::before { background: var(--accent-ink); }

.datebox.ic-clap { color: var(--champ); }
.datebox.ic-clap svg.i { width: 18px; height: 18px; }

/* ═══════ видео плейър: цял екран, стъпки, скорост ═══════ */
.vp { width: 100%; min-width: 0; display: grid; gap: 12px; justify-items: center; }
.vp-x, .vp-title { display: none; }
.vp-tools { align-items: center; justify-content: flex-start; }
.vp-tools .sp { flex: 1; }
.tool.ic { width: 34px; padding: 0; justify-content: center; flex: none; }
.tool { -webkit-tap-highlight-color: transparent; }
.vp-speed { position: relative; cursor: pointer; flex: none; gap: 4px; padding: 0 10px; }
.vp-speed svg.i { width: 13px; height: 13px; }
.vp-speed.on { color: var(--accent); border-color: var(--accent); }
.vp-speed select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; -webkit-appearance: none; appearance: none; }
.vp-screen { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.vp-box { position: absolute; inset: 0; margin: auto; overflow: hidden; background: #000; }
.vp-box video { display: block; }
.vp-tap { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vp-big { transition: opacity .25s, transform .25s var(--ease); pointer-events: none; }
.vp-big > span { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.25); }
.vp-big svg.i { width: 28px; height: 28px; fill: #fff; stroke: none; margin-left: 4px; }
.vp.ended .vp-big svg.i { fill: none; stroke: #fff; margin-left: 0; }
.vp.playing .vp-big { opacity: 0; transform: scale(.85); }
.vp-rip { position: absolute; top: 50%; z-index: 5; padding: 9px 14px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font: 800 14px/1 var(--f-mono); white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-50%); }
.vp-rip.l { left: 7%; } .vp-rip.r { right: 7%; }
.vp-rip.go { animation: vpRip .7s ease-out; }
@keyframes vpRip { 0% { opacity: 0; transform: translateY(-50%) scale(.85); } 18% { opacity: 1; transform: translateY(-50%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-50%) scale(1.04); } }
.vtag { display: flex; gap: 6px; }
.vtag .badge.q { font-family: var(--f-mono); letter-spacing: .02em; }
.vp-bubble { position: absolute; z-index: 6; left: 10px; right: 10px; top: 50px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: rgba(6,10,9,.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.12); color: #fff; font-size: 13px; line-height: 1.35; box-shadow: 0 16px 40px rgba(0,0,0,.45); cursor: pointer; animation: vpIn .28s var(--ease); transition: opacity .3s; text-align: left; }
.vp-bubble.out { opacity: 0; }
.vp-bubble > div { min-width: 0; }
.vp-bubble b { display: block; font-size: 11.5px; font-weight: 800; opacity: .75; font-family: var(--f-mono); }
.vp-bubble p { margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vp-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--champ); color: #14110a; font: 800 10px/1 var(--f-body); }
.vp-av.client { background: var(--accent); color: var(--accent-ink); }
@keyframes vpIn { from { opacity: 0; translate: 0 -6px; } }
.vp .scrub .fill { width: 100%; transform: scaleX(0); transform-origin: left center; }
.scrub-tip { position: absolute; bottom: 30px; z-index: 3; transform: translateX(-50%); padding: 5px 9px; border-radius: 9px; background: var(--text); color: var(--bg); font: 800 12px/1 var(--f-mono); pointer-events: none; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.vp .ctrl-row .time { overflow: hidden; white-space: nowrap; }
.vp .ctrl-row .time b { color: var(--text); font-weight: 700; }
.vp-c { color: var(--accent); }
.vp-steps { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.vp-st { width: 46px; height: 40px; display: inline-grid; place-items: center; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; transition: transform .1s, background .15s; }
.vp-st:active { transform: scale(.94); background: var(--surface-3); }
.vp-st svg.i { width: 18px; height: 18px; }
.vp-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.vp-seg button { flex: 1 1 0; min-width: 0; height: 32px; padding: 0 4px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 800 12px/1 var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-tap-highlight-color: transparent; }
.vp-seg button[aria-checked="true"] { background: var(--text); color: var(--bg); }
.vp-sheet { display: none; }
@media (max-width: 360px) { .vp .ctrl-row .time .dur { display: none; } }
.rv-vp .tools, .rv-vp .ctrl { width: min(100%, 320px); }
.rv-vp .rv-phone { width: min(calc(100% - 14px), 300px, calc(44dvh * 9 / 16)); }
@media (min-width: 900px) { .rv-vp .rv-phone { width: min(300px, calc(44dvh * 9 / 16)); } .rv-body { align-content: center; align-content: safe center; } }

/* цял екран */
html.vp-lock, html.vp-lock body { overflow: hidden; overscroll-behavior: none; }
.stage.has-full { position: static !important; }
.vp.full { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 85; display: block; background: #000; color: #fff; gap: 0; }
.vp.full:fullscreen { width: 100%; height: 100%; }
.vp.full .phone { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; }
.vp.full .vtag { display: none; }
.vp.full .vp-tools { position: absolute; z-index: 8; left: 0; right: 0; top: 0; width: auto; margin: 0; padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(env(safe-area-inset-right, 0px) + 12px) 30px calc(env(safe-area-inset-left, 0px) + 12px); background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,0)); gap: 8px; transition: opacity .3s; }
.vp.full .vp-tools .sp, .vp.full .vp-dl { display: none; }
.vp.full .vp-x { display: inline-grid; }
.vp.full .vp-title { display: grid; flex: 1; min-width: 0; gap: 1px; line-height: 1.2; }
.vp.full .vp-title b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp.full .vp-title span { font: 700 11px/1.2 var(--f-mono); opacity: .65; }
.vp.full .vp-frame { width: 34px; padding: 0; justify-content: center; }
.vp.full .vp-frame .lbl { display: none; }
.vp.full .tool, .vp.full .icon-btn, .vp.full .vp-st, .vp.full .vp-seg { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vp.full .tool[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }
.vp.full .vp-speed.on { color: #000; background: #fff; }
.vp.full .vp-c { color: #fff; background: color-mix(in oklab, var(--accent) 55%, rgba(255,255,255,.1)); }
.vp.full .vp-seg button { color: rgba(255,255,255,.72); }
.vp.full .vp-seg button[aria-checked="true"] { background: #fff; color: #000; }
.vp.full .vp-ctrl { position: absolute; z-index: 8; left: 0; right: 0; bottom: 0; width: auto; max-width: none; margin: 0; padding: 44px calc(env(safe-area-inset-right, 0px) + 14px) calc(env(safe-area-inset-bottom, 0px) + 12px) calc(env(safe-area-inset-left, 0px) + 14px); background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.8)); transition: opacity .3s; grid-template-columns: minmax(0, 1fr); }
.vp.full .ctrl-row .time { color: rgba(255,255,255,.7); }
.vp.full .ctrl-row .time b { color: #fff; }
.vp.full .scrub .track { background: rgba(255,255,255,.25); }
.vp.full .scrub .fill { background: #fff; }
.vp.full .mk { border-color: #000; }
.vp.full .scrub-tip { background: #fff; color: #000; }
.vp.full .vp-steps { max-width: 440px; justify-self: center; }
.vp.full .vp-bubble { top: calc(env(safe-area-inset-top, 0px) + 66px); left: 50%; right: auto; width: min(520px, calc(100% - 24px)); transform: translateX(-50%); }
.vp.full.idle .vp-tools, .vp.full.idle .vp-ctrl { opacity: 0; pointer-events: none; }
.vp.full.idle .vp-bubble { top: calc(env(safe-area-inset-top, 0px) + 16px); }
.vp.full.idle { cursor: none; }
.vp.full .wm span { font-size: 15px; }
.vp.full .safe { font-size: 16px; }
.vp.full #toasts { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 70px); bottom: auto; z-index: 12; }
@media (min-aspect-ratio: 1/1) {
  .vp.full .vp-ctrl { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 18px; padding-left: max(calc(env(safe-area-inset-left, 0px) + 14px), calc(50% - 520px)); padding-right: max(calc(env(safe-area-inset-right, 0px) + 14px), calc(50% - 520px)); }
  .vp.full .scrub { grid-column: 1 / -1; }
  .vp.full .vp-steps { max-width: none; }
}
/* коментар от цял екран — горе, за да не го скрива клавиатурата */
.vp.full .vp-sheet { display: grid; position: absolute; z-index: 10; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 62px); transform: translateX(-50%); width: min(560px, calc(100% - 24px)); gap: 10px; padding: 14px; border-radius: 20px; background: rgba(14,20,18,.94); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 24px 60px rgba(0,0,0,.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: vpIn .25s var(--ease); }
.vp.full .vp-sheet[hidden] { display: none; }
.vp-sheet-h { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.75); }
.vp-sheet-h svg.i { width: 15px; height: 15px; color: var(--accent); }
.vp-sheet-h b { font-family: var(--f-mono); color: #fff; }
.vp-ta { width: 100%; min-height: 64px; max-height: 30vh; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #fff; font: 500 16px/1.4 var(--f-body); }
.vp-ta:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.vp-sheet .btns { justify-content: flex-end; }
.vp-sheet .btn.ghost { color: #fff; }
.vp.full.commenting .vp-bubble { display: none; }
@media (max-width: 360px) {
  .vp-st { width: 40px; }
  .vp-steps { gap: 6px; }
  .vp-seg button { font-size: 11px; padding: 0 2px; }
}

/* ═══════ зареждане / грешка на видеото ═══════ */
.vp-load { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; align-content: center; gap: 14px; pointer-events: none; }
.vp-load .ring { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.22); border-top-color: #fff; animation: spin .8s linear infinite; }
.vp-slow { max-width: 80%; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.35; text-align: center; }
.vp-err { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; align-content: center; gap: 10px; padding: 22px; text-align: center; background: rgba(5,10,9,.92); color: #fff; font-size: 13px; line-height: 1.45; }
.vp-err b { font-size: 15px; }
.vp-err > span:not(.vp-err-ic) { color: rgba(255,255,255,.75); max-width: 300px; }
.vp-err-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--champ); }
.vp-err-ic svg.i { width: 22px; height: 22px; }
.vp-err .btn { margin-top: 4px; }
.vp.has-err .vp-big { display: none; }

/* ═══════ без интернет ═══════ */
.offline-pill { position: fixed; z-index: 95; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 8px); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 24px); padding: 8px 14px; border-radius: 999px; background: #f4c45a; color: #1d1604; font-size: 12px; font-weight: 800; line-height: 1.3; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s; }
.offline-pill svg.i { width: 15px; height: 15px; flex: none; }
.offline-pill[hidden] { display: none; }

/* ═══════ подсказки при качване ═══════ */
.drop-wrap { display: grid; gap: 10px; }
.adv { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: color-mix(in oklab, #f4c45a 9%, var(--surface)); border: 1px solid color-mix(in oklab, #f4c45a 35%, transparent); }
.adv-i { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.adv-i > svg.i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #f4c45a; }
.adv-i.bad > svg.i { color: var(--bad); }
.adv-i b { display: block; }
.adv-i span { color: var(--muted); }
.adv-how { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.adv-how b { color: var(--text); }
/* лаптоп: целият плейър да се събира в екрана (колоната с видеото стои на място) */
@media (min-width: 900px) {
  .stage .vp:not(.full) .phone { width: min(340px, max(210px, calc((100dvh - 352px) * 9 / 16))); }
}
@media (min-width: 900px) and (max-height: 640px) { .stage { position: static; } }
