@charset "UTF-8";
/* rescueexam.com  共通スタイル（スマホファースト） */

:root{
  --navy:#16335c; --navy2:#2b558a; --red:#b3261b; --red2:#d1382b;
  --green:#1e5c38; --amber:#b26a00;
  --ink:#1f2328; --sub:#5a6472; --line:#dfe3e8; --line2:#eef1f4;
  --bg:#f5f7fa; --card:#ffffff;
  --ok-bg:#eaf4ec; --ok-line:#9dc7ac;
  --ng-bg:#fdecea; --ng-line:#e6a49c;
  --radius:12px;
  --maxw:960px;
  --shadow:0 1px 3px rgba(20,35,60,.08), 0 6px 18px rgba(20,35,60,.06);
  --font:"Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic","Meiryo",
        "Noto Sans JP",system-ui,-apple-system,"Segoe UI",sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; font-family:var(--font); color:var(--ink); background:var(--bg);
  font-size:16px; line-height:1.75; letter-spacing:.01em;
  overflow-wrap:break-word; word-break:normal; line-break:strict;
}
img{max-width:100%}
a{color:var(--navy2)}
a:hover{color:var(--red)}

/* ---------- レイアウト ---------- */
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 16px}
.site-header{
  background:var(--navy); color:#fff; position:sticky; top:0; z-index:50;
  box-shadow:0 2px 10px rgba(0,0,0,.15);
}
.site-header .wrap{display:flex; align-items:center; gap:12px; min-height:58px}
.brand{display:flex; align-items:center; gap:10px; color:#fff; text-decoration:none; font-weight:700}
.brand .mark{
  width:30px;height:30px;border-radius:7px;background:var(--red);
  display:grid;place-items:center;font-size:15px;flex:none;
}
.brand .name{font-size:17px; letter-spacing:.02em}
.brand .tld{font-weight:400; opacity:.75; font-size:12px; display:block; line-height:1.2}
.nav{
  margin-left:auto; display:flex; gap:4px; flex-wrap:nowrap;
  overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.nav::-webkit-scrollbar{display:none}
.nav a{
  color:#dbe4f0; text-decoration:none; font-size:13px; font-weight:600;
  padding:7px 10px; border-radius:8px; white-space:nowrap;
}
.nav a:hover,.nav a[aria-current="page"]{background:rgba(255,255,255,.14); color:#fff}

main{padding:20px 0 40px; min-height:60vh}

/* ---------- 見出し ---------- */
.page-title{font-size:22px; line-height:1.4; margin:6px 0 4px; color:var(--navy)}
.page-lead{color:var(--sub); font-size:14px; margin:0 0 18px}
h2.sec{
  font-size:17px; margin:28px 0 12px; padding-left:11px; color:var(--navy);
  border-left:5px solid var(--navy2); line-height:1.4;
}
h3.sub{font-size:15px; margin:20px 0 8px; color:var(--navy)}

/* ---------- カード ---------- */
.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; box-shadow:var(--shadow); margin-bottom:14px;
}
.card.tight{padding:13px}
.grid{display:grid; gap:12px}
@media(min-width:640px){ .grid.cols2{grid-template-columns:1fr 1fr} }
@media(min-width:760px){ .grid.cols3{grid-template-columns:repeat(3,1fr)} }

/* 分野カード */
.exam-card{
  display:flex; flex-direction:column; gap:8px; text-decoration:none; color:inherit;
  border-left:6px solid var(--navy2);
}
.exam-card:hover{border-color:var(--red); box-shadow:0 4px 20px rgba(20,35,60,.14)}
.exam-card .t{font-size:17px; font-weight:700; color:var(--navy); line-height:1.4}
.exam-card .d{font-size:13px; color:var(--sub); line-height:1.6; flex:1}
.exam-card .m{font-size:12px; color:var(--sub); display:flex; gap:10px; flex-wrap:wrap;
  border-top:1px dashed var(--line); padding-top:8px}
.exam-card .m b{color:var(--red); font-size:14px}
.exam-card .go{
  align-self:flex-start; background:var(--navy); color:#fff; font-size:13px; font-weight:700;
  padding:8px 16px; border-radius:999px;
}
.exam-card:hover .go{background:var(--red)}

/* ---------- ボタン ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  font-family:inherit; font-size:15px; font-weight:700; line-height:1.3;
  padding:13px 20px; min-height:48px; border-radius:10px; border:1px solid transparent;
  background:var(--navy); color:#fff; cursor:pointer; text-decoration:none;
  -webkit-tap-highlight-color:transparent;
}
.btn:hover{background:var(--navy2); color:#fff}
.btn:disabled{opacity:.45; cursor:not-allowed}
.btn.red{background:var(--red)} .btn.red:hover{background:var(--red2)}
.btn.ghost{background:#fff; color:var(--navy); border-color:var(--line)}
.btn.ghost:hover{background:var(--line2); color:var(--navy)}
.btn.sm{font-size:13px; padding:9px 14px; min-height:40px}
.btn.block{width:100%}
.btn-row{display:flex; gap:10px; flex-wrap:wrap}
.btn-row.end{justify-content:flex-end}

/* ---------- フォーム ---------- */
.field{margin-bottom:16px}
.field > .lbl{display:block; font-size:13px; font-weight:700; color:var(--navy); margin-bottom:7px}
.field .hint{font-size:12px; color:var(--sub); margin-top:6px; line-height:1.6}
.opts{display:flex; flex-wrap:wrap; gap:8px}
.opts label{position:relative; display:inline-flex; cursor:pointer}
.opts input{position:absolute; opacity:0; width:0; height:0}
.opts label > span{
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); background:#fff; color:var(--ink); border-radius:9px;
  padding:10px 16px; font-size:14px; font-weight:600; min-height:44px; white-space:nowrap;
}
.opts label:hover > span{border-color:var(--navy2)}
.opts input:checked + span{background:var(--navy); border-color:var(--navy); color:#fff}
.opts input:focus-visible + span{outline:3px solid #9db8de; outline-offset:2px}

/* ---------- タグ・バッジ ---------- */
.tag{
  display:inline-block; font-size:11px; font-weight:700; padding:3px 9px;
  border-radius:999px; background:var(--line2); color:var(--sub); white-space:nowrap;
}
.tag.navy{background:#e7edf6; color:var(--navy)}
.tag.ok{background:var(--ok-bg); color:var(--green)}
.tag.ng{background:var(--ng-bg); color:var(--red)}

/* ---------- 試験画面 ---------- */
.exam-bar{
  position:sticky; top:58px; z-index:40; background:#fff;
  border-bottom:1px solid var(--line); box-shadow:0 2px 8px rgba(20,35,60,.06);
}
.exam-bar .wrap{display:flex; align-items:center; gap:10px; padding-top:9px; padding-bottom:9px}
.exam-bar .qno{font-size:14px; font-weight:700; color:var(--navy); white-space:nowrap}
.exam-bar .qno b{font-size:19px; color:var(--red)}
.timer{
  margin-left:auto; font-variant-numeric:tabular-nums; font-size:19px; font-weight:700;
  color:var(--navy); background:var(--line2); border-radius:8px; padding:4px 12px; white-space:nowrap;
}
.timer.warn{background:#fdf1dc; color:var(--amber)}
.timer.danger{background:var(--ng-bg); color:var(--red); animation:blink 1s step-end infinite}
@keyframes blink{50%{opacity:.45}}
.progress{height:5px; background:var(--line2); border-radius:0}
.progress > i{display:block; height:100%; background:var(--navy2); width:0; transition:width .25s}

.q-scenario{
  background:#f2f6fb; border:1px solid #d8e3f0; border-radius:10px;
  padding:11px 13px; font-size:14px; color:#2b3a4d; line-height:1.7; margin-bottom:12px;
}
.q-text{font-size:17px; font-weight:700; line-height:1.75; margin:0 0 14px}

.choices{display:flex; flex-direction:column; gap:10px; margin:0; padding:0; list-style:none}
.choice{
  display:flex; gap:11px; align-items:flex-start; width:100%; text-align:left;
  background:#fff; border:1.5px solid var(--line); border-radius:11px;
  padding:13px 14px; font-family:inherit; font-size:15px; line-height:1.7; color:var(--ink);
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.choice:hover{border-color:var(--navy2); background:#f7faff}
.choice .k{
  flex:none; width:28px; height:28px; border-radius:50%; background:var(--line2);
  color:var(--navy); font-weight:700; font-size:14px; display:grid; place-items:center; margin-top:1px;
}
.choice.selected{border-color:var(--navy); background:#eef3fb}
.choice.selected .k{background:var(--navy); color:#fff}
.choice.correct{border-color:var(--ok-line); background:var(--ok-bg)}
.choice.correct .k{background:var(--green); color:#fff}
.choice.wrong{border-color:var(--ng-line); background:var(--ng-bg)}
.choice.wrong .k{background:var(--red); color:#fff}
.choice[disabled]{cursor:default}

.feedback{border-radius:11px; padding:13px 14px; margin-top:14px; font-size:14px; line-height:1.8}
.feedback.ok{background:var(--ok-bg); border:1px solid var(--ok-line)}
.feedback.ng{background:var(--ng-bg); border:1px solid var(--ng-line)}
.feedback .h{font-weight:700; font-size:15px; margin-bottom:5px}
.feedback.ok .h{color:var(--green)} .feedback.ng .h{color:var(--red)}

.exam-foot{
  position:sticky; bottom:0; background:#fff; border-top:1px solid var(--line);
  padding:10px 0 calc(10px + env(safe-area-inset-bottom)); margin-top:18px;
  box-shadow:0 -2px 10px rgba(20,35,60,.07);
}
.exam-foot .wrap{display:flex; gap:8px; align-items:center}
.exam-foot .btn{flex:1}
.exam-foot .btn.nav-side{flex:0 0 auto; min-width:64px}

/* 問題ナビ */
.qnav{display:grid; grid-template-columns:repeat(auto-fill,minmax(42px,1fr)); gap:7px}
.qnav button{
  aspect-ratio:1/1; min-height:42px; border:1px solid var(--line); background:#fff;
  border-radius:8px; font-family:inherit; font-size:13px; font-weight:700; color:var(--sub);
  cursor:pointer;
}
.qnav button.done{background:#e7edf6; color:var(--navy); border-color:#c3d2e6}
.qnav button.flag{border-color:var(--amber); color:var(--amber); box-shadow:inset 0 0 0 1px var(--amber)}
.qnav button.now{background:var(--navy); border-color:var(--navy); color:#fff}
.qnav button.ok{background:var(--ok-bg); border-color:var(--ok-line); color:var(--green)}
.qnav button.ng{background:var(--ng-bg); border-color:var(--ng-line); color:var(--red)}

/* ---------- 結果 ---------- */
.score{text-align:center; padding:22px 16px}
.score .big{font-size:52px; font-weight:800; line-height:1; color:var(--navy); font-variant-numeric:tabular-nums}
.score .big span{font-size:22px; font-weight:700; color:var(--sub)}
.score .pct{font-size:19px; font-weight:700; margin-top:6px}
.score .judge{
  display:inline-block; margin-top:12px; padding:7px 22px; border-radius:999px;
  font-weight:700; font-size:15px;
}
.judge.pass{background:var(--ok-bg); color:var(--green); border:1px solid var(--ok-line)}
.judge.fail{background:var(--ng-bg); color:var(--red); border:1px solid var(--ng-line)}
.stat-row{display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:16px}
@media(min-width:560px){.stat-row{grid-template-columns:repeat(4,1fr)}}
.stat{background:var(--line2); border-radius:10px; padding:11px 8px; text-align:center}
.stat .v{font-size:19px; font-weight:700; color:var(--navy); font-variant-numeric:tabular-nums}
.stat .l{font-size:11px; color:var(--sub); margin-top:2px}

.bar{display:flex; align-items:center; gap:9px; margin:7px 0; font-size:13px}
.bar .nm{flex:0 0 40%; max-width:200px; color:var(--sub); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.bar .tr{flex:1; height:9px; background:var(--line2); border-radius:999px; overflow:hidden}
.bar .tr > i{display:block; height:100%; background:var(--navy2); border-radius:999px}
.bar .tr > i.low{background:var(--red)}
.bar .vl{flex:0 0 54px; text-align:right; font-variant-numeric:tabular-nums; font-weight:700; color:var(--navy)}

.rev-item{border:1px solid var(--line); border-radius:11px; padding:13px; margin-bottom:11px; background:#fff}
.rev-item.ng{border-left:5px solid var(--red)}
.rev-item.ok{border-left:5px solid var(--green)}
.rev-item .meta{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:7px}
.rev-item .qq{font-weight:700; line-height:1.7; margin-bottom:9px}
.rev-item ol{margin:0 0 9px; padding-left:1.4em; font-size:14px; line-height:1.8}
.rev-item ol li.you{color:var(--red); font-weight:700}
.rev-item ol li.ans{color:var(--green); font-weight:700}
.rev-item .ex{font-size:13.5px; line-height:1.8; background:var(--line2); border-radius:8px; padding:10px 12px; color:#333}

/* ---------- テーブル ---------- */
.table-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch}
table.rec{width:100%; border-collapse:collapse; font-size:13.5px; min-width:540px}
table.rec th,table.rec td{border-bottom:1px solid var(--line); padding:9px 10px; text-align:left; white-space:nowrap}
table.rec th{background:var(--line2); color:var(--navy); font-size:12px}
table.rec td.num{text-align:right; font-variant-numeric:tabular-nums}

/* ---------- 注意事項 ---------- */
.notice{
  background:#fffaf0; border:1px solid #ecd9a8; border-left:5px solid var(--amber);
  border-radius:10px; padding:14px 16px;
}
.notice h3{margin:0 0 8px; font-size:15px; color:#8a5200}
.notice ol,.notice ul{margin:0; padding-left:1.3em; font-size:14px; line-height:1.85}
.notice li + li{margin-top:5px}
.terms h3.sub{border-bottom:1px solid var(--line); padding-bottom:5px}
.terms p,.terms li{font-size:14.5px; line-height:1.9}

/* ---------- フッター ---------- */
.site-footer{
  background:var(--navy); color:#cfd9e6; margin-top:36px;
  padding:26px 0 calc(26px + env(safe-area-inset-bottom)); font-size:13px; line-height:1.9;
}
.site-footer a{color:#ffd9d4}
.site-footer a:hover{color:#fff; text-decoration:underline}
.site-footer .org{color:#fff; font-size:15px; font-weight:700; letter-spacing:.02em}
.site-footer .links{margin-top:6px; display:flex; flex-direction:column; gap:2px}
.site-footer .fnav{margin:14px 0 10px; display:flex; gap:14px; flex-wrap:wrap}
.site-footer .fnav a{color:#cfd9e6; text-decoration:none; font-weight:600}
.site-footer .copy{border-top:1px solid rgba(255,255,255,.18); margin-top:14px; padding-top:12px;
  font-size:12px; color:#9fb0c6}

.small{font-size:12.5px; color:var(--sub); line-height:1.8}
.center{text-align:center}
.hidden{display:none !important}
.mt0{margin-top:0}.mb0{margin-bottom:0}

/* 画面の狭い端末：ヘッダーの高さが変わっても試験バーが重ならないようにする */
@media(max-width:479px){
  .brand .name{font-size:15px}
  .site-header .wrap{min-height:54px}
  .exam-bar{top:54px}
  .exam-bar .qno{font-size:13px}
  .timer{font-size:17px; padding:3px 9px}
  .wrap{padding:0 12px}
  .exam-foot .btn.nav-side{min-width:54px; padding:11px 8px; font-size:13px}
}
@media(min-width:700px){
  body{font-size:16.5px}
  .page-title{font-size:26px}
  .q-text{font-size:19px}
  .choice{font-size:16px}
}
@media print{
  .site-header,.site-footer,.exam-foot,.exam-bar,.btn{display:none !important}
  body{background:#fff}
}
