/* ネットカフェ最安値。生成ページ（build_pages.py）の唯一のスタイルシート。
 *
 * 外部フォントを読まない（CSS の取り込み規則も preload も置かない）。読み込みが
 * 1往復増えるだけで、価格の表は本文の字で読める。システムフォントだけを使う。
 *
 * 表が横に長い（席タイプ×時間×曜日）。**幅 375px で崩れないこと**が要件で、
 * 表は .scroll で囲んで横スクロールさせる。表そのものを縮めると金額が折り返して
 * 読めなくなる。金額のセルは折り返さない（white-space: nowrap）。 */

:root {
  --bg: #fff;
  --fg: #16181d;
  --mute: #5a6072;
  --line: #d9dce4;
  --accent: #0b5fa5;
  --warn-bg: #fff8e6;
  --warn-line: #e2c67a;
  --zebra: #f6f7fa;
  --max: 56rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: normal;
  overflow-wrap: anywhere; /* 長い店名・住所が 375px をはみ出さない */
}

a { color: var(--accent); }

/* ---- 枠 */

.hd {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 1rem;
}

.hd__t {
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem 2rem; /* 375px でも左右 1rem の余白を確保 */
}

.ft {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.82rem;
}

.ft p { margin: 0.4rem 0; }

.cr { color: var(--mute); }

/* ---- 見出し */

h1 { font-size: 1.35rem; line-height: 1.45; margin: 1rem 0 0.6rem; }

h2 { font-size: 1.1rem; margin: 1.8rem 0 0.5rem; }

h3 { font-size: 0.98rem; margin: 1rem 0 0.3rem; }

.crumb {
  font-size: 0.8rem;
  color: var(--mute);
  padding-top: 0.6rem;
}

.crumb a { color: var(--mute); }

/* ---- 開示（入会金・ビジター加算・載せていないチェーン） */

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}

.notice.small, .small { font-size: 0.82rem; }

.nodata {
  border: 1px solid var(--line);
  border-left: 4px solid var(--mute);
  padding: 0.6rem 0.8rem;
  background: var(--zebra);
}

.disclose { margin-top: 2rem; font-size: 0.88rem; color: var(--mute); }

.why { padding-left: 1.2rem; }

/* ---- 店の情報 */

.kv {
  display: grid;
  grid-template-columns: 7.5rem 1fr; /* 375px でも値が 1 行に収まる幅 */
  gap: 0.15rem 0.6rem;
  margin: 0.6rem 0;
  font-size: 0.92rem;
}

.kv dt { color: var(--mute); }

.kv dd { margin: 0; }

@media (max-width: 24rem) {
  .kv { grid-template-columns: 5.6rem 1fr; font-size: 0.88rem; }
}

/* ---- 表。横に長いので囲みをスクロールさせる */

.scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.6rem 0;
  border: 1px solid var(--line);
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--zebra);
  border-bottom: 1px solid var(--line);
}

th, td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--mute);
}

tbody tr:nth-child(even) { background: var(--zebra); }

tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* 金額。折り返すと「¥1,」「230」に割れて読めなくなる */
.price tbody td, .rank tbody td { white-space: nowrap; }

.price tbody th, .rank tbody th { white-space: nowrap; }

/* 店名・住所の列だけは折り返す（横スクロールが長くなりすぎる） */
.rank tbody td:nth-child(2) { white-space: normal; min-width: 9rem; }

.rank tbody td:last-child { white-space: normal; min-width: 8rem; color: var(--mute); }

td small, th small {
  display: block;
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--mute);
  white-space: normal;
}

.more, .none { font-size: 0.82rem; color: var(--mute); margin: 0.2rem 0 0; }

/* ---- 索引・リンク */

.idx { margin: 0.8rem 0; }

.idx ul, .near ul, .notes ul { padding-left: 1.2rem; margin: 0.3rem 0; }

.idx li, .near li { font-size: 0.9rem; }

.notes li { font-size: 0.88rem; }

.grid {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.25rem 0.6rem;
}

.grid li { font-size: 0.9rem; }

.grid small { color: var(--mute); margin-left: 0.3rem; }

.citylinks {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.citylinks li { font-size: 0.9rem; }
