/* Scene authoring is isolated from the legacy product editor. */
.scene-carousel-card { margin-bottom:20px; }
.scene-carousel-settings { display:flex; flex-wrap:wrap; align-items:center; gap:16px; padding:16px; }
.scene-carousel-settings > label { max-width:180px; }
.scene-carousel-guide { padding:0 16px 12px; }
.scene-carousel-list { display:flex; overflow-x:auto; gap:12px; padding:0 16px 16px; }
.scene-carousel-item { flex:0 0 220px; padding:10px; background:#f7f6f3; border:1px solid #e6e2dc; border-radius:8px; }
.scene-carousel-item img { width:100%; height:100px; object-fit:cover; display:block; }
.scene-carousel-item strong { display:block; font-size:12px; margin:8px 0; overflow-wrap:anywhere; }
.scene-preview-controls { align-items:center; justify-content:space-between; margin-bottom:12px; max-width:375px; font-size:12px; }
.scene-preview-controls span { max-width:175px; overflow-wrap:anywhere; }

#sec-scenes { --scene-accent:#8b653c; --scene-line:#e6e2dc; color:#343b3a; }
.scene-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.scene-head h1 { font-size:26px; letter-spacing:-.7px; margin:0 0 7px; }
.scene-muted { color:#7b817e; font-size:12px; line-height:1.7; }
.scene-actions { display:flex; gap:8px; flex-wrap:wrap; }
#sec-scenes button, .scene-dialog button { cursor:pointer; border:1px solid #dcdedb; background:white; color:#343b3a; border-radius:8px; padding:9px 13px; font:inherit; font-size:12px; }
#sec-scenes button:hover, .scene-dialog button:hover { border-color:#8b653c; }
#sec-scenes button:disabled { opacity:.45; cursor:not-allowed; }
#sec-scenes button.scene-primary { background:#343f38; border-color:#343f38; color:#fff; }
#sec-scenes button.scene-active { background:#f3ede5; border-color:#b28c61; color:#795735; }
#sec-scenes button.scene-danger { color:#b54636; }
.scene-grid { display:grid; grid-template-columns:200px minmax(280px,1fr) 260px; gap:18px; align-items:start; }
.scene-card { border:1px solid var(--scene-line); background:white; border-radius:12px; overflow:hidden; }
.scene-card-title { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--scene-line); font-size:13px; font-weight:600; }
.scene-library { max-height:750px; overflow:auto; padding:10px; }
#sec-scenes .scene-library-item { display:block; width:100%; padding:8px; text-align:left; margin-bottom:8px; white-space:normal; }
.scene-library-item img { width:100%; height:95px; object-fit:cover; border-radius:5px; background:#f1f0ed; }
.scene-library-item strong { display:block; margin:7px 0 3px; font-size:12px; overflow-wrap:anywhere; }
.scene-library-item span { display:block; color:#808781; font-size:11px; }
.scene-tag { display:inline-block; font-size:11px; font-weight:500; padding:3px 7px; background:#eef2ed; color:#536952; border-radius:5px; }
.scene-editor-info { padding:14px 16px; display:grid; gap:12px; }
#sec-scenes label { display:block; font-size:12px; line-height:1.8; }
#sec-scenes input:not([type=checkbox]):not([type=file]), #sec-scenes select { width:100%; box-sizing:border-box; padding:9px 10px; border:1px solid #dce0db; background:white; color:#343b3a; border-radius:6px; font:inherit; font-size:12px; }
#sec-scenes input[type=checkbox] { margin-right:6px; accent-color:#536952; vertical-align:middle; }
.scene-toolbar { padding:10px 16px; display:flex; align-items:center; gap:8px; border-top:1px solid var(--scene-line); border-bottom:1px solid var(--scene-line); }
.scene-workspace { background:#efede8; padding:20px; max-height:660px; overflow:auto; }
.scene-stage { position:relative; width:100%; line-height:0; user-select:none; }
.scene-stage img { display:block; width:100%; height:auto; pointer-events:none; }
.scene-layer { position:absolute; inset:0; touch-action:none; }
.scene-layer.draw { cursor:crosshair; }
.scene-rect { box-sizing:border-box; position:absolute; border:1.5px solid #fff; outline:1px solid #587468; background:rgba(67,102,83,.14); cursor:move; }
.scene-rect.selected { border:2px solid #f1d3a1; outline:1px solid #896537; background:rgba(162,121,61,.15); z-index:2; }
.scene-rect.is-disabled { border-style:dashed; opacity:.5; }
.scene-rect-label { position:absolute; left:0; bottom:100%; background:#3f584b; padding:4px 6px; border-radius:3px 3px 0 0; line-height:1.2; color:white; font-size:10px; max-width:170px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
.scene-handle { position:absolute; width:10px; height:10px; border:1px solid #896537; background:#fff4df; transform:translate(-50%,-50%); }
.scene-handle.nw { left:0; top:0; cursor:nwse-resize; }
.scene-handle.ne { left:100%; top:0; cursor:nesw-resize; }
.scene-handle.sw { left:0; top:100%; cursor:nesw-resize; }
.scene-handle.se { left:100%; top:100%; cursor:nwse-resize; }
.scene-inspector { padding:16px; display:grid; gap:13px; }
.scene-coords { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.scene-link { font-family:monospace; font-size:11px; line-height:1.7; overflow-wrap:anywhere; background:#f4f5f2; padding:9px; border-radius:6px; }
.scene-hotspot-list { display:grid; gap:6px; max-height:210px; overflow:auto; }
#sec-scenes .scene-hotspot-list button { text-align:left; overflow-wrap:anywhere; }
.scene-warnings { color:#96632c; font-size:12px; line-height:1.8; padding:12px 16px; }
.scene-empty { text-align:center; padding:60px 24px; line-height:1.9; color:#8c918d; font-size:13px; }
.scene-status { font-size:12px; color:#8b653c; margin-top:8px; min-height:20px; }
#sec-scenes.scene-busy { pointer-events:none; opacity:.7; }
.scene-dialog { margin:auto; border:1px solid #e5e1d9; border-radius:18px; padding:22px; max-width:calc(100vw - 48px); max-height:calc(100dvh - 40px); overflow:auto; color:#343b3a; background:#f9f8f5; }
.scene-dialog::backdrop { background:rgba(30,36,30,.45); backdrop-filter:blur(3px); }
.scene-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:14px; }
.scene-phone { width:min(375px,calc(65dvh * 375 / 667)); max-width:100%; height:min(667px,65dvh); margin:auto; display:flex; flex-direction:column; overflow:hidden; border:1px solid #d9d6cf; border-radius:24px; background:#f5f1e9; position:relative; }
.scene-phone-nav { flex:none; box-sizing:border-box; height:10.195%; display:flex; align-items:center; justify-content:center; background:#faf8f3; font-size:13px; letter-spacing:2px; }
.scene-phone-tabs { flex:none; box-sizing:border-box; height:10.495%; display:flex; align-items:center; justify-content:center; font-size:12px; background:#faf8f3; }
.scene-preview-viewport { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.scene-preview-stage { position:relative; flex:none; line-height:0; overflow:hidden; }
.scene-preview-stage img { display:block; width:100%; height:100%; object-fit:contain; }
.scene-dialog button.scene-preview-hotspot { position:absolute; padding:0; border:0; border-radius:0; background:transparent; }
.scene-dialog button.scene-preview-hotspot:focus-visible { outline:2px solid #ab8452; }
.scene-marker { position:absolute; width:14px; height:14px; left:50%; top:50%; transform:translate(-50%,-50%); border:2px solid white; border-radius:50%; background:rgba(255,255,255,.4); box-shadow:0 0 0 5px rgba(255,255,255,.16); animation:scene-pulse 2.6s ease-in-out infinite; pointer-events:none; }
.scene-preview-result { width:375px; max-width:100%; margin-top:12px; font-size:12px; line-height:1.7; overflow-wrap:anywhere; min-height:44px; }
.scene-preview-hint { padding:15px 20px; text-align:center; font-size:12px; line-height:1.7; }
@keyframes scene-pulse { 50% { box-shadow:0 0 0 10px rgba(255,255,255,0); } }
@media (prefers-reduced-motion:reduce) { .scene-marker { animation:none; } }
@media (max-width:1200px) { .scene-grid { grid-template-columns:minmax(320px,1fr) 245px; } .scene-library-card { grid-column:1/-1; } .scene-library { display:flex; max-height:190px; gap:10px; } #sec-scenes .scene-library-item { min-width:155px; width:155px; margin:0; } .scene-library-item img { height:70px; } }
@media (max-width:800px) { .scene-grid { grid-template-columns:1fr; } .scene-head { align-items:flex-start; flex-direction:column; } .scene-workspace { max-height:550px; padding:10px; } }
