/* トレカ買取価格比較 — 公開サイト共通スタイル（Next.js 版の配色を踏襲） */
:root {
  --paper: #F7F5F1; --white: #fff;
  --line: #E6E2D9; --line-input: #D8DEE3;
  --ink-900: #14181C; --ink-800: #1E2226; --ink-600: #5B6169; --ink-400: #8B9098; --ink-300: #ADA89B;
  --brand-50: #EAF0F5; --brand-100: #D3E0EA; --brand-400: #3D6690; --brand-500: #1C3D5F; --brand-600: #12293F;
  --pos-50: #EAF5EE; --pos-200: #BFE0CC; --pos-500: #1F7A56;
  --notice-50: #FBF3DE; --notice-200: #E9D9A8; --notice-700: #6B5313;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink-800);
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 15px; line-height: 1.7;
}
a { color: var(--brand-500); }
a:hover { color: var(--brand-600); }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 32px; padding-bottom: 48px; }
.muted { color: var(--ink-400); font-weight: 500; }
.small { font-size: 13px; }

/* header / footer */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.logo-main { font-size: 19px; font-weight: 700; color: var(--brand-600); }
.logo-game { font-size: 13px; font-weight: 700; color: var(--white); background: var(--brand-500); border-radius: 999px; padding: 1px 10px; }
.header-nav { display: flex; gap: 18px; font-size: 14px; }
.header-nav a { color: var(--ink-600); text-decoration: none; }
.header-nav a:hover { color: var(--brand-500); text-decoration: underline; }
.pr-bar { background: var(--brand-50); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-600); padding: 5px 0; }
.site-footer { border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-400); padding: 20px 0; }
.site-footer p { margin: 0 0 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { color: var(--ink-600); }
.copy { margin-top: 12px !important; }

/* headings */
.h1 { font-size: 24px; color: var(--ink-900); margin: 0 0 16px; }
.h2 { font-size: 15px; font-weight: 700; color: var(--ink-900); margin: 32px 0 12px; }
.hero { text-align: center; margin: 8px 0 32px; }
.hero h1 { font-size: clamp(22px, 4vw, 30px); color: var(--ink-900); margin: 0 0 6px; }
.lead { color: var(--ink-600); font-size: 14px; margin: 0 0 22px; }

/* search */
.search {
  display: flex; align-items: center; max-width: 620px; margin: 0 auto; overflow: hidden;
  background: var(--white); border: 1.5px solid var(--brand-500); border-radius: var(--radius);
  box-shadow: 0 8px 24px -6px rgba(18, 41, 63, .12);
}
.search svg { margin-left: 14px; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 14px 10px; font: inherit; font-size: 15px; background: transparent; color: var(--ink-900); }
.search button { align-self: stretch; border: 0; padding: 0 26px; background: var(--brand-500); color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.search button:hover { background: var(--brand-600); }

/* portal */
.games { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.game { display: flex; flex-direction: column; gap: 2px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); text-decoration: none; height: 100%; }
.game-active:hover { border-color: var(--brand-400); }
.game-name { font-size: 18px; font-weight: 700; color: var(--ink-900); }
.game-meta { font-size: 13px; color: var(--ink-600); }
.game-soon { opacity: .6; }

/* tiles */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink-800); }
.tile:hover { border-color: var(--brand-400); }
.tile-link { display: flex; flex-direction: column; gap: 2px; flex: 1; text-decoration: none; color: inherit; }
.tile-img { width: 100%; aspect-ratio: 5 / 7; object-fit: contain; border-radius: 8px; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); margin-bottom: 8px; }
.tile-name { font-weight: 700; font-size: 14px; color: var(--ink-900); line-height: 1.4; }
.tile-sub, .tile-meta { font-size: 12px; color: var(--ink-400); }
.tile-price { font-weight: 700; color: var(--pos-500); font-size: 14px; font-variant-numeric: tabular-nums; }
.card-img-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.noimg-text { font-size: 11px; color: var(--ink-400); }
/* 駿河屋アフィリエイトのタグ（中身は加工しない）。外側の枠で大きさだけ整える */
.sg-img { display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
/* 駿河屋の広告画像に「PR」マーク（タグには触らず、外側の枠に CSS で重ねる） */
.sg-img::after { content: "PR"; position: absolute; top: 4px; left: 4px; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .04em; color: #fff; background: rgba(60, 66, 76, .72); border-radius: 3px; padding: 2px 4px; pointer-events: none; }
.sg-img a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.sg-img img { max-width: 100%; max-height: 100%; }

/* search results */
.result-list { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.result-list li + li { border-top: 1px solid var(--line); }
.result-row { display: flex; align-items: center; }
.result-row .result { flex: 1; min-width: 0; }
.result-thumb { width: 44px; height: 62px; flex-shrink: 0; margin-left: 12px; border-radius: 4px; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); }
.result-thumb.card-img-empty svg { width: 20px; height: 20px; }
.result-thumb .noimg-text { display: none; }
.result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink-800); }
.result:hover { background: rgba(234, 240, 245, .6); }
.result-main { display: flex; flex-direction: column; min-width: 0; }
.result-name { color: var(--ink-900); font-weight: 500; }
.result-sub { font-size: 12px; color: var(--ink-400); }
.result-price { flex-shrink: 0; text-align: right; font-weight: 700; color: var(--pos-500); font-variant-numeric: tabular-nums; }
.result-price small { display: block; font-size: 11px; color: var(--ink-400); font-weight: 500; }
.result-none { flex-shrink: 0; font-size: 12px; color: var(--ink-300); }
.empty { padding: 28px; text-align: center; font-size: 14px; color: var(--ink-600); border: 1px dashed var(--line); border-radius: var(--radius); }

/* card page */
.crumbs { font-size: 13px; color: var(--ink-400); margin-bottom: 14px; }
.crumbs a { color: var(--brand-500); font-weight: 700; text-decoration: none; }
.card-head { display: flex; gap: 20px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.card-head .card-img { width: 120px; height: 168px; flex-shrink: 0; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); }
.card-info { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.card-info h1 { font-size: clamp(19px, 3.2vw, 24px); color: var(--ink-900); margin: 0; line-height: 1.4; }
.set-code { font-size: .7em; color: var(--ink-600); font-weight: 500; }
.card-info p { margin: 0; }
.best { font-size: 14px; color: var(--ink-600); }
.best strong { font-size: 22px; color: var(--pos-500); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; width: fit-content; margin-top: 4px; padding: 6px 14px; border-radius: 999px; background: var(--brand-50); color: var(--brand-500); font-size: 13px; font-weight: 700; text-decoration: none; }
.pill:hover { background: var(--brand-100); }
body.hide-ambiguous .ambiguous { display: none; }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 12px; font-size: 13px; color: var(--ink-600); }
.controls select { margin-left: 8px; padding: 7px 10px; border: 1px solid var(--line-input); border-radius: 8px; font: inherit; background: var(--white); color: var(--ink-900); }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { accent-color: var(--brand-500); width: 16px; height: 16px; }

.regions { margin-bottom: 14px; background: var(--white); border: 1px solid var(--line-input); border-radius: 8px; font-size: 13px; }
.regions summary { padding: 10px 14px; cursor: pointer; font-weight: 500; color: var(--ink-900); }
.region-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding: 14px; border-top: 1px solid var(--line); }
.pref { font-weight: 700; color: var(--ink-900); }
.cities { margin: 4px 0 0 24px; display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--ink-600); font-size: 12px; }

.prices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.price.is-top { background: var(--pos-50); border-color: var(--pos-200); }
.price.is-history { background: transparent; border-style: dashed; }
.price.is-history .yen { color: var(--ink-400); }
body:not(.show-history) .price.is-history { display: none; }
.price[hidden] { display: none !important; }
.price-main { flex: 1 1 320px; min-width: 0; }
.shop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.shop a { text-decoration: none; }
.shop a:hover { text-decoration: underline; }
.badge { font-size: 11px; font-weight: 700; color: var(--white); background: var(--pos-500); border-radius: 999px; padding: 1px 9px; }
.badge-old { background: var(--ink-300); }
.badge-unopened { background: var(--brand-500); }
.meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px; font-size: 12px; color: var(--ink-600); }
.meta a { color: var(--ink-600); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.meta a:hover { text-decoration: underline; }
.price-side { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.yen { font-size: 24px; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.note { margin-top: 18px; font-size: 12px; color: var(--ink-400); }

.report { position: relative; }
.report summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--line-input); border-radius: 8px; font-size: 12px; color: var(--ink-400); background: var(--white); }
.report summary::-webkit-details-marker { display: none; }
.report summary:hover { color: var(--ink-600); border-color: var(--ink-400); }
.report-form { position: absolute; right: 0; z-index: 10; margin-top: 8px; width: 260px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px -8px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.report-title { margin: 0; font-weight: 700; color: var(--ink-900); }
.report-form select, .report-form textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--line-input); border-radius: 6px; font: inherit; font-size: 12px; }
.report-form button { align-self: flex-end; border: 0; border-radius: 6px; padding: 6px 14px; background: var(--brand-500); color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.report-msg { margin: 0; font-size: 12px; color: #B42318; }
.report-msg.ok { color: var(--pos-500); }

/* forms / misc */
.flash { padding: 12px 16px; border-radius: var(--radius); background: var(--pos-50); border: 1px solid var(--pos-200); color: var(--pos-500); font-size: 14px; }
.errors { padding: 12px 16px 12px 32px; border-radius: var(--radius); background: #FEF3F2; border: 1px solid #FECDCA; color: #B42318; font-size: 14px; }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-900); }
.form input, .form textarea { padding: 10px 12px; border: 1px solid var(--line-input); border-radius: 8px; font: inherit; background: var(--white); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand-100); border-color: var(--brand-500); }
.req { margin-left: 6px; font-size: 11px; color: #B42318; }
.btn { align-self: flex-start; border: 0; border-radius: 8px; padding: 10px 24px; background: var(--brand-500); color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--brand-600); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.prose { max-width: 720px; font-size: 14px; }
.prose h2 { font-size: 16px; color: var(--ink-900); margin-top: 28px; }
.section + .section { margin-top: 8px; }

@media (max-width: 560px) {
  .card-head { gap: 14px; padding: 14px; }
  .card-head .card-img { width: 76px; height: 106px; }
  .search button { padding: 0 18px; }
  .yen { font-size: 21px; }
  .report-form { width: min(260px, calc(100vw - 48px)); }
}

/* 表示期間の切り替え（トップ・検索結果） */
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 4px; font-size: 13px; color: var(--ink-600); }
.period-bar select { margin-left: 8px; padding: 7px 10px; border: 1px solid var(--line-input); border-radius: 8px; font: inherit; background: var(--white); color: var(--ink-900); }
.period-bar button { padding: 7px 12px; border: 1px solid var(--line-input); border-radius: 8px; font: inherit; background: var(--white); cursor: pointer; }
