/* Veyro · minimal layer. Loaded last: calmer palette, flat surfaces, one accent, consistent spacing. */
:root{
  --bg:#0b0c0b; --surface:#121412; --surface-2:#171a17; --surface-3:#1d211d; --surface-4:#262b26;
  --border:rgba(255,255,255,.07); --border-2:rgba(255,255,255,.13);
  --text:#f1f3f0; --text-muted:#8f978e; --text-faint:#5f675e;
  --primary:#a6f000; --primary-hi:#b9f93a; --on-primary:#0b1100; --primary-soft:rgba(166,240,0,.12);
  --r-sm:10px; --r-md:14px; --r-lg:18px; --r-xl:24px;
  --shadow-1:none; --shadow-2:0 10px 30px rgba(0,0,0,.4); --shadow-3:0 24px 60px rgba(0,0,0,.55);
}
html,body{background:var(--bg)!important;background-image:none!important}
.app::before{display:none!important}

/* top bar */
.topbar{background:transparent!important;border-bottom:0!important;box-shadow:none!important}
.topbar .icon-btn{color:var(--text-muted);background:transparent!important;border:0!important}
.topbar .icon-btn:active{color:var(--text)}

/* typography */
.home-hero h1,.nav-body h1{font-size:26px;line-height:1.15;font-weight:700;letter-spacing:-.02em}
.home-hero p{color:var(--text-muted);font-size:14px;line-height:1.45;margin-top:6px}
.nav-h,.ph-lbl{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint)}
.nav-note,.hint,.u-note{color:var(--text-muted);font-size:13px;line-height:1.45}

/* bottom nav: flat, no pill */
#tabbar{background:rgba(11,12,11,.92)!important;border:0;box-shadow:none!important;backdrop-filter:blur(14px)}
#tabbar .tab{background:transparent!important;border:0!important;box-shadow:none!important;color:var(--text-faint)}
#tabbar .tab.active,#tabbar .tab[aria-selected=true]{background:transparent!important;color:var(--primary)!important}
#tabbar .tab-pill{display:none!important}

/* buttons */
.btn{border-radius:14px;min-height:48px;font-weight:600;box-shadow:none!important;background-image:none!important;transition:transform .12s,opacity .12s,background .12s}
.btn:active{transform:scale(.985)}
.btn.primary{background:var(--primary)!important;color:var(--on-primary)!important;border:0!important}
.btn.secondary{background:var(--surface-3)!important;border:0;color:var(--text)!important}
.btn.ghost{background:transparent!important;border:0;color:var(--text)!important}
.btn[disabled]{opacity:.45}

/* segmented controls & chips */
.seg{background:var(--surface-2)!important;border:0!important;border-radius:13px!important;padding:3px!important;gap:2px!important}
.seg .chip{border:0!important;background:transparent!important;color:var(--text-muted)!important;border-radius:10px!important;box-shadow:none!important;font-weight:600}
.seg .chip.active{background:var(--surface-4)!important;color:var(--text)!important}
.chip{border-radius:999px;box-shadow:none!important}
.chips .chip{background:var(--surface-2);border:0;color:var(--text-muted)}
.chips .chip.active{background:var(--surface-4);color:var(--text)}

/* surfaces */
.project-card,.tool-tile,.field,.stat-row,.nav-card,.plan-card,.effect-card,.photo-mini-card,.ask-card,.shot,.banner{
  background:var(--surface)!important;background-image:none!important;border:0;border-radius:16px!important;box-shadow:none!important}
.stat-row{padding:12px 14px}
.tool-tile .tt-ico{background:var(--surface-3)!important;color:var(--text)!important;border-radius:12px}
.tool-tile small,.project-info small{color:var(--text-muted)}
.sheet{background:var(--surface)!important;background-image:none!important;border:0!important;border:0;border-radius:24px 24px 0 0!important;box-shadow:var(--shadow-3)}
.sheet-grab{opacity:.5}
.sheet-head h2,.sheet-head b{font-size:17px;font-weight:650}
.scrim{background:rgba(0,0,0,.6)!important}

/* inputs */
input[type=text],input[type=search],input[type=url],textarea,.input,.search-field{background:var(--surface-2)!important;border:0;border-radius:14px!important;color:var(--text)}
input[type=text]:focus,textarea:focus,.input:focus{outline:none}
.switch-row{background:transparent!important;border:0!important;border:0;border-radius:0!important;padding:14px 2px}

/* sliders */
input[type=range]{height:22px;background:transparent}
input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:4px}
input[type=range]::-webkit-slider-thumb{width:18px;height:18px;margin-top:-7px;box-shadow:0 1px 4px rgba(0,0,0,.5)}

/* projects */
.project-thumb{border-radius:12px;background:var(--surface-3)!important}
.project-card{padding:12px}
.cr-drop{border:0;background:transparent!important;border-radius:18px}

/* ---------- profile ---------- */
.pf-head{display:flex;align-items:center;gap:14px;margin:6px 0 20px}
.pf-ava{width:52px;height:52px;border-radius:50%;background:var(--surface-4);display:grid;place-items:center;font-size:20px;font-weight:700;flex:none}
.pf-who{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.pf-who b{font-size:18px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-copy{display:inline-flex;align-items:center;gap:6px;color:var(--text-muted);font-size:13px;width:fit-content}
.pf-badge{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:6px 11px;border-radius:999px;background:var(--surface-3);color:var(--text-muted)}
.pf-badge.pro{background:var(--primary);color:var(--on-primary)}
.pf-card{background:var(--surface);border:0;border-radius:20px;padding:18px;margin-bottom:12px}
.pf-top{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px}
.pf-top span{font-size:14px;font-weight:600}.pf-top small{color:var(--text-faint);font-size:12px}
.pf-big{display:flex;align-items:baseline;gap:8px;margin-bottom:12px}
.pf-big b{font-size:44px;line-height:1;font-weight:700;letter-spacing:-.03em}.pf-big span{color:var(--text-muted);font-size:14px}
.pf-bar{height:6px;border-radius:6px;background:var(--surface-4);overflow:hidden}.pf-bar i{display:block;height:100%;background:var(--primary);border-radius:6px;transition:width .4s}
.pf-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:18px;padding-top:16px;border:0;}
.pf-stats.two{grid-template-columns:repeat(2,1fr)}
.pf-stats div{display:flex;flex-direction:column;gap:2px}.pf-stats b{font-size:18px;font-weight:650}.pf-stats span{color:var(--text-muted);font-size:12px}
.pf-warn,.pf-note{font-size:13px;line-height:1.45;color:#ffb4a8;margin-top:12px}
.pf-note{background:var(--surface);border:0;border-radius:14px;padding:12px 14px;margin:0 0 12px;color:var(--text-muted)}.pf-note.ok b{color:var(--primary)}
.pf-foot{color:var(--text-faint);font-size:12px;line-height:1.45;margin-top:12px}
.pf-text{color:var(--text-muted);font-size:13px;line-height:1.5;margin-bottom:12px}.pf-text b{color:var(--text)}
.pf-promo,.pf-invite{display:flex;gap:8px}.pf-promo input,.pf-invite input{flex:1;min-width:0;height:48px;padding:0 14px;text-transform:none}
.pf-promo .btn,.pf-invite .btn{flex:none;padding:0 18px}
.pf-invite{margin-bottom:8px}
.pf-msg{margin-top:10px;font-size:13px}.pf-msg.ok{color:var(--primary)}.pf-msg.err{color:#ff8d8d}
.pf-sec{margin:22px 0 12px}.pf-sec h3{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);margin:0 0 10px}
.pf-plans{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.pf-plan{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surface);border:0;border-radius:16px;padding:14px 16px}
.pf-plan.cur{}.pf-plan div{display:flex;flex-direction:column;gap:3px}.pf-plan b{font-size:15px}.pf-plan span{color:var(--text-muted);font-size:13px;line-height:1.4}
.pf-plan em{font-style:normal;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--primary)}
.pf-buy{display:flex;flex-direction:column;gap:8px}
.prof-skel{height:260px;border-radius:20px;background:var(--surface)}
.section-head{display:flex;justify-content:flex-end;margin:0 0 10px}

/* photo: light & colour as CapCut-style chips + one slider */
.adj-chips{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px;margin:0 -2px;scrollbar-width:none}
.adj-chips::-webkit-scrollbar{display:none}
.adj-chip{flex:none;padding:9px 14px;border-radius:999px;background:var(--surface-2);border:0;color:var(--text-muted);font-size:13px;font-weight:600;position:relative}
.adj-chip.active{background:var(--surface-4);color:var(--text);}
.adj-chip.chg::after{content:"";position:absolute;top:6px;right:7px;width:5px;height:5px;border-radius:50%;background:var(--primary)}
.adj-slider{padding:6px 2px 4px}
.adj-val{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px;color:var(--text-muted);font-size:14px}
.adj-val strong{color:var(--text);font-size:22px;font-weight:650;letter-spacing:-.01em}
.ordinary-photo-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.ordinary-photo-head small{display:none}
.effect-reset{display:block;margin:14px auto 0;color:var(--text-muted);font-size:13px;background:none;border:0;padding:8px 12px}
.finish-ico,.res-ok{box-shadow:none!important}
.ordinary-photo-head .chip,.chips .chip{white-space:nowrap}


/* ---- no outlines: surfaces are separated by fill only ---- */
.adj-chip,.btn.ghost,.btn.secondary,.chip,.cr-drop,.tool-tile,.ask-card,.effect-card,.field,.free-box,.pf-plan,.pf-card,.pf-note,
.ph-cfg,.ph-timing,.stat-row,.syllable-mode,.cr-url,.input,.search-field,textarea,input[type=text],input[type=search],input[type=url],
.sheet,.sheet-foot,.curve-block,.pf-stats,.project-card,.nav-card,.plan-card,.banner,.switch-row,#tabbar,.photo-mini-card,.seg{
  border:0!important;box-shadow:none!important;outline:0}
.sheet-foot{background:var(--surface)!important}
.chip,.adj-chip{background:var(--surface-3)!important;color:var(--text-muted)!important}
.chip.active,.adj-chip.active,.tool-tile.is-open{background:var(--surface-4)!important;color:var(--text)!important}
.seg{background:var(--surface-2)!important}.seg .chip{background:transparent!important}.seg .chip.active{background:var(--surface-4)!important}
.btn.secondary,.btn.ghost{background:var(--surface-3)!important;color:var(--text)!important}
.field,.stat-row,.ph-cfg,.ph-timing,.free-box,.ask-card,.effect-card,.tool-tile,.cr-drop,.pf-plan,.pf-card{background:var(--surface)!important}
.cr-drop{background:var(--surface)!important}
input[type=text],input[type=search],input[type=url],textarea,.input,.search-field{background:var(--surface-2)!important}
.sheet{box-shadow:0 -12px 40px rgba(0,0,0,.45)!important}
.pf-stats{border-top:0!important;padding-top:0;margin-top:16px}
.switch-row{border-bottom:0!important}
.curve-block{margin-top:12px;padding-top:0}
#tabbar{box-shadow:0 -10px 24px rgba(11,12,11,.9)!important}
/* fewer controls */
#fsBtn,#saveStyle{display:none!important}
.pf-link{color:var(--text-muted);font-size:13px;padding:2px 0}
.pf-pro{display:flex;align-items:center;justify-content:space-between;gap:14px}
.pf-pro div{display:flex;flex-direction:column;gap:3px;min-width:0}.pf-pro b{font-size:16px}.pf-pro span{color:var(--text-muted);font-size:13px;line-height:1.4}
.pf-pro .btn{flex:none;padding:0 18px}
.pf-invite input{cursor:pointer}

/* ---- photo block: fewer controls ---- */
#backgroundPhotosBox .ph-head .stat-row,#backgroundPhotosBox #photoCountHint,#backgroundHint,#backgroundPhotosBox .sub-head{display:none!important}
#backgroundVideoBox .ph-head .stat-row,#backgroundVideoBox #photoCountHint,#backgroundHint,#backgroundVideoBox .sub-head{display:none!important}
.ordinary-photo-head{margin-bottom:8px}.ordinary-photo-head b{font-size:15px}
.curve-head small{font-size:11px}
.curve-block .seg{margin-top:2px}
.ph-timing,.ph-cfg{background:transparent!important;padding:0!important}
.ph-timing .field{background:var(--surface)!important}

/* rings -> fills */
.seg .chip,.seg-4 .chip,button.chip,.format,.effect-card,.effect-card-button,.tool-tile,.ph-pane .seg,.stat-row,.field{box-shadow:none!important}
.format{background:var(--surface)!important;border:0!important}
.format.active{background:var(--surface-3)!important;box-shadow:inset 0 0 0 2px var(--primary)!important}
#sheetBackground .chip,#sheetBackground .seg-4 .chip,#sheetFormat .format:not(.active),#sheetEffects .effect-card,#sheetText .chip,#sheetText .field,#sheetWatermark .field{box-shadow:none!important;border:0!important;outline:0!important}
#sheetBackground .seg-4,#sheetBackground .seg-4 .chip:not(.active){background:transparent!important}
#sheetBackground .seg-4 .chip{background:var(--surface-2)!important;border-radius:14px!important}
#sheetBackground .seg-4 .chip.active{background:var(--surface-4)!important}

/* background fit is always "fill the frame" */
.photo-fit-choices,.seg:has([data-quick-fit]),.chips:has([data-video-fit]) [data-video-fit]{display:none!important}

/* ---- sheets: flat sections, no boxes inside the sheet, no helper captions ---- */
.sheet .field,.sheet .stat-row,.sheet .effect-card,.sheet .ph-timing .field{background:transparent!important;padding:12px 0!important;border-radius:0!important}
.sheet .field-head{margin-bottom:10px}
.sheet .field-head span{font-size:13px;color:var(--text-muted);font-weight:600}
.sheet .field-head b{font-size:15px;font-weight:650}
#fontName,.field-head small.muted,#sheetPresets .hint,#sheetEffects .hint,#sheetFormat .hint{display:none!important}
.sheet .stepper{display:flex;align-items:center;gap:10px}.sheet .stepper input{flex:1;width:auto;min-width:0}.sheet .stepper .btn{flex:none;width:44px;min-height:44px;padding:0;font-size:22px;border-radius:14px}
.sheet .effect-card{display:flex;align-items:center;gap:14px}
.sheet .switch-row{padding:12px 0!important}
.sheet .sheet-body{padding-top:4px}
.sheet .field+.field{border-top:0!important}
#savePreset{margin-top:6px}
.ph-one{display:none!important}

/* ---- phones (iOS): no tap delay, no accidental zoom/selection, comfortable hit areas ---- */
html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
button,[role=button],.chip,.tab,.tool-tile,.icon-btn,.btn,label.btn,input[type=range],.timeline,summary,a{touch-action:manipulation;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.timeline,.curve-graph,.trim-track,#curveGraph{touch-action:none!important}
input,textarea{-webkit-user-select:text;user-select:text;font-size:16px}   /* 16px stops iOS from zooming on focus */
.icon-btn{min-width:44px;min-height:44px}
.t-btn{min-height:52px;min-width:64px}
.play-btn{min-width:64px;min-height:64px}
.chip{min-height:38px}
.timeline{position:relative}.timeline::before{content:"";position:absolute;left:0;right:0;top:-14px;bottom:-14px}
.sync-preview-line span[data-t]{cursor:pointer;padding:2px 1px}
.btn:active,.chip:active,.tool-tile:active,.t-btn:active,.play-btn:active{transform:scale(.97);transition:transform .06s}
*{-webkit-overflow-scrolling:touch}

/* ---- selected effect: unmistakable ---- */
.sheet .effect-card.on,.effect-card.on{background:var(--primary-soft)!important;border-radius:16px!important;padding:12px!important;box-shadow:inset 0 0 0 2px var(--primary)!important}
.effect-card .effect-card-icon i{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:12px;font-weight:800}
.effect-card.on .effect-card-icon i{background:var(--primary);color:var(--on-primary)}
.effect-card.on .effect-card-meta b{color:var(--primary-hi)}
.effect-card.on .effect-card-meta small::after{content:" · включён";color:var(--primary)}

/* ---- phones: while a panel is open, dim everything except the video and the panel ---- */
@media (max-width:719px){
  body.sheet-open .topbar,body.sheet-open #tabbar,body.sheet-open .screen.active .side,body.sheet-open .screen.active .actionbar,body.sheet-open .screen.active .editor-head{opacity:.22;filter:saturate(.5);pointer-events:none;transition:opacity .25s}
  body .screen.active .workspace .stage{position:relative;transform:scale(1);transform-origin:50% 0;transition:transform .45s cubic-bezier(.22,1,.36,1)}
  body.sheet-open .screen.active .workspace .stage,body.sheet-open .screen.active .editor-stage{position:relative;z-index:55;transform:scale(1.05);filter:none!important;opacity:1!important}
  body.sheet-open .screen.active .preview{box-shadow:0 0 0 1px rgba(255,255,255,.14),0 14px 44px rgba(0,0,0,.65)}
  body.sheet-open{background:#050605!important}
  /* the scrim covers the whole screen incl. the video; the other parts are dimmed above, so make the scrim clear here */
  body.sheet-open:has(.screen.active .workspace) #scrim{background:transparent!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
}

/* ---- settings groups, segmented pickers, big buttons ---- */
.set-h{margin:18px 2px 2px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-faint);font-weight:700}
.set-h:first-child{margin-top:4px}
.set-seg-row{align-items:center;gap:10px}
.set-seg{display:inline-flex;gap:2px;padding:3px;border-radius:12px;background:var(--surface-3);flex:none}
.set-seg button{border:0;background:transparent;color:var(--text-muted);font:inherit;font-size:13px;font-weight:600;min-height:34px;padding:0 10px;border-radius:9px}
.set-seg button.on{background:var(--primary);color:var(--on-primary)}
html.big-ui .btn{min-height:58px;font-size:17px}
html.big-ui .icon-btn{min-width:52px;min-height:52px}
html.big-ui .chip{min-height:46px;font-size:16px;padding-left:16px;padding-right:16px}
html.big-ui .t-btn{min-height:62px;min-width:76px}
html.big-ui .play-btn{min-width:72px;min-height:72px}
html.big-ui .list-row,html.big-ui .switch-row{min-height:60px}
html.big-ui #tabbar button,html.big-ui #tabbar a{min-height:58px}

/* ---- quick toggles, accent picker, zoom/dim prefs ---- */
.quick-row{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 4px}
.quick-row button{border:0;background:var(--surface-3);color:var(--text-muted);font:inherit;font-size:13px;font-weight:600;min-height:38px;padding:0 14px;border-radius:999px;transition:background .2s,color .2s,transform .15s}
.quick-row button:active{transform:scale(.95)}
.quick-row button.on{background:var(--primary);color:var(--on-primary)}
.accent-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:8px 2px 4px}
.accent-row button{width:36px;height:36px;border-radius:50%;border:0;background:var(--c);transition:transform .18s,box-shadow .18s}
.accent-row button.on{transform:scale(1.14);box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--c)}
.accent-own{position:relative;display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px 0 4px;border-radius:999px;background:var(--surface-3);color:var(--text-muted);font-size:13px;font-weight:600}
.accent-own.on{color:var(--text)}
.accent-own input{width:28px;height:28px;border:0;padding:0;background:none;border-radius:50%;overflow:hidden}
html.no-zoom body.sheet-open .screen.active .workspace .stage{transform:none!important}
@media (max-width:719px){html.no-dim body.sheet-open .topbar,html.no-dim body.sheet-open #tabbar,html.no-dim body.sheet-open .screen.active .side,html.no-dim body.sheet-open .screen.active .actionbar,html.no-dim body.sheet-open .screen.active .editor-head{opacity:1!important;filter:none!important}}
/* soft entrance animations everywhere */
@keyframes vy-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.project-card,.nav-card,.plan-card,.photo-mini-card,.effect-card,.list-row{animation:vy-rise .38s cubic-bezier(.22,1,.36,1) both}
.btn,.chip,.icon-btn,.effect-card,.project-card{transition:transform .16s ease,background .2s,opacity .2s}
.btn:active,.chip:active,.icon-btn:active,.effect-card:active,.project-card:active{transform:scale(.97)}
html.reduce-motion .project-card,html.reduce-motion .nav-card,html.reduce-motion .plan-card,html.reduce-motion .photo-mini-card,html.reduce-motion .effect-card,html.reduce-motion .list-row{animation:none}
@media (prefers-reduced-motion:reduce){.project-card,.nav-card,.plan-card,.photo-mini-card,.effect-card,.list-row{animation:none}}
.set-tiles{margin-top:10px}
.set-tiles .tt-body b{font-size:14px}.set-tiles .tt-body small{font-size:11px}
/* photo + effects mode: same panels as the normal editor, but the background type is fixed to photos */
body.photo-mode #sheetBackground #backgroundHint,body.photo-mode #sheetBackground #bgChoices [data-bg=black],body.photo-mode #sheetBackground #bgChoices [data-bg=green]{display:none!important}
/* photo mode preview follows the chosen format instead of a fixed 4:3 box */
.photo-only-preview[data-format="4:3"]{aspect-ratio:4/3}
.photo-only-preview[data-format="16:9"]{aspect-ratio:16/9}
.photo-only-preview[data-format="1:1"]{aspect-ratio:1/1;width:min(100%,50dvh);margin:0 auto}
.photo-only-preview[data-format="9:16"]{aspect-ratio:9/16;width:auto;height:min(52dvh,520px);margin:0 auto}
.photo-mode-v4 .pm-overlay-preview{aspect-ratio:auto}
.set-tiles .tool-tile .tt-body{min-width:0}.set-tiles .tt-body b{font-size:12.5px;overflow-wrap:anywhere;line-height:1.15}
/* photo + effects mode = normal style screen; the sample text and text-only tools are hidden */
body.photo-mode #styleText{display:none!important}
body.photo-mode .screen#style [data-open-sheet=sheetText]{display:none!important}
#photoTextOverlay{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:4;background:transparent}
#photoTextOverlay.key-black{mix-blend-mode:screen}
#photoTextOverlay.key-green{filter:url(#veyroGreenKey)}

.photo-only-tile{display:none!important}
body.photo-mode .photo-only-tile{display:flex!important}
#photoTextHandle{position:absolute;inset:0;z-index:6;touch-action:none;cursor:grab}
#photoTextOverlay{transform-origin:50% 50%;will-change:transform}

/* Фото: лента-таймлайн. Ширина плитки = длительность, «+» справа, у выбранного фото ручки на краях */
#backgroundPhotosBox .ph-strip.ph-tl{align-items:center;scroll-snap-type:none;gap:6px;padding:8px 14px 10px}
#backgroundVideoBox .ph-strip.ph-tl{align-items:center;scroll-snap-type:none;gap:6px;padding:8px 14px 10px}
#backgroundPhotosBox .ph-tl #imageList{gap:0!important}
#backgroundVideoBox .ph-tl #imageList{gap:0!important}
#backgroundVideoBox .ph-tl #vdList{gap:0!important}
#backgroundPhotosBox .ph-tl .photo-asset-item{height:72px;border-radius:8px}
#backgroundVideoBox .ph-tl .photo-asset-item{height:72px;border-radius:8px}
#backgroundPhotosBox .ph-tl .photo-thumb-wrap{width:100%!important;height:72px!important;border-radius:8px!important}
#backgroundVideoBox .ph-tl .photo-thumb-wrap{width:100%!important;height:72px!important;border-radius:8px!important}
#backgroundPhotosBox .ph-tl .photo-asset-item.selected::after{content:"";position:absolute;inset:0;border:2px solid var(--primary);border-radius:8px;pointer-events:none;z-index:2}
#backgroundVideoBox .ph-tl .photo-asset-item.selected::after{content:"";position:absolute;inset:0;border:2px solid var(--primary);border-radius:8px;pointer-events:none;z-index:2}
#backgroundPhotosBox .ph-tl .photo-delete{display:none!important}
#backgroundVideoBox .ph-tl .photo-delete{display:none!important}
#backgroundPhotosBox .ph-tl .photo-asset-item.selected .photo-delete{display:block!important;z-index:4}
#backgroundVideoBox .ph-tl .photo-asset-item.selected .photo-delete{display:block!important;z-index:4}
#backgroundPhotosBox .ph-tl .photo-thumb-wrap span{font-size:11px;padding:12px 2px 3px;font-variant-numeric:tabular-nums}
#backgroundVideoBox .ph-tl .photo-thumb-wrap span{font-size:11px;padding:12px 2px 3px;font-variant-numeric:tabular-nums}
#backgroundPhotosBox .ph-tl .photo-delete{top:4px!important;right:14px!important}
#backgroundVideoBox .ph-tl .photo-delete{top:4px!important;right:14px!important}
#backgroundPhotosBox .ph-tl .ph-h{position:absolute;top:0;bottom:0;width:22px;z-index:3;display:grid;place-items:center;touch-action:none;cursor:ew-resize;margin:0}
#backgroundVideoBox .ph-tl .ph-h{position:absolute;top:0;bottom:0;width:22px;z-index:3;display:grid;place-items:center;touch-action:none;cursor:ew-resize;margin:0}
#backgroundPhotosBox .ph-tl .ph-h.l{left:-9px}
#backgroundVideoBox .ph-tl .ph-h.l{left:-9px}
#backgroundPhotosBox .ph-tl .ph-h.r{right:-9px}
#backgroundVideoBox .ph-tl .ph-h.r{right:-9px}
#backgroundPhotosBox .ph-tl .ph-h::before{content:"";width:6px;height:36px;border-radius:3px;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.4)}
#backgroundVideoBox .ph-tl .ph-h::before{content:"";width:6px;height:36px;border-radius:3px;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.4)}
#backgroundPhotosBox .ph-tl .photo-asset-item.dragging .ph-h::before{background:var(--primary)}
#backgroundVideoBox .ph-tl .photo-asset-item.dragging .ph-h::before{background:var(--primary)}
#backgroundPhotosBox .ph-strip.ph-tl>label.btn{width:72px;height:72px;margin-left:4px;border-radius:10px;background:#fff!important;color:#111!important;box-shadow:none!important}
#backgroundVideoBox .ph-strip.ph-tl>label.btn{width:72px;height:72px;margin-left:4px;border-radius:10px;background:#fff!important;color:#111!important;box-shadow:none!important}
#backgroundPhotosBox .ph-strip.ph-tl>label.btn svg{width:26px;height:26px}
#backgroundVideoBox .ph-strip.ph-tl>label.btn svg{width:26px;height:26px}
#backgroundPhotosBox .ph-tl .photo-asset-item.selected .photo-thumb-wrap{box-shadow:none!important}
#backgroundVideoBox .ph-tl .photo-asset-item.selected .photo-thumb-wrap{box-shadow:none!important}

/* без зазоров: ширина плитки = время; разделитель рисуется внутри плитки, чтобы масштаб с дорожкой песни совпадал */
#backgroundPhotosBox .ph-tl .photo-asset-item{box-sizing:border-box;padding-right:2px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#backgroundVideoBox .ph-tl .photo-asset-item{box-sizing:border-box;padding-right:2px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#backgroundPhotosBox .ph-tl .photo-asset-item.lift{z-index:6;opacity:.92;box-shadow:0 8px 22px rgba(0,0,0,.55);transition:none}
#backgroundVideoBox .ph-tl .photo-asset-item.lift{z-index:6;opacity:.92;box-shadow:0 8px 22px rgba(0,0,0,.55);transition:none}
#backgroundPhotosBox .ph-tl .photo-asset-item.drop-b::before,#backgroundPhotosBox .ph-tl .photo-asset-item.drop-a::before{content:"";position:absolute;top:-2px;bottom:-2px;width:3px;border-radius:2px;background:var(--primary);z-index:5}
#backgroundVideoBox .ph-tl .photo-asset-item.drop-b::before,#backgroundVideoBox .ph-tl .photo-asset-item.drop-a::before{content:"";position:absolute;top:-2px;bottom:-2px;width:3px;border-radius:2px;background:var(--primary);z-index:5}
#backgroundPhotosBox .ph-tl .photo-asset-item.drop-b::before{left:-2px}
#backgroundVideoBox .ph-tl .photo-asset-item.drop-b::before{left:-2px}
#backgroundPhotosBox .ph-tl .photo-asset-item.drop-a::before{right:-1px}
#backgroundVideoBox .ph-tl .photo-asset-item.drop-a::before{right:-1px}
#backgroundPhotosBox .ph-strip.reordering{touch-action:none;overflow-x:hidden}
#backgroundVideoBox .ph-strip.reordering{touch-action:none;overflow-x:hidden}
/* дорожка песни */
#backgroundPhotosBox .ph-song{overflow:hidden;margin:0 0 6px;padding:0 14px;scrollbar-width:none}
#backgroundVideoBox .ph-song{overflow:hidden;margin:0 0 6px;padding:0 14px;scrollbar-width:none}
#backgroundPhotosBox .ph-song::-webkit-scrollbar{display:none}
#backgroundVideoBox .ph-song::-webkit-scrollbar{display:none}
#backgroundPhotosBox .ph-song-in{position:relative;height:34px;border-radius:8px;background:rgba(166,240,0,.10);display:flex;align-items:center;min-width:40px}
#backgroundVideoBox .ph-song-in{position:relative;height:34px;border-radius:8px;background:rgba(166,240,0,.10);display:flex;align-items:center;min-width:40px}
#backgroundPhotosBox .ph-song-in canvas{display:block;border-radius:8px}
#backgroundVideoBox .ph-song-in canvas{display:block;border-radius:8px}
#backgroundPhotosBox .ph-song-t{position:absolute;left:8px;top:2px;font-size:10px;line-height:1;color:var(--primary);opacity:.95;pointer-events:none;text-shadow:0 0 4px #000}
#backgroundVideoBox .ph-song-t{position:absolute;left:8px;top:2px;font-size:10px;line-height:1;color:var(--primary);opacity:.95;pointer-events:none;text-shadow:0 0 4px #000}
#backgroundPhotosBox .ph-tl .photo-asset-item img{-webkit-user-drag:none;user-drag:none;pointer-events:none}
#backgroundVideoBox .ph-tl .photo-asset-item img{-webkit-user-drag:none;user-drag:none;pointer-events:none}

/* 500 проектов: карточки вне экрана не рисуются, список открывается сразу */
.project-card{content-visibility:auto;contain-intrinsic-size:auto 76px}

/* единый скроллер: фото + песня; метка конца песни, бегунок, кнопка «Запустить» */
#backgroundPhotosBox .ph-strip.ph-tl{display:block}
#backgroundVideoBox .ph-strip.ph-tl{display:block}
#backgroundPhotosBox .ph-tracks{position:relative;display:flex;flex-direction:column;gap:6px;width:max-content;min-width:100%}
#backgroundVideoBox .ph-tracks{position:relative;display:flex;flex-direction:column;gap:6px;width:max-content;min-width:100%}
#backgroundPhotosBox .ph-row{position:relative;display:flex;align-items:center;gap:6px}
#backgroundVideoBox .ph-row{position:relative;display:flex;align-items:center;gap:6px}
#backgroundPhotosBox .ph-strip.ph-tl .ph-row>label.btn{flex:none;width:72px;height:72px;margin-left:4px;border-radius:10px;background:#fff!important;color:#111!important;box-shadow:none!important}
#backgroundVideoBox .ph-strip.ph-tl .ph-row>label.btn{flex:none;width:72px;height:72px;margin-left:4px;border-radius:10px;background:#fff!important;color:#111!important;box-shadow:none!important}
#backgroundPhotosBox .ph-strip.ph-tl .ph-row>label.btn svg{width:26px;height:26px}
#backgroundVideoBox .ph-strip.ph-tl .ph-row>label.btn svg{width:26px;height:26px}
#backgroundPhotosBox .ph-song{overflow:visible;margin:0;padding:0}
#backgroundVideoBox .ph-song{overflow:visible;margin:0;padding:0}
#backgroundPhotosBox .ph-song-in{cursor:pointer}
#backgroundVideoBox .ph-song-in{cursor:pointer}
#backgroundPhotosBox .ph-end{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:var(--primary);border-radius:1px;pointer-events:none;z-index:4}
#backgroundVideoBox .ph-end{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:var(--primary);border-radius:1px;pointer-events:none;z-index:4}
#backgroundPhotosBox .ph-over{position:absolute;top:0;height:72px;background:rgba(0,0,0,.55);border-radius:0 8px 8px 0;pointer-events:none;z-index:3}
#backgroundVideoBox .ph-over{position:absolute;top:0;height:72px;background:rgba(0,0,0,.55);border-radius:0 8px 8px 0;pointer-events:none;z-index:3}
#backgroundPhotosBox .ph-playhead{position:absolute;top:-5px;bottom:-5px;left:0;width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 6px rgba(255,255,255,.75);border-radius:1px;pointer-events:none;z-index:8}
#backgroundVideoBox .ph-playhead{position:absolute;top:-5px;bottom:-5px;left:0;width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 6px rgba(255,255,255,.75);border-radius:1px;pointer-events:none;z-index:8}
#backgroundPhotosBox .ph-play{margin:0 10px 0 auto;border:0;border-radius:99px;padding:6px 13px;background:var(--primary);color:#0b0d02;font:700 13px/1 inherit;font-family:inherit}
#backgroundVideoBox .ph-play{margin:0 10px 0 auto;border:0;border-radius:99px;padding:6px 13px;background:var(--primary);color:#0b0d02;font:700 13px/1 inherit;font-family:inherit}
#backgroundPhotosBox .ph-play.on{background:#fff}
#backgroundVideoBox .ph-play.on{background:#fff}
#backgroundPhotosBox .ph-strip.ph-tl .ph-row>label.btn{font-size:0!important;display:grid!important;place-items:center;padding:0!important;gap:0!important;overflow:hidden}
#backgroundVideoBox .ph-strip.ph-tl .ph-row>label.btn{font-size:0!important;display:grid!important;place-items:center;padding:0!important;gap:0!important;overflow:hidden}
#backgroundPhotosBox .ph-strip.ph-tl .ph-row>label.btn>*:not(svg){display:none!important}
#backgroundVideoBox .ph-strip.ph-tl .ph-row>label.btn>*:not(svg){display:none!important}

/* ===== Редактор фото (как в CapCut) ===== */
.ph-done,.ph-transport,.ph-tools,.ph-center,.ph-ruler,.ph-step{display:none}
#backgroundPhotosBox .ph-head{flex-wrap:wrap;gap:6px}
#backgroundVideoBox .ph-head{flex-wrap:wrap;gap:6px}
#backgroundPhotosBox .ph-play{margin:0}
#backgroundVideoBox .ph-play{margin:0}
#backgroundPhotosBox .ph-open{display:inline-flex;align-items:center;margin:0 6px 0 auto;border:0;border-radius:99px;padding:6px 12px;background:var(--surface-3,#262a26);color:var(--text,#fff);font-weight:600;font-size:13px;line-height:1;font-family:inherit}
#backgroundVideoBox .ph-open{display:inline-flex;align-items:center;margin:0 6px 0 auto;border:0;border-radius:99px;padding:6px 12px;background:var(--surface-3,#262a26);color:var(--text,#fff);font-weight:600;font-size:13px;line-height:1;font-family:inherit}
.ph-tlwrap{position:relative}
#sheetBackground.ph-ed{max-height:min(58dvh,560px)}
#sheetBackground.ph-ed #bgChoices,#sheetBackground.ph-ed #backgroundHint,#sheetBackground.ph-ed .ph-head,#sheetBackground.ph-ed #photoCountHint{display:none!important}
#sheetBackground.ph-ed .sheet-head [data-sheet-close]{display:none}
#sheetBackground.ph-ed .ph-done{display:inline-flex;border:0;border-radius:99px;padding:8px 16px;background:var(--primary);color:#0b0d02;font-weight:700;font-size:14px;line-height:1;font-family:inherit}
#sheetBackground.ph-ed .sheet-body{padding:2px 0 8px;gap:6px;overflow:hidden}
#sheetBackground.ph-ed #backgroundPhotosBox{display:flex;flex-direction:column;gap:6px;min-height:0;flex:1}
#sheetBackground.ph-ed #backgroundVideoBox{display:flex;flex-direction:column;gap:6px;min-height:0;flex:1}
#sheetBackground.ph-ed .ph-transport{display:flex;align-items:center;gap:12px;padding:0 20px;flex:none}
.ph-tp{width:40px;height:40px;border-radius:50%;border:0;background:var(--primary);color:#0b0d02;font-size:15px;line-height:1;display:grid;place-items:center}
.ph-tp.on{background:#fff}
.ph-time{font-variant-numeric:tabular-nums;opacity:.75;font-size:14px}
.ph-time b{color:#fff}
#sheetBackground.ph-ed .ph-tlwrap{flex:none}
#sheetBackground.ph-ed .ph-center{display:block;position:absolute;left:50%;top:0;bottom:0;width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 6px rgba(255,255,255,.7);z-index:9;pointer-events:none;border-radius:1px}
#sheetBackground.ph-ed #backgroundPhotosBox .ph-strip.ph-tl{padding:6px 50% 8px}
#sheetBackground.ph-ed #backgroundVideoBox .ph-strip.ph-tl{padding:6px 50% 8px}
#sheetBackground.ph-ed .ph-ruler{display:block;margin-bottom:2px}
#sheetBackground.ph-ed .ph-playhead{display:none}
#sheetBackground.ph-ed .ph-tools{display:flex;gap:2px;overflow-x:auto;padding:4px 12px 2px;border-top:1px solid rgba(255,255,255,.07);scrollbar-width:none;flex:none}
#sheetBackground.ph-ed .ph-tools::-webkit-scrollbar{display:none}
.ph-tool{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:62px;padding:8px 6px 6px;border:0;background:none;color:var(--text,#fff);font-weight:600;font-size:11px;line-height:1.1;font-family:inherit;border-radius:12px}
.ph-tool.on{color:var(--primary);background:rgba(166,240,0,.10)}
.ph-tool:disabled{opacity:.3}
#sheetBackground.ph-ed .ph-timing,#sheetBackground.ph-ed .ph-cfg{display:none}
#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=dur] .ph-timing,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=adj] .ph-cfg,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=move] .ph-cfg{display:block;overflow-y:auto;min-height:0;flex:1 1 auto;padding:0 20px 6px}
#sheetBackground.ph-ed #backgroundVideoBox[data-tool=dur] .ph-timing,#sheetBackground.ph-ed #backgroundVideoBox[data-tool=adj] .ph-cfg,#sheetBackground.ph-ed #backgroundVideoBox[data-tool=move] .ph-cfg{display:block;overflow-y:auto;min-height:0;flex:1 1 auto;padding:0 20px 6px}
#sheetBackground.ph-ed .ph-tabs{display:none}
#sheetBackground.ph-ed .ph-step{display:flex;align-items:center;gap:12px;padding:4px 0 10px}
.ph-step span{margin-right:auto;opacity:.7;font-size:14px}
.ph-step button{width:40px;height:40px;border-radius:12px;border:0;background:var(--surface-3,#262a26);color:#fff;font-size:20px;line-height:1}
.ph-step b{min-width:56px;text-align:center;font-variant-numeric:tabular-nums}
#sheetBackground.ph-ed .sheet-foot,#sheetBackground.ph-ed>footer{display:none}
#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=dur] .ph-timing,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=adj] .ph-cfg,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=move] .ph-cfg{padding:0 20px 8px!important;box-sizing:border-box}
#sheetBackground.ph-ed #backgroundVideoBox[data-tool=dur] .ph-timing,#sheetBackground.ph-ed #backgroundVideoBox[data-tool=adj] .ph-cfg,#sheetBackground.ph-ed #backgroundVideoBox[data-tool=move] .ph-cfg{padding:0 20px 8px!important;box-sizing:border-box}
#sheetBackground.ph-ed .ph-timing .field,#sheetBackground.ph-ed .ph-timing .photo-fit-choices{margin-top:4px}

/* ===== «Фото»: в обычной шторке только главное, всё остальное — в редакторе ===== */
#backgroundPhotosBox .ph-actions{display:flex;gap:8px;margin:2px 0 6px}
#backgroundVideoBox .ph-actions{display:flex;gap:8px;margin:2px 0 6px}
#backgroundPhotosBox .ph-actions button{flex:1;border:0;border-radius:14px;padding:13px 12px;font-weight:700;font-size:15px;line-height:1.1;font-family:inherit}
#backgroundVideoBox .ph-actions button{flex:1;border:0;border-radius:14px;padding:13px 12px;font-weight:700;font-size:15px;line-height:1.1;font-family:inherit}
#backgroundPhotosBox .ph-actions .ph-addn{background:var(--surface-3,#262a26);color:var(--text,#fff)}
#backgroundVideoBox .ph-actions .ph-addn{background:var(--surface-3,#262a26);color:var(--text,#fff)}
#backgroundPhotosBox .ph-actions .ph-open{margin:0;background:var(--primary);color:#0b0d02}
#backgroundVideoBox .ph-actions .ph-open{margin:0;background:var(--primary);color:#0b0d02}
#sheetBackground:not(.ph-ed) #backgroundPhotosBox .ph-tlwrap,#sheetBackground:not(.ph-ed) #backgroundPhotosBox .ph-transport,#sheetBackground:not(.ph-ed) #backgroundPhotosBox .ph-timing,#sheetBackground:not(.ph-ed) #backgroundPhotosBox .ph-cfg,#sheetBackground:not(.ph-ed) #backgroundPhotosBox .ph-tools,#sheetBackground:not(.ph-ed) #backgroundPhotosBox .ph-play,#sheetBackground:not(.ph-ed) #backgroundPhotosBox .ph-scope{display:none!important}
#sheetBackground:not(.ph-ed) #backgroundVideoBox .ph-tlwrap,#sheetBackground:not(.ph-ed) #backgroundVideoBox .ph-transport,#sheetBackground:not(.ph-ed) #backgroundVideoBox .ph-timing,#sheetBackground:not(.ph-ed) #backgroundVideoBox .ph-cfg,#sheetBackground:not(.ph-ed) #backgroundVideoBox .ph-tools,#sheetBackground:not(.ph-ed) #backgroundVideoBox .ph-play,#sheetBackground:not(.ph-ed) #backgroundVideoBox .ph-scope{display:none!important}
#sheetBackground.ph-ed #backgroundPhotosBox .ph-actions{display:none}
#sheetBackground.ph-ed #backgroundVideoBox .ph-actions{display:none}
/* редактор: подпись области и подсветка «все фото» */
.ph-scope{display:none}
#sheetBackground.ph-ed .ph-scope{display:block;flex:none;padding:0 20px;font-size:12px;line-height:1.3;color:rgba(255,255,255,.6)}
#sheetBackground.ph-ed #backgroundPhotosBox[data-scope=all] .ph-tl .photo-asset-item.selected::after{display:none}
#sheetBackground.ph-ed #backgroundVideoBox[data-scope=all] .ph-tl .photo-asset-item.selected::after{display:none}
#sheetBackground.ph-ed #backgroundPhotosBox[data-scope=all] .ph-tl .photo-delete,#sheetBackground.ph-ed #backgroundPhotosBox[data-scope=all] .ph-step{display:none!important}
#sheetBackground.ph-ed #backgroundVideoBox[data-scope=all] .ph-tl .photo-delete,#sheetBackground.ph-ed #backgroundVideoBox[data-scope=all] .ph-step{display:none!important}
#sheetBackground.ph-ed #backgroundPhotosBox[data-scope=all] .ph-tl .photo-thumb-wrap{box-shadow:inset 0 -3px 0 var(--primary)!important}
#sheetBackground.ph-ed #backgroundVideoBox[data-scope=all] .ph-tl .photo-thumb-wrap{box-shadow:inset 0 -3px 0 var(--primary)!important}
#sheetBackground.ph-ed .ordinary-photo-head .pf-link{display:none}

/* копия видео-текста со сдвинутой полосой глитча (поверх оригинала, те же правила наложения) */
#photoTextGlitch{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5;display:none;background:transparent}
#photoTextGlitch.key-black{mix-blend-mode:screen}
#photoTextGlitch.key-green{filter:url(#veyroGreenKey)}

/* вход в редактор прямо из «Фото»: «‹ Фон» возвращает к выбору типа фона */
.ph-back{display:none}
#sheetBackground.ph-ed .ph-back{display:inline-flex;align-items:center;border:0;background:none;color:var(--text,#fff);opacity:.75;font-weight:600;font-size:14px;padding:6px 8px 6px 0;font-family:inherit}
body.photo-mode #sheetBackground .ph-back{display:none!important}
#sheetBackground.ph-ed .sheet-head{gap:8px}

.preview-note{margin:0 6px 8px;font-size:11px;line-height:1.35;color:rgba(255,255,255,.4);text-align:center}

/* «Тёплый шум»: тёплая накладка + цветной шум полосами (в превью — приближённо) */
#veyroWarmTint{position:absolute;inset:0;pointer-events:none;mix-blend-mode:multiply;z-index:6;border-radius:inherit}
#veyroWarmNoise{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;mix-blend-mode:overlay;z-index:6;image-rendering:auto;border-radius:inherit}

/* ===== Редактор «Фото» встроен прямо в раздел: тип фона сверху компактной строкой, без переходов ===== */
.ph-actions,.ph-back{display:none!important}
#sheetBackground.ph-ed #bgChoices{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:6px!important;flex:none;padding:0 20px}
#sheetBackground.ph-ed #bgChoices .chip{flex-direction:row;align-items:center;justify-content:center;min-height:38px!important;height:38px;padding:0 6px!important;gap:0;border-radius:12px!important;font-size:14px;box-shadow:none!important;text-align:center}
#sheetBackground.ph-ed #bgChoices .chip::before,#sheetBackground.ph-ed #bgChoices .chip::after{display:none!important}
#sheetBackground.ph-ed #bgChoices .chip.active{background:var(--primary-soft,rgba(166,240,0,.14))!important;color:var(--primary)!important;box-shadow:none!important;animation:none}
/* высота плиток задаётся одной переменной: на планшете крупнее */
#sheetBackground{--ph-h:72px}
#backgroundPhotosBox .ph-tl .photo-asset-item,#backgroundPhotosBox .ph-tl .photo-thumb-wrap{height:var(--ph-h)!important}
#backgroundVideoBox .ph-tl .photo-asset-item,#backgroundVideoBox .ph-tl .photo-thumb-wrap{height:var(--ph-h)!important}
#backgroundPhotosBox .ph-strip.ph-tl .ph-row>label.btn{width:var(--ph-h);height:var(--ph-h)}
#backgroundVideoBox .ph-strip.ph-tl .ph-row>label.btn{width:var(--ph-h);height:var(--ph-h)}
#backgroundPhotosBox .ph-over{height:var(--ph-h)}
#backgroundVideoBox .ph-over{height:var(--ph-h)}
/* панель настройки (Свет и цвет / Движение): лента прячется, панель получает всю высоту, ✓ закрывает */
.ph-pbar{display:none}
#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=adj] .ph-pbar,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=move] .ph-pbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 20px 0;flex:none}
#sheetBackground.ph-ed #backgroundVideoBox[data-tool=adj] .ph-pbar,#sheetBackground.ph-ed #backgroundVideoBox[data-tool=move] .ph-pbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 20px 0;flex:none}
.ph-pbar b{font-size:15px;font-weight:650}
.ph-pclose{width:44px;height:36px;border:0;border-radius:12px;background:var(--primary);color:#0b0d02;font-size:18px;font-weight:700;line-height:1}
#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=adj] .ph-transport,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=adj] .ph-tlwrap,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=adj] .ph-scope,
#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=move] .ph-transport,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=move] .ph-tlwrap,#sheetBackground.ph-ed #backgroundPhotosBox[data-tool=move] .ph-scope{display:none}
#sheetBackground.ph-ed #backgroundVideoBox[data-tool=move] .ph-transport,#sheetBackground.ph-ed #backgroundVideoBox[data-tool=move] .ph-tlwrap,#sheetBackground.ph-ed #backgroundVideoBox[data-tool=move] .ph-scope{display:none}
#sheetBackground.ph-ed.ph-tool-open{max-height:min(64dvh,660px)}
/* крупные ползунки под палец */
#sheetBackground.ph-ed .rg-row{display:flex;align-items:center;gap:10px}
#sheetBackground.ph-ed .rg-row input[type=range]{flex:1;min-width:0;height:48px!important;touch-action:pan-y}
#sheetBackground.ph-ed .rg-row input[type=range]::-webkit-slider-runnable-track{height:10px}
#sheetBackground.ph-ed .rg-row input[type=range]::-webkit-slider-thumb{width:32px;height:32px;margin-top:-11px}
#sheetBackground.ph-ed .rg-row input[type=range]::-moz-range-track,#sheetBackground.ph-ed .rg-row input[type=range]::-moz-range-progress{height:10px}
#sheetBackground.ph-ed .rg-row input[type=range]::-moz-range-thumb{width:32px;height:32px}
.rg-step{flex:none;width:46px;height:46px;border:0;border-radius:14px;background:var(--surface-3,#262a26);color:var(--text,#fff);font-size:24px;line-height:1;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.rg-step:active{background:var(--surface-4,#323732)}
#sheetBackground.ph-ed .adj-val strong{font-size:28px}
#sheetBackground.ph-ed .adj-val{font-size:15px;margin-bottom:6px}
#sheetBackground.ph-ed .adj-chip{padding:12px 16px;font-size:14px}
#sheetBackground.ph-ed .adj-slider{padding:6px 0 4px}
#sheetBackground.ph-ed .effect-reset{min-height:44px}
/* планшет, вертикально (600–899): шире и выше, чем телефонная шторка */
@media (min-width:600px) and (max-width:899px){
  #sheetBackground{--ph-h:92px}
  #sheetBackground.ph-ed{width:min(880px,100%);max-height:min(66dvh,820px)}
  #sheetBackground.ph-ed.ph-tool-open{max-height:min(74dvh,900px)}
  #sheetBackground.ph-ed .ph-tool{min-width:84px;font-size:13px;padding:12px 8px 8px}
  #sheetBackground.ph-ed .ph-tool svg{width:26px;height:26px}
  #sheetBackground.ph-ed .ph-time{font-size:16px}
  #sheetBackground.ph-ed .ph-tp{width:46px;height:46px}
}
/* планшет в горизонтали и ПК (от 900): шторка уже боковая панель во всю высоту — не ограничиваем */
@media (min-width:900px){
  #sheetBackground{--ph-h:88px}
  #sheetBackground.ph-ed,#sheetBackground.ph-ed.ph-tool-open{max-height:none!important}
  #sheetBackground.ph-ed .ph-tool{min-width:78px;font-size:13px;padding:12px 6px 8px}
  #sheetBackground.ph-ed .ph-tool svg{width:26px;height:26px}
}

/* ===== «Фон»: одна шторка для всех типов (Чёрный / Зелёный / Видео / Фото) ===== */
#sheetBackground.ph-ed #backgroundPhotosBox[hidden],#sheetBackground.ph-ed #backgroundVideoBox[hidden]{display:none!important}
#sheetBackground.ph-ed.bg-plain #backgroundHint{display:block!important;margin:0;padding:14px 20px 18px;font-size:14px;color:rgba(255,255,255,.6)}

body.photo-mode #sheetBackground.ph-ed #bgChoices{grid-template-columns:repeat(2,1fr)!important}
#sheetBackground.ph-ed #backgroundVideoBox .photo-asset-item .photo-thumb{object-fit:cover}

.ph-strip #vdList{display:flex!important;flex-direction:row!important;flex-wrap:nowrap;gap:0;margin:0;padding:0}
.vd-one{padding:2px 0}
#sheetBackground.ph-ed #backgroundVideoBox[data-tool=dur] .ph-scope{display:none}
.vd-x{position:absolute;top:3px;right:12px;width:24px;height:24px;border:0;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:17px;line-height:24px;padding:0;z-index:5;font-family:inherit;display:grid;place-items:center;touch-action:manipulation}

#veyroBmScan,#veyroBmBand{position:absolute;left:0;right:0;pointer-events:none;z-index:6}
#veyroBmScan{top:0;bottom:0}
#veyroBmBand{height:4.5%;background:repeating-linear-gradient(90deg,#777 0 2px,#999 2px 3px,#666 3px 6px,#aaa 6px 7px);mix-blend-mode:overlay;animation:bmBand 4s linear infinite}
@keyframes bmBand{from{top:100%}to{top:-5%}}


.vd-lift{opacity:.9;box-shadow:0 6px 18px rgba(0,0,0,.5);position:relative;transition:none!important}
#vdList .photo-asset-item{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}

/* «Свой шрифт»: заметная кнопка (лаймовая пунктирная рамка) и список своих шрифтов с крестиком */
.chip.chip-add{border:1.5px dashed var(--primary,#a6f000)!important;color:var(--primary,#a6f000)!important;background:rgba(166,240,0,.08)!important;font-weight:700;cursor:pointer}
.chip.chip-add:active{background:rgba(166,240,0,.18)!important}
.my-fonts{margin-top:8px;gap:8px}
.chip.my-font{display:inline-flex;align-items:center;padding:0!important;overflow:hidden}
.chip.my-font .my-font-pick{background:none;border:0;color:inherit;font:inherit;padding:8px 6px 8px 14px;cursor:pointer}
.chip.my-font .my-font-del{background:none;border:0;color:inherit;opacity:.65;font-size:18px;line-height:1;padding:8px 12px 8px 4px;cursor:pointer}
.chip.my-font .my-font-del:active{opacity:1}

#fontChoices .chip.chip-add{border:1.5px dashed var(--primary,#a6f000)!important;box-shadow:none!important;outline:0}

/* чёрный/зелёный: на телефоне компактная шторка, на планшете — та же панель, что у «Фото» и «Видео» (никуда не уезжает вниз) */
@media (max-width:599px){
  #sheetBackground.ph-ed.bg-plain{max-height:none;height:auto!important;min-height:0!important}
  #sheetBackground.ph-ed.bg-plain .sheet-body{flex:0 0 auto!important;height:auto!important;min-height:0!important;max-height:none!important}
}
@media (min-width:600px){
  #sheetBackground.ph-ed.bg-plain{min-height:min(66dvh,820px)}
}

#veyroNotice{display:none;position:fixed;left:50%;transform:translateX(-50%);top:calc(env(safe-area-inset-top,0px) + 64px);z-index:200;max-width:min(92vw,520px);padding:10px 16px;border-radius:14px;background:rgba(20,24,16,.96);border:1px solid var(--primary,#a6f000);color:#fff;font-size:14px;line-height:1.35;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.45)}
#veyroNotice.err{border-color:#ff6b5e;color:#ffd9d4}

