@charset "utf-8";
/* ============================================================
   theme.css — A案（現行サイトのデザインを踏襲）。2026-09-14 に先方が採用を決定し1本化した
   現行は WordPress テーマ Lightning Pro（Bootstrap 3 ベース）。
   キーカラー #02158c、アクセント #337ab7、海と空の写真という
   現行の性格をそのまま引き継ぐ。原稿・HTMLは1組だけ。
   ============================================================ */

:root {
  --key: #02158c;
  --key-dark: #02127a;
  --accent: #337ab7;
  --accent-dark: #2a6496;
  --text: #333;
  --muted: #6b6b6b;
  --line: #e0e3e8;
  --bg: #fff;
  --bg-alt: #f4f7fa;
  --radius: 4px;
  --wrap: 1170px;
  --gutter: 1.25rem;
  --font: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
          "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
}

body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline-color: var(--accent); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================ ヘッダー ============================ */

.site-header {
  border-top: 4px solid var(--key);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "logo toggle" "contact contact" "nav nav";
  align-items: center;
  gap: .35rem 1rem;
  padding-block: .75rem;
}

.site-logo { grid-area: logo; line-height: 1; font-size: inherit; }
.site-logo a { display: inline-block; }
.site-logo img { width: auto; height: 34px; }

/* スマホでも電話番号は出す。眼科は「電話をかける」が主な導線なので隠さない */
.header-contact {
  grid-area: contact;
  padding-top: .15rem;
  border-top: 1px solid var(--line);
}
.header-contact .header-tel__label { display: inline; margin-right: .5em; }
.header-contact .header-tel__num { display: inline; font-size: 1.2rem; }

.header-tel { text-decoration: none; color: var(--key); display: block; }
.header-tel__label {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.header-tel__num {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
}
.header-hours { font-size: .78rem; color: var(--muted); }

/* ハンバーガー */
.nav-toggle {
  grid-area: toggle;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: .4rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--key);
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  /* 上下の線は ::before/::after で ±7px に置いているので、その分の余白を取る。
     取らないと上の線がボタンの枠に付き、下の線が「メニュー」の文字に重なる */
  margin-block: 7px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle__text { font-size: .62rem; letter-spacing: .06em; }

/* ナビ */
.gnav { grid-area: nav; }
.gnav__list { display: none; }
body.is-nav-open .gnav__list {
  display: block;
  border-top: 1px solid var(--line);
  margin-top: .5rem;
}
.gnav__link {
  display: block;
  padding: .85em .25em;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-size: .95rem;
}
.gnav__link:hover { color: var(--key); background: var(--bg-alt); }
.gnav__link[aria-current="page"] {
  color: var(--key);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--key);
  padding-left: .75em;
}

@media (min-width: 900px) {
  .header-inner {
    grid-template-columns: auto 1fr;
    grid-template-areas: "logo contact" "nav nav";
    padding-block: 1rem;
  }
  .site-logo img { height: 44px; }
  .header-contact {
    justify-self: end;
    text-align: right;
    padding-top: 0;
    border-top: 0;
  }
  .header-contact .header-tel__label { display: block; margin-right: 0; }
  .header-contact .header-tel__num { display: block; font-size: 1.4rem; }
  .nav-toggle { display: none; }
  .gnav__list {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    border-top: 1px solid var(--line);
    margin-top: .75rem;
  }
  .gnav__item { flex: 0 0 auto; }
  .gnav__link {
    border-bottom: 0;
    padding: .9em 1.15em;
    font-size: .95rem;
    /* 項目の途中で折り返すと崩れる。幅が足りないときは項目単位で2段に流す */
    white-space: nowrap;
  }
  .gnav__link[aria-current="page"] {
    box-shadow: inset 0 -3px 0 var(--key);
    padding-left: 1.15em;
  }
}

/* ============================ ヒーロー ============================ */

.hero__media img {
  display: block;
  width: 100%;
  /* 写真は現行サイトと同じ sea3.jpg（1900×300・2026-10-05 本人の指定で差し替え）。
     画像は1週間キャッシュされる（firebase.json）ため、差し替えるときはファイル名を変えること。
     幅700px以上では元の縦横比のまま、スマホでは細くなりすぎないよう高さ110pxを確保して左右を切る。
     1900pxより広い画面では高さ300pxで止める。 */
  height: clamp(110px, 15.8vw, 300px);
  object-fit: cover;
  object-position: center;
}

/* A案は現行サイトに合わせ、写真の上・下に医院名やボタンを置かない。
   医院名はヘッダーのロゴ（h1）、電話番号はヘッダーとフッターにあるため重複になる
   （2026-10-05 本人確認：文字を重ねる案は不採用。写真だけにする）。
   マークアップはB案と共通なのでCSSで落とす。 */
.hero__body { display: none; }

/* ボタン */
.btn {
  display: inline-block;
  padding: .8em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background-color .15s, color .15s;
}
.btn--primary { background: var(--key); border-color: var(--key-dark); color: #fff; }
.btn--primary:hover { background: var(--key-dark); color: #fff; }
.btn--ghost { border-color: var(--accent); color: var(--accent); background: #fff; }
.btn--ghost:hover { background: var(--accent); color: #fff; }

/* ======================= ページ見出し（下層） ======================= */

.page-head {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding-block: 1.5rem;
}
.page-head__title {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  color: var(--key);
  letter-spacing: .05em;
}
.page-head__sub { color: var(--muted); font-size: .9rem; }

.breadcrumb { margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4em; }
.breadcrumb li + li::before { content: "›"; margin-right: .4em; color: var(--line); }
.breadcrumb a { color: var(--muted); }

/* ============================ セクション ============================ */

/* order で並べ替えるため、間隔は gap で取る。
   `.block + .block` のような隣接セレクタはソース順に効いてしまい、
   並べ替えた先頭以外の要素で余白が消えるので使わない。 */
.sections {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  padding-block: 2.5rem 3rem;
}

/* A案はトップの並び順を現行に寄せる（ご案内 → お知らせ → 診療時間 → アクセス） */
.block-guide  { order: 1; }
.block-news   { order: 2; }
.block-hours  { order: 3; }
.block-access { order: 4; }

.block__title,
.block__subtitle,
.page-head__title {
  /* 狭い画面で「関す／る掲示」のように語の途中で折れにくくする（対応ブラウザのみ） */
  word-break: auto-phrase;
  text-wrap: balance;
}
.block__title {
  font-size: 1.2rem;
  color: var(--key);
  border-bottom: 2px solid var(--key);
  padding-bottom: .5rem;
  margin-bottom: 1.15rem;
  letter-spacing: .04em;
}
.block__subtitle {
  font-size: 1.02rem;
  color: var(--key-dark);
  margin: 1.75rem 0 .5rem;
  padding-left: .6em;
  border-left: 4px solid var(--accent);
}
.block p + p { margin-top: .85em; }
/* 1つのセクションに見出しを続けて置くページ（個人情報保護方針など）で、見出しが前の段落にくっつかないようにする */
.block > * + .block__title { margin-top: 2.25rem; }
.lead { font-size: 1.02rem; }
.note { font-size: .86rem; color: var(--muted); margin-top: .75em; }

.block__more { margin-top: 1.15rem; }
.link-more {
  display: inline-block;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.link-more::after { content: " ›"; }
.link-more:hover { text-decoration: underline; }

.bullet-list { margin: .5em 0; }
.bullet-list li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: .3em;
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .65em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================ 診療時間表 ============================ */

/* 表が画面幅に収まらないときだけ「横にスクロールできます」を出す */
.scroll-hint {
  display: none;
  margin-bottom: .5rem;
  font-size: .78rem;
  color: var(--muted);
}
.scroll-hint::before { content: "↔ "; }
@media (max-width: 700px) { .scroll-hint { display: block; } }

.hours-table {
  min-width: 620px;
  border: 1px solid var(--line);
  font-size: .92rem;
}
.hours-table th,
.hours-table td {
  border: 1px solid var(--line);
  padding: .7em .5em;
  text-align: center;
  vertical-align: middle;
}
.hours-table thead th {
  background: var(--key);
  color: #fff;
  font-weight: 700;
  width: 10%;
}
.hours-table__corner { background: var(--bg-alt); border: 1px solid var(--line); }
.hours-table tbody th {
  background: var(--bg-alt);
  text-align: left;
  white-space: nowrap;
  font-weight: 700;
  width: 24%;
}
.hours-table__time {
  display: block;
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
}
.hours-table .mark { font-size: 1.05rem; color: var(--key); }
.hours-table .is-surgery {
  background: #eef3fa;
  color: var(--key-dark);
  font-size: .86rem;
}
.hours-table .is-closed { background: var(--bg-alt); color: var(--muted); font-size: .86rem; }

/* ⚠️ このスマホ用の指定は、上の .hours-table th/td などの基本指定より後ろに置くこと。
   同じ詳しさの指定は後ろのものが勝つので、前に置くと padding や font-size が効かない。 */
@media (max-width: 560px) {
  /* スマホ幅（360〜430px）でも7曜日ぶんが横スクロールなしで全部見えるようにする。
     以前は min-width:500px のため、375px幅では月〜木しか見えなかった。
     行見出しの時間は折り返してよいことにして、曜日の列を確保する。 */
  .hours-table { min-width: 300px; font-size: .78rem; }
  .hours-table th, .hours-table td { padding: .55em .1em; }
  .hours-table thead th { width: auto; font-size: .74rem; }
  .hours-table tbody th { width: 27%; padding-inline: .5em .3em; white-space: normal; }
  .hours-table__time { font-size: .68rem; line-height: 1.45; }
  .hours-table .mark { font-size: .95rem; }
  .hours-table .is-surgery, .hours-table .is-closed { font-size: .72rem; }
  /* 収まるので「横にスクロールできます」は出さない（極端に狭い画面だけ下で再表示） */
  .scroll-hint { display: none; }
}
@media (max-width: 340px) { .scroll-hint { display: block; } }

/* 表のすぐ下に出す第一木曜日の休診。注記の中で埋もれないよう、太字・濃い色にする */
.hours-first-thu {
  margin-top: .9rem;
  padding-left: 1em;
  text-indent: -1em;
  font-size: .92rem;
  font-weight: 700;
  color: var(--key-dark);
}
.hours-first-thu + .hours-notes { margin-top: .5rem; }
.hours-notes { margin-top: .9rem; font-size: .86rem; color: var(--muted); }
.hours-notes li { padding-left: 1em; text-indent: -1em; }
.hours-notes li + li { margin-top: .25em; }

/* ============================ お知らせ ============================ */

.news-list, .news-archive { border-top: 1px solid var(--line); }
.news-item { border-bottom: 1px solid var(--line); }
.news-item__inner { padding: .9rem .25rem; }
.news-item__date {
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
}
.news-item__title {
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.65;
  margin-top: .1rem;
}
.news-item__title a { color: var(--text); text-decoration: none; }
.news-item__title a:hover { color: var(--accent); text-decoration: underline; }
.news-item__text { margin-top: .5rem; font-size: .93rem; }
.news-item__badge {
  display: inline-block;
  margin-top: .35rem;
  padding: .1em .6em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .72rem;
  color: var(--muted);
}
.news-item__figure { margin-top: .9rem; }
.news-item__figure img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* base.css の max-width:100% を上書きしてしまわないよう min() で抑える */
  max-width: min(560px, 100%);
}
.news-item__figure figcaption {
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--muted);
}
.news-list__fallback { padding: 1rem .25rem; font-size: .93rem; color: var(--muted); }

/* 一覧ページは1件ずつ間隔を広めに */
.news-archive .news-item__inner { padding-block: 1.4rem; }

/* ============================ ご案内（4つ） ============================ */

.guide-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.guide-list__item a {
  display: block;
  height: 100%;
  padding: 1.1rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background-color .15s;
}
.guide-list__item a:hover { border-color: var(--accent); background: var(--bg-alt); }
.guide-list__label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--key);
}
/* アイコンは丸の上に白い線画を重ねる。
   ⚠️ 十字（特に赤十字）は赤十字標章法により使用禁止。病院マーク系は使わず、
   ベル・時計・地図ピン・建物で代替している。 */
.guide-list__label::before {
  content: "";
  display: block;
  width: 46px; height: 46px;
  margin: 0 auto .65rem;
  border-radius: 50%;
  background-color: var(--accent);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  transition: background-color .15s;
}
.guide-list__item a:hover .guide-list__label::before { background-color: var(--key); }

.guide-list__item[data-icon="bell"] .guide-list__label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5a5 5 0 0 0-5 5v3.2L5.4 14.6h13.2L17 11.7V8.5a5 5 0 0 0-5-5z'/%3E%3Cpath d='M9.8 17.3a2.3 2.3 0 0 0 4.4 0'/%3E%3C/svg%3E");
}
.guide-list__item[data-icon="clock"] .guide-list__label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.2'/%3E%3Cpath d='M12 7.4V12l3.4 2'/%3E%3C/svg%3E");
}
.guide-list__item[data-icon="pin"] .guide-list__label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21.2s6.4-6.3 6.4-11a6.4 6.4 0 1 0-12.8 0c0 4.7 6.4 11 6.4 11z'/%3E%3Ccircle cx='12' cy='10.2' r='2.3'/%3E%3C/svg%3E");
}
.guide-list__item[data-icon="building"] .guide-list__label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.2 20.5V5.4A1.4 1.4 0 0 1 6.6 4h10.8a1.4 1.4 0 0 1 1.4 1.4v15.1'/%3E%3Cpath d='M3.6 20.5h16.8'/%3E%3Cpath d='M9 8h1.6M13.4 8H15M9 11.6h1.6M13.4 11.6H15'/%3E%3Cpath d='M10.3 20.5v-4.2h3.4v4.2'/%3E%3C/svg%3E");
}
.guide-list__desc {
  display: block;
  margin-top: .3rem;
  font-size: .8rem;
  color: var(--muted);
}
@media (min-width: 760px) {
  .guide-list { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

/* ============================ アクセス ============================ */

.access-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) {
  .access-grid { grid-template-columns: 1fr minmax(260px, 380px); align-items: start; }
}
.access-grid__photo img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.access-grid__photo figcaption {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}

.def-list { display: grid; grid-template-columns: 1fr; }
.def-list dt {
  font-weight: 700;
  color: var(--key);
  font-size: .88rem;
  padding-top: .7em;
}
.def-list dd { padding-bottom: .7em; border-bottom: 1px dashed var(--line); }
@media (min-width: 560px) {
  .def-list { grid-template-columns: 6.5em 1fr; column-gap: 1rem; }
  .def-list dt { border-bottom: 1px dashed var(--line); padding-bottom: .7em; }
}

.route-grid { display: grid; gap: 1rem; }
@media (min-width: 620px) { .route-grid { grid-template-columns: 1fr 1fr; } }
.route-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.route-card__title { font-size: 1rem; color: var(--key); margin-bottom: .35rem; }

.map-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
@media (min-width: 760px) { .map-frame { aspect-ratio: 16 / 9; } }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ============================ 各種の表 ============================ */

.spec-table {
  /* 2列の表なのでスマホ幅にも収まる。無用な横スクロールを出さない */
  min-width: min(520px, 100%);
  border: 1px solid var(--line);
  font-size: .93rem;
}
.spec-table th,
.spec-table td { border: 1px solid var(--line); padding: .75em .9em; }
.spec-table thead th { background: var(--key); color: #fff; }
.spec-table tbody th {
  background: var(--bg-alt);
  white-space: nowrap;
  font-weight: 700;
  width: 34%;
}

/* 多焦点眼内レンズの価格表（製品名｜選定療養の費用）。2列なので横スクロールは出さず、
   狭い画面では折り返して収める */
.price-wrap { max-width: 36rem; }
.price-table { min-width: 0; margin-top: .9rem; }
.price-table tbody th { width: 52%; white-space: normal; }
.price-table td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-table thead th:last-child { text-align: right; }
.price-plus { margin-top: .7rem; }
.doc-date { text-align: right; }
/* 「FAX」と番号が別の行に分かれないようにする */
.nw { white-space: nowrap; }

/* ============================ フッター ============================ */

.site-footer {
  margin-top: 1rem;
  border-top: 4px solid var(--key);
  background: var(--bg-alt);
}
.footer-inner {
  display: grid;
  gap: 1.75rem;
  padding-block: 2.25rem;
}
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1.2fr .8fr 1fr; gap: 2rem; }
}

.footer-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--key);
  letter-spacing: .04em;
}
.footer-addr, .footer-hours { font-size: .88rem; margin-top: .4rem; }
.footer-tel { margin-top: .5rem; }
.footer-tel a {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--key);
  text-decoration: none;
}
.footer-fax { margin-left: .8em; font-size: .85rem; color: var(--muted); }
.footer-hours small { color: var(--muted); }

.footer-nav ul { display: grid; gap: .1rem; }
.footer-nav a {
  display: block;
  padding: .35em 0;
  font-size: .88rem;
  color: var(--text);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--key); text-decoration: underline; }
.footer-nav li + li { border-top: 1px dotted var(--line); }

.footer-banners { display: grid; gap: .75rem; align-content: start; }
.footer-banner img {
  width: 100%;
  max-width: min(300px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.footer-banner:hover img { border-color: var(--accent); }

.copyright {
  border-top: 1px solid var(--line);
  padding: 1.1rem var(--gutter);
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}
