/* =========================================================================
   Geekd Card Scanner — app.css
   To fuldskærms-views: Scanner + Resultat. Futuristisk, animeret, på dansk.
   ========================================================================= */

:root {
  --bg:        #05070d;
  --bg-2:      #0a0e1a;
  --panel:     #0e1320;
  --panel-2:   #141b2d;
  --ink:       #eaf1ff;
  --muted:     #8a96b3;
  --cyan:      #22d3ee;
  --emerald:   #34d399;
  --green:     #1fe080;
  --violet:    #a78bfa;
  --amber:     #fbbf24;
  --rose:      #fb7185;
  --line:      rgba(255, 255, 255, 0.08);
  --radius:    22px;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.hidden { display: none !important; }

/* Animeret rumlig baggrund (bag begge views) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 8%,  rgba(34, 211, 238, 0.16), transparent 42%),
    radial-gradient(circle at 85% 92%, rgba(167, 139, 250, 0.16), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(31, 224, 128, 0.06), transparent 60%);
  animation: bgDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes bgDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -2%, 0) scale(1.06); }
}

/* ====== View-system ====================================================== */
.view {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .9, .25, 1), visibility .5s;
}
.view.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* ========================================================================= */
/* VIEW 1 · SCANNER                                                          */
/* ========================================================================= */
.view--scanner { overflow: hidden; }

.scanner-feed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(1.05) contrast(1.02);
}
.scanner-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 42%, transparent 28%, rgba(5, 7, 13, 0.72) 78%),
    linear-gradient(180deg, rgba(5, 7, 13, 0.78) 0%, rgba(5, 7, 13, 0.15) 26%, rgba(5, 7, 13, 0.30) 62%, rgba(5, 7, 13, 0.95) 100%);
  pointer-events: none;
}
/* Subtilt scanlinje-gitter ovenpå feed */
.scanner-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(34, 211, 238, 0.05) 0 1px, transparent 1px 3px);
  opacity: .5;
  mix-blend-mode: screen;
}

/* Tandhjul */
.icon-btn {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 6;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .35s ease, border-color .2s, background .2s, color .2s;
}
.icon-btn:hover { border-color: rgba(34, 211, 238, .5); background: rgba(34, 211, 238, .12); }
.icon-btn[aria-expanded="true"] { transform: rotate(90deg); border-color: rgba(34, 211, 238, .6); color: var(--cyan); }

/* Indstillings-panel */
.settings {
  position: absolute;
  top: max(72px, calc(env(safe-area-inset-top) + 56px));
  right: 16px;
  z-index: 6;
  width: min(360px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(14, 19, 32, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  animation: settingsIn .28s cubic-bezier(.2, .9, .25, 1) both;
}
.settings[hidden] { display: none; }
@keyframes settingsIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.settings-row select {
  flex: 1 1 180px;
  min-width: 0;
  appearance: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.settings-row select:focus { outline: none; border-color: rgba(34, 211, 238, .6); }

/* Toptekst */
.scanner-head {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: max(54px, calc(env(safe-area-inset-top) + 40px)) 16px 0;
}
.scanner-title {
  margin: 0;
  font-family: 'Orbitron', 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 7vw, 52px);
  letter-spacing: .04em;
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 0 18px rgba(34, 211, 238, .55), 0 0 42px rgba(34, 211, 238, .3);
  animation: titleGlow 3.4s ease-in-out infinite;
}
.scanner-title span {
  display: block;
  background: linear-gradient(90deg, var(--cyan), var(--emerald), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: .62em;
  letter-spacing: .14em;
  margin-top: 4px;
}
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 18px rgba(34,211,238,.55), 0 0 42px rgba(34,211,238,.3); }
  50%      { text-shadow: 0 0 24px rgba(52,211,153,.7), 0 0 60px rgba(52,211,153,.4); }
}
.scanner-sub {
  margin: 14px 0 0;
  font-size: clamp(14px, 3.4vw, 18px);
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .02em;
}

/* Scan-kerne (ramme) */
.scanner-core {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  width: min(440px, 82vw);
  margin: 0 auto;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 63 / 88;
  border: 2px solid rgba(34, 211, 238, 0.85);
  border-radius: 18px;
  box-shadow:
    0 0 28px rgba(34, 211, 238, 0.4) inset,
    0 0 52px rgba(34, 211, 238, 0.4);
  transition: border-color .35s, box-shadow .35s;
  pointer-events: none;
}
.frame.armed { border-color: rgba(52, 211, 153, 0.95);
  box-shadow: 0 0 28px rgba(52,211,153,.5) inset, 0 0 64px rgba(52,211,153,.6); }
.frame.busy  { border-color: rgba(167, 139, 250, 0.95);
  box-shadow: 0 0 28px rgba(167,139,250,.5) inset, 0 0 64px rgba(167,139,250,.6); }
.frame.miss  { border-color: rgba(251, 113, 133, 0.95);
  box-shadow: 0 0 28px rgba(251,113,133,.5) inset, 0 0 64px rgba(251,113,133,.6); }

.frame span {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid currentColor;
  color: var(--cyan);
}
.frame.armed span { color: var(--emerald); }
.frame.busy  span { color: var(--violet); }
.frame.miss  span { color: var(--rose); }
.frame span:nth-child(1) { top: -3px;    left: -3px;  border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.frame span:nth-child(2) { top: -3px;    right: -3px; border-left: 0;  border-bottom: 0; border-top-right-radius: 18px; }
.frame span:nth-child(3) { bottom: -3px; left: -3px;  border-right: 0; border-top: 0;    border-bottom-left-radius: 18px; }
.frame span:nth-child(4) { bottom: -3px; right: -3px; border-left: 0;  border-top: 0;    border-bottom-right-radius: 18px; }

.scanline {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 2%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 14px var(--cyan);
  animation: sweep 2.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 4;
}
.frame.busy ~ .scanline { background: linear-gradient(90deg, transparent, var(--violet), transparent); box-shadow: 0 0 14px var(--violet); animation-duration: 1s; }
.frame.miss ~ .scanline { opacity: 0; }
@keyframes sweep {
  0%   { transform: translateY(0);     opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(2600%); opacity: 0; }
}

/* Stabilitets-måler (over rammen) */
.stability {
  position: absolute;
  top: -16px;
  left: 6%;
  right: 6%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
  z-index: 4;
}
.stability i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  transition: width .18s linear;
}

/* Status-chip */
.status {
  position: absolute;
  left: 50%;
  bottom: -54px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(8, 11, 20, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 5;
}
.status .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 1.4s ease-in-out infinite;
}
.status.armed .dot { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.status.busy  .dot { background: var(--violet);  box-shadow: 0 0 10px var(--violet); }
.status.miss  .dot { background: var(--rose);    box-shadow: 0 0 10px var(--rose); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* HTTPS-advarsel */
.warn {
  display: none;
  position: relative;
  z-index: 3;
  margin: 10px auto 0;
  max-width: 440px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-size: 12px;
  text-align: center;
}
.warn.show { display: block; }

/* Scanner-bund */
.scanner-foot {
  position: relative;
  z-index: 3;
  padding: 0 16px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scanner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  justify-content: center;
}

/* Mega-knap */
.btn-mega {
  position: relative;
  flex: 1 1 auto;
  max-width: 380px;
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-family: 'Orbitron', 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(15px, 4vw, 20px);
  letter-spacing: .08em;
  color: #04131a;
  padding: 18px 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.45), 0 0 0 1px rgba(255, 255, 255, .1) inset;
  overflow: hidden;
  transition: transform .14s, box-shadow .25s, opacity .2s, filter .2s;
}
.btn-mega > span:not(.btn-mega-glow) { position: relative; z-index: 2; }
.btn-mega:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 52px rgba(52, 211, 153, .6); }
.btn-mega:active:not(:disabled) { transform: translateY(0); }
.btn-mega:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.3); }
.btn-mega-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 48%, transparent 62%);
  transform: translateX(-130%);
  animation: megaSheen 3s ease-in-out infinite;
}
@keyframes megaSheen { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(130%); } }

.btn-mega--green {
  background: linear-gradient(135deg, var(--green), #14b866);
  box-shadow: 0 14px 46px rgba(31, 224, 128, 0.5), 0 0 0 1px rgba(255, 255, 255, .12) inset;
  font-size: clamp(17px, 4.6vw, 24px);
  padding: 20px 30px;
}
.btn-mega--green:hover:not(:disabled) { box-shadow: 0 20px 60px rgba(31, 224, 128, .7); }

/* Upload-knap (lille, ved siden af mega) */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(20, 27, 45, 0.7);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 20px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform .12s, box-shadow .2s, background .2s, opacity .2s, border-color .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(34, 211, 238, .4); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: rgba(20, 27, 45, 0.55); backdrop-filter: blur(8px); }
.btn-sm { padding: 9px 13px; font-size: 14px; }
.btn-upload { flex: 0 0 auto; font-size: 20px; padding: 16px 18px; }

.cooldown {
  font-size: 12px;
  color: var(--muted);
  min-height: 15px;
  text-align: center;
}

/* History-strip (diskret) */
.history-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 760px;
}
.history-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1 1 auto;
  padding: 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.history-track::-webkit-scrollbar { height: 5px; }
.history-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
.history-empty { font-size: 12px; color: var(--muted); padding: 12px 6px; white-space: nowrap; }

.history-item {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform .14s, border-color .2s, box-shadow .2s;
  animation: tileIn .3s ease both;
}
.history-item:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 8px 22px rgba(34, 211, 238, .25);
}
.history-item img {
  width: 100%;
  aspect-ratio: 63 / 88;
  object-fit: contain;
  background: #0a0e18;
  display: block;
}
.history-noimg {
  width: 100%;
  aspect-ratio: 63 / 88;
  display: grid;
  place-items: center;
  color: #556;
  background: #0a0e18;
  font-size: 12px;
}
.history-clear {
  flex: 0 0 auto;
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.history-clear:hover { border-color: rgba(251, 113, 133, .5); color: var(--rose); }

/* ========================================================================= */
/* VIEW 2 · RESULTAT                                                         */
/* ========================================================================= */
.view--result {
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.10), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(31, 224, 128, 0.10), transparent 45%),
    var(--bg);
  overflow-y: auto;
}

.result-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(220px, 38%) 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(18px, 4vw, 48px) 16px;
}
@media (max-width: 780px) {
  .result-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .result-card-col { max-width: 260px; margin: 0 auto; }
}

/* Venstre: 3D-kort */
.result-card-col { perspective: 1300px; }
.card3d {
  width: 100%;
  transform-style: preserve-3d;
}
.card3d-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 63 / 88;
  border-radius: 18px;
  overflow: hidden;
  background: #0a0e18;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 80px rgba(0, 0, 0, .6),
    0 0 60px rgba(34, 211, 238, .25);
  transform-style: preserve-3d;
  transform: rotateX(0) rotateY(0);
  animation: cardFloat 7s ease-in-out infinite;
  will-change: transform;
}
.card3d-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.card3d-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  mix-blend-mode: screen;
}
/* Holo-glimt */
.card3d-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.26) 48%, transparent 60%);
  transform: translateX(-130%);
  animation: holo 4s ease-in-out 0.4s infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes holo { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(130%); } }
@keyframes cardFloat {
  0%, 100% { transform: rotateY(-9deg) rotateX(3deg); }
  50%      { transform: rotateY(9deg)  rotateX(-3deg); }
}
/* Fly-in når et nyt match vælges */
.card3d-inner.flyin { animation: cardFlyIn .6s cubic-bezier(.2, .9, .25, 1), cardFloat 7s ease-in-out .6s infinite; }
@keyframes cardFlyIn {
  from { opacity: 0; transform: translateY(70px) rotateY(-30deg) scale(.85); }
  to   { opacity: 1; transform: rotateY(-9deg) rotateX(3deg) scale(1); }
}

/* Højre: info-kolonne */
.result-info-col { min-width: 0; animation: infoIn .55s ease both; }
@keyframes infoIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.r-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag.raw    { border-color: rgba(34, 211, 238, .4);  color: var(--cyan); }
.tag.graded { border-color: rgba(251, 191, 36, .45); color: var(--amber); }
.tag .k { color: var(--muted); font-weight: 500; }

.r-name {
  margin: 2px 0 4px;
  font-family: 'Orbitron', 'Outfit', sans-serif;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.r-sub { color: var(--muted); font-size: clamp(13px, 2.4vw, 15px); margin-bottom: 18px; }
.r-sub b { color: var(--ink); font-weight: 600; }

/* Pris-tabel */
.price-table {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  overflow: hidden;
  margin-bottom: 18px;
}
.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
.price-row:last-child { border-bottom: 0; }
.price-row.is-psa {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.03));
}
.price-row.is-top {
  background: linear-gradient(135deg, rgba(31, 224, 128, 0.14), rgba(31, 224, 128, 0.03));
}
.pr-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pr-cond {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}
.price-row.is-psa .pr-cond { color: var(--amber); }
.pr-desc { font-size: 11px; color: var(--muted); }
.pr-value {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pr-dkk {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(16px, 2.6vw, 20px);
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}
.price-row.is-psa .pr-dkk { color: var(--amber); }
.pr-orig { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.pr-na { color: var(--muted); font-weight: 600; font-size: 14px; font-family: 'Outfit', sans-serif; }

.fx-note {
  font-size: 11px;
  color: var(--muted);
  margin: -6px 0 18px;
  text-align: right;
}

/* Meta-grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.meta {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.meta .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.meta .value { font-size: 16px; font-weight: 700; margin-top: 3px; }

/* Score-bar */
.score { margin-bottom: 4px; }
.score .top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.score .top b { color: var(--ink); font-size: 13px; }
.score .track {
  height: 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.score .fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--rose), var(--amber), var(--green));
  transition: width 1s cubic-bezier(.2, .9, .25, 1);
  box-shadow: 0 0 12px rgba(31, 224, 128, .5);
}

/* Alternative matches */
.alts { margin-top: 24px; }
.alts h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 12px;
}
.alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.tile {
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform .15s, box-shadow .2s, border-color .2s;
  animation: tileIn .45s ease both;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, .5);
  box-shadow: 0 14px 36px rgba(34, 211, 238, .2);
}
@keyframes tileIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tile img { width: 100%; aspect-ratio: 63 / 88; object-fit: contain; background: #0a0e18; display: block; }
.tile-noimg { width: 100%; aspect-ratio: 63 / 88; display: grid; place-items: center; color: #556; background: #0a0e18; font-size: 11px; }
.tile .body { padding: 8px 10px; }
.tile .nm { font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sc { font-size: 11px; color: var(--cyan); margin-top: 4px; font-family: 'JetBrains Mono', monospace; }

/* Resultat-bund (grøn knap) */
.result-foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 14px 16px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(5, 7, 13, 0.9) 40%);
}
.result-foot .btn-mega { max-width: 520px; }

/* Notice / fejl-overlay i scanner-kernen */
.notice-overlay {
  position: fixed;
  z-index: 7;
  left: 50%;
  bottom: 130px;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px));
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(14, 19, 32, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  text-align: center;
  animation: noticeIn .35s cubic-bezier(.2, .9, .25, 1) both;
}
.notice-overlay.error { border-color: rgba(251, 113, 133, 0.45); }
.notice-overlay .emo { font-size: 30px; }
.notice-overlay .t { font-weight: 700; font-size: 16px; margin: 6px 0 4px; }
.notice-overlay .d { color: var(--muted); font-size: 13px; line-height: 1.4; }
@keyframes noticeIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Mini-spinner */
.spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== Reduced motion =================================================== */
@media (prefers-reduced-motion: reduce) {
  .card3d-inner,
  .card3d-inner.flyin { animation: none; transform: rotateY(0) rotateX(0); }
  .card3d-inner::after { animation: none; opacity: 0; }
  .btn-mega-glow { animation: none; }
  .scanline { animation: none; opacity: .6; }
  .scanner-title { animation: none; }
  body::before { animation: none; }
}
