/* 最小限のスタイル。デザインは後で整える前提。 */
:root {
  --fg: #1a1a1a; --muted: #666; --line: #d8d8d8;
  --accent: #14507a; --bg-soft: #f6f7f9;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--fg); background: #fff; line-height: 1.7;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--accent); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-size: 14px; }
.nav-link { color: var(--accent); text-decoration: none; font-size: 14px; }
.nav-link:hover { text-decoration: underline; }
.as-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 14px; }

main { padding: 24px 16px 48px; }
h1 { font-size: 24px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 32px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.lead { color: var(--muted); }
.muted { color: var(--muted); }
.note { font-size: 13px; margin-top: 24px; }

.flash { padding: 10px 14px; border-radius: 4px; margin: 0 0 16px; }
.flash.notice { background: #e8f2ea; border: 1px solid #bcd8c4; }
.flash.alert  { background: #fbeaea; border: 1px solid #e0b4b4; }

.table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.table thead th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.is-unavailable { color: var(--muted); }

.form { max-width: 360px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; margin-bottom: 4px; }
.field input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 16px; }

.button {
  display: inline-block; padding: 8px 16px; border: 0; border-radius: 4px;
  background: var(--accent); color: #fff; text-decoration: none; font-size: 14px; cursor: pointer;
}
.button:hover { opacity: .9; }
.button.small { padding: 4px 12px; font-size: 13px; }
.button.disabled { background: #bbb; cursor: not-allowed; }

.detail { display: grid; grid-template-columns: 10em 1fr; gap: 4px 12px; font-size: 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }

.site-footer { border-top: 1px solid var(--line); padding: 16px 0; color: var(--muted); }

@media (max-width: 600px) {
  .table { font-size: 13px; }
  .table th, .table td { padding: 6px; }
}

/* =========================================================================
   受験画面。旧サイトの www/css/base.css・tama.css・tabMaker.css を写したもの。
   値は現サイトの実測値。独自に足したり整えたりしない。

   旧サイトは画面ごとに読むCSSが違った（設問・結果=base.css、開始・完了=tama.css、
   テストセンター=base.css+tabMaker.css）。ここでは1枚にまとめるため、
   開始・完了画面だけに効く規則は body.exam-explain-body で囲っている。

   背景画像は旧サイトが ../image/（/css/ からの相対）で参照していた。
   ここでは Propshaft に解決させるためファイル名だけで書く（実体は
   app/assets/images/）。移行した設問HTMLが /image/... を直接指しているので、
   public/image/・public/images/ にも同じものを置いてある。
   ========================================================================= */

/* 受験画面だけ、旧サイトと同じ箱の数え方に戻す。
   アプリ全体は `* { box-sizing: border-box }` のままで、ここは
   受験画面（layouts/exam を使う画面）にしか効かない。

   旧サイトの base.css は box-sizing を指定しておらず、ブラウザ既定の
   content-box で描かれていた。border-box のままだと padding と border の分
   （10px×2 + 1px×2 = 22px）だけ箱が小さくなり、実測で全ての箱が
   幅・高さとも22px小さかった。 */
body.exam-body,
body.exam-body *,
body.exam-body *::before,
body.exam-body *::after { box-sizing: content-box; }

/* ---- base.css ---- */
body.exam-body {
  margin: 10px auto;
  width: 800px;
  line-height: 1.5;
  font-size: 12px;
}
body.exam-body .clear { clear: both; float: none; }
body.exam-body a.botton {
  height: 20px; width: 70px; background: #999999; display: block;
  font-size: 14px; text-align: center; float: left; margin: 0 0 0 5px;
  color: #000000; text-decoration: none;
}
body.exam-body table tr td.time,
body.exam-body table tr td.q { font-size: 10px; padding: 0; }
body.exam-body table tr td.caution { font-size: 10px; padding: 0; color: #CC3333; }
body.exam-body table tr td.q_title { padding: 5px 0; }

body.exam-body table tr td div.answerfield01 { padding: 5px 10px; color: #000099; }
body.exam-body table tr td div.answerfield02 {
  padding: 10px; color: #000099; background: #F1F0FE;
  border: 1px solid #000000; width: 200px;
}
body.exam-body table tr td p.txt01 {
  min-height: 335px; width: 740px; background: #F1F0FE;
  padding: 10px; margin: 0 0 0 10px; border: 1px solid #000000;
}
body.exam-body table tr td p.txt02 {
  min-height: 335px; width: 500px; background: #F1F0FE;
  padding: 10px; margin: 0 0 0 10px; border: 1px solid #000000;
}
body.exam-body table tr td p.question {
  height: 41px; background: url("/assets/back_question-5e0d29dd.gif") no-repeat;
  padding: 5px 10px; margin: 10px 0 10px 10px;
}
body.exam-body table tr td p.txt04 {
  min-height: 250px; width: 740px; background: #F1F0FE;
  padding: 10px; margin: 0 0 0 10px; border: 1px solid #000000;
}
body.exam-body table tr td p.question04 {
  height: 54px; background: url("/assets/back_question04-f26292f3.gif") no-repeat;
  padding: 5px 10px; margin: 10px 0 10px 10px;
}
/* fix04 の小問（旧 fix04_select_area.tpl の style 属性をそのまま写す） */
body.exam-body p.question2 {
  height: 41px; background: url("/assets/back_question2-85a011a5.gif") no-repeat;
  padding: 5px 10px; margin: 10px 0 10px 10px;
}

/* 非定型 */
body.exam-body table.free { border: 1px solid #000000; }
body.exam-body table tr td.resttime {
  background: #666666; padding: 2px 30px; color: #FFFFFF; height: 20px;
}
body.exam-body table tr td.resttime span { margin: 0 0 0 20px; }
body.exam-body table tr td div.txtArea {
  width: 530px; background: #CCCCCC; padding: 10px; margin: 0;
}
body.exam-body table tr td div.txtArea p {
  width: 520px; background: #FFFFFF; padding: 0 5px; margin: 0;
  font-size: 14px; line-height: 1.5;
}
body.exam-body table tr td div.txtArea p.sakuin {
  color: #666666; font-size: 10px; text-align: right;
}
body.exam-body table tr td div.selectArea { padding: 10px 20px; clear: both; }
body.exam-body table tr td div.selectArea p { margin: 0; }
body.exam-body table tr td div.selectArea div.freeQuestion {
  width: 520px; float: left; padding: 20px 0 0 0;
}
body.exam-body table tr td div.selectArea div.freeQuestion p {
  font-size: 14px; padding: 0 5px;
}
body.exam-body table tr td div.selectArea div.freeQuestion p.questionNo {
  background: #666666; color: #FFFFFF; margin: 0 5px 0 0; padding: 0 5px; float: left;
}
body.exam-body table tr td div.selectArea div.freeQuestion p.txtQuestion {
  float: left; margin: 0 0 20px 0; width: 480px;
}
body.exam-body table tr td div.selectArea div.freeQuestion p.select {
  clear: both; padding: 5px; border: 2px solid #A0D4A6; margin: 0 0 0 30px;
}
body.exam-body table tr td div.selectArea div.freeAnswer { width: 210px; float: right; }
body.exam-body table tr td div.selectArea div.freeAnswer p.field { font-size: 10px; }
body.exam-body table tr td div.selectArea div.freeAnswer p.field span { font-size: 14px; }
body.exam-body table tr td div.selectArea div.freeAnswer div.inputField {
  background: #A0D4A6; padding: 5px 5px 10px 0; font-size: 14px; margin: 0 0 20px 0;
}
body.exam-body table tr td div.selectArea div.freeAnswer div.inputField span {
  background: #666666; color: #FFFFFF; margin: 0 5px 0 0; padding: 5px;
}
body.exam-body table tr td div.selectArea div.freeAnswer img.next { margin: 0 0 0 40px; }

body.exam-body table tr td.tab {
  background: url("/assets/back_no-91df1ace.jpg") repeat-x; padding: 0;
  text-align: center; height: 41px;
}
body.exam-body table tr td.tab ul { list-style-type: none; margin: 0; padding: 0 0 0 3px; }
body.exam-body table tr td.tab ul li {
  height: 36px; width: 34px; float: left;
  background: url("/assets/before-e6c309cf.jpg") no-repeat;
  margin: 0; text-align: center; padding: 5px 0 0 0;
}
body.exam-body table tr td.tab ul li a,
body.exam-body table tr td.tab ul li span {
  height: 36px; width: 34px; display: block; margin: 0;
  color: #000000; text-decoration: none;
}
body.exam-body table tr td.tab ul li.on { background: url("/assets/on-a83138da.jpg") no-repeat; }
body.exam-body table tr td.tab ul li.after { background: url("/assets/after-a0c4741a.jpg") no-repeat; }

/* 非定型の詳細 */
body.exam-body table tr td p span.backgreen {
  background: url("/assets/space-41e29c24.jpg") no-repeat center; width: 50px;
  text-align: center; display: block; margin: 0 5px 0 0; color: #FFFFFF; float: left;
}
body.exam-body table.selectAnswer { width: 170px; float: right; margin: -23px 0 0 0; }
body.exam-body table.selectAnswer tr td.selectNo {
  background: #4F8D5E; text-align: center; color: #FFFFFF; width: 30px;
}

/* 結果 */
body.exam-body table.result { border: 1px #1C79C6 solid; width: 500px; }
body.exam-body table.result td {
  padding: 5px; border: 1px #1C79C6 solid; text-align: center;
}
body.exam-body table.result th {
  padding: 5px 20px; background: #E3F0FB; border: 1px #1C79C6 solid;
}
/* 旧 result.tpl / finish.tpl の個別 style */
body.exam-result-body, body.exam-finish-body { font-size: 14px; }
body.exam-body table.finish { border: 1px #000000 solid; width: 500px; }
body.exam-body table.finish td { text-align: center; }

/* 進捗バー・タイマーバー（旧 execute.tpl の個別 style） */
#timerLabel01, #qLabel01 { background-color: #000099; width: 0%; }
#timerLabel02, #qLabel02 { background-color: #ccccff; width: 100%; }

/* ---- tabMaker.css（テストセンター型だけが読み込んでいた） ---- */
body.exam-body div.tstctrq { padding: 10px 0 10px 10px; float: left; width: 380px; }
body.exam-body div.tstctra {
  border: 1px solid #000000; width: 350px; padding: 10px; float: right; margin: 0 10px 0 0;
}
body.exam-body div.tstctrb { width: 350px; float: right; margin: 0 10px 0 0; }
body.exam-body div.tstctrb2 { width: 300px; float: right; margin: 0 20px 0 0; }
body.exam-body p.tstctrc { border: 1px solid #000000; padding: 3px 10px; }
body.exam-body table.selectAnswer02 { margin: 0 5px; }
body.exam-body table.selectAnswer02 tr td.selectNo02 {
  background: #FFFFFF; text-align: center; color: #000000; width: 30px;
}
/* テストセンター型のタブ（旧 #tabIndex02） */
body.exam-body #centertab02 { background: url("/assets/back_no-91df1ace.jpg") repeat-x; margin: 0; }
body.exam-body #tabIndex02 { margin: 0; padding: 0; background: url("/assets/back_no-91df1ace.jpg") repeat-x; }
body.exam-body #tabIndex02 li {
  float: left; padding: 5px 0 0 0; margin: 0; list-style-type: none;
  cursor: pointer; display: block;
  background: url("/assets/before-e6c309cf.jpg") no-repeat; width: 34px; height: 36px; text-align: center;
}
body.exam-body #tabIndex02 li a {
  height: 36px; width: 34px; display: block; margin: 0;
  color: #000000; text-decoration: none;
}
body.exam-body #tabIndex02 .close { background: url("/assets/after-a0c4741a.jpg") no-repeat #DDDDDD; }
body.exam-body #tabIndex02 .open { background: url("/assets/on-a83138da.jpg") no-repeat #DDDDDD; }
body.exam-body #tabBoxIndex02 {
  background-color: #FFFFFF; border-top: #000000 solid 1px;
  border-left: #000000 solid 1px; border-right: #000000 solid 1px;
  padding: 5px; clear: both;
}

/* ---- tama.css（受験開始・完了画面） ---- */
body.exam-explain-body { padding: 0; margin: 0; width: 750px; height: 600px; }
body.exam-explain-body #q_title { margin-top: 10px; margin-left: 10px; font-size: 13px; }
body.exam-explain-body #question {
  margin-left: 15px; margin-right: 5px; padding: 5px 5px 15px 5px;
  background: #F4F4FF; width: 700px; height: 350px;
}
body.exam-explain-body #question2 {
  margin-left: 15px; margin-right: 5px; padding: 5px 5px 15px 5px;
  background: #ffffff; width: 700px; height: 350px;
}
body.exam-explain-body .indent { text-indent: 10px; }
body.exam-explain-body #contents {
  font-size: 13px; margin-left: 5px; margin-right: 5px;
  padding: 5px 5px 15px 5px; width: 650px; line-height: 1.3;
}
body.exam-explain-body .finalred { color: #FF0000; font-size: 12px; clear: left; }
body.exam-explain-body #footer {
  text-align: center; font-size: 12px; padding: 15px 100px 15px 100px;
}

/* ---- 法定表示ページ（特定商取引法・プライバシーポリシー） ---- */
.legal { max-width: 46rem; margin: 0 auto 3rem; line-height: 1.9; }
.legal h1 { font-size: 1.4rem; border-bottom: 2px solid #333; padding-bottom: .4rem; margin-bottom: 1.4rem; }
.legal h2 { font-size: 1.05rem; margin: 1.8rem 0 .5rem; padding-left: .5rem; border-left: 4px solid #666; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: .4rem 0 0 1.2rem; }

.legal-list { margin: 0; }
.legal-list dt { font-weight: bold; margin-top: 1.1rem; color: #333; }
.legal-list dd { margin: .2rem 0 0 1rem; }

/* 画面が狭くなければ項目名と内容を横並びにする */
@media (min-width: 40rem) {
  .legal-list { display: grid; grid-template-columns: 12rem 1fr; column-gap: 1.5rem; }
  .legal-list dt { margin-top: 0; padding: .7rem 0; border-top: 1px solid #e5e5e5; }
  .legal-list dd { margin: 0; padding: .7rem 0; border-top: 1px solid #e5e5e5; }
}

.footer-links { margin-bottom: .4rem; }
.footer-links a { color: inherit; margin-right: 1rem; font-size: .85rem; }

/* ---- 解説（閲覧・管理） ---- */
.explanation { max-width: 52rem; line-height: 1.9; }
.explanation h2 { font-size: 1.25rem; margin: 0 0 1.2rem; padding-bottom: .4rem; border-bottom: 2px solid #333; }
.explanation h3 { font-size: 1.05rem; margin: 2rem 0 .6rem; padding: .3rem .6rem; background: #eef1f5; }
.explanation p { margin: 0 0 .8rem; }
.explanation p.bullet { margin-left: 1rem; }
.explanation p.choices { margin-left: 1rem; font-weight: bold; }
.explanation figure { margin: 1rem 0; }
.explanation img { max-width: 100%; height: auto; border: 1px solid #ddd; }
.explanation table { border-collapse: collapse; margin: .8rem 0; font-size: .9rem; }
.explanation td { border: 1px solid #bbb; padding: .25rem .6rem; }
.explanation-title small { font-weight: normal; color: #666; font-size: .8em; }
.explanation .note, p.note { color: #888; font-size: .85rem; margin-top: 2rem; }

/* 機械変換のまま残っている箇所を管理画面で目立たせる */
.explanation-preview [data-review] { outline: 2px dashed #e08a00; outline-offset: 2px; }
.explanation-preview { max-width: 52rem; line-height: 1.9; }
.explanation-preview h3 { font-size: 1.05rem; margin: 2rem 0 .6rem; padding: .3rem .6rem; background: #eef1f5; }
.explanation-preview table { border-collapse: collapse; margin: .8rem 0; font-size: .9rem; }
.explanation-preview td { border: 1px solid #bbb; padding: .25rem .6rem; }
.explanation-preview img { max-width: 100%; height: auto; border: 1px solid #ddd; }

.explanation-editor { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 60rem) { .explanation-editor { grid-template-columns: 1fr 18rem; } }
.explanation-editor textarea.code {
  width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.6;
}
.explanation-editor .hint { font-size: .85rem; color: #555; }
.figure-list { list-style: none; padding: 0; margin: 0; }
.figure-list li { margin-bottom: .8rem; }
.figure-list img { max-width: 100%; border: 1px solid #ddd; display: block; }
.figure-list code { font-size: .72rem; color: #666; word-break: break-all; }

.tag { display: inline-block; padding: .1rem .5rem; border-radius: 3px; font-size: .78rem; }
.tag.ok    { background: #d8efd8; color: #1c5c1c; }
.tag.draft { background: #eee;    color: #555; }
.tag.none  { background: #f6f6f6; color: #999; }
.tag.warn  { background: #ffe9c7; color: #8a5200; }
.small { font-size: .8rem; color: #666; }

.legal-list dd .sub { margin: 1rem 0 .3rem; color: #444; }
.legal-list dd ul { margin-bottom: .6rem; }
.legal-list dd small { color: #666; line-height: 1.7; display: inline-block; }

/* ---- マイページのタブ（旧 main2.css の #tabIndex / #tabBoxIndex を写す） ---- */
#tabContent { padding: 5px; margin: auto; }
#tabIndex { margin: 0 auto; padding: 0; background-color: #FFFFFF; }
#tabIndex li {
  background: #ffffff; float: left; margin-right: 10px; padding: .5em;
  list-style-type: none; cursor: pointer; display: block; font-size: smaller;
  border-top: #deedf4 1px solid; border-left: #deedf4 1px solid; border-right: #deedf4 1px solid;
}
#tabIndex li a { text-decoration: none; color: #0000FF; }
#tabIndex .close { background-color: #deedf4; text-decoration: none; }
#tabIndex .close a { color: #0000FF; }
#tabIndex .open { background-color: #ffffff; text-decoration: none; }
#tabIndex .open a { color: inherit; }
#tabBoxIndex { background-color: #ffffff; border: #deedf4 solid 1px; padding: 1em; clear: both; }

/* 旧サイトの注意文（span.red2 相当） */
.notice-red { color: #FF0000; font-size: .85rem; margin: .4rem 0; }

/* テストセンターの回答時間メーター（旧 execute3.tpl の個別style）。
   位置マークは3つとも float:left で横に並び、padding-left で位置を決める。
   1問60秒以下（10目盛）と超える場合（20目盛）で位置が違う。 */
body.exam-body #timerImgBar { text-align: left; }
body.exam-body #timerImgBar img { padding-left: 3px; }
/* 旧CSSは padding-top:10px も書いているが、現サイトを実際に測ると
   マークの高さは18px（＝line-height のみ）で padding-top は効いていない。
   入れるとマークの帯が10px高くなり、その下の目盛が回り込んで右へずれる。
   実測に合わせて padding-top は入れない。 */
body.exam-body #timerMark11 { padding-left: 255px; float: left; }
body.exam-body #timerMark12 { padding-left: 68px;  float: left; }
body.exam-body #timerMark13 { padding-left: 68px;  float: left; clear: right; }
body.exam-body #timerMark21 { padding-left: 270px; float: left; }
body.exam-body #timerMark22 { padding-left: 73px;  float: left; }
body.exam-body #timerMark23 { padding-left: 98px;  float: left; clear: right; }

/* 回答数・時間のラベルを1行に保つ。
   旧サイトはこの列を width="11%" で置いており、実測78pxで「回答数 0/6問」が
   1行に収まっている。こちらは2ページ目で「前へ」ボタンが増えると列が
   71pxまで縮み、フォントの幅次第で「問」「分」だけが次の行に落ちる。
   旧サイトの見た目（1行）を保つため折り返しを止める。 */
body.exam-body table tr td.q,
body.exam-body table tr td.time { white-space: nowrap; }

/* 受験画面は content-box にしているが、table の width 属性は枠線を含む
   数え方（border-box 相当）で解釈される。旧サイトの table.free は
   width="790" で実測790pxなので、この表だけ例外にする。
   content-box のままだと枠線1px×2の分だけ792pxになる。 */
body.exam-body table.free { box-sizing: border-box; }

/* ① 回答数・時間の列を固定幅にする。
   旧サイトは width="11%" だが、1問目は「次へ」だけ・2問目以降は「前へ」も
   加わるためボタン列の幅が変わり、この列が83px→79pxと揺れてバーの開始位置が
   4pxずれていた。文言が折り返さない幅で固定し、どのページでも同じにする。 */
body.exam-body table tr td.q,
body.exam-body table tr td.time { width: 83px; }

/* ③ 1ページ複数小問の帯。背景画像 back_question2.gif は751px幅だが、
   親の幅の都合で帯は730pxにしかならず、画像の右端（角の罫線）が切れていた。
   帯の幅に合わせて引き伸ばし、右側も閉じるようにする。 */
body.exam-body p.question2 { background-size: 100% 100%; }

/* 会員詳細の購入操作 */
.purchase-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 8px 0 4px; padding: 8px 0; border-top: 1px dashed var(--line);
}
.purchase-actions label { font-size: 13px; color: #555; }
.purchase-actions form { display: inline; margin: 0; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.button.danger { background: #b3413d; }

/* 管理画面：設問本文（HTML）の編集 */
.code-area { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.code-block { background: #f5f5f5; border: 1px solid #ddd; padding: 12px; overflow-x: auto; white-space: pre-wrap;
              word-break: break-all; font-size: 13px; line-height: 1.5; }
.html-preview { border: 1px solid #ddd; padding: 12px; background: #fff; overflow-x: auto; }

.cart-button { display: inline; border: 0; background: none; padding: 0; cursor: pointer; }

/* アンケート */
.survey-question { margin: 24px 0; padding: 16px; border: 1px solid #ddd; background: #fafafa; }
.survey-question h2 { font-size: 16px; margin: 0 0 8px; }
.survey-question .choice { display: block; margin: 4px 0; }
.survey-texts li { margin: 4px 0; }
.table-scroll { overflow-x: auto; }
/* ==========================================================================
   公開ページ（案内・商品紹介）の見た目。
   受検画面（body.exam-body）と管理画面（layouts/manager）には効かせない。

   色は受検画面の残り時間リングで実際に使われている緑 #73bd73 を出発点に、
   彩度と明度を締めた深緑をアクセントに据えている。地の白と黒はどちらも
   わずかに緑へ振り、全体の一体感を出す。
   ========================================================================== */

:root {
  --ink:#101A1E; --ink-2:#1B292D; --paper:#F6F8F7; --field:#FFFFFF;
  --line:#DCE3E1; --line-strong:#C3CEC9; --muted:#5A6B6C;
  --accent:#0E7C55; --accent-deep:#0A5C40; --accent-soft:#DCEFE5; --signal:#C2410C;

  /* 利用者データの4区分。明地・暗地とも色覚特性を含めて検証済み */
  --cat-1:#0E7C55; --cat-2:#2E6FD9; --cat-3:#A8481F; --cat-4:#6F52B5;

  --shadow-sm: 0 1px 2px rgba(16,26,30,.06), 0 2px 8px rgba(16,26,30,.04);
  --shadow-md: 0 2px 4px rgba(16,26,30,.05), 0 12px 32px rgba(16,26,30,.08);

  --font-sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
               "Noto Sans JP", "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  --font-data: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;

  --wrap: 1180px; --pad: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:#E7EDEA; --ink-2:#CBD8D3; --paper:#0C1416; --field:#131F22;
    --line:#24363A; --line-strong:#33484D; --muted:#93A5A4;
    --accent:#3FB98A; --accent-deep:#6BD0A6; --accent-soft:#16302A; --signal:#F0805A;
    --cat-1:#2FA87A; --cat-2:#5A94E0; --cat-3:#D4703F; --cat-4:#8F76D0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 2px 4px rgba(0,0,0,.35), 0 14px 34px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --ink:#E7EDEA; --ink-2:#CBD8D3; --paper:#0C1416; --field:#131F22;
  --line:#24363A; --line-strong:#33484D; --muted:#93A5A4;
  --accent:#3FB98A; --accent-deep:#6BD0A6; --accent-soft:#16302A; --signal:#F0805A;
  --cat-1:#2FA87A; --cat-2:#5A94E0; --cat-3:#D4703F; --cat-4:#8F76D0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 2px 4px rgba(0,0,0,.35), 0 14px 34px rgba(0,0,0,.45);
}

/* 受検画面は独自の作りなので、この見た目を当てない */
body.site {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
body.site *, body.site *::before, body.site *::after { box-sizing: border-box; }

body.site h1, body.site h2, body.site h3, body.site h4 {
  text-wrap: balance; line-height: 1.45; margin: 0; letter-spacing: -.005em;
}
body.site p { margin: 0; }
body.site img { max-width: 100%; height: auto; }

.band { width: 100%; }
.band--ink { background: var(--ink); color: var(--paper); }
.band--soft { background: var(--accent-soft); }
.band--field { background: var(--field); }
.band--edge { border-block: 1px solid var(--line); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(48px, 6.5vw, 84px); }

.eyebrow {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 12px;
}
.band--ink .eyebrow { color: var(--accent-deep); }
.h2 { font-size: clamp(22px, 2.9vw, 31px); font-weight: 800; }
.h3 { font-size: 18px; font-weight: 700; }
.lede { color: var(--muted); margin-top: 12px; max-width: 64ch; }
.band--ink .lede { color: #A9BDBA; }
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- ヘッダー（全ページ共通） ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  /* 半透明にすると背後の内容が透けてムラになり、下の目次帯と地の色が
     違って見えるため、地は塗りきる */
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 62px; flex-wrap: wrap; }
.brand {
  font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none;
  white-space: nowrap; display: flex; align-items: center; gap: 9px;
}
.brand-mark {
  width: 22px; height: 22px; flex: none; border: 2.5px solid var(--accent);
  border-radius: 50%; border-top-color: transparent; transform: rotate(-45deg);
}
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600;
  padding-block: 6px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; flex-wrap: wrap; }
.header-who { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ページ内の目次（トップページだけが使う）。
   ヘッダーと地続きに見せたいので、境目の線は引かず背景も敷かない。 */
.page-toc { background: transparent; }
.page-toc .wrap { display: flex; gap: 18px; flex-wrap: wrap; padding-block: 2px 12px; }
.page-toc a { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.page-toc a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 6px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  font-family: inherit; transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); color: #fff; }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.band--ink .btn--ghost { border-color: #3A4E52; color: var(--paper); }
.band--ink .btn--ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); }
body.site a:focus-visible, body.site button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
.nav-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.nav-link:hover { text-decoration: underline; }

/* ---------- お知らせ・パンくず ---------- */
.notice-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-block: 13px; font-size: 14px; }
.notice-h {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--accent);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 3px;
}
.notice-date { color: var(--muted); font-size: 13px; }
.crumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding-block: 13px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- ページ見出し ---------- */
.page-head { padding-block: clamp(26px, 3.6vw, 42px) clamp(22px, 3vw, 34px); }
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.page-head .sub { margin-top: 10px; font-size: 17px; color: var(--muted); max-width: 62ch; }
.page-head .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tag { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- ヒーロー（トップ） ---------- */
.hero { padding-block: clamp(40px, 5.5vw, 70px); }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(23px, 2.6vw, 30px); font-weight: 800; letter-spacing: 0; }
.hero h1 .hl { color: var(--accent); }
.hero-lede { margin-top: 18px; font-size: 17px; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.hero-for { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- 数字の帯 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 28px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stat-n { font-size: clamp(27px, 3.8vw, 40px); font-weight: 800; letter-spacing: -.01em; }
.stat-n span { font-size: .5em; font-weight: 700; margin-inline-start: 3px; }
.stat-l { font-size: 13px; color: #A9BDBA; margin-top: 2px; }

/* ---------- カード ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-top: 32px; }
.cards--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cards--1 { grid-template-columns: 1fr; }
@media (max-width: 880px) { .cards, .cards--2 { grid-template-columns: 1fr; } }
.card {
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 11px;
}
.card-tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 3px;
}
.card p { color: var(--muted); font-size: 14.5px; }
.card-list { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.card-list li { font-size: 14px; padding-inline-start: 18px; position: relative; color: var(--ink); }
.card-list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.card-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.card-foot--row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.card a.more { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14px; }
.card a.more:hover { text-decoration: underline; }

/* ---------- 表 ---------- */
.table-scroll { overflow-x: auto; margin-top: 28px; }
table.tbl {
  width: 100%; border-collapse: collapse; background: var(--field);
  border: 1px solid var(--line); font-size: 15px; min-width: 620px;
}
table.tbl th, table.tbl td { padding: 15px 18px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl thead th { background: var(--ink); color: var(--paper); font-size: 13px; letter-spacing: .04em; font-weight: 700; border-bottom: 0; }
table.tbl thead th:not(:first-child).num { text-align: end; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr.is-featured { background: var(--accent-soft); }
table.tbl .rowh { font-weight: 700; white-space: nowrap; }
table.tbl .rowh small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
table.tbl .num { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; text-align: end; }
.table-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- 概要（テストの基本情報） ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
@media (max-width: 780px) { .facts { grid-template-columns: 1fr; } }
.fact { background: var(--field); padding: 20px 22px; display: grid; gap: 6px; align-content: start; }
.fact dt { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.fact dd { margin: 0; font-size: 15px; }
.fact dd .big { font-size: 20px; font-weight: 800; }
.fact .note { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.fact ul { margin: 0; padding-inline-start: 1.1em; }
.fact ul li { margin-block: 2px; }

/* ---------- 番号つきの説明 ---------- */
.points { display: grid; gap: 18px; margin-top: 30px; }
.point {
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 40px 1fr; gap: 18px; align-items: start;
}
@media (max-width: 640px) { .point { grid-template-columns: 1fr; gap: 10px; } }
.point-n {
  font-family: var(--font-data); font-size: 13px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
}
.point h3 { font-size: 17px; font-weight: 700; }
.point p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---------- 箇条書き ---------- */
.checks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 15.5px; }
.checks .ck { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; margin-top: 5px; }
.checks .ck::after {
  content: ""; width: 5px; height: 9px; border-inline-end: 2px solid var(--accent);
  border-block-end: 2px solid var(--accent); transform: rotate(45deg) translate(-1px,-1px);
}
.checks small { display: block; color: var(--muted); font-size: 13.5px; }

/* ---------- 傾向と対策 ---------- */
.advice { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-top: 26px; }
@media (max-width: 900px) { .advice { grid-template-columns: 1fr; } }
.advice-card { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 22px; box-shadow: var(--shadow-sm); }
.advice-card h3 { font-size: 16px; font-weight: 700; padding-bottom: 12px; border-bottom: 2px solid var(--accent); }
.advice-card ul { margin: 14px 0 0; padding-inline-start: 1.2em; display: grid; gap: 9px; }
.advice-card li { font-size: 14.5px; color: var(--muted); }

/* ---------- 手順 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; margin-top: 32px; }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 3px solid var(--accent); padding-top: 16px; }
.step-n { font-family: var(--font-data); font-size: 13px; font-weight: 700; color: var(--accent); }
.step h3 { margin-top: 6px; font-size: 16px; font-weight: 700; }
.step p { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---------- よくある質問 ---------- */
.faq { margin-top: 30px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 40px 18px 0; font-weight: 700; font-size: 15.5px; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; inset-inline-end: 8px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-inline-end: 2px solid var(--accent); border-block-end: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq p { padding: 0 0 20px; color: var(--muted); font-size: 14.5px; max-width: 74ch; }

/* ---------- 関連リンク ---------- */
.related { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 26px; }
@media (max-width: 780px) { .related { grid-template-columns: 1fr; } }
.related a {
  display: block; background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm);
}
.related a:hover { border-color: var(--accent); }
.related .k { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.related .t { font-size: 16px; font-weight: 700; margin-top: 4px; }
.related .d { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ---------- 2カラム ---------- */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(28px,4vw,52px); align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.split--promo { grid-template-columns: minmax(0,1fr) auto; }
@media (max-width: 820px) { .split--promo { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.chip { border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 14px; font-size: 13.5px; background: var(--field); }
.chip b { display: block; font-size: 14.5px; }
.chip span { color: var(--muted); }

/* ---------- 利用者データ ---------- */
.who-grid { display: grid; grid-template-columns: minmax(260px,360px) minmax(0,400px); gap: clamp(32px,4vw,56px); align-items: center; margin-top: 32px; justify-content: start; }
@media (max-width: 860px) { .who-grid { grid-template-columns: 1fr; } }
.donut-wrap { position: relative; display: grid; place-items: center; }
.donut { width: 100%; max-width: 360px; height: auto; }
.donut-center { position: absolute; text-align: center; }
.donut-center .big { font-size: 34px; font-weight: 800; line-height: 1.1; }
.donut-center .cap { font-size: 12px; color: var(--muted); }
.legend { display: grid; gap: 12px; }
.legend-row { display: grid; grid-template-columns: 14px 1fr auto; align-items: start; gap: 11px; }
.legend-key { width: 14px; height: 14px; border-radius: 3px; margin-top: 6px; }
.legend-name { font-weight: 700; font-size: 15px; }
.legend-name small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.legend-val { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 19px; line-height: 1.35; }
.who-table { margin-top: 22px; width: 100%; border-collapse: collapse; font-size: 14px; }
.who-table caption { text-align: start; font-size: 13px; color: var(--muted); padding-bottom: 6px; }
.who-table th, .who-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.who-table td.n { font-family: var(--font-data); font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }

/* ---------- 受検画面の再現ブロック ----------
   ここだけ実際の受検画面の実測値を使う。サイト側のトークンとは混ぜない。 */
.screen {
  background: #fff; color: #1a1a1a; border: 1px solid #000; font-size: 13px; line-height: 1.6;
  overflow: hidden; box-shadow: var(--shadow-md);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  aspect-ratio: 900 / 750; display: flex; flex-direction: column;   /* 実物のポップアップと同じ比率 */
}
.screen .to-bottom { margin-top: auto; }
.scr-topbar { background: #666; color: #fff; display: flex; align-items: center; gap: 14px; padding: 3px 10px; font-size: 12px; }
.scr-ticks { display: flex; gap: 2px; }
.scr-ticks i { width: 15px; height: 8px; background: #fff; display: block; }
.scr-ticks i.spent { background: #f0a500; }
.scr-total { margin-inline-start: auto; }
.scr-lead { background: #ccc; padding: 6px 10px; font-size: 12.5px; }
.scr-cols { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 14px; padding: 12px 10px; }
.scr-items { display: grid; gap: 9px; }
.scr-item { display: flex; align-items: center; gap: 9px; }
.scr-num { background: #666; color: #fff; width: 17px; height: 17px; flex: none; display: grid; place-items: center; font-size: 11px; }
.scr-choicebox { border: 2px solid #A0D4A6; padding: 8px 12px; margin-top: 12px; font-size: 12px; }
.scr-answer { background: #A0D4A6; padding: 9px 10px; }
.scr-answer-h { font-size: 11px; margin-bottom: 6px; }
.scr-answer-row { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; font-size: 11.5px; }
.scr-radio { width: 11px; height: 11px; border: 1px solid #767676; border-radius: 50%; background: #fff; display: inline-block; flex: none; }
.scr-radio.on { border: 3px solid #0E7C55; }
.scr-next { background: linear-gradient(#f0872a,#d9691c); color: #fff; border: 1px solid #b4530f; padding: 4px 20px; font-size: 12px; border-radius: 2px; font-weight: 700; }
.scr-foot { display: flex; justify-content: flex-end; padding: 0 10px 12px; }
.scr-tabs { display: flex; gap: 3px; padding: 6px 10px 0; background: #e6e6e6; border-top: 1px solid #999; }
.scr-tab { padding: 3px 12px; font-size: 12px; background: #f0872a; color: #fff; border-radius: 3px 3px 0 0; }
.scr-tab.on { background: #fff; color: #1a1a1a; border: 1px solid #999; border-bottom-color: #fff; }
.scr-fix-h { padding: 8px 10px; font-size: 12.5px; }
.scr-fix-h b { color: #c0392b; font-weight: 700; }
.scr-fix-cols { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 10px; padding: 0 10px; align-items: start; }
.scr-fix-q { border: 1px solid #9aa0d0; background: #edeef8; padding: 10px; aspect-ratio: 535 / 352; }
.scr-fix-a { border: 1px solid #9aa0d0; background: #edeef8; padding: 10px; }
.scr-fix-a div { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 12px; }
.scr-fix-a b { color: #1e3a8a; font-weight: 400; }
.scr-meter { padding: 10px 10px 4px; display: grid; gap: 4px; font-size: 11px; }
.scr-meter-row { display: grid; grid-template-columns: 56px 42px 1fr; align-items: center; gap: 6px; }
.scr-bar { height: 9px; background: #b9bce8; }
.scr-bar i { display: block; height: 100%; background: #5b60c4; }
.scr-warn { color: #c0392b; font-size: 11px; padding: 2px 10px 10px; }
.scr-fix-next { border: 1px solid #999; background: linear-gradient(#fff,#e4e4e4); padding: 3px 14px; font-size: 12px; border-radius: 2px; }
.scr-tc-top { background: #666; height: 16px; }
.scr-tc-head { display: flex; gap: 12px; padding: 8px 10px 0; }
.scr-tc-lead { background: #ccc; padding: 6px 10px; font-size: 12.5px; flex: 1; }
.scr-tc-gauge { width: 112px; flex: none; display: flex; align-items: flex-start; gap: 5px; }
.scr-tc-gauge svg { width: 52px; height: 52px; }
.scr-tc-gauge .lbl { font-size: 10px; line-height: 1.9; border-bottom: 1px solid #ccc; white-space: nowrap; }
.scr-tc-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 14px; padding: 14px 10px; }
.scr-tc-q { font-size: 12.5px; border-bottom: 1px solid #333; align-self: start; padding-bottom: 1px; }
.scr-tc-choices { border: 1px solid #333; padding: 9px 12px; }
.scr-tc-choices div { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 12px; }
.scr-tc-time { display: flex; align-items: center; gap: 6px; padding: 6px 10px 10px; font-size: 11px; }
.scr-tc-seg { display: flex; gap: 2px; }
.scr-tc-seg i { width: 30px; height: 9px; display: block; }
.screen-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); display: grid; gap: 7px; }
.screen-note b { color: var(--ink); font-weight: 700; }
.switch { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.switch button {
  font: inherit; font-size: 14px; font-weight: 700; padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--field); color: var(--ink-2); cursor: pointer;
}
.switch button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.switch button:not([aria-selected="true"]):hover { border-color: var(--accent); color: var(--accent); }
.screen-panel { margin-top: 22px; display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 28px; align-items: start; }
@media (max-width: 980px) { .screen-panel { grid-template-columns: 1fr; } }
.screen-panel[hidden] { display: none; }

/* ---------- 本文（規約など長文のページ） ---------- */
.prose { max-width: 76ch; }
.prose h2 { font-size: 20px; font-weight: 700; margin-top: 36px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 16px; font-weight: 700; margin-top: 24px; }
.prose p { margin-top: 12px; }
.prose ul, .prose ol { margin-top: 12px; padding-inline-start: 1.4em; display: grid; gap: 6px; }
.prose dl { margin-top: 16px; }
.prose dt { font-weight: 700; margin-top: 14px; }
.prose dd { margin: 4px 0 0; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.prose th, .prose td { padding: 12px 14px; border: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { background: var(--accent-soft); font-weight: 700; white-space: nowrap; }
.prose a { color: var(--accent); font-weight: 700; }

/* ---------- 一覧（サイトマップなど） ---------- */
.linklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.linklist a { color: var(--accent); font-weight: 700; text-decoration: none; }
.linklist a:hover { text-decoration: underline; }
.linkgrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; margin-top: 24px; }
@media (max-width: 780px) { .linkgrid { grid-template-columns: 1fr; } }

/* ---------- CTA・フッター ---------- */
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(21px, 2.8vw, 28px); font-weight: 800; }
.site-footer { background: var(--ink); color: #A9BDBA; padding-block: 46px 30px; }
.foot-grid { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(3, minmax(0,1fr)); gap: 32px; }
@media (max-width: 780px) { .foot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.site-footer .brand { color: var(--paper); }
.foot-h { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #6E8280; font-weight: 700; }
.foot-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.foot-list a { color: #A9BDBA; text-decoration: none; font-size: 14px; }
.foot-list a:hover { color: var(--accent-deep); }
.foot-base {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid #24363A;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #6E8280;
}
.foot-base a { color: #6E8280; text-decoration: none; }
.foot-base a:hover { color: var(--accent-deep); }

/* ---------- 通知 ---------- */
body.site .flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 15px; }
body.site .flash.notice { background: var(--accent-soft); color: var(--accent-deep); }
body.site .flash.alert { background: #FDEAE0; color: var(--signal); }
:root[data-theme="dark"] body.site .flash.alert,
body.site .flash.alert { }

@media (prefers-reduced-motion: reduce) { body.site * { animation: none !important; transition: none !important; } }

/* ---------- フォーム（会員登録・お問い合わせ・団体申込みなど） ---------- */
body.site .form { margin-top: 24px; max-width: 520px; }
body.site .form-wide { max-width: 640px; }
body.site .form h2 {
  font-size: 18px; font-weight: 700; margin-top: 32px; padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
body.site .form h2:first-child { margin-top: 0; }
body.site .field { display: grid; gap: 4px; margin-top: 12px; }
body.site .field > label,
body.site .form label:not(.choice):not(.inline) { font-weight: 700; font-size: 13px; }
body.site .field p, body.site .field .muted { font-size: 13px; color: var(--muted); }

body.site input[type="text"], body.site input[type="email"], body.site input[type="tel"],
body.site input[type="password"], body.site input[type="number"], body.site input[type="date"],
body.site input[type="datetime-local"], body.site input[type="search"],
body.site select, body.site textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--field);
  border: 1.5px solid var(--line-strong); border-radius: 6px; padding: 7px 10px;
  width: 100%; max-width: 100%;
}
body.site input[type="number"] { max-width: 10em; }
body.site select { max-width: 26em; }
body.site textarea { line-height: 1.8; }
body.site input:focus, body.site select:focus, body.site textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
body.site input[type="checkbox"], body.site input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
body.site label.choice, body.site .form label:has(input[type="checkbox"]), body.site .form label:has(input[type="radio"]) {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin-inline-end: 14px;
}
body.site .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
body.site input[type="submit"], body.site .form button:not(.as-button) {
  font: inherit; font-size: 14px; font-weight: 700; padding: 8px 20px; border-radius: 6px;
  border: 1.5px solid transparent; background: var(--accent); color: #fff; cursor: pointer;
}
body.site input[type="submit"]:hover, body.site .form button:not(.as-button):hover { background: var(--accent-deep); }
body.site .button.subtle, body.site a.button.subtle {
  background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong);
  display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
body.site .button.subtle:hover { border-color: var(--accent); color: var(--accent); }
body.site .form .table { margin-top: 16px; }
body.site .field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 12px; }
body.site .form .inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
body.site .form .inline select { width: auto; }
@media (max-width: 520px) { body.site .field-row { grid-template-columns: 1fr; } }
body.site .errors { list-style: none; margin: 0 0 20px; padding: 14px 18px; background: #FDEAE0; border-radius: 6px; }
body.site .errors li { color: var(--signal); font-size: 14.5px; }
body.site .note, body.site .lead { color: var(--muted); }
body.site .lead { font-size: 17px; margin-top: 10px; }
body.site .red3, body.site .notice-red { color: var(--signal); }

/* 器に入る通常ページ（マイページ・フォーム等）の見出し */
body.site main > .band > .wrap > h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 6px; }
body.site main > .band > .wrap > h2 { font-size: 20px; font-weight: 700; margin-top: 32px; }

/* 一般の表（マイページ・団体申込みなど） */
body.site table.table {
  width: 100%; border-collapse: collapse; background: var(--field);
  border: 1px solid var(--line); font-size: 15px; margin-top: 16px;
}
body.site table.table th, body.site table.table td {
  padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top;
}
body.site table.table thead th {
  background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; border-bottom: 0;
}
body.site table.table tbody tr:last-child td { border-bottom: 0; }
body.site table.table .num { font-family: var(--font-data); font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
body.site table.table.mgr-detail th { width: 12em; background: var(--accent-soft); font-weight: 700; }

/* ---------- コースの仕様（ラインナップ・コース比較） ---------- */
.spec { margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; margin-top: auto; }
.spec > div { display: grid; grid-template-columns: 6.5em 1fr; align-items: baseline; gap: 10px; }
.spec dt { font-size: 13px; color: var(--muted); }
.spec dd { margin: 0; font-weight: 700; font-size: 15px; }

/* ---------- 模試のラインナップ（シリーズのタブ・折りたたみ・商品カード） ---------- */
.lineup-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding-block: 4px 20px; }
.lineup-tab {
  font-size: 14px; font-weight: 700; padding: 8px 18px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--line-strong); background: var(--field); color: var(--ink-2);
}
.lineup-tab:hover { border-color: var(--accent); color: var(--accent); }
.lineup-tab[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.lineup-series { border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.lineup-series:last-child { border-bottom: 1px solid var(--line); }
.lineup-series > summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline;
}
.lineup-series > summary::-webkit-details-marker { display: none; }
.lineup-series > summary::after {
  content: ""; position: absolute; inset-inline-end: 8px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-inline-end: 2px solid var(--accent); border-block-end: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .18s ease;
}
.lineup-series[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.lineup-label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--accent);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 3px;
}
.lineup-title { font-size: 18px; font-weight: 800; }
.lineup-lead { grid-column: 2; font-size: 14px; color: var(--muted); }
.lineup-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; padding-bottom: 8px; }
@media (max-width: 760px) {
  .lineup-cards { grid-template-columns: 1fr; }
  .lineup-series > summary { grid-template-columns: 1fr; }
  .lineup-lead { grid-column: 1; }
}
.lineup-card {
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
}
.lineup-card h3 { font-size: 16px; font-weight: 700; }
.lineup-card .spec { margin-top: 0; }
.lineup-price { margin-top: auto; font-weight: 700; color: var(--ink); }
.lineup-price .data { font-size: 22px; font-weight: 800; }
.lineup-price small { font-size: 12px; font-weight: 400; color: var(--muted); margin-inline-start: 4px; }
.lineup-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lineup-actions form { margin: 0; }
.lineup-actions a.more { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14px; }
.lineup-actions a.more:hover { text-decoration: underline; }

/* ---------- 受検者結果レポート（団体の成績ページ） ---------- */
body.site .report-scroll { margin-top: 12px; }
body.site table.report-table { font-size: 14px; min-width: 640px; }
body.site table.report-table th, body.site table.report-table td { padding: 9px 12px; white-space: nowrap; }
body.site table.report-table thead tr + tr th { background: var(--ink-2); }
body.site table.report-table th.report-group { text-align: center; border-inline: 1px solid var(--line-strong); }
body.site table.report-table tfoot th, body.site table.report-table tfoot td {
  background: var(--accent-soft); border-top: 2px solid var(--accent); font-weight: 700;
}
body.site table.report-table td.muted { color: var(--muted); }

/* ---------- 団体申込み ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.site .flow-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; max-width: 760px; }
body.site .flow-steps li {
  font-size: 13px; color: var(--muted); padding: 8px 10px; border-top: 3px solid var(--line);
  display: flex; gap: 8px; align-items: baseline;
}
body.site .flow-steps li b { font-family: var(--font-data); color: var(--muted); }
body.site .flow-steps li.is-done { border-top-color: var(--accent-soft); }
body.site .flow-steps li.is-current { border-top-color: var(--accent); color: var(--ink); font-weight: 700; }
body.site .flow-steps li.is-current b { color: var(--accent); }
@media (max-width: 600px) { body.site .flow-steps { grid-template-columns: 1fr; } }
body.site table.order-head { font-size: 14px; }
body.site table.order-items { font-size: 14px; }
body.site table.order-items caption { caption-side: top; text-align: start; font-weight: 700; font-size: 14px; padding: 4px 0; color: var(--accent); }
body.site table.order-items td, body.site table.order-items th { padding: 8px 12px; vertical-align: middle; }
body.site table.order-items td small { display: block; font-size: 12px; }
body.site table.order-items input[type="number"] { width: 5.5em; display: inline-block; }
body.site table.order-lines tfoot th, body.site table.order-lines tfoot td { background: var(--accent-soft); font-weight: 700; }
body.site .template-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin-top: 8px; }
body.site .template-links a { color: var(--accent); font-weight: 700; }
body.site table.roster-table { font-size: 13.5px; }
body.site table.roster-table td, body.site table.roster-table th { padding: 7px 12px; }
body.site table.roster-table tr.is-error td { color: var(--signal); font-weight: 700; }
body.site table.roster-table tr.is-error td:first-child { box-shadow: inset 3px 0 0 var(--signal); }
body.site .roster-errors { margin: 6px 0 0; padding-inline-start: 1.2em; font-size: 14px; }
body.site .invoice-amount { font-size: 22px; font-family: var(--font-data); }
body.site .steps--compact { list-style: none; padding: 0; margin-top: 16px; }

.lineup-series .table-note { margin: 14px 0 22px; }
body.site .form a { color: var(--accent); font-weight: 700; }

/* ---------- デモ環境の帯（DEMO_MODE=1 のときだけ出る） ---------- */
.demo-banner {
  background: var(--accent-deep); color: #fff; text-align: center;
  font-size: 13px; font-weight: 700; padding: 6px 16px; line-height: 1.5;
}
