/* ============================================================
   医療機関を探す（検索・詳細）用スタイル
   共通の site.css の変数・部品を前提にしています
   ============================================================ */

/* ---- 検索パネル（ページ上部） ---- */
.search-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 26px 28px; box-shadow: 0 14px 30px -22px rgba(60,40,20,0.35); margin-bottom: 28px; }
.search-panel h2 { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.search-keyword { display: flex; gap: 10px; }
.search-keyword input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; font-size: 16px; font-family: inherit; color: var(--text); background: var(--bg); border: 1.5px solid var(--border); border-radius: 14px; }
.search-keyword input:focus, .search-filters select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.search-keyword button { height: 52px; padding: 0 28px; border: none; border-radius: 14px; background: var(--coral); color: #fff; font-size: 15.5px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; }
.search-keyword button:hover { filter: brightness(1.05); }

.search-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.search-filters label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--text-soft); }
.search-filters select { width: 100%; min-width: 0; height: 46px; padding: 0 12px; font-size: 15px; font-family: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; }
.search-filters select:disabled { background: var(--bg-soft); color: var(--text-soft); }

.search-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 16px; }
.search-extra .check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.search-extra .check input { width: 18px; height: 18px; accent-color: var(--teal); }
.search-clear { margin-left: auto; padding: 8px 16px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer; }
.search-clear:hover { color: var(--coral); border-color: var(--coral); }

.quick-depts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.quick-depts .lead { font-size: 12.5px; font-weight: 700; color: var(--text-soft); margin-right: 4px; }
.chip { padding: 7px 15px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 500; font-family: inherit; cursor: pointer; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 700; }

/* ---- 検索結果 ---- */
.result-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.result-count { font-size: 15px; color: var(--text-soft); }
.result-count strong { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 24px; color: var(--coral); margin: 0 3px; }
.result-note { font-size: 12.5px; color: var(--text-soft); }

.clinic-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.clinic-card { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.clinic-card .c-name { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 18.5px; font-weight: 700; line-height: 1.45; }
.clinic-card .c-name a { color: var(--text); }
.clinic-card .c-name a:hover { color: var(--coral); }
.clinic-card .c-full { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--teal-tint); color: oklch(36% 0.07 195); font-size: 12.5px; font-weight: 500; }
.tag.inpatient { background: var(--coral-tint); color: oklch(42% 0.11 40); font-weight: 700; }
.c-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-soft); line-height: 1.6; }
.c-meta .row { display: flex; gap: 8px; }
.c-meta svg { flex-shrink: 0; margin-top: 3px; }
.c-meta a.tel { color: var(--text); font-weight: 700; font-size: 15.5px; letter-spacing: .02em; }
.c-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.c-foot .more { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 13.5px; font-weight: 700; }
.c-foot .more:hover { color: #fff; filter: brightness(1.08); }
.c-foot .site { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---- 診療時間の表（一覧の小さい表・詳細の表で共通） ---- */
.hours { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; text-align: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.hours th, .hours td { padding: 6px 2px; border-bottom: 1px solid var(--border); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: none; }
.hours thead th { background: var(--bg-soft); font-weight: 700; color: var(--text); }
.hours thead th:first-child { width: 46px; }
.hours tbody th { background: var(--bg-soft); font-weight: 700; color: var(--text-soft); font-size: 12px; }
.hours td { color: var(--teal); font-weight: 700; }
.hours td.off { color: var(--border); font-weight: 400; }
.hours td.cond { color: var(--coral); }
.hours td small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-soft); line-height: 1.3; }
.hours .sat { color: oklch(48% 0.12 250); }
.hours .sun { color: var(--alert); }
.hours.large { font-size: 15px; }
.hours.large th, .hours.large td { padding: 12px 4px; }
.hours.large thead th:first-child { width: 132px; }
.hours.large tbody th { font-size: 13px; line-height: 1.5; white-space: nowrap; }
.hours-none { font-size: 13px; color: var(--text-soft); padding: 10px 14px; background: var(--bg-soft); border-radius: 10px; }

.empty { padding: 44px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: 18px; color: var(--text-soft); font-size: 15px; line-height: 2; }

/* ---- 詳細ページ ---- */
.detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; }
.detail-head h2 { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 26px; font-weight: 700; line-height: 1.45; }
.detail-head .kana { font-size: 12.5px; color: var(--text-soft); letter-spacing: .08em; margin-bottom: 2px; }
.detail-head .full { font-size: 13.5px; color: var(--text-soft); margin-top: 4px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-actions a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 14px; font-size: 14.5px; font-weight: 700; }
.detail-actions a.call { background: var(--coral); color: #fff; }
.detail-actions a.web { background: var(--surface); color: var(--teal); border: 1.5px solid var(--teal); }
.detail-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: start; }
.detail-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.detail-table tr { border-bottom: 1px solid var(--border); }
.detail-table tr:last-child { border-bottom: none; }
.detail-table th { width: 132px; padding: 15px 18px; background: var(--bg-soft); text-align: left; vertical-align: top; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.detail-table td { padding: 15px 18px; font-size: 14.5px; line-height: 1.85; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.detail-table td.note { white-space: normal; color: var(--text-soft); }
.detail-table td.note ul { margin: 4px 0 10px; padding-left: 1.3em; }
.detail-side h3 { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 16.5px; font-weight: 700; margin: 0 0 12px; padding-left: 12px; border-left: 4px solid var(--coral); }
.detail-side .block + .block { margin-top: 26px; }
.hours-note { font-size: 13px; color: var(--text-soft); line-height: 1.8; margin-top: 10px; white-space: pre-line; }
.map-frame { width: 100%; aspect-ratio: 4/3; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--bg-soft); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-link { display: inline-block; margin-top: 8px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.detail-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14.5px; font-weight: 700; }
.updated { font-size: 12.5px; color: var(--text-soft); }

@media (max-width: 900px) {
  .search-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clinic-list { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .search-panel { padding: 20px 18px; border-radius: 16px; }
  .search-keyword { flex-direction: column; }
  .search-keyword input { flex: none; width: 100%; font-size: 15px; }
  .search-keyword button { width: 100%; }
  .search-clear { margin-left: 0; }
  .clinic-card { padding: 18px; }
  .detail-head h2 { font-size: 21px; }
  .detail-actions { width: 100%; }
  .detail-actions a { flex: 1; justify-content: center; }
  .detail-table, .detail-table tbody, .detail-table tr, .detail-table th, .detail-table td { display: block; width: 100%; }
  .detail-table th { padding: 10px 16px 0; background: none; color: var(--text-soft); font-size: 12.5px; }
  .detail-table td { padding: 2px 16px 12px; }
  .hours.large thead th:first-child { width: 96px; }
  .hours.large tbody th { font-size: 11.5px; }
}

/* 特定健診実施医療機関 */
.tokutei-block { margin-top: 36px; }
.tokutei-block > h3 { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 19px; border-left: 4px solid var(--coral); padding-left: 10px; margin: 0 0 14px; }
.tokutei-block h4 { font-size: 15px; margin: 22px 0 8px; color: var(--teal); }
.tokutei-table th { width: 220px; }
.tk-town { font-size: 15px; margin: 20px 0 6px; color: var(--teal); }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; }
.tk-list li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.tk-list a { font-weight: 700; }
.tk-list small { display: block; color: var(--text-soft); font-size: 12.5px; }

.tk-tablewrap { overflow-x: auto; }
.tk-grid-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; text-align: center; }
.tk-grid-table th, .tk-grid-table td { padding: 9px 10px; border: 1px solid var(--border); }
.tk-grid-table thead th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
.tk-grid-table tbody th { background: var(--bg-soft); text-align: left; white-space: nowrap; font-weight: 700; }

.detail-main { min-width: 0; }
.clinic-photo { margin: 20px 0 0; max-width: 280px; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--border, #e5e0d8); }
.clinic-photo img { display: block; width: 100%; height: auto; }
