/* ===== フォント(見出しは丸みのある太字) ===== */
@import url("https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500;700;800&display=swap");

/* ===== 基本設定 ===== */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1d2433;
  --muted: #5b6478;
  --line: #e3e8f0;
  --brand: #0f9f8f;
  --brand-2: #5b5bf0;
  --brand-soft: #e6f6f3;
  --pop: #ff6b57;
  --sun: #ffc845;
  --accent: var(--brand);
  --accent-soft: var(--brand-soft);
  --warn: #b5651d;
  --warn-soft: #fdf1e4;
  --amazon: #f29d38;
  --rakuten: #bf0000;
  --grad: linear-gradient(120deg, #0fb5a0 0%, #3d8bfd 55%, #6d5df6 100%);
  --radius: 16px;
  --max: 820px;
  --shadow: 0 10px 30px rgba(29, 36, 51, 0.08);
  --round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.85;
  font-size: 16px;
}

a { color: var(--brand); }
img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2, h3, .logo, .section-title { font-family: var(--round); }

/* ===== ヘッダー・フッター ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.logo::before {
  content: "OT";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin-right: 8px;
}
.logo span { color: var(--brand); }
.nav { display: flex; gap: 18px; font-size: 0.9rem; font-weight: 600; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--brand); }

.site-footer {
  margin-top: 72px;
  padding: 36px 0;
  background: #1d2433;
  color: #aab3c5;
  font-size: 0.85rem;
}
.site-footer .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.site-footer a { color: #e4e9f2; }
.site-footer p { margin: 4px 0; }

/* ===== 広告表示(ステマ規制対応) ===== */
.pr-note {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
  margin: 20px 0 0;
  background: var(--surface);
}

/* ===== トップページのヒーロー ===== */
.hero-band {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
}
/* 水玉もよう */
.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero-band .wrap { position: relative; padding-top: 44px; padding-bottom: 52px; }

.countdown {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.88rem;
  font-weight: 600;
}
.countdown strong { font-family: var(--round); font-size: 1.05rem; }
.countdown .cd-num { font-size: 1.6rem; font-weight: 800; color: var(--sun); margin: 0 2px; font-variant-numeric: tabular-nums; }

.hero-band h1 {
  font-size: clamp(1.9rem, 6vw, 2.9rem);
  line-height: 1.3;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.hero-band h1 .hl {
  background: linear-gradient(transparent 72%, rgba(255, 200, 69, 0.85) 72%, rgba(255, 200, 69, 0.85) 92%, transparent 92%);
  padding: 0 4px;
}
.hero-band .lead { margin: 0 0 24px; font-size: 1.02rem; opacity: 0.95; max-width: 34em; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.btn-cta, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--round);
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-cta {
  background: var(--sun);
  color: #3a2a00;
  box-shadow: 0 8px 0 #d9a21f, 0 14px 24px rgba(0, 0, 0, 0.18);
}
.btn-cta:hover { transform: translateY(-2px); }
.btn-cta:active { transform: translateY(4px); box-shadow: 0 4px 0 #d9a21f; }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 460px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stats li {
  text-align: center;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
}
.stats b { display: block; font-family: var(--round); font-size: 1.6rem; line-height: 1.2; }

/* ===== セクション ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 48px 0 18px;
}
.section-title::before {
  content: "";
  width: 10px;
  height: 26px;
  border-radius: 6px;
  background: var(--grad);
}

/* 合格までのステップ */
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.step-no {
  display: inline-block;
  font-family: var(--round);
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  padding: 2px 12px;
}
.step h3 { margin: 10px 0 6px; font-size: 1.08rem; }
.step p { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.step a { font-weight: 700; text-decoration: none; }

/* 記事カード */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(29, 36, 51, 0.12); }
.card-icon {
  display: grid;
  place-items: center;
  height: 96px;
  font-size: 2.6rem;
  background: var(--brand-soft);
}
.card-icon.alt { background: #eeeefe; }
.card-body { padding: 16px 20px 20px; }
.card .tag, .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 10px;
  border-radius: 99px;
}
.card h3 { margin: 10px 0 6px; font-size: 1.05rem; line-height: 1.55; }
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* アプリへの案内(帯) */
.app-banner {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  margin: 28px 0 8px;
  box-shadow: 0 14px 30px rgba(61, 139, 253, 0.28);
  transition: transform 0.15s;
}
.app-banner:hover { transform: translateY(-2px); }
.app-banner::after {
  content: "→";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  font-weight: 800;
  opacity: 0.6;
}
.app-banner strong { display: block; font-family: var(--round); font-size: 1.2rem; margin: 8px 40px 4px 0; }
.app-banner span:last-child { display: block; font-size: 0.88rem; opacity: 0.92; margin-right: 40px; }
.app-banner .tag { color: #3a2a00; background: var(--sun); }

/* 運営者 */
.profile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.avatar {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-family: var(--round);
  font-weight: 800;
  color: #fff;
}
.profile p { margin: 0 0 8px; font-size: 0.92rem; }

/* ===== 記事ページ ===== */
.article { padding: 28px 0; }
.article h1 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); line-height: 1.45; margin: 12px 0 8px; font-weight: 800; }
.meta { color: var(--muted); font-size: 0.85rem; }
.article h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 52px 0 16px;
  padding: 12px 16px;
  color: #fff;
  background: var(--grad);
  border-radius: 12px;
}
.article h3 {
  font-size: 1.08rem;
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 5px solid var(--brand);
}
.article blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 4px solid var(--brand);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
}
.article blockquote p { margin: 0; }

.exam-result { padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 0.92rem; }
.rate-bars { display: grid; gap: 6px; margin: 8px 0 16px; }
.rate-row { display: grid; grid-template-columns: 4.5em 1fr 3.5em; align-items: center; gap: 8px; font-size: 0.88rem; }
.rate-bar { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.rate-bar span { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.rate-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 8px 0 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { background: var(--brand-soft); font-weight: 700; }
.data-table small { color: var(--muted); }
/* 「項目|内容」の2列の表は、折り返して左寄せ */
.data-table.info td { text-align: left; white-space: normal; }
.data-table.info td:first-child { width: 9em; font-weight: 700; color: var(--muted); }

.site-search { display: flex; gap: 8px; margin: 16px 0 24px; }
.site-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--line, #e1e6ef);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: inherit;
}
.site-search button {
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  box-shadow: var(--shadow);
}
.toc strong { display: block; margin-bottom: 4px; font-family: var(--round); }
.toc ol { margin: 0; padding-left: 1.4em; }

.point {
  background: #fffaf0;
  border: 2px solid var(--sun);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
}

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92rem; background: var(--surface); }
.table-scroll { overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--brand-soft); white-space: nowrap; }

/* ===== 書きかけ(自分の体験を入れる場所) ===== */
.todo {
  background: var(--warn-soft);
  border: 1px dashed var(--warn);
  color: var(--warn);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 0.92rem;
}
.todo::before { content: "✏️ 自分で書く："; font-weight: 700; }

/* ===== 商品紹介ボックス(アフィリエイト) ===== */
.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  box-shadow: var(--shadow);
}
.product .thumb {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 140px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  padding: 6px;
}
.product h4 { margin: 0 0 6px; font-size: 1rem; font-family: var(--round); }
.product .rating { color: #e0a100; font-size: 0.95rem; margin-bottom: 6px; }
.product ul { margin: 0 0 12px; padding-left: 1.2em; font-size: 0.9rem; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.amazon { background: var(--amazon); }
.btn.rakuten { background: var(--rakuten); }
.btn.main { background: var(--brand); }

@media (max-width: 520px) {
  .product { grid-template-columns: 1fr; }
  .product .thumb { min-height: 100px; }
  .nav { gap: 12px; }
}

/* ===== シェアボタン ===== */
.share { margin: 40px 0 0; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.share p { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); }
.btn.x { background: #111; }

.back { display: inline-block; margin-top: 24px; font-size: 0.9rem; font-weight: 700; }

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

/* 運営者アイコン(ねこだんごのイラスト) */
img.avatar {
  display: block;
  object-fit: contain;
  padding: 5px;
  background: #fff6f8;
  border: 2px solid #f7c6d2;
}
img.avatar { flex-basis: 84px; width: 84px; height: 84px; }
img.avatar { padding: 0; object-fit: cover; border-color: #e7dccb; background: #fff; }

/* ===== 過去問解説ページ(scripts/make-pages.mjs で作る) ===== */
.crumbs { font-size: 0.8rem; color: var(--muted); margin: 4px 0 8px; }
.crumbs a { color: var(--muted); }
.q-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.q-case { margin: 0 0 12px; padding: 10px 14px; border-left: 5px solid var(--brand); background: var(--brand-soft); border-radius: 0; }
.q-stem { font-weight: 700; margin: 0 0 12px; }
.q-img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; background: #fff; }
.q-note { color: var(--muted); font-size: 0.9rem; }
.q-choices { margin: 0 0 14px; padding-left: 1.6em; }
.q-choices li { margin: 4px 0; }
.q-try {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--sun);
  color: #3a2a00;
  font-family: var(--round);
  font-weight: 800;
  text-decoration: none;
}
.q-answer {
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 16px 0;
}
.q-answer summary { cursor: pointer; font-family: var(--round); font-weight: 800; color: var(--brand); font-size: 1.05rem; }
.q-answer[open] summary { margin-bottom: 8px; }
.q-answer h2 { all: unset; display: block; font-family: var(--round); font-weight: 800; margin: 14px 0 6px; }
.q-correct { font-size: 1.1rem; }
.q-notes { padding-left: 1.6em; }
.q-notes li { margin: 6px 0; }
.unreviewed { margin-left: 8px; font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border: 1px solid var(--muted); border-radius: 999px; color: var(--muted); vertical-align: middle; }
.q-nav { display: flex; justify-content: space-between; gap: 8px; margin: 20px 0; font-weight: 700; font-size: 0.9rem; }
.source { margin-top: 32px; font-size: 0.78rem; color: var(--muted); }
.q-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.q-list li { border-top: 1px solid var(--line); padding: 10px 14px; font-size: 0.92rem; }
.q-list li:first-child { border-top: none; }
.q-list a { text-decoration: none; color: var(--text); display: block; }
.q-list a:hover { color: var(--brand); }
.q-list .no { display: inline-block; min-width: 3.4em; font-weight: 800; color: var(--brand); }
.q-list .no-ex { color: var(--muted); }
.q-list .no-ex a { display: inline; color: var(--brand); font-size: 0.8rem; }
.exam-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.exam-list li a, .exam-list li.no-ex {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; text-decoration: none; color: var(--text);
}
.exam-list li a:hover { border-color: var(--brand); }
.exam-list span { font-size: 0.85rem; color: var(--muted); }
.exam-list li.no-ex { color: var(--muted); }
