/* Overlay sizes follow the embedded viewport, not the standalone workspace. */
.hero-mode #flow-dialog,
.hero-mode #photo-dialog {
  box-sizing: border-box;
  width: min(520px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 20px);
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  font-size: clamp(12px, 2.5vmin, 14px);
}

.hero-mode .flow,
.hero-mode .photo-analysis {
  padding: clamp(10px, 2.4vmin, 16px);
  min-width: 0;
}

.hero-mode .flow-header,
.hero-mode .photo-analysis-head {
  position: sticky;
  top: 0;
  z-index: 5;
  gap: 8px;
  margin-bottom: 10px;
  padding-block: 4px 8px;
  background: #121b29;
}

.hero-mode .photo-analysis-head {
  background: #101a2a;
}

.hero-mode .flow-header h2,
.hero-mode .photo-analysis-head h2 {
  font-size: clamp(14px, 3.4vmin, 18px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hero-mode .flow-header button,
.hero-mode .photo-analysis-head button {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
}

.hero-mode .flow-actions,
.hero-mode .flow-options {
  gap: 6px;
  margin-top: 8px;
}

.hero-mode .flow-actions button,
.hero-mode .flow-options button,
.hero-mode .source-pick,
.hero-mode .storage-row {
  min-height: 32px;
  max-width: 100%;
  padding: 6px 8px;
  font-size: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
}

.hero-mode .transcript-card,
.hero-mode .message,
.hero-mode .recorder {
  margin-top: 8px;
  padding: 8px 10px;
}

.hero-mode .flow textarea {
  box-sizing: border-box;
  min-height: 60px;
  max-height: 26dvh;
  font-size: 16px; /* Prevent automatic zoom when focusing on iOS. */
}

.hero-mode .voice-room {
  padding-block: 4px;
}

.hero-mode .voice-orb {
  width: clamp(48px, 14vmin, 76px);
}

.hero-mode .voice-state {
  margin-top: 6px;
}

.hero-mode .voice-level,
.hero-mode .record-wave {
  height: 20px;
}

.hero-mode #conversation-log {
  max-height: min(140px, 30dvh);
}

.hero-mode .analysis-workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.hero-mode .analysis-image {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.hero-mode .analysis-image img {
  width: auto;
  max-width: 100%;
  max-height: 32dvh;
  object-fit: contain;
}

.hero-mode .analysis-metrics {
  gap: 4px;
  margin-block: 8px;
}

.hero-mode .analysis-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-mode .analysis-list button {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hero-mode .inspector {
  width: min(300px, 86vw);
  max-height: 100%;
  padding: 7px;
  scrollbar-width: thin;
}

.hero-mode .inspector-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #131a26;
}

.hero-mode .inspector-header h2 {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.hero-mode .detail-picture img,
.hero-mode .detail-picture.site img {
  max-height: 28dvh;
  object-fit: cover;
}

.hero-mode .inspector .audio-row {
  min-height: 32px;
}

.hero-mode .storage-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 7px;
}

.hero-mode .storage-row img {
  width: 36px;
  height: 30px;
}
