@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&display=swap');

:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface2: #edeef8;
  --border: #dee1ef;
  --accent: #4b57e8;
  --accent2: #e57a3c;
  --accent3: #1c2536;
  --text: #1a1e2b;
  --text2: #6d7290;
  --info: #6472d6;
  --gold: #ab7f2e;
  --silver: #888ca0;
  --bronze: #9a6640;

  /* 上品な陰影を積層する統一エレベーションシステム */
  --shadow-xs: 0 1px 2px rgba(24,28,48,.05);
  --shadow-sm: 0 1px 2px rgba(24,28,48,.05), 0 4px 12px rgba(24,28,48,.05);
  --shadow-md: 0 1px 2px rgba(24,28,48,.04), 0 10px 28px rgba(30,36,80,.08);
  --shadow-lg: 0 4px 10px rgba(24,28,48,.06), 0 20px 48px rgba(30,36,80,.12);
  --ease: cubic-bezier(.22,.8,.32,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  font-feature-settings: 'palt' 1;
  letter-spacing: .01em;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
}
/* 背景にごく淡いグラデーションのみ(派手な色玉は品位を下げるため抑制) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle 460px at 6% 8%, rgba(75,87,232,.045), transparent 70%),
    radial-gradient(circle 420px at 92% 86%, rgba(229,122,60,.035), transparent 70%);
}
a { color: inherit; }

/* 抑制の効いた上質な動き(振幅を控えめに) */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes gradient-slide { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shine { 0% { transform: translateX(-150%) rotate(20deg); } 100% { transform: translateX(250%) rotate(20deg); } }

/* ヘッダー */
header {
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--border);
  padding: 15px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.logo-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  box-shadow: var(--shadow-sm), 0 2px 6px rgba(75,87,232,.22);
}
.logo:hover .logo-icon { transform: translateY(-1px) rotate(-3deg); box-shadow: var(--shadow-md), 0 3px 10px rgba(75,87,232,.28); }
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.logo-sub { font-size: 10px; color: var(--text2); margin-top: 2px; letter-spacing: .02em; }

.gnav { display: flex; gap: 2px; flex-wrap: wrap; }
.gnav a {
  padding: 8px 16px;
  border-radius: 20px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color .2s, background .2s;
}
.gnav a:hover { color: var(--text); background: var(--surface2); }
.gnav a.active { color: var(--accent); background: rgba(75,87,232,.09); }

/* メイン */
main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }

/* ビジュアルヒーロー（トップのイラスト） */
.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  margin: 4px 0 28px;
  background: #f6efe0;
  border: 1px solid #ece3d2;
  box-shadow: 0 2px 6px rgba(70,55,30,.08), 0 24px 56px rgba(70,55,30,.14);
}
.hero-visual .hero-img { display: block; width: 100%; height: auto; }
/* 左側の空間に向けて、文字が読みやすいよう淡いスクリム */
.hero-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(95deg,
    rgba(247,240,226,.96) 0%,
    rgba(247,240,226,.82) 26%,
    rgba(247,240,226,0) 48%);
  pointer-events: none;
}
.hero-copy {
  position: absolute; top: 0; left: 0;
  height: 100%; width: min(44%, 430px);
  z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(24px, 3.8%, 56px);
}
.hero-copy .hero-badge {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent), #6b76f2); color: #fff;
  box-shadow: 0 4px 14px rgba(75,87,232,.28);
}
.hero-copy h1 {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 900; line-height: 1.36;
  letter-spacing: .3px;
  color: #3a3326;
  margin-bottom: 14px;
}
.hero-copy p {
  color: #6b6048;
  font-size: clamp(12.5px, 1.15vw, 16px);
  line-height: 1.85;
}
.hero-copy .cta-row { justify-content: flex-start; margin-top: 22px; }
/* スマホは画像を上、コピーを下に積む */
@media (max-width: 760px) {
  .hero-visual::before { display: none; }
  .hero-copy {
    position: static; width: auto; height: auto;
    padding: 22px 20px 26px; background: var(--surface);
  }
  .hero-copy h1 { color: var(--text); }
}

/* ヒーロー */
.hero { text-align: center; padding: 48px 0 40px; }
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #6b76f2);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: .08em;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(75,87,232,.28);
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .01em;
  margin-bottom: 12px;
  color: var(--text);
}
.hero { position: relative; }
.hero p { color: var(--text2); font-size: 15px; line-height: 1.75; }

/* カード共通 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* ホーム: コンテンツカード */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 44px;
}
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 28px;
  text-decoration: none;
  display: block;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.content-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--info));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.content-card:hover::before { transform: scaleX(1); }
.content-card:hover {
  border-color: rgba(75,87,232,.35);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
/* 統一ラインアイコン & アイコンチップ */
.icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; }
/* テキスト前の小アイコン（スコア種別ラベル等） */
.ico-sm { width: 1.15em; height: 1.15em; vertical-align: -.22em; margin-right: .38em; }
.icon-chip {
  width: 54px; height: 54px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, rgba(75,87,232,.13), rgba(75,87,232,.06));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(75,87,232,.08);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.icon-chip .icon { width: 26px; height: 26px; }
.icon-chip.ic-orange { background: linear-gradient(155deg, rgba(229,122,60,.16), rgba(229,122,60,.06)); color: var(--accent2); box-shadow: inset 0 0 0 1px rgba(229,122,60,.1); }
.icon-chip.ic-navy   { background: linear-gradient(155deg, rgba(28,37,54,.10), rgba(28,37,54,.03));  color: var(--accent3); box-shadow: inset 0 0 0 1px rgba(28,37,54,.08); }
.icon-chip.ic-info   { background: linear-gradient(155deg, rgba(100,114,214,.16), rgba(100,114,214,.06)); color: var(--info); box-shadow: inset 0 0 0 1px rgba(100,114,214,.1); }
.icon-chip.ic-gold   { background: linear-gradient(155deg, rgba(171,127,46,.16), rgba(171,127,46,.06)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(171,127,46,.1); }

.content-card .c-icon { display: inline-flex; margin-bottom: 18px; }
.content-card:hover .c-icon .icon-chip { transform: translateY(-2px) rotate(-3deg); box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(75,87,232,.12); }
.content-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; letter-spacing: .01em; }
.content-card p { font-size: 13px; color: var(--text2); line-height: 1.8; margin-bottom: 16px; }
.content-card .c-link { font-size: 13px; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.content-card .c-link::after { content: '→'; transition: transform .3s var(--ease); }
.content-card:hover .c-link::after { transform: translateX(4px); }
.content-card .c-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 3px 11px;
  border-radius: 20px;
  background: rgba(229,122,60,.12); color: var(--accent2);
}

/* セクション見出し（左にアクセントバー） */
.section-title {
  font-size: 21px; font-weight: 800; letter-spacing: .01em;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::before {
  content: ''; flex: none;
  width: 5px; height: 21px; border-radius: 3px;
  background: linear-gradient(160deg, var(--accent), var(--info));
  box-shadow: 0 2px 6px rgba(75,87,232,.25);
}
.section-sub { font-size: 13px; color: var(--text2); margin: -12px 0 22px; padding-left: 17px; }

/* 信頼感を伝える統計ストリップ(ヒーロー直下) */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 44px;
  box-shadow: var(--shadow-xs);
}
@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
.stat-cell {
  background: var(--surface);
  padding: 20px 22px;
  text-align: center;
}
.stat-cell b {
  display: block;
  font-size: 26px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  background: linear-gradient(135deg, var(--accent), var(--info));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-cell span {
  display: block;
  font-size: 11.5px; color: var(--text2); margin-top: 4px; letter-spacing: .02em;
}

/* セクション見出し上の小さなアイキャッチラベル */
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px; padding-left: 17px;
}

/* プロファイル選択 */
.selector-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.profile-btn {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
}
.profile-btn .p-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 12px;
  background: rgba(75,87,232,.09); color: var(--accent);
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.profile-btn .p-icon .icon { width: 22px; height: 22px; }
.profile-btn:hover { border-color: rgba(75,87,232,.4); color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.profile-btn:hover .p-icon { transform: translateY(-1px); }
.profile-btn.active .p-icon { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(75,87,232,.3); }
.profile-btn.active {
  border-color: var(--accent);
  background: rgba(75,87,232,.07);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* フィルター */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.filter-group label { font-size: 11px; color: var(--text2); font-weight: 600; }
.filter-group select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.filter-group select:focus { border-color: var(--accent); }

/* ランキング */
.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.ranking-title { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ranking-title .icon { width: 22px; height: 22px; color: var(--gold); }
.ranking-meta { font-size: 12px; color: var(--text2); }
.ranking-list { display: flex; flex-direction: column; gap: 10px; }
/* 上位カードはふわっと順番に登場 */
.ranking-list > div:nth-child(-n+8) { animation: pop-in .4s ease backwards; }
.ranking-list > div:nth-child(1) { animation-delay: .02s; }
.ranking-list > div:nth-child(2) { animation-delay: .06s; }
.ranking-list > div:nth-child(3) { animation-delay: .10s; }
.ranking-list > div:nth-child(4) { animation-delay: .14s; }
.ranking-list > div:nth-child(5) { animation-delay: .18s; }
.ranking-list > div:nth-child(6) { animation-delay: .22s; }
.ranking-list > div:nth-child(7) { animation-delay: .26s; }
.ranking-list > div:nth-child(8) { animation-delay: .30s; }

.rank-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.rank-card:hover {
  border-color: rgba(75,87,232,.4);
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}
.rank-card.top1 {
  border-color: rgba(171,127,46,.4);
  background: #fdfbf5;
  position: relative;
  overflow: hidden;
}
/* 1位カードにさりげない光が走る */
.rank-card.top1::after {
  content: '';
  position: absolute;
  top: -60%; left: 0;
  width: 50px; height: 220%;
  background: linear-gradient(90deg, transparent, rgba(171,127,46,.13), transparent);
  animation: shine 3.6s ease-in-out infinite;
  pointer-events: none;
}
.rank-card.top2 { border-color: rgba(136,140,160,.5); }
.rank-card.top3 { border-color: rgba(154,102,64,.4); }

.rank-num {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--surface2);
  color: var(--text2);
}
.rank-num.r1 { background: rgba(171,127,46,.12); color: var(--gold); animation: floaty 3s ease-in-out infinite; }
.rank-num.r2 { background: rgba(136,140,160,.15); color: var(--silver); animation: floaty 3s ease-in-out infinite .3s; }
.rank-num.r3 { background: rgba(154,102,64,.12); color: var(--bronze); animation: floaty 3s ease-in-out infinite .6s; }

.rank-station {
  font-size: 17px; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.rank-line {
  font-size: 11px; font-weight: 600; padding: 2px 9px;
  border-radius: 20px; background: rgba(75,87,232,.09); color: var(--accent);
}
.rank-pref {
  font-size: 11px; font-weight: 600; padding: 2px 9px;
  border-radius: 20px; background: var(--surface2); color: var(--text2);
}
/* 一覧で常時見えるミニスコア（クリックせず比較できる） */
.mini-scores { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ms {
  display: flex; flex-direction: column; align-items: center;
  min-width: 46px; padding: 5px 8px;
  background: var(--surface2); border-radius: 10px;
}
.ms b { font-size: 15px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ms i { font-size: 10px; color: var(--text2); font-style: normal; margin-top: 3px; }

.rank-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag {
  font-size: 11px; padding: 2px 9px; border-radius: 20px;
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border);
}
.tag.good { background: rgba(75,87,232,.07); color: var(--accent); border-color: rgba(75,87,232,.18); }
.tag.warn { background: rgba(229,122,60,.09); color: var(--accent2); border-color: rgba(229,122,60,.22); }

.rank-score { text-align: right; }
.score-val {
  font-size: 32px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
}
.score-label { font-size: 10px; color: var(--text2); margin-top: 3px; letter-spacing: .02em; }
.score-bar {
  width: 80px; height: 4px; background: var(--surface2);
  border-radius: 2px; margin-top: 7px; overflow: hidden;
}
.score-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #6b76f2);
  transition: width .7s var(--ease);
}

/* 詳細パネル */
.detail-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-top: 8px;
  display: none;
  animation: fadeIn .2s ease;
}
.detail-panel.open { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.detail-stat { text-align: center; padding: 12px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-xs); }
.detail-stat .val { font-size: 20px; font-weight: 700; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.detail-stat .lbl { font-size: 11px; color: var(--text2); }
.suumo-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent);
  color: white; text-decoration: none;
  padding: 10px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .25s var(--ease);
}
.suumo-link:hover { opacity: .94; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* スコア説明バー */
.score-desc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-xs);
}
/* 路線選択時の地図 */
.line-map-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: none;
}
.line-map-wrap.show { display: block; }
.line-map-head {
  padding: 12px 16px; font-size: 13px; font-weight: 700;
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.line-map-head .icon { width: 18px; height: 18px; color: var(--accent); }
#line-map { height: 360px; width: 100%; background: var(--surface2); }
.map-pin {
  background: var(--accent); color: #fff;
  border-radius: 50%; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.leaflet-popup-content { font-size: 13px; font-weight: 600; }

.score-item { flex: 1; min-width: 150px; }
.score-item .s-label { font-size: 11px; color: var(--text2); margin-bottom: 4px; font-weight: 600; }
.score-item .s-val {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.rent { background: var(--accent); }
.dot.access { background: var(--accent2); }
.dot.life { background: var(--accent3); }
.dot.env { background: var(--info); }
.dot.invest { background: var(--gold); }

/* 賃貸/購入トグル */
.mode-toggle {
  display: inline-flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.mode-toggle button {
  padding: 8px 18px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.mode-toggle button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* 駅の雰囲気 */
.rank-mood {
  font-size: 12px;
  color: var(--text2);
  font-style: italic;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* カード内の物件リンク */
.card-suumo {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent2);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(255,138,76,.4);
  border-radius: 20px;
  transition: all .15s;
}
.card-suumo:hover { background: var(--accent2); color: white; }

/* ランキング内アフィリエイトカード */
.inline-ad {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.inline-ad-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.inline-ad-sub { font-size: 12px; color: var(--text2); }

/* アフィリエイトバナー */
.affiliate-banner {
  text-align: center;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-top: 40px;
  box-shadow: var(--shadow-sm);
}
.affiliate-banner p { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.affiliate-banner img.banner { max-width: 100%; height: auto; border-radius: 12px; }

/* 一括査定アフィリエイト導線 */
.kassai-card {
  display: flex; gap: 16px; align-items: flex-start;
  margin-top: 24px; padding: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.kassai-icon { flex-shrink: 0; }
.kassai-body h3 { font-size: 15px; margin-bottom: 6px; }
.kassai-body p { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 12px; }
.kassai-btn {
  display: inline-block; background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 10px 20px; border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .25s var(--ease);
}
.kassai-btn:hover { opacity: .94; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kassai-note { display: block; font-size: 11px; color: var(--text2); margin-top: 8px; }
@media (max-width: 480px) { .kassai-card { flex-direction: column; } }

/* フッター */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 34px 24px;
  text-align: center;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.85;
}
footer nav { display: flex; gap: 18px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
footer nav a { color: var(--text2); text-decoration: none; transition: color .2s; }
footer nav a:hover { color: var(--accent); }

/* CTAボタン */
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), #5b66ee);
  color: white; text-decoration: none;
  padding: 14px 32px; border-radius: 14px;
  font-size: 15px; font-weight: 700;
  letter-spacing: .01em;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  margin-top: 24px;
  box-shadow: 0 4px 14px rgba(75,87,232,.24);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(75,87,232,.3); }
.cta-btn:active { transform: translateY(0); }
.cta-btn .icon { width: 18px; height: 18px; }
.cta-btn .arr { margin-left: 2px; transition: transform .3s var(--ease); }
.cta-btn:hover .arr { transform: translateX(3px); }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.cta-row .cta-btn { margin-top: 0; }
.cta-btn.cta-2 { background: linear-gradient(135deg, var(--accent3), #2c3850); box-shadow: 0 4px 14px rgba(28,37,54,.24); }
.cta-btn.cta-2:hover { box-shadow: 0 10px 24px rgba(28,37,54,.3); }
.cta-btn.cta-3 { background: linear-gradient(135deg, var(--accent2), #ec8c52); box-shadow: 0 4px 14px rgba(229,122,60,.24); }
.cta-btn.cta-3:hover { box-shadow: 0 10px 24px rgba(229,122,60,.3); }
@media (max-width: 640px) { .cta-row { flex-direction: column; align-items: stretch; } }

/* レスポンシブ */
@media (max-width: 640px) {
  .rank-card { grid-template-columns: 40px 1fr auto; gap: 12px; padding: 14px; }
  .rank-num { width: 40px; height: 40px; font-size: 16px; }
  .score-val { font-size: 26px; }
  .score-bar { width: 60px; }
  .gnav a { padding: 6px 10px; font-size: 12px; }
}
