body.card-scan-body {
  min-height: 100svh;
}

.card-scan-body [hidden] {
  display: none !important;
}

.card-scan-shell {
  width: min(1280px, calc(100% - 2rem));
}

.card-scan-body .nav-links a.is-active {
  color: #173a63;
  border-color: rgba(80, 158, 255, 0.48);
  background: linear-gradient(135deg, rgba(235, 247, 255, 0.96), rgba(231, 255, 247, 0.86));
  box-shadow: 0 8px 22px rgba(76, 151, 229, 0.16);
}

.card-scan-hero {
  margin: 3.2rem 0 2rem;
  display: grid;
  gap: 0.8rem;
}

.card-scan-chip {
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-scan-title {
  font-family: var(--display-font);
  font-size: clamp(1.9rem, 4.8vw, 4.05rem);
  line-height: 0.94;
  letter-spacing: 0;
  color: #172a42;
}

.card-scan-title span {
  background: linear-gradient(120deg, #2f6eff 0%, #7c58ff 34%, #e676cf 64%, #f4af4d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card-scan-sub {
  max-width: 760px;
  color: #58718d;
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.7;
}

.card-scan-grid,
.scan-market-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  gap: 1.05rem;
  align-items: stretch;
}

.scan-market-layout {
  grid-template-columns: minmax(420px, 1.35fr) minmax(320px, 0.65fr);
  margin-top: 1.05rem;
}

.scan-dropzone,
.scan-result-panel,
.scan-price-panel,
.scan-matches-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(247, 252, 255, 0.58)),
    radial-gradient(circle at 18% 12%, rgba(88, 178, 255, 0.18), transparent 42%),
    radial-gradient(circle at 94% 90%, rgba(82, 231, 188, 0.16), transparent 44%);
  box-shadow: 0 22px 58px rgba(55, 88, 128, 0.13), inset 0 1px 0 rgba(255,255,255,0.82);
}

.scan-dropzone {
  min-height: 610px;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  outline: none;
  transition: min-height 280ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.scan-dropzone.has-preview {
  place-items: stretch;
  cursor: default;
}

.scan-dropzone.is-dragging {
  border-color: rgba(55, 155, 255, 0.72);
  box-shadow: 0 28px 74px rgba(67, 160, 255, 0.22), inset 0 0 0 1px rgba(70, 190, 255, 0.34);
}

.scan-drop-glow {
  position: absolute;
  inset: -30% -20% auto auto;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  background: conic-gradient(from 180deg, rgba(72, 194, 255, 0.0), rgba(72, 194, 255, 0.34), rgba(139, 108, 255, 0.22), rgba(72, 194, 255, 0.0));
  filter: blur(34px);
  opacity: 0.72;
  pointer-events: none;
}

.scan-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.scan-upload-copy {
  position: relative;
  z-index: 1;
  max-width: 460px;
  display: grid;
  justify-items: center;
  gap: 0.88rem;
  text-align: center;
  animation: scan-rise-in 420ms cubic-bezier(.2, .8, .2, 1) both;
}

.scan-upload-icon {
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 22px;
  color: #1d5f9f;
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(220,241,255,0.82));
  border: 1px solid rgba(145, 200, 255, 0.54);
  box-shadow: 0 16px 38px rgba(50, 128, 210, 0.17);
}

.scan-upload-icon iconify-icon {
  font-size: 2rem;
}

.scan-upload-copy h2,
.scan-result-panel h2,
.scan-section-head h2 {
  color: #1c3551;
  font-size: 1.28rem;
  line-height: 1.15;
}

.scan-upload-copy p,
.scan-empty-state p,
.scan-loading p {
  color: #58718d;
  font-weight: 750;
  line-height: 1.65;
}

.scan-primary-btn,
.scan-ghost-btn,
.scan-market-source-tabs button,
.scan-range-row button,
.scan-image-tabs button {
  border: 1px solid rgba(133, 190, 248, 0.65);
  background: rgba(255, 255, 255, 0.72);
  color: #23496e;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.scan-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.82rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(229, 244, 255, 0.94), rgba(218, 255, 246, 0.88));
  box-shadow: 0 14px 34px rgba(55, 150, 230, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.scan-primary-btn:hover,
.scan-primary-btn:focus-visible {
  border-color: rgba(69, 153, 255, 0.76);
  box-shadow: 0 16px 38px rgba(55, 150, 230, 0.2);
  transform: translateY(-1px);
}

.scan-upload-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  flex-wrap: wrap;
}

.scan-beta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.42rem 0.58rem;
  border: 1px solid rgba(132, 175, 218, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: #607b96;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.scan-beta-btn:hover,
.scan-beta-btn:focus-visible,
.scan-beta-btn[aria-expanded="true"] {
  color: #22486c;
  border-color: rgba(75, 154, 236, 0.56);
  background: rgba(236, 247, 255, 0.78);
}

.scan-beta-btn:focus-visible {
  outline: 2px solid rgba(72, 160, 255, 0.35);
  outline-offset: 3px;
}

.scan-beta-btn:hover {
  transform: translateY(-1px);
}

.scan-beta-btn iconify-icon {
  font-size: 0.86rem;
}

.scan-beta-panel {
  width: min(100%, 390px);
  display: grid;
  gap: 0.58rem;
  padding: 0.76rem;
  border: 1px solid rgba(135, 192, 250, 0.44);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 250, 255, 0.58)),
    radial-gradient(circle at 92% 10%, rgba(93, 207, 186, 0.14), transparent 44%);
  box-shadow: 0 12px 28px rgba(62, 118, 170, 0.09), inset 0 1px 0 rgba(255,255,255,0.72);
  text-align: left;
}

.scan-beta-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.scan-beta-title span {
  display: inline-flex;
  align-items: center;
  height: 1.4rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: rgba(32, 126, 211, 0.09);
  color: #28699f;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scan-beta-title strong {
  color: #223f5e;
  font-size: 0.9rem;
  font-weight: 950;
}

.scan-beta-panel p {
  margin: 0;
  color: #5a748e;
  font-size: 0.82rem;
  font-weight: 780;
  line-height: 1.5;
}

.scan-mode-toggle {
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  padding: 0.34rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 193, 249, 0.48);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.scan-mode-toggle button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.56rem 0.68rem;
  background: transparent;
  color: #53718f;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 950;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.scan-mode-toggle button.is-active {
  color: #173a63;
  border-color: rgba(69, 153, 255, 0.66);
  background: linear-gradient(135deg, rgba(230, 245, 255, 0.98), rgba(223, 255, 246, 0.88));
  box-shadow: 0 9px 20px rgba(58, 142, 220, 0.12);
}

.scan-mode-toggle iconify-icon {
  flex: none;
  font-size: 1.02rem;
}

.scan-beta-panel .scan-mode-toggle {
  width: 100%;
}

.scan-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.58rem 0.78rem;
  border-radius: 999px;
}

.scan-ghost-btn:disabled,
.scan-image-tabs button:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.scan-preview-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: 0.86rem;
  animation: scan-preview-in 420ms cubic-bezier(.2, .8, .2, 1) both;
}

.scan-preview-card {
  min-height: 520px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(156, 201, 245, 0.38);
  background:
    linear-gradient(145deg, rgba(16, 32, 50, 0.86), rgba(54, 72, 91, 0.78)),
    radial-gradient(circle at 50% 10%, rgba(255,255,255,0.18), transparent 50%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  overflow: hidden;
}

.scan-preview-card img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.22));
  animation: scan-image-settle 520ms cubic-bezier(.2, .8, .2, 1) both;
}

.scan-preview-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.scan-image-tabs,
.scan-market-source-tabs,
.scan-range-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

.scan-image-tabs button,
.scan-market-source-tabs button,
.scan-range-row button,
.scan-repick-btn {
  border-radius: 999px;
  padding: 0.46rem 0.72rem;
  font-size: 0.84rem;
}

.scan-repick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(133, 190, 248, 0.65);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(231, 255, 247, 0.68));
  color: #23496e;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(58, 142, 220, 0.1);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.scan-repick-btn:hover {
  border-color: rgba(69, 153, 255, 0.76);
  box-shadow: 0 13px 28px rgba(58, 142, 220, 0.14);
  transform: translateY(-1px);
}

.scan-image-tabs button.is-active,
.scan-market-source-tabs button.is-active,
.scan-range-row button.is-active {
  color: #16395c;
  border-color: rgba(69, 153, 255, 0.76);
  background: linear-gradient(135deg, rgba(230, 245, 255, 0.98), rgba(223, 255, 246, 0.86));
  box-shadow: 0 10px 24px rgba(58, 142, 220, 0.13);
}

.scan-range-row button:disabled {
  opacity: 0.52;
  cursor: wait;
}

.scan-result-panel,
.scan-price-panel,
.scan-matches-panel {
  padding: 1.25rem;
}

.scan-result-head,
.scan-section-head,
.scan-price-summary,
.scan-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.scan-result-head,
.scan-section-head {
  margin-bottom: 1rem;
}

.scan-kicker {
  display: block;
  color: #53718f;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scan-status {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  min-height: 2.25rem;
  color: #486684;
  font-weight: 850;
  padding: 0.64rem 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(151, 202, 255, 0.34);
  background: rgba(255,255,255,0.52);
}

.scan-status-dot {
  flex: none;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #63b8ff;
  box-shadow: 0 0 0 5px rgba(99, 184, 255, 0.13);
}

.scan-status.is-error .scan-status-dot {
  background: #ff765f;
  box-shadow: 0 0 0 5px rgba(255, 118, 95, 0.13);
}

.scan-status.is-ok .scan-status-dot {
  background: #22c49c;
  box-shadow: 0 0 0 5px rgba(34, 196, 156, 0.13);
}

.scan-multi-strip {
  margin-top: 0.78rem;
  display: grid;
  gap: 0.62rem;
}

.scan-multi-label {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: #496a8b;
  font-size: 0.82rem;
  font-weight: 900;
}

.scan-multi-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 0.72fr);
  gap: 0.62rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 0.12rem 0.44rem;
  scroll-snap-type: x proximity;
}

.scan-multi-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "thumb copy"
    "score copy";
  align-items: center;
  gap: 0.48rem 0.62rem;
  scroll-snap-align: start;
  border: 1px solid rgba(145, 200, 255, 0.38);
  border-radius: 16px;
  padding: 0.58rem;
  background: rgba(255, 255, 255, 0.58);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.scan-multi-card.is-active {
  border-color: rgba(67, 155, 255, 0.76);
  background: linear-gradient(135deg, rgba(235, 247, 255, 0.94), rgba(231, 255, 247, 0.74));
  box-shadow: 0 12px 26px rgba(50, 116, 180, 0.1);
}

.scan-multi-card:hover {
  border-color: rgba(67, 155, 255, 0.58);
  transform: translateY(-1px);
}

.scan-multi-thumb {
  grid-area: thumb;
  width: 50px;
  height: 68px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(28, 48, 70, 0.08);
}

.scan-multi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-multi-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  gap: 0.13rem;
}

.scan-multi-count,
.scan-multi-copy em,
.scan-multi-score {
  color: #617b98;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scan-multi-copy strong {
  min-width: 0;
  color: #1c3551;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.scan-multi-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-multi-score {
  grid-area: score;
  color: #1c5e9a;
  letter-spacing: 0;
  text-transform: none;
}

.scan-loading,
.scan-empty-state {
  margin-top: 1rem;
  min-height: 210px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 20px;
  border: 1px dashed rgba(125, 186, 246, 0.42);
  background: rgba(255,255,255,0.44);
  padding: 1.2rem;
}

.scan-loading {
  grid-template-columns: auto 1fr;
  place-items: center start;
  text-align: left;
  animation: scan-rise-in 260ms ease both;
}

.scan-loading strong {
  color: #1d3c5e;
}

.scan-empty-state iconify-icon {
  color: #4c8ccc;
  font-size: 2.2rem;
}

.scan-orbit {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 3px solid rgba(70, 159, 255, 0.18);
  border-top-color: #4aa4ff;
  animation: scan-spin 900ms linear infinite;
}

@keyframes scan-spin {
  to { transform: rotate(360deg); }
}

@keyframes scan-rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan-preview-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scan-image-settle {
  from {
    opacity: 0;
    transform: scale(0.972);
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.1));
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.22));
  }
}

@keyframes scan-tooltip-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 7px)) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 12px)) scale(1);
  }
}

.scan-card-detail {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  animation: scan-rise-in 360ms cubic-bezier(.2, .8, .2, 1) both;
}

.scan-card-main {
  justify-content: start;
  align-items: center;
  padding: 0.88rem;
  border-radius: 20px;
  border: 1px solid rgba(138, 193, 249, 0.42);
  background: rgba(255, 255, 255, 0.6);
}

.scan-card-main img {
  width: 96px;
  height: 134px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(21, 39, 59, 0.08);
  box-shadow: 0 12px 30px rgba(35, 75, 112, 0.17);
}

.scan-score-pill {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.45rem;
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  color: #17446f;
  background: rgba(213, 238, 255, 0.85);
  border: 1px solid rgba(92, 169, 246, 0.44);
  font-size: 0.78rem;
  font-weight: 900;
}

.scan-card-main h3 {
  color: #182d46;
  font-size: 1.3rem;
}

.scan-card-main p {
  color: #5a708a;
  font-weight: 800;
  line-height: 1.5;
}

.scan-market-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.scan-metric {
  padding: 0.72rem;
  border-radius: 16px;
  border: 1px solid rgba(145, 200, 255, 0.35);
  background: rgba(255, 255, 255, 0.52);
}

.scan-metric span {
  display: block;
  color: #627b98;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.scan-metric strong {
  display: block;
  margin-top: 0.22rem;
  color: #183456;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.scan-diagnostics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
  padding: 0.48rem;
  border-radius: 18px;
  border: 1px solid rgba(137, 192, 248, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(238, 251, 255, 0.48)),
    radial-gradient(circle at 96% 14%, rgba(117, 249, 228, 0.12), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
  animation: scan-rise-in 300ms ease both;
}

.scan-diagnostic {
  min-width: 0;
  padding: 0.42rem 0.48rem;
  border-radius: 13px;
  border: 1px solid rgba(145, 200, 255, 0.24);
  background: rgba(255, 255, 255, 0.48);
}

.scan-diagnostic span {
  display: block;
  color: #70869f;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scan-diagnostic strong {
  display: block;
  margin-top: 0.24rem;
  color: #183456;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.56rem;
}

.scan-result-actions a,
.scan-result-actions button {
  border: 1px solid rgba(132, 190, 248, 0.58);
  border-radius: 999px;
  padding: 0.6rem 0.78rem;
  background: rgba(255,255,255,0.68);
  color: #24496f;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.scan-result-actions a:hover,
.scan-result-actions button:hover {
  border-color: rgba(69, 153, 255, 0.76);
  box-shadow: 0 12px 26px rgba(55, 150, 230, 0.13);
  transform: translateY(-1px);
}

.scan-price-summary {
  margin-bottom: 0.9rem;
  padding: 0.78rem;
  border-radius: 18px;
  border: 1px solid rgba(146, 202, 255, 0.34);
  background: rgba(255, 255, 255, 0.54);
}

.scan-price-summary span {
  display: block;
  color: #66809b;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.scan-price-summary strong {
  display: block;
  margin-top: 0.18rem;
  color: #183456;
  font-size: 1.16rem;
}

.scan-chart-wrap {
  position: relative;
  min-height: 260px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(145, 200, 255, 0.34);
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 42px rgba(30, 88, 160, 0.12);
}

.scan-chart-wrap::before {
  content: none;
}

.scan-price-chart {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 260px;
  cursor: crosshair;
  touch-action: none;
}

.scan-chart-hover-layer {
  pointer-events: none;
}

.scan-chart-hit-area {
  cursor: crosshair;
}

.scan-chart-tooltip {
  z-index: 3;
  position: absolute;
  min-width: 112px;
  padding: 0.52rem 0.64rem;
  border-radius: 14px;
  border: 1px solid rgba(132, 190, 248, 0.46);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 14px 34px rgba(45, 86, 130, 0.18),
    0 0 26px rgba(241, 108, 255, 0.12);
  backdrop-filter: blur(16px);
  color: #183456;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  animation: scan-tooltip-in 140ms ease both;
}

.scan-chart-tooltip span,
.scan-chart-tooltip em {
  display: block;
  color: #667f9a;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.scan-chart-tooltip strong {
  display: block;
  margin-top: 0.16rem;
  color: #173454;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.1;
  white-space: nowrap;
}

.scan-chart-tooltip em {
  margin-top: 0.18rem;
  color: #7690aa;
  font-size: 0.6rem;
}

.scan-chart-note {
  z-index: 2;
  position: absolute;
  left: 1rem;
  bottom: 0.82rem;
  max-width: min(560px, calc(100% - 2rem));
  color: #4f6f91;
  font-weight: 850;
  font-size: 0.85rem;
  padding: 0.42rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(154, 205, 255, 0.34);
  box-shadow: 0 10px 24px rgba(70, 122, 180, 0.12);
  backdrop-filter: blur(12px);
  line-height: 1.35;
}

.scan-range-row {
  margin-top: 0.76rem;
}

.scan-condition-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
  margin-top: 0.76rem;
}

.scan-condition-row button {
  border: 1px solid rgba(133, 190, 248, 0.62);
  border-radius: 999px;
  padding: 0.44rem 0.64rem;
  background: rgba(255, 255, 255, 0.72);
  color: #23496e;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.scan-condition-row button.is-active {
  color: #16395c;
  border-color: rgba(69, 153, 255, 0.76);
  background: linear-gradient(135deg, rgba(230, 245, 255, 0.98), rgba(223, 255, 246, 0.86));
  box-shadow: 0 10px 24px rgba(58, 142, 220, 0.13);
}

.scan-condition-row button span {
  color: #6b8298;
  font-size: 0.72rem;
  margin-left: 0.2rem;
}

.scan-matches-list {
  display: grid;
  gap: 0.62rem;
}

.scan-match-empty,
.scan-match-card {
  border: 1px solid rgba(145, 200, 255, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.scan-match-empty {
  color: #5d7894;
  font-weight: 850;
  padding: 1rem;
}

.scan-match-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.72rem;
  align-items: center;
  text-align: left;
  padding: 0.64rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.scan-match-card.is-active {
  border-color: rgba(67, 155, 255, 0.74);
  background: linear-gradient(135deg, rgba(235, 247, 255, 0.92), rgba(231, 255, 247, 0.72));
}

.scan-match-card:hover {
  border-color: rgba(67, 155, 255, 0.58);
  box-shadow: 0 12px 28px rgba(50, 116, 180, 0.1);
  transform: translateY(-1px);
}

.scan-match-card img {
  width: 42px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(28, 48, 70, 0.08);
}

.scan-match-name {
  color: #1c3551;
  font-weight: 950;
  line-height: 1.25;
}

.scan-match-meta {
  color: #617b98;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 0.2rem;
}

.scan-match-score {
  color: #1c5e9a;
  font-weight: 950;
}

@media (max-width: 920px) {
  .card-scan-grid,
  .scan-market-layout {
    grid-template-columns: 1fr;
  }

  .card-scan-title {
    font-size: clamp(1.75rem, 8.6vw, 2.85rem);
  }

  .scan-dropzone {
    min-height: 480px;
  }

  .scan-preview-card {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .card-scan-shell {
    width: min(100% - 1rem, 1280px);
  }

  .card-scan-hero {
    margin-top: 2rem;
  }

  .scan-result-head,
  .scan-section-head,
  .scan-price-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-market-metrics {
    grid-template-columns: 1fr;
  }

  .scan-diagnostics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scan-loading {
    grid-template-columns: 1fr;
    text-align: center;
    place-items: center;
  }

  .scan-section-head h2 {
    font-size: clamp(1.12rem, 7vw, 1.58rem);
    line-height: 1.05;
  }

  .scan-kicker,
  .scan-price-summary span {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .scan-price-summary strong {
    font-size: clamp(1.22rem, 7vw, 1.72rem);
    line-height: 1.08;
  }

  .scan-chart-wrap {
    min-height: 0;
    border-radius: 18px;
  }

  .scan-price-chart {
    height: clamp(190px, 55vw, 230px);
    touch-action: pan-y;
  }

  .scan-chart-note {
    position: static;
    margin: 0.64rem 0.72rem 0.74rem;
    max-width: none;
    border-radius: 18px;
    font-size: clamp(0.68rem, 3.4vw, 0.8rem);
    line-height: 1.38;
    overflow-wrap: anywhere;
  }

  .scan-condition-row {
    gap: 0.38rem;
  }

  .scan-condition-row button {
    padding: 0.38rem 0.54rem;
    font-size: 0.74rem;
  }

  .scan-condition-row button span {
    font-size: 0.66rem;
  }
}
