/* Студия SnapVideo. Шрифт Inter — ближайший открытый к VK Sans. Минимум рамок:
   поверхности отличаются тоном, линии — только там, где без них каша. */
[data-theme=dark] {
  --app: #0b0b0c; --chrome: rgba(11,11,12,.72); --panel: #141416; --panel2: #1b1b1e; --bg: #202024; --bg2: #2a2a2f;
  --sunk: #0f0f11; --raise: #2c2c31; --line: rgba(255,255,255,.06); --line2: rgba(255,255,255,.12);
  --fg: #f4f4f5; --dim: #a1a1aa; --faint: #63636b;
  --warn: #f5b84a; --warn-soft: rgba(245,184,74,.13); --bad: #ff6b5e; --bad-soft: rgba(255,107,94,.12);
  --ok: #4ade80; --ok-soft: rgba(74,222,128,.13);
  --acc: #f4f4f5; --acc-fg: #0b0b0c; --blue: #5b8cff;
  --shadow: 0 20px 60px rgba(0,0,0,.5); --amb-o: .5;
  color-scheme: dark;
}
[data-theme=light] {
  --app: #f3f3f5; --chrome: rgba(243,243,245,.78); --panel: #ffffff; --panel2: #f7f7f9; --bg: #efeff2; --bg2: #e6e6ea;
  --sunk: #e9e9ec; --raise: #e4e4e8; --line: rgba(0,0,0,.07); --line2: rgba(0,0,0,.13);
  --fg: #111113; --dim: #5d5d66; --faint: #9a9aa3;
  --warn: #b7791f; --warn-soft: rgba(183,121,31,.1); --bad: #d12b1f; --bad-soft: rgba(209,43,31,.08);
  --ok: #15803d; --ok-soft: rgba(21,128,61,.1);
  --acc: #111113; --acc-fg: #fff; --blue: #2d64f0;
  --shadow: 0 20px 60px rgba(0,0,0,.14); --amb-o: .55;
  color-scheme: light;
}
:root { --acc-soft: color-mix(in oklab, var(--acc) 10%, transparent); --ease: cubic-bezier(.2,.8,.2,1); --r: 10px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--app); color: var(--fg); font: 400 13.5px/1.45 'Inter', system-ui, sans-serif;
  font-optical-sizing: auto; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::placeholder { color: var(--faint); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
::selection { background: color-mix(in oklab, var(--blue) 35%, transparent); }
svg { flex: none; }

.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); } .faint { color: var(--faint); }
.small { font-size: 12px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; gap: 6px; }
.hint { font-size: 12px; color: var(--dim); }
.center-t { text-align: center; padding: 30px 0; }
.err { font-size: 12.5px; color: var(--bad); }

/* ── кнопки: одна главная, остальные тихие ─────────────────────────── */
.btn { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--bg); color: var(--fg);
  font-size: 13px; font-weight: 550; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .15s, transform .1s, opacity .15s; }
.btn:hover:not(:disabled) { background: var(--bg2); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; }
.btn.primary { background: var(--acc); color: var(--acc-fg); }
.btn.primary:hover:not(:disabled) { background: var(--acc); filter: brightness(.92); }
.ibtn { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--dim);
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s, transform .1s; }
.ibtn:hover { background: var(--bg); color: var(--fg); }
.ibtn:active { transform: scale(.94); }
.ibtn.solid { background: var(--acc); color: var(--acc-fg); }
.ibtn.solid:hover { background: var(--acc); filter: brightness(.92); }
.ibtn svg, .seg2 svg, .search svg, .es-ico svg, .play-s svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inp { height: 34px; padding: 0 11px; border: 0; border-radius: 9px; background: var(--bg); font-size: 13px; outline: none; min-width: 0;
  transition: box-shadow .15s, background .15s; }
.inp:hover { background: var(--bg2); }
.inp:focus { box-shadow: 0 0 0 2px var(--line2); }
select.inp { color-scheme: inherit; padding-right: 26px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
select.inp option { background: var(--panel); color: var(--fg); }
.link-dim, .link-acc { border: 0; padding: 0; background: none; font-size: 12.5px; }
.link-dim { color: var(--dim); height: 26px; align-self: flex-start; }
.link-dim:hover { color: var(--fg); }
.link-acc { color: var(--dim); font-weight: 550; }
.link-acc:hover { color: var(--fg); }
.pills { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg); }
.pills button { height: 26px; min-width: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--dim);
  font-size: 12.5px; font-weight: 550; white-space: nowrap; transition: background .15s, color .15s; }
.pills button:hover { color: var(--fg); }
.pills button.on { background: var(--raise); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.pills .n { font-size: 11px; color: var(--faint); margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip { height: 28px; padding: 0 11px; border: 0; border-radius: 14px; background: var(--bg); font-size: 12.5px; font-weight: 500; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s; }
.chip:hover { background: var(--bg2); }
.chip.on { background: var(--acc); color: var(--acc-fg); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--bg); }
.tag.warn, .tag.work { background: var(--warn-soft); color: var(--warn); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.review { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.wait { background: var(--bg); color: var(--dim); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ── каркас ─────────────────────────────────────────────────────────── */
.app { position: relative; isolation: isolate; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--amb-o); transition: background .8s; }
.top { height: 54px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 16px; background: var(--chrome); backdrop-filter: blur(20px); }
.brand { display: flex; align-items: center; gap: 9px; margin-right: 18px; font-weight: 750; font-size: 15.5px; letter-spacing: -.02em; }
.brand i { width: 22px; height: 22px; border-radius: 7px; background: var(--acc); position: relative; }
.brand i::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid var(--acc-fg); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 7px 12px; border-radius: 9px; color: var(--dim); font-weight: 550; white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { color: var(--fg); }
.nav a.on { background: var(--bg); color: var(--fg); }
.menu-wrap { position: relative; }
.avatar { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg2); color: var(--fg); font-weight: 650; font-size: 13px; }
.avatar:hover { background: var(--raise); }
.menu { position: absolute; right: 0; top: 40px; z-index: 60; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--panel2);
  box-shadow: var(--shadow), 0 0 0 1px var(--line); animation: rise .15s var(--ease); }
.m-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; font-size: 13px; color: var(--dim); }
.m-row b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.m-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13px; }
.m-item:hover { background: var(--bg); }

.grid { flex: 1; min-height: 0; display: grid; position: relative; gap: 0 10px; padding: 0 10px 10px;
  grid-template-columns: 296px minmax(0,1fr) 392px; grid-template-rows: minmax(0,1fr) auto;
  grid-template-areas: "left center right" "left center build"; }
.app[data-gallery] .grid { grid-template-columns: 520px minmax(0,1fr) 392px; }

.panel { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--panel); border-radius: 16px; overflow: hidden; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.p-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.p-head b { font-weight: 650; font-size: 14px; }
.p-tools { display: flex; gap: 6px; padding: 0 12px 10px; }
.p-tools.wrap { flex-wrap: wrap; }
.search { flex: 1; position: relative; display: flex; }
.search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search .inp { flex: 1; padding-left: 32px; }

/* ── библиотека ─────────────────────────────────────────────────────── */
.sources { grid-area: left; position: relative; }
.app[data-gallery] .sources { display: none; }
.sel-f { flex: 1; min-width: 0; font-weight: 600; }
.ltabs { display: flex; gap: 4px; padding: 0 12px 10px; }
.ltabs button { flex: 1; height: 32px; border: 0; border-radius: 9px; background: none; color: var(--dim); font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.ltabs button:hover { color: var(--fg); }
.ltabs span { font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; margin-left: 2px; }
.ltabs em { font-style: normal; color: var(--warn); }
.app[data-ltab=src] .ltabs [data-ltab=src], .app[data-ltab=vid] .ltabs [data-ltab=vid] { background: var(--bg); color: var(--fg); }
.lt { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.app[data-ltab=src] .lt-vid, .app[data-ltab=vid] .lt-src { display: none; }
.lt .scroll { padding: 0 12px 12px; }
.src-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.card { display: flex; flex-direction: column; gap: 5px; min-width: 0; cursor: pointer; animation: rise .25s var(--ease) both; }
.cover { position: relative; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--bg); transition: transform .2s var(--ease), box-shadow .2s; }
.card:hover .cover { transform: translateY(-2px); }
.card.on .cover { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--acc); }
.cover img, .cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.cover img.ok, .cover video.ok { opacity: 1; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(0,0,0,.55)); pointer-events: none; }
.cover .dur { position: absolute; right: 6px; bottom: 6px; z-index: 1; color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cover .prog { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: #fff; z-index: 2; }
.cover .made { position: absolute; right: 5px; top: 5px; z-index: 1; padding: 2px 6px; border-radius: 7px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  color: #fff; font-size: 11px; font-weight: 650; display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.cover .made:hover { background: rgba(0,0,0,.8); }
.card .nm { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--dim); }
.card.on .nm { color: var(--fg); }
.up .cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.up .cover::after { display: none; }
.up .big { font-size: 13px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
.up.bad .big { color: var(--bad); }
.up .sm { font-size: 11px; color: var(--dim); text-align: center; line-height: 1.25; }
.up .ubar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line2); }
.up .ubar span { display: block; height: 100%; background: var(--acc); transition: width .2s; }
.up .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 0; background: none; color: var(--dim); font-size: 14px; padding: 0; }
.empty-drop { height: 100%; min-height: 240px; border: 1.5px dashed var(--line2); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--dim); cursor: pointer; transition: border-color .15s, color .15s; }
.empty-drop:hover { border-color: var(--dim); color: var(--fg); }
.empty-drop span { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.empty-drop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.drop-over { position: absolute; inset: 8px; border: 2px dashed var(--acc); border-radius: 14px; background: color-mix(in oklab, var(--panel) 85%, transparent);
  display: flex; align-items: center; justify-content: center; font-weight: 600; pointer-events: none; z-index: 5; }
.scrim { display: none; }
.src-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 12px; flex-wrap: wrap; }
.src-foot .sf-in { flex: 1; color: var(--dim); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-foot select { height: 28px; max-width: 120px; font-size: 12px; border-radius: 14px; }
.hint.empty { grid-column: 1 / -1; padding: 28px 8px; text-align: center; }

/* карточка ролика */
.st { position: absolute; left: 6px; bottom: 6px; z-index: 1; display: flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 7px;
  font-size: 11px; font-weight: 650; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #fff; white-space: nowrap; }
.st.ok { background: rgba(22,140,70,.85); }
.st.review { background: rgba(170,115,20,.88); }
.st.bad { background: rgba(200,45,35,.88); }
.st i, .work-btn i, .made i { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.row .st, .sent .st { position: static; backdrop-filter: none; }
.sbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.15); z-index: 2; }
.sbar span { display: block; height: 100%; background: var(--warn); transition: width .4s; }
.vcard .cover { background: var(--sunk); }
.vcard .ph-anim { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%) var(--bg); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }

.work-btn { height: 32px; padding: 0 12px; margin-right: 6px; border: 0; border-radius: 16px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.work-btn:hover { filter: brightness(1.1); }

/* ── превью ─────────────────────────────────────────────────────────── */
.center { grid-area: center; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 12px 4px; }
.stage { flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; }
.frame { position: relative; height: 100%; aspect-ratio: 9/16; max-width: 100%; border-radius: 18px; overflow: hidden; background: #050505;
  container-type: inline-size; box-shadow: var(--shadow); cursor: pointer; }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame.result video { object-fit: contain; }
.cv-btn { position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%); z-index: 6; max-width: 92%;
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 22px; white-space: nowrap;
  background: rgba(12,12,16,.82); color: #fff; font-size: 13px; font-weight: 600; backdrop-filter: blur(8px); cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.cv-btn:hover { background: rgba(30,30,38,.9); }
.cv-btn.busy { cursor: default; }
.cv-btn .spin { width: 13px; height: 13px; }
.nosrc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6b6b73; font-size: 3.6cqw; background: #0d0d10; }
.band { position: absolute; left: 0; right: 0; top: 71%; height: 11%; backdrop-filter: blur(2.2cqw); -webkit-backdrop-filter: blur(2.2cqw); mask: linear-gradient(transparent, #000 25%, #000 75%, transparent); pointer-events: none; }
.caps { position: absolute; left: 6%; right: 6%; top: 76.5%; transform: translateY(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1cqw 2cqw; pointer-events: none; }
.frame.result .band, .frame.result .caps { display: none; }
.plate { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0 .28em; padding: .12em .38em; border-radius: .1em; }
.cw { display: inline-block; white-space: nowrap; line-height: 1.1; paint-order: stroke fill; transition: transform .12s ease, color .12s, background .12s; }
.frame:fullscreen { border-radius: 0; height: 100%; width: auto; aspect-ratio: 9/16; margin: 0 auto; background: #000; }
.frame:fullscreen video { object-fit: contain; }

.transport { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 4px; flex: none; }
.t-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.pbtn { width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--fg); display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.pbtn:hover:not(:disabled) { background: var(--bg); }
.pbtn:disabled { opacity: .35; }
.pbtn svg { width: 18px; height: 18px; fill: currentColor; }
#play { width: 38px; height: 38px; border-radius: 50%; background: var(--acc); color: var(--acc-fg); transition: transform .1s, filter .15s; }
#play:hover:not(:disabled) { filter: brightness(.9); }
#play:active:not(:disabled) { transform: scale(.93); }
#play svg { width: 16px; height: 16px; }
.pbtn.speed { width: auto; min-width: 34px; padding: 0 6px; font-size: 12px; font-weight: 600; color: var(--dim); }
.vol { display: flex; align-items: center; gap: 2px; }
.vol input { -webkit-appearance: none; appearance: none; width: 78px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--fg) var(--p, 100%), var(--line2) var(--p, 100%)); cursor: pointer; }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--fg); border: 0; }
.vol input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--fg); border: 0; }
#mute.off { color: var(--dim); }
.pm button { height: 26px; }
.lane { position: relative; height: 22px; }
.seg { position: absolute; top: 3px; bottom: 3px; min-width: 3px; background: var(--bg2); border-radius: 5px; overflow: hidden; display: flex; align-items: center; padding-left: 5px;
  font-size: 10px; font-weight: 650; color: var(--dim); cursor: pointer; transition: background .15s, color .15s; }
.seg + .seg { margin-left: 1px; }
.seg:hover { background: var(--raise); color: var(--fg); }
.seg.on { background: var(--acc); color: var(--acc-fg); }
.scrub { position: relative; height: 18px; cursor: pointer; touch-action: none; }
.scrub .track { position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--line2); overflow: hidden; transition: top .12s, height .12s; }
.scrub:hover .track, .scrub.drag .track { top: 6px; height: 6px; border-radius: 3px; }
.scrub .buf { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in oklab, var(--fg) 20%, transparent); }
.scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--acc); }
.scrub .knob { position: absolute; top: 9px; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--acc); transform: scale(0); transition: transform .12s; pointer-events: none; }
.scrub:hover .knob, .scrub.drag .knob { transform: scale(1); }
.scrub .tip { position: absolute; bottom: 20px; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: var(--fg); color: var(--app); font-size: 11.5px; font-weight: 600; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }

/* ── анимация сборки поверх кадра ───────────────────────────────────── */
.anim { position: absolute; inset: 0; z-index: 3; background: #09090b; color: #f4f4f5; overflow: hidden; cursor: default; display: flex; flex-direction: column; }
.anim .a-bg { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(28px) brightness(.35) saturate(1.3); transform: scale(1.1); transition: background-image .6s; }
.anim .a-scene { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; }
.anim .a-foot { position: relative; padding: 0 7cqw 7cqw; display: flex; flex-direction: column; gap: 3.2cqw; }
.anim .a-title { font-size: 5.4cqw; font-weight: 700; letter-spacing: -.02em; animation: rise .4s var(--ease); }
.anim .a-sub { font-size: 3.4cqw; color: rgba(255,255,255,.6); margin-top: -2cqw; font-variant-numeric: tabular-nums; }
.anim .a-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.4cqw; }
.anim .a-steps i { height: 1cqw; border-radius: 1cqw; background: rgba(255,255,255,.14); position: relative; overflow: hidden; }
.anim .a-steps i.done { background: #fff; }
.anim .a-steps i.now::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: fillx 2.4s var(--ease) infinite; }
@keyframes fillx { from { transform: scaleX(0); } 70% { transform: scaleX(1); opacity: 1; } to { transform: scaleX(1); opacity: 0; } }

/* очередь: кольца */
.a-rings { position: relative; width: 34cqw; height: 34cqw; }
.a-rings i { position: absolute; inset: 0; border-radius: 50%; border: .5cqw solid rgba(255,255,255,.5); animation: ring 2.4s var(--ease) infinite; }
.a-rings i:nth-child(2) { animation-delay: .8s; } .a-rings i:nth-child(3) { animation-delay: 1.6s; }
.a-rings b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10cqw; font-weight: 750; font-variant-numeric: tabular-nums; }
@keyframes ring { from { transform: scale(.35); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* разбор: лента кадров и луч */
.a-film { position: relative; width: 100%; height: 42cqw; overflow: hidden; mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.a-film .strip { position: absolute; top: 0; height: 100%; display: flex; gap: 2cqw; animation: slide 14s linear infinite; }
.a-film .strip div { width: 23.6cqw; height: 100%; border-radius: 2.4cqw; background-size: cover; background-position: center; flex: none; background-color: #222; }
.a-film .beam { position: absolute; left: 50%; top: -5%; bottom: -5%; width: .6cqw; margin-left: -.3cqw; background: #fff; box-shadow: 0 0 5cqw 2cqw rgba(255,255,255,.45); border-radius: 1cqw; animation: beam 1.8s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes beam { 50% { opacity: .35; } }

/* монтаж: кадры складываются в раскадровку */
.a-board { display: grid; grid-template-columns: repeat(3, 22cqw); gap: 2.2cqw; }
.a-board div { aspect-ratio: 9/16; border-radius: 2.2cqw; background-size: cover; background-position: center; background-color: #222;
  animation: deal .6s var(--ease) both, bob 3s ease-in-out infinite; box-shadow: 0 2cqw 5cqw rgba(0,0,0,.5); }
@keyframes deal { from { opacity: 0; transform: translate(0, 30cqw) rotate(8deg) scale(.6); } }
@keyframes bob { 50% { transform: translateY(-1.2cqw); } }

/* озвучка: волна и фразы */
.a-voice { width: 100%; padding: 0 7cqw; display: flex; flex-direction: column; gap: 5cqw; }
.a-wave { height: 26cqw; display: flex; align-items: center; justify-content: center; gap: 1.1cqw; }
.a-wave i { width: 1.6cqw; border-radius: 1cqw; background: #fff; animation: wave 1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { height: 12%; } 50% { height: var(--h, 70%); } }
.a-lines { display: flex; flex-direction: column; gap: 1.6cqw; }
.a-lines div { font-size: 3.8cqw; line-height: 1.3; color: rgba(255,255,255,.3); transition: color .4s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-lines div.on { color: #fff; }
.a-lines div.cur { color: #fff; animation: pulse 1.2s ease-in-out infinite; }

/* субтитры и рендер: слова появляются на кадре */
.a-render { position: relative; width: 62cqw; aspect-ratio: 9/16; border-radius: 3cqw; overflow: hidden; background-size: cover; background-position: center; box-shadow: 0 3cqw 8cqw rgba(0,0,0,.6); }
.a-render .words { position: absolute; left: 4%; right: 4%; top: 70%; display: flex; justify-content: center; }
.a-render .words span { font: 900 7.4cqw 'Montserrat', sans-serif; text-transform: uppercase; color: #fff; -webkit-text-stroke: 1cqw #000; paint-order: stroke fill; animation: pop .45s var(--ease) both; }
.a-render .sweep { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); background-size: 260% 100%; animation: shimmer 2s linear infinite; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } }

/* проверка */
.a-check { width: 30cqw; height: 30cqw; border-radius: 50%; border: .8cqw solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; position: relative; }
.a-check::before { content: ""; position: absolute; inset: -.8cqw; border-radius: 50%; border: .8cqw solid transparent; border-top-color: #fff; animation: spin 1.1s linear infinite; }
.a-check svg { width: 12cqw; height: 12cqw; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ── правая панель ──────────────────────────────────────────────────── */
.ptabs { display: none; grid-area: tabs; background: var(--panel); }
.ptabs button { flex: 1; height: 46px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--dim); font-weight: 600; }
.app[data-ptab="0"] .ptabs [data-ptab="0"], .app[data-ptab="1"] .ptabs [data-ptab="1"], .app[data-ptab="2"] .ptabs [data-ptab="2"], .app[data-ptab="3"] .ptabs [data-ptab="3"] { color: var(--fg); border-bottom-color: var(--acc); }

.right { grid-area: right; border-radius: 16px 16px 0 0; }
.rtabs { display: flex; gap: 4px; padding: 12px 14px 0; }
.rtabs button { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--dim); font-weight: 600; transition: background .15s, color .15s; }
.rtabs button:hover { color: var(--fg); }
.app[data-rtab=script] .rtabs [data-rtab=script], .app[data-rtab=design] .rtabs [data-rtab=design], .app[data-rtab=info] .rtabs [data-rtab=info] { background: var(--bg); color: var(--fg); }
.r-body { padding: 14px 16px 18px; }
.tab-script, .tab-design, .tab-info { display: flex; flex-direction: column; animation: rise .2s var(--ease); }
.tab-script { gap: 12px; } .tab-design { gap: 24px; } .tab-info { display: none; gap: 14px; }
.app[data-rtab=script] .tab-design, .app[data-rtab=design] .tab-script,
.app[data-rtab=info] .tab-script, .app[data-rtab=info] .tab-design { display: none; }
.app[data-rtab=info] .tab-info { display: flex; }
.tab-script > *, .tab-design > *, .tab-info > *, #ai-done > *, #plist-wrap > *, #ai-run > * { flex-shrink: 0; }
.only-view { display: none !important; }
.app[data-view] .rtabs .only-view { display: inline-block !important; }
#ai-idle, #ai-run, #ai-done, #plist-wrap, #text-wrap { display: flex; flex-direction: column; gap: 10px; }
#ai-run { gap: 12px; }

.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: var(--bg); border-radius: 11px; }
.seg2 button { height: 34px; border: 0; border-radius: 8px; background: none; color: var(--dim); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s, color .15s; }
.seg2 button:hover { color: var(--fg); }
.seg2 button.on { background: var(--raise); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.seg2 svg { width: 16px; height: 16px; }
.pills.sub { align-self: flex-start; }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 12px 26px; text-align: center; }
.es-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--fg); }
.es-ico svg { width: 24px; height: 24px; }
.empty-state b { font-size: 15px; font-weight: 650; }
.empty-state .row { gap: 8px; }

.gen-run { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--bg); }
.scan { height: 54px; border-radius: 8px; overflow: hidden; position: relative; background: repeating-linear-gradient(90deg, var(--bg2) 0 26px, transparent 26px 30px); }
.scan i { position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--fg) 30%, transparent), transparent); animation: scanx 1.6s ease-in-out infinite alternate; }
@keyframes scanx { from { left: -30%; } to { left: 100%; } }
.bar { height: 3px; background: var(--line2); border-radius: 2px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s; }
.skel-tabs { display: flex; gap: 6px; }
.sk { background: var(--bg); border-radius: 4px; animation: pulse 1.8s ease-in-out infinite; }
.skel-tabs .sk { width: 80px; height: 30px; border-radius: 8px; }

.vt { height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: none; color: var(--dim); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.vt:hover { color: var(--fg); }
.vt.on { background: var(--bg); color: var(--fg); }
.vt .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.again { height: 30px; padding: 0 8px; border: 0; background: none; color: var(--dim); font-size: 12.5px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.again:hover { color: var(--fg); }
.idea { font-weight: 650; font-size: 14.5px; line-height: 1.35; text-wrap: pretty; letter-spacing: -.01em; }
.warn-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--warn); }

.bigtext { width: 100%; min-height: 220px; resize: vertical; padding: 14px; border: 0; border-radius: 12px; background: var(--bg); font-size: 14px; line-height: 1.55; outline: none; transition: box-shadow .15s; }
.bigtext:focus { box-shadow: 0 0 0 2px var(--line2); }

.list { display: flex; flex-direction: column; border-radius: 12px; background: var(--panel2); overflow: hidden; }
.ph { display: grid; grid-template-columns: 22px minmax(0,1fr) 26px 18px; gap: 6px; align-items: start; padding: 9px 8px 9px 6px; cursor: pointer; transition: background .15s; animation: rise .2s var(--ease) both; }
.ph + .ph { border-top: 1px solid var(--line); }
.ph:hover { background: color-mix(in oklab, var(--bg) 60%, transparent); }
.ph.on { background: var(--bg); }
.ph.drag { opacity: .4; }
.ph .n { font-size: 11px; font-weight: 650; line-height: 20px; color: var(--faint); text-align: center; cursor: grab; user-select: none; font-variant-numeric: tabular-nums; }
.ph.on .n { color: var(--fg); }
.ph .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ph .tc { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; line-height: 14px; }
.ph textarea { field-sizing: content; resize: none; border: 0; background: none; font-size: 13.5px; line-height: 20px; padding: 0; margin: 0; outline: none; width: 100%; min-height: 20px; overflow: hidden; }
.ph .del { width: 18px; height: 20px; border: 0; background: none; color: var(--faint); padding: 0; font-size: 15px; opacity: 0; transition: opacity .15s; }
.ph:hover .del, .ph.on .del { opacity: 1; }
.ph .del:hover { color: var(--bad); }
.play-s { width: 26px; height: 22px; border: 0; border-radius: 7px; background: none; color: var(--faint); padding: 0; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.play-s:hover { background: var(--bg2); color: var(--fg); }
.play-s.on { color: var(--fg); }
.play-s svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.play-s .spin { width: 12px; height: 12px; border-width: 1.6px; }
.add { height: 38px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--dim); font-size: 13px; font-weight: 550; text-align: left; padding: 0 34px; }
.add:hover { color: var(--fg); }
.skel .ph { cursor: default; animation: none; }
.counts { display: flex; gap: 14px; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }

.block { display: flex; flex-direction: column; gap: 10px; }
.b-head { display: flex; align-items: baseline; gap: 8px; }
.b-head b { font-weight: 650; font-size: 14px; }
.b-head .dim { font-size: 12.5px; }
.pr-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-row:empty { display: none; }
.pr-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border: 0; border-radius: 99px;
  background: var(--bg); color: var(--fg); font-size: 13px; font-weight: 550; cursor: pointer; max-width: 100%; }
.pr-chip:hover { background: var(--bg2); }
.pr-chip.on { background: var(--acc); color: var(--acc-fg); }
.pr-chip > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-chip i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; opacity: .45; }
.pr-chip i:hover { opacity: 1; background: rgba(0,0,0,.15); }
.pr-new { display: flex; gap: 6px; }
.pr-new .inp { flex: 1; }
.voices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vc { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 11px; border: 0; background: var(--bg); cursor: pointer; min-width: 0; text-align: left;
  transition: background .15s, box-shadow .15s; }
.vc:hover { background: var(--bg2); }
.vc > div { flex: 1; min-width: 0; }
.vc b { display: block; font-weight: 600; font-size: 13px; }
.vc span { display: block; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc.on { box-shadow: inset 0 0 0 2px var(--acc); }
.vc .play-s { width: 28px; height: 28px; border-radius: 50%; background: var(--panel); color: var(--fg); }
.vc .play-s:hover { background: var(--acc); color: var(--acc-fg); }

.tracks { display: flex; flex-direction: column; gap: 4px; }
.trk { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 11px; background: var(--bg); cursor: pointer; transition: background .15s, box-shadow .15s; min-width: 0; }
.trk:hover { background: var(--bg2); }
.trk.on { box-shadow: inset 0 0 0 2px var(--acc); }
.trk .play-s { width: 30px; height: 30px; border-radius: 50%; background: var(--panel); color: var(--fg); }
.trk .play-s:hover { background: var(--acc); color: var(--acc-fg); }
.trk .ico { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--dim); }
.trk .ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.trk b { flex: 1; min-width: 0; font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk .d { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.trk .own { font-size: 10.5px; font-weight: 650; color: var(--dim); padding: 1px 6px; border-radius: 6px; background: var(--panel); }
.trk .eq { display: none; gap: 2px; align-items: flex-end; height: 12px; }
.trk .eq i { width: 2px; background: var(--fg); border-radius: 1px; animation: wave .8s ease-in-out infinite; }
.trk.playing .eq { display: flex; }
.mvol { margin-top: 2px; }

/* панель «Текст» */
.tx { gap: 8px; }
.tx-row { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.tx-row > span:first-child { width: 92px; flex: none; font-size: 12.5px; color: var(--dim); }
.tx-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--acc); }
.tx-num { width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.tx-fontw { position: relative; flex: 1; min-width: 0; }
.tx-font { width: 100%; text-align: left; cursor: pointer; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fontpop { position: absolute; z-index: 30; left: 0; right: 0; top: 38px; display: flex; flex-direction: column; gap: 6px; padding: 8px;
  border-radius: 12px; background: var(--panel); box-shadow: 0 12px 32px rgba(0,0,0,.35), 0 0 0 1px var(--line); }
.fp-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; }
.fr { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 18px; color: var(--fg); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 36px; }
.fr:hover { background: var(--bg2); }
.fr.on { background: var(--raise); box-shadow: inset 0 0 0 1px var(--acc); }
.tx-color { width: 44px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.tx-sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.sw { aspect-ratio: 1; border: 0; border-radius: 9px; background: #3a3a40; cursor: pointer; container-type: inline-size;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sw:hover { filter: brightness(1.15); }
.sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--acc); }

.tiles { display: grid; gap: 10px 6px; }
.tiles.q4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tiles.auto { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 8px; }
.tile { display: flex; flex-direction: column; gap: 5px; min-width: 0; cursor: pointer; }
.tile .pv { position: relative; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; container-type: inline-size; background-size: cover; background-position: center; background-color: #1c1c20;
  transition: transform .2s var(--ease), box-shadow .2s; }
.tile .pv::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.tile:hover .pv { transform: translateY(-2px); }
.tile.on .pv { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--acc); }
.tile .words { position: absolute; left: 3%; right: 3%; top: 58%; transform: translateY(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5cqw 5cqw; }
.tile .id { font-size: 11.5px; font-weight: 550; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.on .id { color: var(--fg); }

.gallery { grid-area: left; display: none; z-index: 3; }
.app[data-gallery] .gallery { display: flex; }
.gallery .scroll { padding: 2px 14px 14px; }

/* ── сборка ─────────────────────────────────────────────────────────── */
.build { grid-area: build; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; padding: 12px 16px 14px; gap: 8px; z-index: 2; overflow: visible; }
.go { height: 46px; border: 0; border-radius: 12px; background: var(--acc); color: var(--acc-fg); font-weight: 650; font-size: 15px; letter-spacing: -.01em;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, filter .15s, background .2s; position: relative; overflow: hidden; }
.go:hover:not(:disabled) { filter: brightness(.92); }
.go:active:not(:disabled) { transform: scale(.98); }
.go:disabled { background: var(--bg); color: var(--faint); }
.go svg { width: 18px; height: 18px; fill: currentColor; }
.b-hint { font-size: 12px; color: var(--dim); }
.b-hint.warn { color: var(--warn); }
.b-two { display: flex; gap: 6px; }
.b-two > * { flex: 1; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 600; border: 0; transition: filter .15s, transform .1s, background .15s; }
.b-two > *:active:not(:disabled) { transform: scale(.98); }
.b-two .main { background: var(--acc); color: var(--acc-fg); }
.b-two .main:hover:not(:disabled) { filter: brightness(.92); }
.b-two .sec { background: var(--bg); color: var(--fg); }
.b-two .sec:hover:not(:disabled) { background: var(--bg2); }
.b-two :disabled { opacity: .45; }
.dest { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); white-space: nowrap; }
.dest select { height: 28px; max-width: 160px; font-size: 12px; border-radius: 14px; }
.sent { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--bg); font-size: 12.5px; text-align: left; transition: background .15s; }
.sent:hover { background: var(--bg2); }

/* ── открытый ролик ──────────────────────────────────────────────────── */
.vstrip { display: none; align-items: center; gap: 8px; padding: 12px 14px 0 10px; }
.app[data-view] .vstrip { display: flex; }
.vstrip b { font-size: 14.5px; font-weight: 650; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.kv span { color: var(--dim); }
.kv b { font-weight: 550; }
.v-err { font-size: 12.5px; line-height: 1.45; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.v-err.bad { background: var(--bad-soft); color: var(--bad); }
.note { height: auto; min-height: 64px; padding: 9px 11px; resize: vertical; font-size: 13px; line-height: 1.4; }
.block > .btn, .tab-info > .btn { align-self: flex-start; }
.danger { color: var(--bad) !important; }

/* уведомления */
.toasts { position: fixed; right: 16px; top: 62px; z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--panel2);
  box-shadow: var(--shadow), 0 0 0 1px var(--line); font-size: 13px; opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .2s, transform .25s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast button { height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--acc); color: var(--acc-fg); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.toast .tx { background: none; color: var(--faint); padding: 0 4px; font-weight: 400; }

.only-tablet { display: none; }

/* ── планшет ────────────────────────────────────────────────────────── */
@media (max-width: 1279px) and (min-width: 768px) {
  .only-tablet { display: inline-flex; }
  .grid, .app[data-gallery] .grid { grid-template-columns: minmax(0,1fr) 370px; grid-template-areas: "center right" "center build"; }
  .sources { grid-area: center; width: 300px; display: none; z-index: 5; box-shadow: var(--shadow); }
  .app[data-drawer] .sources { display: flex; }
  .app[data-drawer] .scrim { display: block; grid-area: center; background: rgba(0,0,0,.5); z-index: 4; border-radius: 16px; }
  .gallery { grid-area: right; border-radius: 16px 16px 0 0; }
  .app[data-gallery][data-rtab=design] .right { display: none; }
  .app[data-gallery]:not([data-rtab=design]) .gallery { display: none; }
}

/* ── телефон ────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .nav { display: none; }
  .top { height: 50px; padding: 0 12px; }
  .grid, .app[data-gallery] .grid { gap: 0; padding: 0; grid-template-columns: minmax(0,1fr);
    grid-template-rows: 44vh auto minmax(0,1fr) auto; grid-template-areas: "center" "tabs" "content" "build"; }
  .panel { border-radius: 0 !important; }
  .center { padding: 8px 12px 6px; }
  .ptabs { display: flex; }
  .rtabs { display: none; }
  .sources, .right, .gallery { grid-area: content; display: none; }
  .app[data-ptab="0"] .sources { display: flex; }
  .app[data-ptab="1"] .right, .app[data-ptab="2"]:not([data-gallery]) .right, .app[data-ptab="3"] .right { display: flex; }
  .app[data-ptab="2"][data-gallery] .gallery { display: flex; }
  .ptabs .only-view { display: none !important; }
  .app[data-view] .ptabs .only-view { display: flex !important; }
  .vol input, .pbtn.speed, #phrase-now { display: none; }
  .t-row { gap: 4px; white-space: nowrap; }
  .toasts { left: 12px; right: 12px; }
  .toast { max-width: none; }
  .ph .del { opacity: 1; }
}

/* ── вход ───────────────────────────────────────────────────────────── */
.login-page { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-amb { background: radial-gradient(50% 45% at 40% 35%, oklch(0.36 0.06 260) 0%, transparent 75%), radial-gradient(40% 40% at 70% 80%, oklch(0.3 0.07 300) 0%, transparent 70%); }
[data-theme=light] .login-amb { background: radial-gradient(50% 45% at 40% 35%, oklch(0.88 0.05 260) 0%, transparent 75%), radial-gradient(40% 40% at 70% 80%, oklch(0.9 0.06 300) 0%, transparent 70%); }
.login-box { width: 100%; max-width: 360px; padding: 28px; gap: 14px; border-radius: 20px; box-shadow: var(--shadow); }
.login-box .brand { margin: 0 0 8px; font-size: 17px; }
.login-box label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--dim); }
.login-box .inp { height: 42px; font-size: 14px; color: var(--fg); }
.login-box .go { margin-top: 6px; }

/* ── страница «Ролики» ──────────────────────────────────────────────── */
.page { flex: 1; min-height: 0; overflow-y: auto; }
.page-in { max-width: 1320px; margin: 0 auto; padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.page-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-bar h1 { margin: 0 12px 0 0; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px 12px; }
.vgrid .card .nm { font-size: 13px; color: var(--fg); font-weight: 550; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.vgrid .card .meta { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.vgrid .card .pick { position: absolute; left: 7px; top: 7px; z-index: 2; width: 20px; height: 20px; border-radius: 6px; border: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; color: #fff; }
.vgrid .card:hover .pick, .vgrid .card.sel .pick, .vgrid.picking .card .pick { opacity: 1; }
.vgrid .card.sel .pick { background: #fff; color: #000; }
.vgrid .card.sel .cover { box-shadow: 0 0 0 2px var(--app), 0 0 0 4px var(--acc); }
.pick svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bulk { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px;
  border-radius: 14px; background: var(--panel2); box-shadow: var(--shadow), 0 0 0 1px var(--line); animation: rise .2s var(--ease); font-size: 13px; }

/* ── шапка: тема иконкой, меню с логином (27.09) ── */
[data-theme=dark] #theme-btn .i-moon, [data-theme=light] #theme-btn .i-sun { display: none; }
/* Своим слоем над страницей: карточки с анимацией (transform) иначе рисовались поверх меню. */
.top { position: relative; z-index: 30; }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.m-head b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.m-item.danger { color: var(--bad); }
.m-nav { display: none; }
.role { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--bg); color: var(--dim); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.role.adm { background: color-mix(in oklab, var(--blue) 16%, transparent); color: var(--blue); }
.role.bad { background: var(--bad-soft); color: var(--bad); }

/* ── профиль и админка ── */
.page-in.narrow { max-width: 1040px; }
.back { color: var(--dim); font-weight: 550; align-self: flex-start; }
.back:hover { color: var(--fg); }
.prof-head { flex-direction: row; align-items: center; gap: 18px; padding: 22px; }
.prof-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.big-av { width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--acc-fg); font-size: 30px; font-weight: 750; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 16px; background: var(--panel); }
.tile b { font-size: 24px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12.5px; color: var(--dim); }
.box { padding: 18px 20px; gap: 14px; }
.box.flush { padding: 0; gap: 0; }
.box-head { display: flex; align-items: center; gap: 10px; }
.box-head.pad { padding: 14px 16px; }
.box-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.box-head .search { flex: 0 1 240px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row .inp { flex: 1 1 180px; color: var(--fg); }

/* клеточки активности как на GitHub */
[data-theme=dark] { --h0: #1f1f24; --h1: #0e4429; --h2: #006d32; --h3: #26a641; --h4: #39d353; }
[data-theme=light] { --h0: #ebedf0; --h1: #9be9a8; --h2: #40c463; --h3: #30a14e; --h4: #216e39; }
.heat-wrap { overflow-x: auto; padding-bottom: 4px; }
.heat { display: inline-flex; flex-direction: column; gap: 4px; min-width: max-content; }
.heat-months { display: flex; gap: 3px; margin-left: 26px; height: 15px; }
.heat-months span { width: 12px; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: visible; }
.heat-body { display: flex; gap: 6px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; width: 20px; }
.heat-days span { font-size: 10.5px; line-height: 12px; color: var(--faint); }
.heat-cols { display: flex; gap: 3px; }
.heat-col { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; }
.heat i, .heat-legend i { display: block; width: 12px; height: 12px; border-radius: 3px; background: var(--h0); outline: 1px solid color-mix(in oklab, var(--fg) 5%, transparent); outline-offset: -1px; }
.heat i.none { background: none; outline: 0; }
.heat .l1, .heat-legend .l1 { background: var(--h1); } .heat .l2, .heat-legend .l2 { background: var(--h2); }
.heat .l3, .heat-legend .l3 { background: var(--h3); } .heat .l4, .heat-legend .l4 { background: var(--h4); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: 11.5px; color: var(--faint); }
.heat-legend span { margin: 0 4px; }

/* таблица пользователей */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 550; font-size: 12px; color: var(--faint); padding: 8px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in oklab, var(--bg) 60%, transparent); }
.tbl tr.off td:not(.acts) { opacity: .5; }
.tbl .num { text-align: right; }
.tbl .acts { width: 1%; text-align: right; }
.tbl .acts .menu { top: 34px; text-align: left; }
.who { display: flex; align-items: center; gap: 10px; }
.who .av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); font-weight: 650; font-size: 12.5px; }
.who b { display: block; font-weight: 600; }
.who small { display: block; font-size: 11.5px; color: var(--faint); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.who:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* окно создания */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); }
.dialog { width: 100%; max-width: 420px; padding: 22px; gap: 12px; border-radius: 18px; box-shadow: var(--shadow); }
.dialog h2 { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.dialog label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--dim); }
.dialog .inp { height: 40px; color: var(--fg); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row.end { justify-content: flex-end; margin-top: 6px; }
.cred { margin: 0; padding: 14px; border-radius: 10px; background: var(--bg); font: 500 13px/1.6 'JetBrains Mono', ui-monospace, monospace; white-space: pre-wrap; word-break: break-all; user-select: all; }

@media (max-width: 767px) {
  .prof-head { padding: 16px; gap: 14px; }
  .big-av { width: 56px; height: 56px; font-size: 24px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 12px 14px; }
  .tile b { font-size: 20px; }
  .box { padding: 14px; }
  .form-2 { grid-template-columns: 1fr; }
  .page .panel { border-radius: 14px !important; }
  .m-nav { display: block; padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
}

/* ── токены: баланс, пакеты, журнал (27.09) ───────────────────────────── */
/* Монета — не «₽» и не эмодзи: токен к рублю не привязан, и значок должен
   читаться в обеих темах при 11 px. */
/* Значок токена: шестигранник с молнией — своя валюта сервиса, не рубль и не
   эмодзи. Рисуется маской, поэтому один и тот же `<span class="coin">` в любом
   месте (шаблон, JS-строка) берёт цвет текста и размер шрифта. */
.coin { display: inline-block; width: 1.06em; height: 1.06em; vertical-align: -.17em; flex: none;
  background: currentColor;
  -webkit-mask: var(--coin) center / contain no-repeat; mask: var(--coin) center / contain no-repeat; }
:root { --coin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 .7 15 4.75v7.5L8 16.3 1 12.25v-7.5zm0 1.73L2.5 5.6v5.8L8 14.57l5.5-3.17V5.6zM9.15 4.9 5.4 9.55h2.13l-.7 3.2 3.77-4.9H8.4z'/%3E%3C/svg%3E"); }
.tok { display: inline-flex; align-items: center; gap: .38em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.bal-chip { height: 32px; padding: 0 12px 0 10px; border: 0; border-radius: 9px; background: var(--bg); color: var(--fg);
  font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.bal-chip:hover { background: var(--bg2); }
.bal-chip.low { background: var(--warn-soft); color: var(--warn); }
.bal-chip i.held { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

.money-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr) auto;
  align-items: end; gap: 18px; padding: 26px 26px 24px; }
.money-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 380px; height: 380px;
  background: radial-gradient(circle, color-mix(in oklab, var(--blue) 26%, transparent), transparent 70%); pointer-events: none; }
.money-hero .lab { font-size: 12.5px; color: var(--dim); }
.money-hero .big { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; font-size: 42px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.money-hero .sub { font-size: 13px; color: var(--dim); }
.money-hero .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hero-held { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 9px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 600; letter-spacing: 0; }

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 12px; }
.pack { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 16px 16px 14px; border-radius: 16px;
  background: var(--bg); text-align: left; transition: background .15s, transform .12s; }
.pack:hover { background: var(--bg2); transform: translateY(-2px); }
.pack .nm { font-size: 12.5px; color: var(--dim); font-weight: 600; }
.pack .amt { display: flex; align-items: center; gap: 8px; font-size: 25px; font-weight: 780; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; }
.pack .rub { font-size: 13.5px; font-weight: 600; }
.pack .vid { font-size: 12px; color: var(--faint); }
.pack .bon { position: absolute; right: 12px; top: 12px; padding: 2px 8px; border-radius: 9px;
  background: var(--ok-soft); color: var(--ok); font-size: 11.5px; font-weight: 700; }
.pack.best { background: var(--panel2); box-shadow: 0 0 0 1.5px var(--acc) inset; }

.plist { display: flex; flex-direction: column; }
.plist .pr { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.plist .pr:last-child { border-bottom: 0; }
.plist .pr b { font-weight: 600; }
.plist .pr small { color: var(--faint); font-size: 12px; }
.plist .pr .val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.plist .pr .val em { font-style: normal; color: var(--faint); font-weight: 500; font-size: 12px; margin-left: 6px; }

.jour { display: flex; flex-direction: column; }
.jrow { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.jrow:last-child { border-bottom: 0; }
.jrow .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--bg);
  color: var(--dim); font-size: 13px; font-weight: 700; }
.jrow.plus .ic { background: var(--ok-soft); color: var(--ok); }
.jrow.minus .ic { background: var(--bg2); }
.jrow .t { font-weight: 550; }
.jrow .t small { display: block; font-size: 11.5px; color: var(--faint); font-weight: 400; }
.jrow .d { font-weight: 700; font-variant-numeric: tabular-nums; }
.jrow.plus .d { color: var(--ok); }
.jrow .d.zero { color: var(--faint); font-weight: 550; }

.inv { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.inv + .inv { margin-top: 8px; }
.inv b { font-variant-numeric: tabular-nums; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-m { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 0; border-radius: 14px; background: var(--bg);
  text-align: left; transition: background .15s; }
.pay-m:hover { background: var(--bg2); }
.pay-m.on { background: var(--acc); color: var(--acc-fg); }
.pay-m b { font-size: 13.5px; }
.pay-m span { font-size: 11.5px; opacity: .72; }
.pay-box { padding: 14px; border-radius: 12px; background: var(--bg); font-size: 13px; line-height: 1.55; }
.pay-box code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; user-select: all; }

/* ── настройки: входы ─────────────────────────────────────────────────── */
.sess { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sess:last-child { border-bottom: 0; }
.sess .dev { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--dim); }
.sess .dev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sess b { display: block; font-weight: 600; }
.sess small { display: block; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sess .now { padding: 2px 8px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); font-size: 11.5px; font-weight: 650; }
.set-cols { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
.set-cols > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--dim); }
.field .inp { height: 40px; color: var(--fg); }
.note-box { padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.opt-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg); }
.opt-seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--dim); font-size: 12.5px; font-weight: 600; }
.opt-seg button:hover { color: var(--fg); }
.opt-seg button.on { background: var(--raise); color: var(--fg); }

/* ── админка: экономика и очередь ─────────────────────────────────────── */
.tile.wide { grid-column: span 2; }
.tile .sub2 { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--dim); }
.tile .up { color: var(--ok); } .tile .down { color: var(--bad); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 6px; }
.bars i { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: color-mix(in oklab, var(--blue) 55%, transparent); }
.bars i.dim2 { background: var(--bg2); }
.qrow .st-cell { display: flex; align-items: center; gap: 8px; }
.tbl tr.alarm td { background: var(--bad-soft); }
.tbl .mini { height: 26px; padding: 0 9px; border-radius: 7px; background: var(--bg2); border: 0; font-size: 12px; font-weight: 600; }
.tbl .mini:hover { background: var(--raise); }
.tbl .mini.danger { color: var(--bad); }
.price-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row .nm { flex: 1; min-width: 0; }
.price-row .nm small { display: block; font-size: 11.5px; color: var(--faint); }
.price-row .inp { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.price-row .rub { width: 64px; text-align: right; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.adm-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--panel); align-self: flex-start; }
.adm-tabs button { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--dim); font-size: 13px; font-weight: 600; }
.adm-tabs button.on { background: var(--bg); color: var(--fg); }

@media (max-width: 860px) {
  .set-cols { grid-template-columns: 1fr; }
  .money-hero { grid-template-columns: 1fr; align-items: start; padding: 20px; }
  .money-hero .big { font-size: 34px; }
  .money-hero .acts { justify-content: flex-start; }
  .pay-methods { grid-template-columns: 1fr; }
  .tile.wide { grid-column: span 2; }
}

/* Цена на кнопке сборки: тем же тоном, что кнопка, только тише. */
.btok { display: inline-flex; align-items: center; gap: .3em; opacity: .72; font-variant-numeric: tabular-nums; }
.go .btok { opacity: .8; }
.b-two .sec .btok, .b-two .main .btok { font-weight: 600; }

/* ── профиль: заметный, но не пёстрый (переделан 27.09 вечером) ───────── */
.prof { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center; gap: 20px; padding: 26px 26px 24px; }
.prof::before { content: ""; position: absolute; inset: -60% 50% auto -10%; height: 320px;
  background: radial-gradient(circle at 30% 50%, color-mix(in oklab, var(--pf) 30%, transparent), transparent 65%);
  pointer-events: none; }
.prof .face { position: relative; width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center;
  font-size: 30px; font-weight: 750; letter-spacing: -.02em; color: #fff;
  background: linear-gradient(145deg, var(--pf), color-mix(in oklab, var(--pf) 45%, #000)); }
.prof h1 { margin: 0 0 7px; font-size: 27px; font-weight: 780; letter-spacing: -.025em; }
.prof .line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); }
.prof .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.prof .acts { display: flex; gap: 8px; }
@media (max-width: 700px) {
  .prof { grid-template-columns: auto minmax(0,1fr); padding: 18px; gap: 14px; }
  .prof .face { width: 58px; height: 58px; border-radius: 20px; font-size: 23px; }
  .prof h1 { font-size: 22px; }
  .prof .acts { grid-column: 1 / -1; }
}

/* Полоса чисел: одна поверхность с волосяными линиями вместо шести кубиков. */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0; }
.strip .s { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; border-left: 1px solid var(--line); }
.strip .s:first-child { border-left: 0; }
.strip .s b { font-size: 23px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.strip .s span { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.strip .s.accent b { color: var(--ok); }
@media (max-width: 860px) {
  .strip { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .strip .s { border-left: 0; border-top: 1px solid var(--line); padding: 13px 16px; }
  .strip .s:nth-child(2n) { border-left: 1px solid var(--line); }
  .strip .s:first-child, .strip .s:nth-child(2) { border-top: 0; }
  .strip .s b { font-size: 20px; }
}

/* Последние 30 дней столбиками: год клеточками на таком потоке выглядит пустым. */
.days { display: flex; align-items: flex-end; gap: 3px; height: 92px; }
.days .d { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; border-radius: 4px; }
.days .d i { display: block; width: 100%; border-radius: 4px; background: color-mix(in oklab, var(--pf) 65%, var(--bg));
  min-height: 3px; transition: background .15s; }
.days .d.zero i { background: var(--bg); }
.days .d:hover i { background: var(--pf); }
.days-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
.heat.small i, .heat.small .heat-legend i { width: 9px; height: 9px; border-radius: 2px; }
.heat.small .heat-col, .heat.small .heat-days { grid-template-rows: repeat(7, 9px); }
.heat.small .heat-months span { width: 9px; }
.fold { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--dim);
  font-size: 12.5px; font-weight: 600; align-self: flex-start; }
.fold:hover { color: var(--fg); }
.fold svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round;
  stroke-linejoin: round; transition: transform .15s; }
.fold[aria-expanded="true"] svg { transform: rotate(90deg); }

/* Плашка сроков под шапкой (только админ, текст — админка → Обзор) */
.goals { flex: none; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; padding: 7px 16px;
  background: var(--warn-soft); color: var(--fg); font-size: 12.5px; line-height: 1.35; text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--warn) 25%, transparent); position: relative; z-index: 29; }
.goal { display: inline-flex; gap: 6px; align-items: baseline; min-width: 0; }
.goal b { color: var(--warn); font-weight: 650; white-space: nowrap; }
.goal em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  padding: 0 6px; border-radius: 8px; background: color-mix(in oklab, var(--warn) 18%, transparent); color: var(--warn); }
.goal.soon em, .goal.late em { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 700px) { .goals { padding: 6px 12px; flex-direction: column; gap: 3px; } }
