@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bungee-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bungee-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/poppins-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/poppins-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/poppins-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/poppins-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/poppins-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/poppins-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/poppins-900-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/poppins-900-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Pokecheck — Pokémon-authentic aesthetic
 * Palette references the 1995 brand: yellow #FFCC00, blue #0075BE, red #EE1515
 * Type fonts: Bungee (bouncy chunky display, evokes the logo's spring energy),
 * Poppins (the friendly sans used in TCG Pocket).
 */

:root {
  --pkmn-yellow: #FFCC00;
  --pkmn-yellow-deep: #E6B800;
  --pkmn-blue: #0075BE;
  --pkmn-blue-deep: #003A75;
  --pkmn-blue-light: #4FB3FF;
  --pkmn-red: #EE1515;
  --pkmn-red-deep: #B81313;
  --cream: #FFF8E1;
  --cream-2: #FFEFB8;
  --ink: #1A1A2E;
  --ink-mute: #545478;
  --ink-dim: #8A8AA5;
  --line: rgba(0, 58, 117, 0.12);
  --line-strong: rgba(0, 58, 117, 0.35);

  /* Type colors (authentic Pokemon energy palette) */
  --t-feuer: #FF3B25;
  --t-fire: #FF3B25;
  --t-wasser: #2A95E3;
  --t-water: #2A95E3;
  --t-pflanze: #4DB048;
  --t-grass: #4DB048;
  --t-elektro: #F7C829;
  --t-electric: #F7C829;
  --t-lightning: #F7C829;
  --t-psycho: #C44CC4;
  --t-psychic: #C44CC4;
  --t-kampf: #C2622A;
  --t-fighting: #C2622A;
  --t-finsternis: #353548;
  --t-darkness: #353548;
  --t-stahl: #98A5B5;
  --t-metal: #98A5B5;
  --t-fee: #FF7AC1;
  --t-fairy: #FF7AC1;
  --t-drache: #826BD1;
  --t-dragon: #826BD1;
  --t-farblos: #E8E2D0;
  --t-colorless: #E8E2D0;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html, body {
  background: var(--cream);
  color: var(--ink);
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sticky top bar — stays pinned so "Back" + lang switch are always reachable
   on the (long) card-detail screen without scrolling up. Full-bleed frosted
   background; inner content keeps the max-w-6xl column alignment. */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 225, 0.82);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid rgba(26, 26, 46, 0.07);
}

.font-display {
  font-family: 'Bungee', 'Poppins', sans-serif;
  font-weight: 400;
  letter-spacing: 0.005em;
}

.font-poppins-black {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: 'Space Mono', 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Background — sunny sky with Poké Ball pattern ─────── */

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, var(--pkmn-yellow) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 90% 100%, rgba(0, 117, 190, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 10% 100%, rgba(238, 21, 21, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #FFF8E1 0%, #FFEFB8 100%);
  pointer-events: none;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%230075BE' fill-opacity='0.05'%3E%3Ccircle cx='40' cy='40' r='12' fill='none' stroke='%230075BE' stroke-width='1.2' stroke-opacity='0.18'/%3E%3Cline x1='28' y1='40' x2='52' y2='40' stroke='%230075BE' stroke-width='1.2' stroke-opacity='0.18'/%3E%3Ccircle cx='40' cy='40' r='3' fill='%230075BE' fill-opacity='0.18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}

/* ── Foil text — used very sparingly on hero word ──────── */

.text-foil-gradient {
  background: linear-gradient(
    100deg,
    var(--pkmn-blue) 0%,
    var(--pkmn-red) 35%,
    var(--pkmn-yellow-deep) 65%,
    var(--pkmn-blue) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: foil-shift 6s linear infinite;
}

@keyframes foil-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.text-blue { color: var(--pkmn-blue); }
.text-blue-deep { color: var(--pkmn-blue-deep); }
.text-yellow { color: var(--pkmn-yellow-deep); }
.text-red { color: var(--pkmn-red); }
.text-ink { color: var(--ink); }
.text-mute { color: var(--ink-mute); }
.text-dim { color: var(--ink-dim); }

/* ── Header logo — bouncy ─────────────────────────────── */

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(20px, 3.5vw, 32px);
  color: var(--pkmn-blue-deep);
  text-shadow: 2px 2px 0 var(--pkmn-yellow);
  letter-spacing: 0.01em;
  line-height: 1;
  transform: rotate(-2deg);
}

@media (min-width: 768px) {
  .brand-logo {
    text-shadow: 3px 3px 0 var(--pkmn-yellow);
  }
}

.brand-tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pkmn-blue);
  font-weight: 700;
}

/* ── Page-load stagger ─────────────────────────────────── */

.stagger {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--i, 0) * 110ms + 100ms);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hero ──────────────────────────────────────────────── */

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-blue);
  background: white;
  padding: 7px 14px;
  border-radius: 999px;
  border: 2px solid var(--pkmn-blue-deep);
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
}

.hero-title {
  font-family: 'Bungee', sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 5.6vw, 64px);
  line-height: 0.95;
  color: var(--pkmn-blue-deep);
  letter-spacing: 0.005em;
  text-shadow: 3px 3px 0 var(--pkmn-yellow);
}

.hero-title .accent {
  color: var(--pkmn-red);
  display: inline-block;
  transform: rotate(-3deg);
  text-shadow: 3px 3px 0 var(--pkmn-yellow);
}

.hero-sub {
  display: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-mute);
}

@media (min-width: 768px) {
  .hero-sub {
    display: block;
  }
}

/* ── Scan CTA — big sticker button ─────────────────────── */

.scan-cta {
  position: relative;
  width: 100%;
  text-align: left;
  background: var(--pkmn-yellow);
  border: 4px solid var(--pkmn-blue-deep);
  border-radius: 24px;
  padding: 22px 22px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--pkmn-blue-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: scan-cta-pulse 2.4s ease-in-out infinite;
}

@keyframes scan-cta-pulse {
  0%, 100% { box-shadow: 6px 6px 0 var(--pkmn-blue-deep); }
  50%      { box-shadow: 6px 6px 0 var(--pkmn-blue-deep), 0 0 0 6px rgba(255, 204, 0, 0.55); }
}

@media (min-width: 768px) {
  .scan-cta {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scan-cta { animation: none; }
}

@media (min-width: 768px) {
  .scan-cta {
    padding: 30px 40px;
    border-radius: 32px;
  }
}

.scan-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 var(--pkmn-blue-deep);
}

.scan-cta:active {
  transform: translate(4px, 4px);
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
}

.scan-cta-stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 18px,
    rgba(0, 58, 117, 0.06) 18px,
    rgba(0, 58, 117, 0.06) 22px
  );
  pointer-events: none;
}

.scan-cta-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
  margin-bottom: 8px;
  display: inline-block;
  background: white;
  padding: 5px 10px;
  border-radius: 999px;
  border: 2px solid var(--pkmn-blue-deep);
}

.scan-cta-title {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.02;
  color: var(--pkmn-blue-deep);
  margin: 10px 0 6px;
  letter-spacing: 0.005em;
}

.scan-cta-sub {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--pkmn-blue-deep);
  opacity: 0.85;
}

.scan-cta-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--pkmn-blue-deep);
  stroke-width: 2.5;
}

@media (min-width: 768px) {
  .scan-cta-icon {
    width: 72px;
    height: 72px;
  }
}

/* ── Section title ─────────────────────────────────────── */

.section-title {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--pkmn-blue-deep);
  text-shadow: 3px 3px 0 var(--pkmn-yellow);
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-blue);
}

/* ── Form fields — white sticker style ─────────────────── */

.form-field {
  position: relative;
  background: white;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 16px;
  padding: 12px 16px 10px;
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
  transition: transform 0.15s, box-shadow 0.15s;
}

.form-field:focus-within {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--pkmn-yellow-deep), 5px 5px 0 4px var(--pkmn-blue-deep);
}

.form-field label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
  margin-bottom: 3px;
}

.form-field input {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 17px;
  outline: 0;
  padding: 0;
}

.form-field input::placeholder {
  color: var(--ink-dim);
  font-weight: 500;
}

.form-field input[type="number"]::-webkit-outer-spin-button,
.form-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Chips ─────────────────────────────────────────────── */

.chip {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  background: white;
  border: 2.5px solid var(--pkmn-blue-deep);
  color: var(--pkmn-blue-deep);
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  background: var(--pkmn-yellow);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
}

.chip:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--pkmn-blue-deep);
}

/* ── Primary action button ─────────────────────────────── */

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--pkmn-red);
  color: white;
  font-family: 'Bungee', sans-serif;
  font-size: 16px;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--pkmn-blue-deep);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  background: var(--pkmn-red-deep);
  box-shadow: 6px 6px 0 var(--pkmn-blue-deep);
}

.btn-primary:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--pkmn-blue-deep);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--ink-dim);
}

/* ── Back link ─────────────────────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--pkmn-blue-deep);
  background: white;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2.5px solid var(--pkmn-blue-deep);
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.back-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
}

/* ── Card tile (pick view) ─────────────────────────────── */

.card-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: white;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 18px;
  padding: 8px;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--pkmn-blue-deep);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s;
  text-align: left;
}

.card-tile:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 7px 7px 0 var(--pkmn-yellow-deep), 7px 7px 0 4px var(--pkmn-blue-deep);
}

.card-tile:active {
  transform: translate(2px, 2px) rotate(0);
  box-shadow: 2px 2px 0 var(--pkmn-blue-deep);
}

.card-tile-img-wrap {
  aspect-ratio: 5 / 7;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cream-2), white);
  position: relative;
  border: 1.5px solid var(--line);
}

.card-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-tile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--pkmn-blue);
}

.card-tile-meta {
  padding: 10px 6px 4px;
}

.card-tile-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  color: var(--pkmn-blue-deep);
  line-height: 1.15;
}

.card-tile-set {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pkmn-red);
  margin-top: 3px;
}

/* ── 3D Card (result view) ─────────────────────────────── */

.card-3d-wrap {
  perspective: 1500px;
  filter: drop-shadow(0 20px 30px rgba(0, 58, 117, 0.25));
}

.card-3d {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  background:
    linear-gradient(135deg, var(--pkmn-yellow), var(--pkmn-yellow-deep));
  border: 4px solid var(--pkmn-blue-deep);
}

.card-3d-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-3d-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: var(--pkmn-blue-deep);
  background: linear-gradient(135deg, var(--cream-2), white);
}

.card-3d-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 25%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 75%
  );
  background-size: 250% 250%;
  background-position: 0% 0%;
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.3s;
}

.card-3d-wrap:hover .card-3d-shine {
  opacity: 1;
}

/* ── Set logo strip ────────────────────────────────────── */

.set-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.set-logo {
  height: 38px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(2px 2px 0 rgba(0, 58, 117, 0.35));
}

.result-eyebrow-num {
  background: white !important;
  color: var(--pkmn-blue-deep) !important;
  text-shadow: none;
}

/* ── Dex / evolve pills ────────────────────────────────── */

.dex-pill {
  display: inline-flex;
  align-items: center;
  font-family: 'Bungee', sans-serif;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: white;
  background: var(--pkmn-red);
  padding: 6px 14px;
  border-radius: 999px;
  border: 2.5px solid var(--pkmn-blue-deep);
  text-shadow: 1px 1px 0 var(--pkmn-blue-deep);
  box-shadow: 2px 2px 0 var(--pkmn-blue-deep);
}

.evolve-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--pkmn-blue-deep);
  background: white;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2.5px solid var(--pkmn-blue-deep);
  box-shadow: 2px 2px 0 var(--pkmn-blue-deep);
  cursor: pointer;
  transition: all 0.15s ease;
}

.evolve-pill:hover {
  background: var(--pkmn-yellow);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
}

.evolve-pill .evolve-name {
  font-family: 'Bungee', sans-serif;
  font-size: 13px;
  color: var(--pkmn-red);
  margin-left: 2px;
}

/* ── Print variant chips ───────────────────────────────── */

.print-chip {
  display: inline-flex;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2.5px solid var(--pkmn-blue-deep);
  box-shadow: 2px 2px 0 var(--pkmn-blue-deep);
  background: white;
  color: var(--pkmn-blue-deep);
  text-transform: uppercase;
}

.print-chip[data-kind="first"] {
  background: linear-gradient(135deg, #FFE066, #FFCC00 50%, #E6A800);
  color: var(--pkmn-blue-deep);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow: 2px 2px 0 var(--pkmn-blue-deep), inset 0 -2px 0 rgba(0, 58, 117, 0.15);
}

.print-chip[data-kind="holo"] {
  background:
    linear-gradient(115deg,
      #00f0ff 0%, #ff00aa 25%, #ffcc00 50%, #00f0ff 75%, #ff00aa 100%);
  background-size: 200% 100%;
  color: white;
  text-shadow: 1px 1px 0 rgba(0, 58, 117, 0.6);
  animation: foil-shift 4s linear infinite;
}

.print-chip[data-kind="reverse"] {
  background:
    linear-gradient(115deg, #E8E8F0, #FFFFFF 50%, #C8C8D8);
  color: var(--pkmn-blue-deep);
}

.print-chip[data-kind="shadowless"] {
  background: linear-gradient(135deg, #FFF8E1, white);
  color: var(--pkmn-blue-deep);
}

.print-chip[data-kind="promo"] {
  background: var(--pkmn-yellow);
  color: var(--pkmn-blue-deep);
}

.print-chip[data-kind="normal"] {
  background: white;
  color: var(--pkmn-blue-deep);
}

/* ── Holo prices block ─────────────────────────────────── */

.price-label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-blue);
  margin-bottom: 4px;
}

.holo-prices {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px dashed rgba(0, 58, 117, 0.18);
}

.holo-label {
  color: var(--pkmn-red) !important;
}

.holo-shine-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--pkmn-blue-deep);
  background:
    linear-gradient(115deg, #00f0ff 0%, #ff00aa 50%, #ffcc00 100%);
  background-size: 200% 100%;
  animation: foil-shift 3s linear infinite;
  display: inline-block;
}

.holo-value {
  background: linear-gradient(115deg, #00aaff 0%, #ff00aa 40%, #ffaa00 70%, #00aaff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
  animation: foil-shift 5s linear infinite;
}

/* ── Cardmarket CTA button ─────────────────────────────── */

.cardmarket-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 22px;
  background: var(--pkmn-blue);
  color: white;
  font-family: 'Bungee', sans-serif;
  font-size: 14px;
  text-decoration: none;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cardmarket-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--pkmn-blue-deep);
  background: var(--pkmn-blue-deep);
}

.cardmarket-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--pkmn-blue-deep);
}

/* ── Tournament legality row ───────────────────────────── */

.legal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.legal-badge {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: white;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
  min-width: 200px;
}

.legal-badge[data-tone="good"] {
  background: #DFF6DD;
  color: #1E6B1E;
  border-color: #1E6B1E;
  box-shadow: 3px 3px 0 #1E6B1E;
}
.legal-badge[data-tone="mid"] {
  background: var(--pkmn-yellow);
  color: var(--pkmn-blue-deep);
}
.legal-badge[data-tone="off"] {
  background: #F4D4D4;
  color: var(--pkmn-red-deep);
  border-color: var(--pkmn-red-deep);
  box-shadow: 3px 3px 0 var(--pkmn-red-deep);
}

.reg-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
}

.reg-mark-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
}

.reg-mark-letter {
  font-family: 'Bungee', sans-serif;
  font-size: 22px;
  color: white;
  background: var(--pkmn-red);
  border: 2.5px solid var(--pkmn-blue-deep);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 1px 1px 0 var(--pkmn-blue-deep);
}

/* ── Result header (existing) ──────────────────────────── */

.result-eyebrow {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: white;
  background: var(--pkmn-blue);
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--pkmn-blue-deep);
}

.result-name {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.95;
  color: var(--pkmn-blue-deep);
  text-shadow: 4px 4px 0 var(--pkmn-yellow);
  letter-spacing: 0.005em;
  margin: 12px 0 8px;
}

.result-illus {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-mute);
}

/* ── Price box ─────────────────────────────────────────── */

.price-box {
  position: relative;
  background: white;
  border: 4px solid var(--pkmn-blue-deep);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: 6px 6px 0 var(--pkmn-yellow-deep), 6px 6px 0 4px var(--pkmn-blue-deep);
  overflow: hidden;
}

.price-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
}

.price-value {
  font-family: 'Bungee', sans-serif;
  font-size: clamp(56px, 10vw, 96px);
  line-height: 1;
  color: var(--pkmn-blue-deep);
  text-shadow: 5px 5px 0 var(--pkmn-yellow);
  letter-spacing: 0;
  margin: 8px 0 16px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.price-cell {
  background: var(--cream);
  border: 2px solid var(--pkmn-blue-deep);
  border-radius: 12px;
  padding: 12px 14px;
}

.price-cell-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pkmn-blue);
}

.price-cell-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--pkmn-blue-deep);
  margin-top: 2px;
}

/* ── Price trend (recent development sparkline) ─────────── */
.price-trend {
  background: var(--cream);
  border: 2px solid var(--pkmn-blue-deep);
  border-radius: 14px;
  padding: 12px 14px 10px;
  margin: 4px 0 14px;
}
.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.trend-title {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pkmn-blue);
}
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.trend-badge[data-dir="up"]   { color: #1f9d3b; background: rgba(77, 176, 72, 0.16); }
.trend-badge[data-dir="down"] { color: var(--pkmn-red); background: rgba(238, 21, 21, 0.12); }
.trend-badge[data-dir="flat"] { color: var(--pkmn-blue); background: rgba(0, 117, 190, 0.12); }
.trend-arrow { font-size: 0.7rem; }
.trend-pct { opacity: 0.85; }
.trend-chart {
  display: block;
  width: 100%;
  height: auto;
  margin: 14px 0 4px;
  overflow: visible;
}
.trend-chart[data-dir="up"]   { color: #1f9d3b; }
.trend-chart[data-dir="down"] { color: var(--pkmn-red); }
.trend-chart[data-dir="flat"] { color: var(--pkmn-blue); }
.trend-area { fill: currentColor; opacity: 0.13; }
.trend-axis { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 4; }
.trend-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  fill: var(--pkmn-blue-deep);
}
.trend-xlabel {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  fill: var(--ink-dim);
}
.trend-sentence {
  margin-top: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

/* ── Stats / attacks / abilities — sticker cards ───────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-cell {
  background: white;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
}

.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
}

.stat-value {
  font-family: 'Bungee', sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--pkmn-blue-deep);
  text-shadow: 2px 2px 0 var(--pkmn-yellow);
  margin-top: 4px;
}

.stat-value-sm {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--pkmn-blue-deep);
  line-height: 1.15;
  margin-top: 4px;
}

.section-block {
  background: white;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
}

.section-block-title {
  font-family: 'Bungee', sans-serif;
  font-size: 16px;
  color: var(--pkmn-red);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.attack-row {
  padding: 12px 0;
  border-top: 2px dashed var(--line);
}

.attack-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.attack-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--pkmn-blue-deep);
}

.attack-damage {
  font-family: 'Bungee', sans-serif;
  font-size: 26px;
  color: var(--pkmn-red);
  text-shadow: 2px 2px 0 var(--pkmn-yellow);
}

.attack-effect {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-mute);
  margin-top: 4px;
}

.ability-type-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
}

/* ── Type badge / dot ──────────────────────────────────── */

.type-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--type-color, var(--ink-dim));
  color: white;
  border: 2px solid var(--pkmn-blue-deep);
  text-shadow: 1px 1px 0 rgba(0, 58, 117, 0.45);
}

.type-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--type-color, var(--ink-dim));
  border: 2px solid var(--pkmn-blue-deep);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2), 1px 1px 0 var(--pkmn-blue-deep);
}

.type-badge[data-type*="fire"], .type-badge[data-type*="feuer"],
.type-dot[data-type*="fire"], .type-dot[data-type*="feuer"] { --type-color: var(--t-fire); }

.type-badge[data-type*="water"], .type-badge[data-type*="wasser"],
.type-dot[data-type*="water"], .type-dot[data-type*="wasser"] { --type-color: var(--t-water); }

.type-badge[data-type*="grass"], .type-badge[data-type*="pflanze"],
.type-dot[data-type*="grass"], .type-dot[data-type*="pflanze"] { --type-color: var(--t-grass); }

.type-badge[data-type*="electric"], .type-badge[data-type*="lightning"], .type-badge[data-type*="elektro"],
.type-dot[data-type*="electric"], .type-dot[data-type*="lightning"], .type-dot[data-type*="elektro"] {
  --type-color: var(--t-electric);
}

.type-badge[data-type*="psychic"], .type-badge[data-type*="psycho"],
.type-dot[data-type*="psychic"], .type-dot[data-type*="psycho"] { --type-color: var(--t-psychic); }

.type-badge[data-type*="fighting"], .type-badge[data-type*="kampf"],
.type-dot[data-type*="fighting"], .type-dot[data-type*="kampf"] { --type-color: var(--t-fighting); }

.type-badge[data-type*="darkness"], .type-badge[data-type*="finsternis"],
.type-dot[data-type*="darkness"], .type-dot[data-type*="finsternis"] { --type-color: var(--t-darkness); }

.type-badge[data-type*="metal"], .type-badge[data-type*="stahl"],
.type-dot[data-type*="metal"], .type-dot[data-type*="stahl"] { --type-color: var(--t-metal); }

.type-badge[data-type*="fairy"], .type-badge[data-type*="fee"],
.type-dot[data-type*="fairy"], .type-dot[data-type*="fee"] { --type-color: var(--t-fairy); }

.type-badge[data-type*="dragon"], .type-badge[data-type*="drache"],
.type-dot[data-type*="dragon"], .type-dot[data-type*="drache"] { --type-color: var(--t-dragon); }

.type-badge[data-type*="colorless"], .type-badge[data-type*="farblos"],
.type-dot[data-type*="colorless"], .type-dot[data-type*="farblos"] {
  --type-color: var(--t-colorless);
  color: var(--pkmn-blue-deep);
  text-shadow: none;
}

/* ── Loading spinner ───────────────────────────────────── */

.spinner-pokeball {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  position: relative;
  background:
    linear-gradient(180deg, var(--pkmn-red) 0% 47%, var(--pkmn-blue-deep) 47% 53%, white 53% 100%);
  border: 4px solid var(--pkmn-blue-deep);
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
  animation: shake 0.8s ease-in-out infinite;
}

.spinner-pokeball::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border: 4px solid var(--pkmn-blue-deep);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes shake {
  0%, 100% { transform: rotate(-8deg); }
  25% { transform: rotate(8deg); }
  50% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}

/* ── Language switcher ─────────────────────────────────── */

.lang-switch {
  display: inline-flex;
  background: white;
  border: 2.5px solid var(--pkmn-blue-deep);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 3px 3px 0 var(--pkmn-blue-deep);
}

.lang-pill {
  font-family: 'Bungee', sans-serif;
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--pkmn-blue-deep);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.04em;
}

@media (min-width: 768px) {
  .lang-pill {
    font-size: 11px;
    padding: 6px 12px;
  }
}

.lang-pill:hover:not(.active) {
  background: var(--cream-2);
}

.lang-pill.active {
  background: var(--pkmn-red);
  color: white;
  text-shadow: 1px 1px 0 var(--pkmn-blue-deep);
}

/* ── Footer ────────────────────────────────────────────── */

.footer-line {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pkmn-blue);
}

/* --- Scan: upload fallback link (under the camera CTA) --- */
.scan-upload-link {
  display: block;
  margin: 0.85rem auto 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-mute);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.scan-upload-link:hover { color: var(--pkmn-blue); }

/* --- Live camera capture view --- */
.camera-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  overflow: hidden;
}
.cam-video { width: 100%; height: 100%; object-fit: cover; }
.cam-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.cam-frame {
  position: relative;
  width: min(82vw, 48vh, 380px); /* hard px cap so it stays card-sized on tablets/desktop */
  aspect-ratio: 0.714;
  border-radius: 18px;
  border: 3px solid rgba(255, 204, 0, 0.95);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 22px rgba(255, 204, 0, 0.35);
}
.cam-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 4px solid #fff;
  opacity: 0.9;
}
.cam-corner.tl { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 16px; }
.cam-corner.tr { top: -3px; right: -3px; border-left: 0; border-bottom: 0; border-top-right-radius: 16px; }
.cam-corner.bl { bottom: -3px; left: -3px; border-right: 0; border-top: 0; border-bottom-left-radius: 16px; }
.cam-corner.br { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 16px; }
.cam-zone {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.cam-zone.z-name { top: 8px; left: 8px; }
.cam-zone.z-hp   { top: 8px; right: 8px; }
.cam-zone.z-set  { bottom: 8px; left: 8px; }
.cam-zone.z-num  { bottom: 8px; right: 8px; }
.cam-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(max(28px, env(safe-area-inset-bottom)) + 96px); /* sits above the shutter row */
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 9px 18px;
  border-radius: 999px;
  text-align: center;
  max-width: 86vw;
}
.cam-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.cam-cancel, .cam-controls-spacer { flex: 1; }
.cam-cancel {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  opacity: 0.9;
}
.cam-shutter {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.2s, background 0.2s;
}
.cam-shutter:active { transform: scale(0.93); }
.cam-shutter-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
}

/* --- Collection feature --- */
.nav-auth { display: inline-flex; gap: .5rem; align-items: center; }
.nav-link {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--pkmn-blue-deep);
  padding: .25rem .4rem;
}
.nav-link-muted { opacity: .55; }

/* Standalone boxed field used by login + collection filters + add control. */
.field-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
  margin-bottom: 5px;
}
.field-input {
  width: 100%;
  background: white;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  outline: 0;
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
  transition: transform 0.15s, box-shadow 0.15s;
}
.field-input:focus {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--pkmn-yellow-deep), 5px 5px 0 4px var(--pkmn-blue-deep);
}
.field-input::placeholder { color: var(--ink-dim); font-weight: 500; }

.login-form { display: flex; flex-direction: column; }
.login-error { color: var(--pkmn-red); font-weight: 700; }

.add-collection { margin-top: 1rem; }
.add-signin {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: 14px;
  border: 3px dashed var(--pkmn-blue-deep);
  background: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  cursor: pointer;
  color: var(--pkmn-blue-deep);
}
.add-controls { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.add-field { display: flex; flex-direction: column; }
.add-field .field-input { width: auto; }
.add-qty { min-width: 7rem; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  border: 3px solid var(--pkmn-blue-deep);
  border-radius: 14px;
  padding: .4rem .85rem;
  box-shadow: 4px 4px 0 var(--pkmn-blue-deep);
}
.qty-stepper span { font-family: 'Poppins', sans-serif; font-weight: 800; min-width: 1.2rem; text-align: center; }
.qty-stepper button {
  font-size: 1.3rem;
  font-weight: 900;
  background: none;
  border: 0;
  cursor: pointer;
  line-height: 1;
  color: var(--pkmn-blue-deep);
}
.add-btn { display: inline-flex; align-items: center; gap: .5rem; }
.owned-pill { background: rgba(255, 255, 255, 0.25); border-radius: 999px; padding: .1rem .5rem; font-size: .8em; }

.coll-header { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.coll-total { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.coll-total-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pkmn-red);
}
.coll-total-value { font-family: 'Poppins', sans-serif; font-weight: 900; font-size: 1.6rem; color: var(--pkmn-blue-deep); }
.coll-count, .coll-prices-loading { opacity: .6; font-weight: 600; font-size: .85rem; }
.coll-filters { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1.25rem; }
@media (min-width: 768px) { .coll-filters { grid-template-columns: 2fr repeat(4, 1fr); } }
.coll-empty { padding: 3rem 1rem; text-align: center; opacity: .7; font-weight: 600; }

.tile-qty {
  position: absolute;
  top: .4rem;
  right: .4rem;
  background: var(--pkmn-blue-deep);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  border-radius: 999px;
  padding: .1rem .55rem;
  font-size: .85rem;
  z-index: 1;
}
.tile-price {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--pkmn-blue-deep);
  margin-top: 3px;
}
