/* ============================================================
   CardGradeCheck — Clean Light Theme
   Complete rewrite — warm, friendly, Pokemon fan-site feel
   ============================================================ */

/* ============ TOKENS ============ */
:root {
  /* Pokemon palette */
  --poke-yellow: #FFCB05;
  --poke-blue: #3B4CCA;
  --poke-red: #FF0000;
  --poke-dark-blue: #2A3BA0;
  --poke-light-yellow: #FFF3B0;

  /* Surfaces */
  --bg: #FAFAF7;
  --bg-warm: #FFF8F0;
  --surface: #FFFFFF;
  --surface-alt: #F5F3EE;

  /* Text */
  --text: #2D2D2D;
  --text-2: #555555;
  --text-3: #888888;
  --text-light: #AAAAAA;

  /* Borders */
  --border: #E8E4DD;
  --border-hover: #D0CBC2;
  --border-active: rgba(59, 76, 202, 0.4);

  /* Grade colors */
  --grade-good: #16A34A;
  --grade-mid: #D97706;
  --grade-low: #DC2626;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --max-w: 1200px;
  --gutter: clamp(16px, 4vw, 48px);

  /* Type */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--poke-blue); outline-offset: 3px; border-radius: 3px; }

img { display: block; max-width: 100%; height: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ============ NAV ============ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--poke-blue);
}

.site-nav__pokeball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--poke-red) 45%, #333 45%, #333 55%, white 55%);
  position: relative;
  border: 2px solid #333;
  flex-shrink: 0;
}

.site-nav__pokeball::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  border: 2px solid #333;
}

.site-nav__links {
  
  align-items: center;
  gap: 24px;
}

.site-nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 200ms var(--ease);
}

.site-nav__links a:hover { color: var(--text); }

.site-nav__cta {
  background: var(--poke-yellow);
  color: var(--text) !important;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-weight: 600 !important;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
  border: 2px solid rgba(0,0,0,0.08);
}

.site-nav__cta:hover {
  background: #FFD633;
  transform: translateY(-1px);
}


/* ============ HERO ============ */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__content { max-width: 560px; }

.hero__headline {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero__headline--accent {
  color: var(--poke-blue);
}

.hero__sub {
  margin-top: 20px;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
  color: var(--text-2);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 16px 32px;
  background: var(--poke-red);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  border-radius: var(--radius-lg);
  transition: background 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.2);
}

.hero__cta:hover {
  background: #E60000;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 0, 0, 0.3);
}

.hero__meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-3);
}

/* Card stack in hero */
.hero__visual {
  
  justify-content: center;
  align-items: center;
}

.hero__card-stack {
  position: relative;
  width: clamp(240px, 30vw, 380px);
  aspect-ratio: 2.5/3.5;
}

.hero__card {
  position: absolute;
  width: 70%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 400ms var(--ease);
}

.hero__card--back {
  top: 0;
  left: 0;
  transform: rotate(-12deg);
  z-index: 1;
}

.hero__card--mid {
  top: 5%;
  right: 0;
  transform: rotate(8deg);
  z-index: 2;
}

.hero__card--front {
  top: 15%;
  left: 15%;
  transform: rotate(-3deg);
  z-index: 3;
}

.hero__card-stack:hover .hero__card--back { transform: rotate(-18deg) translateX(-10px); }
.hero__card-stack:hover .hero__card--mid { transform: rotate(14deg) translateX(10px); }
.hero__card-stack:hover .hero__card--front { transform: rotate(0deg) translateY(-8px); }


/* ============ APP SECTION (Upload/Process/Result/Error) ============ */
.app-section {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}

.upload-header { text-align: center; margin-bottom: 32px; }

.upload-header__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--text);
}

.upload-header__sub {
  margin-top: 8px;
  font-size: 16px;
  color: var(--text-2);
}

/* Mode toggle */
.mode-toggle {
  
  justify-content: center;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.mode-toggle__btn {
  padding: 10px 24px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 200ms var(--ease);
}

.mode-toggle__btn--active {
  background: var(--surface);
  color: var(--poke-blue);
  box-shadow: var(--shadow-sm);
}


/* ============ PHOTO SLOTS ============ */
.multi-upload {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.photo-slot__drop {
  
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 24px 16px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
  text-align: center;
}

.photo-slot__drop:hover,
.photo-slot__drop.is-dragover {
  border-color: var(--poke-blue);
  background: rgba(59, 76, 202, 0.04);
  transform: translateY(-2px);
}

.photo-slot__icon { color: var(--poke-blue); opacity: 0.6; }

.photo-slot__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.photo-slot__hint {
  font-size: 12px;
  color: var(--text-3);
}

.photo-slot__preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--poke-blue);
}

.photo-slot__thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.photo-slot__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  
  align-items: center;
  justify-content: center;
  transition: background 200ms var(--ease);
}

.photo-slot__remove:hover { background: var(--poke-red); }


/* Upload hint */
.upload-hint-global {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 16px;
}


/* Upload actions */
.upload-actions {
  
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}


/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms var(--ease);
}

.btn--primary {
  background: var(--poke-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 76, 202, 0.25);
}

.btn--primary:hover {
  background: var(--poke-dark-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 76, 202, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}

.btn--ghost:hover {
  background: var(--surface-alt);
  border-color: var(--border-hover);
}

.btn--share {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}

.btn--share:hover {
  background: var(--surface-alt);
}


/* ============ PROCESSING VIEW ============ */
.processing {
  
  gap: 32px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.processing__card-wrap {
  flex-shrink: 0;
  width: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--poke-yellow);
}

.processing__card-img {
  width: 100%;
  height: auto;
  display: block;
}

.processing__info { flex: 1; }

.processing__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

/* Progress steps */
.progress-steps {
  
  flex-direction: column;
  gap: 12px;
}

.progress-step {
  
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.progress-step__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  transition: all 300ms var(--ease);
  position: relative;
}

.progress-step.is-active .progress-step__dot {
  border-color: var(--poke-blue);
  background: rgba(59, 76, 202, 0.1);
  animation: pulse-dot 1.2s infinite;
}

.progress-step.is-done .progress-step__dot {
  border-color: var(--grade-good);
  background: var(--grade-good);
}

.progress-step.is-done .progress-step__dot::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 4px;
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 76, 202, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(59, 76, 202, 0); }
}

.progress-step__content {
  
  align-items: center;
  gap: 6px;
}

.progress-step__label {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}

.progress-step.is-active .progress-step__label { color: var(--poke-blue); font-weight: 600; }
.progress-step.is-done .progress-step__label { color: var(--grade-good); }

.progress-step__dots {
  font-size: 14px;
  color: var(--text-3);
}


/* ============ RESULT CONTAINER ============ */
.result-container {
  max-width: 720px;
  margin: 0 auto;
}

/* Certificate header */
.cert-header {
  text-align: center;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.cert-header__id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.cert-header__name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.cert-header__set {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

.cert-header__number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}


/* Multi-grader tabs */
.mg-tabs {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 20px;
}

.mg-tabs__bar {
  
  border-bottom: 1px solid var(--border);
}

.mg-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 200ms var(--ease);
  border-bottom: 3px solid transparent;
}

.mg-tab:hover { color: var(--text-2); background: var(--surface-alt); }

.mg-tab--active {
  color: var(--poke-blue);
  border-bottom-color: var(--poke-blue);
}

.mg-tab__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mg-tab__dot--psa { background: #DC2626; }
.mg-tab__dot--bgs { background: #2563EB; }
.mg-tab__dot--cgc { background: #7C3AED; }

.mg-panel { display: none; padding: 32px; }
.mg-panel--active { display: block; }

.mg-final {
  text-align: center;
  margin-bottom: 24px;
}

.mg-final__circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  
  align-items: center;
  justify-content: center;
  /* Pokemon card-style border */
  background: var(--bg-warm);
  border: 4px solid var(--poke-yellow);
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px currentColor,
    0 8px 24px rgba(0,0,0,0.1);
}

.mg-final__circle.animate {
  animation: grade-pop 600ms var(--ease) both;
}

@keyframes grade-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.mg-final__value {
  font-size: 42px;
  font-weight: 800;
  color: inherit;
}

.mg-final__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.mg-final__name {
  font-size: 18px;
  font-weight: 700;
  color: inherit;
  margin-top: 4px;
}

.mg-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-3);
  font-size: 14px;
}


/* Sub-grades */
.sub-grades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sub-grade {
  text-align: center;
  padding: 16px 8px;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.sub-grade__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.sub-grade__value {
  font-size: 24px;
  font-weight: 700;
}


/* Centering detail */
.centering-detail {
  
  gap: 16px;
  justify-content: center;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.centering-detail__item {
  
  align-items: center;
  gap: 8px;
}

.centering-detail__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.centering-detail__value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}


/* Radar chart */
.radar-wrap {
  
  justify-content: center;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}


/* Defect section */
.defect-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 20px;
}

.defect-section__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.defect-overlay {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.defect-overlay__img {
  width: 100%;
  height: auto;
}

.defect-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  font-size: 12px;
  font-weight: 700;
  color: white;
  
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.defect-pin[data-severity="minor"] { background: var(--grade-mid); }
.defect-pin[data-severity="moderate"] { background: #F97316; }
.defect-pin[data-severity="major"] { background: var(--poke-red); }

.defect-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: var(--text);
  color: white;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}

.defect-pin:hover .defect-tooltip { opacity: 1; }

.defect-list {
  list-style: none;
  
  flex-direction: column;
  gap: 8px;
}

.defect-list__item {
  
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-2);
}

.defect-list__badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.defect-list__badge--minor { background: #FEF3C7; color: #92400E; }
.defect-list__badge--moderate { background: #FFEDD5; color: #9A3412; }
.defect-list__badge--major { background: #FEE2E2; color: #991B1B; }


/* Confidence bar */
.confidence {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.confidence__header {
  
  justify-content: space-between;
  margin-bottom: 10px;
}

.confidence__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.confidence__value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--poke-blue);
}

.confidence__track {
  height: 8px;
  background: var(--surface-alt);
  border-radius: 4px;
  overflow: hidden;
}

.confidence__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--poke-blue), var(--poke-yellow));
  border-radius: 4px;
  transition: width 600ms var(--ease);
}


/* Photos analyzed */
.photos-analyzed {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  padding: 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}


/* Comps section */
.comps-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 20px;
}

.comps-section__title {
  
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.comps-list {
  list-style: none;
  
  flex-direction: column;
  gap: 8px;
}

.comp-item {
  
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.comp-item__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.comp-item__date {
  font-size: 12px;
  color: var(--text-3);
}

.comp-item__price {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--grade-good);
}


/* Duration */
.duration {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 20px;
}

.duration__value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-2);
}


/* Result errors/warnings */
.result-errors {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.result-errors__title {
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 8px;
}

.result-errors__item {
  font-size: 13px;
  color: #78350F;
  padding: 4px 0;
}


/* Result actions */
.result-actions {
  
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 16px;
}


/* Disclaimer */
.disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  padding: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}


/* ============ ERROR CARD ============ */
.error-card {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.error-card__icon { color: var(--poke-red); margin-bottom: 16px; }

.error-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.error-card__msg {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 24px;
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}


/* ============ BULK UPLOAD ============ */
.bulk-drop {
  
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
  padding: 32px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 200ms var(--ease);
  text-align: center;
}

.bulk-drop:hover,
.bulk-drop.is-dragover {
  border-color: var(--poke-blue);
  background: rgba(59, 76, 202, 0.04);
}

.bulk-drop__icon { color: var(--poke-blue); opacity: 0.5; }
.bulk-drop__label { font-size: 16px; font-weight: 600; color: var(--text); }
.bulk-drop__hint { font-size: 13px; color: var(--text-3); }

.bulk-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bulk-preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.bulk-preview-item__img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.bulk-preview-item__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 14px;
  cursor: pointer;
  
  align-items: center;
  justify-content: center;
}

.bulk-preview-item__status {
  padding: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.bulk-preview-item__status--pending { color: var(--text-3); }
.bulk-preview-item__status--grading { color: var(--poke-blue); }
.bulk-preview-item__status--done { color: var(--grade-good); }
.bulk-preview-item__status--error { color: var(--poke-red); }

.bulk-actions {
  
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

.bulk-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}


/* Bulk progress */
.bulk-progress {
  text-align: center;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.bulk-progress__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.bulk-progress__bar-wrap {
  height: 10px;
  background: var(--surface-alt);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
}

.bulk-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--poke-blue), var(--poke-yellow));
  border-radius: 5px;
  transition: width 400ms var(--ease);
  width: 0;
}

.bulk-progress__current {
  font-size: 13px;
  color: var(--text-3);
}


/* Bulk results */
.bulk-results { margin-top: 24px; }

.bulk-results__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}

.bulk-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.bulk-result-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.bulk-result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.bulk-result-card--error {
  border: 1px solid #FCA5A5;
}

.bulk-result-card__img-wrap {
  background: var(--surface-alt);
}

.bulk-result-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.bulk-result-card__info { padding: 14px; }

.bulk-result-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-result-card__set {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.bulk-result-card__grade-row {
  
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.bulk-result-card__grade-label {
  font-size: 13px;
  color: var(--text-2);
}

.bulk-result-card__grade-badge {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.bulk-result-card__sub-grades {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 10px;
}

.bulk-result-card__sub {
  text-align: center;
}

.bulk-result-card__sub-label {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
}

.bulk-result-card__sub-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.bulk-result-card__error-text {
  font-size: 13px;
  color: var(--poke-red);
  padding: 8px 0;
}

.bulk-results__actions {
  
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}


/* Bulk modal */
.bulk-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 200;
  
  align-items: center;
  justify-content: center;
}

.bulk-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}

.bulk-modal__dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  max-width: 600px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1;
}

.bulk-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-alt);
  color: var(--text-2);
  font-size: 20px;
  cursor: pointer;
  
  align-items: center;
  justify-content: center;
}

.bulk-modal__close:hover { background: var(--border); }


/* ============ HOW SECTION ============ */
.how-section {
  background: var(--surface);
  padding: clamp(48px, 8vw, 96px) 0;
  border-top: 1px solid var(--border);
}

.how-section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.how-section__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.how-item {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.how-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.how-item__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
}

.how-item__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--poke-blue);
  margin-bottom: 8px;
}

.how-item__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}


/* ============ FAQ ============ */
.faq-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
}

.faq-section__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 200ms var(--ease);
}

.faq-item[open] {
  border-color: var(--poke-blue);
}

.faq-item__q {
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  
  align-items: center;
  justify-content: space-between;
}

.faq-item__q::-webkit-details-marker { display: none; }

.faq-item__q::after {
  content: '+';
  font-size: 20px;
  color: var(--poke-blue);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 200ms var(--ease);
}

.faq-item[open] .faq-item__q::after {
  transform: rotate(45deg);
}

.faq-item__a {
  padding: 0 24px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}


/* ============ FOOTER ============ */
.site-foot {
  border-top: 1px solid var(--border);
  padding: clamp(32px, 5vw, 56px) 0 40px;
  background: var(--surface);
}

.site-foot__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.site-foot__row {
  
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.site-foot__row a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 200ms var(--ease);
}

.site-foot__row a:hover { color: var(--poke-blue); }

.site-foot__tagline {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.site-foot__legal {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}


/* ============ FADE-IN ANIMATION ============ */
.fade-in {
  animation: fadeIn 400ms var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ============ FINAL-GRADE (used in bulk modal) ============ */
.final-grade {
  text-align: center;
}

.final-grade__circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 12px;
  
  align-items: center;
  justify-content: center;
  background: var(--bg-warm);
  border: 4px solid var(--poke-yellow);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor;
}

.final-grade__value {
  font-size: 36px;
  font-weight: 800;
}

.final-grade__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.final-grade__name {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}


/* Caps section (used in reports) */
.caps-section {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.caps-list {
  list-style: none;
  
  flex-direction: column;
  gap: 6px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}


/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content { max-width: 100%; }
  .hero__visual { order: -1; }
  .hero__card-stack { width: 280px; }

  .multi-upload { grid-template-columns: 1fr; }

  .how-grid { grid-template-columns: repeat(2, 1fr); }

  .processing {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .processing__card-wrap { width: 160px; }
}

@media (max-width: 600px) {
  .site-nav__links a:not(.site-nav__cta) { display: none; }

  .hero__headline { font-size: 26px; }
  .hero__card-stack { width: 220px; }

  .how-grid { grid-template-columns: 1fr; }

  .sub-grades { grid-template-columns: repeat(2, 1fr); }

  .centering-detail { flex-wrap: wrap; justify-content: center; }

  .bulk-results-grid { grid-template-columns: 1fr; }

  .mg-tab { font-size: 12px; padding: 10px 8px; }
}

@media (max-width: 400px) {
  .hero__card-stack { width: 180px; }
  .mg-final__circle { width: 90px; height: 90px; }
  .mg-final__value { font-size: 32px; }
}


/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
