/* ═══════════════════════════════════════════════════
   Conference Room Setup — the "one screen" layout (chosen 2026-10-19).
   Loaded after the guide's own styles and laid over them. Presentation only:
   the instructions, the model and the photos are the author's, untouched.
   - One heading per step, one step counter, one "drag to rotate" hint.
   - The guide fills its window: steps and Back / Next on the left, the model
     filling the right. On a phone: steps, then the model, then the step's
     text in its own scrolling box, with Back / Next fixed at the bottom.
   If a new package from the author replaces index.html, add back the two
   lines that load this file and layout.js.
   ═══════════════════════════════════════════════════ */

/* The repeats and extras. (#download and #reference live in .header; the
   photos button is re-offered beside the model's caption by layout.js.) */
.header,
#mode-message,
#wizard-eyebrow, #wizard-title, #wizard-intro,
.guide-heading,
#stage-label,
#model-step,
.live-badge,
.viewer-bottom,
#restart { display: none !important; }

/* The guide fills its window and does not scroll as a whole. */
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }

.mode-switch { flex: none; padding: var(--space-3) var(--space-5); border-bottom: 1px solid var(--color-divider); }
.mode-switch button { padding: var(--space-2) var(--space-4); font-size: 1rem; }

main { flex: 1; min-height: 0; }
.sidebar { display: flex; flex-direction: column; min-height: 0; padding: var(--space-5); }
.steps { flex: none; margin-bottom: var(--space-4); gap: 0; }
.step strong { letter-spacing: 0; }   /* six steps: "Equipment" fits */
.avl-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.step-description h2 { margin-top: 0; }
.wizard-nav { flex: none; margin-top: 0; padding-top: var(--space-4); border-top: 1px solid var(--color-divider); }

.viewer-section { display: flex; flex-direction: column; min-height: 0; padding: var(--space-5); }
#model-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#viewport { flex: 1; height: auto; min-height: 240px; }

/* The model's caption: one quiet line, with the photos link beside it. */
.viewer-heading { align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-3); }
#view-title { font-family: var(--font-body); font-size: .875rem; font-weight: 500; color: var(--color-text-muted); margin: 0; line-height: 1.4; }
.avl-photos-link { flex: none; font-size: .8125rem; }

/* Display settings: a gear on the model instead of a line under it. */
#viewport > details.display-options { position: absolute; top: var(--space-3); right: var(--space-3); z-index: 3; border: 0; padding: 0; }
#viewport > details.display-options > summary {
  list-style: none; display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); box-shadow: var(--shadow-sm); color: var(--color-text);
}
#viewport > details.display-options > summary::-webkit-details-marker { display: none; }
#viewport > details.display-options > summary:hover { background: var(--color-surface-offset); }
#viewport > details.display-options .viewer-tools {
  position: absolute; right: 0; top: 46px; flex-direction: column; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); box-shadow: var(--shadow-lg); white-space: nowrap; color: var(--color-text);
}
.avl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A step's photos sit under its text, as thumbnails. */
#step-photos { margin-top: var(--space-4); }
.photo-heading h3 { font-size: 1rem; margin: 0 0 var(--space-2); }
.photo-card { min-width: 120px; }
.photo-card img { height: 120px; }
.photo-card span { font-size: .75rem; }

/* On the last restore step the finished-room photos take the model's place
   (layout.js moves them there), side by side and whole. */
.result-step .sidebar { min-height: 0; }
.result-step .viewer-section { align-items: stretch; }
.result-step #step-photos { flex: 1; min-height: 0; margin: 0; }
.result-step #step-photo-grid { flex-direction: row; flex-wrap: nowrap; align-items: stretch; height: 100%; }
.result-step .photo-card { flex: 1 1 0; min-width: 0; height: 100%; }
.result-step .photo-card img { width: 100%; height: 100%; object-fit: contain; }

/* The courtroom's Finish step: five landscape photos in a scrolling grid
   (the restore guide's two portrait photos stay side by side). */
body:not(.conference-mode).result-step #step-photos { overflow-y: auto; }
body:not(.conference-mode).result-step #step-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); height: auto; align-content: start; }
body:not(.conference-mode).result-step .photo-card { height: auto; min-width: 0; }
body:not(.conference-mode).result-step .photo-card img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* Room photos & notes: the finished-courtroom photos as a grid (one column
   on a phone). */
.reference-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 760px) {
  .mode-switch { flex-wrap: nowrap; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
  .mode-switch button { flex: 1 1 0; min-width: 0; text-align: center; font-size: .8125rem; line-height: 1.2; padding: var(--space-2) var(--space-1); }
  main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; flex-direction: unset; }
  .sidebar, .viewer-section { display: contents; }
  .steps { grid-row: 1; margin: 0; padding: var(--space-2) var(--space-3) 0; }
  .step { padding: var(--space-1) 2px; }
  .step-no { width: 24px; height: 24px; margin-bottom: 2px; }
  #model-panel { grid-row: 2; padding: var(--space-2) var(--space-3) 0; overflow: hidden; }
  .viewer-heading { margin-bottom: var(--space-1); }
  #view-title { font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .avl-photos-link { font-size: .75rem; }
  #viewport { min-height: 120px; }
  .avl-scroll { grid-row: 3; max-height: 26vh; padding: var(--space-3) var(--space-3) var(--space-2); }
  .step-description { padding: var(--space-3) var(--space-4); }
  .step-description h2 { font-size: 1.125rem; margin-bottom: var(--space-2); }
  .step-description > p, #stage-second, #stage-third { font-size: .875rem; line-height: 1.55; }
  .wizard-nav { grid-row: 4; padding: var(--space-3); border-top: 1px solid var(--color-divider); background: var(--color-surface); }
  .result-step #step-photos { grid-row: 2; padding: var(--space-2) var(--space-3) 0; }
  .result-step #step-photo-grid { gap: var(--space-2); }
}

/* A very short window (a phone on its side): let it scroll rather than
   squeeze the model to nothing. */
@media (max-height: 439px) {
  html, body { height: auto; }
  body { display: block; overflow: visible; }
  main { height: 460px; }
}
