/* Web version only, on top of style.css: responsive layout (a browser window
 * can be any size, the desktop window is fixed), PWA chrome, sample button. */

header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
header .get-app { margin-left: auto; font-size: 13px; white-space: nowrap; }
.web-note { font-size: 12px; color: var(--muted); }
.consent {
  position: fixed; left: 50%; bottom: 52px; transform: translateX(-50%); z-index: 10; max-width: 640px;
  display: flex; gap: 10px; align-items: center; padding: 10px 14px; font-size: 13px;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; box-shadow: var(--shadow);
}

.install {
  margin-left: 10px; font-size: 12.5px; padding: 4px 11px;
  border-color: var(--accent); color: var(--accent); background: none;
}
.install:hover:not(:disabled) { background: var(--accent-dim); }
.offline-note { color: var(--soft); white-space: nowrap; }
.offline-note[hidden] { display: none; }

/* Scene picker: chips choose a scene, its guide shows right below. Sits
 * between the drop zone and the settings, so guidance comes before merging. */
.scene-pick { display: block; margin-top: 14px; }
.scene-title { font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.scene-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.scene-chip {
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  background: var(--sunken); border: 1px solid var(--line-soft); color: var(--text-dim);
}
.scene-chip:hover:not(:disabled) { border-color: var(--accent); color: var(--text); background: var(--sunken); }
.scene-chip.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.scene-chip.clear { color: var(--muted); }
.scene-guide { margin-top: 11px; font-size: 12.5px; color: #c6cad2; background: var(--sunken); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px 13px; }
.scene-guide[hidden] { display: none; }
.scene-tips { padding-left: 17px; display: flex; flex-direction: column; gap: 6px; }
.scene-tips li::marker { color: var(--accent); }
.scene-expect { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-soft); color: var(--text-dim); }

/* Camera capture overlay (web only; camera.js shows it on phones). */
#camOverlay { position: fixed; inset: 0; z-index: 20; background: #0a0b0e; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; }
#camOverlay[hidden] { display: none; }
#camVideo { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: var(--r-md); background: #000; }
#camStatus { color: var(--text-dim); font-size: 13.5px; min-height: 1.3em; text-align: center; }
.cam-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.cam-note { font-size: 11.5px; color: var(--muted); }
.cam-count, .cam-lens { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line-soft); color: var(--text-dim); }
.cam-count.on, .cam-lens.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.cam-actions { display: flex; align-items: center; gap: 22px; }
#camShutter { width: 62px; height: 62px; border-radius: 50%; border: 3px solid var(--accent); background: var(--accent-dim); }
#camOpen { display: block; width: 100%; margin-top: 10px; background: none; border-color: var(--accent); color: var(--accent); }
.scene-shoot { display: none; }
body.has-camera .scene-shoot { display: inline-block; margin-left: 8px; background: none; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; }

/* One column below 960px: the page scrolls, the panels stack, and the compare
 * view keeps enough height to be useful on a phone. */
@media (max-width: 959px) {
  /* 44px touch targets on the narrow/mobile layout */
  button, select { min-height: 44px; }
  .scene-chip, .cam-count, .cam-lens { min-height: 44px; }
  .scene-chip { padding-top: 10px; padding-bottom: 10px; }
  .footer-link, footer a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 4px; font-size: 14px; }
  button.primary { color: #101216; }
}

@media (max-width: 960px), (max-height: 640px) {
  body { overflow: auto; height: auto; min-height: 100%; }
  header { padding: 14px 16px 8px; }
  main { grid-template-columns: 1fr; padding: 0 12px; gap: 12px; }
  footer { padding: 12px 16px; }
  .result { min-height: 520px; }
  .note { margin-top: 12px; }

  /* touch-friendly controls */
  button, select { min-height: 44px; }
  .drop { padding: 26px 14px 22px; }
  .drop-buttons { flex-direction: column; gap: 10px; width: 100%; }
  .drop-buttons button { width: 100%; }

  .toolbar { gap: 8px; }
  .toolbar .dims { flex-basis: 100%; order: -1; }
  .tool-actions { flex: 1 1 100%; }
  .tool-actions button { flex: 1; }
  .nav canvas { width: 110px; }
  .compare { min-height: 300px; }
  .hint .hint-keys { display: none; }   /* the keyboard shortcuts need a keyboard */
  .howto { padding: 20px; }
}

@media (max-width: 480px) {
  h1 span { display: none; }
  .nav canvas { width: 86px; }
}

.drop button.sample {
  display: inline-block; margin-top: 10px; padding: 11px 14px; min-height: 44px;
  border: 1px solid var(--accent); border-radius: var(--r-sm);
  background: var(--accent-dim); color: var(--accent); font-weight: 600; text-align: center;
}
.drop button.sample:hover:not(:disabled) { background: #4a3a1d; text-decoration: none; }
.drop button.sample:disabled { opacity: .45; }

/* collapse-ish: on mobile keep the guide preview bounded instead of a wall of text */
@media (max-width: 959px) {
  .scene-guide { max-height: 150px; overflow: hidden; }
}
