/*
Theme Name: 買取ランキング（kaitori-navi-ranking）
Theme URI: http://kaitori-ranking.local/
Author: 買取ランキング
Description: 買取ランキングサイト用の専用テーマ。TOP 確定版デザイン（2026-10-10、2026-10-11 改訂）に準拠。紺・白を基調に、1位ゴールド、買取率は緑、買取金額は赤、差額は黒。ランキング本体はプラグイン kaitori-ranking、予約・抽選エリアはプラグイン kaitori-reserve が出力し、このテーマは枠と見た目を提供する。
Version: 0.4.35
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kaitori-navi-ranking
*/

/* ====================================================================
   1. 配色（デザイン仕様_確定版 1章。この6色＋補助色だけを使う）
   ==================================================================== */
:root {
  --kr-white: #FFFFFF;
  --kr-page-pc: #F6F8FB;      /* PC版のページ地だけ薄いグレー。カードは白 */
  --kr-navy: #0F2A4A;         /* メインカラー */
  --kr-blue: #1D4ED8;         /* リンク */
  --kr-blue-hover: #1E40AF;
  --kr-green: #15803D;        /* 買取率 */
  --kr-red: #C81E1E;          /* 買取金額 */
  --kr-gold: #D4AF37;         /* 1位 */
  --kr-label-red: #DC2626;    /* 最新情報・抽選のラベル */
  --kr-text: #0F172A;         /* 本文・差額 */
  --kr-sub: #64748B;          /* 日付・注記・更新日時 */
  --kr-sub2: #334155;         /* 4位以下のバッジ文字・URL未設定の店名 */
  --kr-muted: #94A3B8;        /* 「定価未登録」 */
  --kr-line: #E2E8F0;         /* 罫線 */
  --kr-line2: #F1F5F9;
  --kr-badge-bg: #EEF2F7;     /* 4位以下のバッジ地 */
  --kr-input-line: #CBD5E1;
  --kr-nav-sub: #C9D6E6;      /* PCヘッダーの非選択メニュー */
  --kr-font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  --kr-max: 1120px;
  color-scheme: light;
}

/* ====================================================================
   2. 基本（文字は Noto Sans JP、太さは 400／500／700 のみ。装飾・影・グラデーションなし）
   ==================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--kr-white);
  color: var(--kr-text);
  font-family: var(--kr-font);
  font-size: 15px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  padding-bottom: 80px; /* 下部固定ナビ 64px ＋ 余白（4-8） */
}
a { color: var(--kr-blue); }
a:hover { color: var(--kr-blue-hover); }
img { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.kr-wrap { max-width: var(--kr-max); margin: 0 auto; padding: 0 12px; }

/* ====================================================================
   3. ヘッダー（4-2 スマホ 52px、5-2 PC 60px）
   ==================================================================== */
.kr-header { background: var(--kr-navy); color: var(--kr-white); }
.kr-header .kr-wrap { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kr-brand { display: flex; align-items: center; gap: 8px; color: var(--kr-white); text-decoration: none; }
.kr-brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--kr-white); color: var(--kr-navy); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.kr-brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.04em; }
.kr-brand-logo { height: 26px; width: auto; }
.kr-pcnav { display: none; }
/* 0.4.34（2026-11-08）：飾りのボール2つ（ユーザーが AI で作った写真をもとにした平たい絵）。0.4.33 ではヘッダーの右だったが、ユーザーが丸で示した「トップの予約・抽選カレンダーの題名の右」へ移した。下の見方の札（c3-key）の真上。明るい地なので紺の縁取りを付けた */
.kr-top .krs-top-cal .krs-cal3 > .sh { position: relative; }
.kr-top .krs-top-cal .krs-cal3 > .sh::after { content: ""; position: absolute; top: 6px; right: 14px; width: 69px; height: 44px; pointer-events: none; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 96'><circle cx='41' cy='53' r='38.5' fill='%230F2A4A'/><circle cx='41' cy='53' r='35.75' fill='%23fff'/><path d='M5.25 53A35.75 35.75 0 0 1 76.75 53Z' fill='%23E5484D'/><path d='M4 53H78' stroke='%230F2A4A' stroke-width='8.1'/><circle cx='41' cy='53' r='13' fill='%230F2A4A'/><circle cx='41' cy='53' r='7.3' fill='%23fff'/><circle cx='102' cy='48' r='47' fill='%230F2A4A'/><circle cx='102' cy='48' r='44' fill='%23fff'/><path d='M58 48A44 44 0 0 1 146 48Z' fill='%23E5484D'/><path d='M57 48H147' stroke='%230F2A4A' stroke-width='10'/><circle cx='102' cy='48' r='16' fill='%230F2A4A'/><circle cx='102' cy='48' r='9' fill='%23fff'/></svg>") no-repeat center / contain; }
/* 0.4.35（2026-11-08）：PC は右の空きが広いので、横の真ん中に置く（ユーザー「PC版は空きスペースがおおいから、真ん中にもってきてほしい」）。スマホは札の真上のまま */
@media (min-width: 768px) { .kr-top .krs-top-cal .krs-cal3 > .sh::after { right: auto; left: 50%; transform: translateX(-50%); } }

/* ====================================================================
   4. お知らせ帯（4-3 スマホ、5-3 PC）。表示対象がなければ帯ごと出さない
   ==================================================================== */
/* 0.4.27：締切間近の1行（お知らせ帯の上。赤いラベル。あるときはお知らせ帯のラベルを灰色にする） */
.kr-deadline { margin: 10px 0 0; border: 1px solid var(--kr-line); border-radius: 10px; display: flex; overflow: hidden; background: var(--kr-white); }
.kr-deadline-label { width: 54px; flex: none; background: var(--kr-label-red); color: var(--kr-white); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; }
.kr-deadline-text { flex: 1; min-width: 0; padding: 8px 10px; font-size: 13px; line-height: 1.5; text-decoration: underline; }
.kr-deadline-text b { color: var(--kr-label-red); }
.kr-deadline + .kr-notice { margin-top: 6px; }
.kr-deadline + .kr-notice .kr-notice-label { background: #64748b; }
.kr-notice { margin: 10px 0 0; border: 1px solid var(--kr-line); border-radius: 10px; display: flex; overflow: hidden; background: var(--kr-white); }
.kr-notice-label { width: 54px; flex: none; background: var(--kr-label-red); color: var(--kr-white); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; }
.kr-notice-list { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.kr-notice-item { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid var(--kr-line2); font-size: 13px; min-height: 34px; }
.kr-notice-item:last-child { border-bottom: 0; }
.kr-notice-date { color: var(--kr-sub); white-space: nowrap; }
.kr-notice-item a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; }
.kr-notice-buy { flex: none; font-size: 11px; font-weight: 700; color: var(--kr-navy); border: 1px solid var(--kr-navy); border-radius: 4px; padding: 0 6px; text-decoration: none; white-space: nowrap; }

/* ====================================================================
   5. セクション見出し（18px 太字ネイビー＋縦バー。右に更新日時 12px グレー）
   ==================================================================== */
.kr-section { margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.kr-section + .kr-section { margin-top: 24px; }
.kr-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kr-h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--kr-navy); display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.kr-h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--kr-navy); flex: none; }
.kr-updated { font-size: 12px; color: var(--kr-sub); white-space: nowrap; }
/* 自由タブ（PC）：PC はタブ列が無いため、見出し行の右側に「カードのリンク」と同じ見た目のボタンで置く（0.3.0、第7段階の案）。
   設定でタブ名とリンク先がそろったときだけ出る。スマホではタブ列に出る */
.kr-free-tab { display: none; }

/* スマホだけ／PCだけ */
.kr-pc-only { display: none !important; }

/* タブ（iPhone／ポケカBOX／自由タブ。スマホのみ） */
.kr-tabs { display: flex; border-bottom: 2px solid var(--kr-line); }
.kr-tab { appearance: none; background: none; border: 0; padding: 10px 16px; font-size: 14px; color: var(--kr-sub); cursor: pointer; margin-bottom: -2px; border-bottom: 2px solid transparent; text-decoration: none; }
.kr-tab[aria-current="true"], .kr-tab.is-active { font-weight: 700; color: var(--kr-navy); border-bottom-color: var(--kr-navy); }
/* タブを同じ幅にして、間に細い縦線を入れて区切る。3つ目（予約・抽選一覧）は別ページへのリンクなので青い字（2026-10-22） */
.kr-tabs .kr-tab { flex: 1 1 0; min-width: 0; text-align: center; padding: 10px 4px; white-space: nowrap; position: relative; }
.kr-tabs .kr-tab + .kr-tab::before { content: ""; position: absolute; left: 0; top: 25%; height: 50%; width: 1px; background: #CBD5E1; }
.kr-tabs .kr-tab--link { color: var(--kr-blue); font-weight: 700; }

/* 選択メニュー（機種・容量・カラー。高さ44px、枠線、角丸8px） */
.kr-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.kr-select { height: 44px; border: 1px solid var(--kr-input-line); border-radius: 8px; background: var(--kr-white); font-size: 13px; color: var(--kr-text); padding: 0 10px; width: 100%; min-width: 0; }
.kr-select:disabled { color: var(--kr-muted); opacity: 1; }
/* カード（スマホでは枠なし・縦並び。PCで白いカード2枚） */
.kr-cards { display: flex; flex-direction: column; gap: 24px; }
.kr-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kr-table .kr-thead--pc { display: none; }
.kr-table .kr-updated-col { display: none; }
.kr-nm { min-width: 0; }
/* 商品名の絞り込み欄（PCのみ） */
.kr-filter { height: 40px; border: 1px solid var(--kr-input-line); border-radius: 8px; background: var(--kr-white); display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--kr-navy); margin: 0; }
.kr-filter-input { flex: 1; min-width: 0; border: 0; background: none; font-size: 13px; color: var(--kr-text); outline: none; }
.kr-filter-input::placeholder { color: var(--kr-muted); }
.kr-cond { font-size: 12px; color: var(--kr-sub); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.kr-cond a { white-space: nowrap; text-decoration: none; font-weight: 500; }

/* ====================================================================
   6. ランキング表（3章・4-4・4-5）。プラグイン kaitori-ranking がこのクラスで出力する
   ==================================================================== */
.kr-table { border: 1px solid var(--kr-line); border-radius: 10px; overflow: hidden; background: var(--kr-white); }
.kr-thead, .kr-row { display: grid; gap: 6px; align-items: center; }
.kr-thead { padding: 8px 10px; background: var(--kr-navy); font-size: 11px; color: var(--kr-white); }
.kr-row { padding: 10px; border-top: 1px solid var(--kr-line); }
.kr-row:first-of-type { border-top: 0; }
/* 列幅：iPhone＝順位34／買取店／買取率66／買取価格100。ポケカ＝順位34／商品名＋買取店／買取金額100 */
.kr-table--iphone .kr-thead, .kr-table--iphone .kr-row { grid-template-columns: 34px minmax(0, 1fr) 66px 100px; }
.kr-table--pokeca .kr-thead, .kr-table--pokeca .kr-row { grid-template-columns: 34px minmax(0, 1fr) 100px; }
.kr-right { text-align: right; }
/* 順位バッジ（3-1） */
/* 順位の丸は全順位で同じ見た目（2026-10-13：1位の金・2〜3位の枠の色分けは効果が薄いため統一） */
.kr-rank { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; background: var(--kr-white); border: 2px solid var(--kr-navy); color: var(--kr-navy); box-sizing: border-box; }
/* 店舗名・商品名（3-6） */
.kr-shop { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kr-shop.is-nourl { color: var(--kr-sub2); }
.kr-row.is-first .kr-shop, .kr-row.is-first .kr-name { font-weight: 700; }
.kr-name { font-size: 14px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kr-name-shop { font-size: 12px; }
.kr-name-shop.is-nourl { color: var(--kr-sub); }
/* 一覧の表も TOP と同じ見せ方：青字・下線にせず、商品名は紺、店舗名は濃い文字＋小さな「›」（PC はマウスを乗せたときだけ下線） */
a.kr-name { color: var(--kr-navy); text-decoration: none; }
a.kr-shop, a.kr-name-shop { color: var(--kr-text, #0F172A); text-decoration: none; }
.kr-shop.is-nourl { color: var(--kr-text, #0F172A); }
a.kr-shop::after, a.kr-name-shop::after { content: "›"; margin-left: 4px; color: var(--kr-sub2); font-weight: 700; }
a.kr-name:hover, a.kr-shop:hover, a.kr-name-shop:hover { text-decoration: underline; }
/* 買取率（3-3）・買取金額（3-4）・差額（3-5） */
.kr-rate { text-align: right; font-size: 18px; font-weight: 700; color: var(--kr-green); }
.kr-rate small { font-size: 12px; }
.kr-price { text-align: right; display: flex; flex-direction: column; line-height: 1.25; }
.kr-amount { font-size: 16px; font-weight: 700; color: var(--kr-red); }
.kr-diff { font-size: 13px; font-weight: 500; color: var(--kr-text); }
.kr-diff.is-none { font-size: 12px; font-weight: 400; color: var(--kr-muted); }
.kr-note { font-size: 11px; color: var(--kr-sub); line-height: 1.5; }
/* 全件へのボタン（高さ46px、ネイビー枠） */
.kr-btn { height: 46px; border: 1px solid var(--kr-navy); border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--kr-navy); text-decoration: none; background: var(--kr-white); }
/* データなしの案内（4-9。架空のデータで補わない） */
.kr-empty { border: 1px dashed var(--kr-line); border-radius: 10px; padding: 16px; font-size: 14px; color: var(--kr-sub); background: var(--kr-white); }
.kr-admin-note { border: 1px solid var(--kr-line); border-left: 4px solid var(--kr-label-red); border-radius: 6px; padding: 8px 12px; font-size: 12px; color: var(--kr-sub2); background: var(--kr-white); }

/* ====================================================================
   7. 予約・抽選エリアの差し込み位置（kaitori-reserve が kr_before_footer に出力。見た目はプラグイン側）
   ==================================================================== */
.kr-reserve-slot { margin-top: 24px; }
.kr-reserve-slot:empty { display: none; margin: 0; }

/* ====================================================================
   8. フッター（4-7 スマホ中央寄せ 12px グレー、5-6 PC 1行）
   ==================================================================== */
/* 2026-10-24：小さい灰色の1列は見えにくい（ユーザーの指定）→ 紺の帯に、見出し付きのまとまり（スマホ2列・PC5列） */
.kr-footer { margin: 24px 0 0; padding: 22px 0 16px; background: var(--kr-navy); color: #CBD5E1; font-size: 14px; text-align: left; line-height: 1.6; }
.kr-footer a { color: #FFFFFF; text-decoration: none; }
.kr-footer a:hover { text-decoration: underline; }
.kr-footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.kr-footer-head { font-size: 12px; font-weight: 700; color: #93C5FD; letter-spacing: .04em; margin-bottom: 4px; }
.kr-footer-links { margin: 0; padding: 0; list-style: none; }
.kr-footer-links li a { display: block; padding: 7px 0; }
.kr-footer-links li a::after { content: " ›"; color: #93C5FD; }
.kr-copyright { margin-top: 18px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 12px; color: #94A3B8; text-align: center; }

/* ====================================================================
   9. 下部固定ナビ（4-8。高さ64px、白地、上罫線。PCでは出さない）
   ==================================================================== */
.kr-bottomnav { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; border-top: 1px solid var(--kr-line); background: var(--kr-white); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 0 10px; z-index: 30; }
.kr-bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--kr-sub); text-decoration: none; font-size: 11px; }
.kr-bottomnav a svg { width: 22px; height: 22px; }
.kr-bottomnav a.is-current { color: var(--kr-navy); font-weight: 700; }

/* ====================================================================
   10. 記事・固定ページ・404（最低限。デザイン仕様の文字・色に合わせる）
   ==================================================================== */
.kr-main { padding-top: 16px; }
.kr-page-title { margin: 0 0 12px; font-size: 22px; font-weight: 700; color: var(--kr-navy); line-height: 1.3; }
.kr-entry { font-size: 15px; line-height: 1.8; }
.kr-entry h2 { font-size: 18px; color: var(--kr-navy); }
.kr-entry img { border-radius: 8px; }
.kr-brand-icon { flex: none; display: block; }
.kr-404-links { margin: 16px 0 8px; }
/* アフィリエイトの店舗の「PR」（小さく、店名の後ろ） */
.kr-pr { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; line-height: 1.5; color: var(--kr-sub2); border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; vertical-align: 1px; }
a.kr-best-shop .kr-pr, a.kr-shop .kr-pr, a.kr-name-shop .kr-pr { text-decoration: none; }
@media (min-width: 768px) { .kr-brand-icon { width: 32px; height: 32px; } }
/* お問い合わせフォーム */
.kr-contact label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.kr-contact input[type="text"], .kr-contact input[type="email"], .kr-contact textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--kr-input-line); border-radius: 8px; padding: 10px; font-size: 16px; background: var(--kr-white); color: var(--kr-text); font-family: inherit; }
.kr-req { font-size: 11px; color: var(--kr-white); background: var(--kr-red); border-radius: 4px; padding: 0 5px; margin-left: 4px; font-weight: 700; }
.kr-contact-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kr-contact-note { font-size: 12px; color: var(--kr-sub2); }
.kr-contact-btn { width: 100%; height: 48px; border: 0; border-radius: 8px; background: var(--kr-navy); color: var(--kr-white); font-size: 16px; font-weight: 700; cursor: pointer; }
.kr-contact-errors { border: 1px solid var(--kr-red); border-radius: 8px; background: var(--kr-white); color: var(--kr-red); padding: 10px 10px 10px 28px; font-size: 14px; }
.kr-contact-done { border: 1px solid var(--kr-line); border-radius: 8px; background: var(--kr-white); padding: 16px; font-weight: 700; }
@media (min-width: 768px) { .kr-contact-btn { width: 240px; } }
/* TOP のお役立ちガイド（解説ページへの入口。PC は横2列） */
.kr-guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kr-guide-list a { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--kr-line); border-radius: 10px; background: var(--kr-white); padding: 12px 32px 12px 14px; text-decoration: none; position: relative; }
.kr-guide-list a::after { content: "›"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 700; color: var(--kr-sub2); }
.kr-guide-title { font-size: 15px; font-weight: 700; color: var(--kr-navy); line-height: 1.4; }
.kr-guide-desc { font-size: 12px; color: var(--kr-sub2); line-height: 1.5; }
.kr-guide-list a:hover .kr-guide-title { text-decoration: underline; }
@media (min-width: 768px) { .kr-guide-list { grid-template-columns: 1fr 1fr; } }
/* ガイドの見出しに色を付ける・カードに「何のガイドか」のラベル（2026-10-22） */
.kr-guides-head { flex-wrap: wrap; align-items: center; background: linear-gradient(90deg, #E8F0FE 0%, #F5F8FF 100%); border: 1px solid #D6E2FB; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.kr-guides-head .kr-h2::before { background: var(--kr-blue); }
.kr-guides-sub { font-size: 12px; font-weight: 700; color: #1E40AF; }
.kr-guide-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.kr-gt { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.6; padding: 0 8px; border-radius: 999px; background: #F1F5F9; color: #334155; white-space: nowrap; }
.kr-gt-cat-pk { background: #FEF3C7; color: #92400E; }
.kr-gt-cat-op { background: #FFE4E6; color: #9F1239; }
.kr-gt-cat-ip { background: #DBEAFE; color: #1E40AF; }
.kr-gt-cat-gm { background: #DCFCE7; color: #166534; }
.kr-gt-kind { background: #F1F5F9; color: #334155; border: 1px solid #E2E8F0; }
.kr-gt-st-open { background: #DCFCE7; color: #15803D; }
.kr-gt-st-soon { background: var(--kr-red); color: #fff; }
.kr-gt-st-tbd { background: #FEF9C3; color: #854D0E; }
.kr-gt-st-end { background: #E2E8F0; color: #64748B; }
.kr-guide-list li.is-ended a { background: #F8FAFC; }
.kr-guide-list li.is-ended .kr-guide-title { color: #475569; }
/* 記事のカテゴリ・関連記事・カテゴリ一覧（2026-10-22） */
.kr-post-cat { display: inline-block; font-size: 12px; font-weight: 700; color: var(--kr-blue); text-decoration: none; border: 1px solid #D6E2FB; background: #F5F8FF; border-radius: 999px; padding: 0 10px; }
.kr-related { margin-top: 28px; }
a.kr-guides-sub { text-decoration: none; }
.kr-cat-desc { font-size: 14px; color: var(--kr-sub2); line-height: 1.7; margin: 0 0 14px; }
.kr-cat-desc p { margin: 0; }
.kr-archive-list { margin-top: 8px; }
/* 解説ページの広告表示とアフィリエイトのカード（スマホでは縦並び） */
.kr-pr-note { font-size: 12px; color: var(--kr-sub2); background: var(--kr-white); border: 1px solid var(--kr-line); border-radius: 6px; padding: 6px 10px; }
.kr-aff { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--kr-line); border-radius: 10px; background: var(--kr-white); padding: 12px; margin: 12px 0 16px; }
.kr-aff-img { flex: none; }
.kr-aff-img img { display: block; width: 140px; height: auto; }
.kr-aff-body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.6; }
.kr-aff-body p { margin: 4px 0; }
.kr-aff-pr { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.6; color: var(--kr-sub2); border: 1px solid var(--kr-sub2); border-radius: 4px; padding: 0 6px; margin-bottom: 4px; }
.kr-entry a.kr-aff-name { display: block; font-weight: 700; color: var(--kr-navy); text-decoration: none; }
.kr-aff-price { color: var(--kr-red); font-weight: 700; font-size: 16px; }
.kr-aff-price small { font-size: 11px; color: var(--kr-sub2); font-weight: 500; }
.kr-aff-date { font-size: 11px; color: var(--kr-sub); }
.kr-aff-note { font-size: 12px; color: var(--kr-sub2); }
.kr-entry a.kr-aff-btn { display: block; margin-top: 8px; text-align: center; background: #BF0000; color: #FFFFFF; border-radius: 999px; padding: 10px 12px; font-weight: 700; text-decoration: none; }
@media (max-width: 520px) {
  .kr-aff { flex-direction: column; align-items: stretch; }
  .kr-aff-img { align-self: center; }
  .kr-aff-img img { width: 180px; }
}
.kr-post-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.kr-post-list li { border: 1px solid var(--kr-line); border-radius: 10px; padding: 12px; background: var(--kr-white); }
.kr-post-list a { font-weight: 700; text-decoration: none; color: var(--kr-navy); }
.kr-post-date { font-size: 12px; color: var(--kr-sub); }
.kr-breadcrumb { font-size: 12px; color: var(--kr-sub); margin: 0 0 8px; }
.kr-breadcrumb a { color: inherit; text-decoration: none; }
.kr-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; font-size: 14px; }

/* ====================================================================
   11. PC（768px以上。5章。コンテンツ幅 1120px、ページ地 #F6F8FB、下部ナビなし）
   ==================================================================== */
@media (min-width: 768px) {
  body { background: var(--kr-page-pc); padding-bottom: 40px; }
  .kr-wrap { padding: 0 24px; }
  .kr-header .kr-wrap { height: 60px; }
  .kr-brand-mark { width: 28px; height: 28px; border-radius: 7px; font-size: 15px; }
  .kr-brand-name { font-size: 18px; }
  .kr-pcnav { display: flex; gap: 28px; font-size: 14px; margin: 0; padding: 0; list-style: none; }
  .kr-pcnav a { color: var(--kr-nav-sub); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
  .kr-pcnav a.is-current { color: var(--kr-white); font-weight: 700; border-bottom-color: var(--kr-gold); }
  .kr-main { padding-top: 20px; }
  .kr-notice { margin-top: 0; }
  .kr-notice-label { width: 80px; font-size: 13px; }
  .kr-notice-item { gap: 14px; padding: 8px 16px; font-size: 14px; }
  .kr-section { margin-top: 24px; }
  .kr-h2 { font-size: 22px; gap: 10px; }
  .kr-h2::before { width: 5px; height: 22px; }
  .kr-updated { font-size: 13px; }
  .kr-sp-only { display: none !important; }
  .kr-pc-only { display: block !important; }
  .kr-card-head.kr-pc-only, .kr-filter.kr-pc-only, .kr-cond.kr-pc-only { display: flex !important; }
  /* 2カード横並び（5-4） */
  .kr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .kr-card { background: var(--kr-white); border: 1px solid var(--kr-line); border-radius: 12px; padding: 18px 20px; gap: 14px; }
  .kr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .kr-h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--kr-navy); }
  .kr-card-link { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--kr-navy); border: 1px solid var(--kr-navy); border-radius: 6px; padding: 6px 12px; }
  .kr-section-head .kr-free-tab { display: inline-block !important; margin-left: auto; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--kr-navy); border: 1px solid var(--kr-navy); border-radius: 6px; padding: 6px 12px; line-height: 1.2; }
  .kr-section-head .kr-free-tab + .kr-updated { margin-left: 12px; }
  .kr-select { height: 40px; }
  .kr-selects { gap: 8px; }
  .kr-thead { padding: 9px 12px; gap: 8px; }
  .kr-table .kr-thead--sp { display: none; }
  .kr-table .kr-thead--pc { display: grid; }
  .kr-row { padding: 12px; gap: 8px; }
  .kr-table--iphone .kr-thead, .kr-table--iphone .kr-row { grid-template-columns: 40px minmax(0, 1fr) 72px 96px 90px 44px; }
  .kr-table--pokeca .kr-thead, .kr-table--pokeca .kr-row { grid-template-columns: 40px minmax(0, 1fr) 88px 90px 90px; }
  .kr-rank { width: 30px; height: 30px; }
  .kr-rate { font-size: 19px; }
  .kr-amount { font-size: 17px; text-align: right; }
  .kr-diff { font-size: 14px; text-align: right; }
  .kr-diff.is-none { font-size: 12px; }
  .kr-price, .kr-nm { display: contents; } /* 2段の中身をそれぞれ列にする */
  .kr-name-shop { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kr-table .kr-updated-col { display: block; text-align: right; font-size: 12px; color: var(--kr-sub); }
  .kr-footer { padding-top: 26px; line-height: 1.6; }
  .kr-footer-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 24px; }
  .kr-footer-links li a { padding: 4px 0; }
  .kr-bottomnav { display: none; }
  .kr-page-title { font-size: 26px; }
}
/* タブレット（768〜1079px、5-7）：更新列を省く */
@media (min-width: 768px) and (max-width: 1079px) {
  .kr-table--iphone .kr-thead, .kr-table--iphone .kr-row { grid-template-columns: 40px minmax(0, 1fr) 72px 96px 90px; }
  .kr-table--iphone .kr-updated-col { display: none; }
}

/* 0.4.0：TOP の iPhone 表「買取率の高い iPhone ベスト5」（2026-10-11 決定。スマホ・PC 同じ形）
   1商品ごとに：順位と商品名 → 買取率・定価差 → 買取店（高い順に最大3店。店名と買取金額） */
.kr-table--best .kr-best-thead { display: block; }
.kr-best-item { padding: 10px 12px; border-top: 1px solid var(--kr-line); background: var(--kr-white); }
.kr-best-item:first-of-type { border-top: 0; }
.kr-best-title { display: flex; align-items: center; gap: 8px; }
.kr-best-title .kr-rank { flex: none; }
.kr-best-name { font-size: 15px; font-weight: 500; line-height: 1.35; min-width: 0; }
.kr-best-item.is-first .kr-best-name { font-weight: 700; }
/* 順位を「1位」の文字ラベルで出す（2026-10-22 案A）。1〜3位は金・銀・銅、4位からは灰色。1位の段はうすい金色 */
.kr-rk { flex: none; display: inline-block; min-width: 38px; text-align: center; font-size: 11px; font-weight: 900; line-height: 1.7; border-radius: 999px; padding: 0 8px; background: #EEF2F7; color: #475569; }
.kr-rk--1 { background: linear-gradient(135deg, #E3B341, #B8860B); color: #fff; }
.kr-rk--2 { background: linear-gradient(135deg, #C0C7D1, #8A94A3); color: #fff; }
.kr-rk--3 { background: linear-gradient(135deg, #D9A066, #A0632B); color: #fff; }
.kr-best-item.is-first { background: #FFFBEB; }
/* 0.4.26（2026-10-24）：商品の画像を左に出し、順位を画像の左上にのせる（商品名を1行に収める） */
.kr-best-title.has-img { gap: 12px; }
.kr-best-pic { position: relative; flex: 0 0 56px; width: 56px; height: 56px; margin: 8px 0 2px 4px; }
.kr-best-pic img { display: block; width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #F1F5F9; padding: 3px; box-sizing: border-box; }
.kr-best-pic .kr-rk { position: absolute; left: -6px; top: -9px; min-width: 0; padding: 0 7px; line-height: 1.6; box-shadow: 0 1px 2px rgba(15, 23, 42, .25); }
.kr-best-meta { margin-left: 0; }
.kr-best-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 6px 36px; font-size: 12px; color: var(--kr-sub2); align-items: baseline; }
.kr-best-rate { color: var(--kr-green); font-size: 16px; font-weight: 700; }
.kr-best-rate small { font-size: 11px; }
.kr-best-meta .kr-diff { font-size: 13px; }
/* 0.4.32（2026-11-07）：画像があるときは、買取率・定価差の行を商品名のすぐ下（画像の右）に入れる（左の隙間をなくす） */
.kr-best-col { flex: 1; min-width: 0; display: grid; gap: 3px; }
.kr-best-col .kr-best-meta { margin: 0; gap: 2px 12px; }
.kr-best-title.has-img + .kr-best-shops { margin-top: 6px; }
.kr-best-shops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--kr-line); } /* 左寄せ。行の間に薄い線 */
.kr-best-shops li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; font-size: 14px; padding: 5px 0; border-bottom: 1px solid var(--kr-line); }
.kr-best-no { color: var(--kr-sub2); font-size: 12px; font-weight: 700; text-align: center; }
.kr-best-shop { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-best-shop.is-nourl { color: var(--kr-text, #0F172A); font-weight: 500; } /* 文字を濃く */
/* リンクは青字・下線にしない。商品名は紺の文字、店舗名は濃い文字＋小さな「›」（PC はマウスを乗せたときだけ下線） */
.kr-best-name { color: var(--kr-navy); text-decoration: none; }
a.kr-best-shop { color: var(--kr-text, #0F172A); font-weight: 500; text-decoration: none; }
a.kr-best-shop::after { content: "›"; margin-left: 4px; color: var(--kr-sub2); font-weight: 700; }
a.kr-best-name:hover, a.kr-best-shop:hover { text-decoration: underline; }
.kr-best-amount { color: var(--kr-red); font-weight: 700; text-align: right; white-space: nowrap; }
.kr-best-shops li:first-child .kr-best-amount { font-size: 16px; }
/* 0.4.0：PC でも iPhone の買取店ランキング（カラーまで選んだとき）の「更新」列を出さず、買取店名の幅を確保する（タブレットと同じ。店名が「買取１…」と切れていたため） */
@media (min-width: 768px) {
  .kr-table--iphone:not(.kr-table--best) .kr-thead, .kr-table--iphone:not(.kr-table--best) .kr-row { grid-template-columns: 40px minmax(0, 1fr) 72px 96px 90px; }
  .kr-table--iphone:not(.kr-table--best) .kr-updated-col, .kr-table--iphone:not(.kr-table--best) .kr-thead--pc span:last-child { display: none; }
}