@charset "UTF-8";

/* =========================
   ページ全体（全てのページのフォント設定）
========================= */

body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Meiryo",
    "Hiragino Kaku Gothic ProN",
    sans-serif;
}

/* =========================
   ヘッダー全体
========================= */
.header {
  background-color: #f8fafc;
  padding: 10px 4%;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 50px;
  width: auto;
  display: block;
}

/* サイト名 */
.site-title {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-right: auto;
  margin-left: 6px;
  white-space: nowrap;
}

/* ログイン */
.login-link {
  font-size: 18px;
  color: #4f46e5;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.login-link:hover {
  opacity: 0.85;
}

/* =========================
   ハンバーガー
========================= */
.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.menu-icon span {
  display: block;
  height: 3px;
  width: 24px;
  background: #1f2937;
  margin: 3px auto;
  border-radius: 999px;
}

/* =========================
   ナビ共通
========================= */
.site-nav {
  margin-top: 10px;
}

.site-nav a {
  text-decoration: none;
}

/* =========================
   PCメニュー
========================= */
.main-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  list-style: none;
  margin: 0;
  padding: 0 8px 4px;
}

.main-nav-list li {
  margin: 0;
  padding: 0;
}

.main-nav-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  min-height: 46px;
  padding: 4px 6px;
  color: #1f2937;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav-list a:hover {
  background-color: #eef5ff;
  color: #274c77;
}

/* スマホ専用メニューはPCで隠す */
.mobile-only-menu {
  display: none;
}

/* =========================
   スマホメニュー
========================= */
@media screen and (max-width: 768px) {

  .header {
    padding: 10px 14px 14px;
    position: relative;
  }

  .header-inner {
    gap: 8px;
  }

  .logo img {
    height: 44px;
  }

  .site-title {
    font-size: 18px;
    margin-left: 4px;
  }

  .login-link {
    font-size: 14px;
  }

  /* ここを修正：
     fixedのまま、画面上部から少し下げる
     iPhoneのsafe-areaも考慮 */
  .menu-icon {
    display: flex;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 66px);
    right: 12px;
    z-index: 1002;
  }

  .main-nav-list {
    display: none;
  }

  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    z-index: 1001;
    overflow-y: auto;
    padding: 110px 16px 28px;
    margin-top: 0;
  }

  .menu-toggle:checked + .menu-icon + .site-nav {
    display: block;
  }

  .mobile-only-menu {
    display: block;
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 18px 28px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  }

  .mobile-menu-section {
    margin-bottom: 22px;
  }

  .mobile-menu-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #5b6b85;
    margin-bottom: 12px;
    padding-left: 4px;
  }

  .mobile-top-link {
    display: block;
    padding: 14px 8px;
    text-decoration: none;
    color: #1f2937;
    font-size: 1.15rem;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
  }

  .mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .mobile-menu-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    padding: 10px 8px;
    background: #f8fbff;
    border: 1px solid #d9e7f7;
    border-radius: 14px;
    text-decoration: none;
    color: #274c77;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  }

  .mobile-menu-grid a:hover {
    background: #eef5ff;
  }

  .mobile-sub-links {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e5e7eb;
  }

  .mobile-sub-links li {
    border-bottom: 1px solid #e5e7eb;
  }

  .mobile-sub-links a {
    display: block;
    padding: 14px 8px;
    text-decoration: none;
    color: #1f2937;
    font-size: 1.08rem;
    font-weight: 700;
  }
}

/* =========================
   フッター（新デザイン）
========================= */
.footer {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  margin-top: 60px;
  padding: 24px 10px 26px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.footer p {
  margin: 6px 0;
}

.footer a {
  color: #4f46e5;
  text-decoration: none;
  margin: 0 8px;
}

.footer a:hover {
  text-decoration: underline;
}