/* 中検サイト 共通スタイル（PHP非依存・静的版）
   旧サイト（base.css / 30th_toppage.css）の見た目を、画像と同じ寸法で再現している。
   幅 760px 以下では画像ごと縮み、スマホ幅ではメニューと段組みを組み替える。 */
:root {
  --site-w: 760px;
  --ink: #333;
  --link: #0000ff;
  --link-hover: #993400;
  --orange: #c45600;
  --red: #ff0000;
  --grad-from: #dd3333;
  --grad-to: #e94545;
  --nav-bg: #b7bec8;
  --line: #999;
  --th-bg: #eeeeee;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "MS UI Gothic", Meiryo, sans-serif; /* Windows では旧サイトと同じ MS UI Gothic で表示（改行位置を揃える） */
  font-size: 12px;  /* 旧サイト base.css と同じ 12px / 26px */
  line-height: 26px;
}
img { max-width: 100%; height: auto; border: 0; vertical-align: top; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

.site { max-width: var(--site-w); margin: 20px auto 0; }

/* ---------- ヘッダー（ロゴ・協会名・よくある質問/お問合せ） ---------- */
.site-header { display: flex; align-items: stretch; background: linear-gradient(180deg, #e52b2b, #f07b7b); }
.site-header .brand { margin: 0; flex: 0 0 19.08%; }      /* 145 / 760 */
.site-header .brand-block { flex: 0 0 66.84%; }           /* 508 / 760 */
.site-header .util-nav { flex: 0 0 14.08%; display: flex; flex-direction: column; } /* 107 / 760 */
.site-header img { display: block; width: 100%; }
.site-header.simple { border-bottom: 2px solid #fff; } /* 旧サイトの限定公開ページはヘッダー下に白い隙間がある */

/* ---------- 上部メニュー（画像ボタン、ホバーで _on 画像） ---------- */
.global-nav { margin: 2px 0 3px; padding: 5px; background: var(--nav-bg); }
.global-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.global-nav a { display: block; background-size: 100% 100%; }
.global-nav img { display: block; width: 100%; }
.global-nav a:hover img { opacity: 0; }
.gnav-menu1 { background-image: url(/image/menu1_on.gif); }
.gnav-menu6 { background-image: url(/image/menu6_on.gif); }
.gnav-menu3 { background-image: url(/image/menu3_on.gif); }
.gnav-menu4 { background-image: url(/image/menu4_on.gif); }
.gnav-menu5 { background-image: url(/image/menu5_on.gif); }

/* ---------- 下層ページ：灰色の地に白い枠 ---------- */
.page-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 10px;
  padding: 0 10px 15px;
  background: url(/image/l_bg.gif) repeat;
}
.page-layout.no-side { grid-template-columns: 1fr; }
.page-layout > * { min-width: 0; }

.side-nav { padding-top: 36px; }
.side-nav > ul {
  list-style: none;
  margin: 0;
  padding: 16px 8px 16px 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px #f2f2f2, 0 1px 2px rgba(0,0,0,.25);
}
.side-nav > ul > li { padding-left: 18px; background: url(/image/icon1.gif) no-repeat 0 9px; }
.side-nav > ul > li + li { margin-top: 5px; }
.side-nav a { color: var(--orange); font-weight: bold; font-size: 14px; line-height: 1.6; display: inline-block; padding: 3px 0; }
.side-nav a:hover { color: var(--orange); }
.side-nav a[aria-current="page"] { text-decoration: underline; }
.side-nav li ul { list-style: none; margin: 0; padding: 0 0 0 4px; }
.side-nav li ul a { color: var(--ink); font-size: 13px; font-weight: normal; }
.side-nav li ul a::before { content: "・"; }

.page-title {
  margin: 0;
  padding: 8px 2px 6px;
  color: #fff;
  font-size: 17px;
  line-height: 22px;
  text-shadow: 1px 1px 1px #555;
}
.page-title::before { content: "◎ "; font-weight: normal; }
.content-box {
  padding: 16px 20px 20px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px #f2f2f2, 0 1px 2px rgba(0,0,0,.25);
  overflow-wrap: break-word;
}

/* ---------- 本文 ---------- */
.content-box > :first-child { margin-top: 0; }
.content-box p { margin: 0 0 .8em; }
.content-box ul, .content-box ol { margin: 0 0 1em; padding-left: 1.5em; }
/* 大見出し：赤のグラデーション */
.content-box h2 {
  margin: 24px 0 8px;
  padding: 2px 10px;
  color: #fff;
  font-size: 14px;
  line-height: 24px;
  background: linear-gradient(90deg, #dd3333, #e94545);
  border-radius: 3px;
}
.content-box h3 { margin: 18px 0 6px; padding-left: 6px; border-left: 4px solid var(--orange); font-size: 14px; line-height: 18px; }
.content-box h4 { margin: 14px 0 4px; font-size: 14px; }
.content-box h5 { margin: 8px 0 2px; font-size: 12px; color: var(--link); font-weight: normal; }
.content-box hr { border: 0; border-top: 1px dotted var(--line); margin: 16px 0; }

.fsr14 { color: var(--red); font-weight: bold; font-size: 14px; }
.fsb13 { color: #000; font-weight: bold; font-size: 13px; }
.font-blue { color: var(--link); font-weight: bold; }
.font-black { color: #000; font-weight: bold; }
.font-red, .red, .fc1, .em-red { color: var(--red); }
.em-blue { color: var(--link); }
.fb, .fwb { font-weight: bold; }
.yellow { color: #ff6600; }
.center { text-align: center; }
.right { text-align: right; }

/* テーブル：border-collapse: separate ＋ 角丸 */
.content-box table {
  width: 100%;
  margin: 4px 0 12px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
}
.content-box th, .content-box td { padding: 6px 8px; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; vertical-align: middle; text-align: left; }
/* 旧サイトで class="center" の付いたマス（PDF アイコンなど）は中央に */
.content-box th.center, .content-box td.center { text-align: center; }
.content-box th.right, .content-box td.right { text-align: right; }
/* 旧サイトで灰色（bgc-t）だった見出し的なマス */
.content-box td.shade { background: #f1f1f1; }
.content-box th.edge-r, .content-box td.edge-r { border-right: 0; }
.content-box th.edge-b, .content-box td.edge-b { border-bottom: 0; }
.content-box th { background: var(--th-bg); color: #000; font-weight: bold; text-align: center; }
.content-box td p:last-child, .content-box th p:last-child { margin-bottom: 0; }
.content-box th img, .content-box td img { max-width: none; }
.content-box table.plain { border: 0; border-radius: 0; }
.content-box table.plain th, .content-box table.plain td { border: 0; background: none; vertical-align: top; }
/* 動画サムネイルの表は枠内に収める（サムネイルは320px幅のため、3列だと本文幅を超える） */
.content-box table.video-grid { width: 100%; table-layout: fixed; }
.content-box table.video-grid td img { max-width: 100%; }

.notice { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 6px; background: #fafafa; }
.btn { display: inline-block; padding: 6px 18px; border-radius: 4px; background: linear-gradient(180deg, #e94545, #dd3333); color: #fff; font-weight: bold; }
.btn:hover { color: #fff; opacity: .9; text-decoration: none; }

/* ---------- トップページ ---------- */
.top-page .top-main {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4px;
  padding: 4px 5px 5px;
  background: url(/image/contents_bk.gif) repeat;
}
.top-page .top-main > * { min-width: 0; }
.exam-title { margin: 0; }
.exam-title img { display: block; width: 100%; height: auto; }
/* 旧サイトの見た目（中央寄せ・水色の地・青い回数）に合わせ、文字は旧サイトより一回り小さく */
.exam-body { border: 1px solid #333366; border-top: 0; background: url(/image/kenteibi_bk.gif) repeat; }
.exam-next { padding: 8px 12px 10px; border-bottom: 1px dotted var(--line); text-align: center; }
.exam-next p { margin: 0; }
.exam-next .round-line { text-align: left; font-weight: bold; font-size: 16px; }
.exam-next .round, .exam-later .round { color: var(--link); font-weight: bold; }
.exam-next .status { margin-left: 1.2em; color: var(--red); }
.exam-next .date { margin: 2px 0 4px; font-size: 24px; white-space: nowrap; font-weight: bold; line-height: 1.3; color: #333; }
.exam-next .label { margin-top: 6px; text-align: left; font-size: 13px; font-weight: bold; }
.exam-next .sub-date { font-size: 15px; font-weight: bold; }
.exam-next .apply { font-size: 16px; font-weight: bold; line-height: 1.5; }
.exam-next .note { margin-top: 4px; text-align: left; font-size: 11px; line-height: 1.6; }
.exam-next .note strong { color: var(--red); font-size: 13px; }
.exam-later { padding: 5px 12px; font-size: 14px; font-weight: bold; }
.exam-later + .exam-later { border-top: 1px dotted var(--line); }
.exam-later .round { margin-right: 1.2em; }

.apply-buttons { display: grid; grid-template-columns: 146fr 149fr; gap: 0; margin-top: 4px; }
.apply-buttons a {
  display: block;
  overflow: hidden;
  text-indent: 200%;
  white-space: nowrap;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.btn-internet { grid-column: 1 / -1; aspect-ratio: 295 / 60; background-image: url(/image/btn_internet.jpg); }
.btn-internet:hover { background-image: url(/image/btn_internet_over.jpg); }
.btn-annai { aspect-ratio: 146 / 48; background-image: url(/image/btn_annai.jpg); }
.btn-annai:hover { background-image: url(/image/btn_annai_over.jpg); }
.btn-shoseki { aspect-ratio: 145 / 48; background-image: url(/image/btn_shoseki.jpg); }
.btn-shoseki:hover { background-image: url(/image/btn_shoseki_over.jpg); }

.top-news { background: #fff; }
.news-title { margin: 6px 0 0 4px; }
.news-scroll { height: 500px; overflow-y: auto; padding: 4px; }
.news-list { width: 100%; border-collapse: collapse; font-size: 11.5px; line-height: 1.5; }
.news-list td { padding: 5px 4px; vertical-align: top; }
.news-list td.date { width: 84px; white-space: nowrap; }
.news-list a { text-decoration: underline; }

.top-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.sns { display: flex; align-items: center; gap: 10px; }
.sns img { width: 45px; }
.sns a:last-child img { width: 170px; }
.top-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 110px); gap: 3px; }
.top-links a {
  display: block;
  height: 38px;
  line-height: 38px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  background: url(/image/btn_bk1.png) no-repeat center / 100% 100%;
}
.top-links a:hover { color: #666; text-decoration: none; }

/* ---------- フッター ---------- */
.site-footer { margin-top: 12px; text-align: center; }
.footer-links { list-style: none; margin: 0 auto; padding: 0 10px; display: flex; flex-wrap: wrap; justify-content: center; font-size: 12px; line-height: 20px; }
.footer-links:last-of-type { margin-bottom: 18px; }
.footer-links li + li::before { content: "|"; margin: 0 1.2em; color: var(--ink); }
.copyright { position: relative; }
.copyright img { display: block; width: 100%; }
.copyright .pagetop { position: absolute; right: 1%; top: 20%; width: 11.2%; height: 60%; overflow: hidden; text-indent: 200%; white-space: nowrap; }
.footer-address { margin: 0 0 20px; font-size: 13px; line-height: 20px; }

/* ---------- スマホ ---------- */
@media (max-width: 768px) {
  .site { margin-top: 0; }
  .global-nav ul { grid-template-columns: repeat(3, 1fr); }
  .page-layout { grid-template-columns: 1fr; padding: 0 8px 12px; }
  .side-nav { order: 2; padding-top: 0; }
  .content-box { padding: 12px; }
  .top-page .top-main { grid-template-columns: 1fr; }
  .exam-title img { width: 100%; }
  .top-bottom { flex-direction: column; align-items: stretch; padding: 0 8px; }
  .top-links { grid-template-columns: repeat(2, 1fr); }
  /* スマホは折り返しの行頭に区切りが出ないよう，区切りの代わりに間隔をあける */
  .footer-links { gap: 2px 14px; padding: 0 12px; }
  .footer-links + .footer-links { margin-top: 6px; }
  .footer-links li + li::before { content: none; }

  /* テーブルは常にカード表示（data-label を ::before で表示） */
  .content-box table, .content-box thead, .content-box tbody, .content-box tr, .content-box th, .content-box td { display: block; width: 100%; }
  .content-box table { border: 0; border-radius: 0; overflow: visible; }
  .content-box thead { display: none; }
  .content-box tr { margin-bottom: 10px; border: 1px solid #ccc; border-radius: 10px; overflow: hidden; }
  .content-box table.plain tr { border: 0; border-radius: 0; margin-bottom: 4px; }
  .content-box th img, .content-box td img { max-width: 100%; }
  .content-box table.backnumber td:empty { display: none; }
  .content-box th, .content-box td { border-right: 0; }
  .content-box th.edge-b, .content-box td.edge-b { border-bottom: 1px solid #ccc; }
  .content-box tr > :last-child { border-bottom: 0; }
  .content-box td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: bold; color: var(--orange); }
}

/* ---------- 受付停止のお知らせ ---------- */
.closed-notice { margin: 10px 0 16px; padding: 16px 18px; border: 2px solid #dd3333; border-radius: 10px; background: #fff5f5; }
.closed-notice p { margin: 0 0 8px; }
.closed-notice .closed-title { font-size: 1.15em; font-weight: bold; color: #dd3333; }
.closed-notice .closed-contact { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed #e9a0a0; }
.closed-label { display: inline-block; padding: 3px 10px; border: 1px solid #dd3333; border-radius: 4px; background: #fff5f5; color: #dd3333; font-size: .9em; font-weight: bold; }
.apply-closed { margin-top: 8px; padding: 8px 12px; border: 1px solid #e9a0a0; border-radius: 8px; background: #fff7f7; color: #c33; font-size: 12px; line-height: 1.6; font-weight: normal; text-align: left; }
/* 短いセル（級名・番号など）は折り返さない。build.py が nw を付ける */
.content-box td.nw, .content-box th.nw { white-space: nowrap; }

/* よくある質問：上部の分類ボタンを本文幅に収める */
.content-box table.faq-tabs { table-layout: fixed; }
.content-box table.faq-tabs th { padding: 2px; }
.content-box table.faq-tabs th img { max-width: 100%; height: auto; }

/* 団体コード：五十音の索引と一覧 */
.content-box table.kana-index { width: auto; margin: 0 auto 16px; }
.content-box table.kana-index td { padding: 4px 8px; text-align: center; }
.content-box table.code-list { width: 100%; }
.content-box table.code-list td:first-child, .content-box table.code-list th:first-child { width: 6em; text-align: center; background: var(--th-bg); }
@media (max-width: 768px) {
  .content-box table.kana-index { display: table; }
  .content-box table.kana-index tbody { display: table-row-group; }
  .content-box table.kana-index tr { display: table-row; border: 0; margin: 0; }
  .content-box table.kana-index td { display: table-cell; width: auto; padding: 3px 4px; }
  .content-box table.faq-tabs, .content-box table.faq-tabs tbody { display: block; }
  .content-box table.faq-tabs tr { display: flex; flex-wrap: wrap; gap: 4px; border: 0; }
  .content-box table.faq-tabs th { display: block; width: auto; flex: 1 1 30%; }
}
@media (max-width: 768px) {
  .content-box table.code-list td:first-child { width: 100%; text-align: left; background: none; }
}

/* 合格者受験番号 */
.num-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.content-box h4.num-grade { margin-top: 20px; padding: 4px 8px; background: var(--th-bg); border-radius: 6px; }
.num-count { margin: 4px 0; font-size: 12px; color: #666; }
.num-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); margin: 0 0 6px; padding: 0 1px 1px 0; list-style: none; }
.content-box .num-list { padding: 0 1px 1px 0; }
.num-list li { margin: 0 -1px -1px 0; padding: 5px 2px; border: 1px solid #ccc; background: #fff; text-align: center; font-size: 13px; }

/* 試験結果：回の切り替え（旧サイトのプルダウンの代わり） */
.round-links { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 10px; font-size: 12px; }
.round-links strong { color: #dd3333; }
/* 試験結果・試験日の表：数字と日付を1行で */
.content-box table.compact th, .content-box table.compact td { padding: 4px 3px; font-size: 11.5px; letter-spacing: -0.02em; white-space: nowrap; }
.content-box table.compact td { text-align: right; }

/* 左メニューのサブメニュー（アコーディオン） */
.side-nav details > summary { display: flex; align-items: center; list-style: none; cursor: pointer; }
.side-nav details > summary::-webkit-details-marker { display: none; }
.side-nav details > summary::after { content: ""; width: 6px; height: 6px; margin-left: auto; margin-right: 6px; border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); transition: transform .15s; }
.side-nav details[open] > summary::after { transform: rotate(45deg); }
/* 『中国語の環』のバックナンバー：6列を枠内に収める */
.content-box table.backnumber { width: 100%; table-layout: fixed; }
.content-box table.backnumber td { padding: 8px 2px; white-space: nowrap; letter-spacing: -0.02em; text-align: center; }
/* 号と刊行月を1行に（元の <br> は使わない） */
.content-box table.backnumber td br { display: none; }
@media (max-width: 768px) {
  /* スマホは1行に3号ずつ */
  .content-box table.backnumber { border: 1px solid #ccc; border-radius: 10px; overflow: hidden; }
  .content-box table.backnumber tbody { display: block; margin: 0 -1px -1px 0; }
  .content-box table.backnumber tr { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border: 0; border-radius: 0; }
  .content-box table.backnumber tr > td { display: block; width: auto; padding: 6px 2px; font-size: 12px; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; }
  .content-box table.backnumber td:empty { display: block; }
}

/* 取扱書店：旧サイトと同じピンクの受付期間・都道府県の選択・青い見出し */
.shop-period { margin-bottom: 10px; padding: 6px 10px; background: rgb(240, 199, 199); }
.content-box .shop-period table.plain { width: auto; margin: 0; }
.content-box .shop-period td { padding: 1px 0 1px 10px; line-height: 20px; vertical-align: top; }
.content-box .shop-period p.kome { margin: 0; padding-left: 1.6em; text-indent: -1.6em; }
.pref-jump { position: relative; width: 12em; margin: 0 0 10px auto; font-size: 13px; }
.pref-jump > summary { padding: 2px 8px; border: 1px solid #999; border-radius: 4px; background: #fff; cursor: pointer; list-style: none; }
.pref-jump > summary::-webkit-details-marker { display: none; }
.pref-jump > summary::after { content: "▾"; float: right; }
.pref-jump ul { position: absolute; right: 0; z-index: 10; width: 22em; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; margin: 2px 0 0; padding: 8px 10px; list-style: none; border: 1px solid #999; border-radius: 4px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.content-box h3.pref { margin-top: 14px; padding: 4px 0 4px 10px; border-left: 5px solid #6CACD6; border-top: 0; font-size: 14px; }
.content-box h3.pref ~ table td { padding: 5px 6px; font-size: 13px; line-height: 1.5; }
.content-box h3.pref ~ hr { margin: 10px 0; border-top: 1px solid #999; }
.content-box h3.pref ~ table td:first-child { width: 8.5em; white-space: nowrap; }
@media (max-width: 768px) {
  /* 取扱書店：スマホでも「地名｜店名」の2列の表に（カードにすると地名が細切れになる） */
  .content-box h3.pref ~ table { display: table; border: 1px solid #ccc; border-radius: 10px; }
  .content-box h3.pref ~ table tbody { display: table-row-group; }
  .content-box h3.pref ~ table tr { display: table-row; margin: 0; border: 0; border-radius: 0; }
  .content-box h3.pref ~ table td { display: table-cell; padding: 5px 6px; font-size: 12px; border-bottom: 1px solid #ccc; }
  .content-box h3.pref ~ table td:first-child { width: 1%; border-right: 1px solid #ccc; }
  .content-box h3.pref ~ table tr:last-child td { border-bottom: 0; }
}
@media (max-width: 768px) {
  .content-box .shop-period table.plain, .content-box .shop-period tr { display: table; width: auto; }
  .content-box .shop-period td { display: table-cell; width: auto; }
}
.round-picker { text-align: right; }
.round-select { padding: 2px 4px; font-size: 13px; }
.content-box table.print-list td { vertical-align: middle; }
.content-box table.print-list td.fb { text-align: center; }

/* スマホ：数字や級が並ぶ表は表のまま（build.py が grid を付けて .table-scroll で包む）。
   長い文の表はカード表示にし、1行目の見出しは各セルの data-label で出す */
.table-scroll { margin-bottom: 12px; }
.table-scroll > table { margin-bottom: 0; }
@media (max-width: 768px) {
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .content-box table.grid { display: table; width: 100%; border: 1px solid #ccc; border-radius: 10px; border-collapse: separate; }
  .content-box table.grid thead { display: table-header-group; }
  .content-box table.grid tbody { display: table-row-group; }
  .content-box table.grid tr { display: table-row; margin: 0; border: 0; border-radius: 0; }
  .content-box table.grid th, .content-box table.grid td { display: table-cell; width: auto; }
  .content-box table.grid:not(.compact) th, .content-box table.grid:not(.compact) td { padding: 5px 2px; font-size: 11px; letter-spacing: -0.04em; }
  .content-box table.grid.compact th, .content-box table.grid.compact td { padding: 4px 2px; font-size: 11px; letter-spacing: -0.04em; }
  .content-box table.grid th:not(.edge-r), .content-box table.grid td:not(.edge-r) { border-right: 1px solid #ccc; }
  .content-box table.grid tr > :last-child { border-bottom: 1px solid #ccc; }
  .content-box table.grid .edge-b { border-bottom: 0; }
  .content-box tr.label-row { display: none; }
  .content-box table.grid .sp { display: none; }
  .content-box table.grid td[data-label]::before { content: none; }
  .content-box table.grid td img[src$="pdf.gif"] { width: 36px; height: auto; }
}
/* 協会概要の理事長写真：スマホでは本文を写真の下から始める（横に数文字だけ残るのを防ぐ） */
@media (max-width: 768px) {
  .content-box img.photo-block { display: block; max-width: 100%; height: auto; margin: 0 auto 8px; }
}

/* 受験申込：旧サイトと同じく申込方法ごとに灰色の枠で囲み、ボタンを2列に並べる */
.entry-box { display: flex; align-items: flex-start; margin-bottom: 10px; padding: 5px; border: 1px solid #ccc; }
.entry-box + h3 { margin-top: 20px; }
.content-box .entry-label { flex: 0 0 80px; margin: 0; padding: 5px 0 0 3px; }
.entry-btns { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 195px)); gap: 10px 6px; padding: 3px 0; }
.entry-btns img { display: block; width: 100%; height: auto; }
.entry-btns .wide { grid-column: 1 / -1; }
/* 受付停止中のボタン：灰色にして押せないように */
.entry-disabled { cursor: not-allowed; }
.entry-disabled img { filter: grayscale(1); opacity: .45; }
@media (max-width: 768px) {
  .entry-box { display: block; }
  .content-box .entry-label { padding: 0 0 6px; }
  .entry-btns { grid-template-columns: 1fr 1fr; }
}

/* 過去問題・解説：書籍ごとに表紙・説明・SAMPLE を縦にまとめる（旧サイトは表で、スマホでは表紙だけ続けて並んでいた） */
.books { display: flex; gap: 8px; margin: 4px 0 16px; }
.book, .book-desc { flex: 1 1 0; min-width: 0; }
.book { text-align: center; }
.book-img img { max-width: 100%; height: auto; }
.book-text { margin-top: 6px; text-align: center; }
.content-box .book-text p { margin: 0 0 2px; }
/* 過去問題・解説：書籍ごとの見出しの上に間をとる（旧サイトは spacer.gif で20px前後） */
.content-box .apply-closed + p.fsr14, .content-box .books + p.fsr14 { margin-top: 28px; margin-bottom: 4px; }
.content-box .books { margin-top: 10px; }
.book-sample { margin-top: 6px; }
@media (max-width: 768px) {
  .books { flex-wrap: wrap; }
  .book-desc { flex-basis: 100%; }
}

/* オンライン学習：動画ごとにサムネイルとタイトルをまとめる（旧サイトは画像の行とタイトルの行が別の表） */
.videos { display: grid; gap: 4px 16px; margin: 4px 0 16px; padding: 0 8px; }
.videos.cols-2 { grid-template-columns: repeat(2, 1fr); }
.videos.cols-3 { grid-template-columns: repeat(3, 1fr); }
.video { min-width: 0; }
.video img { display: block; width: 100%; height: auto; }
.content-box .video-cap { margin: 4px 0 8px; }
@media (max-width: 768px) {
  .videos.cols-3 { grid-template-columns: repeat(2, 1fr); gap: 4px 10px; padding: 0; }
  .videos.cols-2 { gap: 4px 10px; padding: 0; }
  .content-box .video-cap { font-size: 12px; line-height: 1.5; }
}

/* PC とスマホで出し分け */
.sp-only { display: none; }
@media (max-width: 768px) {
  .content-box .pc-only { display: none; }
  .sp-only { display: block; }
}
/* 学校・企業の皆様へ：スマホでは試験ごとのカード */
.g-test-card { margin-bottom: 10px; border: 1px solid #ccc; border-radius: 10px; overflow: hidden; }
.content-box .g-test-name { margin: 0; padding: 6px 10px; background: var(--th-bg); font-weight: bold; text-align: center; }
.g-test-card dl { margin: 0; padding: 4px 10px 8px; }
.g-test-card dt { margin-top: 6px; font-size: 11px; font-weight: bold; color: var(--orange); }
.g-test-card dd { margin: 0; }
.content-box .fee-one { margin-top: 4px; font-weight: bold; }
.g-test-card .fee-list { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.g-test-card .fee-list dt { margin: 0; font-size: 13px; color: inherit; }
.g-test-card .fee-list dd { text-align: right; }
.g-test-card .fee-list .fee-group { grid-column: 1 / -1; margin-top: 8px; padding-top: 6px; border-top: 1px dotted #ccc; color: var(--orange); font-size: 11px; }

/* 番号付きの枠なし表（(1)｜本文 など）：スマホでも番号の横に本文を置く。build.py が numbered を付ける */
@media (max-width: 768px) {
  .content-box table.numbered { display: table; }
  .content-box table.numbered tbody { display: table-row-group; }
  .content-box table.numbered tr { display: table-row; margin: 0; }
  .content-box table.numbered td { display: table-cell; width: auto; padding: 4px 6px 4px 0; }
  .content-box table.numbered td:first-child:not([colspan]) { width: 1%; white-space: nowrap; }
}

/* 特定商取引法に基づく表示：支払方法 */
.nowrap { white-space: nowrap; }
.content-box .pay-head { margin: 0; font-weight: bold; }
.content-box .pay-list { margin: 2px 0 10px; padding-left: 1.4em; }
.content-box .pay-list:last-child { margin-bottom: 0; }
.pay-sub { color: #555; font-size: 12px; }

/* 協会概要：財務経理情報（年度＋PDF）。PC は2列（最新年度だけ1行目）、スマホは1列 */
.content-box .pdf-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; margin: 4px 0 16px; padding: 0; list-style: none; }
.pdf-list li { display: flex; align-items: center; gap: 6px; }
.pdf-list span { white-space: nowrap; font-size: 12.5px; letter-spacing: -0.02em; }
.pdf-list li:first-child + li { grid-column: 1; }
.pdf-list img { display: block; }
@media (max-width: 768px) {
  .content-box .pdf-list { grid-template-columns: 1fr; gap: 4px; }
}

/* 書籍・出版物のお申込み（郵便振替） */
.content-box .order-account { padding: 8px 12px; border: 1px solid #ccc; border-radius: 8px; background: #fafafa; font-weight: bold; }
/* 価格表は全部同じ幅・同じ列幅にそろえる（価格の列は右端に固定幅） */
.content-box table.price-table { width: 100%; }
.content-box table.price-table th:last-child, .content-box table.price-table td:last-child { width: 9em; }
.content-box table.price-table td:last-child { text-align: right; white-space: nowrap; }
/* 『中国語の環』関連書籍：書籍名｜価格｜内容。内容は書籍名と区別して小さめ・灰色 */
.content-box table.books-price th:last-child, .content-box table.books-price td:last-child { width: auto; text-align: left; white-space: normal; }
.content-box table.books-price th:last-child { text-align: center; }
.content-box table.books-price th:nth-child(2), .content-box table.books-price td:nth-child(2) { width: 6.5em; text-align: right; white-space: nowrap; }
.content-box table.books-price td:nth-child(1) { font-weight: bold; }
@media (min-width: 769px) { .content-box table.books-price td:nth-child(1) { white-space: nowrap; } }
.content-box table.books-price td:last-child { color: #555; font-size: 12px; }
.content-box table.books-price .price-note { margin-top: 2px; }
.price-note { display: block; color: #555; font-size: 12px; font-weight: normal; white-space: normal; }
.sp-br { display: none; }
@media (max-width: 768px) {
  .sp-br { display: inline; }
  .content-box table.price-table { display: table; width: 100%; border: 1px solid #ccc; border-radius: 10px; }
  .content-box table.price-table thead { display: table-header-group; }
  .content-box table.price-table tbody { display: table-row-group; }
  .content-box table.price-table tr { display: table-row; margin: 0; border: 0; border-radius: 0; }
  .content-box table.price-table th, .content-box table.price-table td { display: table-cell; width: auto; border-bottom: 1px solid #ccc; }
  .content-box table.price-table th:not(:last-child), .content-box table.price-table td:not(:last-child) { border-right: 1px solid #ccc; }
  .content-box table.price-table tr:last-child td { border-bottom: 0; }
}
/* 受付停止のお知らせ：行間・余白を詰めた版（書籍・出版物のお申込み） */
.closed-notice.tight { padding: 10px 14px; }
.closed-notice.tight p { margin: 0; line-height: 1.7; }
.closed-notice.tight .closed-title { margin-bottom: 4px; font-size: 1.05em; line-height: 1.5; }
/* 書籍の仕様（○付きの箇条書き）：折り返しても行頭がそろうように */
.content-box ul.book-desc { flex: 1.6 1 0; margin: 0; padding: 0; list-style: none; align-self: center; white-space: nowrap; }
.content-box ul.book-desc li { position: relative; padding-left: 1.3em; line-height: 1.7; }
.content-box ul.book-desc li::before { content: "○"; position: absolute; left: 0; }
@media (max-width: 768px) {
  .content-box ul.book-desc { flex: 1 1 100%; margin-top: 4px; white-space: normal; }
}
/* トップ：申込受付を終えた回 */
.exam-next .apply-ended { margin-top: 6px; color: var(--red); }

/* 受験会場：旧サイトのグレー枠の注記 */
.place-note{background:#F1F1F1;padding:10px 14px;margin:8px 0 12px;max-width:490px;}
.place-note p{margin:0;}

/* 旧サイトで「※」画像を頭に付けていた箇条書き（ul-kome） */
.content-box ul.kome { list-style: none; padding-left: 0; }
.content-box ul.kome > li { position: relative; padding-left: 1.3em; }
.content-box ul.kome > li::before { content: "※"; position: absolute; left: 0; color: #888; }

/* 旧サイトのグレー枠（bgc-t＋枠線）の注記 */
.content-box .note-box { background: #f1f1f1; border: 1px solid #ccc; padding: 0 10px; margin: 0 -2px 0 0; } /* 旧サイトの padding:0 10px の灰色枠 */
.content-box .note-box p:last-child { margin-bottom: 0; }
/* 旧サイトのピンク枠（試験データの注記） */
.content-box .note-pink { background: #ffe6e6; border: 1px solid #ff3300; padding: 8px 12px; margin: 8px 0 12px; }
.content-box .note-pink p { margin: 0 0 4px; }
.content-box .note-pink p:last-child { margin-bottom: 0; }
/* 試験時間表の集合時間（旧サイト 24px） */
.content-box td.big-time { font-size: 24px; line-height: 1.2; }
/* 特別対応：番号付きの枠 */
.content-box .priority-list { border: 1px solid #ccc; padding: 10px 12px 4px 8px; margin: 0 0 6px; }
.content-box .priority-list ol { padding-left: 2em; margin: 0 0 6px; }
.content-box .priority-list li { margin-bottom: 0; font-size: 13px; }
.content-box .priority-list li::marker { font-weight: bold; }
/* 受験者数の集計表：旧サイトと同じく見出しは標準の太さ・数字は右寄せ */
.content-box table.sum-table th { font-weight: normal; }
.content-box table.sum-table td { text-align: right; }

/* リスニング音源（限定公開）：級×回の表。スマホでも表のまま、アイコンを縮める */
.content-box table.listening-table { table-layout: fixed; border-radius: 0; font-weight: bold; font-size: 13px; }
.content-box table.listening-table th { background: #f1f1f1; }
.content-box table.listening-table th:first-child { width: 16%; }
.content-box table.listening-table td { height: 90px; padding: 4px 2px; }
.content-box table.listening-table td img { width: 70px; height: auto; }
.content-box table.listening-table td img.pdf-icon { width: 54px; }
@media (max-width: 768px) {
  .content-box table.listening-table { display: table; border: 1px solid #ccc; border-radius: 0; overflow: hidden; }
  .content-box table.listening-table thead { display: table-header-group; }
  .content-box table.listening-table tbody { display: table-row-group; }
  .content-box table.listening-table tr { display: table-row; }
  .content-box table.listening-table th, .content-box table.listening-table td { display: table-cell; width: auto; height: auto; padding: 6px 1px; font-size: 11px; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; }
  .content-box table.listening-table th:last-child, .content-box table.listening-table td:last-child { border-right: 0; }
  .content-box table.listening-table th:first-child { width: 17%; }
  .content-box table.listening-table td img { width: 34px; }
  .content-box table.listening-table td img.pdf-icon { width: 26px; }
  .content-box table.listening-table tbody th { white-space: normal; overflow-wrap: anywhere; }
}

/* 二次試験概要：級ごとの見出し行。「二次試験の流れ」は途中で折り返さず右に寄せる */
.exam-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 1em; margin: 0 0 4px; }
.exam-line a, .exam-line b { white-space: nowrap; }
.exam-line b { font-weight: normal; display: inline-block; }

/* 旧サイトの本文寸法に合わせる（base.css の #sub_main・.ul-kome・cellpadding の値）。全ページ共通 */
.content-box { padding: 16px 14px 20px 14px; } /* 文字幅 490px（旧 #sub_main と同じ。12px×40字） */
.content-box table { margin: 4px 0 0; border-radius: 0; }
.content-box .table-scroll { margin-bottom: 0; }
.content-box th, .content-box td { padding: 2px 6px; }
.content-box table.plain { margin-bottom: 6px; }
.content-box table.plain td { padding: 2px 4px 2px 0; }
.content-box p { margin: 0; }
.content-box .table-scroll + p.right, .content-box table + p.right { margin: 2px 0 0; }
.content-box p.right + ul.kome { margin-top: 0; }
.content-box ul.kome > li { line-height: 22px; margin-bottom: 0; padding-bottom: 5px; }
.content-box h3 { margin-top: 20px; }

/* 旧サイトの spacer.gif（高さ 5〜20px）の置き換え */
.gap { height: 5px; }
.gap[data-h="10"] { height: 10px; }
.gap[data-h="15"] { height: 15px; }
.gap[data-h="20"] { height: 20px; }

/* FAQ：旧サイトは回答セルに padding-bottom:1em */
.content-box td.faq-a { padding-bottom: 12px; }

/* 旧サイト base.css の .entry-dv / .entry-dv2（申請手順などの段落ブロック） */
.content-box .entry-dv { margin-top: 10px; }
.content-box .entry-dv p, .content-box .entry-dv2 p { line-height: 16pt; }
.content-box .entry-dv2 { margin: 0 0 10px; padding: 5px 0 5px 10px; border: 1px solid #ccc; background: #efefef; }
.content-box p.pull-up { margin-top: -26px; }
.content-box .gap + h3, .content-box .gap + span:empty + h3 { margin-top: 0; }
.content-box ul.kome { margin-bottom: 0; } /* 旧 .ul-kome は ul の余白なし（li の下 5px のみ） */

/* 団体申込3ページのタブ（旧 tcp.css #tabmenuGr：488×35 の画像、各タブ 162px） */
.group-tabs { position: relative; max-width: 488px; margin: 0 0 10px; }
.group-tabs img { display: block; width: 100%; height: auto; }
.group-tabs a, .group-tabs span { position: absolute; top: 0; height: 100%; width: 33.2%; overflow: hidden; text-indent: -9999em; }
.group-tabs .t1 { left: 0; }
.group-tabs .t2 { left: 33.4%; }
.group-tabs .t3 { left: 66.6%; }

/* 旧サイトの align="right" の画像（写真・ボタン） */
.content-box img.fr { float: right; }
.content-box h3 { clear: both; }
@media (max-width: 768px) { .content-box img.fr { float: none; display: block; margin: 0 auto 8px; } }

/* オンライン学習の動画：旧 base.css .youtubesm（セル幅の 77%・中央に再生ボタン・キャプション中央） */
.videos { gap: 0; padding: 0; margin: 4px 0 0; }
.video a { display: block; position: relative; border: 2px solid #fff; text-align: center; }
.video a:hover { opacity: .6; }
.video a::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; width: 40%; height: 40px; margin: -18px auto 0; background: url(/image/play_button.png) center / 40px 40px no-repeat; }
.video img { display: inline-block; width: 77%; }
.content-box .video-cap { margin: 0 0 4px; text-align: center; line-height: 26px; }

/* 旧サイトで td height="60" の表（リスニング原稿など） */
@media (min-width: 769px) { .content-box table.row60 tbody td { height: 64px; } }

/* 試験概要「中検の特徴」：旧サイトは各セルの最後に spacer 10px */
.content-box table.feature-table td { padding-bottom: 12px; }

/* 協会概要の沿革：旧サイトは上揃え・年の列 11%・本文左 10px */
.content-box table.history td { vertical-align: top; }
.content-box table.history td:first-child { width: 11%; }
.content-box table.history td + td { padding-left: 10px; }

/* 団体申込3ページは旧サイトの本文幅が 492px（幅 490 の表と枠に押し広げられていた） */
.content-box.w492 { padding-right: 12px; }

/* 受験申込ページだけの調整 */
.old-metrics > p:first-child { margin-bottom: 10px; }
.old-metrics table.plain td:first-child { width: 4%; white-space: nowrap; }
.old-metrics table.plain td.item-name { width: 14%; }
.old-metrics td.big-time { line-height: 30px; }
.old-metrics h3 + table.plain .fsb13 { padding-top: 8px; }
.old-metrics .entry-label { font-size: 12px; }
.old-metrics .btn-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; margin: 0; }
.old-metrics .btn-line img { display: block; margin-right: 8px; }
