/* Live scene frame, camera tools, materials and in-flight generation feedback.
   Canvas and control states remain visible while the model request is pending. */
.scene-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #edf0e7;
  height: clamp(520px, calc(100svh - 160px), 700px);
  margin-top: 22px;
  animation: enter .7s .08s both;
}
.scene-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 22px;
  background: transparent;
  gap: 12px;
}
.scene-heading > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  align-items: center;
}
.scene-heading h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.scene-origin {
  margin-left: 12px;
  font-size: 10px;
  color: var(--muted);
}
.view-toggle {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #e9eee3;
  border-radius: 5px;
  flex-shrink: 0;
}
.view-toggle button {
  padding: 7px 12px;
  font-size: 10px;
  border-radius: 3px;
}
.view-toggle button[aria-pressed='true'] {
  background: white;
  box-shadow: 0 1px 4px #243c2912;
}
.canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 320px;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: pan-y;
}
canvas:active {
  cursor: grabbing;
}
.view-caption {
  position: absolute;
  top: 18px;
  left: 22px;
  font-size: 11px;
  color: #596c56;
  pointer-events: none;
}
.camera-tools {
  position: absolute;
  right: 17px;
  bottom: 17px;
  display: flex;
  gap: 4px;
}
.camera-tools button {
  width: 33px;
  height: 33px;
  background: #ffffffd9;
  border: 1px solid #e0e5d9;
  border-radius: 4px;
  font-size: 18px;
  transition: background .2s;
}
.camera-tools button:hover {
  background: #dce7cf;
}
.scene-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: transparent;
  border-top: 1px solid var(--line);
}
.material-picker {
  display: flex;
  gap: 4px;
}
.material-picker button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 9px;
}
.material-picker button[aria-pressed='true'] {
  border-color: #99ac8b;
  background: #f0f5e9;
}
.material-picker button > span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #bfa47e;
}
.material-picker button[data-material='japandi'] > span {
  background: #8f8f75;
}
.material-picker button[data-material='coastal'] > span {
  background: #9bbec4;
}
.save-view {
  padding: 10px 0;
  font-size: 10px;
  white-space: nowrap;
}
.scene-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #53634e;
  background: transparent;
}
.scene-footer > span:last-child > span {
  margin-left: 12px;
}
.generating {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 4px 10px;
  padding: 13px 15px;
  border: 1px solid #d5dfcb;
  border-radius: 5px;
  background: #fffffff0;
  font-size: 11px;
  pointer-events: none;
}
.generating > span:last-child {
  grid-column: 2;
  font-size: 9px;
  color: var(--muted);
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #cddcc2;
  border-top-color: var(--moss);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
