/* =============================================================
   CLOUDCERT_  —  cloud certification practice terminal
   dark / terminal-inspired / mono display + Plex Sans JP body
   ============================================================= */

:root {
  --bg: #070a12;
  --bg-2: #0b0f1b;
  --panel: #0f1422;
  --panel-2: #131a2c;
  --line: rgba(150, 165, 200, 0.14);
  --line-strong: rgba(150, 165, 200, 0.28);
  --text: #e8edf8;
  --muted: #8c96ad;
  --dim: #5b6478;

  --accent: #3fe0a4;          /* terminal green */
  --accent-dim: rgba(63, 224, 164, 0.14);
  --aws: #ff9a1f;
  --gcp: #5e9bff;
  --azure: #25c6f2;
  --red: #ff5d6c;
  --yellow: #ffd166;

  --font-mono: "JetBrains Mono", "Consolas", monospace;
  --font-body: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- 背景: グリッド + 上部グロー ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(63, 224, 164, 0.09), transparent 65%),
    radial-gradient(700px 420px at 8% 4%, rgba(94, 155, 255, 0.07), transparent 60%),
    linear-gradient(rgba(150, 165, 200, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 165, 200, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
}
/* 注: 走査線(スキャンライン)オーバーレイは、Windowsの拡大率(125%/150%)環境で
   モアレ・描画乱れの原因になるため撤去した。再追加しないこと。 */

::selection { background: var(--accent); color: #04130c; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.mono { font-family: var(--font-mono); }

/* =============== ヘッダー =============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7, 10, 18, 0.78);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .prompt { color: var(--accent); }
.brand .cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav {
  display: flex;
  gap: 26px;
  font-size: 0.86rem;
  color: var(--muted);
}
.nav a { transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.nav a::before { content: "/"; color: var(--dim); margin-right: 3px; font-family: var(--font-mono); }

/* =============== ヒーロー =============== */
.hero {
  padding: 84px 0 64px;
  position: relative;
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  border: 1px solid rgba(63, 224, 164, 0.35);
  background: var(--accent-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.kicker .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.hero h1 .em {
  color: var(--accent);
  position: relative;
}
.hero h1 .em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: var(--accent-dim);
  z-index: -1;
}
.hero .lede {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 32em;
  margin-bottom: 30px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #04130c;
  box-shadow: 0 0 0 rgba(63, 224, 164, 0);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(63, 224, 164, 0.35); transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---- ヒーロー右: ターミナル ---- */
.terminal {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(63, 224, 164, 0.05);
  overflow: hidden;
  transform: rotate(1.1deg);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.terminal-bar .tdot { width: 11px; height: 11px; border-radius: 50%; }
.tdot.r { background: #ff5f57; } .tdot.y { background: #febc2e; } .tdot.g { background: #28c840; }
.terminal-bar .title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
}
.terminal-body {
  padding: 20px 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 2.05;
  min-height: 248px;
}
.tline { white-space: pre-wrap; word-break: break-all; }
.tline .p { color: var(--accent); }
.tline .c-aws { color: var(--aws); }
.tline .c-gcp { color: var(--gcp); }
.tline .c-azure { color: var(--azure); }
.tline .ok { color: var(--accent); }
.tline .dim { color: var(--dim); }
.tcursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

/* =============== 統計ストリップ =============== */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stat {
  padding: 26px 10px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat .num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.85rem;
  color: var(--text);
}
.stat .num .unit { font-size: 0.95rem; color: var(--accent); margin-left: 3px; }
.stat .label { font-size: 0.76rem; color: var(--muted); letter-spacing: 0.1em; }

/* =============== セクション共通 =============== */
.section { padding: 88px 0; }
.section-head { margin-bottom: 42px; }
.section-head .index {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
}
.section-head p { color: var(--muted); margin-top: 8px; font-size: 0.95rem; }

/* =============== 試験カタログ =============== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.ftab {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  transition: all 0.2s;
}
.ftab:hover { color: var(--text); border-color: var(--text); }
.ftab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #04130c;
}
.ftab[data-filter="aws"].active { background: var(--aws); border-color: var(--aws); }
.ftab[data-filter="gcp"].active { background: var(--gcp); border-color: var(--gcp); }
.ftab[data-filter="azure"].active { background: var(--azure); border-color: var(--azure); }

.provider-block { margin-bottom: 46px; }
.provider-block:last-child { margin-bottom: 0; }
.provider-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
}
.provider-head h3 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.provider-head .count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dim);
}
.provider-tagline { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
.provider-block[data-provider="aws"] h3 { color: var(--aws); }
.provider-block[data-provider="gcp"] h3 { color: var(--gcp); }
.provider-block[data-provider="azure"] h3 { color: var(--azure); }

.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.exam-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.exam-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--pcolor, var(--accent));
}
.exam-card.available:hover {
  transform: translateY(-4px);
  border-color: var(--pcolor, var(--accent));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}
.exam-card .row1 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.exam-card .code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  color: var(--pcolor, var(--accent));
}
.exam-card .level {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  text-transform: uppercase;
}
.exam-card .status-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-badge.live {
  color: #04130c;
  background: var(--accent);
  font-weight: 700;
}
.status-badge.soon {
  color: var(--yellow);
  border: 1px dashed rgba(255, 209, 102, 0.5);
}
.exam-card h4 { font-size: 1.02rem; font-weight: 700; line-height: 1.45; }
.exam-card .title-en {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--dim);
  display: block;
  margin-top: 2px;
  font-weight: 400;
}
.exam-card .desc { font-size: 0.83rem; color: var(--muted); flex: 1; }
.exam-card .meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--dim);
}
.exam-card .meta b { color: var(--text); font-weight: 600; }
.exam-card .card-cta {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
  padding: 11px 0;
  font-size: 0.85rem;
}
.exam-card.coming {
  opacity: 0.62;
  border-style: dashed;
}
.exam-card.coming .card-cta {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--dim);
  cursor: not-allowed;
  box-shadow: none;
}
.exam-card.coming .card-cta:hover { transform: none; }

/* =============== 特徴 =============== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.feature {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature .ficon {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(63, 224, 164, 0.3);
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.feature h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature p { font-size: 0.86rem; color: var(--muted); }

/* =============== フッター =============== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  text-align: center;
  color: var(--dim);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}
.site-footer .prompt { color: var(--accent); }

/* =============== ロード時アニメーション =============== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.08s; } .d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.28s; } .d4 { animation-delay: 0.4s; }
.d5 { animation-delay: 0.55s; }

/* スクロール表示（フェイルセーフ設計）
   JSが正常に起動して <html> に .sr-armed を付けたときだけ非表示化が効く。
   JS無効・読み込み失敗・IntersectionObserver不発でもコンテンツは必ず見える。 */
html.sr-armed .sr {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
html.sr-armed .sr.in { opacity: 1; transform: none; }

/* ===========================================================
   演習プレイヤー (exam.html)
   =========================================================== */
.quiz-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.quiz-topbar .exit {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  transition: all 0.2s;
}
.quiz-topbar .exit:hover { color: var(--red); border-color: var(--red); }
.quiz-topbar .qcount {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.qcount b { color: var(--accent); font-size: 1.05rem; }

.progress-track {
  height: 5px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--line);
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #7ef0c6);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(63, 224, 164, 0.5);
}

/* ---- スタート画面 ---- */
.start-panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 38px 34px;
}
.start-panel .exam-code {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}
.start-panel h1 { font-size: 1.5rem; margin: 8px 0 4px; }
.start-panel .sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 28px; }
.opt-group { margin-bottom: 24px; }
.opt-group .opt-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--dim);
  display: block;
  margin-bottom: 10px;
}
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; }
.opt-btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  transition: all 0.18s;
}
.opt-btn:hover { color: var(--text); border-color: var(--text); }
.opt-btn.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.opt-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.opt-btn.disabled:hover { color: var(--muted); border-color: var(--line-strong); }
.opt-hint {
  font-size: 0.74rem;
  color: var(--dim);
  margin-top: 9px;
}

/* ---- 挑戦履歴 ---- */
.history-list {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.history-item:first-child { border-top: none; }
.history-item .h-date { color: var(--dim); font-size: 0.74rem; min-width: 78px; }
.history-item .h-tag {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.history-item .h-tag.wrong { color: var(--red); border-color: rgba(255, 93, 108, 0.45); }
.history-item .h-frac { margin-left: auto; color: var(--dim); font-size: 0.74rem; }
.history-item .h-score { font-weight: 800; min-width: 44px; text-align: right; }
.history-item .h-score.pass { color: var(--accent); }
.history-item .h-score.fail { color: var(--red); }

.text-btn {
  background: none;
  border: none;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.text-btn:hover { color: var(--red); }

.chip.wrong-chip { color: var(--red); border-color: rgba(255, 93, 108, 0.45); }

/* ---- 問題画面 ---- */
.q-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 30px 28px;
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.q-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.chip.domain { color: var(--accent); border-color: rgba(63, 224, 164, 0.4); }
.chip.multi { color: var(--yellow); border-color: rgba(255, 209, 102, 0.4); }
.q-text { font-size: 1.02rem; line-height: 1.9; margin-bottom: 24px; }

.choices { display: flex; flex-direction: column; gap: 11px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  width: 100%;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.7;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.choice:hover:not(:disabled) { border-color: var(--accent); background: rgba(63, 224, 164, 0.04); }
.choice .key {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--dim);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s;
}
.choice.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.choice.selected .key { background: var(--accent); color: #04130c; border-color: var(--accent); }
.choice.correct {
  border-color: var(--accent);
  background: rgba(63, 224, 164, 0.1);
}
.choice.correct .key { background: var(--accent); color: #04130c; border-color: var(--accent); }
.choice.wrong {
  border-color: var(--red);
  background: rgba(255, 93, 108, 0.08);
}
.choice.wrong .key { background: var(--red); color: #fff; border-color: var(--red); }
.choice:disabled { cursor: default; }

.explain-box {
  margin-top: 22px;
  border: 1px solid rgba(63, 224, 164, 0.35);
  background: rgba(63, 224, 164, 0.05);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.88rem;
  animation: rise 0.35s ease;
}
.explain-box.ng { border-color: rgba(255, 93, 108, 0.4); background: rgba(255, 93, 108, 0.05); }
.explain-box .verdict {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--accent);
}
.explain-box.ng .verdict { color: var(--red); }
.explain-box p { color: #c6cede; }

.q-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  justify-content: flex-end;
}

/* ---- 結果画面 ---- */
.result-panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 40px 34px;
  text-align: center;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.score-ring {
  --pct: 0;
  --ring: var(--accent);
  width: 168px;
  height: 168px;
  border-radius: 50%;
  margin: 14px auto 8px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, var(--panel) 82%, transparent 83% 100%),
    conic-gradient(var(--ring) calc(var(--pct) * 1%), var(--panel-2) 0);
  border: 1px solid var(--line);
}
.score-ring .inner { text-align: center; }
.score-ring .pct {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 2.3rem;
  line-height: 1.1;
}
.score-ring .frac { font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); }
.result-verdict {
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 1rem;
  margin-bottom: 6px;
}
.result-verdict.pass { color: var(--accent); }
.result-verdict.fail { color: var(--red); }
.result-note { color: var(--muted); font-size: 0.84rem; margin-bottom: 30px; }

.domain-breakdown { text-align: left; margin: 0 auto 30px; max-width: 560px; }
.domain-breakdown h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--dim);
  margin-bottom: 14px;
}
.dom-row { margin-bottom: 13px; }
.dom-row .dom-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 5px;
}
.dom-row .dom-label .pct { font-family: var(--font-mono); color: var(--muted); }
.dom-bar {
  height: 7px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.dom-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7ef0c6);
  border-radius: 999px;
  width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.dom-bar .fill.low { background: linear-gradient(90deg, var(--red), #ff8d98); }
.dom-bar .fill.mid { background: linear-gradient(90deg, var(--yellow), #ffe199); }

/* ---- 復習リスト ---- */
.review-list { text-align: left; margin-top: 34px; }
.review-list h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--dim);
  margin-bottom: 14px;
}
.review-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.review-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.015);
}
.review-item summary::-webkit-details-marker { display: none; }
.review-item .mark {
  font-family: var(--font-mono);
  font-weight: 800;
  flex-shrink: 0;
}
.review-item .mark.ok { color: var(--accent); }
.review-item .mark.ng { color: var(--red); }
.review-item .rq { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-item .review-body {
  padding: 16px 18px 20px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}
.review-body .rb-q { margin-bottom: 14px; line-height: 1.8; }
.review-body .rb-choice { padding: 6px 0 6px 10px; color: var(--muted); border-left: 2px solid transparent; }
.review-body .rb-choice.is-answer { color: var(--accent); border-left-color: var(--accent); }
.review-body .rb-choice.is-yours { color: var(--red); border-left-color: var(--red); }
.review-body .rb-choice.is-yours.is-answer { color: var(--accent); border-left-color: var(--accent); }
.review-body .rb-exp {
  margin-top: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: #c6cede;
}

.error-panel {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.error-panel .code { font-size: 3rem; font-weight: 800; color: var(--red); }

/* ===========================================================
   広告スロット（将来用 — docs/ADS.md 参照）
   - 中身が空のうちは :empty で完全非表示（レイアウトに影響しない）
   - タグを入れた瞬間からレールが表示される設計
   =========================================================== */
.ad-rail {
  display: none; /* 既定は非表示。広い画面＆中身ありのときだけ出す */
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;       /* 160x600 (wide skyscraper) 想定 */
  min-height: 600px;
  z-index: 5;
}
.ad-rail.left  { left: 12px; }
.ad-rail.right { right: 12px; }
@media (min-width: 1320px) {
  /* コンテンツ幅(max 1140) + 両側160pxレールが共存できる幅でのみ表示 */
  .ad-rail:not(:empty) { display: block; }
}
.ad-inline {
  max-width: 820px;       /* .quiz-shell と同幅 */
  margin: 0 auto;
  padding: 0 20px 40px;
}
.ad-inline:empty { display: none; padding: 0; }

/* 開始画面: 未完了セッションの再開バナー */
.resume-banner {
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 16px 18px;
  margin-bottom: 26px;
}
.resume-banner p { font-size: 0.9rem; margin-bottom: 12px; }
.resume-banner .opt-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* =============== レスポンシブ =============== */
@media (max-width: 880px) {
  .hero { padding: 56px 0 44px; }
  .hero .container { grid-template-columns: 1fr; gap: 34px; }
  .terminal { transform: none; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .nav { display: none; }
  .section { padding: 60px 0; }
}
@media (max-width: 540px) {
  .exam-grid { grid-template-columns: 1fr; }
  .q-card { padding: 22px 18px; }
  .start-panel, .result-panel { padding: 28px 20px; }
  .q-actions { flex-direction: column; }
  .q-actions .btn { width: 100%; justify-content: center; }
  .cta-row .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* LPカード内の試験ガイドリンク（静的生成されるハブページへの導線） */
.guide-link { display: block; margin-top: 8px; font-size: .78rem; opacity: .8; color: inherit; text-align: center; }

/* 演習プレイヤー: 解説下の関連サービスリンク */
.svc-links { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line, #1d2733); font-size: .85rem; }
.svc-links a { color: var(--accent, #34d399); }
