body[data-layout="wide"] #floatingLiquidDock #scenesHorizontalStrip:not(.hidden) {
  max-height: var(--scene-list-height, 50dvh);
  overscroll-behavior: contain;
}
@media (min-width: 1024px) {
  body[data-layout="wide"] #floatingLiquidDock #scenesHorizontalStrip:not(.hidden) {
    overflow: hidden auto;
    scrollbar-width: thin;
    scrollbar-color: #69636d transparent;
  }
}
@media (max-width: 1023px) {
  #floatingLiquidDock #scenesHorizontalStrip[data-mode="video"]:not(.hidden) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    align-content: start;
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
    background: rgba(20,19,23,.97);
    overflow: hidden auto;
    animation: videoListIn .24s ease-out;
  }
  #scenesHorizontalStrip[data-mode="video"] > div { width: auto; min-width: 0; }
}
@keyframes videoListIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  body[data-layout="wide"] #floatingLiquidDock #scenesHorizontalStrip:not(.hidden) { animation: none; }
}
.scene-download {
  position: absolute; top: 4px; right: 4px; z-index: 6;
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; color: white; background: rgba(10,10,13,.84);
}
#studioModesButton{margin-left:auto;white-space:nowrap}
#studioModesDialog {
  position:fixed;inset:0;isolation:isolate;margin:auto;width:min(530px,calc(100vw - 24px));max-height:calc(100dvh - 40px);
  padding:0;color:#faf8fb;overflow:hidden;border:1px solid #ffffff38;border-radius:28px;
  background:radial-gradient(ellipse at 90% 0%,#4a2a43 0%,transparent 52%),linear-gradient(145deg,#27212b,#121015 80%);
  box-shadow:inset 0 1px #fff2,0 28px 86px #000a;
}
#studioModesDialog[open]{display:flex;flex-direction:column}
#studioModesDialog::backdrop{background:#08050bc9;backdrop-filter:blur(12px)}
.mode-header{position:relative;isolation:isolate;display:flex;flex:none;min-height:94px;align-items:center;padding:18px 22px;overflow:hidden}
#studioModesDialog h2{font-size:clamp(24px,4vw,34px);letter-spacing:-.052em;line-height:1.1;font-weight:800;z-index:1}
.mode-berry{position:absolute;right:72px;top:8px;width:75px;height:75px;object-fit:contain;transform:rotate(14deg);filter:drop-shadow(3px 8px 9px #1d091e88)}
#modesClose{z-index:3;align-self:flex-start;margin-left:auto;width:36px;height:36px;border:1px solid #ffffff26;background:linear-gradient(#514552,#2d252f);border-radius:50%;font-size:23px;line-height:1}
#modeList{overflow:auto;overscroll-behavior:contain;min-height:0;padding:2px 16px 16px;display:grid;gap:9px;scrollbar-width:thin}
.mode-card{--glow:#f39c5b;--tint:#442d28;border:1px solid #ffffff1e;border-radius:18px;background:linear-gradient(110deg,var(--tint),#201d25 76%);overflow:hidden}
.mode-card.shorts{--glow:#c5adff;--tint:#392a4c}.mode-card.faces{--glow:#a7d8ff;--tint:#253748}
.mode-summary{display:flex;align-items:center;gap:14px;min-height:77px;width:100%;padding:8px 16px 8px 11px;text-align:left}
.mode-summary img{width:52px;height:52px;flex:none;object-fit:contain;filter:drop-shadow(2px 5px 5px #0005);transition:transform .25s}
.mode-summary strong{font-size:19px;letter-spacing:-.035em;font-weight:750}.mode-summary small{display:block;color:#c6bec9;font-size:12px;margin-top:1px}
button.mode-summary::after{content:'⌄';margin-left:auto;color:var(--glow)}button.mode-summary[aria-expanded=true]::after{transform:rotate(180deg)}
.mode-options{padding:4px 14px 12px}.mode-options p{font-size:13px;color:#c6bec9}.mode-options li,.mode-options button{padding:8px 0;font-size:14px}.mode-options button{display:flex;align-items:center;gap:8px;color:#ffdc8b}.mode-options img{width:34px;height:34px;object-fit:cover;border-radius:9px}
.mode-particles{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
.assembling .mode-card{animation:modeSurface .82s both}.assembling .mode-card:nth-child(2){animation-delay:55ms}.assembling .mode-card:nth-child(3){animation-delay:100ms}
@keyframes modeSurface{0%{opacity:.08;transform:translateY(5px)}40%{opacity:.45}100%{opacity:1;transform:none}}
@media(hover:hover){button.mode-summary:hover img{transform:translateY(-2px) rotate(-5deg)}}
@media(max-width:420px){.mode-header{min-height:84px}.mode-berry{right:59px;width:57px;height:57px;top:14px}.mode-summary{min-height:70px}.mode-summary img{width:44px;height:44px}}
@media(prefers-reduced-motion:reduce){#studioModesDialog *{animation:none!important;transition:none!important}.mode-particles{display:none}}
#studioModesDialog{background:transparent;border-color:transparent;box-shadow:none}
#studioModesDialog::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border:1px solid #ffffff38;border-radius:inherit;background:radial-gradient(ellipse at 90% 0%,#4a2a43 0%,transparent 52%),linear-gradient(145deg,#27212b,#121015 80%);box-shadow:inset 0 1px #fff2}
#studioModesDialog.assembling::before{animation:modeShell .82s ease-out both}
#studioModesDialog.assembling .mode-berry{animation:modeBerry .8s ease-out both}
@keyframes modeShell{0%{opacity:.04}40%{opacity:.42}100%{opacity:1}}
@keyframes modeBerry{from{opacity:.15;transform:translateY(5px) rotate(5deg)}to{opacity:1;transform:rotate(14deg)}}
@media(prefers-reduced-motion:reduce){#studioModesDialog::before{animation:none!important}}
.movie-work{display:grid;gap:.65rem;color:inherit;min-width:0}
.movie-work form{display:grid;gap:.8rem;padding:1rem;background:#211c29;border-radius:1rem}
.movie-work input{max-width:100%;color:inherit}
.movie-work video{width:100%;max-height:45vh;border-radius:1rem;background:#100d15}
.movie-work a{color:#ff9ada}
#scenesHorizontalStrip .provider-styles{grid-column:1/-1;min-width:min(280px,75vw);width:100%;padding:8px;text-align:left}
.provider-styles h3{font-weight:700;margin:10px 0 5px}.provider-styles ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0}
.provider-styles li{padding:6px 10px;border:1px solid currentColor;border-radius:12px;font-size:13px;overflow-wrap:anywhere}
#floatingLiquidDock #scenesHorizontalStrip[data-mode="photo"]:has(.provider-styles):not(.hidden){max-height:var(--scene-list-height,50dvh);overflow:auto;white-space:normal;align-items:start}
.provider-styles li:has(button){padding:0}
.provider-styles li button{padding:7px 10px;border-radius:inherit;color:inherit}
.provider-styles li button[aria-pressed=true]{color:#231929;background:#d7efac}
#inlineMovie:not([hidden]){position:relative;z-index:2;margin:10px auto;max-width:640px;padding:16px;border-radius:16px;background:var(--surface,#28222c)}

.provider-styles input[type=search]{width:100%;margin:.5rem 0;padding:.6rem .85rem;background:transparent;border:1px solid currentColor;border-radius:1rem;color:inherit}.provider-styles li[hidden]{display:none}
.provider-styles ul.style-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(112px,100%),1fr));gap:8px}
.provider-styles .style-cards li{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--studio-rule);background:var(--studio-surface)}
.provider-styles .style-cards li[hidden]{display:none}
.provider-styles .style-cards button{width:100%;flex:1;min-height:44px;overflow-wrap:anywhere}
.provider-styles .style-cards img,.provider-styles .style-cards video{display:block;width:100%;border-radius:8px}
.provider-styles .style-cards img{aspect-ratio:16/10;object-fit:cover}
.provider-styles .style-cards video{height:auto;aspect-ratio:9/16;object-fit:contain;background:#17131b}
.provider-styles .style-cards img{margin-bottom:5px}

.catalog-player{position:relative}
.provider-styles .style-cards button.catalog-play{position:absolute;inset:0;margin:auto;padding:0;width:44px;height:44px;min-height:44px;border-radius:50%;border:1px solid #fff9;background:#221a30dd;color:white;display:grid;place-items:center;cursor:pointer}
.catalog-play::before{content:"";width:0;height:0;border-block:8px solid transparent;border-left:13px solid currentColor;margin-left:3px}
.catalog-play[data-playing=true]::before{width:12px;height:15px;border:0;border-inline:4px solid currentColor;margin:0;box-sizing:border-box}

#photoProcessing:not([hidden]) {
  position:absolute; inset:0; z-index:42; display:grid; place-items:center;
  background:linear-gradient(140deg,#20122a55,#161120a6);
}
#photoProcessing > div {
  display:grid; justify-items:center; gap:7px; padding:26px 32px; border-radius:24px;
  background:#201825ed; color:white; border:1px solid #d5b7f555; box-shadow:0 12px 54px #0005;
}
#photoProcessing strong {font-size:clamp(18px,2.5vw,29px)}
#photoProcessing span {font-size:14px;color:#e5daeb}
#photoProcessing .wait-particles {position:relative;width:65px;height:58px}
.wait-particles i {position:absolute;top:50%;left:50%;width:4px;height:4px;border-radius:50%;background:#c9ed98;transform:rotate(calc(var(--n)*15deg)) translateX(20px);animation:wait-gather 2.2s ease-in-out infinite alternate;animation-delay:calc(var(--n)*-.09s)}
.wait-particles i:nth-child(even){background:#c89af8}
@keyframes wait-gather {from{opacity:.35;transform:rotate(calc(var(--n)*15deg - 28deg)) translateX(28px) scale(.65)}to{opacity:1;transform:rotate(calc(var(--n)*15deg + 32deg)) translateX(10px)}}
@media(prefers-reduced-motion:reduce){.wait-particles i{animation:none}}
#photoProcessing time {font-variant-numeric:tabular-nums}
#dockGenerateBtn:disabled {min-width:0;white-space:normal;line-height:1.1;text-align:center;overflow:hidden}
#workCompare:not([hidden]) {position:absolute;inset:0;pointer-events:none}
#workOriginal {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#17131b;clip-path:inset(0 calc(100% - var(--split)) 0 0)}
.work-line {position:absolute;top:0;bottom:0;left:var(--split);width:2px;background:white;box-shadow:0 0 4px #0009}
#workDivider {position:absolute;top:0;bottom:0;left:clamp(0px,calc(var(--split) - 22px),calc(100% - 44px));width:44px;height:100%;opacity:0;cursor:ew-resize;touch-action:none;pointer-events:auto;margin:0}
.work-line::after {content:'‹  ›';position:absolute;top:50%;left:0;transform:translate(-50%,-50%);border-radius:100%;width:36px;height:36px;display:grid;place-items:center;background:#c9eb9e;color:#261930;font:700 18px/1 sans-serif;white-space:pre}
#workCompare:has(input:focus-visible) .work-line::after {outline:3px solid white}
.work-before,.work-after {position:absolute;bottom:12px;color:white;background:#241a2bdd;border-radius:20px;font:600 12px/1.4 sans-serif;padding:5px 10px}
.work-before {left:10px}.work-after {right:10px}
@media(min-width:768px){#sheet-video-scenes.rd-modal .sheet-panel {width:min(920px,calc(100vw - 64px));max-width:920px}}

#photoStageProgress {display:block;width:min(220px,55vw);height:5px;accent-color:#c9ed98;margin:6px auto 10px}
#scenesHorizontalStrip:empty{display:none}
