/* ============ Pokémon Card Value Checker ============ */
:root {
  --navy: #101a33;
  --navy-soft: #3d4a6b;
  --muted: #5a6480;
  --bg: #ffffff;
  --bg-soft: #f5f6f9;
  --bg-softer: #fafbfd;
  --border: #e3e7ef;
  --yellow: #ffcb05;
  --yellow-deep: #f2b705;
  --yellow-soft: #fff8dc;
  --ink-on-yellow: #191500;
  --blue-link: #2451b8;
  --good: #157f3d;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(16, 26, 51, 0.08);
  --shadow-md: 0 8px 28px rgba(16, 26, 51, 0.10);
  --font-head: 'Sora', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Outfit', 'Segoe UI', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue-link); }
a:hover { color: #183a85; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; letter-spacing: -0.015em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 3px solid #ffc91f; outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); min-width: 0; overflow: hidden; }
.brand svg { flex-shrink: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.brand-name span { color: #a17c00; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { text-decoration: none; color: var(--navy-soft); font-weight: 500; font-size: 0.98rem; }
.main-nav a:hover { color: var(--navy); }
.main-nav a.active { color: var(--navy); font-weight: 600; }

.nav-toggle {
  display: none; position: relative; z-index: 130;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  width: 44px; height: 44px; cursor: pointer; flex-shrink: 0;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--navy); }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute; top: 62px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    padding: 14px 20px 20px; gap: 6px;
    box-shadow: var(--shadow-md);
  }
  .nav-open .main-nav { display: flex; }
  .main-nav a { font-size: 1.08rem; padding: 10px 4px; width: 100%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 1.05rem;
  border: none; border-radius: var(--radius); cursor: pointer;
  text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-yellow {
  background: var(--yellow); color: var(--ink-on-yellow);
  box-shadow: 0 3px 0 #d9a800, 0 6px 16px rgba(242, 183, 5, 0.35);
}
.btn-yellow:hover { background: var(--yellow-deep); transform: translateY(-1px); }
.btn-yellow:active { transform: translateY(1px); box-shadow: 0 1px 0 #d9a800; }
.btn-lg { padding: 16px 30px; font-size: 1.18rem; }
.btn-md { padding: 12px 22px; font-size: 1rem; }
.btn-ghost {
  background: #fff; color: var(--navy); border: 1.5px solid var(--border);
  padding: 11px 20px; font-size: 0.98rem;
}
.btn-ghost:hover { border-color: var(--navy-soft); background: var(--bg-softer); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.also-found { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.also-found .also-found-btn { width: 100%; }

.linklike {
  background: none; border: none; font-family: var(--font-body);
  color: var(--blue-link); font-size: 0.97rem; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  padding: 10px 8px;
}
.linklike:hover { color: #183a85; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 26px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; }
.hero h1 .accent { color: #b98d00; position: relative; }
.hero-sub { font-size: clamp(1.06rem, 2vw, 1.25rem); color: var(--navy-soft); margin: 18px 0 8px; max-width: 34em; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 22px; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { width: 17px; height: 17px; stroke: var(--good); flex-shrink: 0; }

.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 340px; height: auto; }

@media (max-width: 860px) {
  .hero { padding: 30px 0 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-art { display: none; }
  .hero-sub { margin-bottom: 4px; }
  .hero-note { margin-bottom: 10px; }
}

/* ---------- Tool card ---------- */
.tool-section { padding: 14px 0 30px; }
.tool-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 26px;
  max-width: 720px;
}
.tool-card.page-top { margin: 0 auto 8px; }
@media (max-width: 680px) { .tool-card { padding: 18px 16px; border-radius: 16px; } }

.tool-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.08rem; font-weight: 700; margin-bottom: 16px; }
.tool-title svg { width: 22px; height: 22px; stroke: var(--navy); flex-shrink: 0; }

/* mode switching: mobile defaults to photo, desktop to typed */
.mode-typed { display: none; }
.mode-photo { display: block; }
@media (min-width: 768px) {
  .mode-typed { display: block; }
  .mode-photo { display: none; }
}
body[data-mode="photo"] .mode-typed { display: none; }
body[data-mode="photo"] .mode-photo { display: block; }
body[data-mode="typed"] .mode-typed { display: block; }
body[data-mode="typed"] .mode-photo { display: none; }

.photo-actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: center; }
.photo-actions .linklike { display: block; }

.typed-form { display: flex; flex-direction: column; gap: 12px; }
.typed-row { display: flex; gap: 12px; flex-wrap: wrap; }
.typed-row .field-grow { flex: 1 1 260px; }
.typed-form input[type="text"], .typed-form select {
  font-family: var(--font-body); font-size: 1.05rem; color: var(--navy);
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--bg-softer); width: 100%;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.typed-form input:focus, .typed-form select:focus {
  outline: none; border-color: #e5b800; box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.3); background: #fff;
}
.typed-form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23101a33' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.grade-label { font-size: 0.88rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 6px; }
.typed-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Progress ---------- */
.progress-box { margin-top: 4px; }
.lookup-thumb-row { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.lookup-thumb {
  width: 84px; height: 118px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); flex-shrink: 0;
  background: var(--bg-soft);
}
.lookup-thumb-label { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 500; transition: color 0.2s ease; }
.steps .dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.steps li.active { color: var(--navy); font-weight: 600; }
.steps li.active .dot { border-color: var(--yellow-deep); background: var(--yellow); animation: pulse 1.1s ease-in-out infinite; }
.steps li.done { color: var(--navy-soft); }
.steps li.done .dot { border-color: var(--good); background: var(--good); }
.steps li.done .dot::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 183, 5, 0.5); } 50% { box-shadow: 0 0 0 7px rgba(242, 183, 5, 0); } }

/* ---------- Result ---------- */
.result-box { margin-top: 6px; }
.result-card-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 18px; }
.result-card-name { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; }
.result-card-line .linklike { padding: 4px 6px; font-size: 0.9rem; }

.range-block { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.range-block.graded { background: var(--yellow-soft); }
.range-label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.range-value { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -0.02em; color: var(--navy); }
.range-count { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }
.graded-list { display: flex; flex-direction: column; gap: 10px; }
.graded-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.graded-row .g-name { font-weight: 700; }
.graded-row .g-val { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.graded-row .g-count { font-size: 0.82rem; color: var(--muted); display: block; font-weight: 500; }

.sources h3, .sell h3 { font-size: 1.02rem; margin: 22px 0 12px; }
.source-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 9px; background: #fff;
  text-decoration: none; color: var(--navy);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.source-row:hover { border-color: #c9d2e4; box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--navy); }
.source-price { font-family: var(--font-head); font-weight: 800; font-size: 1.08rem; min-width: 74px; }
.tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 9px; border-radius: 999px; flex-shrink: 0; }
.tag-sold { background: #e2f4e8; color: var(--good); }
.tag-listed { background: #e8eefc; color: #2451b8; }
.tag-market { background: #efe6fb; color: #6b3fa0; }
.tag-grade { background: #fdf1c9; color: #7a5c00; }
.source-site { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.94rem; min-width: 0; overflow-wrap: anywhere; }
.source-site svg { width: 15px; height: 15px; stroke: var(--muted); flex-shrink: 0; }

.sell-links { display: flex; flex-direction: column; gap: 9px; }
.sell-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px;
  text-decoration: none; color: var(--navy); background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.sell-row:hover { border-color: #c9d2e4; box-shadow: var(--shadow-sm); color: var(--navy); }
.sell-row strong { font-size: 0.98rem; }
.sell-row span.desc { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.sell-row .site-chip { font-size: 0.8rem; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; flex-shrink: 0; }

.notice-box {
  border-radius: var(--radius); padding: 18px; margin-top: 8px;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.notice-box.warn { background: #fff7e2; border-color: #f0dfa8; }
.notice-box p { font-weight: 500; margin-bottom: 8px; }
.notice-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.result-fine { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-soft { background: var(--bg-soft); }
.section h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 10px; }
.section .section-intro { color: var(--navy-soft); max-width: 46em; margin-bottom: 26px; }
.center { text-align: center; }
.center .section-intro { margin-left: auto; margin-right: auto; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.step-num { width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); color: var(--ink-on-yellow); font-family: var(--font-head); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.step-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step-card p { font-size: 0.95rem; color: var(--navy-soft); }
.step-card svg.step-icon { width: 30px; height: 30px; stroke: var(--navy); margin-bottom: 12px; }

@media (max-width: 760px) { .steps-grid { grid-template-columns: 1fr; } }

.factor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px) { .factor-grid { grid-template-columns: 1fr; } }
.factor-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.factor-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin-bottom: 8px; }
.factor-card h3 svg { width: 22px; height: 22px; stroke: #b98d00; flex-shrink: 0; }
.factor-card p { font-size: 0.94rem; color: var(--navy-soft); }

.sell-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .sell-grid { grid-template-columns: 1fr; } }
.sell-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.sell-card .site-chip { font-size: 0.8rem; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; }
.sell-card h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.sell-card p { font-size: 0.94rem; color: var(--navy-soft); }

/* ---------- Article / question page ---------- */
.quick-answer { background: var(--yellow-soft); border: 1px solid #f0dfa8; border-radius: var(--radius); padding: 20px 22px; margin: 22px 0 26px; }
.quick-answer h2 { font-size: 1.15rem; margin-bottom: 8px; }
.quick-answer p { font-size: 1rem; color: var(--navy); }
.prose h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 38px 0 12px; }
.prose h3 { font-size: 1.12rem; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--navy-soft); font-size: 1.02rem; margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--navy); }
.prose code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 0.9em; }
.check-list { list-style: none; padding-left: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list svg { width: 19px; height: 19px; stroke: var(--good); flex-shrink: 0; margin-top: 4px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 17px 20px;
  font-weight: 600; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; width: 11px; height: 11px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.18s ease; flex-shrink: 0; margin-top: -4px; }
.faq-item[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--navy-soft); font-size: 0.98rem; }

/* ---------- Hero card fan (real cards) ---------- */
.hero-card-fan { position: relative; width: 340px; max-width: 82vw; height: 322px; margin: 0 auto; }
.fan-card {
  position: absolute; width: 60%; aspect-ratio: 5 / 7; object-fit: cover;
  border-radius: 14px; border: 3px solid #fff; background: #fff;
  box-shadow: 0 16px 36px rgba(16, 26, 51, 0.24);
}
.fan-left { left: 0; top: 9%; transform: rotate(-9deg); }
.fan-right { right: 0; top: 9%; transform: rotate(9deg); }
.fan-center { left: 50%; top: 0; transform: translateX(-50%); width: 64%; z-index: 2; }
.fan-mobile { display: none; width: 260px; height: 250px; margin: 20px auto 0; }
@media (max-width: 860px) {
  .fan-mobile { display: block; }
}

/* ---------- Most-checked cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 760px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
.card-tile {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm); cursor: pointer; text-align: left;
  font-family: var(--font-body); display: flex; flex-direction: column; gap: 3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tile-photo {
  width: 100%; aspect-ratio: 5 / 7; object-fit: cover;
  border-radius: 10px; background: var(--bg-soft); margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(16, 26, 51, 0.14);
}
.tile-name { font-weight: 700; font-size: 0.98rem; color: var(--navy); line-height: 1.3; }
.tile-set { font-size: 0.85rem; color: var(--muted); }
.tile-cta { font-size: 0.9rem; font-weight: 700; color: var(--blue-link); text-decoration: underline; text-underline-offset: 3px; margin-top: 7px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; border-radius: 18px; padding: 40px 30px; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #c4cce2; margin-bottom: 22px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 34px 0 40px; margin-top: 40px; }
.footer-inner { text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { color: var(--navy-soft); font-weight: 500; text-decoration: none; font-size: 0.94rem; }
.footer-links a:hover { color: var(--navy); text-decoration: underline; }
.footer-disclaimer { color: var(--muted); font-size: 0.86rem; max-width: 44em; margin: 0 auto 14px; }
.footer-fine { color: var(--muted); font-size: 0.82rem; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.mt-lg { margin-top: 30px; }
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 800; }
