[hidden] { display: none !important; }

.studio-actions,
.view-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.view-switch {
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
}

.view-switch button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.view-switch button[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel-2);
}

body[data-view="wizard"] .studio-only,
body[data-view="wizard"] > #variants-bar {
  display: none;
}

.wizard {
  width: min(100% - 28px, 760px);
  margin: clamp(22px, 5vw, 60px) auto;
}

.wizard-shell {
  padding: clamp(18px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}

.wizard-progress {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.wizard-meter {
  display: block;
  width: 100%;
  height: 5px;
  margin: 0 0 24px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--panel-2);
  accent-color: var(--accent);
}

.wizard-meter::-webkit-progress-bar { background: var(--panel-2); }
.wizard-meter::-webkit-progress-value { background: var(--accent); }
.wizard-meter::-moz-progress-bar { background: var(--accent); }

.wizard h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.wizard h1:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.wizard-help {
  max-width: 58ch;
  color: var(--muted);
  margin: 12px 0 22px;
  font-size: 15px;
  line-height: 1.55;
}

.wizard-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.wizard .field { font-size: 14px; }
.wizard .field select,
.wizard .field input:not([type="checkbox"]) { min-height: 42px; }
.wizard .mode-btn { padding: 14px 8px; min-height: 60px; font-size: 14px; }
.wizard .file-picker { min-height: 48px; }
.wizard .florence-box,
.wizard .wgpu-box { padding: 12px; }
.wizard .florence-box button,
.wizard .wgpu-box button { min-height: 40px; }
.wizard-secondary { justify-self: start; }
.wizard .card { padding: 8px; }
.wizard .hud-overlay,
.wizard .timeline-row { display: none; }
.wizard #canvas2d-wrap,
.wizard #view3d-wrap { min-height: clamp(235px, 48vw, 390px); }
.wizard .variants-bar { padding: 0; grid-template-columns: minmax(0, 1fr); }
.wizard .v-card { cursor: default; }
.wizard .v-card.selected { border-color: var(--border); box-shadow: none; }

.wizard-detail {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

#wizard-session-note {
  margin-bottom: 14px;
}

.wizard-dimensions,
.wizard-zip-guide,
.wizard-source-preview {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.wizard-dimensions dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 7px;
}

.wizard-dimensions dt { color: var(--muted); font-size: 12px; }
.wizard-dimensions dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.wizard-source-preview figcaption { margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.wizard-source-preview img { display: block; width: 100%; height: 190px; object-fit: contain; }

.wizard-comparison { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.wizard-comparison .wizard-dimensions,
.wizard-comparison #shared-invert { grid-column: 1 / -1; }
.wizard-comparison .wizard-source-preview img { height: clamp(190px, 29vw, 300px); }
.wizard-comparison #view3d-wrap { min-height: clamp(190px, 29vw, 300px); }
.wizard-comparison #shared-invert {
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.wizard-zip-guide {
  border-color: #395473;
  background: var(--panel-2);
}
.wizard-zip-guide h2 { margin: 0 0 10px; font-size: 17px; }
.wizard-zip-guide ol { display: grid; gap: 8px; margin: 14px 0; padding-left: 23px; }
.wizard-zip-guide li span { display: block; margin-bottom: 3px; font-size: 13px; }
.wizard-zip-guide li code { color: #bfdbfe; font-size: 12px; overflow-wrap: anywhere; }
.wizard-zip-guide .wizard-detail + .wizard-detail { margin-top: 6px; }

#preview3d-unavailable { padding: 14px; }

.wizard-notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.wizard-actions button { min-height: 44px; padding: 8px 18px; }

@media (max-width: 560px) {
  .wizard-comparison { grid-template-columns: minmax(0, 1fr); }
  .wizard-comparison .wizard-source-preview img { height: 155px; }
}

@media (max-width: 460px) {
  .wizard { width: calc(100% - 20px); }
  .wizard .grid-3 { gap: 5px; }
  .wizard .field { min-width: 0; overflow-wrap: anywhere; }
  .wizard-actions button { padding: 7px 12px; }
}
