@charset "utf-8";
/*
 * 予約ページ（D-73）。
 *
 * 想定する利用者は60代以上。装飾を足すのではなく引き算で作る。
 * 文字を大きく、押す場所を明確にし、迷う要素を減らす。
 *
 * 【禁止】広告・外部サービスのロゴ・クレジット表記を入れない（§3-2）。
 * 【禁止】日本語のWebフォントを読み込まない（D-75）。
 *         容量が大きく初回表示が遅れる。OS標準の書体で組む。
 * 【禁止】外部CDNを参照しない。転送すればそのまま動くこと。
 *
 * テーマカラー（--theme）は layout.php が settings から差し込む。
 * ここでは既定値だけ持たせ、値そのものは4つのプリセットに限定している（D-76）。
 */

:root {
  --theme: #0F4C3A;
  --theme-dark: #0A3527;
  --theme-tint: #E8F0EC;

  --bg: #FAF8F4;          /* 温かみのあるオフホワイト */
  --card: #FFFFFF;
  --line: #E3DDD1;
  --text: #1C1917;
  --muted: #57534E;
  --error: #A32B22;

  --radius: 10px;
  --page-max: 1120px;

  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "MS PMincho", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;          /* 本文16px以上 */
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--theme); }

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

.site-header {
  background: var(--theme);
  color: #fff;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 18px 20px;
}

.site-brand { min-width: 0; }

.site-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .04em;
}
/*
 * ロゴの表示上限（D-88）。
 *
 * 高さだけを詰めていると、正方形に近いロゴが高さで頭打ちになり
 * 極端に小さく見える（実機で判明）。上限を上げたうえで、
 * 横に長いロゴがはみ出さないよう max-width も併せて指定する。
 * アップロード時の縮小上限（Appearance の LOGO_MAX_WIDTH = 600）は変えない。
 */
.site-logo { display: block; max-height: 88px; max-width: 100%; width: auto; height: auto; }
.site-subtitle { margin: 4px 0 0; font-size: 15px; opacity: .92; }

/*
 * 電話番号は常に見える位置に置く（D-73）。
 * Webで詰まったときに電話へ切り替えられるようにするため。
 */
.header-tel {
  display: block;
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 2px solid rgba(255, 255, 255, .75);
  border-radius: var(--radius);
  color: #fff;
  text-align: center;
  text-decoration: none;
}
.header-tel:active { background: rgba(255, 255, 255, .16); }
.header-tel-label { display: block; font-size: 13px; opacity: .9; }
.header-tel-number { display: block; font-size: 21px; font-weight: 700; letter-spacing: .02em; }

/* ============================================================
   ページの骨格
   ============================================================ */

.page { max-width: var(--page-max); margin: 0 auto; padding: 28px 20px 64px; }

.layout { display: block; }
.layout-main { min-width: 0; }

.page-title { margin: 0 0 20px; font-size: 28px; line-height: 1.45; }
.lead { margin: 0 0 20px; color: var(--muted); }
.step { margin: 0 0 6px; font-size: 15px; color: var(--muted); letter-spacing: .04em; }

.empty {
  padding: 28px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.back-link { margin-top: 28px; }

/* ---- 注意・お知らせ ---- */

.alert { margin: 0 0 22px; padding: 16px 18px; border-radius: var(--radius); }
.alert-warning { background: #FDF3E3; border: 1px solid #E3C089; }
.alert-error { background: #FBEAE8; border: 1px solid #D9A9A3; color: var(--error); }

/* 相談内容を書かせないことの明示（D-07） */
.notice-block {
  margin: 0 0 26px;
  padding: 16px 18px;
  background: var(--theme-tint);
  border-left: 5px solid var(--theme);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 700;
}
.notice-block-sub { font-weight: 400; font-size: 15px; color: var(--muted); }

.notice-pending {
  margin: 22px 0;
  padding: 16px 18px;
  background: var(--theme-tint);
  border-left: 5px solid var(--theme);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ============================================================
   日時の選択
   ============================================================ */

.day-list, .slot-list { list-style: none; margin: 0; padding: 0; }

.day {
  margin-bottom: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.day-label {
  margin: 0 0 14px;
  font-size: 22px;          /* 日付見出し */
  font-weight: 700;
  line-height: 1.4;
}
.day.is-sunday .day-label { color: #B03A2E; }
.day.is-saturday .day-label { color: #1F5C8B; }

/*
 * 時間ボタン：スマホ3列 / PC6列（D-89）。
 *
 * grid だと、空き枠が列数に満たない日は左に寄り、余白が右側だけに残る。
 * この事業所は1日2〜3枠のことが多く、ほとんどの行が半端になる。
 * flex + justify-content: center で中央に寄せる。
 *
 * 列幅は grid のときと同じに保つ。変えると、枠が埋まっている日の
 * 見え方まで変わってしまう。gap が 10px なので、
 * 3列は隙間2つ分(20px)、6列は隙間5つ分(50px)を引く。
 */
.slot-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/*
 * 幅を持たせるのは <li>。フレックスアイテムは .slot-list の直接の子であり、
 * .slot（<a>）ではない。.slot に flex を書いても効かず、内容の幅になる。
 */
.slot-list > li { flex: 0 0 calc((100% - 20px) / 3); }   /* スマホ3列相当 */

.slot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 8px 6px;
  border: 2px solid var(--theme);
  border-radius: var(--radius);
  background: #fff;
  color: var(--theme);
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-decoration: none;
}
.slot:active { background: var(--theme); color: #fff; }

.more-days { margin: 22px 0 0; text-align: center; }
.more-days-note { display: block; margin-top: 8px; font-size: 15px; color: var(--muted); }

/* ============================================================
   案内（PCでは左カラム）
   ============================================================ */

.layout-side { margin-top: 28px; }

.side-card {
  margin-bottom: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.side-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--theme-tint);
  font-size: 18px;
}
.side-list { margin: 0; padding-left: 1.2em; }
.side-list li { margin-bottom: 10px; }
.side-list li:last-child { margin-bottom: 0; }

.side-hours { margin: 0 0 8px; }
.side-hours-days { display: block; font-size: 15px; color: var(--muted); }
.side-hours-time { display: block; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.side-note { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

/* ============================================================
   フォーム
   ============================================================ */

.chosen-slot {
  margin: 0 0 26px;
  padding: 18px;
  background: var(--card);
  border: 2px solid var(--theme);
  border-radius: var(--radius);
}
.chosen-slot-label { display: block; font-size: 15px; color: var(--muted); }
.chosen-slot strong { font-size: 22px; }
.chosen-slot-change { display: inline-block; margin-left: 12px; font-size: 16px; }

.field { margin-bottom: 24px; }
.field-label { display: block; margin-bottom: 8px; font-size: 17px; font-weight: 700; }

.badge-required {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--error);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  vertical-align: 2px;
}

/*
 * 入力欄の既定。type ごとに列挙せず、まとめて指定する。
 * 列挙方式だと type を増やしたときに漏れ、その欄だけ幅が違うことになる
 * （実際 password と number が漏れていた）。
 *
 * :where() で包むのは詳細度を0にするため。
 * 包まないと :not() の連なりで詳細度が高くなり、
 * 「ここだけ横に並べたい」といった個別指定が効かなくなる。
 */
:where(
  input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  width: 100%;
  padding: 14px;
  border: 1px solid #C9C2B4;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 17px;   /* 16px未満にするとiOSでフォーカス時に拡大される */
  line-height: 1.6;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--theme); outline-offset: 1px; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid #C9C2B4;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--theme); border-width: 2px; background: var(--theme-tint); }
.choice input { width: 22px; height: 22px; margin: 0; accent-color: var(--theme); }

.field-help { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.field-message { margin: 8px 0 0; color: var(--error); font-weight: 700; }
.field-error input, .field-error textarea { border-color: var(--error); }

/* ---- ボタン ---- */

.button {
  display: block;
  width: 100%;
  min-height: 60px;
  padding: 16px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { background: var(--theme); color: #fff; }
.button-primary:active { background: var(--theme-dark); }
.button-secondary { margin-top: 14px; background: #fff; border-color: #C9C2B4; color: var(--text); }
.button-outline {
  display: inline-block;
  width: auto;
  min-width: 260px;
  background: #fff;
  border-color: var(--theme);
  color: var(--theme);
}
.button-danger { background: var(--error); color: #fff; }
.button-xl { min-height: 72px; font-size: 21px; }

.confirm-actions { margin-top: 28px; }
.action-form { margin-top: 28px; }
.back-note { margin-top: 22px; font-size: 15px; color: var(--muted); }

/* ---- 確認・完了 ---- */

.summary {
  margin: 0;
  padding: 6px 20px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.summary dt { margin-top: 18px; font-size: 15px; color: var(--muted); }
.summary dd { margin: 2px 0 0; font-size: 18px; }

.done-slot, .result-message {
  margin: 0 0 6px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 19px;
}

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

.site-footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px 20px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.site-footer p { margin: 2px 0; }
.footer-name { font-family: var(--font-serif); font-size: 18px; color: var(--text); }

/* ============================================================
   画面が狭いとき（960px未満）
   ============================================================ */

@media (max-width: 959px) {
  .site-header-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .site-name { font-size: 24px; }
  .site-logo { max-height: 72px; }

  /* 電話ボタンは幅いっぱい */
  .header-tel { width: 100%; min-height: 56px; padding: 8px 14px; }

  .page { padding: 22px 16px 56px; }
  .page-title { font-size: 22px; }
  .day { padding: 14px; }
  .day-label { font-size: 20px; }
  .slot { font-size: 20px; }
  .button-outline { width: 100%; min-width: 0; }
}

/* ============================================================
   画面が広いとき（960px以上）：2カラム
   ============================================================ */

@media (min-width: 960px) {
  .layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  /* 案内は左、日時選択は右。読む順序は本文が先になるようDOMは本文が先 */
  .layout-side { grid-column: 1; grid-row: 1; margin-top: 0; }
  .layout-main { grid-column: 2; grid-row: 1; }

  .slot-list > li { flex: 0 0 calc((100% - 50px) / 6); }   /* PC6列相当 */
}

/* ============================================================
   プライバシーポリシー（D-83 / D-84）
   ============================================================ */

.layout-narrow { max-width: 720px; }

.policy {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.policy-heading {
  margin: 28px 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--theme-tint);
  font-size: 19px;
}
.policy-heading:first-child { margin-top: 0; }
.policy-paragraph { margin: 0 0 16px; overflow-wrap: break-word; }
.policy-paragraph:last-child { margin-bottom: 0; }

.footer-policy { margin-top: 12px; }

/* 申込ボタンの上の一文。チェックボックスは置かない（D-84） */
.consent-note {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--muted);
}
