/* ============================================================
   wizard.css — Intake Wizard (Add/Edit Piece)
   Self-contained light theme per the design handoff; scoped
   under .wz so it doesn't touch the rest of the app's dark UI.
   Tokens match design_handoff_intake_wizard/README.md exactly.
   ============================================================ */

.wz {
  --wz-bg: #f6f5f2;
  --wz-surface: #ffffff;
  --wz-border: #e7e4de;
  --wz-border-dashed: #cbc7bf;
  --wz-text: #191817;
  --wz-muted: #8a867e;
  --wz-accent: #1f6f54;
  --wz-accent-dark: #14503c;
  --wz-accent-tint: #e9f2ee;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: none !important;
  padding: 0 !important;
  background: var(--wz-bg);
  color: var(--wz-text);
  min-height: 100vh;
}

.wz-mono, .wz .mono { font-family: "Spline Sans Mono", ui-monospace, monospace; }

.wz-frame { display: flex; flex-direction: column; min-height: 100vh; }

.wz-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 18px 6px;
}
.wz-back {
  background: none; border: none; color: var(--wz-accent); font: inherit;
  font-size: 15px; font-weight: 600; cursor: pointer; padding: 6px 8px 6px 0; min-height: 32px;
}
.wz-session-pill {
  display: flex; align-items: center; gap: 7px; background: #fff;
  border: 1px solid var(--wz-border); border-radius: 99px; padding: 5px 12px 5px 7px;
  font-size: 12.5px; font-weight: 600; color: var(--wz-text); white-space: nowrap;
  box-shadow: 0 1px 2px rgba(25,24,23,.05); margin-left: auto;
}
.wz-session-check {
  width: 20px; height: 20px; border-radius: 50%; background: var(--wz-accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px;
}

.wz-title-row { padding: 6px 18px 12px; }
.wz-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.wz-dots { display: flex; gap: 5px; margin-top: 12px; }
.wz-dot { flex: 1; height: 4px; border-radius: 2px; background: var(--wz-border); transition: background .25s; }
.wz-dot.filled { background: var(--wz-accent); }

.wz-body { flex: 1; padding: 4px 18px calc(26px + env(safe-area-inset-bottom)); position: relative; }
.wz-step { display: none; flex-direction: column; gap: 14px; }
.wz-step.active { display: flex; }

.wz-muted { color: var(--wz-muted); font-size: 13px; }
.wz-flex-col { display: flex; flex-direction: column; gap: 8px; }

/* Reference photo CTA */
.wz-refphoto-cta {
  display: flex; align-items: center; gap: 13px; background: var(--wz-accent-dark);
  border: none; border-radius: 16px; padding: 15px; cursor: pointer; color: #fff;
  text-align: left; width: 100%; box-shadow: 0 8px 20px -8px rgba(20,80,60,.5); font: inherit;
}
.wz-refphoto-cta-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 21px; flex: none; overflow: hidden;
}
.wz-refphoto-cta-icon img { width: 100%; height: 100%; object-fit: cover; }
.wz-refphoto-cta-text { flex: 1; }
.wz-refphoto-cta-title { font-weight: 700; font-size: 15.5px; }
.wz-refphoto-cta-sub { opacity: .75; font-size: 12.5px; margin-top: 2px; }
.wz-refphoto-cta-arrow { opacity: .7; font-size: 18px; }

.wz-divider { display: flex; align-items: center; gap: 10px; color: var(--wz-muted); font-size: 12px; }
.wz-divider span { flex: 1; height: 1px; background: var(--wz-border); }

/* Tile grids (category / metal / purity) */
.wz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wz-tile {
  min-height: 82px; border-radius: 16px; cursor: pointer; font: inherit; font-size: 15.5px;
  font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: #fff; border: 1.5px solid var(--wz-border); color: var(--wz-text);
  box-shadow: 0 1px 2px rgba(25,24,23,.04); padding: 8px;
}
.wz-tile img { width: 42px; height: 42px; object-fit: contain; }
.wz-tile.selected { background: var(--wz-accent); border-color: var(--wz-accent); color: #fff; }
.wz-tile-wide { grid-column: 1 / -1; min-height: 60px; flex-direction: row; gap: 8px; }
.wz-tile-tall { min-height: 92px; font-size: 16.5px; }
.wz-tile-purity { min-height: 66px; font-size: 16.5px; font-weight: 700; }

.wz-swatch { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 -3px 6px rgba(0,0,0,.18); }
.wz-swatch-gold { background: linear-gradient(135deg,#e8c766,#b8912e); }
.wz-swatch-silver { background: linear-gradient(135deg,#e3e3e8,#a9a9b2); }
.wz-swatch-platinum { background: linear-gradient(135deg,#d7dde5,#98a2b0); }
.wz-swatch-mixed { background: linear-gradient(90deg,#e8c766,#a9a9b2); }

/* Buttons */
.wz-btn-primary {
  background: var(--wz-accent); color: #fff; border: none; border-radius: 14px; min-height: 54px;
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(20,80,60,.5); width: 100%;
}
.wz-btn-primary:active { transform: scale(.98); }
.wz-btn-save { min-height: 58px; font-size: 17px; }
.wz-btn-text {
  background: none; border: none; color: var(--wz-muted); font: inherit; font-size: 14px;
  cursor: pointer; padding: 6px; width: 100%;
}
.wz-btn-text-sm { background: none; border: none; color: var(--wz-muted); cursor: pointer; font: inherit; font-size: 13px; }
.wz-btn-dashed {
  background: transparent; border: 1.5px dashed var(--wz-border-dashed); border-radius: 16px;
  min-height: 54px; color: var(--wz-accent); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%;
}
.wz-btn-skip {
  background: #fff; border: 1.5px solid var(--wz-border); border-radius: 16px; min-height: 64px;
  color: var(--wz-text); font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 2px rgba(25,24,23,.04); width: 100%;
}
.wz-btn-small {
  background: var(--wz-accent); color: #fff; border: none; border-radius: 10px; padding: 9px 14px;
  font: inherit; font-weight: 700; cursor: pointer;
}
.wz-btn-cancel {
  flex: 1; background: var(--wz-bg); border: 1px solid var(--wz-border); border-radius: 12px;
  min-height: 50px; color: var(--wz-muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.wz-sheet-actions .wz-btn-primary { flex: 2; min-height: 50px; }

/* Weight step */
.wz-weight-card {
  text-align: center; background: #fff; border: 1px solid var(--wz-border); border-radius: 16px;
  padding: 16px 14px 12px; box-shadow: 0 1px 2px rgba(25,24,23,.04);
}
.wz-unit-toggle { display: inline-flex; gap: 4px; background: var(--wz-bg); border-radius: 99px; padding: 3px; margin-bottom: 4px; }
.wz-unit-toggle button {
  font: inherit; font-size: 12.5px; font-weight: 700; border: none; background: none; color: var(--wz-muted);
  padding: 5px 14px; border-radius: 99px; cursor: pointer;
}
.wz-unit-toggle button.selected { background: var(--wz-accent); color: #fff; }
.wz-weight-display { font-size: 44px; font-weight: 600; font-family: "Spline Sans Mono", monospace; letter-spacing: -.01em; }
.wz-weight-unit { font-size: 19px; color: var(--wz-muted); }
.wz-melt-pill {
  background: var(--wz-accent-tint); border: none; cursor: pointer; color: var(--wz-accent); font: inherit;
  font-size: 13px; font-weight: 600; margin-top: 8px; padding: 6px 14px; border-radius: 99px;
}
.wz-spot-edit {
  display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--wz-border);
  border-radius: 14px; padding: 10px;
}
.wz-spot-edit-label { color: var(--wz-muted); font-size: 13px; white-space: nowrap; font-weight: 600; }
.wz-spot-input {
  flex: 1; width: 60px; background: var(--wz-bg); border: 1.5px solid var(--wz-border); border-radius: 10px;
  color: var(--wz-text); padding: 8px 10px; font-size: 15px; font: inherit;
}
.wz-keypad { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.wz-key {
  min-height: 58px; border-radius: 14px; background: #fff; border: 1px solid var(--wz-border);
  color: var(--wz-text); font: inherit; font-size: 22px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 2px rgba(25,24,23,.05);
}
.wz-key:active { background: var(--wz-accent-tint); }

.wz-label { color: var(--wz-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin-bottom: 6px; }
.wz-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wz-chip-row-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.wz-chip {
  flex: none; min-height: 44px; padding: 0 15px; border-radius: 11px; cursor: pointer; font: inherit;
  font-size: 14px; font-weight: 600; background: #fff; border: 1.5px solid var(--wz-border); color: var(--wz-text);
}
.wz-chip.selected { background: var(--wz-accent); border-color: var(--wz-accent); color: #fff; }
.wz-chip-pill { border-radius: 99px; min-height: 38px; padding: 0 12px; font-size: 13px; }
.wz-chip-sm { min-height: 40px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }

/* Stones */
.wz-stone-card {
  background: #fff; border: 1px solid var(--wz-border); border-radius: 16px; padding: 15px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(25,24,23,.04);
}
.wz-stone-card-head { display: flex; align-items: center; justify-content: space-between; }
.wz-stone-card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.wz-stone-card-actions { display: flex; align-items: center; gap: 8px; }
.wz-role-btn {
  background: var(--wz-bg); border: 1px solid var(--wz-border); border-radius: 99px; padding: 6px 14px;
  color: var(--wz-accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.wz-remove-btn { background: none; border: none; color: var(--wz-muted); font-size: 16px; cursor: pointer; padding: 4px 6px; }
.wz-carat-row { display: flex; align-items: center; gap: 10px; }
.wz-carat-btn {
  width: 48px; height: 48px; border-radius: 12px; background: var(--wz-bg); border: 1px solid var(--wz-border);
  color: var(--wz-text); font-size: 20px; cursor: pointer; flex: none;
}
.wz-carat-value {
  flex: 1; text-align: center; font-family: "Spline Sans Mono", monospace; font-size: 21px; font-weight: 600;
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 5px; text-decoration-color: var(--wz-border-dashed);
  background: none; border: none; color: var(--wz-text); font-family: inherit;
}
.wz-carat-value span { font-size: 12px; color: var(--wz-muted); text-decoration: none; }
.wz-stone-subgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wz-stone-subgrid input { min-height: 42px; padding: 8px 12px; font-size: 14px; }
.wz-lab-toggle { display: flex; gap: 6px; }
.wz-lab-toggle button {
  flex: 1; min-height: 40px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  background: #fff; border: 1.5px solid var(--wz-border); color: var(--wz-text);
}
.wz-lab-toggle button.selected { background: var(--wz-accent); border-color: var(--wz-accent); color: #fff; }
.wz-stone-mini-label { color: var(--wz-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 4px; }

/* Price */
.wz-melt-card {
  background: var(--wz-accent-dark); color: #fff; border-radius: 16px; padding: 16px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 8px 20px -10px rgba(20,80,60,.5);
}
.wz-melt-card-label { opacity: .7; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.wz-melt-card-amount { font-size: 24px; font-weight: 700; margin-top: 2px; font-family: "Spline Sans Mono", monospace; }
.wz-melt-card-basis { opacity: .75; font-size: 12.5px; text-align: right; }
.wz-input {
  width: 100%; box-sizing: border-box; background: #fff; border: 1.5px solid var(--wz-border); border-radius: 14px;
  color: var(--wz-text); padding: 14px; font-size: 17px; min-height: 52px; font: inherit;
}
.wz-input-accent { border-color: var(--wz-accent); }
.wz-ebay-card {
  background: var(--wz-accent-tint); border: 1px solid var(--wz-border); border-radius: 14px; padding: 13px 15px;
  display: flex; flex-direction: column; gap: 4px;
}
.wz-ebay-card-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--wz-text); }
.wz-ebay-card-net { font-size: 15px; color: var(--wz-accent-dark); }
.wz-ebay-card-row b { font-family: "Spline Sans Mono", monospace; }

/* Review */
.wz-review-row {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--wz-border);
  border-radius: 14px; padding: 12px 15px; cursor: pointer; color: var(--wz-text); text-align: left;
  width: 100%; font: inherit; box-shadow: 0 1px 2px rgba(25,24,23,.04);
}
.wz-review-row-label { color: var(--wz-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.wz-review-row-value { font-weight: 600; font-size: 14.5px; margin-top: 2px; flex: 1; }
.wz-review-row-arrow { color: var(--wz-border-dashed); font-size: 17px; }
.wz-inline-row { }
.wz-row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.wz-photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.wz-photo-previews img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--wz-border); }
.wz-refphoto-review { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.wz-refphoto-review img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--wz-border); }
.wz-mic-btn {
  display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--wz-border);
  border-radius: 99px; padding: 6px 13px; color: var(--wz-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.wz-mic-btn.listening { background: var(--wz-accent-tint); color: var(--wz-accent); border-color: var(--wz-accent); }
.wz-textarea {
  width: 100%; box-sizing: border-box; background: #fff; border: 1.5px solid var(--wz-border); border-radius: 14px;
  color: var(--wz-text); padding: 12px 14px; font-size: 15px; resize: none; font-family: inherit;
}
.wz-check-row { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 44px; }
.wz-check-row input { width: 20px; height: 20px; accent-color: var(--wz-accent); }

.wz-tag-preview {
  background: #fff; color: var(--wz-text); border-radius: 8px; display: flex; align-items: center;
  width: 100%; max-width: 340px; height: 88px; margin: 0 auto; border: 1px solid var(--wz-border);
  box-shadow: 0 10px 24px -12px rgba(25,24,23,.35);
}
.wz-tag-left {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-right: 1.5px dashed var(--wz-border-dashed); height: 100%;
}
.wz-tag-left .mono { font-family: "Spline Sans Mono", monospace; font-weight: 600; font-size: 16px; letter-spacing: .04em; }
#wz-tag-price { font-weight: 700; font-size: 20px; }
.wz-tag-qr { width: 112px; display: flex; align-items: center; justify-content: center; }
.wz-tag-qr svg { width: 66px; height: 66px; }

/* Saved */
.wz-saved-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 24px; text-align: center; }
.wz-saved-check {
  width: 66px; height: 66px; border-radius: 50%; background: var(--wz-accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
  box-shadow: 0 12px 28px -10px rgba(20,80,60,.55);
}
.wz-saved-stock { font-size: 21px; font-weight: 700; }
.wz-saved-tag-line { display: flex; align-items: center; gap: 8px; color: var(--wz-muted); font-size: 14px; }
.wz-pulse { animation: wzpulse 1.2s ease infinite; color: var(--wz-accent); }
@keyframes wzpulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.wz-saved-stats {
  background: #fff; border: 1px solid var(--wz-border); border-radius: 14px; padding: 13px 22px;
  font-size: 14px; box-shadow: 0 1px 2px rgba(25,24,23,.04);
}
.wz-saved-stats b { color: var(--wz-accent); }
.wz-saved-wrap .wz-btn-primary { min-height: 58px; font-size: 17px; }

.wz-sheet-overlay { position: fixed; inset: 0; background: rgba(25,24,23,.35); z-index: 70; display: flex; align-items: flex-end; }
.wz-sheet {
  background: #fff; border-radius: 20px 20px 0 0; padding: 20px 18px calc(32px + env(safe-area-inset-bottom));
  width: 100%; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -12px 40px rgba(25,24,23,.2);
}
.wz-sheet-title { font-weight: 700; font-size: 16px; color: var(--wz-text); }
.wz-sheet-input { border-color: var(--wz-accent); }
.wz-sheet-actions { display: flex; gap: 8px; }

@media (min-width: 760px) {
  .wz-frame { max-width: 480px; margin: 0 auto; }
  .wz-body { padding-bottom: 40px; }
}
