/* ============================================================
   SCANDEX — holo-foil trading terminal
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-2: #0b111d;
  --panel: #0d1522;
  --panel-2: #111a2a;
  --line: #1c2740;
  --line-2: #263452;
  --ink: #e8eef7;
  --muted: #8a97ab;
  --dim: #5a6678;
  --under: #3ee58f;
  --over: #ff5c7a;
  --fair: #9aa7bc;
  --gold: #ffd166;
  --holo: linear-gradient(115deg, #59f3d8 0%, #6ea8ff 30%, #c77dff 62%, #ffd166 100%);
  --font-disp: 'Unbounded', sans-serif;
  --font-body: 'Schibsted Grotesk', sans-serif;
  --font-mono: 'Martian Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-color: #26344f var(--bg); }

body {
  background:
    radial-gradient(1100px 500px at 70% -10%, rgba(110, 168, 255, 0.09), transparent 60%),
    radial-gradient(900px 480px at 10% 0%, rgba(89, 243, 216, 0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* fine grid texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(110, 168, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 168, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

.grain {
  position: fixed; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 50;
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

main { position: relative; z-index: 1; max-width: 1720px; margin: 0 auto; padding: 0 28px; }

button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ============ FX ticker ============ */
.ticker {
  position: relative; z-index: 1;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.85);
  overflow: hidden;
  height: 30px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.ticker__track {
  display: inline-flex; gap: 48px;
  white-space: nowrap;
  line-height: 30px;
  padding-left: 100%;
  animation: tick 40s linear infinite;
}
@keyframes tick { to { transform: translateX(-100%); } }
.ticker b { color: var(--ink); font-weight: 400; }
.ticker .up { color: var(--under); }

/* ============ masthead ============ */
.masthead {
  position: relative; z-index: 1;
  text-align: center;
  padding: 56px 20px 8px;
}
.masthead__brand {
  display: inline-flex; align-items: center; gap: 18px;
  cursor: pointer;
}
.masthead__orb {
  width: 34px; height: 34px; border-radius: 50%;
  background:
    linear-gradient(180deg, transparent 44%, var(--bg) 44%, var(--bg) 56%, transparent 56%),
    conic-gradient(from 200deg, #59f3d8, #6ea8ff, #c77dff, #ffd166, #59f3d8);
  box-shadow: 0 0 24px rgba(110, 168, 255, 0.5), inset 0 0 6px rgba(0,0,0,0.6);
  position: relative;
  animation: orbspin 14s linear infinite;
}
.masthead__orb::after {
  content: ''; position: absolute; inset: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--ink);
}
@keyframes orbspin { to { transform: rotate(360deg); } }

.masthead__word {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: 0.02em;
  background: var(--holo);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 7s ease-in-out infinite;
}
.masthead__word em { font-style: normal; font-weight: 400; }
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.masthead__tag {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ============ search ============ */
.search { padding: 34px 0 10px; max-width: 760px; margin: 0 auto; }
.search__box {
  display: flex; align-items: center;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 6px 6px 6px 20px;
  gap: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search__box:focus-within {
  border-color: #6ea8ff;
  box-shadow: 0 0 0 1px #6ea8ff44, 0 8px 40px -12px rgba(110, 168, 255, 0.35);
}
.search__ball { width: 22px; height: 22px; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(110, 168, 255, 0.45)); }
.search__box { position: relative; }

/* autocomplete dropdown */
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  z-index: 30;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.85);
}
.suggest__item {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%;
  padding: 10px 18px;
  background: none; border: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}
.suggest__item b { font-weight: 700; color: #59f3d8; }
.suggest__item .suggest__tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--dim);
}
.suggest__item:hover, .suggest__item.on { background: #182338; }
.suggest__item.on .suggest__tag { color: #6ea8ff; }
.search__input {
  flex: 1;
  background: none; border: none; outline: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  padding: 12px 0;
}
.search__input::placeholder { color: #4d5b72; }
.search__go {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #071018;
  background: var(--holo);
  background-size: 200% 100%;
  border: none;
  border-radius: 9px;
  padding: 13px 26px;
  transition: transform 0.15s ease, box-shadow 0.2s;
  animation: sheen 7s ease-in-out infinite;
}
.search__go:hover { transform: translateY(-1px); box-shadow: 0 6px 26px -8px rgba(110, 168, 255, 0.7); }
.search__go:active { transform: translateY(0); }

.search__chips {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.chips-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; color: var(--dim, #5a6678); }
.langtoggle {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  margin-right: 6px;
}
.langtoggle__btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  transition: all 0.15s;
}
.langtoggle__btn.on {
  background: var(--holo);
  color: #071018;
  font-weight: 600;
}
.chip {
  background: none;
  border: 1px solid var(--line-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  transition: all 0.18s;
}
.chip:hover { border-color: #59f3d8; color: #59f3d8; }

/* ============ home / landing ============ */
.home { max-width: 1100px; margin: 0 auto; padding-bottom: 70px; }

.hot__rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.hot__rail .skel { border: 1px solid var(--line); border-radius: 12px; grid-template-columns: 1fr; }

.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}
.how__step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px 20px;
  overflow: hidden;
}
.how__step::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--holo);
  background-size: 300% 100%;
  animation: sheen 7s ease-in-out infinite;
}
.how__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #59f3d8;
}
.how__title {
  font-family: var(--font-disp);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-top: 10px;
}
.how__text { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.55; }

.feats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.feat i { font-style: normal; color: var(--gold); margin-right: 6px; font-size: 8px; }

@media (max-width: 900px) {
  .hot__rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how { grid-template-columns: 1fr; }
}

/* ============ section heads ============ */
.section-head {
  display: flex; align-items: baseline; gap: 16px;
  margin: 34px 0 18px;
}
.section-head__title {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.section-head__meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }

/* ============ picker grid ============ */
.picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 18px;
  padding-bottom: 50px;
}
.pick {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: rise 0.45s ease forwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pick:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8), 0 0 0 1px #6ea8ff33;
}
.pick::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.09) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.pick:hover::after { transform: translateX(120%); }
.pick img { width: 100%; border-radius: 6px; display: block; background: var(--bg-2); aspect-ratio: 63/88; object-fit: contain; }
.pick__name { font-weight: 700; font-size: 13.5px; margin-top: 9px; line-height: 1.25; }
.pick__set { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.pick__row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.pick__num { font-family: var(--font-mono); font-size: 9.5px; color: var(--dim, #5a6678); letter-spacing: 0.05em; }
.pick__price { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }

/* ============ scanner layout ============ */
.scanbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0 6px;
}
.backlink {
  background: none; border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  padding: 0;
  transition: color 0.15s;
}
.backlink:hover { color: #59f3d8; }
.scanagain {
  background: none;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  border-radius: 7px;
  padding: 6px 13px;
  display: inline-flex;
  align-items: center;
  transition: all 0.18s;
}
.scanagain:hover { border-color: #59f3d8; color: #59f3d8; }
.scanagain__icon { display: inline-block; font-size: 12px; }
.scanagain.spin { pointer-events: none; opacity: 0.75; }
.scanagain.spin .scanagain__icon { animation: spinrot 0.9s linear infinite; }
@keyframes spinrot { to { transform: rotate(360deg); } }

.scanner__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 26px;
  align-items: start;
  padding-bottom: 60px;
}

/* --- card rail --- */
.cardrail { position: sticky; top: 20px; }
.cardrail__tilt {
  position: relative;
  border-radius: 14px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  will-change: transform;
}
.cardrail__img {
  width: 100%;
  border-radius: 14px;
  display: block;
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.85);
}
.cardrail__glare {
  position: absolute; inset: 0;
  border-radius: 14px;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 255, 255, 0.22), rgba(199, 125, 255, 0.08) 38%, transparent 65%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  mix-blend-mode: screen;
}
.cardrail__tilt:hover .cardrail__glare { opacity: 1; }

.cardrail__name { font-family: var(--font-disp); font-size: 19px; font-weight: 600; margin-top: 18px; }
.cardrail__set { color: var(--muted); font-size: 13px; margin-top: 3px; }

.baseline {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.baseline__head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.baseline__updated { color: var(--dim, #5a6678); }
.baseline__price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 30px;
  margin-top: 8px;
  background: var(--holo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.baseline__variants { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.vtab {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  border-radius: 6px;
  padding: 5px 10px;
  text-transform: uppercase;
  transition: all 0.15s;
}
.vtab:hover { border-color: var(--line-2); color: var(--ink); }
.vtab.on { border-color: #6ea8ff; color: #6ea8ff; background: #6ea8ff14; }

.baseline__table { width: 100%; margin-top: 12px; border-collapse: collapse; font-family: var(--font-mono); font-size: 11px; }
.baseline__table td { padding: 4px 0; color: var(--muted); }
.baseline__table td:last-child { text-align: right; color: var(--ink); }
/* eBay last-sold comps */
.baseline__soldpanel { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.sold__head {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}
.sold__row {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 4px 0;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
}
.sold__row:hover .sold__val { color: #59f3d8; }
.sold__rk {
  font-family: var(--font-disp);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #071018;
  background: var(--accent, var(--muted));
  border-radius: 4px;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
}
.sold__row--wrap { flex-wrap: wrap; gap: 6px 12px; }
.gr { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink); white-space: nowrap; }
.gr b { font-weight: 400; color: #b794e4; font-size: 9px; letter-spacing: 0.06em; margin-right: 3px; }
.sold__val { transition: color 0.15s; }
.sold__val i { font-style: normal; font-size: 9px; color: var(--muted); }
.sold__val em { font-style: normal; font-size: 9px; color: var(--gold); }
.sold__val--dim { color: var(--dim); }

.stat--sold { color: #59f3d8; border-color: #59f3d833; text-decoration: none; }
.stat--sold:hover { border-color: #59f3d8; }

.baseline__link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: #6ea8ff;
  text-decoration: none;
}
.baseline__link:hover { text-decoration: underline; }

.controls { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.control {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.control input[type='checkbox'] {
  appearance: none;
  width: 30px; height: 17px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.control input[type='checkbox']::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--muted);
  transition: all 0.2s;
}
.control input[type='checkbox']:checked { background: #2b7a5b; }
.control input[type='checkbox']:checked::after { left: 15px; background: var(--under); }
.control--select { justify-content: space-between; }
.control--select span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; }
.control select {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 12px;
  outline: none;
}

/* ============ region columns ============ */
.columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.col__head {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  position: sticky; top: 0; z-index: 2;
}
.col { border-top: 2px solid var(--accent, var(--line-2)); }
.col__title { display: flex; align-items: center; gap: 9px; }
.col__flag {
  font-family: var(--font-disp);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #071018;
  background: var(--accent, var(--muted));
  border-radius: 5px;
  padding: 3px 6px;
}
.col__code {
  font-family: var(--font-disp);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.col__sub {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.1em;
  color: var(--dim, #5a6678); margin-left: auto; text-align: right;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col__stats {
  display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em;
}
.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
  color: var(--muted);
}
.stat--under { color: var(--under); border-color: #3ee58f33; }
.stat--over { color: var(--over); border-color: #ff5c7a33; }

.col__body { overflow-y: auto; overflow-x: hidden; max-height: 74vh; scrollbar-width: thin; }

/* listing row */
.lst {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
  position: relative;
}
.lst:hover { background: #131e30; }
.lst:last-child { border-bottom: none; }
/* the text cell must be allowed to shrink below its content width,
   otherwise long titles force the column to scroll sideways */
.lst > div { min-width: 0; }
.lst__thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.lst__title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lst__meta {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--dim, #5a6678);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lst__row {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.lst__price { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.lst__usd { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); }
.lst__ship { font-family: var(--font-mono); font-size: 8.5px; color: var(--dim, #5a6678); }

.lst__badges {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 5px;
  padding: 3px 7px;
}
.badge--under { color: #071018; background: var(--under); }
.badge--over { color: #fff; background: #b8293f; }
.badge--fair { color: var(--fair); background: #232f47; }
.badge--graded { color: #d9b8ff; background: #3a2360; }
.badge--auction { color: var(--gold); background: #4a3a12; }

/* skeleton loading */
.skel { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 11px; }
.skel__box { border-radius: 8px; background: linear-gradient(100deg, var(--bg-2) 40%, #16233a 50%, var(--bg-2) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skel__thumb { width: 56px; height: 56px; }
.skel__lines { display: flex; flex-direction: column; gap: 7px; }
.skel__l1 { height: 11px; width: 90%; }
.skel__l2 { height: 11px; width: 65%; }
.skel__l3 { height: 13px; width: 40%; margin-top: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* scanline sweep over loading column */
.col--loading { position: relative; }
.col--loading::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 90px; top: 0;
  background: linear-gradient(180deg, transparent, rgba(89, 243, 216, 0.07), rgba(110, 168, 255, 0.12), transparent);
  animation: scanline 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scanline { 0% { top: -90px; } 100% { top: 100%; } }

.col__empty, .col__error {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.col__error { color: var(--over); }
.col__retry, .col__ext {
  display: inline-block;
  margin-top: 10px;
  background: none;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  border-radius: 6px;
  padding: 6px 12px;
  text-decoration: none;
  transition: all 0.15s;
}
.col__retry:hover, .col__ext:hover { border-color: #59f3d8; color: #59f3d8; }

/* toast */
.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  background: #2a1520;
  border: 1px solid #ff5c7a55;
  color: #ffb3c0;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 20px 28px 30px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: #46536a;
  position: relative; z-index: 1;
}

/* ============ scanner workstation mode ============
   While a scan is open the page becomes a fixed-viewport terminal:
   chrome compresses to a slim bar, the footer disappears, and the
   columns run exactly to the bottom edge, scrolling internally. */
body.scanning .footer { display: none; }
body.scanning .masthead { padding: 12px 20px 0; }
body.scanning .masthead__brand { gap: 10px; }
body.scanning .masthead__word { font-size: 22px; }
body.scanning .masthead__orb { width: 18px; height: 18px; box-shadow: 0 0 12px rgba(110, 168, 255, 0.45), inset 0 0 4px rgba(0, 0, 0, 0.6); }
body.scanning .masthead__orb::after { inset: 32%; border-width: 1.5px; }
body.scanning .masthead__tag { display: none; }
body.scanning .search { padding: 10px 0 0; }
body.scanning .search__box { padding: 3px 3px 3px 16px; border-radius: 11px; }
body.scanning .search__sigil { font-size: 15px; }
body.scanning .search__input { font-size: 14.5px; padding: 8px 0; }
body.scanning .search__go { padding: 9px 18px; font-size: 11px; border-radius: 8px; }
body.scanning .search__chips { display: none; }
body.scanning .scanbar { padding: 12px 0 6px; }

@media (min-width: 981px) {
  body.scanning {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.scanning main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  body.scanning #scannerSection {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.scanning .scanbar { flex: none; }
  body.scanning .scanner__layout {
    flex: 1;
    min-height: 0;
    align-items: stretch;
    padding-bottom: 16px;
  }
  body.scanning .cardrail {
    position: static;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    padding-right: 4px;
  }
  body.scanning .columns {
    min-height: 0;
    grid-auto-rows: minmax(0, 1fr);
  }
  body.scanning .col { min-height: 0; }
  body.scanning .col__body { flex: 1; min-height: 0; max-height: none; }
}

/* ============ responsive ============ */
@media (max-width: 1380px) {
  .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .scanner__layout { grid-template-columns: 1fr; }
  .cardrail { position: static; display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
  .cardrail__tilt { align-self: start; }
}
@media (max-width: 640px) {
  .columns { grid-template-columns: 1fr; }
  .cardrail { grid-template-columns: 1fr; }
  main { padding: 0 14px; }
}
