/* オフロードタイヤ 適性チャート 共通スタイル
   姉妹サイト（nihon-offroad-course）とトーンを揃えています */

:root { color-scheme: light; }
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 24px;
  background: #f4f6f9;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: #1a1f28;
  line-height: 1.6;
}
.wrap { max-width: 980px; margin: 0 auto; }

/* ---------- ヘッダー ---------- */
header.page-header {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
header.page-header h1 { margin: 0 0 6px 0; font-size: 24px; }
header.page-header .date-line { color: #5a6472; font-size: 14px; }
.pagenav { margin-top: 10px; font-size: 13px; color: #5a6472; }
.pagenav a { color: #5a6472; text-decoration: none; border-bottom: 1px solid #d5dae1; }
.pagenav a:hover { color: #1a1f28; border-bottom-color: #8a929c; }
.pagenav .sep { margin: 0 8px; color: #b9c4d1; }

/* ---------- カード ---------- */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card p { margin: 0 0 10px; font-size: 14px; color: #2b3240; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0 0 10px; padding-left: 20px; font-size: 14px; color: #2b3240; }
.card li { margin-bottom: 4px; }
.card.lead { border-left: 4px solid #6f42c1; }
.card.lead strong { color: #1a1f28; }

/* ---------- タブ・操作列 ---------- */
.tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-bottom: 2px solid #e3e7ed;
  margin: 0 0 12px;
}
.tab {
  appearance: none;
  background: none; border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 8px 14px;
  font: inherit; font-size: 14px; font-weight: 700;
  color: #6c757d; cursor: pointer;
  border-radius: 6px 6px 0 0;
}
.tab:hover { background: #f4f6f9; color: #3a4252; }
.tab .count { font-size: 11.5px; font-weight: 600; color: #8a929c; margin-left: 5px; }
.tab[aria-selected="true"] { color: #1a1f28; border-bottom-color: #1a1f28; }

.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin: 0 0 14px; font-size: 13.5px; color: #3a4252;
}
.controls label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.controls select,
.controls input[type="search"] {
  font: inherit; font-size: 13.5px;
  padding: 4px 8px; border: 1px solid #d5dae1; border-radius: 6px;
  background: #fff; color: #1a1f28;
}
.controls input[type="search"]:focus-visible { outline: 2px solid #8a5a2b; outline-offset: 1px; }

/* 車種から探す */
#bike-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 12px; }
#bike-sizes:empty { display: none; }
.bike-label { font-size: 13px; color: #3a4252; font-weight: 600; }
.chip {
  appearance: none; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 15px;
  border: 1px solid #d5dae1; background: #fff; color: #2b3240;
}
.chip:hover { border-color: #8a929c; }
.chip.on { background: #8a5a2b; border-color: #8a5a2b; color: #fff; }
.bike-hint { font-size: 11.5px; color: #8a929c; }

/* ---------- タイヤ行 ---------- */
.tire {
  border: 1px solid #e3e7ed; border-left-width: 4px;
  border-radius: 8px; padding: 14px 16px; margin-bottom: 10px;
  background: #fff;
}
.tire.cat-mx        { border-left-color: #d9480f; }
.tire.cat-enduro    { border-left-color: #0d6efd; }
.tire.cat-trail     { border-left-color: #12805c; }
.tire.cat-trial     { border-left-color: #6f42c1; }
.tire.cat-adventure { border-left-color: #8a6100; }

.tire-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tire-head .maker { font-size: 13px; font-weight: 600; color: #5a6472; }
.tire-head .model { font-size: 16px; font-weight: 700; }
.tire-head .model a {
  color: inherit; text-decoration: none;
  border-bottom: 1px solid #d5dae1;
}
.tire-head .model a:hover { border-bottom-color: #8a929c; }

.tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 4px 7px; border-radius: 5px;
  border: 1px solid transparent;
  vertical-align: middle;
}
.tag.cat-mx        { color: #d9480f; background: #fff1e6; border-color: #f3c3a8; }
.tag.cat-enduro    { color: #0b5ed7; background: #e7f1ff; border-color: #b6d4fe; }
.tag.cat-trail     { color: #12805c; background: #e6f5ef; border-color: #a9dcc8; }
.tag.cat-trial     { color: #6f42c1; background: #f1eafe; border-color: #d3bff5; }
.tag.cat-adventure { color: #8a6100; background: #fdf4dc; border-color: #e8d290; }
.tag.street-ok  { color: #12805c; background: #e6f5ef; border-color: #a9dcc8; }
.tag.street-no  { color: #495057; background: #eef0f3; border-color: #d0d5db; }
.tag.street-unk { color: #8a6100; background: #fdf4dc; border-color: #e8d290; }
.tag.near       { color: #8a5a2b; background: #f8f1e8; border-color: #dcc3a4; }
.tag.narrow     { color: #6b5e10; background: #faf6dc; border-color: #d9cf8a; }
.tag.fitok      { color: #12805c; background: #e6f5ef; border-color: #a9dcc8; }
.tag.rimfit     { color: #0b5ed7; background: #e7f1ff; border-color: #b6d4fe; }

.tire .note { margin: 6px 0 0; font-size: 13px; color: #5a6472; }
.tire .sizes-line { margin: 4px 0 0; font-size: 12px; color: #8a929c; }
.tire .sizes-line strong { color: #7a4f24; }
.tire .sizes-line .fr-sep { color: #c3cad4; }
.tire .srcline { margin: 4px 0 0; font-size: 12px; color: #8a929c; }
.tire .srcline a { color: #5a6472; }
.tire .srcline.none { color: #b08900; }

/* ---------- 評価ドット（1〜5） ----------
   ドットは土の色。オフロードのサイトなので、評価の物差しも土色で統一 */
.axes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 12px 0 4px;
}
.axis { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.axis .axis-label { width: 5.5em; color: #3a4252; flex: none; }
.axis .axis-val { color: #5a6472; font-variant-numeric: tabular-nums; }
.dots { display: inline-flex; gap: 4px; flex: none; }
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #e3e7ed;
}
.dot.on { background: #8a5a2b; }
.axis.is-sorted .axis-label { font-weight: 700; color: #7a4f24; }

/* ---------- ショップリンク ---------- */
.shops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.shop {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 7px;
  text-decoration: none;
  border: 1px solid #d5dae1; color: #2b3240; background: #fff;
  transition: border-color .12s, background .12s;
}
.shop:hover { border-color: #8a929c; background: #f4f6f9; }
.shop:focus-visible { outline: 2px solid #0d6efd; outline-offset: 2px; }
.shop .shop-suffix { font-weight: 400; color: #8a929c; }

/* ---------- サイズ表記の対応表（size.html） ---------- */
.card h3 { margin: 18px 0 8px; font-size: 14.5px; }
.card h3:first-of-type { margin-top: 4px; }
.tblwrap { overflow-x: auto; }
.sizetbl {
  border-collapse: collapse;
  font-size: 13px; line-height: 1.45;
  min-width: 560px;
}
.sizetbl th, .sizetbl td {
  border: 1px solid #e3e7ed;
  padding: 6px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.sizetbl th { background: #f4f6f9; font-size: 12px; color: #3a4252; }
.sizetbl td.empty { background: #fafbfc; }
.sizetbl td[rowspan] { background: #fdf8f2; }
.readtbl { border-collapse: collapse; font-size: 13.5px; }
.readtbl th, .readtbl td {
  border: 1px solid #e3e7ed;
  padding: 8px 12px; text-align: left; vertical-align: top;
}
.readtbl th { background: #f4f6f9; font-size: 12.5px; color: #3a4252; white-space: nowrap; }
.readtbl .size-ex { font-weight: 700; white-space: nowrap; }

/* リム幅・チューブ表（rim-tube.html）: 左寄せ・折り返しあり */
.sizetbl.left th, .sizetbl.left td { text-align: left; }
.sizetbl.left td.rims,
.sizetbl.left td.note-cell { white-space: normal; }
.sizetbl.left td.note-cell { font-size: 12px; color: #5a6472; min-width: 11em; }

/* ---------- 注記・フッター ---------- */
.hint { font-size: 12.5px; color: #5a6472; margin: 12px 0 0; }
.tab-note { font-size: 13px; color: #5a6472; margin: -2px 0 12px; }

footer.page-footer {
  text-align: center;
  font-size: 12.5px; color: #6c757d;
  padding: 8px 0 4px;
}
footer.page-footer .site-name { font-weight: 700; margin-bottom: 2px; }
footer.page-footer .foot-links { margin-top: 6px; }
footer.page-footer a { color: #6c757d; }

/* ---------- モバイル ---------- */
@media (max-width: 640px) {
  body { padding: 14px; }
  .axes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .axis .axis-label { width: 5em; }
}
@media (max-width: 400px) {
  .axes { grid-template-columns: 1fr; }
}
