@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700;900&display=swap');

/* ─── 変数 ─────────────────────── */
:root {
  --yellow:       #FFD600;
  --yellow-light: #FFF9C4;
  --yellow-dark:  #E8B800;
  --coral:        #FF5555;
  --teal:         #00B4A6;
  --purple:       #8B5CF6;
  --navy:         #1A1A2E;
  --bg:           #FFFDF5;
  --white:        #FFFFFF;
  --text:         #2D2D2D;
  --muted:        #6B7280;
  --font: 'Zen Maru Gothic', 'Hiragino Maru Gothic Pro', 'BIZ UDPGothic', sans-serif;
}

/* ─── リセット ──────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ────────────────────── */
header {
  background: var(--yellow);
  position: relative;
}

.header-top {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 0.5rem;
}

/* ロゴ */
.header-logo a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
}

.header-logo-text {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
}

/* ページタイトル */
.header-title-area {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.header-page-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.header-page-sub {
  font-size: 0.65rem;
  color: rgba(26,26,46,0.5);
  letter-spacing: 0.06em;
  margin-top: 0.1rem;
}

/* ─── ハンバーガーボタン ─────────── */
#menubar_hdr {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 10px;
  transition: background 0.15s;
}

#menubar_hdr:hover { background: rgba(0,0,0,0.08); }

#menubar_hdr span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

#menubar_hdr.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menubar_hdr.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#menubar_hdr.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── ヘッダーウェーブ ───────────── */
.header-wave { display: block; width: 100%; line-height: 0; }
.header-wave svg { display: block; width: 100%; }

/* ─── PC NAV（非表示） ──────────── */
#menubar { display: none; }

/* ─── モバイルナビ ──────────────── */
#menubar-s {
  display: none;
  background: #FFFDF5;
  border-bottom: 2px solid var(--yellow);
}

#menubar-s.open { display: block; }

#menubar-s > ul {
  list-style: none;
  padding: 0.4rem 0;
}

#menubar-s > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.25rem;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.12s;
}

#menubar-s > ul > li > a span:first-child {
  font-size: 0.65rem;
  color: var(--yellow-dark);
  letter-spacing: 0.06em;
  min-width: 52px;
  text-transform: uppercase;
  font-weight: 700;
}

#menubar-s > ul > li > a:hover { background: var(--yellow-light); }

/* SNSアイコン行は非表示 */
#menubar-s ul.icon { display: none; }

/* ─── コンテナ ──────────────────── */
#container {
  max-width: 600px;
  margin: 0 auto;
}

#main {
  padding: 1.5rem 1.2rem 3rem;
}

/* ─── セクション見出し ──────────── */
.section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.9rem;
  margin-top: 0.25rem;
  padding-left: 0.7rem;
  border-left: 4px solid var(--yellow-dark);
  line-height: 1.4;
}

/* ─── 科目カードリスト ──────────── */
.subj-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.subj-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--white);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.subj-card:active { transform: scale(0.98); }

@media (hover: hover) {
  .subj-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.11);
  }
  .subj-card.kyotsu:hover  { border-color: var(--yellow-dark); }
  .subj-card.shakai:hover  { border-color: var(--teal); }
  .subj-card.seishin:hover { border-color: var(--purple); }
}

/* 科目番号バッジ */
.subj-num {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
  min-width: 42px;
  text-align: center;
  line-height: 1.4;
}

.subj-card.kyotsu  .subj-num { background: #FFF9C4; color: #9A7D00; }
.subj-card.shakai  .subj-num { background: #DFFAF7; color: #0A6B59; }
.subj-card.seishin .subj-num { background: #EDE9FE; color: #6D28D9; }

.subj-body { flex: 1; min-width: 0; }

.subj-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.subj-tag {
  font-size: 0.67rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.subj-arrow {
  font-size: 1.25rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ─── 国試チャレンジカード ─────── */
.kokushi-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--white);
  border: 2px solid #FECACA;
  border-radius: 18px;
  padding: 1rem 1rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 3px 12px rgba(239,68,68,0.09);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 2rem;
}

.kokushi-card:active { transform: scale(0.98); }

@media (hover: hover) {
  .kokushi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239,68,68,0.15);
    border-color: #FCA5A5;
  }
}

.kokushi-icon {
  width: 52px;
  height: 52px;
  background: #FEE2E2;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}

.kokushi-body { flex: 1; min-width: 0; }

.kokushi-label {
  font-size: 0.63rem;
  font-weight: 700;
  color: #DC2626;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kokushi-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-top: 0.15rem;
}

.kokushi-sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.kokushi-arrow {
  font-size: 1.25rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ─── ご利用上の注意ページ ────────── */
.about-block {
  background: var(--white);
  border-radius: 18px;
  padding: 1.2rem 1.2rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.about-block-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 0.55rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--yellow);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.about-list li {
  display: flex;
  gap: 0.55rem;
  font-size: 0.87rem;
  line-height: 1.65;
  color: var(--text);
}

.about-list li::before {
  content: '▶';
  color: var(--yellow-dark);
  flex-shrink: 0;
  font-size: 0.55rem;
  margin-top: 0.42rem;
}

/* ─── フッター ──────────────────── */
footer {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: 0.5rem;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ─── ページトップボタン ─────────── */
.nav-fix-pos-pagetop {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 100;
  list-style: none;
}

.nav-fix-pos-pagetop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
  transition: transform 0.15s;
}

.nav-fix-pos-pagetop a:hover { transform: translateY(-3px); }

/* ─── フェードインアニメーション ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

header { animation: fadeUp 0.4s ease both; }
#main  { animation: fadeUp 0.45s ease 0.08s both; }
