:root {
  --obsidian: #090a0d;
  --obsidian-card: #12141a;
  --titanium-glass: rgba(24, 26, 32, 0.85);
  --titanium-border: rgba(255, 255, 255, 0.12);
  --electric-emerald: #00f5a0;
  --emerald-glow: rgba(0, 245, 160, 0.25);
  --warning-amber: #ffb800;
  --amber-glow: rgba(255, 184, 0, 0.25);
  --alert-coral: #ff4b4b;
  --coral-glow: rgba(255, 75, 75, 0.25);
  --silver-foil: #e6e8ed;
  --slate-muted: #7c8292;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

input, textarea, select, [contenteditable="true"] {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Cross-Platform Sleek Scrollbars (Windows PC, Mac, Linux, Android) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 245, 160, 0.4);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

body {
  background-color: var(--obsidian);
  color: var(--silver-foil);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Mobile Frame Container */
#app-container {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  max-height: 900px;
  background-color: var(--obsidian);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--titanium-border);
}

@media (max-width: 480px) {
  html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    inset: 0;
  }

  #app-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
}

@media (min-width: 481px) {
  #app-container {
    height: 92vh;
    border-radius: 36px;
  }
}

/* App Header */
header {
  height: calc(56px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  z-index: 10;
  background: linear-gradient(180deg, rgba(9, 10, 13, 0.9) 0%, transparent 100%);
  user-select: none;
  -webkit-user-select: none;
}

.brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--silver-foil);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--electric-emerald);
  box-shadow: 0 0 8px var(--electric-emerald);
}

.status-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  background-color: var(--titanium-glass);
  border: 1px solid var(--titanium-border);
  color: var(--electric-emerald);
}

/* Main Viewport */
main {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.tab-view {
  display: none;
  height: 100%;
  flex-direction: column;
  padding: 14px 20px 80px;
}

.tab-view.active {
  display: flex;
}

#view-hunter {
  position: relative;
  height: 100%;
  box-sizing: border-box;
}

#view-hunter.active,
#view-hunter.tab-view.active {
  position: absolute;
  inset: 0;
  display: flex !important;
  flex-direction: column;
  padding: 6px 10px 4px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 5;
}

body.tab-hunter-active main {
  overflow: hidden !important;
}

/* Mobile Keyboard Active Layout Optimizations (Maximum Chat & Typing Visibility) */
body.keyboard-open header,
#app-container:has(#detective-chat-input:focus) header {
  display: none !important;
}

body.keyboard-open nav,
#app-container:has(#detective-chat-input:focus) nav {
  display: none !important;
}

body.keyboard-open .detective-tools-dock,
#app-container:has(#detective-chat-input:focus) .detective-tools-dock {
  display: none !important;
}

body.keyboard-open .detective-templates-dock,
#app-container:has(#detective-chat-input:focus) .detective-templates-dock {
  display: none !important;
}

body.keyboard-open .detective-templates-accordion,
#app-container:has(#detective-chat-input:focus) .detective-templates-accordion {
  display: none !important;
}

body.keyboard-open .ai-disclaimer-note,
#app-container:has(#detective-chat-input:focus) .ai-disclaimer-note {
  display: none !important;
}

body.keyboard-open .detective-chat-header,
#app-container:has(#detective-chat-input:focus) .detective-chat-header {
  display: none !important;
}

body.keyboard-open #view-hunter.active,
body.keyboard-open #view-hunter.tab-view.active,
#app-container:has(#detective-chat-input:focus) #view-hunter.active,
#app-container:has(#detective-chat-input:focus) #view-hunter.tab-view.active {
  padding: 2px 6px 2px !important;
}

body.keyboard-open .detective-chat-stream,
#app-container:has(#detective-chat-input:focus) .detective-chat-stream {
  gap: 6px !important;
  padding: 2px 2px 4px !important;
}

body.keyboard-open .chat-bubble,
#app-container:has(#detective-chat-input:focus) .chat-bubble {
  padding: 6px 10px !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
  border-radius: 10px !important;
}

body.keyboard-open .detective-input-dock,
#app-container:has(#detective-chat-input:focus) .detective-input-dock {
  padding: 4px 6px !important;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  border-radius: 14px !important;
}

body.keyboard-open .detective-input-row,
#app-container:has(#detective-chat-input:focus) .detective-input-row {
  gap: 6px !important;
  align-items: flex-end !important;
}

body.keyboard-open .detective-chat-textarea,
#app-container:has(#detective-chat-input:focus) .detective-chat-textarea {
  min-height: 64px !important;
  max-height: 200px !important;
  padding: 10px 12px !important;
  font-size: 15px !important;
  line-height: 1.42 !important;
  border-radius: 12px !important;
}

body.keyboard-open .detective-btn-attach,
body.keyboard-open .detective-btn-send,
#app-container:has(#detective-chat-input:focus) .detective-btn-attach,
#app-container:has(#detective-chat-input:focus) .detective-btn-send {
  height: 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  border-radius: 10px !important;
  font-size: 17px !important;
}

body.keyboard-open .detective-btn-send .send-icon-svg,
#app-container:has(#detective-chat-input:focus) .detective-btn-send .send-icon-svg {
  width: 18px !important;
  height: 18px !important;
}

/* Collapsible Minimized-by-Default Ready-to-Send Script Accordion */
.chat-copy-accordion {
  margin-top: 8px;
  background: rgba(10, 16, 26, 0.9);
  border: 1px solid rgba(0, 245, 160, 0.35);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.chat-copy-accordion[open] {
  border-color: rgba(0, 245, 160, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 245, 160, 0.12);
}

.chat-copy-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.chat-copy-summary::-webkit-details-marker {
  display: none;
}

.copy-summary-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--electric-emerald);
  letter-spacing: 0.3px;
}

.copy-summary-toggle {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--electric-cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.28);
  padding: 2px 7px;
  border-radius: 8px;
}

.chat-copy-accordion[open] .copy-summary-toggle {
  color: var(--slate-muted);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.chat-copy-body {
  padding: 0 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

/* Compact Demand Challenge Pill (Low-profile, zero bloat) */
.btn-compact-demand {
  background: rgba(0, 245, 160, 0.12);
  border: 1px solid rgba(0, 245, 160, 0.45);
  color: var(--electric-emerald);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-compact-demand:hover {
  background: rgba(0, 245, 160, 0.22);
  border-color: var(--electric-emerald);
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.3);
}

/* Compact Inline Storefront & RDAP Audit Telemetry Strip */
.storefront-audit-strip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.storefront-audit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.storefront-domain-label {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  margin-right: auto;
  word-break: break-all;
}

.storefront-meta-pill {
  font-size: 9px;
  font-weight: 700;
  color: var(--silver-foil);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.storefront-audit-metrics {
  font-size: 10px;
  color: var(--slate-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Screen 1: LENS (Camera & Tilt) */
#view-lens {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.camera-feed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.lens-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 12px calc(65px + env(safe-area-inset-bottom, 8px));
  z-index: 5;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at center, transparent 38%, rgba(9, 10, 13, 0.90) 96%);
  gap: 6px;
  box-sizing: border-box;
}

.lens-overlay.results-active {
  overflow-y: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

.lens-hud-top {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  z-index: 12;
}

.viewfinder-center-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  width: 100%;
  flex-shrink: 0;
  touch-action: none;
  z-index: 8;
  margin: 4px auto 2px;
}

.viewfinder-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(240px, 78vw);
  margin: 0 auto 5px;
  flex-shrink: 0;
}

.lens-hud-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  z-index: 12;
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 10px;
}

/* Telemetry Chips (Lighting & Stability) */
.env-telemetry {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.telemetry-chip {
  background: rgba(9, 10, 13, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--titanium-border);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.telemetry-label {
  color: var(--slate-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.telemetry-val {
  color: var(--electric-emerald);
  font-weight: 700;
  margin-top: 1px;
}

.category-selector {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 4px;
}

.cat-pill {
  background: var(--obsidian-card);
  border: 1px solid var(--titanium-border);
  color: var(--slate-muted);
  font-size: 10px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-pill.active {
  background: rgba(0, 245, 160, 0.15);
  border-color: var(--electric-emerald);
  color: var(--electric-emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
}

/* Zoom Controls Pill Bar */
.zoom-controls-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 10;
}

.zoom-step-btn {
  background: rgba(18, 20, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--electric-cyan);
  font-size: 13px;
  font-weight: 800;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.15s ease;
  touch-action: manipulation;
  padding: 0;
  line-height: 1;
}

.zoom-step-btn:hover,
.zoom-step-btn:active {
  background: rgba(0, 245, 160, 0.25);
  border-color: var(--electric-emerald);
  color: #fff;
  transform: scale(0.92);
}

.zoom-pill {
  background: rgba(18, 20, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--silver-foil);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  min-width: 30px;
  text-align: center;
  touch-action: manipulation;
}

.zoom-pill:hover,
.zoom-pill:active {
  border-color: var(--electric-cyan);
  color: #ffffff;
}

.zoom-pill.active {
  background: rgba(0, 245, 160, 0.22);
  border-color: var(--electric-emerald);
  color: var(--electric-emerald);
  box-shadow: 0 0 8px rgba(0, 245, 160, 0.4);
}

/* Slab / Object Guide Reticle (Spacious, Adaptive Frame for All P2P Assets) */
.slab-reticle {
  width: min(340px, 88vw);
  height: clamp(260px, 38vh, 390px);
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.45);
  border-radius: 16px;
  touch-action: none;
  cursor: crosshair;
}

.slab-reticle.reticle-detected-flash {
  border-color: var(--electric-emerald) !important;
  box-shadow: 0 0 45px rgba(0, 245, 160, 0.95), inset 0 0 30px rgba(0, 245, 160, 0.35) !important;
  background: rgba(0, 245, 160, 0.15) !important;
  transition: all 0.1s ease-out !important;
}

.reticle-align-guide.reticle-guide-detected {
  color: var(--electric-emerald) !important;
  background: rgba(0, 245, 160, 0.25) !important;
  border-color: var(--electric-emerald) !important;
  font-weight: 800 !important;
  transform: translateX(-50%) scale(1.05);
}

.quick-asset-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--silver-foil);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.quick-asset-chip:hover,
.quick-asset-chip:active {
  background: rgba(0, 245, 160, 0.18);
  border-color: var(--electric-emerald);
  color: var(--electric-emerald);
}

/* --- DUAL SQUARISH ACTION CONSOLE & TELEMETRY STRIP --- */

.lens-telemetry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 3px;
  padding: 0 4px;
  box-sizing: border-box;
}

.telemetry-chip-side {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--slate-muted);
  background: rgba(18, 20, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 12px;
}

.telemetry-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.dot-blue {
  background: #4285f4;
  box-shadow: 0 0 6px rgba(66, 133, 244, 0.8);
}

.dot-emerald {
  background: var(--electric-emerald);
  box-shadow: 0 0 6px var(--emerald-glow);
}

.gyro-container-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.gyro-circle-compact {
  width: 38px;
  height: 38px;
  position: relative;
}

.gyro-svg-compact {
  width: 38px;
  height: 38px;
  transform: rotate(-90deg);
}

.gyro-text-compact {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dual Squarish Action Buttons Dock */
.lens-dual-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 4px;
}

.btn-action-squarish {
  flex: 1;
  min-width: 0;
  height: 72px;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-action-squarish:active {
  transform: scale(0.96);
}

/* Left: Auto-Identify Button */
.btn-lens-squarish {
  background: linear-gradient(145deg, rgba(16, 26, 48, 0.95) 0%, rgba(9, 14, 26, 0.98) 100%);
  border: 1.5px solid rgba(66, 133, 244, 0.65);
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-lens-squarish:hover {
  border-color: #4285f4;
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.35);
}

.btn-lens-squarish.is-scanning {
  border-color: #4285f4;
  animation: pulseBlueBorder 1.2s infinite ease-in-out;
}

@keyframes pulseBlueBorder {
  0%, 100% { box-shadow: 0 0 10px rgba(66, 133, 244, 0.3); }
  50% { box-shadow: 0 0 22px rgba(66, 133, 244, 0.7); }
}

/* Right: 5-Sec Challenge Button */
.btn-challenge-squarish {
  background: linear-gradient(145deg, rgba(0, 48, 28, 0.92) 0%, rgba(5, 22, 14, 0.98) 100%);
  border: 1.5px solid var(--electric-emerald);
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-challenge-squarish:hover {
  border-color: #00ffaa;
  box-shadow: 0 6px 20px rgba(0, 245, 160, 0.35);
}

.btn-challenge-squarish.is-scanning {
  border-color: #00ffaa;
  animation: pulseEmeraldBorder 1.2s infinite ease-in-out;
}

@keyframes pulseEmeraldBorder {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 245, 160, 0.3); }
  50% { box-shadow: 0 0 22px rgba(0, 245, 160, 0.7); }
}

/* Header & Body inside squarish buttons */
.squarish-btn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.squarish-btn-icon {
  font-size: 16px;
  line-height: 1;
}

.squarish-btn-chip {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 6px;
  text-transform: uppercase;
}

.chip-blue {
  background: rgba(66, 133, 244, 0.22);
  border: 1px solid rgba(66, 133, 244, 0.6);
  color: #8ab4f8;
}

.chip-emerald {
  background: rgba(0, 245, 160, 0.2);
  border: 1px solid var(--electric-emerald);
  color: var(--electric-emerald);
}

.squarish-btn-body {
  width: 100%;
}

.squarish-btn-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #ffffff;
  line-height: 1.2;
}

.btn-challenge-squarish .squarish-btn-title {
  color: var(--electric-emerald);
}

.squarish-btn-sub {
  font-size: 8.5px;
  font-weight: 600;
  color: var(--silver-foil);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- FLOATING INTERACTIVE ASSET DOSSIER SHEET --- */
.lens-floating-dossier {
  width: min(360px, 92vw);
  margin: 0 auto 6px;
  background: rgba(14, 18, 26, 0.96);
  border: 1.5px solid #4285F4;
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(66, 133, 244, 0.25);
  animation: slideUpDossier 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 20;
  box-sizing: border-box;
}

@keyframes slideUpDossier {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dossier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 7px;
  margin-bottom: 7px;
}

.dossier-badge-ai {
  font-size: 8px;
  font-weight: 800;
  color: var(--electric-emerald);
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid var(--electric-emerald);
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.dossier-price-tag {
  font-size: 10px;
  font-weight: 800;
  color: #8ab4f8;
  background: rgba(66, 133, 244, 0.18);
  border: 1px solid rgba(66, 133, 244, 0.5);
  padding: 1px 6px;
  border-radius: 6px;
}

.btn-dossier-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--slate-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: bold;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-dossier-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.dossier-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.dossier-meta-pill {
  font-size: 9.5px;
  color: var(--silver-foil);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dossier-tip-box {
  font-size: 9px;
  line-height: 1.35;
  color: var(--electric-cyan);
  background: rgba(0, 245, 160, 0.06);
  border-left: 2.5px solid var(--electric-cyan);
  border-radius: 0 6px 6px 0;
  padding: 4px 8px;
}

.dossier-actions-row {
  display: flex;
  gap: 6px;
}

.btn-dossier-action {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  border: none;
}

.btn-dossier-primary {
  background: linear-gradient(135deg, #00F5A0 0%, #00C980 100%);
  color: #090A0D;
}

.btn-dossier-primary:active {
  transform: scale(0.97);
}

.btn-dossier-secondary {
  background: rgba(66, 133, 244, 0.2);
  border: 1px solid rgba(66, 133, 244, 0.6);
  color: #8ab4f8;
}

.btn-dossier-secondary:active {
  transform: scale(0.97);
}

/* Precision Center Alignment Target Crosshairs */
.reticle-crosshair-h {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 1.5px;
  background: rgba(0, 245, 160, 0.65);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
}

.reticle-crosshair-v {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.5px;
  height: 28px;
  background: rgba(0, 245, 160, 0.65);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
}

.reticle-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--electric-cyan);
  box-shadow: 0 0 8px var(--electric-cyan);
  pointer-events: none;
  z-index: 3;
}

.reticle-zoom-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 10, 13, 0.88);
  border: 1px solid var(--electric-emerald);
  color: var(--electric-emerald);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 4;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.2s ease;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.35);
}

.reticle-align-guide {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  background: rgba(9, 10, 13, 0.65);
  padding: 2px 8px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* Dynamic Trajectory Guidance HUD Overlay */
.trajectory-hud {
  position: absolute;
  inset: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(9, 10, 13, 0.88);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  padding: 10px;
  z-index: 10;
  pointer-events: none;
  animation: fadeInHud 0.2s ease;
}

@keyframes fadeInHud {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.trajectory-step-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--electric-cyan);
  background: rgba(0, 255, 204, 0.15);
  border: 1px solid var(--electric-cyan);
  border-radius: 12px;
  padding: 2px 8px;
  margin-bottom: 4px;
}

.trajectory-arrow {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 10px var(--electric-emerald));
  transition: transform 0.2s ease;
}

.trajectory-guide-text {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.trajectory-bar-track {
  width: 82%;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.trajectory-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--electric-cyan), var(--electric-emerald));
  border-radius: 4px;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 8px var(--electric-emerald);
}

.reticle-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3.5px solid var(--electric-emerald);
  transition: all 0.3s ease;
}

.corner-tl { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 14px; }
.corner-tr { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: 14px; }
.corner-bl { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: 14px; }
.corner-br { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 14px; }

/* Gyro Gauge (Integrated Compact Console) */
.gyro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px auto 0;
  cursor: pointer;
  flex-shrink: 0;
}

.gyro-circle {
  width: 52px;
  height: 52px;
  position: relative;
}

.gyro-svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.gyro-bg {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 5;
}

.gyro-bar {
  stroke: var(--electric-emerald);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
  filter: drop-shadow(0 0 6px var(--emerald-glow));
}

.gyro-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gyro-percent {
  font-size: 11px;
  font-weight: 800;
  color: var(--silver-foil);
}

.gyro-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--slate-muted);
}

.lens-controls {
  margin-top: 4px;
  width: 100%;
  flex-shrink: 0;
}

.btn-primary {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: var(--electric-emerald);
  color: var(--obsidian);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  background: transparent;
  color: var(--silver-foil);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  border: 1px solid var(--titanium-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Confidence Badges */
.confidence-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.confidence-badge.tier-1 {
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid var(--electric-emerald);
  color: var(--electric-emerald);
}

.confidence-badge.tier-2 {
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid var(--warning-amber);
  color: var(--warning-amber);
}

.confidence-badge.tier-3 {
  background: rgba(255, 152, 0, 0.15);
  border: 1px solid #ff9800;
  color: #ff9800;
}

.confidence-badge.tier-4 {
  background: rgba(255, 75, 75, 0.15);
  border: 1px solid var(--alert-coral);
  color: var(--alert-coral);
}

/* Screen 2: P2PTAG (Option A: Spatial Holographic Plaque — Apple visionOS aesthetic) */
.card-stage {
  perspective: 1400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 8px 0 14px;
  touch-action: none;
  width: 100%;
}

.spatial-plaque-scene {
  width: min(340px, 92vw);
  height: min(450px, 62vh);
  position: relative;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.spatial-plaque {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(18, 22, 30, 0.94) 35%, rgba(8, 10, 14, 0.98) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
  cursor: grab;
  touch-action: none;
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.92),
    0 12px 24px rgba(0, 0, 0, 0.7),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(0, 245, 160, 0.22);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.spatial-plaque:active {
  cursor: grabbing;
}

/* Plaque Top Titanium Rail */
.p2ptag-dual-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.p2ptag-dual-actions button {
  flex: 1;
  min-width: 0;
  height: 44px;
  font-size: 11px;
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.p2ptag-dual-actions button:active {
  transform: scale(0.97);
}

.spatial-plaque-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateZ(10px);
  flex-shrink: 0;
}

.spatial-plaque-tag {
  font-size: 9px;
  font-weight: 800;
  color: var(--electric-emerald);
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.spatial-plaque-cert {
  font-size: 8.5px;
  font-family: monospace;
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid var(--electric-emerald);
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* Plaque Hero Visual Stage: 100% Unobstructed, Edge-to-Edge Spatial Float */
.spatial-photo-frame {
  flex: 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin: 8px 0;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(24px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.8);
}

.spatial-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  transition: opacity 0.28s ease, transform 0.2s ease;
}

/* Dynamic Spatial Glare / Sheen that sweeps across the plaque following finger drag */
.spatial-specular-glare {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.24) 0%, rgba(0, 245, 160, 0.08) 40%, transparent 70%);
  mix-blend-mode: overlay;
  transform: translateZ(30px);
  transition: background 0.1s ease;
}

/* Plaque Bottom Metadata Dock */
.spatial-plaque-dock {
  background: rgba(5, 7, 10, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 6px 10px;
  transform: translateZ(12px);
  flex-shrink: 0;
}

.spatial-dock-title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spatial-dock-sub {
  font-size: 9px;
  color: var(--electric-emerald);
  font-weight: 700;
  margin: 2px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Predictive Smart Auto-Complete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(8, 10, 14, 0.98);
  border: 1px solid var(--electric-emerald);
  border-radius: 8px;
  max-height: 190px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 245, 160, 0.2);
  backdrop-filter: blur(12px);
  display: none;
}

.autocomplete-item {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item:active {
  background: rgba(0, 245, 160, 0.15);
}

.autocomplete-item-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 6px;
}

.autocomplete-item-tag {
  font-size: 8px;
  font-weight: 800;
  color: var(--electric-cyan);
  background: rgba(0, 255, 204, 0.12);
  border: 1px solid rgba(0, 255, 204, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}
}

.card-art {
  height: 236px;
  margin: 8px;
  background: rgba(10, 12, 16, 0.75);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7);
}

.holo-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.22) 45%,
    rgba(0, 245, 160, 0.18) 52%,
    rgba(255, 255, 255, 0.06) 60%,
    transparent 80%
  );
  opacity: 0.75;
  mix-blend-mode: overlay;
}

/* Verification Metrics Box */
.metrics-card {
  background: var(--titanium-glass);
  border: 1px solid rgba(0, 245, 160, 0.4);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 0 15px rgba(0, 245, 160, 0.08);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--titanium-border);
}

.metric-title {
  color: var(--electric-emerald);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 5px;
}

.metric-val {
  font-family: monospace;
  font-weight: 700;
  color: var(--electric-emerald);
}

/* Screen 3: HUNTER */
.radar-box {
  background: var(--titanium-glass);
  border: 1px solid var(--titanium-border);
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  margin-bottom: 14px;
}

.hunter-preset-group {
  transition: opacity 0.2s ease;
}

.radar-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.radar-actions button {
  flex: 1;
}

.radar-result {
  background: var(--titanium-glass);
  border-radius: 16px;
  padding: 14px;
  border: 1.5px solid rgba(0, 245, 160, 0.4);
  box-shadow: 0 0 15px rgba(0, 245, 160, 0.15);
  margin-bottom: 14px;
  display: block;
  transition: all 0.3s ease;
}

.radar-result.fraud {
  border-color: var(--alert-coral);
  box-shadow: 0 0 20px var(--coral-glow);
}

.radar-result.clean {
  border-color: var(--electric-emerald);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.radar-result.ambient {
  border-color: var(--warning-amber);
  box-shadow: 0 0 20px var(--amber-glow);
}

/* Screen 4: Q&A KNOWLEDGE BASE */
.qa-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-card {
  background: var(--titanium-glass);
  border: 1px solid var(--titanium-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.qa-card.active {
  border-color: var(--electric-emerald);
}

.qa-question {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--silver-foil);
}

.qa-toggle {
  font-size: 16px;
  color: var(--electric-emerald);
  transition: transform 0.2s ease;
}

.qa-card.active .qa-toggle {
  transform: rotate(45deg);
}

.qa-answer {
  display: none;
  padding: 0 14px 14px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--slate-muted);
}

.qa-card.active .qa-answer {
  display: block;
}

/* Bottom Navigation Bar */
nav {
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(14px + env(safe-area-inset-right, 0px));
  background-color: var(--obsidian-card);
  border-top: 1px solid var(--titanium-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-item {
  flex: 1;
  min-width: 0;
  max-width: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--slate-muted);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
  padding: 4px 1px;
  box-sizing: border-box;
  text-align: center;
}

.nav-item span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-item.active {
  color: var(--electric-emerald);
}

.nav-item svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex-shrink: 0;
}


/* Modal Overlay & Bottom Sheet */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-card {
  width: 100%;
  background: var(--titanium-glass);
  border-top: 1px solid var(--titanium-border);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8), 0 0 20px var(--emerald-glow);
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* --- P2PCAPTCHA & AI DETECTIVE STYLES --- */

.captcha-setup-card {
  background: rgba(18, 20, 26, 0.92);
  border: 1px solid var(--titanium-border);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 2px;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.captcha-input-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.captcha-text-input {
  flex: 1;
  background: rgba(9, 10, 13, 0.85);
  border: 1px solid var(--titanium-border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--silver-foil);
  outline: none;
  transition: border-color 0.2s;
}

.captcha-text-input::placeholder {
  color: rgba(148, 163, 184, 0.6);
  font-weight: 500;
}

.captcha-text-input:focus {
  border-color: var(--electric-emerald);
}

.challenge-prompt-banner {
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.15) 0%, rgba(0, 201, 128, 0.05) 100%);
  border: 1.5px solid var(--electric-emerald);
  border-radius: 10px;
  padding: 7px 10px;
  text-align: center;
  margin-bottom: 2px;
  animation: pulseEmerald 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseEmerald {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 245, 160, 0.15); }
  50% { box-shadow: 0 0 20px rgba(0, 245, 160, 0.35); }
}

.challenge-prompt-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--electric-emerald);
  letter-spacing: 0.5px;
}

.challenge-prompt-sub {
  font-size: 10px;
  color: var(--silver-foil);
  margin-top: 3px;
}

/* Detective View & Interactive AI Chat Styles */
.detective-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 0;
}

.detective-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding: 0 2px;
  flex-shrink: 0;
}

/* Sleek Collapsible Template Examples & Scripts Dock */
.detective-templates-dock {
  flex-shrink: 0;
  margin-bottom: 6px;
  position: relative;
  z-index: 10;
}

.btn-templates-toggle {
  width: 100%;
  background: rgba(18, 22, 32, 0.95);
  border: 1px solid var(--titanium-border);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--silver-foil);
  font-size: 10.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-templates-toggle:hover,
.btn-templates-toggle:active {
  border-color: var(--electric-cyan);
  background: rgba(22, 28, 42, 0.95);
}

.templates-toggle-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
}

.templates-toggle-bulb {
  font-size: 13px;
}

.templates-toggle-text {
  font-weight: 700;
  color: var(--electric-cyan);
  letter-spacing: 0.2px;
}

.templates-toggle-arrow {
  font-size: 11px;
  color: var(--slate-muted);
  transition: transform 0.2s ease;
}

.detective-templates-accordion {
  background: rgba(12, 15, 22, 0.98);
  border: 1px solid var(--titanium-border);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 10px;
  margin-top: -3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.2s ease;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.templates-intro-text {
  font-size: 10px;
  color: var(--slate-muted);
  margin-bottom: 8px;
  line-height: 1.35;
}

.templates-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.template-item-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.template-item-btn:hover,
.template-item-btn:active {
  background: rgba(0, 245, 160, 0.08);
  border-color: var(--electric-emerald);
  transform: translateX(2px);
}

.tpl-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.tpl-content {
  flex: 1;
  min-width: 0;
}

.tpl-title {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-sub {
  font-size: 9.5px;
  color: var(--slate-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detective-chat-stream {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 6px;
  -webkit-overflow-scrolling: touch;
}

.chat-bubble {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 11.5px;
  line-height: 1.45;
  animation: fadeIn 0.2s ease;
  word-break: break-word;
}

.chat-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 245, 160, 0.18), rgba(0, 255, 204, 0.12));
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-agent {
  align-self: flex-start;
  background: rgba(18, 20, 26, 0.95);
  border: 1px solid var(--titanium-border);
  color: var(--silver-foil);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.chat-agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-copy-box {
  background: rgba(10, 16, 26, 0.95);
  border: 1.5px solid rgba(0, 245, 160, 0.45);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 245, 160, 0.12);
}

.copy-box-header {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 6px;
}

.copy-box-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--electric-emerald);
  letter-spacing: 0.5px;
}

.copy-box-hint {
  font-size: 9px;
  color: var(--slate-muted);
}

.copy-box-text {
  font-size: 11.5px;
  color: #ffffff;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--electric-cyan);
  border-radius: 4px;
  padding: 7px 10px;
  font-style: italic;
  margin-bottom: 8px;
  word-break: break-word;
}

.btn-copy-reply {
  width: 100%;
  background: rgba(0, 245, 160, 0.16);
  border: 1px solid var(--electric-emerald);
  color: var(--electric-emerald);
  font-size: 10.5px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-copy-reply:active,
.btn-copy-reply.copied {
  background: var(--electric-emerald) !important;
  color: #05070a !important;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.6);
}

.detective-input-dock {
  flex-shrink: 0;
  background: rgba(14, 16, 22, 0.98);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 8px 10px;
  margin-top: 6px;
  margin-bottom: 2px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 245, 160, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detective-input-dock:focus-within {
  border-color: var(--electric-emerald);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(0, 245, 160, 0.25);
}

.detective-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 12px;
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--electric-emerald);
  font-weight: 700;
}

.detective-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.detective-chat-textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  outline: none;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.42;
  resize: none;
  max-height: 200px;
  min-height: 64px;
  padding: 10px 12px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  user-select: text !important;
  -webkit-user-select: text !important;
  -webkit-tap-highlight-color: transparent;
  cursor: text;
}

.detective-chat-textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 245, 160, 0.65);
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.25);
}

.detective-chat-textarea::placeholder {
  color: var(--slate-muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.detective-btn-attach {
  background: rgba(66, 133, 244, 0.2);
  border: 1.5px solid #4285f4;
  border-radius: 12px;
  color: #ffffff;
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.25);
  box-sizing: border-box;
}

.detective-btn-attach:active {
  transform: scale(0.93);
  background: rgba(66, 133, 244, 0.4);
}

.detective-btn-send {
  background: linear-gradient(135deg, #00f5a0 0%, #00d9f5 100%);
  border: none;
  border-radius: 12px;
  color: #05070a;
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 245, 160, 0.35);
  box-sizing: border-box;
}

.detective-btn-send .send-icon-svg {
  width: 21px;
  height: 21px;
  fill: #05070a;
  transform: translate(1px, 0);
  transition: transform 0.15s ease;
}

.detective-btn-send:hover .send-icon-svg {
  transform: translate(2px, -1px);
}

.detective-btn-send:active {
  transform: scale(0.93);
  filter: brightness(1.15);
}

.ai-disclaimer-note {
  text-align: center;
  font-size: 10px;
  color: var(--slate-muted);
  margin-top: 6px;
  margin-bottom: 2px;
  line-height: 1.35;
  letter-spacing: 0.1px;
  user-select: none;
  opacity: 0.8;
}

.audit-result-card {
  background: var(--obsidian-card);
  border: 1.5px solid var(--titanium-border);
  border-radius: 14px;
  padding: 14px 12px;
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

.risk-meter-container {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin: 8px 0 12px 0;
}

.risk-meter-bar {
  height: 100%;
  width: 0%;
  background: var(--electric-emerald);
  transition: width 0.6s cubic-bezier(0.1, 0.9, 0.2, 1), background 0.3s;
}

.factor-card {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--alert-coral);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11px;
}

.factor-card.medium {
  border-left-color: var(--warning-amber);
}

.factor-card.low {
  border-left-color: var(--electric-emerald);
}

/* Steganography Tools */
.stego-tool-panel {
  background: rgba(18, 20, 26, 0.85);
  border: 1px solid var(--titanium-border);
  border-radius: 14px;
  padding: 14px;
  margin-top: 14px;
}

.badge-copy-container {
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed var(--electric-emerald);
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  font-family: monospace;
  font-size: 10px;
  color: var(--silver-foil);
  word-break: break-all;
  user-select: text;
}

/* --- RETAIL BARCODE SCANNER HUD & LASER STYLING --- */
.barcode-laser-line {
  position: absolute;
  top: 10%;
  left: 4%;
  right: 4%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--electric-emerald), #fff, var(--electric-emerald), transparent);
  box-shadow: 0 0 10px var(--electric-emerald), 0 0 20px var(--electric-emerald);
  animation: barcodeLaserSweep 1.8s ease-in-out infinite alternate;
}

@keyframes barcodeLaserSweep {
  0% { top: 15%; opacity: 0.6; }
  50% { opacity: 1; }
  100% { top: 85%; opacity: 0.6; }
}

.barcode-sample-btn {
  background: rgba(18, 20, 26, 0.9);
  border: 1px solid var(--titanium-border);
  color: var(--silver-foil);
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.barcode-sample-btn:hover,
.barcode-sample-btn:active {
  border-color: var(--electric-emerald);
  background: rgba(0, 245, 160, 0.15);
  color: #fff;
}



/* ==========================================================================
   P2P SCAM DEFENSE & LIVE THREAT RADAR SUITE (STANDARDS / INTEL TAB)
   ========================================================================== */
.intel-header-card {
  margin-bottom: 12px;
}
.intel-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 245, 160, 0.12);
  border: 1px solid var(--electric-emerald);
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--electric-emerald);
  letter-spacing: 0.5px;
}
.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--electric-emerald);
  box-shadow: 0 0 8px var(--electric-emerald);
  animation: pulseBeacon 1.4s ease-in-out infinite;
}
@keyframes pulseBeacon {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.intel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.intel-kpi-cell {
  background: var(--titanium-glass);
  border: 1px solid var(--titanium-border);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi-label {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--slate-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.kpi-value {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.kpi-sub {
  font-size: 8.5px;
  color: var(--electric-emerald);
}

.intel-section-card {
  background: var(--titanium-glass);
  border: 1px solid var(--titanium-border);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 14px;
}
.intel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.intel-card-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--silver-foil);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.intel-platform-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.intel-platform-chips::-webkit-scrollbar {
  display: none;
}
.intel-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--silver-foil);
  font-size: 9.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.intel-chip.active {
  background: rgba(0, 245, 160, 0.2);
  border-color: var(--electric-emerald);
  color: var(--electric-emerald);
}

/* SVG Chart */
.chart-container {
  width: 100%;
  height: 120px;
  position: relative;
  margin: 6px 0 4px 0;
}
.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 8.5px;
  color: var(--slate-muted);
  margin-top: 4px;
}

/* Payment Risk Meters */
.risk-meter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.risk-meter-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.risk-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
}
.risk-meter-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}
.risk-meter-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interactive Deal Auditor */
.auditor-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.auditor-select {
  width: 100%;
  background: rgba(18, 20, 26, 0.95);
  border: 1px solid var(--titanium-border);
  color: #fff;
  font-size: 11px;
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
}
.auditor-select:focus {
  border-color: var(--electric-emerald);
}
.auditor-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 10px 0;
}
.auditor-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10px;
  color: var(--silver-foil);
  line-height: 1.35;
  cursor: pointer;
}
.auditor-check-item input[type="checkbox"] {
  accent-color: var(--electric-emerald);
  margin-top: 2px;
  cursor: pointer;
}

.auditor-result-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid var(--titanium-border);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  display: none;
}
.auditor-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.auditor-score-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Incident Cards Stream */
.incident-search-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--titanium-border);
  color: #fff;
  font-size: 10.5px;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  outline: none;
}
.incident-search-bar:focus {
  border-color: var(--electric-cyan);
}
.incident-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.incident-card {
  background: rgba(18, 20, 26, 0.9);
  border: 1px solid var(--titanium-border);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s ease;
}
.incident-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}
.incident-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.incident-platform-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.incident-time {
  font-size: 8.5px;
  color: var(--slate-muted);
}
.incident-title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}
.incident-desc {
  font-size: 10px;
  color: var(--silver-foil);
  line-height: 1.4;
}
.incident-redflag-box {
  background: rgba(255, 75, 75, 0.08);
  border-left: 2px solid var(--alert-coral);
  padding: 6px 8px;
  font-size: 9.5px;
  color: var(--silver-foil);
  line-height: 1.35;
  border-radius: 0 6px 6px 0;
  margin-top: 2px;
}
.incident-defense-box {
  background: rgba(0, 245, 160, 0.08);
  border-left: 2px solid var(--electric-emerald);
  padding: 6px 8px;
  font-size: 9.5px;
  color: var(--silver-foil);
  line-height: 1.35;
  border-radius: 0 6px 6px 0;
}

.incident-expand-details {
  margin-top: 3px;
}
.incident-expand-details summary {
  font-size: 9px;
  font-weight: 700;
  color: var(--electric-cyan);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
}
.incident-expand-details summary::-webkit-details-marker {
  display: none;
}
.incident-expand-content {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.incident-source-link {
  font-size: 9px;
  color: var(--electric-emerald);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.incident-source-link:hover {
  text-decoration: underline;
}
