/* ─── FlypSense Brand Colors ─── */
:root {
  --fs-deep-blue: #07214f;
  --fs-emerald: #10d498;
  --fs-green: #1ecc69;
  --fs-red: #f44336;
  --fs-amber: #f9b32d;
  --fs-white: #f3f3f3;
  --fs-slate: #335599;
  --fs-gray: #adc3e5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--fs-white); color: #333; min-height: 100vh; }
.hide { display: none !important; }
.view { min-height: 100vh; padding: 20px; }

/* Login */
#login-view { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.logo { text-align: center; margin-bottom: 40px; }
.logo h1 { font-size: 36px; color: var(--fs-deep-blue); }
.logo-sense { color: var(--fs-emerald); }
.tagline { color: var(--fs-emerald); font-size: 16px; margin-top: 8px; }
#auth-form { width: 100%; max-width: 360px; }
#auth-form input { width: 100%; height: 50px; border: 1px solid #ddd; border-radius: 8px; padding: 0 15px; font-size: 16px; margin-bottom: 12px; }
.btn-primary { width: 100%; height: 50px; background: var(--fs-emerald); color: #fff; border: none; border-radius: 8px; font-size: 18px; font-weight: bold; cursor: pointer; }
.btn-primary:disabled { background: #ccc; }
.btn-link { width: 100%; background: none; border: none; color: var(--fs-slate); font-size: 14px; cursor: pointer; margin-top: 12px; }
.error-text { color: var(--fs-red); text-align: center; margin-top: 12px; font-size: 14px; }

/* Header */
.app-header { display: flex; align-items: center; justify-content: space-between; margin: -20px -20px 16px; padding: 12px 20px; background: var(--fs-deep-blue); color: #fff; }
.app-header h2 { font-size: 20px; }
.btn-small { background: rgba(255,255,255,0.2); color: #fff; border: none; border-radius: 6px; padding: 8px 14px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3em; line-height: 1; }
.btn-arrow-svg { display: block; flex-shrink: 0; }
.btn-danger { background: rgba(220,78,65,0.3); }
.btn-danger:active { background: rgba(220,78,65,0.5); }

/* Camera */
#camera-container { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 12px; overflow: hidden; }
#camera-preview { width: 100%; height: 100%; object-fit: cover; }
#camera-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px; text-align: center; background: rgba(0,0,0,0.5); color: #fff; font-size: 14px; }
.photo-progress { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.progress-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: bold; color: rgba(255,255,255,0.5); }
.progress-dot.active { border-color: #fff; background: var(--fs-slate); color: #fff; }
.progress-dot.done { border-color: var(--fs-green); background: var(--fs-green); color: #fff; }
.scan-controls { display: flex; justify-content: center; margin-top: 20px; }
.btn-round { width: 80px; height: 80px; border-radius: 50%; font-size: 16px; }

/* Upload status */
#upload-status { text-align: center; margin-top: 20px; padding: 0 20px; }
.spinner { width: 40px; height: 40px; border: 4px solid #ddd; border-top-color: var(--fs-emerald); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar-container { width: 100%; max-width: 300px; height: 6px; background: #E0E0E0; border-radius: 3px; margin: 16px auto 0; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--fs-slate), var(--fs-green)); width: 0%; transition: width 0.5s ease; border-radius: 3px; }
@keyframes shimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }
.progress-bar.progress-bar-active { background: linear-gradient(90deg, var(--fs-slate) 0%, var(--fs-slate) 40%, var(--fs-gray) 50%, var(--fs-slate) 60%, var(--fs-green) 100%); background-size: 600px 100%; animation: shimmer 2s ease-in-out infinite; }
.status-hint { color: #999; font-size: 13px; margin-top: 12px; }

/* Instructions */
.instructions-card { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.instructions-card h3 { font-size: 20px; margin-bottom: 16px; text-align: center; }
.instruction-item { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #eee; }
.instruction-item:last-child { border-bottom: none; }
.step-number { width: 36px; height: 36px; background: var(--fs-slate); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; flex-shrink: 0; }
.instruction-item strong { display: block; font-size: 16px; }
.instruction-item p { font-size: 14px; color: #666; margin-top: 2px; }

/* Review section */
.review-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.review-card h3 { font-size: 18px; margin-bottom: 16px; text-align: center; }
.review-thumbnails { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.review-thumbnails.thumbs-3 { grid-template-columns: 1fr 1fr 1fr; }
.review-thumbnails.thumbs-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 480px) {
  .review-thumbnails.thumbs-3, .review-thumbnails.thumbs-4 { grid-template-columns: 1fr 1fr; }
}
.thumb-container { text-align: center; }
.thumb-container img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: #eee; }
.thumb-label { display: block; font-size: 12px; color: #666; margin: 4px 0; text-transform: uppercase; }
.retake-btn { background: rgba(51,85,153,0.1); color: var(--fs-slate); border: 1px solid var(--fs-slate); border-radius: 6px; font-size: 12px; padding: 4px 12px; cursor: pointer; }


/* Text input */
.text-input-section { margin-top: 16px; }
.text-input-section label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #333; }
.text-input-section input { width: 100%; height: 44px; border: 1px solid #ddd; border-radius: 8px; padding: 0 12px; font-size: 16px; }
.text-input-section input:focus { border-color: var(--fs-emerald); outline: none; box-shadow: 0 0 0 2px rgba(16,212,152,0.2); }
.hint-text { font-size: 12px; color: #999; margin-top: 4px; }
.sr-mode-row { margin-top: 12px; }
.sr-mode-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #333; cursor: pointer; }
.sr-mode-label input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--fs-emerald); }
.sr-mode-hint { font-size: 12px; font-weight: 400; color: #999; }
/* MKT-MARKETPLACE-SELECTOR-01: marketplace checklist selector */
.sr-mkt-select { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.sr-mkt-select .sr-mode-label { align-items: flex-start; }
.sr-mkt-select-title { font-size: 14px; font-weight: 700; color: #222; margin: 0; }
.sr-mkt-select-sub { font-size: 12px; font-weight: 400; color: #888; margin: -2px 0 4px; }
.sr-mode-disabled, .sr-mode-disabled .sr-mode-hint { color: #bbb; cursor: not-allowed; }
.sr-mkt-all { border-top: 1px solid #eee; padding-top: 8px; margin-top: 2px; font-weight: 700; }
.sr-mkt-estimate { font-size: 12px; color: #10a37f; font-weight: 600; }
.cost-input-wrapper { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.cost-input-wrapper:focus-within { border-color: var(--fs-emerald); box-shadow: 0 0 0 2px rgba(16,212,152,0.2); }
.cost-prefix { padding: 0 10px; font-size: 18px; font-weight: bold; color: #666; background: #f9f9f9; height: 44px; display: flex; align-items: center; }
.cost-input-wrapper input { flex: 1; height: 44px; border: none; padding: 0 12px; font-size: 16px; outline: none; }

/* Photo count selector */
.photo-count-selector { margin-bottom: 16px; text-align: center; }
.photo-count-selector label { display: block; font-size: 14px; font-weight: 600; color: #555; margin-bottom: 8px; }
.photo-count-options { display: flex; justify-content: center; gap: 8px; }
.photo-count-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #ddd; background: #fff; font-size: 20px; font-weight: bold; color: #666; cursor: pointer; transition: all 0.2s; }
.photo-count-btn.active { border-color: var(--fs-slate); background: var(--fs-slate); color: #fff; }
.photo-count-btn:not(.active):active { border-color: var(--fs-gray); background: rgba(7,33,79,0.05); }

/* Capture step label */
.capture-icon { font-size: 24px; font-weight: bold; }

/* Mismatch warning */
.warning-text { background: rgba(249,179,45,0.1); border: 1px solid var(--fs-amber); border-radius: 8px; padding: 12px; font-size: 14px; color: #8a5d00; margin-bottom: 12px; }

/* Results */
.results-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
/* Verdict-tinted left border on results card */
.results-card.verdict-skip-card    { border-left: 4px solid #d82118; }
.results-card.verdict-maybe-card   { border-left: 4px solid var(--fs-amber); }
.results-card.verdict-flip-card,
.results-card.verdict-buy-card     { border-left: 4px solid var(--fs-green); }
.results-card.verdict-review-card  { border-left: 4px solid #ffbf4a; }
.results-card.verdict-investigate-card { border-left: 4px solid var(--fs-green); }
/* White-pill verdict badge with colored border and orb */
.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 8px 12px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: var(--fs-deep-blue);
  background: #fff;
  border: 2px solid #ccc;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.verdict-badge::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--verdict-orb-color, #ccc);
  flex-shrink: 0;
}
.verdict-badge.verdict-buy,
.verdict-badge.verdict-flip {
  border-color: var(--fs-green);
  color: var(--fs-deep-blue);
}
.verdict-badge.verdict-buy::before,
.verdict-badge.verdict-flip::before {
  background: var(--verdict-orb-color, var(--fs-green));
}
.verdict-badge.verdict-review,
.verdict-badge.verdict-maybe,
.verdict-badge.verdict-investigate {
  border-color: var(--fs-amber);
  color: var(--fs-deep-blue);
}
.verdict-badge.verdict-review::before,
.verdict-badge.verdict-maybe::before,
.verdict-badge.verdict-investigate::before {
  background: var(--verdict-orb-color, var(--fs-amber));
}
.verdict-badge.verdict-skip,
.verdict-badge.verdict-pass {
  border-color: var(--fs-red);
  color: var(--fs-deep-blue);
}
.verdict-badge.verdict-skip::before,
.verdict-badge.verdict-pass::before {
  background: var(--verdict-orb-color, var(--fs-red));
}
.verdict-badge.verdict-blocked {
  border-color: var(--fs-red);
  color: var(--fs-deep-blue);
}
.verdict-badge.verdict-blocked::before {
  background: var(--verdict-orb-color, var(--fs-red));
}
.verdict-badge.verdict-failed {
  border-color: #9E9E9E;
  color: var(--fs-deep-blue);
}
.verdict-badge.verdict-failed::before {
  background: var(--verdict-orb-color, #9E9E9E);
}
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.price-box { background: #f9f9f9; padding: 12px; border-radius: 8px; text-align: center; }
.price-label { display: block; font-size: 12px; color: #999; text-transform: uppercase; }
.price-value { display: block; font-size: 22px; font-weight: bold; margin-top: 4px; }
.text-green { color: var(--fs-green); }
.text-red { color: var(--fs-red); }
.result-details { margin-top: 16px; }
.result-details h4, .proof-section h4 { font-size: 14px; color: #999; text-transform: uppercase; margin-bottom: 8px; }
.result-details ul { list-style: none; }
.result-details li { padding: 6px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.proof-section { margin-top: 16px; background: #f8f9fa; border-radius: 8px; padding: 16px; }
.proof-subtitle { font-size: 13px; color: #666; margin: 0 0 12px 0; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.proof-tile { display: flex; flex-direction: column; align-items: stretch; }
.proof-tile-img { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid #e0e0e0; transition: border-color 0.2s; background: #fff; }
.proof-tile-img:hover { border-color: var(--fs-slate); }
.proof-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.proof-tile-noimg { display: flex; align-items: center; justify-content: center; background: #f0f0f0; }
.proof-tile-placeholder { font-size: 11px; color: #999; }
.proof-price-badge { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.8); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.proof-platform-badge { position: absolute; top: 4px; left: 4px; background: rgba(255,255,255,0.9); color: #333; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.proof-tile-link { display: block; text-align: center; font-size: 12px; color: var(--fs-slate); text-decoration: none; font-weight: 600; padding: 5px 0; margin-top: 4px; border: 1px solid var(--fs-slate); border-radius: 6px; }
.proof-tile-link:active { background: rgba(7,33,79,0.05); }

/* Proof Modal */
.proof-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 10000; justify-content: center; align-items: center; }
.proof-modal.active { display: flex; }
.proof-modal-content { max-width: 90%; max-height: 90%; position: relative; display: flex; flex-direction: column; align-items: center; }
.proof-modal-image { max-width: 100%; max-height: 75vh; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.proof-modal-info { background: #fff; padding: 12px 16px; border-radius: 6px; margin-top: 12px; max-width: 400px; text-align: center; font-size: 14px; }
.proof-modal-close { position: absolute; top: -50px; right: 0; color: #fff; font-size: 36px; cursor: pointer; background: none; border: none; padding: 0; width: 40px; height: 40px; line-height: 40px; }
.proof-modal-close:hover { color: #ddd; }

/* Trust Panel */
.trust-panel { margin-top: 16px; background: #f8f9fa; border-radius: 8px; overflow: hidden; }
.trust-panel-toggle { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; cursor: pointer; user-select: none; }
.trust-panel-toggle-text { font-size: 13px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.trust-panel-toggle-icon { font-size: 10px; color: #999; transition: transform 0.2s; }
.trust-panel-toggle-icon.open { transform: rotate(90deg); }
.trust-panel-body { padding: 0 16px 16px; }
.trust-section { margin-bottom: 12px; }
.trust-section-title { font-size: 11px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; border-bottom: 1px solid #e0e0e0; padding-bottom: 4px; }
.trust-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 3px 0; font-size: 12px; }
.trust-label { color: #666; flex-shrink: 0; margin-right: 8px; }
.trust-value { color: #333; font-weight: 500; text-align: right; word-break: break-all; max-width: 60%; }
.trust-value.missing { color: #bbb; font-style: italic; font-weight: 400; }
.trust-bar-container { display: inline-flex; align-items: center; gap: 6px; }
.trust-bar { width: 60px; height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; }
.trust-bar-fill { height: 100%; border-radius: 3px; }
.trust-list { margin: 2px 0 0 0; padding: 0; list-style: none; }
.trust-list li { font-size: 11px; color: #555; padding: 2px 0; border-bottom: 1px solid #f0f0f0; }
.trust-copy-btn { display: block; width: 100%; padding: 10px; background: #07214f; color: #fff; border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 8px; }
.trust-copy-btn:active { opacity: 0.8; }
.trust-copied-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 600; z-index: 9999; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.trust-copied-toast.show { opacity: 1; }

/* Update Banner */
.update-banner { position: fixed; top: 0; left: 0; right: 0; background: linear-gradient(135deg, var(--fs-deep-blue), var(--fs-slate)); color: #fff; padding: 12px 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 9999; transform: translateY(-100%); transition: transform 0.3s ease-out; }
.update-banner.show { transform: translateY(0); }
.update-content { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 600px; margin: 0 auto; }
.update-text { font-weight: 600; flex: 1; text-align: left; }
.update-button { background: var(--fs-emerald); color: #fff; border: none; padding: 8px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 14px; }
.update-button:hover { transform: scale(1.05); }
.update-dismiss { background: transparent; color: #fff; border: none; font-size: 24px; cursor: pointer; padding: 0 8px; line-height: 1; }

/* Barcode Badge */
.barcode-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 16px; background: rgba(46,204,105,0.1); border: 1px solid var(--fs-green); color: #1a7a3a; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.barcode-icon { font-size: 18px; }

/* Book Result Card */
.book-gem-card { background: linear-gradient(135deg, rgba(46,204,105,0.08), rgba(0,123,255,0.06)); border: 1px solid rgba(46,204,105,0.3); border-radius: 12px; padding: 14px; margin: 12px 0; }
.book-gem-tier { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.book-gem-tier.common { color: #888; }
.book-gem-tier.uncommon { color: #e6a700; }
.book-gem-tier.scarce { color: #e67700; }
.book-gem-tier.collector { color: #d32f2f; }
.book-condition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.book-condition-item { background: rgba(255,255,255,0.7); border-radius: 8px; padding: 8px 10px; text-align: center; }
.book-condition-label { font-size: 11px; color: #888; text-transform: uppercase; }
.book-condition-price { font-size: 16px; font-weight: 700; color: var(--fs-dark); }

/* Book Signals Card */
.book-signals-card { background: rgba(0,123,255,0.05); border: 1px solid rgba(0,123,255,0.2); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; }
.book-signals-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.book-signals-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.book-signals-value { font-size: 13px; font-weight: 700; color: var(--fs-dark); }
.book-signals-comps { font-size: 11px; color: #999; text-align: right; margin-top: 2px; }
.bs-rarity-scarce { color: #e67700; }
.bs-rarity-collector-potential { color: #d32f2f; }
.bs-rarity-uncommon { color: #e6a700; }
.bs-rarity-common { color: #888; }
.bs-rarity-low-data { color: #999; }
.bs-gem-flag { color: #b8860b; font-weight: 600; }
.book-context-info { font-size: 11px; color: #999; text-align: center; margin-top: 2px; line-height: 1.4; }

/* Clothing Detection */
.clothing-info { margin-bottom: 10px; }
.clothing-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.clothing-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.clothing-badge.garment { background: rgba(51,85,153,0.08); color: var(--fs-deep-blue); border: 1px solid var(--fs-gray); }
.clothing-badge.size { background: rgba(249,179,45,0.1); color: #8a5d00; border: 1px solid rgba(249,179,45,0.4); }
.clothing-badge.cond-good { background: rgba(46,204,105,0.1); color: #1a7a3a; border: 1px solid rgba(46,204,105,0.3); }
.clothing-badge.cond-ok { background: rgba(249,179,45,0.1); color: #8a5d00; border: 1px solid rgba(249,179,45,0.3); }
.clothing-badge.cond-warn { background: rgba(220,78,65,0.08); color: var(--fs-red); border: 1px solid rgba(220,78,65,0.3); }
.clothing-badge.tier-lux { background: rgba(16,212,152,0.1); color: #0a8a5e; border: 1px solid rgba(16,212,152,0.4); }
.clothing-badge.tier-prem { background: rgba(51,85,153,0.08); color: var(--fs-deep-blue); border: 1px solid var(--fs-gray); }
.clothing-badge.tier-mid { background: rgba(173,195,229,0.2); color: #546E7A; border: 1px solid var(--fs-gray); }

/* Data Source Badge */
.data-source-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.data-source-badge.cache { background: rgba(46,204,105,0.1); color: #1a7a3a; border: 1px solid rgba(46,204,105,0.3); }
.data-source-badge.live { background: rgba(249,179,45,0.1); color: #8a5d00; border: 1px solid rgba(249,179,45,0.4); }
.data-source-badge .cache-details { font-weight: 400; opacity: 0.8; }

/* AI Reasoning */
.reasoning-text { font-size: 14px; color: #555; font-style: italic; margin: 12px 0; padding: 10px; background: rgba(51,85,153,0.06); border-radius: 8px; border-left: 3px solid var(--fs-slate); }

/* Debug Toggle */
.debug-toggle { background: rgba(249,179,45,0.12); padding: 10px; border-radius: 8px; margin: 15px 0; text-align: center; border: 2px solid var(--fs-amber); }
.debug-toggle label { font-weight: bold; cursor: pointer; font-size: 14px; }
.debug-toggle input[type="checkbox"] { margin-right: 8px; cursor: pointer; }

/* Debug Panels */
.debug-panel { margin: 0 0 12px; border: 2px solid var(--fs-slate); border-radius: 8px; background: #f8f9fa; overflow: hidden; }
.debug-panel-header { width: 100%; padding: 12px 15px; background: var(--fs-slate); color: white; border: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 15px; font-weight: bold; }
.debug-panel-header:hover { background: var(--fs-deep-blue); }
.toggle-icon { font-size: 12px; }
.debug-panel-content { padding: 15px; background: white; max-height: 500px; overflow-y: auto; }
.debug-panel-content.collapsed { display: none; }
.debug-panel-content p { margin: 4px 0 8px; color: #333; line-height: 1.5; font-size: 14px; }
.debug-panel-content strong { display: block; color: var(--fs-slate); margin-top: 10px; font-size: 13px; text-transform: uppercase; }
.debug-panel-content ul { margin: 4px 0 8px 20px; padding: 0; }
.debug-panel-content li { margin: 3px 0; color: #555; font-size: 13px; }
.debug-panel-content pre { background: #f5f5f5; padding: 10px; border-radius: 4px; overflow-x: auto; font-size: 12px; border: 1px solid #ddd; white-space: pre-wrap; word-break: break-all; }
.debug-panel-content h4 { color: var(--fs-slate); margin-bottom: 8px; font-size: 14px; }
.debug-split { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 480px) { .debug-split { grid-template-columns: 1fr; } }
.debug-query-row { padding: 6px 0; border-bottom: 1px solid #eee; font-size: 13px; color: #333; }
.query-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: bold; text-transform: uppercase; margin-right: 6px; }
.query-hit { background: rgba(46,204,105,0.1); color: #1a7a3a; }
.query-miss { background: rgba(220,78,65,0.08); color: var(--fs-red); }

/* Home Screen */
.home-content { padding-top: 8px; }
.home-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.home-action-btn { display: flex; align-items: center; gap: 16px; background: #fff; border: none; border-radius: 12px; padding: 20px; font-size: 16px; text-align: left; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.1); width: 100%; }
.home-action-btn.primary { border-left: 4px solid var(--fs-emerald); }
.home-action-btn:active { background: #f5f5f5; }
.action-icon { font-size: 32px; flex-shrink: 0; }
.action-label { flex: 1; }
.action-label strong { display: block; font-size: 18px; color: #333; }
.action-label small { font-size: 13px; color: #888; }

/* Helpfulness Badge */
.helpfulness-badge { text-align: center; padding: 16px; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.badge-stars { font-size: 28px; letter-spacing: 4px; margin-bottom: 4px; }
.star { color: #ddd; }
.star.active { color: #FFD700; }
.star.active.bronze { color: #CD7F32; }
.star.active.silver { color: #C0C0C0; }
.star.active.gold { color: #FFD700; }
.star.active.diamond { color: #B9F2FF; text-shadow: 0 0 6px #00BCD4; }
.badge-text { font-size: 13px; color: #888; margin-top: 2px; }

/* Adjust Hint */
.adjust-hint { background: rgba(51,85,153,0.08); border: 1px solid var(--fs-slate); border-radius: 8px; padding: 12px; margin-bottom: 16px; }
.adjust-hint p { font-size: 14px; color: var(--fs-deep-blue); }
.adjust-hint small { font-size: 12px; color: var(--fs-slate); }

/* Recent Scans List */
.recent-scans-list { display: flex; flex-direction: column; gap: 1px; background: #eee; border-radius: 12px; overflow: hidden; }
.scan-list-item { display: flex; align-items: center; gap: 12px; background: #fff; padding: 14px 16px; cursor: pointer; }
.scan-list-item:active { background: #f5f5f5; }
.scan-item-icon { font-size: 28px; flex-shrink: 0; width: 40px; text-align: center; }
.scan-item-info { flex: 1; min-width: 0; }
.scan-item-name { font-size: 15px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-item-meta { font-size: 12px; color: #999; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.delete-scan-btn { background: none; border: none; color: #ccc; font-size: 22px; cursor: pointer; padding: 4px 8px; flex-shrink: 0; line-height: 1; }
.delete-scan-btn:active { color: var(--fs-red); }
.scan-item-arrow { font-size: 22px; color: #ccc; flex-shrink: 0; }
.verdict-mini { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: bold; color: #fff; }
.verdict-mini.verdict-flip, .verdict-mini.verdict-buy { background: var(--fs-green); color: #fff !important; font-size: 10px !important; padding: 2px 8px !important; margin-top: 0 !important; }
.verdict-mini.verdict-review { background: var(--fs-amber); }
.verdict-mini.verdict-skip, .verdict-mini.verdict-pass { background: var(--fs-red) !important; color: #fff !important; font-size: 10px !important; padding: 2px 8px !important; margin-top: 0 !important; border-radius: 999px !important; font-weight: bold !important; }
.verdict-mini.verdict-failed { background: #9E9E9E; }
.verdict-mini.verdict-blocked { background: var(--fs-red); }
.verdict-mini.verdict-pending { background: var(--fs-slate); }
.verdict-mini.verdict-awaiting { background: #7c3aed; }
.empty-state { text-align: center; color: #999; padding: 40px 20px; font-size: 15px; }

/* Feedback Section */
.feedback-section { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-align: center; }
.feedback-section h4 { font-size: 15px; color: #555; margin-bottom: 12px; }
.feedback-buttons { display: flex; justify-content: center; gap: 16px; }
.feedback-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #f5f5f5; border: 2px solid transparent; border-radius: 12px; padding: 12px 20px; cursor: pointer; transition: border-color 0.2s; }
.feedback-btn:active { border-color: var(--fs-emerald); background: rgba(16,212,152,0.1); }
.fb-emoji { font-size: 28px; }
.fb-label { font-size: 12px; color: #666; font-weight: 600; }
.feedback-thanks { color: var(--fs-green); font-size: 14px; font-weight: 600; padding: 8px 0; }

/* Results Actions */
.results-actions { display: flex; gap: 12px; margin-bottom: 16px; }
.results-action-btn { flex: 1; padding: 14px; border: 2px solid #ddd; background: #fff; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; }
.results-action-btn.primary { background: var(--fs-emerald); color: #fff; border-color: var(--fs-emerald); }
.results-action-btn:active { opacity: 0.85; }

/* Outcome Tracking */
.outcome-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.outcome-label { font-size: 13px; color: #666; flex-shrink: 0; }
.outcome-btn { flex: 1; min-width: 72px; padding: 8px 4px; border: 1.5px solid #ddd; background: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; color: var(--fs-deep-blue); }
.outcome-btn:active { opacity: 0.8; }
.outcome-btn.selected { border-color: var(--fs-emerald); background: rgba(16,183,127,0.08); color: var(--fs-emerald); }
.outcome-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 300; display: flex; align-items: center; justify-content: center; }
.outcome-modal.hide { display: none !important; }
.outcome-modal-inner { background: #fff; border-radius: 16px; padding: 24px 20px; width: 88%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.outcome-modal-title { font-size: 17px; font-weight: 700; color: var(--fs-deep-blue); margin: 0; }
.outcome-price-input { width: 100%; padding: 12px; border: 1.5px solid #ddd; border-radius: 8px; font-size: 16px; box-sizing: border-box; }
.outcome-platform-select { width: 100%; padding: 12px; border: 1.5px solid #ddd; border-radius: 8px; font-size: 15px; background: #fff; }
.outcome-modal-actions { display: flex; gap: 10px; }
.outcome-modal-actions .btn-primary { flex: 1; height: 44px; font-size: 15px; }
.outcome-skip-btn { flex: 1; height: 44px; background: none; border: 1.5px solid #ddd; border-radius: 8px; font-size: 15px; cursor: pointer; color: #666; font-weight: 600; }

/* Brand Context */
.brand-context-section { background: rgba(51,85,153,0.05); border: 1px solid var(--fs-gray); border-radius: 10px; margin-bottom: 16px; overflow: hidden; }
.brand-context-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--fs-deep-blue); }
.brand-context-header .expand-arrow { font-size: 10px; transition: transform 0.2s; }
.brand-context-body { padding: 0 16px 16px; }
.brand-context-body .hint-text { font-size: 12px; color: #666; margin: 0 0 10px; }
.brand-input-row { display: flex; gap: 8px; }
.brand-input-row input { flex: 1; height: 42px; border: 1px solid #ddd; border-radius: 8px; padding: 0 12px; font-size: 15px; }
.brand-input-row input:focus { border-color: var(--fs-emerald); outline: none; box-shadow: 0 0 0 2px rgba(16,212,152,0.2); }
.brand-rescan-btn { width: auto; height: 42px; padding: 0 16px; font-size: 14px; border-radius: 8px; white-space: nowrap; }
.brand-warning { background: rgba(249,179,45,0.1); border: 1px solid var(--fs-amber); border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 13px; color: #8a5d00; }

/* Feedback Modal */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-content { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 400px; max-height: 90vh; overflow-y: auto; }
.modal-content h3 { font-size: 20px; margin-bottom: 16px; text-align: center; }
.modal-content label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; color: #333; }
.modal-content input[type="text"] { width: 100%; height: 44px; border: 1px solid #ddd; border-radius: 8px; padding: 0 12px; font-size: 16px; }
.modal-content input[type="text"]:focus { border-color: var(--fs-emerald); outline: none; }
.modal-content textarea { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; }
.modal-content textarea:focus { border-color: var(--fs-emerald); outline: none; }
.feedback-checkboxes { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.feedback-checkboxes label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: normal; cursor: pointer; margin: 0; }
.feedback-checkboxes input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions button { flex: 1; height: 44px; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; }
.btn-secondary { background: #f5f5f5; color: #666; border: 1px solid #ddd; }

/* Toast */
.toast { position: fixed; bottom: -60px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 12px 24px; border-radius: 24px; font-size: 14px; font-weight: 600; transition: bottom 0.3s ease; z-index: 2000; white-space: nowrap; }
.toast.show { bottom: 40px; }

/* ── Buying Decision: Review Continuum v1 ─────────────────── */
#buying-decision-container { margin: 4px 0 12px; }
#buying-decision-container.hide { display: none; }

/* Decision header — band-specific colors with solid fill + white text */
.decision-header {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  color: #fff;
}
.decision-band-label {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.decision-sublabel {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
}

/* Band color variants — three-color gradients, dark-base→mid→light (315deg = reversed) */
/* BUY bands — green: #0f8f43 → #14a94f → #20c263 */
.decision-header.verdict-strong-buy {
  background: linear-gradient(315deg, #20c263 0%, #14a94f 52%, #0f8f43 100%);
  color: #fff;
}
.decision-header.verdict-lean-buy {
  background: linear-gradient(315deg, #20c263 0%, #14a94f 52%, #0f8f43 100%);
  color: #fff;
}
/* Conditional buy bands — green (buy family, conditional action) */
.decision-header.verdict-buy-if-condition-matches {
  background: linear-gradient(315deg, #20c263 0%, #14a94f 52%, #0f8f43 100%);
  color: #fff;
}
.decision-header.verdict-buy-if-price-under-max {
  background: linear-gradient(315deg, #20c263 0%, #14a94f 52%, #0f8f43 100%);
  color: #fff;
}
/* Review bands — amber: #ffe3a3 → #ffc85f → #ffbf4a, white text */
.decision-header.verdict-review-comps {
  background: linear-gradient(315deg, #ffe3a3 0%, #ffc85f 52%, #ffbf4a 100%);
  color: #fff;
}
.decision-header.verdict-review-risk {
  background: linear-gradient(315deg, #ffe3a3 0%, #ffc85f 52%, #ffbf4a 100%);
  color: #fff;
}
/* Weak opportunity — mapped to amber review (caution/verify action) */
.decision-header.verdict-weak-opportunity {
  background: linear-gradient(315deg, #ffe3a3 0%, #ffc85f 52%, #ffbf4a 100%);
  color: #fff;
}
/* Skip — red: #f58b84 → #ea675f → #d82118 */
.decision-header.verdict-skip {
  background: linear-gradient(315deg, #d82118 0%, #dc3b33 52%, #e0544d 100%);
  color: #fff;
}

/* Buying numbers grid — 2×2 tiles inside the header card */
.buying-numbers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.buying-tile {
  background: #e8f2fc;
  border: 1px solid #b8d8f5;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.buying-tile-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #07214f;
  font-weight: 600;
  margin-bottom: 3px;
}
.buying-tile-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
  color: #07214f;
}
/* Profit 3-tier thresholds on light tile bg */
.buying-tile-value.profit-great { color: #1ecc69; }
.buying-tile-value.profit-ok    { color: #ffbf4a; }
.buying-tile-value.profit-low   { color: #d82118; }
.buying-tile-sublabel {
  font-size: 10px;
  color: #07214f;
  margin-top: 1px;
}
/* MAX COST 3-state colors */
.buying-tile.tile-buy-under.tile-max-green .buying-tile-value { color: #1ecc69; }
.buying-tile.tile-buy-under.tile-max-amber .buying-tile-value { color: #ffbf4a; }
.buying-tile.tile-buy-under.tile-max-amber .buying-tile-sublabel { color: #ffbf4a; font-weight: 600; }
.buying-tile.tile-buy-under.tile-max-red .buying-tile-value { color: #d82118; }
.buying-tile.tile-buy-under.tile-max-red .buying-tile-sublabel { color: #d82118; font-weight: 600; }
/* Item identity block — below banner, above metric tiles, on neutral card background */
.decision-item-identity {
  margin: 0 0 12px;
  padding-top: 10px;
}
.decision-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #07214f;
  line-height: 1.3;
}
.decision-item-chips {
  font-size: 12px;
  color: #07214f;
  opacity: 0.65;
  margin-top: 3px;
}

/* Cost context line below the buying grid — inherit banner color (amber-safe) */
.bd-cost-context {
  font-size: 11px;
  color: inherit;
  opacity: 0.65;
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.2px;
}

/* Key reasons */
.decision-reasons {
  margin-bottom: 8px;
  padding: 8px 10px;
  background: rgba(51,85,153,0.04);
  border-radius: 8px;
}
.reasons-header, .risks-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 4px;
}
.reasons-list, .risk-list {
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

/* Risk flags */
.decision-risks {
  padding: 8px 10px;
  background: rgba(249,179,45,0.07);
  border-radius: 8px;
  border-left: 3px solid #f9b32d;
  margin-bottom: 8px;
}
.risk-list { color: #7a5300; }

/* Provisional scope indicator — inherit banner color (amber-safe) */
.decision-provisional-status {
  font-size: 12px;
  color: inherit;
  opacity: 0.7;
  margin-top: 6px;
  font-style: italic;
}

/* Decision Reasoning */
.decision-reasoning {
  font-size: 14px;
  color: #555;
  margin: 12px 0;
  padding: 10px;
  background: rgba(51,85,153,0.06);
  border-radius: 8px;
  border-left: 3px solid var(--fs-slate);
  line-height: 1.5;
}

/* Review Flags */
.review-flags {
  background: rgba(249,179,45,0.1);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--fs-amber);
  margin: 16px 0;
}
.review-flags h4 {
  margin: 0 0 10px 0;
  color: #8a5d00;
  font-size: 14px;
}
.review-flags ul {
  margin: 0;
  padding-left: 20px;
}
.review-flags li {
  margin-bottom: 5px;
  color: #666;
  font-size: 14px;
}

/* Active Listings Suggestion */
.active-listings-suggestion {
  background: rgba(51,85,153,0.08);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--fs-slate);
  margin: 16px 0;
}
.active-listings-suggestion p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}
.active-links-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.check-active-btn {
  display: inline-block;
  background: var(--fs-slate);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  flex: 1;
  text-align: center;
  min-width: 80px;
}
.check-active-btn:active {
  background: var(--fs-deep-blue);
}

/* Marketplace badges */
.mp-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mp-ebay { background: rgba(46,204,105,0.1); color: #1a7a3a; }
.mp-poshmark { background: #e9d5ff; color: #7c3aed; }
.mp-mercari { background: rgba(51,85,153,0.08); color: var(--fs-deep-blue); }
.best-mp { font-weight: 500; color: #333 !important; }
.mp-breakdown { font-size: 13px !important; }

/* Market Insights */
.market-insights {
  background: #F5F5F5;
  padding: 15px;
  border-radius: 8px;
  margin: 16px 0;
}
.market-insights h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #555;
}
.market-insights p {
  margin: 4px 0;
  font-size: 14px;
  color: #666;
}

/* Sell Route Recommendation */
.sell-route-recommendation {
  background: #fff;
  border: 1px solid rgba(51,85,153,0.18);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.sell-route-recommendation .sr-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.sell-route-recommendation .sr-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fs-dark, #222);
  letter-spacing: 0.3px;
}
.sell-route-recommendation .sr-basis {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sell-route-recommendation .sr-main {
  background: rgba(51,85,153,0.04);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.sell-route-recommendation .sr-main-market {
  font-size: 16px;
  font-weight: 700;
  color: var(--fs-deep-blue, #335599);
  margin-bottom: 4px;
}
.sell-route-recommendation .sr-main-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #444;
  margin: 4px 0;
}
.sell-route-recommendation .sr-main-metrics span strong { color: #222; }
.sell-route-recommendation .sr-main-explanation {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
  line-height: 1.4;
}
.sell-route-recommendation .sr-secondary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sell-route-recommendation .sr-chip {
  flex: 1 1 calc(50% - 4px);
  min-width: 120px;
  background: #F5F5F5;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: #555;
}
.sell-route-recommendation .sr-chip-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 2px;
}
.sell-route-recommendation .sr-chip-value {
  font-weight: 600;
  color: #222;
}
.sell-route-recommendation .sr-note {
  font-size: 11px;
  color: #888;
  font-style: italic;
  margin-top: 8px;
}
/* v208: per-market status chips */
.sell-route-recommendation .sr-mkt-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.sell-route-recommendation .sr-mkt-chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.sell-route-recommendation .sr-mkt-ok {
  background: #d1fae5;
  color: #065f46;
}
.sell-route-recommendation .sr-mkt-timeout {
  background: #fef3c7;
  color: #92400e;
}
.sell-route-recommendation .sr-mkt-skipped {
  background: #f3f4f6;
  color: #6b7280;
}
.sell-route-recommendation .sr-mkt-pending {
  background: #ede9fe;
  color: #5b21b6;
}
.sell-route-recommendation .sr-empty {
  font-size: 13px;
  color: #666;
  padding: 6px 0;
}
/* FIX-FULLMKT-01: full marketplace comparison CTA */
.sell-route-recommendation .sr-full-mkt-cta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.07);
}
.sell-route-recommendation .sr-full-mkt-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: #07214f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin-bottom: 6px;
}
.sell-route-recommendation .sr-full-mkt-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}
.sell-route-recommendation .sr-full-mkt-note {
  font-size: 11px;
  color: #888;
  font-style: italic;
  margin: 0;
  text-align: center;
}
/* FIX-FULLMKT-03: auto-continuation in-progress UX */
.sell-route-recommendation .sr-auto-continue-status {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sell-route-recommendation .sr-auto-continue-msg {
  font-size: 12px;
  color: #555;
  font-style: italic;
}
.sell-route-recommendation .sr-stop-continue-btn {
  display: inline-block;
  padding: 6px 12px;
  background: transparent;
  color: #888;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  align-self: flex-start;
}
.sell-route-recommendation .sr-stop-continue-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Why Panel */
.why-panel { background: rgba(0,123,255,0.04); border: 1px solid rgba(0,123,255,0.15); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; }
.why-panel-title { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-bottom: 6px; }
.why-panel-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; font-size: 13px; }
.why-panel-label { color: #888; font-size: 12px; }
.why-panel-value { font-weight: 600; color: var(--fs-dark); font-size: 13px; }
.why-panel-sub { font-size: 11px; color: #aaa; margin-left: 4px; font-weight: 400; }

/* Crop View */
.crop-wrapper {
  position: relative;
  width: 100%;
  max-height: 55vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.crop-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 55vh;
  object-fit: contain;
}
.crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
  cursor: move;
  touch-action: none;
}
.crop-handle {
  position: absolute;
  width: 28px;
  height: 28px;
  background: var(--fs-emerald);
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  touch-action: none;
  z-index: 2;
}
.crop-handle.tl { top: 0; left: 0; cursor: nwse-resize; }
.crop-handle.tr { top: 0; right: 0; transform: translate(50%, -50%); cursor: nesw-resize; }
.crop-handle.bl { bottom: 0; left: 0; transform: translate(-50%, 50%); cursor: nesw-resize; }
.crop-handle.br { bottom: 0; right: 0; transform: translate(50%, 50%); cursor: nwse-resize; }
.crop-prompt {
  text-align: center;
  color: #555;
  font-size: 15px;
  margin: 12px 0 4px;
  font-weight: 600;
}
.crop-hint {
  text-align: center;
  color: #999;
  font-size: 13px;
  margin-bottom: 12px;
}
.crop-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.crop-actions button {
  flex: 1;
  height: 50px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}
.btn-retake-crop {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}
.btn-skip-crop {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}
.btn-confirm-crop {
  background: var(--fs-emerald);
  color: #fff;
  border: none;
}

/* Quota Banner */
.quota-banner { background: #fff; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quota-text { font-size: 14px; font-weight: 600; color: #555; }
.quota-text.quota-low { color: #e65100; }
.quota-text.quota-trial { color: var(--fs-slate); }
.quota-text.quota-paid { color: var(--fs-green); }
.btn-trial { background: var(--fs-emerald); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: bold; cursor: pointer; white-space: nowrap; }
.btn-trial:active { background: #0cb882; }
.btn-upgrade { background: var(--fs-deep-blue); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: bold; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block; }
.btn-upgrade:active { opacity: 0.85; }
.quota-upgrade-link { display: block; text-align: center; text-decoration: none; margin-top: 8px; font-size: 15px; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-card { background: #fff; border-radius: 16px; padding: 24px; max-width: 380px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-card h3 { font-size: 20px; margin-bottom: 12px; color: #333; }
.modal-card p { font-size: 14px; color: #666; margin-bottom: 12px; line-height: 1.5; }
.trial-benefits { list-style: none; padding: 0; margin: 0 0 16px; }
.trial-benefits li { font-size: 14px; color: #333; padding: 6px 0; padding-left: 24px; position: relative; }
.trial-benefits li::before { content: '\2713'; position: absolute; left: 0; color: var(--fs-green); font-weight: bold; }
.trial-note { font-size: 13px; color: #8a5d00; background: rgba(249,179,45,0.1); padding: 8px 12px; border-radius: 6px; }
.trial-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.trial-actions .btn-primary { font-size: 16px; }
.trial-actions .btn-link { margin-top: 4px; }
.quota-reset { font-size: 13px; color: #888; }

/* Blocked Brand Styles */
.blocked-brand-card { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-align: center; border-top: 4px solid var(--fs-red); }
.blocked-icon { font-size: 48px; margin-bottom: 12px; }
.blocked-brand-card h3 { font-size: 20px; color: var(--fs-red); margin-bottom: 12px; }
.blocked-category-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; margin-bottom: 16px; }
.cat-fast_fashion { background: rgba(220,78,65,0.08); color: var(--fs-red); }
.cat-mass_market { background: rgba(249,179,45,0.1); color: #8a5d00; }
.cat-oversaturated { background: rgba(249,179,45,0.08); color: #8a5d00; }
.cat-unknown { background: #ECEFF1; color: #546E7A; }
.blocked-reason { font-size: 15px; color: #555; margin-bottom: 20px; line-height: 1.5; }
.blocked-reality-check { background: rgba(249,179,45,0.08); border: 1px solid rgba(249,179,45,0.4); border-radius: 8px; padding: 16px; margin-bottom: 20px; text-align: left; }
.blocked-reality-check h4 { font-size: 14px; color: #8a5d00; text-transform: uppercase; margin-bottom: 8px; }
.blocked-reality-check p { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 12px; }
.blocked-avg-resale { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid rgba(249,179,45,0.4); }
.blocked-resale-label { font-size: 13px; color: #888; }
.blocked-resale-value { font-size: 18px; font-weight: bold; color: var(--fs-red); }
.blocked-actions { display: flex; gap: 12px; margin-top: 8px; }
.blocked-actions .results-action-btn { flex: 1; }

/* Brand Warning Banner (soft_warning in results) */
.brand-warning-banner { background: rgba(249,179,45,0.1); border: 1px solid var(--fs-amber); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.brand-warning-banner strong { display: block; color: #8a5d00; font-size: 14px; margin-bottom: 4px; }
.brand-warning-banner p { font-size: 13px; color: #795548; line-height: 1.4; margin: 0; }

/* ===== PROFIT BREAKDOWN MODAL ===== */
.profit-clickable { cursor: pointer; position: relative; transition: background 0.2s; }
.profit-clickable:active { background: rgba(0,0,0,0.05); }
.breakdown-hint { font-size: 11px; color: #aaa; vertical-align: super; margin-left: 2px; }

/* ===== PROFIT SETTINGS ===== */
.profit-gear-btn { background: none; border: none; font-size: 13px; color: #bbb; cursor: pointer; padding: 6px 4px; margin: -6px -4px -6px 0; vertical-align: super; line-height: 1; border-radius: 4px; transition: color 0.15s; }
.profit-gear-btn:hover, .profit-gear-btn:focus { color: var(--fs-slate); outline: none; }
.profit-settings-label { display: block; font-size: 14px; font-weight: 600; color: var(--fs-deep-blue); margin-bottom: 6px; }
.profit-settings-input-wrap { display: flex; align-items: center; border: 2px solid #e5e7eb; border-radius: 8px; overflow: hidden; transition: border-color 0.15s; }
.profit-settings-input-wrap:focus-within { border-color: var(--fs-emerald); box-shadow: 0 0 0 2px rgba(16,212,152,0.2); }
.profit-settings-prefix, .profit-settings-suffix { padding: 0 10px; background: #f9f9f9; color: #888; font-size: 15px; font-weight: 600; user-select: none; align-self: stretch; display: flex; align-items: center; }
.profit-settings-prefix { border-right: 1px solid #e5e7eb; }
.profit-settings-suffix { border-left: 1px solid #e5e7eb; }
.profit-settings-input { flex: 1; border: none; outline: none; padding: 12px 10px; font-size: 16px; background: #fff; color: #333; width: 100%; -moz-appearance: textfield; }
.profit-settings-input::-webkit-outer-spin-button, .profit-settings-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.profit-settings-err { font-size: 12px; color: var(--fs-red); margin-top: 4px; margin-bottom: 0; }
.profit-settings-note { font-size: 12px; color: #9ca3af; margin-top: 10px; line-height: 1.5; }
.profit-preset-btn { background: none; border: 1px solid #d1d5db; border-radius: 4px; padding: 2px 8px; font-size: 12px; color: #374151; cursor: pointer; margin-left: 4px; transition: background 0.15s, border-color 0.15s; }
.profit-preset-btn:hover, .profit-preset-btn:active { background: #f3f4f6; border-color: #9ca3af; }
.media-mail-hint { display: block; font-size: 11px; color: #92400e; background: #fffbeb; border-radius: 4px; padding: 2px 6px; margin-top: 4px; line-height: 1.3; }
.profit-load-banner { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 8px; line-height: 1.4; }
.profit-target-mode-row { display: flex; gap: 8px; }
.profit-target-mode-btn { flex: 1; padding: 8px 4px; border: 2px solid #e5e7eb; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.profit-target-mode-btn.active { border-color: var(--fs-emerald); color: var(--fs-deep-blue); background: #f0fdf9; }
.profit-assumptions-badge { display: inline-block; font-size: 11px; color: #6b7280; background: #f3f4f6; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.profit-assumptions-badge.user { color: #065f46; background: #d1fae5; }

.breakdown-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.breakdown-overlay.hide { display: none; }
.breakdown-modal { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; animation: slideUp 0.25s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.breakdown-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 12px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; border-radius: 16px 16px 0 0; z-index: 1; }
.breakdown-header h3 { margin: 0; font-size: 18px; color: #333; }
.breakdown-close { background: none; border: none; font-size: 28px; color: #999; cursor: pointer; padding: 0 4px; line-height: 1; }

.breakdown-body { padding: 16px 20px 24px; }

.breakdown-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.breakdown-label { font-size: 15px; color: #555; }
.breakdown-sub { font-size: 12px; color: #999; }
.breakdown-value { font-size: 16px; font-weight: 600; color: #333; }
.breakdown-value.deduct { color: var(--fs-red); }

.breakdown-divider { border-top: 1px solid #eee; margin: 4px 0; }
.breakdown-divider.thick { border-top: 2px solid #333; margin: 8px 0 4px; }

.sale-row .breakdown-value { color: var(--fs-green); font-size: 18px; }
.net-row { padding: 12px 0; }
.net-row .breakdown-label { font-size: 17px; font-weight: 700; color: #333; }
.net-row .breakdown-value { font-size: 20px; font-weight: 700; }

.breakdown-fee-details { padding-left: 20px; margin-bottom: 4px; }
.breakdown-sub-row { display: flex; justify-content: space-between; padding: 3px 0; }
.breakdown-sub-label { font-size: 13px; color: #999; }
.breakdown-sub-value { font-size: 13px; color: #999; }

.breakdown-marketplace { text-align: center; margin: 12px 0 16px; }
.breakdown-marketplace span { display: inline-block; background: rgba(51,85,153,0.1); color: var(--fs-deep-blue); font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 12px; }

.breakdown-adjustments { margin-top: 16px; }
.breakdown-adjustments h4 { font-size: 14px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.adjustment-card { background: #F5F5F5; border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.adjustment-card:empty { display: none; }
.adjustment-card strong { display: block; font-size: 13px; color: #333; margin-bottom: 4px; }
.adjustment-card p { font-size: 13px; color: #666; line-height: 1.4; margin: 0; }

.breakdown-marketplace-details { margin-top: 16px; }
.breakdown-marketplace-details summary { font-size: 14px; color: var(--fs-slate); cursor: pointer; padding: 8px 0; font-weight: 600; }
.marketplace-compare-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mp-compare-card { background: #FAFAFA; border: 1px solid #eee; border-radius: 8px; padding: 12px; }
.mp-compare-card.mp-best { border-color: var(--fs-slate); background: rgba(51,85,153,0.08); }
.mp-compare-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mp-compare-header strong { font-size: 15px; color: #333; }
.mp-best-badge { font-size: 11px; background: var(--fs-slate); color: #fff; padding: 2px 8px; border-radius: 10px; }
.mp-compare-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 13px; color: #666; }
.no-data { font-size: 13px; color: #999; text-align: center; padding: 16px; }

/* ===== PROFIT TRANSPARENCY UI ===== */
.breakdown-roi-row { display: flex; gap: 10px; justify-content: center; margin: 12px 0 8px; }
.roi-pill { background: #F0F4F8; border-radius: 20px; padding: 6px 16px; display: flex; align-items: center; gap: 6px; }
.roi-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.roi-value { font-size: 15px; font-weight: 700; color: var(--fs-deep-blue); }
.roi-value.text-green { color: var(--fs-green); }
.roi-value.text-red { color: var(--fs-red); }

.bd-confidence-section { margin-top: 16px; background: #FAFAFA; border-radius: 10px; padding: 12px 16px; }
.bd-section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bd-conf-icon { font-size: 18px; }
.bd-section-title { font-size: 14px; color: #555; }
.bd-section-title strong { color: #333; text-transform: capitalize; }
.bd-confidence-reasons { display: flex; flex-direction: column; gap: 3px; }
.bd-confidence-reasons .bd-reason { font-size: 13px; color: #666; line-height: 1.4; }

.bd-sources-row { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.bd-source-pill { display: flex; align-items: center; gap: 4px; background: rgba(16,212,152,0.1); padding: 4px 12px; border-radius: 14px; }
.bd-source-pill .source-name { font-size: 12px; color: var(--fs-emerald); text-transform: capitalize; font-weight: 500; }
.bd-source-pill .source-count { font-size: 12px; color: var(--fs-emerald); font-weight: 700; }

.bd-comps-list { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.bd-comp-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.bd-comp-item:last-child { border-bottom: none; }
.bd-comp-title { font-size: 13px; color: #444; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.bd-comp-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bd-comp-price { font-size: 14px; font-weight: 600; color: var(--fs-green); }
.bd-comp-source { font-size: 11px; color: #aaa; text-transform: capitalize; }
.bd-comp-date { font-size: 11px; color: #aaa; }

.bd-flags-section { margin-top: 16px; }
.bd-flags-title { font-size: 14px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.bd-flags-list { display: flex; flex-direction: column; gap: 4px; }
.bd-flag-item { font-size: 13px; color: #777; line-height: 1.4; }

/* ===== INPUT METHOD TABS (Camera vs Upload) ===== */
.input-method-tabs { display: flex; border-bottom: 2px solid #e0e0e0; margin: 0 -16px 16px; }
.method-tab { flex: 1; padding: 14px 8px; background: none; border: none; font-size: 15px; font-weight: 500; color: #888; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.method-tab.active { color: var(--fs-deep-blue); border-bottom-color: var(--fs-deep-blue); }
.tab-icon { font-size: 18px; }

.input-method-content { padding: 8px 0; }
.input-method-content.hide { display: none; }

.btn-gallery { display: block; width: 100%; padding: 16px; font-size: 16px; font-weight: 600; border-radius: 12px; margin-bottom: 12px; }

.method-hint { text-align: center; color: #999; font-size: 13px; margin-top: 12px; }

/* Drop Zone */
.drop-zone { border: 3px dashed #ccc; border-radius: 12px; padding: 32px 16px; text-align: center; cursor: pointer; transition: all 0.2s; margin-bottom: 12px; background: #f9f9f9; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--fs-slate); background: rgba(51,85,153,0.08); }
.dz-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.dz-primary { font-size: 16px; font-weight: 600; color: #333; margin: 0 0 4px; }
.dz-secondary { font-size: 13px; color: #888; margin: 0; }

/* Upload Preview */
.upload-preview-area h4 { font-size: 14px; color: #666; margin: 0 0 8px; }
.upload-preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
.upload-preview-card { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.upload-preview-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.upload-photo-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: #fff; padding: 4px 8px; font-size: 12px; text-align: center; }
.upload-remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(220,30,30,0.85); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; }
.btn-text-sm { background: none; border: none; color: var(--fs-red); font-size: 13px; cursor: pointer; padding: 4px 0; }
.btn-continue { margin-top: 12px; }
.btn-continue.hide { display: none; }

@media (max-width: 600px) {
  .drop-zone { display: none; }
}

/* ===== Authentication Warnings ===== */

/* Full-screen overlay (EXTREME risk) */
.auth-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.auth-overlay.hide { display: none; }

.auth-modal { background: #fff; border-radius: 16px; padding: 24px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }
.auth-modal.extreme { border-top: 6px solid var(--fs-red); }
.auth-modal.checklist { border-top: 6px solid var(--fs-amber); }
.auth-modal-icon { font-size: 48px; text-align: center; margin-bottom: 8px; }
.auth-modal h2 { font-size: 20px; text-align: center; color: var(--fs-red); margin: 0 0 12px; }
.auth-modal-copy { font-size: 15px; line-height: 1.5; color: #333; margin-bottom: 16px; }
.auth-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.auth-modal-header h3 { margin: 0; font-size: 18px; color: #333; }
.auth-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #999; padding: 0 4px; }

.auth-checkpoints, .auth-red-flags { margin-bottom: 14px; }
.auth-checkpoints h4, .auth-red-flags h4 { font-size: 14px; color: #555; margin: 0 0 6px; }
.auth-checkpoints ul, .auth-red-flags ul { margin: 0; padding-left: 18px; }
.auth-checkpoints li { font-size: 13px; color: #333; line-height: 1.5; margin-bottom: 4px; }
.auth-red-flags li { font-size: 13px; color: var(--fs-red); line-height: 1.5; margin-bottom: 4px; }

.auth-price-reality { background: rgba(249,179,45,0.1); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.auth-price-reality h4 { font-size: 13px; color: #8a5d00; margin: 0 0 4px; }
.auth-price-reality p { font-size: 13px; color: #333; margin: 0; line-height: 1.4; }

.auth-provider-info { background: rgba(46,204,105,0.1); border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
.auth-provider-info p { margin: 0 0 2px; font-size: 13px; color: #333; }
.auth-provider-info.hide { display: none; }

.auth-modal-actions { display: flex; flex-direction: column; gap: 8px; }
.auth-btn { border: none; border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; }
.auth-btn.acknowledge { background: #333; color: #fff; }
.auth-btn.authenticate { background: var(--fs-green); color: #fff; }
.auth-btn.cancel { background: #f5f5f5; color: #666; }
.auth-btn.hide { display: none; }
.auth-btn-small { border: 1px solid var(--fs-amber); background: #fff; color: #8a5d00; border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.auth-btn-small.primary { background: var(--fs-green); color: #fff; border-color: var(--fs-green); }
.auth-btn-small.hide { display: none; }

/* HIGH risk banner */
.auth-high-banner { background: rgba(249,179,45,0.08); border: 2px solid var(--fs-amber); border-radius: 12px; padding: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.auth-high-banner.hide { display: none; }
.auth-high-icon { font-size: 24px; flex-shrink: 0; }
.auth-high-content { flex: 1; }
.auth-high-content strong { font-size: 15px; color: #8a5d00; display: block; margin-bottom: 4px; }
.auth-high-content p { font-size: 13px; color: #333; margin: 0 0 8px; line-height: 1.4; }
.auth-high-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* MEDIUM risk note */
.auth-medium-note { background: rgba(51,85,153,0.08); border: 1px solid var(--fs-gray); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.auth-medium-note.hide { display: none; }
.auth-medium-icon { font-size: 18px; color: var(--fs-slate); flex-shrink: 0; }
.auth-medium-note span:last-child { font-size: 13px; color: var(--fs-slate); line-height: 1.4; }

/* ===== Photo Tips & Guidance ===== */

/* Tips banner (expandable) */
.photo-tips-banner { margin: 0 16px 8px; }
.photo-tips-banner.hide { display: none; }
.photo-tips-toggle { width: 100%; background: rgba(46,204,105,0.1); border: 1px solid rgba(46,204,105,0.3); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #1a7a3a; font-weight: 500; }
.tips-icon { font-size: 18px; }
.tips-arrow { margin-left: auto; font-size: 10px; }
.photo-tips-body { background: rgba(46,204,105,0.06); border: 1px solid rgba(46,204,105,0.2); border-top: none; border-radius: 0 0 10px 10px; padding: 12px 14px; margin-top: -1px; }
.photo-tips-body.hide { display: none; }
.tip-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 6px; font-size: 13px; color: #333; line-height: 1.4; }
.tip-row.tip-highlight { background: #FFF9C4; border-radius: 6px; padding: 8px 10px; margin: 4px -6px; }
.tip-num { background: var(--fs-green); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.tip-highlight .tip-num { background: var(--fs-amber); color: #fff; }
.tip-note { font-size: 12px; color: #666; margin: 8px 0 0; line-height: 1.4; font-style: italic; }
/* Category-specific tips grid */
.tip-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.tip-category-item {
  background: #fff;
  border: 1.5px solid rgba(46,204,105,0.3);
  border-radius: 10px;
  padding: 12px 10px 12px;
}
.tip-cat-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 8px;
}
.tip-cat-label {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}
.tip-cat-body {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.5;
}
.tip-why {
  font-size: 11px;
  color: #9ca3af;
  margin: 6px 0 0;
  text-align: center;
}

/* Compact tip tags (under method hints) */
.photo-tips-compact { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tips-label { font-size: 12px; color: #666; margin: 0; width: 100%; }
.tip-tag { display: inline-block; background: rgba(51,85,153,0.1); color: var(--fs-deep-blue); border-radius: 12px; padding: 3px 10px; font-size: 11px; font-weight: 600; }

/* Single photo warning */
.single-photo-warning { background: rgba(249,179,45,0.1); border: 1px solid var(--fs-amber); border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.single-photo-warning.hide { display: none; }
.single-photo-warning p { margin: 0; font-size: 13px; color: #8a5d00; line-height: 1.4; }
.single-photo-warning strong { color: var(--fs-red); }

/* ─── Scan Mode Grid (Home) ─── */
.scan-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.scan-mode-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.scan-mode-card {
  position: relative;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.scan-mode-card:active {
  transform: scale(0.97);
}
.estate-pro-card {
  border-color: var(--fs-slate);
  background: linear-gradient(135deg, rgba(7,33,79,0.04) 0%, rgba(16,212,152,0.08) 100%);
}
.estate-pro-card:active {
  border-color: var(--fs-deep-blue);
}
.mode-icon { font-size: 32px; margin-bottom: 8px; }
.mode-title { font-size: 16px; font-weight: 600; color: #1f2937; margin-bottom: 4px; }
.mode-subtitle { font-size: 13px; color: #6b7280; }
.pro-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--fs-emerald);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Estate Pro gated state — MVP: disabled until post-launch */
.estate-pro-gated {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}
.estate-pro-gated .pro-badge {
  background: #9ca3af;
}

/* Home footer — privacy policy link */
.home-footer {
  text-align: center;
  padding: 16px 0 8px;
}
.home-footer-link {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
}
.home-footer-link:hover {
  color: #6b7280;
}

/* Privacy modal */
.privacy-modal-card {
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 12px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.modal-close-btn:hover { background: #f3f4f6; }
.privacy-modal-body {
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}
.privacy-modal-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin: 16px 0 6px;
}
.privacy-modal-body h4:first-of-type { margin-top: 0; }
.privacy-modal-body ul {
  padding-left: 18px;
  margin: 0 0 8px;
}
.privacy-modal-body p { margin: 0 0 8px; }
.privacy-modal-body a { color: var(--fs-slate); }
.privacy-updated {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 16px !important;
}

/* ─── Estate Pro Guidance Modal ─── */
.estate-pro-guidance-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.estate-pro-guidance-modal .modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.estate-pro-guidance {
  position: relative;
  z-index: 1;
  max-width: 400px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}
.photo-guide-steps { margin: 16px 0; }
.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--fs-slate);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.step-content strong { display: block; margin-bottom: 2px; }
.step-content p { margin: 0; font-size: 13px; color: #6b7280; }
.magnet-note {
  background: rgba(249,179,45,0.12);
  border: 1px solid var(--fs-amber);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #8a5d00;
  margin-top: 12px;
}

/* ─── Estate Pro Results ─── */
#estate-pro-results.hide { display: none; }
.estate-pro-result { padding: 0 16px 20px; }
.metal-type-header {
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  color: white;
}
.header-text { font-size: 20px; font-weight: 700; }
.estate-pro-result .result-section {
  background: white;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.estate-pro-result .result-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #374151;
}
.estate-pro-result .result-section ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: #4b5563;
}
.estate-pro-result .result-section ul li { margin-bottom: 4px; }
.estate-pro-result .result-section p { margin: 4px 0 0; font-size: 14px; color: #4b5563; line-height: 1.5; }
.confidence-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fs-amber), var(--fs-emerald));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.confidence-text {
  margin: 6px 0 0;
  font-size: 13px;
  color: #6b7280;
  text-align: right;
}
.estate-pro-warning {
  background: rgba(220,78,65,0.06) !important;
  border: 1px solid rgba(220,78,65,0.25);
}
.estate-pro-warning h3 { color: var(--fs-red) !important; }
.estate-pro-warning ul { color: var(--fs-red) !important; }
.value-section .value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 15px;
}
.value-section .value-row span { color: #6b7280; }
.value-section .value-row strong { color: #111827; font-size: 17px; }
.spot-price-row { border-top: 1px dashed #e5e7eb; margin-top: 4px; padding-top: 8px !important; }
.spot-price-row strong { font-size: 14px !important; color: var(--fs-slate) !important; }
.spot-price-note { font-size: 11px; color: #9ca3af; margin-top: 2px !important; margin-bottom: 0 !important; }
.disclaimer-link { color: var(--fs-slate); text-decoration: underline; cursor: pointer; }
.value-disclaimer-bar { font-size: 11px; color: #92400e; background: #fef3c7; padding: 8px 10px; border-radius: 6px; margin-top: 10px; line-height: 1.4; }
.value-disclaimer-bar .disclaimer-link { color: #92400e; }
/* Weight presets */
.weight-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.preset-btn { background: #fff; border: 2px solid #e5e7eb; border-radius: 8px; padding: 10px 4px; font-size: 13px; font-weight: 600; color: var(--fs-deep-blue); cursor: pointer; transition: all 0.15s; line-height: 1.3; }
.preset-btn span { font-weight: 400; font-size: 12px; color: #6b7280; }
.preset-btn:hover, .preset-btn.active { border-color: var(--fs-emerald); background: #f0fdf4; }
.preset-btn:active { transform: scale(0.95); }
/* Weight info row in results */
.weight-info-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; }
.weight-info-row .value-label { color: #6b7280; }
.update-weight-btn { padding: 6px 12px !important; font-size: 12px !important; border: 1px solid var(--fs-slate) !important; color: var(--fs-slate) !important; background: #fff !important; border-radius: 6px !important; cursor: pointer; white-space: nowrap; }
.update-weight-btn:active { background: #f3f4f6 !important; }
.weight-tip { font-size: 11px; color: #92400e; background: #fef3c7; padding: 6px 10px; border-radius: 6px; margin: 4px 0 8px; }
p.verdict-flip {
  margin-top: 10px !important;
  padding: 8px 12px;
  background: rgba(46,204,105,0.08);
  border-radius: 6px;
  color: #1a7a3a !important;
  font-weight: 500;
  font-size: 13px !important;
}
p.verdict-skip {
  margin-top: 10px !important;
  padding: 8px 12px;
  background: rgba(220,78,65,0.06);
  border-radius: 6px;
  color: var(--fs-red) !important;
  font-weight: 500;
  font-size: 13px !important;
}

/* ─── Vintage Badge & Results ─── */
.vintage-badge {
  border-radius: 12px;
  padding: 16px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.vintage-badge-secondary {
  padding: 12px;
  margin-top: 12px;
  opacity: 0.9;
}
.vintage-details { flex: 1; }
.vintage-era {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.vintage-multiplier {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}
.vintage-confidence {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}
.vintage-reasoning {
  background: #f9fafb;
  border-radius: 10px;
}
.indicator {
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #4b5563;
}
.indicator:last-child { border-bottom: none; }
.indicator strong { color: #111827; }

/* ─── Splash Screen ─── */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--fs-deep-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}
.splash-content {
  text-align: center;
  animation: splashFadeIn 0.6s ease-out;
}
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.splash-logo {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.splash-logo-sense { color: var(--fs-emerald); }
.splash-tagline {
  font-size: 15px;
  color: var(--fs-emerald);
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 28px;
}
.splash-loader {
  width: 120px;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}
.splash-loader-bar {
  width: 40%;
  height: 100%;
  background: var(--fs-emerald);
  border-radius: 2px;
  animation: splashLoad 1.2s ease-in-out infinite;
}
@keyframes splashLoad {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ─── Fast Verdict Notification Toast ─── */
.fast-notification,
.full-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  animation: notifSlideDown 0.3s ease-out;
  max-width: 90%;
  width: 400px;
}
.notification-content {
  border-radius: 12px;
  padding: 16px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.notification-icon { font-size: 32px; flex-shrink: 0; }
.notification-text { flex: 1; }
.notification-verdict {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.notification-brand {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.notification-reason,
.notification-value {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}
.notif-fade-out {
  animation: notifFadeOut 0.3s ease-out forwards;
}
@keyframes notifSlideDown {
  from { opacity: 0; transform: translate(-50%, -100px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes notifFadeOut {
  to { opacity: 0; transform: translate(-50%, -20px); }
}

/* ─── Fast Verdict Card (in results) ─── */
.fast-verdict-card {
  color: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.fast-verdict-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.fast-verdict-icon { font-size: 48px; }
.fast-verdict-title { font-size: 24px; font-weight: 700; }
.fast-verdict-brand { font-size: 16px; font-weight: 600; opacity: 0.9; }
.fast-verdict-detail {
  background: rgba(0,0,0,0.2);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.fast-verdict-detail p { font-size: 14px; line-height: 1.5; }
.fast-verdict-meta { font-size: 12px; opacity: 0.7; }

/* ─── Full Analysis Pending Spinner ─── */
.full-analysis-pending {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}
.pending-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--fs-emerald);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

/* ─── Dev Controls Panel ─── */
#devControls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  background: white;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  font-size: 13px;
  box-sizing: border-box;
}
#devControls h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--fs-deep-blue);
}
#devControls label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
#devControls .dev-info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 11px;
  color: #6b7280;
}

/* ─── Math Trace (Dev Debugging) ─── */
.dev-section {
  background: #f5f5f5;
  padding: 12px;
  margin: 12px 0 0 0;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.dev-section h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fs-deep-blue);
}
.trace-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}
.trace-line span:first-child { color: #666; }
.trace-line span:last-child { color: var(--fs-deep-blue); font-weight: 600; }
.trace-highlight { color: var(--fs-emerald) !important; font-size: 13px !important; }
.dev-button {
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--fs-emerald);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.dev-button:hover { background: #168a62; }

/* ─── Progressive Notification Card ─── */
.progressive-card {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.progressive-card.hide { display: none !important; }

.progressive-content {
  background: white;
  border-radius: 20px;
  padding: 32px 24px 28px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* Colored top accent strip per verdict */
.progressive-content.skip-card  { border-top: 5px solid var(--fs-red); }
.progressive-content.maybe-card { border-top: 5px solid var(--fs-amber); }
.progressive-content.investigate-card { border-top: 5px solid #2ecc69; }

.progressive-verdict-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 14px;
}
.progressive-verdict-badge.verdict-skip        { background: #fee2e2; color: #991b1b; }
.progressive-verdict-badge.verdict-maybe       { background: #fef3c7; color: #92400e; }
.progressive-verdict-badge.verdict-investigate { background: #d1fae5; color: #065f46; }
/* PROBABLY — green variant of the MAYBE pill */
.progressive-verdict-badge.verdict-probably    { background: #d1fae5; color: #065f46; }
/* IMAGE-NEEDED-PROMPT-UX-FIX-02 — blue accent for the non-book "image needed"
   prompts (tag / clothing detail / hardgoods detail). Intentionally distinct
   from the yellow Book/publisher prompt, which is unchanged in this task. */
.progressive-verdict-badge.verdict-detail-blue { background: #e7f0ff; color: #1f4fa3; }

/* Large icon in the card */
.progressive-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.progressive-message {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 8px 0 10px;
  line-height: 1.3;
}

.progressive-sub {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.5;
}

.progressive-reasoning {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 24px;
  font-style: italic;
}

.progressive-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.progressive-actions .btn-primary {
  width: auto;
  padding: 0 28px;
  border-radius: 10px;
}
/* Hard-skip "Check anyway" override action: amber, not green */
#progressive-continue-btn.is-warning-override {
  background: var(--fs-amber);
  color: #fff;
}
#progressive-continue-btn.is-warning-override:hover,
#progressive-continue-btn.is-warning-override:active {
  background: #d97706;
}
#progressive-continue-btn.is-warning-override:disabled {
  background: #ccc;
}
.progressive-actions .btn-secondary {
  width: auto;
  padding: 0 24px;
  height: 50px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
/* Follow-up prompt file-action buttons (publisher prompt: Take Photo + Upload
   from Gallery). Self-contained green primary so both labels match exactly and
   the text is reliably centered regardless of base button class. */
.publisher-prompt-action {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 320px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  background: var(--fs-emerald);
  color: #fff;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.publisher-prompt-action:active { filter: brightness(0.95); }
/* Blue action-button variant for the non-book image-needed prompts (UX-FIX-02).
   Same shape/sizing as the publisher action button, blue instead of emerald. */
.publisher-prompt-action.prompt-action-blue { background: #1f4fa3; }
/* Hidden file inputs for the publisher prompt. The visible controls are
   <button>s that call input.click() directly, so these never need to be
   clickable — kept off-screen and out of the flex flow. */
.publisher-hidden-file {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
/* "Done" / dismiss button — subtle, not competing with primary */
.btn-done {
  height: 50px;
  padding: 0 28px;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-done:active { background: #e5e7eb; }
/* Override for the hard-skip "Check anyway" button — amber warning, not green */
.btn-override {
  background: var(--fs-amber) !important;
  color: #7c4a00 !important;
  border-radius: 10px;
}

/* ─── MAYBE state: caution-themed evidence card ─── */
.progressive-card.is-maybe-state .progressive-content {
  border-top: 8px solid var(--fs-amber);
}
.progressive-card.is-maybe-state .progressive-verdict-badge.verdict-maybe,
.progressive-card.is-maybe-state .progressive-verdict-badge.verdict-review {
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 6px 18px;
  text-transform: uppercase;
}
.progressive-card.is-maybe-state #progressive-brand {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-top: 4px;
  margin-bottom: 12px;
}
.progressive-card.is-maybe-state .progressive-message {
  font-size: 13px;
  font-weight: 600;
  color: #d97706;
  margin: 0 0 4px;
}
.progressive-card.is-maybe-state .progressive-reasoning {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}
.progressive-card.is-maybe-state .spinner-small {
  border-top-color: var(--fs-amber);
}

.maybe-status-strip {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 10px 8px;
  border-radius: 10px;
  background: #fffaf0;
}
.maybe-status-strip.hide { display: none; }
.maybe-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.maybe-status-label {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.maybe-status-value {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
}

.maybe-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 18px;
}
.maybe-chip-row.hide { display: none; }
.maybe-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #78350f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.maybe-loading-subtext {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}
.maybe-loading-subtext.hide { display: none; }

#progressive-dismiss-btn.is-maybe-cta {
  background: #fff;
  color: #92400e;
  border: 1.5px solid var(--fs-amber);
  font-weight: 600;
  height: 50px;
}
#progressive-dismiss-btn.is-maybe-cta:hover,
#progressive-dismiss-btn.is-maybe-cta:active {
  background: #fef3c7;
  border-color: #d97706;
  color: #78350f;
}

/* ─── PROBABLY state: green-themed evidence card (green variant of MAYBE) ─── */
/* Shared orb structure — both MAYBE and PROBABLY use the same base shape */
.maybe-orb-dot,
.probably-orb-dot {
  display: inline-block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  vertical-align: middle;
}
/* Gloss highlight — shared across both orbs */
.maybe-orb-dot::after,
.probably-orb-dot::after {
  content: '';
  position: absolute;
  top: 12%;
  left: 20%;
  width: 36%;
  height: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  pointer-events: none;
}
/* MAYBE orb — amber gradient */
.maybe-orb-dot {
  background: radial-gradient(circle at 38% 35%, #ffbf4a, #d97706);
}
/* PROBABLY orb — #2ecc69 main body, lighter top, darker edge */
.probably-orb-dot {
  background: radial-gradient(circle at 45% 30%, #80e8a8, #2ecc69 55%, #1aaa52);
}

/* Inline status icon (replaces emoji checkmarks in message text) */
.progressive-status-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 5px;
  line-height: 1;
}
.progressive-status-icon svg {
  display: block;
}
.progressive-card.is-probably-state .progressive-content {
  border-top: 8px solid #2ecc69;
}
.progressive-card.is-probably-state .progressive-verdict-badge.verdict-probably {
  background: #d1fae5;
  color: #065f46;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 6px 18px;
  text-transform: uppercase;
}
.progressive-card.is-probably-state #progressive-brand {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-top: 4px;
  margin-bottom: 12px;
}
.progressive-card.is-probably-state .progressive-message {
  font-size: 13px;
  font-weight: 600;
  color: #2ecc69;
  margin: 0 0 4px;
}
.progressive-card.is-probably-state .progressive-reasoning {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}
.progressive-card.is-probably-state .spinner-small {
  border-top-color: #2ecc69;
}
.progressive-card.is-probably-state .maybe-chip {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.progressive-card.is-probably-state .maybe-status-value {
  color: #065f46;
}
.progressive-card.is-probably-state .maybe-status-strip {
  background: #f0fdf4;
}

#progressive-dismiss-btn.is-probably-cta {
  background: #fff;
  color: #065f46;
  border: 1.5px solid #2ecc69;
  font-weight: 600;
  height: 50px;
}
#progressive-dismiss-btn.is-probably-cta:hover,
#progressive-dismiss-btn.is-probably-cta:active {
  background: #d1fae5;
  border-color: #2ecc69;
  color: #064e3b;
}

.progressive-progress {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.spinner-small {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--fs-emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

.progressive-progress p {
  font-size: 14px;
  color: #6b7280;
}

/* ─── Bulk Upload Mode ─── */
.scan-mode-grid-2x2 {
  grid-template-columns: 1fr 1fr;
}
.bulk-upload-card {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59,130,246,0.04) 0%, rgba(16,212,152,0.08) 100%);
}
.bulk-upload-card:active {
  border-color: #2563eb;
}
.bulk-upload-info {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  padding: 12px 16px;
  margin: 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
}
.bulk-upload-info p {
  margin: 0 0 6px;
}
.bulk-upload-info p:last-child {
  margin-bottom: 0;
}
.bulk-odd-warning {
  background: #fef3c7;
  border-left: 4px solid var(--fs-amber);
  padding: 10px 16px;
  margin: 8px 16px;
  font-size: 13px;
  color: #92400e;
  border-radius: 0 6px 6px 0;
}
.bulk-group-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.bulk-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bulk-group-num {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.bulk-single-badge {
  font-size: 11px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  padding: 2px 7px;
  font-weight: 600;
}
.bulk-thumbs-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.bulk-thumb-wrap {
  position: relative;
  flex: 1;
  max-width: 120px;
}
.bulk-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  display: block;
}
.bulk-thumb-label {
  display: block;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  margin-top: 3px;
  text-transform: uppercase;
}
.bulk-remove-photo-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bulk-group-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bulk-move-btn {
  font-size: 12px;
  padding: 5px 10px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  color: #374151;
}
.bulk-move-btn:active { background: #e5e7eb; }
.bulk-remove-group-btn {
  font-size: 12px;
  padding: 5px 10px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  cursor: pointer;
  color: #dc2626;
  margin-left: auto;
}
.bulk-remove-group-btn:active { background: #fecaca; }

/* Bulk progress rows */
.bulk-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  min-height: 52px;
  flex-wrap: wrap;
  gap: 6px;
}
.bulk-prog-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bulk-prog-item-num {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.bulk-prog-photo-count {
  font-size: 12px;
  color: #6b7280;
}
.bulk-prog-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bulk-status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
.bulk-status-queued    { background: #f3f4f6; color: #6b7280; }
.bulk-status-uploading { background: #dbeafe; color: #1d4ed8; }
.bulk-status-processing{ background: #fef3c7; color: #92400e; }
.bulk-status-completed { background: #d1fae5; color: #065f46; }
.bulk-status-failed    { background: #fee2e2; color: #dc2626; }
.bulk-result-link {
  font-size: 13px;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
}
.bulk-error-msg {
  font-size: 11px;
  color: #dc2626;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bulk-retry-btn {
  font-size: 12px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  color: #374151;
}
.bulk-retry-btn:active { background: #f3f4f6; }

/* Dev Mode diagnostic section — full-width third child of .bulk-progress-row (flex-wrap:wrap) */
.bulk-diag-full {
  width: 100%;
  padding: 6px 0 2px;
}
.bulk-diag-code {
  font-size: 11px;
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 8px 10px;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.5;
}
.bulk-diag-copy-btn {
  margin-top: 6px;
  font-size: 11px;
  padding: 4px 12px;
  background: #fff;
  border: 1px solid #6b7280;
  border-radius: 4px;
  cursor: pointer;
  color: #374151;
}
.bulk-diag-copy-btn:active { background: #f3f4f6; }

/* ─── Bulk Upload Persistent Queue (v150) ─── */
.bulk-action-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.btn-bulk-save {
  width: 100%;
  height: 50px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.btn-bulk-save.primary { background: var(--fs-emerald); color: #fff; }
.btn-bulk-save.secondary { background: #fff; color: var(--fs-deep-blue); border: 2px solid var(--fs-slate); }
.btn-bulk-save.ghost { background: #f3f4f6; color: #374151; }

.bulk-queue-count {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin: 8px 0 16px;
}
.bulk-queue-count strong { color: var(--fs-deep-blue); }

.bulk-queue-empty {
  text-align: center;
  color: #9ca3af;
  padding: 32px 20px;
  font-size: 15px;
}

.bulk-item-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.bulk-item-info { flex: 1; }
.bulk-item-title { font-size: 14px; font-weight: 600; color: #1f2937; }
.bulk-item-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.bulk-item-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bulk-pq-status-saved     { background: #e0f2fe; color: #0369a1; }
.bulk-pq-status-uploading { background: #fef3c7; color: #92400e; }
.bulk-pq-status-submitted { background: #f3f4f6; color: #6b7280; }
.bulk-pq-status-pending   { background: #fef9c3; color: #854d0e; }
.bulk-pq-status-ready     { background: #d1fae5; color: #065f46; }
.bulk-pq-status-failed    { background: #fee2e2; color: #991b1b; }

.bulk-delete-btn {
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
}
.bulk-delete-btn:active { color: var(--fs-red); }

.bulk-history-controls {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}
.bulk-history-label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.bulk-history-btn-row {
  display: flex;
  gap: 8px;
}
.bulk-secondary-btn {
  flex: 1;
  height: 38px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bulk-secondary-btn:active { background: #e5e7eb; }
.bulk-danger-btn {
  flex: 1;
  height: 38px;
  background: #fff;
  color: var(--fs-red);
  border: 1px solid rgba(244,67,54,0.4);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bulk-danger-btn:active { background: #fee2e2; }

.bulk-run-status {
  font-size: 14px;
  color: #374151;
  text-align: center;
  padding: 12px;
  background: #f0fdf4;
  border-radius: 8px;
  margin-bottom: 12px;
  display: none;
}


/* ── Billing / Checkout Modal ──────────────────────────────────────────────── */
.trial-plan-picker { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }

.btn-plan {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; padding: 14px 16px;
  background: #fff; border: 1.5px solid #d1d5db;
  border-radius: 10px; cursor: pointer;
  text-align: left; transition: border-color 0.15s, background 0.15s;
  position: relative; font-family: inherit;
}
.btn-plan:hover { border-color: var(--fs-emerald); background: #f0fdf9; }
.btn-plan:active { background: #e0faf3; }
.btn-plan .plan-name { font-size: 15px; font-weight: 700; color: #111; }
.btn-plan .plan-desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
.btn-plan .plan-quota { font-size: 13px; font-weight: 600; color: var(--fs-slate); margin-top: 4px; }
.btn-plan .plan-name { font-size: 15px; font-weight: 700; color: #111; display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
.btn-plan .plan-price { font-size: 16px; font-weight: 800; color: var(--fs-deep-blue); margin-left: auto; }
.btn-plan .plan-price-period { font-size: 11px; font-weight: 500; color: #6b7280; margin-left: 1px; }
.btn-plan .plan-badge {
  display: inline-block; margin: 3px 0 2px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--fs-emerald); color: #fff;
  padding: 2px 7px; border-radius: 4px;
}
.btn-plan-disabled {
  opacity: 0.52; cursor: not-allowed;
  background: #f9fafb !important; border-color: #e5e7eb !important;
}
.btn-plan-disabled .plan-badge {
  background: #9ca3af;
}

.trial-trust-note {
  font-size: 11px; color: #9ca3af; text-align: center;
  margin: 14px 0 0; line-height: 1.5;
  padding: 0 4px;
}
.trial-resubscribe-note {
  font-size: 13px; background: #fef3c7; color: #92400e;
  border: 1px solid #fbbf24; border-radius: 6px;
  padding: 10px 12px; margin-bottom: 4px; line-height: 1.5;
}
.checkout-error-alert {
  font-size: 13px; background: #fef2f2; color: #991b1b;
  border: 1px solid #fca5a5; border-radius: 6px;
  padding: 10px 12px; margin-bottom: 8px;
  }


/* Stage 4: profit-assumptions category fee override table */
.profit-cat-fee-list { display: flex; flex-direction: column; gap: 6px; }
.profit-cat-fee-row { display: flex; align-items: center; gap: 8px; }
.profit-cat-fee-label { flex: 1; font-size: 13px; color: #374151; }
.profit-cat-fee-admin { font-size: 11px; color: #9ca3af; white-space: nowrap; }
.profit-cat-fee-input { width: 72px; height: 32px; padding: 0 8px; font-size: 13px;
  border: 1px solid #d1d5db; border-radius: 6px; text-align: right; }
/* Stage 4: result breakdown assumptions block */
.bd-assumptions { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e5e7eb;
  font-size: 12px; color: #6b7280; }
.bd-assumptions .bd-assume-row { display: flex; justify-content: space-between; gap: 8px; }
