/* Scene viewer: a full-window 3D stage with small panels laid over it. Colours come from style.css. */
.scene-page { height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.stage { position: relative; min-height: 0; background: #1a2130; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; touch-action: none; }
#canvas.looking { cursor: grabbing; }
#canvas.over-asset { cursor: pointer; }
#canvas.dragging { cursor: move; }

.panel { position: absolute; background: rgba(255, 255, 255, 0.96); border: 1px solid var(--line); border-radius: 4px; padding: 0.75rem 0.9rem; box-shadow: 0 4px 18px rgba(10, 14, 22, 0.25); }
.left-column { position: absolute; top: 1rem; left: 1rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; max-width: calc(100% - 2rem); pointer-events: none; }
.left-column > * { position: static; pointer-events: auto; }
.enter { display: grid; grid-template-columns: auto auto auto; gap: 0.6rem 0.75rem; align-items: end; margin: 0; }
.enter label { display: grid; gap: 0.15rem; font-size: 0.87rem; color: var(--steel); }
.enter select { border: 1px solid var(--line); border-radius: 4px; padding: 0.35rem 0.5rem; background: #fff; color: var(--ink); min-width: 11rem; }
.enter .facts { grid-column: 1 / -1; margin: 0; max-width: 34rem; }
.enter .facts:empty { display: none; }

.views { display: flex; gap: 0.3rem; padding: 0.35rem; flex-wrap: wrap; }
.views button { border-color: transparent; padding: 0.3rem 0.7rem; white-space: nowrap; }
.views button[aria-pressed="true"] { background: var(--cobalt); color: #fff; font-weight: 600; }
kbd { font: inherit; font-size: 0.8rem; border: 1px solid currentColor; border-radius: 3px; padding: 0 0.3rem; opacity: 0.7; margin: 0 0.1rem; }

.quality { display: grid; gap: 0.45rem; padding: 0.5rem 0.6rem; max-width: 34rem; }
.quality-row { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }
.quality-name { font-size: 0.87rem; color: var(--steel); margin-right: 0.3rem; }
.quality-row button[data-quality] { border-color: transparent; padding: 0.3rem 0.7rem; }
.quality-row button[aria-pressed="true"] { background: var(--cobalt); color: #fff; font-weight: 600; }
.quality select { border: 1px solid var(--line); border-radius: 4px; padding: 0.35rem 0.5rem; background: #fff; color: var(--ink); }
.quality .facts { margin: 0; }
.quality .facts:empty { display: none; }
.quality .facts.bad { color: var(--bad); }

.render-dialog { width: min(96vw, 110rem); max-height: 96vh; }
.render-dialog img { display: block; width: 100%; max-height: calc(96vh - 9.5rem); object-fit: contain; background: #0f141d; }
.render-actions { display: flex; align-items: center; gap: 0.9rem; }
.render-actions a { color: #fff; }
.render-strip { display: flex; gap: 0.4rem; padding: 0.5rem 0.9rem; overflow-x: auto; }
.render-strip:empty { display: none; }
.render-strip button { padding: 0; border: 2px solid transparent; background: none; flex: none; border-radius: 2px; }
.render-strip button[aria-current="true"] { border-color: #fff; }
.render-strip img { width: 9rem; height: auto; max-height: none; }
.render-strip span { display: block; font-size: 0.78rem; color: #c9d2e0; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 0.1rem 0.2rem; }

.inspector { top: 1rem; right: 1rem; width: min(21rem, calc(100vw - 2rem)); max-height: calc(100% - 5rem); overflow: auto; }
.inspector-head { display: flex; justify-content: space-between; align-items: start; gap: 0.5rem; }
.inspector h2 { font-size: 1.05rem; word-break: break-all; }
.inspector-head button { padding: 0 0.5rem; line-height: 1.5; }
.inspector dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.9rem; margin: 0.6rem 0; font-size: 0.9rem; }
.inspector dt { color: var(--steel); white-space: nowrap; }
.inspector dd { margin: 0; word-break: break-all; }
.inspector .actions { margin-top: 0.6rem; }

.loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 0.6rem; justify-items: center; background: rgba(26, 33, 48, 0.82); color: #fff; }
.loading progress { width: min(22rem, 70vw); height: 0.5rem; accent-color: #9db4f0; }

.hud { position: absolute; left: 1rem; bottom: 1rem; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; color: #fff; font-size: 0.87rem;
  background: rgba(20, 27, 40, 0.72); border-radius: 4px; padding: 0.35rem 0.7rem; }
.hud button { text-shadow: none; color: var(--ink); padding: 0.2rem 0.6rem; font-size: 0.87rem; }
[hidden] { display: none !important; }
.help { right: 1rem; bottom: 1rem; max-width: 30rem; font-size: 0.9rem; }
.help ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.15rem; }

@media (max-width: 52rem) {
  .enter { grid-template-columns: 1fr 1fr; }
  .inspector { top: auto; bottom: 6.5rem; max-height: 45%; }
  .help { display: none; }
}
