/* ONE CATALOG v0.6 — scenes, carefully constrained to the existing editor */
html{scroll-padding-top:82px}
.background-library{margin-top:14px}
.background-library summary{display:flex;align-items:center;justify-content:space-between;gap:10px}
.scene-total{border-radius:999px;background:color-mix(in srgb,var(--gold) 12%,transparent);color:var(--gold-dark);font-size:11px;line-height:1;padding:7px 9px;font-weight:700}
.scene-search{width:100%;margin:10px 0 12px;border-radius:15px!important;min-height:42px}
.scene-categories{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:13px}
.scene-chip{border:1px solid #e6dbd0;color:#746763;background:#fffaf6;min-height:31px;padding:6px 10px;border-radius:999px;font-family:inherit;font-weight:600;font-size:11px;line-height:1.2;cursor:pointer;transition:background .18s,border-color .18s,color .18s,transform .18s}
.scene-chip:hover{background:#f6ecdf;transform:translateY(-1px)}
.scene-chip.active{background:#e8d2b7;border-color:#c79c6b;color:#533d2c}
.scene-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:405px;overflow-y:auto;overscroll-behavior:contain;padding:4px 5px 8px 1px;scrollbar-width:thin;scrollbar-color:#d2bda4 transparent}
.scene-item{position:relative;min-width:0}
.scene-opt{width:100%;min-width:0;display:flex;flex-direction:column;padding:5px;border-radius:14px;background:#fffcf8;border:1.5px solid #e6ddd4;color:#484147;text-align:left;cursor:pointer;overflow:hidden;transition:transform .19s ease,box-shadow .19s ease,border-color .19s ease,background .19s ease;box-shadow:0 2px 7px #57422a07}
.scene-opt:hover{transform:translateY(-2px);border-color:#cba46f;box-shadow:0 6px 22px #ad84522b;background:#fff}
.scene-opt.selected{background:#fff8ec;border-color:#b78c57;box-shadow:0 0 0 1px #d7b88f70,0 6px 18px #bea37719}
.scene-opt img{display:block;width:100%;aspect-ratio:1.2/1;object-fit:cover;border-radius:9px;background:#f0eee9}
.scene-name{display:block;max-width:100%;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:7px 3px 2px;font-size:11px;font-weight:650;letter-spacing:-.012em}
.scene-fav{position:absolute;top:10px;right:9px;display:grid;place-items:center;width:28px;height:28px;background:rgba(255,253,250,.9);border:1px solid #ffffffbb;border-radius:11px;color:#907b71;font-size:20px;cursor:pointer;transition:transform .2s,color .2s,background .2s;box-shadow:0 2px 11px #00000014}
.scene-fav:hover{transform:scale(1.1);color:#bd875b}.scene-fav.picked{color:#c28b57;background:#fff6e9}
.scene-bottom-actions{display:flex;gap:9px;margin:14px 0 12px;flex-wrap:wrap}.scene-bottom-actions>.btn{flex:1;min-width:110px;display:flex;align-items:center;justify-content:center;cursor:pointer;min-height:42px;text-align:center;font-size:11px;padding:10px 7px}
.scene-current{font-size:11px;font-weight:700;color:var(--gold-dark);padding:6px 0 10px}
.scene-empty{grid-column:1/-1;padding:20px;text-align:center;color:var(--muted);font-size:12px}
.scene-help{padding:8px 10px!important;background:#faf5ee;border:1px solid #f0e4d7;border-radius:11px;margin-top:13px!important;line-height:1.65!important}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
html[data-theme="midnight"] .scene-chip{background:#2e2e37;color:#dbd1cc;border-color:#49444b}
html[data-theme="midnight"] .scene-chip.active{background:#4a3a30;color:#f0cda7;border-color:#8b6b4d}
html[data-theme="midnight"] .scene-opt{background:#302f38;color:#eee8e8;border-color:#45424d}
html[data-theme="midnight"] .scene-opt:hover,html[data-theme="midnight"] .scene-opt.selected{background:#453c37;border-color:#bea075}
html[data-theme="midnight"] .scene-fav{background:#333139;color:#ebc395;border-color:#5f5145}
html[data-theme="midnight"] .scene-help{background:#302d34;border-color:#4a434a}
@media(max-width:1050px){.scene-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.scene-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:390px}.scene-opt{border-radius:13px}.scene-opt img{aspect-ratio:1.18/1}.scene-name{font-size:10px}.scene-fav{width:25px;height:25px}}
@media(max-width:340px){.scene-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.scene-opt,.scene-chip,.scene-fav{transition:none!important}}
