/**
 * ============================================================
 * style.css
 * ============================================================
 * OHF検索サイト メインスタイルシート
 *
 * 目次:
 *   1. グローバル / ベーススタイル
 *   2. ヘッダー
 *   3. ナビゲーション
 *   4. レイアウト / コンテナ
 *   5. ラジオボタンラベル
 *   6. 検索ボックス / 地図
 *   7. 検索ボタン / リセットボタン
 *   8. フッター
 *   9. サイドメニュー（ハンバーガー）
 *  10. SPA ページ切替
 *  11. ポリシーポップアップ（個人情報保護方針・利用規約）
 *  12. 検索フォーム セクション
 *  13. オプション グリッド（通常 / コンパクト / インライン）
 *  14. 検索行（2カラム並列）
 *  15. 用語解説（ツールチップ / ハイライト）
 *  16. チェックリスト
 *  17. キーワード検索
 *  18. スクロールトップボタン
 *  19. スクロール制御
 *  20. 検索結果ポップアップ
 *  21. プロフィールカード
 *  22. 詳細ポップアップ
 * ============================================================
 */

/* ============================================================
   1. グローバル / ベーススタイル
   ============================================================ */

html, body {
  overflow-x: hidden;
  width: 100%;
}

/* クリック操作要素のテキスト選択を無効化 */
.option-grid label,
.option-grid-compact label,
.option-inline label,
.specialty-panel-grid label,
.radio-label,
.top-nav li,
button,
.btn,
.btn-primary,
.btn-secondary,
summary {
  user-select: none;
  -webkit-user-select: none;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: 'Helvetica', 'Arial', sans-serif;
  background: linear-gradient(145deg, #EBF5FF 0%, #BFDBFE 40%, #93C5FD 75%, #60A5FA 100%);
  background-attachment: fixed;
  color: #333;
  position: relative;
}

/* 背景装飾バブル（メンテナンスページと同テイスト） */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 700px;
  height: 700px;
  background: rgba(59, 130, 246, 0.12);
  top: -280px;
  right: -220px;
}
body::after {
  width: 500px;
  height: 500px;
  background: rgba(37, 99, 235, 0.09);
  bottom: -180px;
  left: -160px;
}

/* ============================================================
   2. ヘッダー
   ============================================================ */

.site-header {
  margin: 0 -1.5rem;
  padding: 0;
  background: linear-gradient(135deg, #1565C0 0%, #1E88E5 50%, #42A5F5 100%);
  color: #fff;
}

/* ヘッダー上部（ロゴ＋ログイン） */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
}

/* ブランドロゴ＋タイトル */
.header-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-title-group {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.header-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-subtitle {
  font-size: 1.9rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 1px;
}

/* ヘッダー右側（カウンター＋ログイン） */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ログインアイコン */
.header-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s;
  text-decoration: none;
}

.header-login:hover {
  background: rgba(255, 255, 255, 0.3);
}

.header-login-icon {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.header-login-text {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ============================================================
   3. ナビゲーション
   ============================================================ */

.top-nav {
  background: linear-gradient(90deg, #1565C0 0%, #1E88E5 60%, #42A5F5 100%);
  padding: 0;
  margin: 0 -1.5rem;
  border-bottom: none;
  z-index: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.top-nav.nav-pinned {
  position: fixed;
  top: 0;
  margin: 0;
}

.top-nav ul {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.top-nav li {
  cursor: pointer;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s, background 0.2s;
  position: relative;
  border-bottom: 2px solid transparent;
}

/* ハンバーガーボタン（デスクトップでは非表示） */
.nav-hamburger {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: auto;
  height: 44px;
  padding: 0 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-hamburger-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
  user-select: none;
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

.top-nav li:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.top-nav li.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-bottom: 2px solid #fff;
}

.top-nav li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 14px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   3-extra. 特設ページ ドロップダウンナビ
   ============================================================ */

.top-nav li.has-dropdown {
  position: relative;
}

.top-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  min-width: 200px;
  z-index: 600;
  padding: 4px 0;
  list-style: none;
}

.top-nav li.has-dropdown:hover .dropdown-menu {
  display: block;
}

.top-nav .dropdown-menu li {
  color: #1e293b;
  padding: 10px 18px;
  font-size: 0.88rem;
  white-space: nowrap;
  border-bottom: none;
  position: static;
  background: transparent;
}

.top-nav .dropdown-menu li::after {
  display: none;
}

.top-nav .dropdown-menu li:hover {
  background: #f1f5f9;
  color: #1565C0;
}

/* ============================================================
   4. レイアウト / コンテナ
   ============================================================ */

.container {
  max-width: 850px;
  margin: 0 auto;
  background-color: #ffffff;
  min-height: 100vh;
  padding: 1.5rem;
  padding-top: 0;
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.18), 0 0 60px rgba(59, 130, 246, 0.10);
  overflow: visible;
  overflow-y: visible;
  position: relative; /* body バブルの上に表示 */
  z-index: 1;
}

/* ヘッダー下の余白 */
main {
  padding-top: 0.5rem;
}

/* テキストブロック */
.text-block {
  margin: 1rem 0;
  line-height: 1.6;
}

/* ============================================================
   ホームイントロカード（サイト説明）
   ============================================================ */
.home-intro {
  background: linear-gradient(135deg, #0D2B6E 0%, #1565C0 40%, #1E88E5 78%, #42A5F5 100%);
  border-radius: 18px;
  padding: 36px 36px 30px;
  margin: 16px 0 20px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(13, 43, 110, 0.40),
    0 2px 8px rgba(13, 43, 110, 0.20);
}

/* 装飾バブル（右上・大） */
.home-intro::before {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -130px;
  right: -100px;
  pointer-events: none;
}

/* 装飾バブル（左下・小） */
.home-intro::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  bottom: -80px;
  left: -60px;
  pointer-events: none;
}

/* バッジ行（バッジ＋タグ） */
.home-intro-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
}

.home-intro-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 4px 14px;
  border-radius: 20px;
}

.home-intro-tag {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* キャッチコピー（大） */
.home-intro-catch {
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  position: relative;
}

.home-intro-catch-sub {
  font-size: 1.0rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.70);
  margin: 0 0 22px;
  letter-spacing: 0.04em;
  position: relative;
}


/* 本文（小） */
.home-intro-desc {
  color: rgba(255, 255, 255, 0.80);
  font-size: 1.1rem;
  line-height: 1.95;
  margin: 0;
  position: relative;
}

.home-intro-desc strong {
  color: #fff;
  font-weight: 700;
}

/* 「詳細へ」リンク */
.home-intro-link {
  display: inline-block;
  margin-top: 14px;
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.home-intro-link:hover {
  color: #bfdbfe;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 使い方ガイド（2段目テキスト） */
.text-block--guide {
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 0.87rem;
  line-height: 1.85;
  color: #374151;
}

/* 非表示ユーティリティ */
.hidden {
  display: none;
}

/* アンダーラインハイライト */
.under1 {
  background: linear-gradient(transparent 70%, #66a7f18c 50%);
}

/* ============================================================
   5. ラジオボタンラベル
   ============================================================ */

.radio-label input[type="radio"] {
  display: none;
}

/* 役職選択ボタン */
.radio-label {
  display: inline-block;
  padding: 11px 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  user-select: none;
  background: #fff;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ホバー時 */
.radio-label:hover {
  border-color: #60a5fa;
  color: #1565C0;
  background: #f0f7ff;
}

/* 選択中 */
.radio-label.selected {
  background: linear-gradient(90deg, #1565C0, #1E88E5);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 14px rgba(21, 101, 192, 0.35);
}

/* ============================================================
   6. 検索ボックス / 地図
   ============================================================ */

.search-box {
  margin: 1.2rem 0 0.8rem;
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* 地図フレーム */
.map-frame {
  width: 670px;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 6px;
  margin: 0 auto;
}

/* 地図コンテナ */
.map-container {
  position: relative;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 560px;
}

.map-img {
  width: 110%;
  height: auto;
}

/* 都道府県チェックボックスの位置 */
.pref-check {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 0.95rem;
  background-color: rgba(206, 201, 201, 0.897);
  padding: 1.5px 3px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}

/* ============================================================
   資格アコーディオン（衛生管理者など）
   ============================================================ */
.qual-accordion {
  flex: 0 0 auto;
}

.qual-accordion summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.88rem;
  color: #1e293b;
  list-style: none;
  user-select: none;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.qual-accordion summary::-webkit-details-marker {
  display: none;
}

.qual-accordion summary::before {
  content: '▶';
  font-size: 0.7em;
  color: #1E88E5;
}

.qual-accordion[open] > summary::before {
  content: '▼';
}

.qual-accordion summary:hover {
  background: #e2e8f0;
  color: #000;
}

.qual-accordion-content {
  margin-top: 8px;
}

/* 基本領域・サブスペ選択ボタン: グリッド固定で折り返し防止 (Chrome/Edge対策) */
.qual-accordion-content.option-grid {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 8px;
}

/* 専門医種別プルダウン（検索フォーム内） */
.specialty-selects-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.specialty-select-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 200px;
}
.specialty-select-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}
.specialty-select-input {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.88rem;
  background: #fff;
  cursor: pointer;
  min-width: 180px;
}
.specialty-select-input:focus {
  outline: none;
  border-color: #1E88E5;
  box-shadow: 0 0 0 2px rgba(30,136,229,0.15);
}

/* ============================================================
   専門医種別 絞り込みパネル（基本領域・サブスペシャルティ）
   ============================================================ */
.specialty-panel {
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 12px 14px 10px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f2ff 100%);
  border: 1px solid #bfdbfe;
  border-left: 3px solid #2563eb;
  border-radius: 0 8px 8px 0;
}
.specialty-panel.sub {
  background: linear-gradient(135deg, #f0fff4 0%, #e6fdf0 100%);
  border-color: #bbf7d0;
  border-left-color: #16a34a;
}
.specialty-panel-title {
  margin: 0 0 9px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e40af;
  letter-spacing: 0.01em;
}
.specialty-panel.sub .specialty-panel-title {
  color: #166534;
}
.specialty-panel-title span {
  font-weight: 400;
  color: #64748b;
  margin-left: 4px;
}
.specialty-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px 6px;
}
.specialty-panel-grid label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  font-size: 0.77rem;
  color: #1e3a5f;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s;
  white-space: nowrap;
  overflow: visible;
}
.specialty-panel-grid label:hover {
  background: rgba(37, 99, 235, 0.08);
}
.specialty-panel.sub .specialty-panel-grid label:hover {
  background: rgba(22, 163, 74, 0.08);
}
.specialty-panel-grid input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: #2563eb;
  cursor: pointer;
}
.specialty-panel.sub .specialty-panel-grid input[type="checkbox"] {
  accent-color: #16a34a;
}

/* ============================================================
   地域選択アコーディオン（モバイル用 - デフォルト非表示）
   ============================================================ */
.region-accordion {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.region-accordion details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.region-accordion summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: #1e293b;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}

.region-accordion summary::-webkit-details-marker {
  display: none;
}

.region-accordion summary::before {
  content: '\25B6';
  font-size: 0.7rem;
  color: #1E88E5;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.region-accordion details[open] > summary::before {
  transform: rotate(90deg);
}

.region-accordion summary:hover {
  background: #e2e8f0;
}

.region-accordion summary label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  cursor: pointer;
}

.region-accordion summary input[type="checkbox"] {
  accent-color: #1E88E5;
}

.region-accordion .region-prefs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: #fff;
}

.region-accordion .region-prefs label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1e293b;
  transition: background 0.2s, border-color 0.2s;
}

.region-accordion .region-prefs label:hover {
  background: #e0f2fe;
  border-color: #93c5fd;
}

.region-accordion .region-prefs label:has(input:checked) {
  background: #4094de;
  color: #fff;
  border-color: #4094de;
}

.region-accordion .region-prefs input[type="checkbox"] {
  accent-color: #1E88E5;
}

/* ============================================================
   7. 検索ボタン / リセットボタン
   ============================================================ */

.search-button-wrapper {
  text-align: center;
  margin-top: 1.5rem;
}

/* 通常状態（有効時） */
.search-button-wrapper button {
  background: linear-gradient(135deg, #1565C0 0%, #1E88E5 55%, #42A5F5 100%);
  color: #fff;
  border: none;
  padding: 14px 52px;
  font-size: 1.08rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 22px rgba(30, 136, 229, 0.44);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* 光沢シマーアニメーション（有効時のみ） */
.search-button-wrapper button:not(:disabled)::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%);
  animation: search-btn-shimmer 3s infinite;
  pointer-events: none;
}

@keyframes search-btn-shimmer {
  0%       { left: -80%; }
  55%, 100% { left: 130%; }
}

/* ホバー時（有効時のみ） */
.search-button-wrapper button:hover:enabled {
  background: linear-gradient(135deg, #0d47a1 0%, #1565C0 55%, #1E88E5 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(21, 101, 192, 0.55);
}

/* クリック時 */
.search-button-wrapper button:active:enabled {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(21, 101, 192, 0.4);
}

/* 無効状態（チェックなし） */
.search-button-wrapper button:disabled {
  background: linear-gradient(135deg, #94a3b8, #cbd5e1);
  color: #e2e8f0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* リセットボタン */
#resetButton {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

#resetButton:hover {
  background-color: #000;
}

/* ============================================================
   8. フッター
   ============================================================ */

footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 1rem;
}

footer a {
  color: #1E88E5;
  text-decoration: underline;
  cursor: pointer;
}

/* ============================================================
   9. サイドメニュー（ハンバーガー）
   ============================================================ */

.side-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100%;
  background: #fff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: left 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side-menu.open {
  left: 0;
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(90deg, #1565C0, #1E88E5);
  flex-shrink: 0;
}

.side-menu-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.side-menu-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.side-menu-close:hover { color: #fff; }

.side-menu nav { flex: 1; }

.side-menu ul {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.side-menu li {
  padding: 13px 20px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.side-menu li:hover {
  background: #f0f9ff;
  color: #1565C0;
}
.side-menu li::before {
  content: '›';
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 700;
}

.side-menu-section {
  padding: 10px 20px 6px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.12em;
  background: #f8fafc;
  cursor: default !important;
  border-bottom: none !important;
}
.side-menu-section::before { display: none !important; }
.side-menu-section:hover {
  background: #f8fafc !important;
  color: #94a3b8 !important;
}

.side-menu-sub {
  padding-left: 32px !important;
  color: #1565C0 !important;
  font-size: 0.85rem !important;
}

/* オーバーレイ */
.side-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}
.side-menu-overlay.open { display: block; }

/* ============================================================
   10. SPA ページ切替
   ============================================================ */

.view {
  display: none;
}

.view.active {
  display: block;
}

/* ============================================================
   11. ポリシーポップアップ（個人情報保護方針・利用規約）
   ============================================================ */

.privacy-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  overscroll-behavior: contain;
}

.popup-content {
  background-color: #ffffff;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
  border-radius: 8px;
  position: relative;
}

.popup-content button {
  display: block;
  margin: 2rem auto 0 auto;
  background-color: #1E88E5;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.popup-content button:hover {
  background-color: #1565C0;
}

.privacy-text {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ============================================================
   12. 検索フォーム セクション
   ============================================================ */

/* フラットアクセントバースタイル */
.search-section {
  background: transparent;
  border: none;
  border-left: 4px solid #1E88E5;
  border-radius: 0;
  padding: 12px 0 16px 16px;
  margin-bottom: 0;
  border-bottom: 1px solid #e2e8f0;
}

.search-section:last-child {
  border-bottom: none;
}

.search-section h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.search-section h3 {
  margin: 14px 0 6px;
  font-size: 0.85rem;
  color: #000000;
  font-weight: 600;
  padding-left: 8px;
  border-left: 2px solid #90caf9;
}

.search-section p {
  margin: 4px 0 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #424c5b;
}

/* ============================================================
   13. オプション グリッド（通常 / コンパクト / インライン）
   ============================================================ */

/* --- フォーム内チェックボックスリスト（options-grid） --- */
.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
.options-grid label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  white-space: normal;
  word-break: break-word;
}

/* --- 日本専門医機構認定専門医 サブセクション --- */
.nihon-subsection {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}
.specialty-sub-section {
  margin-top: 8px;
  margin-left: 24px;
  padding: 12px;
  border-radius: 8px;
  box-sizing: border-box;
}
.specialty-sub-section--blue {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
}
.specialty-sub-section--green {
  background: #f0fff4;
  border: 1px solid #bbf7d0;
}

/* --- 通常グリッド（丸ピル・塗りつぶしスタイル） --- */
.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.option-grid label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  font-size: 0.88rem;
  color: #1e293b;
  position: relative;
  z-index: 0;
}

.option-grid label:hover {
  background: #e2e8f0;
  color: #000000;
}

.option-grid label:has(input:checked) {
  background: #4094de;
  color: #fff;
  box-shadow: 0 2px 6px rgba(30, 136, 229, 0.3);
  z-index: 0;
}
.option-grid label:has(.custom-tooltip:hover),
.option-grid-compact label:has(.custom-tooltip:hover),
.radio-with-icon:has(.custom-tooltip:hover) {
  z-index: 10000;
}

/* --- 検索ヒント --- */
.search-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 6px 0;
}

/* --- コンパクトグリッド --- */
.option-grid-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-grid-compact label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  font-size: 0.88rem;
  color: #1e293b;
  position: relative;
  z-index: 0;
}

.option-grid-compact label:hover {
  background: #e2e8f0;
  color: #000000;
}

.option-grid-compact label:has(input:checked) {
  background: #4094de;
  color: #fff;
  box-shadow: 0 2px 6px rgba(30, 136, 229, 0.3);
  z-index: 0;
}

/* --- インライン小グループ（あり/なし） --- */
.option-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.option-inline label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: #f1f5f9;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  font-size: 0.88rem;
  color: #1e293b;
}

.option-inline label:hover {
  background: #e2e8f0;
  color: #000000;
}

.option-inline label:has(input:checked) {
  background: #4094de;
  color: #fff;
  box-shadow: 0 2px 6px rgba(30, 136, 229, 0.3);
}

/* ============================================================
   14. 検索行（2カラム並列グループ）
   ============================================================ */

.search-row {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-left: 4px solid #4094de;
  border-bottom: 1px solid #e2e8f0;
}

.search-row .search-section {
  flex: 1;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid #e2e8f0;
}

.search-row .search-section:last-child {
  border-right: none;
}

/* ============================================================
   モバイル対応
   ============================================================ */
@media (max-width: 600px) {
  /* --- コンテナ --- */
  .container {
    padding: 0.4rem;
    padding-top: 0;
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* --- ヘッダー --- */
  .site-header {
    margin: 0 -0.4rem;
  }
  .header-top {
    padding: 8px 10px;
  }
  .header-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    padding: 2px;
  }
  .header-brand {
    gap: 8px;
  }
  .header-title {
    font-size: 1rem;
  }
  .header-subtitle {
    font-size: 0.75rem;
  }

  /* --- ナビゲーション: 768px以下でハンバーガー切替 --- */
  .top-nav {
    display: flex;
    align-items: center;
    padding: 0 12px;
    margin: 0 -0.4rem;
    min-height: 44px;
  }
  .top-nav ul { display: none; }
  .nav-hamburger { display: flex; }

  /* --- 日本専門医機構認定専門医サマリーをオプションボタンと同サイズに --- */
  .qual-accordion summary {
    font-size: 0.7rem;
    padding: 3px 7px;
    gap: 2px;
  }

  /* --- 専門医チェックボックス: スマホでは等幅2列に --- */
  .qual-accordion-content.option-grid {
    grid-template-columns: 1fr 1fr;
  }
  .qual-accordion-content.option-grid label {
    white-space: normal;
    word-break: break-word;
  }

  /* --- 専門医絞り込みパネル: 3列→2列・文字折り返し許可 --- */
  .specialty-panel-grid {
    grid-template-columns: 1fr 1fr;
  }
  .specialty-panel-grid label {
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
    font-size: 0.7rem;
  }

  /* --- 日本専門医機構認定専門医セクション（モバイル圧縮） --- */
  .specialty-sub-section {
    margin-left: 0;
    padding: 8px 6px;
  }
  .specialty-sub-section .options-grid {
    grid-template-columns: 1fr 1fr;
  }
  .specialty-sub-section .options-grid label {
    font-size: 0.75rem;
    min-width: 0;
    word-break: break-word;
  }

  /* --- メインコンテンツ --- */
  main {
    padding-top: 0.2rem;
  }

  /* --- テキストブロック --- */
  .text-block {
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0.4rem 0;
  }

  /* --- ホームイントロカード（モバイル） --- */
  .home-intro {
    padding: 24px 18px 20px;
    margin: 10px 0 14px;
    border-radius: 14px;
  }
  .home-intro-header {
    margin-bottom: 14px;
  }
  .home-intro-badge {
    font-size: 0.60rem;
    padding: 3px 10px;
  }
  .home-intro-tag {
    font-size: 0.62rem;
  }
  .home-intro-catch {
    font-size: 1.45rem;
    margin-bottom: 4px;
  }
  .home-intro-catch-sub {
    font-size: 0.82rem;
    margin-bottom: 16px;
  }

  .home-intro-desc {
    font-size: 0.80rem;
    line-height: 1.85;
  }
  .text-block--guide {
    font-size: 0.78rem;
    padding: 11px 14px;
    line-height: 1.75;
  }

  /* --- 産業医or保健師 見出し --- */
  section > h2 {
    font-size: 0.82rem;
    margin-top: 0.4rem;
    margin-bottom: 0.3rem;
  }

  /* --- 検索フォーム --- */
  .search-row {
    flex-direction: column;
  }
  .search-row .search-section {
    border-right: none;
    border-bottom: 1px solid #f1f5f9;
  }
  .search-row .search-section:last-child {
    border-bottom: none;
  }
  .search-section {
    padding: 5px 0 6px 8px;
  }
  .search-section h2 {
    font-size: 0.78rem;
    margin-bottom: 4px;
  }
  .search-section h3 {
    margin: 6px 0 3px;
    font-size: 0.72rem;
  }
  .search-section p {
    margin: 2px 0 4px;
    font-size: 0.7rem;
  }
  .search-box {
    gap: 10px;
    margin: 0.6rem 0 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .radio-label {
    padding: 9px 24px;
    font-size: 0.85rem;
  }

  /* --- オプショングリッド --- */
  .option-grid,
  .option-grid-compact,
  .option-inline {
    gap: 4px;
  }
  .option-grid label,
  .option-grid-compact label,
  .option-inline label {
    font-size: 0.7rem;
    padding: 3px 7px;
    gap: 2px;
    white-space: normal;
  }

  /* --- 地図を非表示・アコーディオンを表示 --- */
  .map-frame {
    display: none;
  }
  .region-accordion {
    display: flex;
    gap: 3px;
  }
  .region-accordion details {
    border-radius: 6px;
  }
  .region-accordion summary {
    padding: 6px 8px;
    font-size: 0.75rem;
    gap: 5px;
  }
  .region-accordion .region-prefs {
    padding: 5px 8px;
    gap: 3px;
  }
  .region-accordion .region-prefs label {
    font-size: 0.7rem;
    padding: 3px 7px;
    gap: 2px;
  }

  /* --- キーワード検索 --- */
  .keyword-search-box input[type="text"] {
    width: 95%;
  }

  /* --- 検索・リセットボタン --- */
  .search-button-wrapper {
    margin-top: 0.8rem;
  }
  .search-button-wrapper button {
    width: 100%;
    padding: 13px 24px;
    font-size: 1rem;
  }
  #resetButton {
    padding: 0.25rem 0.7rem;
    font-size: 0.7rem;
  }

  /* --- ツールチップ：スマホではポップアップ無効 --- */
  .custom-tooltip::after {
    display: none !important;
  }
  /* 用語解説リンクのないアイコンはスマホで非表示 */
  .custom-tooltip:has(img:not([onclick])) {
    display: none;
  }

  /* --- 検索結果ポップアップ --- */
  .results-header {
    padding: 10px 12px 8px;
  }
  .results-body {
    padding: 10px 12px 12px;
  }
  .results-footer {
    padding: 8px 12px 10px;
  }

  /* --- プロフィールカード --- */
  .profile-card {
    height: 140px;
    padding: 10px;
    gap: 10px;
  }
  .profile-card-img,
  .profile-card-noimg {
    width: 58px;
    height: 58px;
  }
  .profile-card-fill-office {
    font-size: 0.72rem;
  }
  .profile-card-name-row .profile-card-name {
    font-size: 0.82rem;
  }
  .profile-card-intro {
    font-size: 0.72rem;
  }
  .profile-card-meta {
    font-size: 0.65rem;
  }

  /* 詳細ポップアップのモバイルCSSはファイル末尾の専用ブロックに記述 */

  /* --- スクロールトップ・戻るボタン --- */
  #scrollTopBtn {
    bottom: 12px;
    right: 12px;
    padding: 6px 10px;
    font-size: 0.7rem;
  }
  .term-back-btn {
    bottom: 50px;
    right: 12px;
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  /* --- フッター --- */
  footer {
    font-size: 0.72rem;
    padding: 0.5rem;
  }

  /* --- ポリシーポップアップ --- */
  .popup-content {
    padding: 0.8rem;
  }
}

/* ============================================================
   15. 用語解説（ツールチップ / ハイライト）
   ============================================================ */

/* 用語解説ページの「戻る」ボタン（右下固定） */
.term-back-btn {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  color: #1E88E5;
  border: 2px solid #1E88E5;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s, color 0.2s;
}

.term-back-btn:hover {
  background: #1E88E5;
  color: #fff;
}

/* 用語解説セクション */
#terminology {
  padding-bottom: 100px;
}

.terminology-heading {
  color: #1565C0;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #1E88E5;
}

/* 用語ブロック：カード型デザイン */
.term-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}

.term-block:hover {
  box-shadow: 0 4px 14px rgba(21, 101, 192, 0.1);
}

/* 用語タイトル（h3） */
.term-block > h3,
.term-block h3:first-of-type {
  color: #1565C0;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 14px;
  padding: 0 0 12px 14px;
  border-bottom: 1px solid #e0f2fe;
  border-left: 4px solid #1E88E5;
  line-height: 1.4;
}

/* サブ見出し（h4） */
.term-block h4 {
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 18px 0 8px;
  padding: 6px 10px;
  background: #f0f9ff;
  border-left: 3px solid #7dd3fc;
  border-radius: 0 4px 4px 0;
}

/* 本文段落 */
.term-block p {
  color: #374151;
  font-size: 0.93rem;
  line-height: 1.85;
  margin: 0 0 10px;
}

.term-block p:last-child {
  margin-bottom: 0;
}

/* リスト */
.term-block ul {
  margin: 8px 0 12px;
  padding-left: 0.5em;
}

.term-block li {
  color: #374151;
  font-size: 0.93rem;
  line-height: 1.75;
  padding: 3px 0;
}

/* 用語解説ポップアップのアイコン */
.info-icon {
  width: 1em;
  height: 1em;
  margin-left: 3px;
  vertical-align: middle;
  cursor: pointer;
}

/* ラジオボタン＋アイコンの横並び */
.radio-with-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 0;
}

/* ハイライトフラッシュアニメーション */
.highlight {
  animation: highlightFlash 3s ease;
}

@keyframes highlightFlash {
  0%   { background-color: #ffffcc; }
  100% { background-color: transparent; }
}

/* カスタムツールチップ */
.custom-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1;
}

.custom-tooltip:hover {
  z-index: 10000;
}

.custom-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 100%;
  margin-top: 8px;
  margin-left: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  width: 20em;
  background: white;
  color: black;
  border: 1px solid black;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: normal;
  font-family: sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 9999;
}

.custom-tooltip:hover::after {
  opacity: 1;
}

/* ============================================================
   16. チェックリスト
   ============================================================ */

.checklist {
  list-style: none;
  padding-left: 1.2em;
  margin-top: 0.5em;
  margin-bottom: 1em;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.4em;
  line-height: 1.6;
}

.check-icon {
  width: 1em;
  height: 1em;
  margin-right: 0.6em;
  margin-top: 0.25em;
  flex-shrink: 0;
}

/* ============================================================
   17. キーワード検索
   ============================================================ */

.keyword-search-box {
  margin-top: 1rem;
  text-align: center;
}

.keyword-search-box input[type="text"] {
  width: 60%;
  max-width: 500px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  resize: none;
}

/* ============================================================
   18. スクロールトップボタン
   ============================================================ */

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1E88E5;
  border: 2px solid #1E88E5;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s, color 0.2s;
}

#scrollTopBtn:hover {
  background: #1E88E5;
  color: #fff;
}

/* ============================================================
   19. スクロール制御
   ============================================================ */

/* ポップアップ表示中の背面スクロール防止 */
body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ============================================================
   20. 検索結果ポップアップ
   ============================================================ */

/* オーバーレイ背景 */
.results-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  overflow: hidden;
  overscroll-behavior: contain;
}

/* 結果ボックス */
.results-box {
  background: #f8fafc;
  width: 96%;
  max-width: 960px;
  max-height: 85vh;
  border-radius: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ヘッダー */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 14px 14px 0 0;
  flex-shrink: 0;
}

.results-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1e293b;
}

/* 閉じるボタン */
.results-close-btn {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 0.9rem;
  color: #475569;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.results-close-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* 本文エリア */
.results-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 24px 24px;
  flex: 1;
}

.results-body::-webkit-scrollbar {
  width: 6px;
}

.results-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* 結果なしメッセージ */
.results-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 1rem;
}

/* 結果グリッド */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* フッター */
.results-footer {
  padding: 12px 24px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0 0 14px 14px;
  text-align: center;
  flex-shrink: 0;
}

.results-footer-close-btn {
  background: #1E88E5;
  color: #fff;
  border: none;
  padding: 10px 32px;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.results-footer-close-btn:hover {
  background: #1565C0;
}

/* ============================================================
   21. プロフィールカード
   ============================================================ */

.profile-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  height: 172px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  transition: box-shadow 0.2s;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
}

.profile-card:hover {
  box-shadow: 0 2px 12px rgba(30, 136, 229, 0.12);
}

/* プロフィール画像 */
.profile-card-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: #f1f5f9;
  align-self: center;
}

/* 画像なし */
.profile-card-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  font-size: 0.8rem;
  color: #94a3b8;
  align-self: center;
}

/* カード本文（屋号なし：従来レイアウト） */
.profile-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  overflow: hidden;
}

/* カード本文（屋号あり） */
.profile-card-body--office {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

/* 屋号・法人名（黒太字） */
.profile-card-fill-office {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  flex-shrink: 0;
}

/* name-row内の名前サイズ（屋号あり・なし共通） */
.profile-card-name-row .profile-card-name {
  font-size: 1rem;
  font-weight: 600;
}

/* 名前と地域・事業形態の横並び行（屋号ありの場合） */
.profile-card-name-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.profile-card-kana {
  font-size: 0.6rem;
  color: #94a3b8;
  letter-spacing: 0.1em;
  line-height: 1.2;
  flex-shrink: 0;
}

.profile-card-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* 地域・事業形態（屋号ありのname-row内 or 屋号なしの単独行） */
.profile-card-meta {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}

/* 自己PR（屋号あり・なし共通：4行表示） */
.profile-card-intro {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  /* -webkit-line-clamp: 4;
  line-clamp: 4; */
  overflow: hidden;
  flex: none;
}

/* ============================================================
   22. 詳細ポップアップ
   ============================================================ */

/* オーバーレイ背景 */
.detail-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  overflow: hidden;
  overscroll-behavior: contain;
}

.detail-overlay.active {
  display: flex;
}

/* 詳細ボックス */
.detail-box {
  background: #fff;
  width: 96%;
  max-width: 1500px;
  max-height: 92vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

/* ヘッダー */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.detail-header h3 {
  margin: 0;
  font-size: 1.4rem;
  color: #1e293b;
  letter-spacing: 0.02em;
}

/* ヘッダー右側アクション群（共有ボタン + 閉じるボタン） */
.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 閉じるボタン */
.detail-close-btn {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 1.05rem;
  color: #475569;
  cursor: pointer;
  transition: background-color 0.2s;
}

.detail-close-btn:hover {
  background: #f1f5f9;
}

/* 本文エリア */
.detail-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 40px;
  flex: 1;
}

.detail-body::-webkit-scrollbar {
  width: 8px;
}

.detail-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* --- プロフィール上部 --- */
.detail-profile-top {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  margin-bottom: 40px;
  position: relative;
}

.detail-contact-top {
  position: absolute;
  top: 0;
  right: 0;
}

/* --- 3カラムレイアウト（検索画面・アドミン画面用） --- */
.detail-profile-wrapper {
  margin-bottom: 50px;
}

/* グリッドコンテナ：3列×2行
   行1: [写真][名前・自己PR][基本情報]
   行2: [経歴・業務・資格・研究←→  ][基本情報続き/地図] */
.detail-profile-container {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: 40px;
  row-gap: 24px;
  align-items: start;
}

/* [col1, row1] 写真・ロゴ */
.detail-left-column {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* 屋号・法人名バナー（グリッド外・フル幅） */
.detail-office-name-banner {
  text-align: center;
  font-size: 2.6rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.04em;
  padding: 14px 0 12px;
  border-bottom: 2px solid #e2e8f0;
  line-height: 1.3;
  margin-bottom: 20px;
}

/* [col2, row1] 名前・自己PR */
.detail-middle-column {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 名前・自己PR の内側 */
.detail-middle-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* [col3, row1/3] 基本情報・対応可能地域・地図 */
.detail-right-column {
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* [col1-2, row2] 経歴・対応可能業務・保有資格・研究経験 */
.detail-merged-column {
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

/* 顔写真 */
.detail-photo {
  width: 240px;
  height: 240px;
  border-radius: 16px;
  object-fit: contain;
  flex-shrink: 0;
  background: #f1f5f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 写真なし */
.detail-photo-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #94a3b8;
  border: 2px dashed #cbd5e1;
}

/* 写真とロゴのコンテナ */
.detail-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

/* 会社ロゴ */
.detail-logo {
  width: 240px;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px;
}

/* フリガナ */
.detail-name-kana {
  font-size: 1rem;
  color: #64748b;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  font-weight: 500;
}

/* 名前と役職の横並びコンテナ */
.detail-name-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

/* 名前 */
.detail-name {
  font-size: 1.9rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

/* ロールバッジ（名前の右下に小さめ） */
.detail-role-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* 最終更新日時 */
.detail-updated-at {
  margin-left: auto;
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
  align-self: flex-end;
  flex-shrink: 0;
  padding-bottom: 8px;
}

/* 屋号・法人名バナー（モバイル） */

/* 自己紹介文 */
.detail-intro {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.8;
  margin-top: 12px;
  letter-spacing: 0.02em;
}
.detail-map-wrap {
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.detail-map-iframe {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
}

/* Webページセクション（2:8 レイアウト） */
.detail-web-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.detail-web-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-web-url-label {
  font-size: 1rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-web-url {
  font-size: 1.1rem;
  word-break: break-all;
}

.detail-web-url a {
  color: #1E88E5;
  text-decoration: none;
}

.detail-web-url a:hover {
  text-decoration: underline;
}

.detail-og-info {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.og-loading {
  font-size: 0.75rem;
  color: #94a3b8;
}

.og-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

.og-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.6;
}

.detail-web-right {
  width: 100%;
  display: flex;
  justify-content: center;
}

.detail-web-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: opacity 0.2s;
}

.detail-web-image:hover {
  opacity: 0.88;
}

.detail-web-noimg {
  width: 100%;
  min-height: 60px;
}

.detail-web-ogimg-placeholder {
  width: 100%;
  min-height: 60px;
  max-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-career {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

/* --- 連絡先ボックス --- */
.detail-email-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.detail-email-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2e7d32;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.detail-email-link {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1565c0;
  text-decoration: none;
  word-break: break-all;
  letter-spacing: 0.01em;
}

.detail-email-link:hover {
  text-decoration: underline;
  color: #0d47a1;
}

/* --- セクション区切り --- */
.detail-section {
  margin-bottom: 36px;
}

.detail-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1E88E5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid #e0f2fe;
}

/* --- 詳細グリッド（2カラム） --- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.detail-item-label {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.detail-item-value {
  font-size: 1.1rem;
  color: #1e293b;
  word-break: break-word;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.detail-item-value.none {
  color: #cbd5e1;
  font-style: italic;
}

/* フル幅アイテム */
.detail-item-full {
  grid-column: 1 / -1;
}

/* --- タグリスト --- */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.detail-tags-compact {
  gap: 6px;
  margin-top: 6px;
}

.detail-tags-compact .detail-tag {
  font-size: 0.78rem;
  padding: 4px 10px;
}

.detail-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 1rem;
  line-height: 1;
  padding: 8px 16px;
  border-radius: 8px;
  letter-spacing: 0.01em;
}

/* --- フッター --- */
.detail-footer {
  padding: 12px 24px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.detail-footer-close-btn {
  background: #1E88E5;
  color: #fff;
  border: none;
  padding: 10px 32px;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.detail-footer-close-btn:hover {
  background: #1565C0;
}

/* --- プロフィール詳細ナビゲーション矢印 --- */
.detail-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  transition: background 0.16s, transform 0.16s, box-shadow 0.16s;
  z-index: 3100;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.detail-nav-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.36);
  color: #1E88E5;
}

.detail-nav-btn:active {
  transform: translateY(-50%) scale(0.94);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.detail-nav-prev {
  left: 16px;
}

.detail-nav-next {
  right: 16px;
}

.detail-nav-btn.nav-hidden {
  visibility: hidden;
  pointer-events: none;
}

/* カウンター表示 */
.detail-nav-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.52);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 99px;
  letter-spacing: 0.08em;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .detail-nav-btn {
    width: 44px;
    height: 44px;
    top: auto;
    bottom: 72px;
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
  }
  .detail-nav-btn:hover {
    transform: scale(1.08);
  }
  .detail-nav-btn:active {
    transform: scale(0.93);
  }
  .detail-nav-prev {
    left: 12px;
  }
  .detail-nav-next {
    right: 12px;
  }
  .detail-nav-counter {
    bottom: 122px;
  }
}

/* ============================================================
   23. お問い合わせフォーム
   ============================================================ */

/* お問い合わせボタン */
.contact-form-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #43a047;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
.contact-form-btn:hover {
  background: #2e7d32;
}

/* お問い合わせオーバーレイ（詳細ポップアップの上に表示） */
#contactFormOverlay,
#adminContactOverlay {
  z-index: 3500;
}

/* フォームボックス */
.contact-form-box {
  background: #fff;
  width: 92%;
  max-width: 520px;
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.contact-form-body {
  padding: 20px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.contact-form-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 16px;
  line-height: 1.5;
}

.contact-form-group {
  margin-bottom: 14px;
}
.contact-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}
.contact-form-group .required {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 500;
}
.contact-form-group input[type="text"],
.contact-form-group input[type="email"],
.contact-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.contact-form-group input:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: #1E88E5;
  box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
}
.contact-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form-consent {
  margin-bottom: 16px;
}
.contact-form-consent label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  line-height: 1.4;
}
.contact-form-consent input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}
.contact-form-consent .required {
  color: #ef4444;
  font-size: 0.75rem;
}

.contact-form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 14px;
  white-space: pre-line;
}

.contact-submit-btn {
  display: block;
  width: 100%;
  background: #1E88E5;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
.contact-submit-btn:hover {
  background: #1565C0;
}
.contact-submit-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.contact-form-success {
  padding: 40px 24px;
  text-align: center;
}
.contact-success-icon {
  width: 56px;
  height: 56px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px;
}
.contact-form-success p {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px;
}
.contact-success-sub {
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  color: #64748b !important;
  margin-bottom: 20px !important;
}

/* ============================================================
   トップページ インラインお問い合わせフォーム
   ============================================================ */
.inquiry-form-wrapper {
  margin: 40px auto 20px;
  max-width: 709px;
  background: linear-gradient(135deg, #f8fffe 0%, #f0faf6 100%);
  border: 1px solid #c8e6c9;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 2px 12px rgba(67, 160, 71, 0.08);
}
.inquiry-form-title {
  text-align: center;
  font-size: 1.2rem;
  color: #2e7d32;
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid #a5d6a7;
}
.inquiry-form-desc {
  text-align: center;
  font-size: 0.88rem;
  color: #546e7a;
  margin: 0 0 24px;
  line-height: 1.6;
}
.inquiry-form-notice {
  text-align: center;
  font-size: 0.9rem;
  color: #c62828;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 24px;
  line-height: 1.6;
  font-weight: 600;
}
.inquiry-form-section-title {
  font-size: 0.92rem;
  color: #2e7d32;
  font-weight: 600;
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #c8e6c9;
}
.inquiry-form-section-title .optional {
  font-size: 0.75rem;
  color: #78909c;
  font-weight: 400;
}
.inquiry-position-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.inquiry-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #37474f;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}
.inquiry-radio-label:hover {
  background: #e8f5e9;
  border-color: #a5d6a7;
}
.inquiry-radio-label input[type="radio"] {
  flex-shrink: 0;
}
.inquiry-form-consent-group {
  margin: 24px 0 16px;
}
.inquiry-form-consent-group > label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #37474f;
  margin-bottom: 10px;
}
.inquiry-consent-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inquiry-consent-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #37474f;
  cursor: pointer;
  line-height: 1.5;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: background 0.2s;
}
.inquiry-consent-item:hover {
  background: #f5f5f5;
}
.inquiry-consent-item input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}
.inquiry-form-group .optional {
  color: #78909c;
  font-size: 0.75rem;
  font-weight: 400;
}
.inquiry-form-group {
  margin-bottom: 18px;
  flex: 1;
}
.inquiry-form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #37474f;
  margin-bottom: 6px;
}
.inquiry-form-group .required {
  color: #e53935;
  font-size: 0.75rem;
  font-weight: 500;
}
.inquiry-form-group input[type="text"],
.inquiry-form-group input[type="email"],
.inquiry-form-group input[type="tel"],
.inquiry-form-group input[type="url"],
.inquiry-form-group select,
.inquiry-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  font-size: 0.92rem;
  background: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.inquiry-form-group input:focus,
.inquiry-form-group select:focus,
.inquiry-form-group textarea:focus {
  outline: none;
  border-color: #43a047;
  box-shadow: 0 0 0 2px rgba(67, 160, 71, 0.15);
}
.inquiry-form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.inquiry-form-row {
  display: flex;
  gap: 16px;
}
.inquiry-form-consent {
  margin: 20px 0 16px;
}
.inquiry-form-consent label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #37474f;
  cursor: pointer;
  line-height: 1.5;
}
.inquiry-form-consent input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.inquiry-form-consent .required {
  color: #e53935;
  font-size: 0.75rem;
}
.inquiry-form-error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  padding: 10px 14px;
  color: #c53030;
  font-size: 0.85rem;
  margin-bottom: 14px;
  white-space: pre-line;
}
.inquiry-submit-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: #43a047;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.inquiry-submit-btn:hover {
  background: #2e7d32;
}
.inquiry-submit-btn:disabled {
  background: #a5d6a7;
  cursor: not-allowed;
}
.inquiry-form-success {
  text-align: center;
  padding: 30px 10px;
}
.inquiry-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: #e8f5e9;
  color: #43a047;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
}
.inquiry-form-success p {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px;
}
.inquiry-success-sub {
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  color: #64748b !important;
  margin-bottom: 20px !important;
}

/* モバイル対応 */
@media (max-width: 600px) {
  .inquiry-form-wrapper {
    padding: 20px 16px;
    margin: 24px auto 12px;
  }
  .inquiry-form-row {
    flex-direction: column;
    gap: 0;
  }
  .inquiry-form-title {
    font-size: 1.05rem;
  }
}

/* ============================================================
   23. アクセスカウンター
   ============================================================ */

.access-counter {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  width: auto;
  min-width: 180px;
  flex-shrink: 0;
}

.access-counter::before {
  content: '';
  position: absolute;
  top: -14px;
  right: -10px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.access-counter::after {
  display: none;
}

/* 左側：アイコン + LIVEバッジ（横並び） */
.access-counter-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.access-counter-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.access-counter-live {
  display: flex;
  align-items: center;
  gap: 3px;
}

.access-counter-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: ac-pulse 2s ease-in-out infinite;
}

@keyframes ac-pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  50%       { opacity: 0.5; transform: scale(0.7); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0);  }
}

.access-counter-live-text {
  font-size: 0.67rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* 区切り線 */
.access-counter-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 1;
  flex-shrink: 0;
}

/* 右側：ラベル → 数値+visits（縦並び・中央揃え） */
.access-counter-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 1;
}

.access-counter-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
}

/* 数値 + visits を横並び（visitsは数値の右下） */
.access-counter-number-wrap {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.access-counter-number {
  display: inline;
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  line-height: 1;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.access-counter-unit {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-bottom: 2px;
}

@media (max-width: 600px) {
  /* タイトルを優先：伸縮自在に */
  .header-brand {
    flex: 1;
    min-width: 0;
  }
  /* 右側は縮まないよう固定 */
  .header-right {
    gap: 6px;
    flex-shrink: 0;
  }
  /* アクセスカウンターをコンパクトに */
  .access-counter {
    padding: 4px 8px;
    gap: 5px;
    min-width: 0;       /* 180px を上書き */
    flex-shrink: 1;
  }
  /* 不要な要素を非表示 */
  .access-counter-label   { display: none; }
  .access-counter-divider { display: none; }
  .access-counter-live    { display: none; }
  .access-counter-left    { gap: 3px; }
  /* アイコン・数値を小さく */
  .access-counter-icon {
    font-size: 0.85rem;
  }
  .access-counter-number {
    font-size: 1rem;
  }
  .access-counter-unit {
    font-size: 0.48rem;
  }
  .header-login {
    padding: 5px 8px;
  }
}

/* ============================================================
   24. 登録条件リスト（ハンギングインデント）
   ============================================================ */

.reg-cond-item {
  margin: 0 0 0.8em 2em;
  padding-left: 1em;
  text-indent: 0em;
  line-height: 1.8;
}
.reg-cond-note {
  display: block;
  padding-left: 1em;
  text-indent: 0;
  font-size: 0.88em;
  color: #555;
}

/* ============================================================
   25. 仮登録CTAボタン
   ============================================================ */

.register-cta {
  display: flex;
  justify-content: center;
  margin: 20px 0 28px;
}

.register-btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #2d6db5 0%, #4a8fd4 45%, #6aaee8 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 18px;
  padding: 18px 36px;
  box-shadow:
    0 6px 24px rgba(45, 109, 181, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

/* 光沢ハイライト */
.register-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.18), transparent);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

.register-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 32px rgba(45, 109, 181, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.register-btn:active {
  transform: translateY(-1px);
}

.register-btn-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  flex-shrink: 0;
}

.register-btn-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.register-btn-main {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  line-height: 1;
}

.register-btn-sub {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.88;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .register-btn {
    padding: 14px 24px;
    gap: 14px;
    border-radius: 14px;
    width: 100%;
    justify-content: center;
  }
  .register-btn-main {
    font-size: 1.1rem;
  }
  .register-btn-icon {
    font-size: 1.7rem;
  }
  /* 登録フロー：スマホでは縦並び */
  .register-flow-layout {
    flex-direction: column !important;
  }
  .register-flow-layout > div:last-child {
    text-align: center;
  }
  .register-flow-layout > div:last-child img {
    max-width: 100% !important;
  }
}

/* ============================================================
   プロフィール詳細ポップアップ：スマホ専用（デスクトップCSSより後に記述）
   ============================================================ */
@media (max-width: 600px) {

  /* --- ボックス全体 --- */
  .detail-box {
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }
  .detail-header {
    padding: 8px 12px;
  }
  .detail-header h3 {
    font-size: 0.85rem;
  }
  .detail-close-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .detail-body {
    padding: 12px;
    font-size: 0.8rem;
  }

  /* --- カラム：グリッド廃止 → flex縦積み --- */
  .detail-profile-wrapper {
    margin-bottom: 12px;
  }
  /* グリッドをスタック表示に変更 */
  .detail-profile-container {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }
  .detail-left-column,
  .detail-middle-column,
  .detail-right-column,
  .detail-merged-column {
    grid-column: unset !important;
    grid-row: unset !important;
    width: 100%;
    text-align: left;
  }
  .detail-merged-column {
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
  }

  /* --- 写真・ロゴ --- */
  .detail-images {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .detail-photo {
    width: 80px;
    height: 80px;
    border-radius: 10px;
  }
  .detail-logo {
    width: 80px;
    max-height: 60px;
  }

  /* --- 名前 --- */
  .detail-name {
    font-size: 1.2rem;
  }
  .detail-name-kana {
    font-size: 0.72rem;
  }
  .detail-name-row {
    gap: 6px;
    flex-wrap: wrap;
  }
  .detail-updated-at {
    font-size: 0.72rem;
    padding-bottom: 4px;
  }

  .detail-office-name-banner {
    font-size: 1.4rem;
    padding: 10px 0 8px;
  }

  /* --- 自己PR・経歴 --- */
  .detail-intro {
    font-size: 0.8rem;
    line-height: 1.6;
    max-width: 100%;
  }
  .detail-career {
    font-size: 0.78rem;
    line-height: 1.6;
  }

  /* --- セクション --- */
  .detail-section {
    margin-bottom: 14px;
  }
  .detail-section-title {
    font-size: 0.7rem;
    padding: 3px 0 5px;
  }

  /* --- 基本情報グリッド --- */
  .detail-grid,
  .detail-grid-compact {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px 10px !important;
  }
  .detail-item {
    padding: 5px 0;
  }
  .detail-item-label {
    font-size: 0.65rem;
    margin-bottom: 1px;
  }
  .detail-item-value {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  /* --- タグ（資格・業務など） --- */
  .detail-tags {
    gap: 5px;
    margin-top: 5px;
  }
  .detail-tag {
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .detail-tags-compact .detail-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  /* --- Webページセクション --- */
  .detail-web-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .detail-web-right {
    width: 100%;
  }
  .detail-web-url-label {
    font-size: 0.65rem;
  }
  .detail-web-url a {
    font-size: 0.72rem;
  }
  .og-title {
    font-size: 0.75rem;
  }
  .og-desc {
    font-size: 0.7rem;
  }

  /* --- マップ --- */
  .detail-map-iframe {
    aspect-ratio: 4 / 3;
  }

  /* --- お問い合わせボタン --- */
  .detail-contact-top {
    position: static;
    margin-bottom: 8px;
    text-align: left;
  }
  .detail-profile-wrapper > .detail-contact-top {
    justify-content: flex-start;
  }
  .detail-email-box {
    flex-direction: column;
    gap: 4px;
  }
  .contact-form-btn {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  /* --- お問い合わせフォーム --- */
  .contact-form-body {
    padding: 12px 14px;
  }
  .contact-form-group label {
    font-size: 0.75rem;
  }
  .contact-form-group input[type="text"],
  .contact-form-group input[type="email"],
  .contact-form-group textarea {
    font-size: 0.8rem;
    padding: 7px 9px;
  }
  .contact-form-consent label {
    font-size: 0.72rem;
  }
  .contact-submit-btn {
    font-size: 0.82rem;
    padding: 9px;
  }

  /* --- フッター --- */
  .detail-footer {
    padding: 8px 12px;
    gap: 8px;
  }
  .detail-footer-close-btn {
    padding: 7px 18px;
    font-size: 0.78rem;
  }
}

/* ============================================================
   特設ページ（社労士×産業保健職）
   ============================================================ */

/* ヒーロー */
.sharoushi-hero {
  background: linear-gradient(135deg, #0D47A1 0%, #1565C0 30%, #1E88E5 70%, #42A5F5 100%);
  border-radius: 14px;
  padding: 20px 40px;
  margin-bottom: 40px;
  text-align: center;
}

.sharoushi-hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.sharoushi-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}

.sharoushi-hero-title {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.sharoushi-hero-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.9;
  text-align: left;
}

/* セクション見出し */
.sharoushi-section-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid #1E88E5;
}

/* メリットグリッド */
.sharoushi-merits-section {
  margin-bottom: 48px;
}

.sharoushi-merits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.merit-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px 30px;
  box-shadow: 0 2px 16px rgba(21, 101, 192, 0.10);
  border-top: 4px solid #1E88E5;
  position: relative;
}

.merit-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.merit-num {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  background: #1E88E5;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.merit-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1565C0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.merit-card p {
  font-size: 0.87rem;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

/* プロフィールグループ */
.sharoushi-profiles-section {
  margin-top: 8px;
}

.sharoushi-group {
  margin-bottom: 48px;
}

.sharoushi-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.sharoushi-title-icon {
  font-size: 1.3rem;
}

.sharoushi-doctor {
  background: linear-gradient(90deg, #1565C0, #1E88E5);
}

.sharoushi-hnurse {
  background: linear-gradient(90deg, #00695C, #00897B);
}

.sharoushi-nurse {
  background: linear-gradient(90deg, #6A1B9A, #9C27B0);
}

.sharoushi-loading,
.sharoushi-empty {
  padding: 32px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

/* 特設ページ コンパクトグリッド */
.sharoushi-group .results-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}

/* コンパクトカード */
.sharoushi-person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 12px 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  gap: 8px;
}

.sharoushi-person-card:hover {
  box-shadow: 0 4px 16px rgba(30, 136, 229, 0.15);
  transform: translateY(-2px);
}

.sharoushi-person-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}



.sharoushi-person-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.sharoushi-person-area {
  font-size: 0.75rem;
  color: #64748b;
}

/* モバイル対応 */
@media (max-width: 600px) {
  .sharoushi-hero {
    padding: 32px 16px;
  }

  .sharoushi-hero-title {
    font-size: 1.2rem;
  }

  .sharoushi-merits-grid {
    grid-template-columns: 1fr;
  }

  .sharoushi-group-title {
    font-size: 0.9rem;
    padding: 10px 14px;
  }

  .top-nav .dropdown-menu {
    min-width: 160px;
  }

  .sharoushi-group .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
  }

  .sharoushi-person-img {
    width: 56px;
    height: 56px;
  }

  .sharoushi-person-name {
    font-size: 0.78rem;
  }
}

/* ============================================================
   共有モーダル（プロフィールURL共有 + QRコード）
   ============================================================ */

.share-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.share-modal-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  animation: shareModalIn 0.2s ease;
}

@keyframes shareModalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.share-modal-header {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.share-modal-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.share-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.share-modal-close:hover { color: #fff; }

.share-modal-body {
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* QRコード表示エリア */
.share-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.share-qr-container {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.share-qr-container canvas,
.share-qr-container img {
  display: block;
}

.share-qr-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* URL入力 + コピーボタン */
.share-url-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.share-url-input {
  flex: 1;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #334155;
  background: #f8fafc;
  min-width: 0;
  cursor: text;
}

.share-copy-btn {
  flex-shrink: 0;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.share-copy-btn:hover { background: #1e40af; }
.share-copy-btn.copied { background: #16a34a; }

/* 共有ボタン（詳細フッター内） */
.share-profile-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  box-shadow: 0 3px 12px rgba(79, 70, 229, 0.35);
  transition: filter 0.15s, transform 0.12s, box-shadow 0.15s;
}
.share-profile-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.4);
}
.share-btn-icon { font-size: 1.1rem; flex-shrink: 0; }
.share-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.share-btn-main { font-size: 0.88rem; }
.share-btn-sub  { font-size: 0.7rem; opacity: 0.85; font-weight: 500; }

.share-loading {
  font-size: 0.82rem;
  color: #94a3b8;
}
.share-error {
  font-size: 0.82rem;
  color: #ef4444;
  text-align: center;
  padding: 8px;
}

