/* ========================================================
   page.css — 読み物ページ（about / guide / privacy）

   主役は点数表。卓の脇に置く「点数表」らしさを出すため、
   表まわりだけ密度を上げ、それ以外の装飾は削っている。
   見出しは明朝、本文は本体アプリと同じ丸ゴシック。
   ======================================================== */

.page-body {
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- ヘッダー ---------- */
.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  padding-top: calc(11px + env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid var(--separator);
}

.page-header h1 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
}

.page-back {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  min-height: 44px;
  padding-right: 2px;
  white-space: nowrap;
}

.page-back:hover { color: var(--primary); }

/* ---------- 本文 ---------- */
.page-main {
  max-width: 40rem;      /* 約72文字 */
  margin: 0 auto;
  padding: 26px 18px calc(48px + env(safe-area-inset-bottom));
}

.page-main h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 44px 0 14px;
}

.page-main h2:first-child { margin-top: 0; }

.page-main h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 30px 0 8px;
  color: var(--text);
}

.page-main p,
.page-main li {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text);
}

.page-main p { margin: 0 0 1em; }

.page-main ul,
.page-main ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.page-main li { margin-bottom: 0.4em; }
.page-main li::marker { color: var(--text-tertiary); }

.page-main a { color: var(--primary); }

.page-lead {
  color: var(--text-secondary);
  margin-bottom: 30px !important;
}

/* ---------- 補足（箱で囲まず、罫だけで区切る） ---------- */
.page-note {
  margin: 22px 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.page-note strong { color: var(--text); }
.page-note p:last-child { margin-bottom: 0; }

/* ---------- 目次（枠を外し、罫のみ） ---------- */
.page-toc {
  margin: 0 0 34px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--separator);
}

.page-toc ul { list-style: none; padding-left: 0; margin: 0; }

.page-toc li {
  margin: 0;
  border-bottom: 1px solid var(--separator);
}

.page-toc li:last-child { border-bottom: none; }

.page-toc a {
  display: block;
  padding: 10px 2px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
}

.page-toc a:hover { color: var(--primary); }

/* ========================================================
   点数表 — このページの主役
   ======================================================== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0 6px;
  /* 端が切れていることを示す影 */
  background:
    linear-gradient(to right, var(--bg) 30%, rgba(0,0,0,0)) left / 22px 100% no-repeat,
    linear-gradient(to left,  var(--bg) 30%, rgba(0,0,0,0)) right / 22px 100% no-repeat;
}

.score-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 27rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.score-table th,
.score-table td {
  padding: 8px 7px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--separator);
}

/* 表頭 */
.score-table thead th {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--text-tertiary);
  padding-bottom: 6px;
}

.score-table thead th:first-child { text-align: left; }

/* 翻数の列 */
.score-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.score-table td.na { color: var(--text-tertiary); }

/* 満貫で頭打ちになった値は控えめに沈める */
.score-table td.mangan { color: var(--text-secondary); }

.score-table .unit {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-left: 1px;
}

/* 満貫以上のまとめ行 */
.score-table .cap-row th,
.score-table .cap-row td {
  border-bottom: none;
  padding-top: 5px;
  padding-bottom: 5px;
}

.score-table .cap-row:first-of-type th,
.score-table .cap-row:first-of-type td { padding-top: 14px; }

.score-table .cap-row td {
  text-align: left;
  padding-left: 7px;
}

.score-table .cap-name {
  display: inline-block;
  min-width: 4.5em;
  color: var(--text-secondary);
}

.table-hint {
  font-size: 0.8125rem !important;
  color: var(--text-tertiary);
  margin: 2px 0 26px !important;
}

/* ---------- 符の一覧 ---------- */
.fu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 10px 0 22px;
}

.fu-table th,
.fu-table td {
  padding: 9px 2px;
  border-bottom: 1px solid var(--separator);
  text-align: left;
}

.fu-table thead th {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--text-tertiary);
  padding-bottom: 6px;
}

.fu-table td:last-child,
.fu-table th:last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.fu-table tbody td:last-child { font-weight: 600; }
.fu-table tr:last-child td { border-bottom: none; }

.contact-table th,
.contact-table td {
  padding: 9px 14px;
}

/* ---------- 末尾 ---------- */
.page-updated {
  font-size: 0.8125rem !important;
  color: var(--text-tertiary);
  margin-top: 42px !important;
  padding-top: 16px;
  border-top: 1px solid var(--separator);
}

.page-footer {
  padding: 22px 18px calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--separator);
  font-size: 0.8125rem;
  text-align: center;
}

.page-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-block;
  padding: 6px 10px;
}

.page-footer a:hover { color: var(--primary); }

/* ---------- 広告枠 ---------- */
.ad-slot {
  margin: 34px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 配慮 ---------- */
.page-main :target { scroll-margin-top: 68px; }

a:focus-visible,
.page-toc a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
