/* Scene inspector, measured against shots.so's Frame tab at 1440×900. */
.panel .panel-scroll>section:has(>.frame-scenes){padding-top:12px}
.frame-scenes{margin-top:2px}
.option-grid.frame-scenes>button:has(.option-preview){height:56px;min-height:56px;gap:2px;padding:0;align-items:stretch}
.frame-scenes .option-preview{width:100%;height:36px;min-height:36px;max-height:36px;aspect-ratio:16/9;border-radius:11px;overflow:hidden}
.frame-scenes .option-label{height:18px;line-height:18px;font-size:11px}
.frame-scenes .option-preview img{display:block;width:100%;height:100%;min-height:0;max-height:100%;object-fit:cover;object-position:center;border-radius:inherit}
.frame-scenes button[aria-pressed=true] .option-preview{
  outline:1px solid var(--option-outline,#888);outline-offset:2px;
}
.scene-settings{margin-top:20px}
.scene-settings .frame-subheading{
  font:500 11px/16px Inter,sans-serif;text-transform:uppercase;
  color:var(--muted);margin:0 0 8px;
}
.scene-shadow-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.option-grid.scene-shadow-grid>button:has(.option-preview){min-width:0;padding:0;background:transparent}
#shadow-overlays.scene-shadow-grid .option-preview{width:100%;height:auto;aspect-ratio:1.25/1;border-radius:9px;overflow:hidden;background:var(--slider-track)}
.scene-shadow-grid .option-preview img{width:100%;height:100%;object-fit:cover;border-radius:9px}
.scene-shadow-grid button[aria-pressed=true] .option-preview,
.scene-pack-grid button[aria-pressed=true] .option-preview{
  outline:1px solid var(--option-outline,#888);outline-offset:2px;
}
.scene-more{display:grid;place-items:center;font-size:17px;letter-spacing:1px;color:var(--fg)}
#frame-shadow [data-slider=overlayOpacity]{margin-top:12px}
#frame-shadow .shadow-layer{margin-top:8px}
#frame-shadow .shadow-layer button{padding:7px 3px;font-size:12px;border-radius:8px}
.scene-shape-carousel{position:relative;display:block;width:100%;height:104px;min-height:104px;max-height:104px;border-radius:12px;overflow:hidden}
.scene-shape-carousel>button{position:absolute;top:3px;z-index:4;width:32px;height:98px;display:grid;place-items:center;color:var(--fg);font-size:25px;font-weight:300;padding:0;border-radius:9px;background:transparent}
.scene-shape-carousel>button:first-child{left:3px}
.scene-shape-carousel>button:last-child{right:3px}
.scene-shape-carousel>button:disabled{opacity:.28}
.scene-shape-current{position:relative;height:104px;max-width:none;width:100%;margin:0;overflow:hidden}
.scene-preview-card{position:absolute;left:50%;top:50%;width:34.375%;height:55%;transform:translate(-50%,-50%);border-radius:9.7px;background:var(--panel);box-shadow:0 1px 2px #0001;z-index:2;pointer-events:none}
.scene-preview-object{position:absolute;z-index:1;padding:0;border:0;overflow:visible;background:transparent;aspect-ratio:1;min-height:12px;border-radius:6px}
.scene-preview-object img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.scene-preview-object:hover{background:none;filter:brightness(1.09)}
.scene-shape-dots{display:flex;gap:5px;justify-content:center;align-items:center;margin:8px 0 20px;height:5px;min-height:5px}
.scene-shape-dots button{width:5px;height:5px;padding:0;min-width:5px;border-radius:50%;background:var(--subtle)}
.scene-shape-dots button[aria-pressed=true]{background:var(--fg)}
.scene-pack-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:20px}
.option-grid.scene-pack-grid>button:has(.option-preview){padding:0;min-width:0;height:auto;background:transparent;border-radius:11px}
.scene-pack-grid .option-preview{aspect-ratio:1;height:auto;background:var(--slider-track);border-radius:11px;display:grid;place-items:center}
.scene-pack-grid img{width:80%;height:80%;object-fit:contain;border-radius:0;mix-blend-mode:normal}
.scene-shape-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:0}
.scene-shape-actions button{padding:0;display:flex;align-items:center;flex-direction:column;gap:2px;height:53.33px;font:400 11px/18px Inter,sans-serif;color:var(--muted)}
.scene-shape-actions button span:first-child{display:grid;place-items:center;height:33.33px;width:100%;border-radius:11px;background:var(--slider-track);color:var(--fg)}
.scene-shape-actions button:hover span:first-child{background:var(--active)}
.scene-shape-actions button svg{width:20px;height:20px}
.scene-popover{position:fixed;z-index:100;box-sizing:border-box;width:235px;max-height:min(330px,86vh);overflow-y:auto;padding:7px;background:var(--panel);color:var(--fg);border:1px solid var(--line);border-radius:15px;box-shadow:0 12px 25px #0004}
.scene-popover-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.scene-popover-grid button{display:grid;place-items:center;aspect-ratio:1;min-width:0;padding:3px;background:var(--slider-track);border:1px solid var(--line);border-radius:9px}
.scene-popover-grid button[aria-pressed=true]{outline:1px solid var(--option-outline,#888);outline-offset:1px}
.scene-popover-grid button img{width:100%;height:100%;object-fit:contain;max-height:50px;border-radius:7px}
.scene-popover p{text-align:center;font-size:11px;line-height:18px;color:var(--muted);margin:7px 0 1px}
.scene-popover-grid.scene-shadow-gallery button{aspect-ratio:16/9}
.scene-popover-grid.scene-shadow-gallery button img{height:100%;object-fit:cover}
@media(max-width:800px){
 .scene-popover{left:8px!important;top:auto!important;bottom:10px;width:calc(100vw - 16px)}
 .scene-popover-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

.scene-shape-carousel>button:disabled{pointer-events:none}

/* Clip media to its exact cover bounds, including rotated or late-loading assets. */
#frame-shadow .option-preview,#frame-shapes .option-preview{overflow:hidden}
