/* ===== ホイール検索サイト「TELEMETRY」テーマ =====
   漆黒 × エレクトリックブルー（F1/モータースポーツ計器風）
   既存のクラス名・IDは維持（db.js / main.js / shop.js が依存） */
@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@500;600;700;800&family=Noto+Sans+JP:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg:        #060a12;
  --panel:     #0c1320;
  --field:     #070d18;
  --tab-sel:   #11203a;
  --line:      #1c2a44;
  --line-2:    #15203a;
  --wheel-line:#20304e;
  --white:     #ffffff;
  --t-bright:  #c2cee2;
  --t-mid:     #7d8aa3;
  --t-weak:    #6a7896;
  --t-faint:   #4a5a78;
  --blue:      #2e7dff;
  --cyan:      #38e0ff;

  --f-disp: 'Saira Condensed', 'Noto Sans JP', sans-serif;
  --f-body: 'Noto Sans JP', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
  --grid: linear-gradient(90deg, rgba(46,125,255,.06) 1px, transparent 1px),
          linear-gradient(rgba(46,125,255,.05) 1px, transparent 1px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--t-bright);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--grid); background-size: 48px 48px; opacity: .5;
}
.wrap, .article-wrap, header.site-head, .action-bar, .site-foot { position: relative; z-index: 1; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 18px 110px;
}

/* ===== ヘッダー ===== */
header.site-head {
  background: var(--field);
  border-bottom: 1px solid var(--line-2);
  padding: 13px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
header.site-head h1 {
  font-family: var(--f-disp);
  font-size: 22px; font-weight: 800; letter-spacing: .04em;
  margin: 0; color: var(--white); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
header.site-head h1::before {
  content: "◣"; color: var(--blue); font-size: 16px;
}
header.site-head .sub {
  font-family: var(--f-mono); font-size: 11px; color: var(--t-mid);
  letter-spacing: .14em; margin-top: 2px;
}

/* ヒーロー（フルブリード写真） */
.hero {
  position: relative; z-index: 1; overflow: hidden;
  background-color: #060a12;
  background-image:
    linear-gradient(90deg, rgba(6,10,18,.95) 0%, rgba(6,10,18,.62) 50%, rgba(6,10,18,.28) 100%),
    url('../assets/hero-oz-wide.jpg');
  background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line-2);
}
.hero::after {
  content: ""; position: absolute; inset: 0; background-image: var(--grid);
  background-size: 48px 48px; opacity: .22; pointer-events: none;
}
.hero-inner {
  max-width: 1180px; margin: 0 auto; min-height: 360px;
  display: flex; align-items: center;
  padding: 32px 22px; position: relative; z-index: 1;
}
.hero-copy { max-width: 620px; }
.hero .eyebrow {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .28em;
  color: var(--cyan); margin-bottom: 12px; text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.hero h2 {
  font-family: var(--f-body); font-weight: 900; color: var(--white);
  font-size: 44px; line-height: 1.05; margin: 0 0 14px; text-shadow: 0 2px 22px rgba(0,0,0,.65);
}
.hero p { font-size: 14px; color: #d6dfee; line-height: 1.85; margin: 0; max-width: 540px; text-shadow: 0 1px 12px rgba(0,0,0,.65); }

/* ===== タブ ===== */
.tabs {
  display: flex; gap: 0; margin: 18px 0 0;
  border-bottom: 1px solid var(--line);
}
.tabs .tab, .tabs button.tab {
  flex: 1; appearance: none; border: none; background: none; cursor: pointer;
  font-family: var(--f-body); font-size: 14px; font-weight: 700; color: var(--t-weak);
  padding: 13px 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs .tab.active { color: var(--white); background: var(--tab-sel); border-bottom-color: var(--blue); }

.panel { padding-top: 4px; }

/* ===== セクション見出し（青バー＋計器感） ===== */
.section-title {
  display: flex; align-items: center;
  font-family: var(--f-body); font-size: 16px; font-weight: 700; color: var(--white);
  margin: 26px 0 12px;
}
.section-title::before {
  content: ""; display: inline-block; width: 3px; height: 18px;
  background: var(--blue); margin-right: 9px; border-radius: 2px;
  box-shadow: 0 0 10px rgba(46,125,255,.5);
}
.col-section .sub, .hero-copy + .sub { }
.sub { font-family: var(--f-mono); font-size: 12px; color: var(--t-mid); margin: -6px 0 12px; letter-spacing: .04em; }

/* ===== ボタングリッド（条件チップ） ===== */
.btn-grid { display: grid; gap: 8px; }
.btn-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.btn-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.btn-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 520px){ .btn-grid.cols-6 { grid-template-columns: repeat(4, 1fr); } }

.opt {
  appearance: none; cursor: pointer; text-align: center; line-height: 1.3;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500;
  color: var(--t-bright); background: var(--field);
  border: 1px solid var(--line); border-radius: 5px; padding: 11px 4px;
  transition: border-color .12s, background .12s, color .12s;
}
.opt.big { padding: 14px 4px; font-size: 14px; }
.opt:hover { border-color: #2c4673; }
.opt.selected {
  background: var(--tab-sel); border-color: var(--blue); color: var(--white);
  box-shadow: 0 0 12px rgba(46,125,255,.25);
}

/* ===== セレクト（車種から探す） ===== */
.v-select, #sort {
  width: 100%; padding: 12px; font-size: 15px; font-family: var(--f-body);
  color: var(--white); background: var(--field);
  border: 1px solid var(--line); border-radius: 5px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237d8aa3' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.v-select:disabled { color: var(--t-faint); background: #0a101c; }
.v-select option, #sort option { background: var(--panel); color: var(--white); }

.v-fit {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 7px;
  padding: 14px 16px; background: var(--panel);
}
.v-fit .fit-row {
  display: flex; justify-content: space-between; font-size: 14px;
  padding: 7px 0; border-bottom: 1px dashed var(--line-2);
}
.v-fit .fit-row span { color: var(--t-mid); }
.v-fit .fit-row b { color: var(--cyan); font-family: var(--f-mono); }
.v-fit .fit-note { font-size: 12px; color: var(--t-weak); margin: 10px 0 0; line-height: 1.6; }

.divider { border: 0; border-top: 1px solid var(--line-2); margin: 28px 0 0; }

/* ===== 並び替え / 件数 ===== */
.result-count { font-family: var(--f-mono); font-size: 13px; color: var(--t-mid); margin: 18px 0 6px; }

/* ===== 結果グリッド（PC3カラム/モバイル1カラム） ===== */
.cards { display: grid; gap: 16px; margin-top: 8px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

/* TELEMETRY 結果カード（main.js が出力する .wcard） */
.wcard {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 7px; padding: 22px 20px 16px; text-decoration: none; color: inherit;
  box-shadow: 0 18px 50px rgba(0,0,0,.28); transition: border-color .14s, transform .06s;
}
.wcard:hover { border-color: #2c4673; transform: translateY(-2px); }
.wcard .maker-chip {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--f-mono); font-size: 10px; color: var(--cyan);
  border: 1px solid var(--line); border-radius: 3px; padding: 2px 7px;
}
.wcard .wheel-photo {
  width: 158px; height: 158px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #142138, #0c1320 56%, #070d18);
  border: 1px solid var(--wheel-line); display: grid; place-items: center;
  margin: 8px 0 14px; position: relative;
}
.wcard .wheel-photo::before {
  content: ""; position: absolute; width: 130%; height: 130%;
  background: radial-gradient(circle, rgba(46,125,255,.22), transparent 60%);
}
.wcard .wheel-photo img { width: 100%; height: 100%; object-fit: contain; position: relative; }
.wcard .wheel-photo.ph::after {
  content: "WHEEL PHOTO"; font-family: var(--f-mono); font-size: 9px; color: var(--t-faint); letter-spacing: .1em;
}
.wcard .wname {
  font-family: var(--f-disp); font-size: 18px; font-weight: 700; letter-spacing: .02em;
  color: var(--white); line-height: 1.3; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wcard .chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 12px; }
.wcard .chips span {
  font-family: var(--f-mono); font-size: 10px; color: var(--t-bright);
  background: var(--field); border: 1px solid var(--line); border-radius: 3px; padding: 2px 7px;
}
.wcard .wfoot {
  width: 100%; border-top: 1px solid var(--line); padding-top: 13px; margin-top: auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
}
.wcard .price { font-family: var(--f-disp); font-size: 22px; font-weight: 800; color: var(--white); }
.wcard .price small { font-family: var(--f-body); font-size: 11px; font-weight: 500; color: var(--t-weak); }
.wcard .rating { font-family: var(--f-mono); font-size: 12px; color: var(--t-weak); }
.wcard .rating .stars { color: var(--cyan); }

.empty { text-align: center; color: var(--t-weak); padding: 44px 0; font-family: var(--f-mono); }

/* ===== 下部固定アクションバー ===== */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; gap: 10px; padding: 12px 16px;
  max-width: 1180px; margin: 0 auto;
  background: rgba(7,13,24,.92); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
}
.action-bar .reset {
  flex: 1; cursor: pointer; font-family: var(--f-body); font-size: 15px; font-weight: 700;
  color: var(--t-bright); background: transparent; border: 1px solid var(--line);
  border-radius: 6px; padding: 14px 0;
}
.action-bar .search {
  flex: 1.5; cursor: pointer; font-family: var(--f-disp); font-size: 17px; font-weight: 800; letter-spacing: .03em;
  color: var(--white); background: var(--blue); border: none; border-radius: 6px; padding: 14px 0;
  box-shadow: 0 0 18px rgba(46,125,255,.45);
}
.action-bar .search:hover { background: #3f8bff; }

/* ===== 旧来の横型カード（店舗検索・記事の商品カード） ===== */
.card {
  display: flex; gap: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 7px; padding: 12px;
  text-decoration: none; color: inherit; transition: border-color .12s;
}
.card:hover { border-color: #2c4673; }
.card img { width: 90px; height: 90px; object-fit: contain; border-radius: 6px; background: #0a101c; flex-shrink: 0; }
.card .info { flex: 1; min-width: 0; }
.card .maker { font-family: var(--f-mono); font-size: 11px; color: var(--cyan); }
.card .name { font-size: 14px; font-weight: 700; color: var(--white); margin: 3px 0 6px; line-height: 1.35; }
.card .specs { font-size: 12px; color: var(--t-mid); line-height: 1.6; }
.card .price { font-family: var(--f-disp); font-size: 16px; font-weight: 800; color: var(--white); margin-top: 4px; }
.card .price small { font-size: 11px; font-weight: 500; color: var(--t-weak); }
.card .rating { font-family: var(--f-mono); font-size: 12px; color: var(--cyan); margin-top: 2px; }

/* 店舗サービスタグ */
.tags { margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags .tag {
  font-family: var(--f-mono); font-size: 11px; color: var(--cyan);
  border: 1px solid var(--line); background: var(--field); border-radius: 4px; padding: 2px 7px;
}

/* ===== コラム誘導 / リンクリスト ===== */
.col-section { margin-top: 36px; border-top: 1px solid var(--line-2); padding-top: 22px; }
.col-list { list-style: none; padding: 0; margin: 8px 0 0; }
.col-list li { margin: 0 0 12px; }
.col-list a {
  display: block; position: relative; background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 7px;
  padding: 15px 38px 15px 16px; text-decoration: none; color: var(--t-bright);
  transition: border-color .12s, transform .06s;
}
.col-list a:hover { border-color: #2c4673; transform: translateY(-1px); }
.col-list a::after { content: "›"; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--blue); font-size: 24px; font-weight: 700; }
.col-list .t { font-size: 15px; font-weight: 700; color: var(--white); }
.col-list .d { font-size: 13px; color: var(--t-mid); margin-top: 5px; line-height: 1.6; }
.col-list li.soon a { color: var(--t-faint); pointer-events: none; border-left-color: var(--line); }
.col-list li.soon a::after { content: ""; }
.col-list li.soon .badge { font-size: 11px; color: var(--t-faint); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.col-link { text-align: center; margin: 20px 0; }
.col-link a { color: var(--cyan); font-family: var(--f-mono); font-weight: 700; text-decoration: none; font-size: 13px; }

/* ===== コラム記事 ===== */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 8px 18px 70px; }
.breadcrumb { font-family: var(--f-mono); font-size: 12px; color: var(--t-weak); margin: 12px 0; }
.breadcrumb a { color: var(--t-weak); text-decoration: none; }
.article h1 { font-family: var(--f-body); font-weight: 900; font-size: 24px; line-height: 1.4; margin: 10px 0 10px; color: var(--white); }
.article .lead { color: var(--t-mid); font-size: 14px; line-height: 1.85; margin: 0 0 10px; }
.article h2 {
  font-size: 19px; font-weight: 700; margin: 32px 0 12px; color: var(--white);
  border-left: 3px solid var(--blue); padding-left: 11px; line-height: 1.4;
}
.article h3 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; color: var(--t-bright); }
.article p { font-size: 15px; line-height: 1.95; margin: 0 0 14px; color: var(--t-bright); }
.article ul, .article ol { font-size: 15px; line-height: 1.95; padding-left: 1.4em; margin: 0 0 16px; color: var(--t-bright); }
.article li { margin-bottom: 4px; }
.article strong { color: var(--cyan); }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article th, .article td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; line-height: 1.5; }
.article th { background: var(--field); font-weight: 700; color: var(--white); }
.article td { color: var(--t-bright); }
.article .box { background: #0c1626; border: 1px solid var(--line); border-radius: 7px; padding: 14px 16px; margin: 16px 0; font-size: 14px; line-height: 1.8; color: var(--t-bright); }
.cta {
  display: block; text-align: center; text-decoration: none; margin: 26px 0;
  font-family: var(--f-disp); font-weight: 800; font-size: 17px; letter-spacing: .02em;
  color: var(--white); background: var(--blue); padding: 16px; border-radius: 6px;
  box-shadow: 0 0 18px rgba(46,125,255,.4);
}
.cta:hover { background: #3f8bff; }
.cta small { display: block; font-family: var(--f-body); font-size: 12px; font-weight: 500; opacity: .9; margin-top: 4px; }
.disclosure { font-family: var(--f-mono); font-size: 12px; color: var(--t-weak); border-top: 1px solid var(--line-2); margin-top: 36px; padding-top: 16px; line-height: 1.7; }

/* ===== アフィリエイト広告（A8）枠 ===== */
.ad-grid { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 8px; align-items: stretch; }
.ad-card {
  flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column;
  background: #0c1626; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; min-width: 0;
}
.ad-card:hover { border-color: #2c4673; }
.ad-card .ad-label { font-family: var(--f-mono); font-size: 11px; color: var(--t-mid); margin: 0 0 8px; line-height: 1.5; }
.ad-card .ad-banner { display: flex; justify-content: center; align-items: center; }
.ad-card .ad-banner a { display: inline-block; line-height: 0; }
.ad-card .ad-banner img { max-width: 100%; height: auto; border-radius: 4px; }
.ad-pr { font-family: var(--f-mono); font-size: 10px; color: var(--t-weak); letter-spacing: .08em; }
/* 記事内の単体広告（文脈挿入） */
.ad-inline { margin: 18px 0; text-align: center; }
.ad-inline img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.ad-inline .ad-pr { display: block; margin-bottom: 6px; text-align: left; }

.site-foot { border-top: 1px solid var(--line-2); margin-top: 24px; padding: 18px 18px 90px; text-align: center; font-size: 12px; color: var(--t-weak); }
.site-foot a { color: var(--cyan); text-decoration: none; font-weight: 600; }

/* 記事ヘッダーのサイト名（h1重複回避済みのdiv） */
.site-title a { color: var(--white); }

/* ===== トップの手順ブロック・目的別ナビ ===== */
.flow {
  font-family: var(--f-mono); font-size: 12px; color: var(--t-mid);
  text-align: center; margin: 16px 0 12px; line-height: 1.9;
}
.flow b { color: var(--cyan); }
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 6px; }
.hub a {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 16px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; color: var(--t-bright); transition: border-color .12s, transform .06s;
}
.hub a:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 0 14px rgba(46,125,255,.18); }
.hub .ic { font-size: 22px; line-height: 1; }
.hub .t { font-weight: 700; color: #fff; font-size: 14px; }
.hub .d { font-size: 11px; color: var(--t-mid); }
@media (max-width: 560px) { .hub { grid-template-columns: 1fr 1fr; } }

/* ===== タイヤ計算 ===== */
.calc-row { display: grid; gap: 10px; align-items: end; margin-bottom: 6px; }
.calc-row.c3 { grid-template-columns: 1fr 1fr 1fr; }
.calc-row.c4 { grid-template-columns: 1fr 1fr 1fr 1.1fr; }
.calc-field label { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--t-weak); margin-bottom: 5px; }
.calc-sub { font-family: var(--f-mono); font-size: 11px; color: var(--cyan); margin: 14px 0 8px; letter-spacing: .06em; }
.calc-num { font-family: var(--f-disp); font-weight: 800; font-size: 30px; color: var(--white); line-height: 1.1; }
.calc-num small { font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--t-weak); }
.calc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.calc-table th, .calc-table td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.calc-table th { color: var(--t-mid); font-family: var(--f-mono); font-weight: 500; background: var(--field); white-space: nowrap; }
.calc-table td { color: var(--t-bright); }
.judge-ok { color: var(--cyan); }
.judge-warn { color: #ff7a59; }
@media (max-width: 560px) { .calc-row.c4 { grid-template-columns: 1fr 1fr; } }

/* ===== モバイル ===== */
@media (max-width: 640px) {
  .wrap { padding: 14px 14px 110px; }
  .hero {
    background-image:
      linear-gradient(180deg, rgba(6,10,18,.5) 0%, rgba(6,10,18,.86) 72%, rgba(6,10,18,.96) 100%),
      url('../assets/hero-oz-mob.jpg');
  }
  .hero-inner { min-height: 280px; padding: 22px 16px; align-items: flex-end; }
  .hero-copy { max-width: 100%; }
  .hero h2 { font-size: 30px; }
  .hero p { font-size: 12.5px; }
  .cards { grid-template-columns: 1fr; }
  body::before { background-size: 38px 38px; }
}

/* もっと見るボタン（検索結果の追加読み込み） */
#more-wrap { text-align: center; margin: 16px 0 4px; }
.more-btn {
  display: inline-block; padding: 12px 32px; border-radius: 10px;
  border: 1px solid var(--line); background: #0c1626; color: var(--cyan);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.more-btn:hover { border-color: var(--cyan); }
