@charset "UTF-8";

/* =========================================================================
   受講者マイページ 共通スタイル

   旧システムは template/pc/ と template/sp/ に同じ画面を2つ持っていたが、
   ここでは1枚のCSSで両方に対応する（モバイルファースト）。
   ブレークポイントは 768px の1点のみ。旧のUA判定による出し分けは廃止した。

   配色は旧システムを踏襲:
     #2e82be 見出しの青   #f9bc05 アクセントの黄   #fc8c04 ボタンの橙
   ========================================================================= */

:root {
  --blue: #2e82be;
  --blue-dark: #1465c0;
  --yellow: #f9bc05;
  --orange: #fc8c04;
  --red: #d00e0e;
  --text: #333;
  --muted: #777;
  --line: #e2e2e2;
  --bg: #f2f4f6;
  --radius: 4px;
  --sidebar-w: 220px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
               "Noto Sans JP", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ ヘッダ */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--yellow);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  margin: 0;
  line-height: 1.3;
}
.site-header__title small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }

/* ハンバーガー（狭い画面のみ表示） */
.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px; height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; margin: 0 9px; background: var(--blue); }

/* ------------------------------------------------------------------ 骨格 */
.layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}

/* サイドバー：狭い画面では隠し、トグルで開く */
.sidebar {
  display: none;
  margin-bottom: 16px;
}
.sidebar.is-open { display: block; }

/* ------------------------------------------------------------- プロフィール */
.profile-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  color: var(--text);
  position: relative;
}
.profile-card:hover { text-decoration: none; box-shadow: 0 1px 4px rgb(0 0 0 / 12%); }
.profile-card dl { margin: 0; font-size: 12px; }
.profile-card dt { color: var(--muted); font-size: 11px; margin-top: 8px; }
.profile-card dt:first-child { margin-top: 0; }
.profile-card dd { margin: 0; font-weight: 600; word-break: break-all; }
.profile-card__edit {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 11px; text-decoration: underline; color: var(--blue-dark);
}
.profile-card__alert { color: var(--red); font-weight: 700; }

/* --------------------------------------------------------------- ナビゲーション */
.nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nav a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
}
.nav a:last-child { border-bottom: 0; }
.nav a:hover { background: #fafafa; text-decoration: none; }
.nav a.is-current {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

/* ------------------------------------------------------------------ 本文 */
.page-title { font-size: 20px; font-weight: 800; color: var(--blue); margin: 0 0 6px; }
.page-lead { font-size: 13px; color: var(--muted); margin: 0 0 16px; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------- ステップ表示 */
.steps { display: flex; margin: 0 0 20px; padding: 0; list-style: none; font-size: 12px; }
.steps li {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  background: #eef1f4;
  color: var(--muted);
  border-right: 2px solid #fff;
}
.steps li:last-child { border-right: 0; }
.steps li.is-current { background: var(--yellow); color: #333; font-weight: 700; }
.steps li.is-done { background: #cfe2f0; color: var(--blue-dark); }

/* ------------------------------------------------------------------ フォーム */
.field { margin-bottom: 18px; }
.field__label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field__label .req {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: var(--red); color: #fff; font-size: 10px; border-radius: 2px; font-weight: 700;
  vertical-align: 2px;
}
.field__label .opt {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: #999; color: #fff; font-size: 10px; border-radius: 2px; font-weight: 700;
  vertical-align: 2px;
}
.field__note { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

input[type="text"], input[type="tel"], input[type="email"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px; /* iOS で拡大されないよう 16px 以上にする */
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid #c8ccd0;
  border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(46 130 190 / 18%);
}
input.is-invalid, select.is-invalid { border-color: var(--red); background: #fff6f6; }

/* 横に並べる入力（姓名・郵便番号など）。どの画面幅でも横並びを維持する。
   flex-basis は 0 のままにすること。50% などを与えると、2つ分の 50% と gap の
   合計が親幅を超えるため折り返して縦積みになる（flex は縮小より先に改行を
   決める仕様）。以前 768px 以上で .field__row--half に 1 1 50% を当てており、
   PC幅でだけ姓名が縦に並んでいた。 */
.field__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field__row > input, .field__row > select { flex: 1 1 0; min-width: 0; }
.field__row .sep { flex: 0 0 auto; color: var(--muted); }

/* 生年月日のような3分割 */
.field__row--thirds > select { flex: 1 1 30%; }

/* ラジオをボタン風に */
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.choice label {
  flex: 0 0 auto;
  min-width: 96px;
  text-align: center;
  padding: 10px 16px;
  border: 1px solid #c8ccd0;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.choice input[type="radio"]:checked + label {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
}
.choice input[type="radio"]:focus-visible + label { box-shadow: 0 0 0 3px rgb(46 130 190 / 18%); }

/* 自動投稿よけの隠し欄（問い合わせフォーム）。
   display:none だと埋めないボットがいるため、画面外へ追い出して隠す。
   スクリーンリーダーには aria-hidden と tabindex="-1" で伝えている。 */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* エラー */
.error-text { display: block; color: var(--red); font-size: 13px; margin-top: 5px; font-weight: 600; }
.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}
.alert--error { background: #fdecec; border: 1px solid #f3b6b6; color: #a11; }
.alert--success { background: #eaf6ec; border: 1px solid #b6dcbe; color: #1c6b2c; }
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }

/* ------------------------------------------------------------------ ボタン */
.actions { display: flex; gap: 10px; flex-direction: column; margin-top: 24px; }
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { text-decoration: none; opacity: .88; }
.btn--primary { background: var(--orange); color: #fff; }
.btn--secondary { background: #fff; color: var(--text); border: 1px solid #c8ccd0; }
.btn--sub {
  width: auto; padding: 9px 14px; font-size: 13px;
  background: var(--blue); color: #fff; white-space: nowrap;
}

/* ------------------------------------------------------- 確認画面の定義リスト */
.review { border-top: 1px solid var(--line); margin: 0; }
.review > div { border-bottom: 1px solid var(--line); padding: 12px 2px; }
.review dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.review dd { margin: 2px 0 0; font-size: 15px; word-break: break-all; }
.review dd:empty::after { content: "（未入力）"; color: var(--muted); font-size: 13px; }

/* --------------------------------------------------- 保育園名のサジェスト */
.suggest { position: relative; }
.suggest__list {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%;
  background: #fff; border: 1px solid var(--yellow);
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 260px; overflow-y: auto;
  box-shadow: 0 4px 10px rgb(0 0 0 / 12%);
}
.suggest__list:empty { display: none; }
.suggest__list button {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; font-size: 13px; line-height: 1.5;
  background: #fff; border: 0; border-top: 1px solid #f3e3b4; cursor: pointer;
  font-family: inherit;
}
.suggest__list button:first-child { border-top: 0; }
.suggest__list button:hover { background: #fff8e4; }

/* ------------------------------------------------------------------ バッジ */
.badge {
  display: inline-block;
  padding: 3px 8px;
  margin-right: 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  vertical-align: 2px;
  white-space: nowrap;
}
.badge--ok { background: #4caf50; }
.badge--alert { background: #da3e50; }
.badge--muted { background: #9aa0a6; }

/* --------------------------------------------------------------- 研修カード */
.training { position: relative; }
.training__head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.training__name { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.5; }
.training__period { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.training__detail { margin-top: 12px; }

/* カード全体がリンクになる場合 */
a.training--link { display: block; color: var(--text); }
a.training--link:hover { text-decoration: none; box-shadow: 0 2px 8px rgb(0 0 0 / 12%); border-color: #c8d6e0; }
.training--disabled { background: #f6f7f8; color: var(--muted); }
.training--disabled .training__name { color: var(--muted); }
.training__note { color: var(--red); font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.training--disabled .training__note { color: #8a6d3b; }

/* 申込期限・定員などの項目 */
.meta { margin: 0; font-size: 13px; }
.meta > div { display: flex; gap: 10px; padding: 3px 0; }
.meta dt { flex: 0 0 5.5em; color: var(--muted); }
.meta dd { margin: 0; }
.meta__full {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: var(--red); color: #fff; font-size: 10px; border-radius: 2px; font-weight: 700;
}

/* ------------------------------------------------------------- お知らせ */
.notice { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.notice:last-child { border-bottom: 0; }
.notice__head { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.notice__date {
  display: inline-block;
  background: var(--yellow);
  color: #4a3a00;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: 1px;
}
.notice__body { font-size: 13px; margin-top: 6px; word-break: break-word; }
.notice__body a { text-decoration: underline; }
.notice__empty { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0; }

/* 旧システムの toggle 指定：本文を折りたたんで表示する */
.notice--folded .notice__body {
  max-height: 6.5em;
  overflow-y: auto;
  border-left: 3px solid var(--line);
  padding-left: 10px;
}

/* ---------------------------------------------------------- オンライン研修 */
.zoom { background: #fbfcfd; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.zoom__title { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.zoom__items { margin: 0; }
.zoom__items > div { padding: 8px 0; border-top: 1px solid var(--line); }
.zoom__items > div:first-child { border-top: 0; }
.zoom__items dt { font-size: 11px; color: var(--muted); font-weight: 600; }
.zoom__items dd { margin: 2px 0 0; font-size: 14px; word-break: break-all; }
.zoom__hint { margin-top: 12px; font-size: 13px; }
.zoom__hint summary { cursor: pointer; font-weight: 700; color: var(--blue-dark); }
.zoom__hint > p { margin: 8px 0 0; }
.zoom__format { background: #fff6da; border: 1px dashed var(--yellow); padding: 8px 10px; font-weight: 700; }
.zoom__example { color: var(--muted); }

/* ------------------------------------------------- 申込画面（日程選択） */
.course {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 18px;
}
.course:last-of-type { margin-bottom: 0; }

/* 表は狭い画面では横スクロールさせる（本文は縦スクロールさせない） */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.schedule-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.schedule-table th,
.schedule-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.schedule-table thead th { background: #eef2f5; font-size: 12px; white-space: nowrap; }
.schedule-table td small { color: var(--muted); }
.schedule-table .nowrap { white-space: nowrap; }

.course__privacy { margin: 16px 0; line-height: 1.7; }
.course__done { margin: 14px 0 0; }

.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  background: #fff8e4;
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
}
.agree input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; }

.alert--notice ul { margin: 8px 0 0; padding-left: 20px; }
.alert--notice li { margin: 3px 0; }
.zoom__hint ul { margin: 8px 0 0; padding-left: 20px; }
.zoom__hint li { margin: 4px 0; }

/* --------------------------------------------------------- アンケート */
.qblock { border: 0; border-top: 2px solid var(--line); padding: 20px 0 4px; margin: 0; }
.qblock:first-of-type { border-top: 0; padding-top: 0; }
.qblock__title { font-size: 15px; font-weight: 700; line-height: 1.6; padding: 0; margin-bottom: 10px; }
.qblock__note { font-size: 12px; color: var(--muted); margin: 0 0 12px; line-height: 1.7; }
.qblock__other { margin-top: 10px; }
.text-alert { color: var(--red); }

/* 選択肢を縦に積む（選択肢が長文になるため） */
.choice--stack { flex-direction: column; align-items: stretch; gap: 6px; }
.choice--stack label { min-width: 0; text-align: left; padding: 11px 14px; }
.choice input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.choice input[type="checkbox"]:checked + label {
  background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700;
}
.choice input[type="checkbox"]:disabled + label { opacity: .45; cursor: not-allowed; }
.choice input[type="checkbox"]:focus-visible + label,
.choice input[type="radio"]:focus-visible + label { box-shadow: 0 0 0 3px rgb(46 130 190 / 18%); }

/* 評価表（縦軸=設問／横軸=尺度） */
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: 8px 6px; text-align: center; }
.matrix thead th { background: #eef2f5; font-size: 12px; line-height: 1.4; }
.matrix tbody th[scope="row"] { text-align: left; background: #fafbfc; font-weight: 600; min-width: 11em; }
.matrix tr.is-invalid-row th[scope="row"] { background: #fff1f1; color: var(--red); }
.matrix__cell { display: block; padding: 6px 0; cursor: pointer; }
.matrix__cell input[type="radio"] { width: 20px; height: 20px; }
/* 尺度のラベルは見出し行にあるため、セル内は読み上げ用にのみ持たせる */
.matrix__sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- レポート */
.report__guide { font-size: 14px; margin: 0 0 18px; line-height: 1.8; }
.report__guide strong { color: var(--red); }
.report__readonly {
  white-space: pre-wrap;
  word-break: break-word;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
  line-height: 1.9;
}
textarea { min-height: 16em; line-height: 1.8; resize: vertical; }

/* ------------------------------------------------------------- 証明書 */
.certificate__number { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.certificate__number code {
  font-size: 15px; color: var(--text); font-weight: 700;
  background: #f2f4f6; padding: 3px 8px; border-radius: 2px;
}
.meta code { background: #f2f4f6; padding: 2px 6px; border-radius: 2px; font-size: 13px; }

.alert--notice { background: #eef4fa; border: 1px solid #c3d9ea; color: #234; font-weight: 400; }
.badge--approved { background: var(--blue); }

.back-link { margin: 20px 0 0; font-size: 13px; }

/* ------------------------------------------------------------- 空の状態 */
.empty-state { text-align: center; color: var(--muted); }
.empty-state p { margin: 6px 0; }

/* ------------------------------------------------------------------ フッタ */
.site-footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 24px 16px 40px;
}

/* =========================================================================
   768px 以上：サイドバーを常時表示し、2カラムにする
   ここが旧 template/pc と template/sp を1つに統合している唯一の分岐点
   ========================================================================= */
@media (min-width: 768px) {
  body { font-size: 14px; }

  .site-header { padding: 14px 24px; }
  .site-header__title { font-size: 17px; }
  .nav-toggle { display: none; }

  .layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: 24px;
    padding: 24px 16px;
    align-items: start;
  }

  .sidebar { display: block; margin-bottom: 0; }

  .page-title { font-size: 22px; }
  .panel { padding: 24px; }

  /* row-reverse なので主軸は右→左。flex-end は「左端」を指してしまうため、
     中央寄せには center を使う。並びは HTML の逆になり、主ボタンが右に来る。 */
  .actions { flex-direction: row-reverse; justify-content: center; }
  .btn { width: auto; min-width: 220px; }

  .review { display: grid; grid-template-columns: 200px 1fr; border-top: 0; }
  .review > div { display: contents; }
  .review dt {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px; background: #fafbfc; font-size: 13px;
  }
  .review dd { border-bottom: 1px solid var(--line); padding: 14px 12px; margin: 0; }

  /* 研修カード：詳細ボタンを右上に寄せる（狭い画面では見出しの下に置く） */
  .training__head { padding-right: 150px; }
  .training__detail { position: absolute; top: 24px; right: 24px; margin-top: 0; }

  /* Zoom情報：ラベルと値を横並びにする */
  .zoom__items > div { display: grid; grid-template-columns: 170px 1fr; align-items: baseline; gap: 12px; }
  .zoom__items dt { padding-top: 2px; }
}
