/* =====================================================================
   応募フォーム スタイル
   方針: スマホ幅(375px)を基準に作り、min-width で広い画面へ拡張する。
   ・横はみ出し防止: すべての要素に min-width:0、長い文字は折り返す
   ・インラインstyleは使わない(CSPで禁止するため)。装飾はクラスで表現する
   ===================================================================== */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5b6770;
  --line: #d5dbe1;
  --line-strong: #aeb8c1;
  --primary: #1b5fa8;
  --primary-dark: #144a85;
  --primary-soft: #e8f1fb;
  --accent-blue: #1565c0;       /* 1行目(区分)の青 */
  --warn: #b45309;              /* 注意色(キャンセル待ち) */
  --warn-bg: #fff4e5;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --ok: #16794c;
  --ok-bg: #e7f6ee;
  --info-bg: #eaf2fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .05);
  --focus: 0 0 0 3px rgba(27, 95, 168, .35);
  --tap: 48px;                  /* タップしやすい最小の高さ */
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, "Yu Gothic", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;               /* iOSで入力時に拡大されない最小サイズ */
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

[hidden] { display: none !important; }

h1, h2, h3, p { margin: 0; }
a { color: var(--primary); }
code { background: #eef1f4; padding: 0 .3em; border-radius: 4px; font-size: .9em; }
img, svg, video { max-width: 100%; height: auto; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------------------------------------------------------------
   共通: ボタン
   --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: var(--tap); padding: .55em 1.1em;
  border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none;
  cursor: pointer; background: var(--surface); color: var(--text);
  transition: background-color .15s, border-color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled)   { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover:not(:disabled) { background: var(--primary-soft); }
.btn-ghost     { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled)     { background: #eef1f4; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled)    { background: #8f1c12; }
.btn-danger-text { color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.btn-sm { min-height: 40px; padding: .3em .8em; font-size: .9rem; }

/* ---------------------------------------------------------------
   共通: カード・見出し
   --------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin: 0 0 16px;
}
.card-title { font-size: 1.1rem; line-height: 1.4; margin-bottom: 12px; padding-left: 10px; border-left: 4px solid var(--primary); }

.notice { padding: 12px 14px; border-radius: var(--radius); border: 1px solid; margin: 0 0 12px; font-size: .95rem; }
.notice-error { background: var(--danger-bg); border-color: #f3b8b2; color: #7a1710; }
.notice-info  { background: var(--info-bg);   border-color: #bcd4ee; color: #12406f; }
.notice-ok    { background: var(--ok-bg);     border-color: #a8dbc2; color: #0f5c3a; }
.nojs { margin: 16px; }

.loading { text-align: center; color: var(--muted); padding: 40px 0; }
.hint { color: var(--muted); font-size: .88rem; line-height: 1.6; margin-top: 6px; }
.caution { color: var(--danger); font-size: .9rem; line-height: 1.6; margin-top: 10px; font-weight: 700; }

/* ---------------------------------------------------------------
   応募者向け画面
   --------------------------------------------------------------- */
.app { max-width: 640px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.site-header { padding: 20px 0 12px; }
.site-title { font-size: 1.35rem; line-height: 1.45; font-weight: 800; }
.main { min-height: 40vh; }
.site-footer { text-align: center; padding: 16px 0 0; font-size: .8rem; }
.site-footer a { color: var(--muted); }

.before-line { font-size: 1.15rem; font-weight: 800; line-height: 1.6; margin-bottom: 10px; color: var(--primary-dark); }

/* フォーム部品 */
.field { margin: 0 0 16px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; }
.label-text { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; font-weight: 700; margin-bottom: 6px; line-height: 1.5; }
.req { font-size: .72rem; font-weight: 700; color: #fff; background: var(--danger); border-radius: 4px; padding: 0 .5em; line-height: 1.6; }
.opt { font-size: .72rem; font-weight: 700; color: var(--muted); background: #eef1f4; border-radius: 4px; padding: 0 .5em; line-height: 1.6; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="number"], input[type="datetime-local"],
select, textarea {
  display: block; width: 100%; max-width: 100%;
  min-height: var(--tap); padding: .6em .8em;
  font: inherit; color: var(--text); background: #fff;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
input[readonly] { background: #f1f3f5; }
textarea { resize: vertical; min-height: 7em; line-height: 1.6; }
select {
  padding-right: 2.4em;
  background-image: linear-gradient(45deg, transparent 50%, #5b6770 50%), linear-gradient(135deg, #5b6770 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }
.field-error { color: var(--danger); font-size: .9rem; font-weight: 700; margin-top: 6px; line-height: 1.5; }

.check { display: flex; align-items: flex-start; gap: .7em; padding: 10px 0; cursor: pointer; line-height: 1.5; }
.check input { flex: 0 0 auto; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--primary); }

/* 参加者カード */
.participants { display: grid; gap: 12px; margin: 14px 0; }
.p-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fbfcfd; }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.p-title { font-size: 1rem; font-weight: 800; color: var(--primary-dark); }
.p-status { margin-top: 8px; }

/* 定員の表示(2行: 1行目=区分 / 2行目=キャンセル待ち受付中) */
.cap-board { display: grid; gap: 8px; margin: 12px 0; }
.cap-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 10px 12px; }
.cap-line1 { display: block; font-weight: 800; color: var(--accent-blue); line-height: 1.5; }
.cap-line2 {
  display: block; margin-top: 4px; padding-left: 10px;
  border-left: 5px solid var(--warn);
  font-weight: 800; color: var(--warn); line-height: 1.5;
}
.cap-line2.is-ok { border-left-color: var(--ok); color: var(--ok); }
.cap-item.is-wait { background: var(--warn-bg); border-color: #f0c98d; }

/* 参加者ごとのキャンセル待ち表示(選択肢の下) */
.badge-wait {
  display: block; padding: 6px 10px; border-left: 5px solid var(--warn);
  background: var(--warn-bg); color: var(--warn); font-weight: 800; font-size: .92rem; border-radius: 0 6px 6px 0;
}

/* コース説明 */
.course-info { display: grid; gap: 10px; margin: 12px 0; }
.course-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: #fff; }
.course-name { font-weight: 800; color: var(--accent-blue); }
.course-box .rich { font-size: .92rem; margin-top: 4px; }

.add-note { margin: 8px 0 10px; }
.submit-card { position: relative; }

/* 完了画面 */
.done { text-align: left; }
.done:focus { outline: none; }
.done-title { font-size: 1.3rem; line-height: 1.5; font-weight: 800; color: var(--ok); margin-bottom: 12px; }
.done-summary { display: grid; gap: 8px; margin-bottom: 14px; }
.done-line { display: grid; gap: 2px; padding: 8px 12px; border-radius: 8px; background: var(--ok-bg); border-left: 5px solid var(--ok); font-weight: 700; }
.done-line.is-wait { background: var(--warn-bg); border-left-color: var(--warn); color: var(--warn); }
.done-people { font-weight: 400; color: var(--text); font-size: .92rem; }

/* ---------------------------------------------------------------
   装飾つき文言(表示側・エディタ側で共通)
   インラインstyleではなくクラスで装飾する(許可リストで安全に扱うため)
   --------------------------------------------------------------- */
.rich { line-height: 1.8; }
.rich p, .rich div { margin: 0; }
.rich > * + * { margin-top: .4em; }
.rich:empty { display: none; }
.rich b, .rich strong { font-weight: 800; }
.rich .c-red  { color: #c62828; }
.rich .c-blue { color: #1565c0; }
.rich .c-mark { background: linear-gradient(transparent 0%, #fff176 0%); padding: 0 .1em; }
/* 空のとき、案内を出さないが、エディタ内では常に表示 */
.rt-area.rich:empty { display: block; }

/* ---------------------------------------------------------------
   管理画面
   --------------------------------------------------------------- */
body.is-admin { background: #eef1f4; }
body.is-admin .app { display: none; }

.admin { min-height: 100vh; }
.login { display: grid; place-items: start center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; }
.login-back { text-align: center; margin-top: 12px; font-size: .9rem; }

.admin-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 16px; background: #1f2d3d; color: #fff;
}
.admin-top-title { display: flex; align-items: center; gap: 10px; }
.admin-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-top .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.admin-top .btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.badge { display: inline-block; padding: 0 .7em; border-radius: 999px; font-size: .78rem; font-weight: 800; background: #ffe08a; color: #4a3400; line-height: 1.8; }
.badge.is-editor { background: #cfe3ff; color: #0f3a6d; }

.admin-body { max-width: 1100px; margin: 0 auto; padding: 12px 12px 0; }

/* メニュー: スマホ=3列×2段(横スクロールなし) */
.admin-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 58px; padding: 6px 4px; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; color: var(--text); font: inherit; font-size: .85rem; font-weight: 700; line-height: 1.3; text-align: center; cursor: pointer;
}
.nav-no { font-size: .72rem; color: var(--muted); font-weight: 700; }
.nav-btn[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.nav-btn[aria-selected="true"] .nav-no { color: #cfe3ff; }

.admin-content { padding-bottom: 110px; }   /* 固定の保存バーに隠れない余白 */
.panel-title { font-size: 1.25rem; line-height: 1.4; margin-bottom: 12px; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.form-card-title { font-size: 1.02rem; line-height: 1.4; margin-bottom: 10px; padding-left: 10px; border-left: 4px solid var(--primary); }
.panel > .hint { margin-bottom: 12px; }
.danger-card { border-color: #f0b4ae; background: #fffafa; }
.danger-card .form-card-title { border-left-color: var(--danger); }

.status-line { font-weight: 700; margin-bottom: 10px; line-height: 1.6; }
.status-line.is-ok { color: var(--ok); }
.status-line.is-warn { color: var(--warn); }
.status-line.is-error { color: var(--danger); }
.preview-line { font-weight: 700; color: var(--primary-dark); margin: 6px 0; }

.choice-group { display: grid; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: .7em; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: #fff; cursor: pointer; line-height: 1.5; }
.choice input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); }
.choice span { display: block; }
.choice small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

.inline-row { display: flex; gap: 8px; align-items: stretch; }
.inline-row input { flex: 1 1 auto; }
.inline-row .btn { flex: 0 0 auto; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* コース・追加項目カード */
.item-list { display: grid; gap: 12px; margin: 10px 0 14px; }
.item-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fbfcfd; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.item-title { font-size: .98rem; font-weight: 800; color: var(--primary-dark); }
.item-actions { display: flex; gap: 6px; }
.item-actions .btn { min-width: 44px; }

.details-card summary { cursor: pointer; font-weight: 800; line-height: 1.5; padding: 4px 0; }
.texts-other { display: grid; gap: 12px; margin-top: 12px; }
.text-item { margin-bottom: 18px; }
.text-item > .label-text { margin-bottom: 4px; }
.text-item .hint { margin: 0 0 6px; }

.mail-preview {
  margin: 12px 0 0; padding: 12px; background: #f7f9fb; border: 1px solid var(--line); border-radius: var(--radius);
  white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .92rem; line-height: 1.7;
}

/* リッチテキストエディタ */
.rt { border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: #fff; overflow: hidden; }
.rt:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.rt-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #f1f4f7; border-bottom: 1px solid var(--line); }
.rt-btn { min-height: 40px; padding: 0 .8em; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.rt-btn:hover { background: #eef1f4; }
.rt-btn-red  { color: #c62828; }
.rt-btn-blue { color: #1565c0; }
.rt-btn-mark { background: #fff9c4; }
.rt-area { min-height: 6.5em; padding: 10px 12px; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.rt-area:focus { outline: none; }

/* 保存バー: 常に画面下に固定 */
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.97); border-top: 1px solid var(--line-strong); box-shadow: 0 -2px 10px rgba(15,23,42,.1); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.savebar-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.save-status { min-height: 1.4em; font-size: .9rem; font-weight: 700; text-align: center; }
.save-status.is-dirty { color: var(--warn); }
.save-status.is-ok { color: var(--ok); }
.save-status.is-error { color: var(--danger); }
.savebar .btn { width: 100%; }

/* 応募管理 */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.sum-item { background: var(--primary-soft); border-radius: var(--radius); padding: 10px 6px; text-align: center; }
.sum-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); line-height: 1.3; }
.sum-label { display: block; font-size: .78rem; color: var(--muted); }
.sum-item.is-wait { background: var(--warn-bg); }
.sum-item.is-wait .sum-num { color: var(--warn); }

.apps-screen { max-width: 1400px; margin: 0 auto; padding: 12px; }
.apps-head { display: grid; gap: 8px; margin-bottom: 10px; }
.table-wrap { width: 100%; }

/* 応募一覧: スマホ=カード表示(横スクロールなし) / PC=表 */
.apps-table { width: 100%; border-collapse: collapse; display: block; }
.apps-table thead { display: none; }
.apps-table tbody { display: block; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.apps-table tr { display: block; padding: 10px 12px; border-top: 1px solid var(--line); }
.apps-table tr:first-child { border-top: 0; }
.apps-table td { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; padding: 2px 0; line-height: 1.5; font-size: .92rem; }
.apps-table td::before { content: attr(data-label); color: var(--muted); font-weight: 700; font-size: .82rem; }
.apps-table td.is-empty { display: none; }
.apps-table .st-accepted { color: var(--ok); font-weight: 800; }
.apps-table .st-waitlist { color: var(--warn); font-weight: 800; }
.mail-ok { color: var(--ok); font-weight: 700; }
.mail-ng { color: var(--danger); font-weight: 700; }
.mail-wait { color: var(--warn); font-weight: 700; }
.cell-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ダイアログ */
.dialog { width: min(92vw, 440px); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 10px 40px rgba(0,0,0,.35); color: var(--text); }
.dialog::backdrop { background: rgba(15, 23, 42, .55); }
.dialog-body { padding: 18px 16px; }
.dialog-title { font-size: 1.15rem; line-height: 1.5; margin-bottom: 8px; color: var(--danger); }
.dialog-text { margin-bottom: 14px; line-height: 1.7; }
.dialog-actions { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 12px; }
.dialog-actions .btn { width: 100%; }

.toast {
  position: fixed; left: 12px; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  padding: 12px 14px; border-radius: var(--radius); background: #1f2d3d; color: #fff; font-weight: 700; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
.toast.is-error { background: var(--danger); }
.toast.is-ok { background: var(--ok); }

/* ---------------------------------------------------------------
   タブレット以上(600px〜)
   --------------------------------------------------------------- */
@media (min-width: 600px) {
  .app { padding-top: 8px; }
  .site-title { font-size: 1.6rem; }
  .card { padding: 22px; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 160px)); }
  .dialog-actions { flex-direction: row; justify-content: flex-end; }
  .dialog-actions .btn { width: auto; }
  .apps-head { grid-template-columns: auto 1fr auto; align-items: center; }
  .apps-head .panel-title { margin: 0; }
  .toast { left: 50%; right: auto; transform: translateX(-50%); width: min(90vw, 480px); }
  .savebar-inner { flex-direction: row; align-items: center; justify-content: flex-end; gap: 14px; }
  .save-status { flex: 1 1 auto; text-align: right; }
  .savebar .btn { width: auto; min-width: 240px; }
}

/* ---------------------------------------------------------------
   PC(900px〜): 管理画面は 左側メニュー + 右側の設定内容
   --------------------------------------------------------------- */
@media (min-width: 900px) {
  .admin-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px 20px 0; }
  .admin-nav { grid-template-columns: 1fr; position: sticky; top: 64px; margin: 0; gap: 6px; }
  .nav-btn { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 52px; padding: 8px 14px; font-size: .98rem; text-align: left; }
  .nav-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eef1f4; font-size: .78rem; }
  .nav-btn[aria-selected="true"] .nav-no { background: rgba(255,255,255,.25); color: #fff; }
  .admin-content { padding-bottom: 120px; }
  .form-card { padding: 22px; }

  /* 保存バーは右側の設定領域の幅に合わせて固定 */
  .savebar { left: 0; right: 0; padding-left: 20px; padding-right: 20px; }
  .savebar-inner { max-width: 1060px; padding-left: 240px; }

  /* 入力が横に間延びしないように */
  .form-card input[type="text"], .form-card input[type="email"], .form-card input[type="url"],
  .form-card input[type="password"], .form-card select, .form-card textarea { max-width: 640px; }
  .form-card input[type="number"], .form-card input[type="datetime-local"] { max-width: 260px; }
  .inline-row input { max-width: 420px; }
  .choice-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-stack { grid-template-columns: 1fr; max-width: 640px; }

  .item-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

  /* 応募一覧は表で表示(CSVに近い見た目) */
  .apps-table { display: table; font-size: .9rem; background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
  .apps-table thead { display: table-header-group; background: #1f2d3d; color: #fff; }
  .apps-table th { padding: 8px 10px; text-align: left; font-weight: 700; white-space: nowrap; }
  .apps-table tbody { display: table-row-group; border: 0; border-radius: 0; box-shadow: none; margin: 0; overflow: visible; }
  .apps-table tr { display: table-row; padding: 0; border: 0; }
  .apps-table td { display: table-cell; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; font-size: .9rem; }
  .apps-table td::before { content: none; }
  .apps-table td.is-empty { display: table-cell; }
  /* 1応募のまとまりが分かるように、応募ごとに太い区切り線 */
  .apps-table tbody tr:first-child td { border-top: 3px solid var(--line-strong); }
  .apps-table tbody:nth-of-type(even) { background: #f7f9fb; }
  .table-wrap { overflow-x: auto; border-radius: var(--radius); }
  .done-summary { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media print { .savebar, .admin-nav, .admin-top, .toast { display: none !important; } }

/* 段階4で追加 */
.add-note { white-space: pre-line; }
.hint-rich { color: var(--muted); font-size: .88rem; line-height: 1.6; font-weight: 400; margin-bottom: 6px; }
.course-box.is-wait { background: var(--warn-bg); border-color: #f0c98d; }
.course-box .cap-line2 { margin-top: 6px; }
.done-line { gap: 4px; }

/* 段階5で追加 */
.apps-table td.cell-extra { white-space: pre-line; }
.texts-group { font-size: .95rem; margin: 18px 0 8px; padding: 6px 10px; background: #eef1f4; border-radius: 6px; }
.texts-group:first-child { margin-top: 0; }
.text-item .rt { margin-top: 4px; }
.mail-ok, .mail-ng, .mail-wait { overflow-wrap: anywhere; }
