/* =============================================================
   出欠連絡システム（若狭高校）共通スタイル
   保護者はスマートフォン、教員はPCでの利用を想定し、
   タップ領域を大きめに・表は横スクロールで崩れないようにする。
   ============================================================= */
:root {
  --main: #2563eb;
  --main-d: #1d4ed8;
  --main-l: #eff6ff;
  --accent: #f97316;
  --bg: #f1f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-d: #cbd5e1;
  --text: #1e293b;
  --muted: #64748b;
  --ok: #16a34a;
  --warn: #dc2626;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 23, 42, .08);
  --shadow-lg: 0 8px 28px rgba(15, 23, 42, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--main-d); }

/* ---------- アプリバー ---------- */
.appbar {
  background: linear-gradient(135deg, var(--main), var(--main-d));
  color: #fff; padding: 10px 16px; display: flex; align-items: center;
  gap: 10px; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 20;
}
.appbar h1 { font-size: 18px; margin: 0; font-weight: 700; }
.appbar .sub { font-size: 12px; opacity: .85; font-weight: 400; }
.appbar .spacer { flex: 1; }
.appbar button, .appbar a.btnbar {
  background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; text-decoration: none;
  white-space: nowrap; font-family: inherit; line-height: 1.3;
}
.appbar button:hover, .appbar a.btnbar:hover { background: rgba(255, 255, 255, .32); }
.appbar .btnbar.active, .appbar button.active { background: #fff; color: var(--main-d); font-weight: 700; border-color: #fff; }
.appbar .badge-n {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px;
  background: #fff; color: var(--warn); border-radius: 999px;
  font-size: 11px; font-weight: 700; text-align: center;
}

/* ---------- レイアウト ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.wrap.narrow { max-width: 580px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 14px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 15px; }
.card.tight { padding: 12px 20px; }

/* ---------- フォーム ---------- */
label.field, div.field { display: block; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.field .req { color: var(--warn); font-size: 11px; margin-left: 6px; border: 1px solid currentColor;
  border-radius: 4px; padding: 0 4px; vertical-align: 2px; }
.field .opt { color: var(--muted); font-size: 11px; margin-left: 6px; border: 1px solid var(--line-d);
  border-radius: 4px; padding: 0 4px; vertical-align: 2px; font-weight: 600; }
select, input[type=text], input[type=date], input[type=time], input[type=number], input[type=search], textarea {
  width: 100%; padding: 11px 12px; margin-top: 6px; border: 1.5px solid var(--line-d);
  border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff; color: var(--text);
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--main); outline-offset: 1px; border-color: var(--main); }
select:disabled, input:disabled, textarea:disabled { background: #f1f5f9; color: var(--muted); }
textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.row.tight > * { min-width: 0; }
.charcount { font-size: 11px; color: var(--muted); font-weight: 400; text-align: right; margin-top: 2px; }
.charcount.over { color: var(--warn); font-weight: 700; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--main); color: #fff; border: none; border-radius: 10px;
  padding: 13px 20px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%;
  font-family: inherit; line-height: 1.4; text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--main-d); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sub { background: #fff; color: var(--main-d); border: 1.5px solid var(--main); }
.btn.sub:hover:not(:disabled) { background: var(--main-l); }
.btn.gray { background: #fff; color: var(--muted); border: 1.5px solid var(--line-d); }
.btn.gray:hover:not(:disabled) { background: #f8fafc; }
.btn.danger { background: var(--warn); }
.btn.danger:hover:not(:disabled) { background: #b91c1c; }
.btn.ghost-danger { background: #fff; color: var(--warn); border: 1.5px solid #fecaca; }
.btn.ghost-danger:hover:not(:disabled) { background: #fef2f2; }
.btn.small { width: auto; padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn.tiny { width: auto; padding: 3px 9px; font-size: 12px; border-radius: 7px; font-weight: 700; }
.btn.wide { width: 100%; }

/* ---------- 区分バッジ ---------- */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 700; white-space: nowrap;
}
.pill.k欠席 { background: #fee2e2; color: #b91c1c; }
.pill.k遅刻 { background: #ffedd5; color: #c2410c; }
.pill.k早退 { background: #fef9c3; color: #a16207; }
.pill.k忌引 { background: #ede9fe; color: #6d28d9; }
.pill.k出停 { background: #dbeafe; color: #1d4ed8; }
.pill.k公欠 { background: #dcfce7; color: #15803d; }
.pill.kその他 { background: #e2e8f0; color: #475569; }

/* ---------- メッセージ・通知 ---------- */
.confirm-name {
  background: #ecfdf5; border: 1.5px solid #a7f3d0; border-radius: 10px;
  padding: 12px 14px; font-size: 15px; margin-top: 8px;
}
.confirm-name b { font-size: 21px; }
.confirm-name.loading { background: #f8fafc; border-color: var(--line); color: var(--muted); }
.msg { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.msg.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.msg.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.msg.warn { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.msg.info { background: var(--main-l); color: #1e3a8a; border: 1px solid #bfdbfe; }
.msg ul { margin: 6px 0 0; padding-left: 20px; }
.muted { color: var(--muted); font-size: 13px; }
.note {
  background: #f8fafc; border: 1px solid var(--line); border-left: 4px solid var(--main);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--muted); margin: 10px 0;
}
.toast-box { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #1e293b; color: #fff; padding: 11px 16px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; max-width: 320px;
  animation: toastIn .18s ease-out;
}
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .4s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fatal { position: fixed; inset: 0; background: rgba(241, 245, 249, .96); z-index: 200; display: flex;
  align-items: center; justify-content: center; padding: 20px; }
.fatal-inner { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 28px 24px; max-width: 420px; text-align: center; }
.fatal-ico { font-size: 44px; }
.fatal h2 { justify-content: center; margin: 8px 0; font-size: 18px; }

/* ---------- モーダル（教員による出欠の追加・修正）---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 60;
  display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 28px 12px;
}
.modal-box { width: 100%; max-width: 520px; margin: auto; }
.gridCell {
  display: block; min-height: 22px; min-width: 26px; border-radius: 4px; cursor: pointer;
}
.gridCell:hover { background: var(--main-l); outline: 1px dashed var(--main); }

/* ---------- 表 ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; border: 1px solid var(--line); }
.tablewrap.tall { max-height: 66vh; overflow-y: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; background: #fff; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }
table.grid th {
  background: #f1f5f9; font-weight: 700; font-size: 13px; white-space: nowrap;
  position: sticky; top: 0; z-index: 2; border-bottom: 1.5px solid var(--line-d);
}
table.grid tbody tr:nth-child(even) td { background: #fcfdfe; }
table.grid tbody tr:hover td { background: var(--main-l); }
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid td.center, table.grid th.center { text-align: center; }
table.grid td.nowrap, table.grid th.nowrap { white-space: nowrap; }
table.grid.compact th, table.grid.compact td { padding: 5px 6px; font-size: 12px; }
/* ダッシュボードのクラス別集計（3学年×8組＋区分＋合計＝26列）を横スクロールなしで収める */
table.grid.dash { table-layout: fixed; min-width: 800px; }
table.grid.dash col.dashLabel { width: 80px; }
table.grid.dash col.dashTotal { width: 48px; }
table.grid.dash th, table.grid.dash td { padding: 7px 2px; white-space: nowrap; }
table.grid.dash tbody th, table.grid.dash thead tr:first-child th:first-child { padding-left: 8px; padding-right: 6px; }
table.grid.dash .btn.tiny { padding: 2px 4px; min-width: 22px; }
tr.confirmed td { color: var(--muted); }
tr.confirmed td .pill { opacity: .6; }
tr.rowsel td { background: #fef9c3 !important; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.status-dot.un { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px #dcfce7; }
/* 生徒別出欠一覧：番号・氏名列を固定して横スクロールしても見失わないようにする */
.stickycol1 { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line); }
.stickycol2 { position: sticky; left: 46px; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line); }
thead .stickycol1, thead .stickycol2 { background: #f1f5f9; z-index: 3; }
th.wknd, td.wknd { background: #fef2f2 !important; color: #b91c1c; }

/* ---------- タブ・フィルタ ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button {
  background: #fff; border: 1.5px solid var(--line-d); border-radius: 999px; padding: 8px 16px;
  font-size: 14px; cursor: pointer; font-weight: 600; color: var(--muted); font-family: inherit;
}
.tabs button:hover { border-color: var(--main); color: var(--main-d); }
.tabs button.active { background: var(--main); color: #fff; border-color: var(--main); }
.tabs.seg { gap: 0; display: inline-flex; border: 1.5px solid var(--line-d); border-radius: 10px; overflow: hidden; }
.tabs.seg button { border: none; border-radius: 0; padding: 8px 18px; border-right: 1px solid var(--line); }
.tabs.seg button:last-child { border-right: none; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters label { font-size: 12px; font-weight: 700; color: var(--muted); }
.filters select, .filters input { width: auto; min-width: 96px; margin-top: 3px; font-size: 14px; padding: 9px 10px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.count-badge { font-size: 13px; color: var(--muted); font-weight: 700; }
.count-badge b { color: var(--warn); font-size: 15px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.updated { font-size: 12px; color: var(--muted); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 5px;
  animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- トップ画面のロールカード ---------- */
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.role-card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 18px; text-align: center; text-decoration: none;
  color: var(--text); transition: transform .1s, border-color .1s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.role-card:hover { transform: translateY(-3px); border-color: var(--main); }
.role-card.primary { border-color: var(--main); background: #f5f9ff; }
.role-card .ico { font-size: 44px; line-height: 1.1; }
.role-card h3 { margin: 8px 0 4px; }
.role-note {
  display: inline-block; margin-top: 10px; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #e2e8f0; color: #475569;
}
.role-note.ok { background: #dcfce7; color: #15803d; }
.demo-box { background: #fffbeb; border: 1.5px dashed #fcd34d; border-radius: var(--radius); padding: 16px 18px; }
.demo-badge {
  background: rgba(255, 255, 255, .25); border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; white-space: nowrap;
}

/* ---------- チェックボックス ---------- */
label.check {
  display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px;
  margin-top: 6px; padding: 11px 12px; border: 1.5px solid var(--line-d);
  border-radius: 10px; background: #fff; cursor: pointer;
}
label.check:hover { border-color: var(--main); }
label.check input[type=checkbox] { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--main); }
.field > label.check { margin-bottom: 0; }
input.rowck { width: 18px; height: 18px; accent-color: var(--main); cursor: pointer; }

/* ---------- 保護者フォーム ---------- */
/* 常に見えて進み具合が分かるよう、appbarのすぐ下に固定する（topはJSでappbarの実高さに合わせる）*/
.steps {
  display: flex; gap: 6px; margin: 0 0 14px; position: sticky; z-index: 19;
  background: var(--bg); padding-top: 8px; box-shadow: 0 2px 6px rgba(15, 23, 42, .06);
}
.steps .step {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted);
  padding: 6px 2px 5px; border-top: 3px solid var(--line); border-radius: 2px;
}
.steps .step.done { color: var(--ok); border-top-color: var(--ok); }
.steps .step.now { color: var(--main-d); border-top-color: var(--main); }
.datechip {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line-d);
  border-radius: 10px; padding: 6px 8px 6px 12px; margin-bottom: 8px;
}
.datechip input[type=date] { border: none; margin: 0; padding: 4px 0; flex: 1; min-width: 0; font-weight: 600; }
.datechip input[type=date]:focus { outline: none; }
.datechip .wd { font-size: 12px; color: var(--muted); font-weight: 700; flex: 0 0 auto; }
.datechip .wd.hol { color: var(--warn); }
.datechip .del {
  flex: 0 0 auto; background: #fff; border: 1.5px solid var(--line-d); color: var(--muted);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1;
}
.datechip .del:hover { border-color: var(--warn); color: var(--warn); background: #fef2f2; }
.quickdates { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.submitbar {
  position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(241,245,249,0), var(--bg) 34%);
  padding: 14px 0 10px; z-index: 15;
}
.done-icon { font-size: 60px; text-align: center; }
.recent-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px dashed var(--line); font-size: 14px;
}
.recent-item:last-child { border-bottom: none; }
.recent-item .d { font-weight: 700; white-space: nowrap; }

/* ---- 保護者フォームの使いやすさ（2026-10-01）---- */
/* ステップ表示は押すとその欄へ移動できる */
.steps .step { cursor: pointer; }
.steps .step:hover { color: var(--main-d); }
/* 上部に貼りつくタイトル帯＋ステップ表示の下に、移動先の欄が隠れないようにする */
#studentCard, #block-date, #block-kubunReason, #block-submitter, #reviewCard { scroll-margin-top: 150px; }
/* 区分：大きな色付きボタンで選ぶ（値の正本は非表示の select） */
.vh-select { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0; pointer-events: none; }
.kubun-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.kbtn {
  font-family: inherit; font-size: 17px; font-weight: 800; padding: 13px 6px; border-radius: 12px; cursor: pointer;
  background: #fff; color: #334155; border: 2px solid var(--line-d); transition: transform .08s, box-shadow .12s;
}
.kbtn:hover { border-color: var(--main); }
.kbtn:active { transform: scale(.97); }
.kbtn.on { box-shadow: 0 3px 10px rgba(15, 23, 42, .18); }
.kbtn.on::before { content: "✓ "; }
.kbtn.k欠席.on { background: #dc2626; border-color: #dc2626; color: #fff; }
.kbtn.k遅刻.on { background: #ea580c; border-color: #ea580c; color: #fff; }
.kbtn.k早退.on { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.kbtn.k忌引.on { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.kbtn.k出停.on { background: #f97316; border-color: #f97316; color: #fff; }
.kbtn.k公欠.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.kbtn.kその他.on { background: #475569; border-color: #475569; color: #fff; }
/* 送信する内容の確認 */
.review-card { border: 2px solid #bfdbfe; background: #f8fbff; }
.review-card h2 { font-size: 16px; margin-bottom: 8px; }
.rv-row { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed var(--line); font-size: 15px; align-items: baseline; }
.rv-row:last-child { border-bottom: none; }
.rv-k { flex: 0 0 92px; color: var(--muted); font-size: 13px; font-weight: 700; }
.rv-v { flex: 1; min-width: 0; font-weight: 700; word-break: break-word; }
.rv-none { color: #b91c1c; font-weight: 700; }
@media (max-width: 360px) { .rv-k { flex-basis: 72px; } }
.rv-tag { display: inline-block; background: var(--main); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; margin-left: 4px; }

/* 出停（出席停止）選択時：通常の欠席と見た目で区別できるよう強調する */
.card.suspend-active {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 140px);
  border-color: #fdba74;
  box-shadow: 0 2px 16px rgba(249, 115, 22, .18);
}
select#kubun.suspend { border-color: #f97316; background: #fff7ed; color: #9a3412; font-weight: 700; }
.suspend-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 2px solid #f97316; border-radius: 12px;
  padding: 14px 16px; margin: 4px 0 16px;
  color: #9a3412; font-weight: 700; font-size: 15px;
}
.suspend-banner .icon { font-size: 24px; line-height: 1.1; flex: 0 0 auto; }
#block-suspend .field select, #block-suspend .field input { border-color: #fdba74; }
#block-suspend > #suspendBox { border-left: 4px solid #f97316; padding-left: 14px; margin-left: -14px; }
#diseaseRefBox { margin: 4px 0 16px; }
.disease-ref { margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.disease-ref-table { font-size: 12.5px; }
.disease-ref-table th, .disease-ref-table td { padding: 6px 8px; }
tr.disease-ref-cat td { background: #fff7ed !important; font-weight: 700; color: #9a3412; }

/* ---------- 教員ダッシュボード ---------- */
/* クラスの連絡（学年・組を選んだときの氏名つき一覧） */
.classlist {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px;
}
.classlist-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.classlist-empty { color: var(--muted); font-size: 14px; padding: 4px 2px; }
.classitem {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; margin: 5px 0; font-size: 14px; cursor: pointer; font-family: inherit;
  color: var(--text); line-height: 1.4;
}
.classitem:hover { border-color: var(--main); background: var(--main-l); }
.classitem.confirmed { color: var(--muted); }
.classitem.confirmed .pill { opacity: .6; }
.classitem .ci-no { font-weight: 700; flex: 0 0 auto; }
.classitem .ci-name { font-weight: 700; flex: 0 0 auto; }
.classitem .ci-reason { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.classitem .status-dot { flex: 0 0 auto; }
/* 連続欠席チップ */
.streak-chip {
  display: inline-block; background: #fff; border: 1px solid #fcd34d; border-radius: 999px;
  padding: 2px 10px; margin: 2px 4px 2px 0; font-size: 13px; font-weight: 700;
}
.trend-block { margin-bottom: 10px; }
.trend-block:last-child { margin-bottom: 0; }
.trend-block b { display: block; margin-bottom: 4px; font-size: 14px; }
/* 生徒別出欠一覧の「今日」列 */
table.grid th.today, table.grid td.today { background: #e0f2fe !important; }
.statcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 10px; margin-bottom: 14px; }
.statcard { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.statcard .n { font-size: 26px; font-weight: 800; line-height: 1.15; }
.statcard .l { font-size: 12px; color: var(--muted); font-weight: 700; }
.statcard.alert { background: #fef2f2; border-color: #fecaca; }
.statcard.alert .n { color: var(--warn); }
.statcard.okc { background: #ecfdf5; border-color: #a7f3d0; }
.statcard.okc .n { color: var(--ok); }
/* ---------- 教員画面：ホームを中心にした画面構成（2026-10-01）---------- */
/* 左上のタイトル＝いつでもホームへ戻る */
.appbar a.home-link { color: #fff; text-decoration: none; border-radius: 8px; padding: 2px 6px; margin: -2px -6px; }
.appbar a.home-link:hover { background: rgba(255, 255, 255, .16); }
/* 画面の切り替え（ホームを左端・別色で目立たせる） */
.mainnav {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px;
}
.mainnav button {
  display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 150px;
  background: #f8fafc; border: 1.5px solid var(--line); border-radius: 11px;
  padding: 9px 12px; cursor: pointer; font-family: inherit; color: var(--text); text-align: left;
  position: relative; transition: background .12s, border-color .12s;
}
.mainnav button:hover { border-color: var(--main); background: var(--main-l); }
.mainnav .ni { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.mainnav .nl { font-weight: 800; font-size: 15px; line-height: 1.25; }
.mainnav .nl small { display: block; font-weight: 600; font-size: 11.5px; color: var(--muted); }
.mainnav button.nav-home { flex-grow: 1.35; border-color: #93c5fd; background: #eff6ff; }
.mainnav button.active { background: var(--main); border-color: var(--main); color: #fff; box-shadow: 0 3px 10px rgba(37, 99, 235, .35); }
.mainnav button.active .nl small { color: rgba(255, 255, 255, .85); }
.mainnav button.active::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--main);
}
.mainnav .badge-n {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px;
  background: var(--warn); color: #fff; font-size: 12px; font-weight: 800; text-align: center;
}
.mainnav button.active .badge-n { background: #fff; color: var(--warn); }

/* いつを・どの単位で見ているか（日＝青／週＝緑／月＝紫で色分け） */
.card.ctrl { padding-top: 14px; }
.period-banner {
  --pc: #2563eb; --pl: #eff6ff;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--pl); border: 2px solid var(--pc); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px;
}
.period-banner.m-week { --pc: #0f766e; --pl: #f0fdfa; }
.period-banner.m-month { --pc: #7c3aed; --pl: #f5f3ff; }
.period-banner .pb-mode {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px; background: var(--pc); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900;
}
.period-banner .pb-text { flex: 1; min-width: 200px; line-height: 1.35; }
.period-banner .pb-main { font-size: 22px; font-weight: 900; color: var(--pc); margin-right: 8px; }
.period-banner .pb-tag {
  display: inline-block; vertical-align: 4px; background: var(--pc); color: #fff;
  border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 800;
}
.period-banner .pb-sub { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.period-banner.not-today { border-style: dashed; }
.period-banner .pb-back {
  flex: 0 0 auto; background: #f97316; color: #fff; border: none; border-radius: 9px;
  padding: 9px 14px; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit;
}
.period-banner .pb-back:hover { background: #ea580c; }
.ctrl-group { display: flex; flex-direction: column; }
.ctrl-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.tabs.seg.range { margin: 0; }
.tabs.seg.range button { padding: 6px 13px; font-size: 17px; font-weight: 900; line-height: 1.2; }
.tabs.seg.range button small { display: block; font-size: 10.5px; font-weight: 700; }
.tabs.seg.range button[data-mode=day].active { background: #2563eb; }
.tabs.seg.range button[data-mode=week].active { background: #0f766e; }
.tabs.seg.range button[data-mode=month].active { background: #7c3aed; }
#todayBtn.attention { background: #f97316; color: #fff; border-color: #f97316; }

/* ホーム */
.home-hero { border-top: 4px solid var(--main); }
.home-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.home-head h2 { margin: 0; font-size: 20px; }
.home-period { font-size: 17px; margin-left: 10px; color: var(--main-d); }
.home-period b { background: var(--main); color: #fff; border-radius: 6px; padding: 0 7px; margin-right: 2px; }
.home-scope { font-size: 13px; }
.home-scope b { font-size: 15px; }
.howto { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.howto summary { cursor: pointer; font-weight: 700; }
.statcard.kabs .n { color: #b91c1c; }
button.statcard { font-family: inherit; text-align: left; cursor: pointer; color: inherit; }
.statcard.go:hover { border-color: var(--main); box-shadow: 0 2px 8px rgba(37, 99, 235, .18); transform: translateY(-1px); }
.statcard.go { transition: transform .1s, box-shadow .1s, border-color .1s; }
.statcard.up { background: #fff7ed; border-color: #fed7aa; }
.statcard.up .n { color: #c2410c; }
.statcard.up:hover { border-color: #f97316; }
.statcard.up.alert-up { border: 2px solid #f97316; }
.statcard .l .pill { margin-left: 4px; }
.classlist.hint { background: var(--main-l); border-color: #bfdbfe; color: #1e3a8a; font-size: 14px; }
.classitem { flex-wrap: wrap; }
.classitem .ci-up {
  flex: 0 0 auto; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412;
  border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700;
}
.pill.dup { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
/* 同じ日に違う区分の連絡（欠席と遅刻など）。重複より強い警告色 */
.pill.conflict { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; font-weight: 700; }
tr.conflictrow td { background: #fff5f5; }
.classitem .pill.conflict { margin-left: 6px; }
.conflict-chip { border-color: #fca5a5; }
.rm-others { margin: 0 0 10px; }
.rm-others .rm-other { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.gridCell .conflict-mark { color: #b91c1c; font-weight: 700; margin-left: 2px; }
.pill.new { background: #f97316; color: #fff; }
.pill.wk { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; margin-top: 2px; }
.wk-warn { color: #b91c1c; }
.count-pill {
  display: inline-block; min-width: 26px; padding: 0 8px; border-radius: 999px;
  background: #fed7aa; color: #9a3412; font-size: 14px; text-align: center;
}
.card.upcoming { border-left: 5px solid #fdba74; }
.card.upcoming.has-new { border-left-color: #f97316; }
.uplist { display: flex; flex-direction: column; gap: 6px; }
.upitem {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 14px;
}
.upitem.new { background: #fff7ed; border-color: #fdba74; }
.upitem .up-name {
  background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; font-size: 14px;
  color: var(--main-d); text-align: left;
}
.upitem .up-name:hover { text-decoration: underline; }
.upitem .up-dates { font-weight: 700; }
.upitem .up-reason { color: var(--muted); flex: 1; min-width: 80px; }
.streak-chip.jump { cursor: pointer; font-family: inherit; color: var(--text); }
.streak-chip.jump:hover { border-color: var(--main); background: var(--main-l); color: var(--main-d); }
.future-note { color: #c2410c; }
.src { display: inline-block; border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 700; }
.src.parent { background: #dcfce7; color: #15803d; }
.src.teacher { background: #e0e7ff; color: #3730a3; }
tr.focusrow td { background: #fef08a !important; }
tr.focusrow td.stickycol1, tr.focusrow td.stickycol2 { background: #fde047 !important; font-weight: 800; }

/* =============================================================
   デザイン第2版（2026-10-01）
   ・文字：Windows 標準の UD フォント（BIZ UDPゴシック）で数字・漢字を読みやすく
   ・「いつ（日＝青／週＝緑／月＝紫）」と「どのクラス（赤紫）」を色で分ける
   ・数字のカードは区分ごとの色の帯とアイコンで見分ける
   ============================================================= */
:root {
  --bg: #eef2f8;
  --text: #0f172a;
  --scope: #a21caf;       /* 表示中のクラス */
  --scope-d: #86198f;
  --scope-l: #fdf4ff;
}
body {
  font-family: "BIZ UDPGothic", "BIZ UDPゴシック", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  letter-spacing: .01em;
}
.appbar { background: linear-gradient(120deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%); padding: 11px 18px; }
.appbar h1 { font-size: 19px; letter-spacing: .03em; }
.card { border-radius: 16px; border-color: #e2e8f0; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 23, 42, .05); }
.card h2 { font-size: 18px; font-weight: 800; }
.statcards .n, table.grid, .period-banner .pb-main, .scope-card .sc-main { font-variant-numeric: tabular-nums; }

/* 画面の切り替えは画面上部に貼りつけ、どこまでスクロールしても今いる画面が分かるようにする（PC） */
@media (min-width: 641px) {
  .mainnav { position: sticky; top: 56px; z-index: 18; }
}

/* ---- ①いつ ②どのクラス ---- */
.card.ctrl { padding: 16px; }
.ctrl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; }
.ctrl-when, .ctrl-who { border-radius: 14px; padding: 12px 14px; }
.ctrl-when { background: #f8fafc; border: 1.5px solid #e2e8f0; }
.ctrl-who { background: #f8fafc; border: 1.5px dashed #cbd5e1; transition: background .15s, border-color .15s; }
.ctrl-who.scoped { background: var(--scope-l); border: 2px solid var(--scope); }
.ctrl-step { font-size: 13px; font-weight: 800; color: #475569; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.ctrl-step .step-no {
  width: 22px; height: 22px; border-radius: 50%; background: #334155; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.ctrl-who.scoped .ctrl-step { color: var(--scope-d); }
.ctrl-who.scoped .step-no { background: var(--scope); }
.ctrl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; }
.ctrl .period-banner { margin-bottom: 0; }
.datenav { display: inline-flex; gap: 4px; align-items: stretch; }
.datenav .btn.small { padding: 8px 11px; }
.datenav input[type=date] { width: 152px; margin: 0; padding: 8px 10px; font-size: 15px; }
.ctrl label.yearsel, .ctrl label.scopesel { display: flex; flex-direction: column; font-size: 12px; font-weight: 700; color: var(--muted); }
.ctrl label.yearsel select, .ctrl label.scopesel select { width: auto; min-width: 104px; margin-top: 3px; padding: 8px 10px; font-size: 15px; }
.ctrl select.picked { border: 2px solid var(--scope); background: #fff; color: var(--scope-d); font-weight: 800; }
.scope-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 14px; border: 1.5px solid #e2e8f0; }
.ctrl-who.scoped .scope-card { border-color: #f0abfc; box-shadow: 0 2px 10px rgba(162, 28, 175, .12); }
.scope-card .sc-ico { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.scope-card .sc-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.scope-card .sc-label {
  align-self: flex-start; font-size: 11px; font-weight: 800; color: #fff; background: #64748b;
  border-radius: 999px; padding: 0 8px; margin-bottom: 2px;
}
.ctrl-who.scoped .sc-label { background: var(--scope); }
.scope-card .sc-main { font-size: 26px; font-weight: 900; color: #334155; letter-spacing: .02em; }
.ctrl-who.scoped .sc-main { color: var(--scope-d); }
.scope-card .sc-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.scope-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
.ctrl-who.scoped .scope-note { color: var(--scope-d); }
.ctrl-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e2e8f0; font-size: 12.5px; color: var(--muted); }
.ctrl-foot .spacer { flex: 1; }
.scope-pill { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 800; background: #e2e8f0; color: #334155; }
.scope-pill.on { background: var(--scope); color: #fff; }

/* ---- 数字のカード：区分ごとの色帯＋アイコン ---- */
.statcards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.statcard { position: relative; background: #fff; border: 1.5px solid #e2e8f0; border-left: 6px solid #94a3b8; border-radius: 12px; padding: 12px 14px 10px; }
.statcard .si { position: absolute; right: 12px; top: 10px; font-size: 22px; opacity: .9; }
.statcard .n { font-size: 34px; font-weight: 900; line-height: 1.1; }
.statcard .l { font-size: 13px; font-weight: 800; color: #475569; }
.statcard.t-un.alert { border-left-color: #f59e0b; background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.statcard.t-un.alert .n { color: #b45309; }
.statcard.t-un.okc { border-left-color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; border-left-color: #16a34a; }
.statcard.t-recv { border-left-color: #64748b; }
.statcard.t-abs { border-left-color: #dc2626; }
.statcard.t-abs .n { color: #b91c1c; }
.statcard.t-late { border-left-color: #ea580c; }
.statcard.t-late .n { color: #c2410c; }
.statcard.t-sus { border-left-color: #2563eb; }
.statcard.t-sus .n { color: #1d4ed8; }
.statcard.up { border-left-color: #f97316; }
.statcard.go:hover { border-color: #93c5fd; }

/* ---- クラス別の集計：学年ごとの色・表示中のクラスの列 ---- */
table.grid.dash { font-size: 14.5px; }
table.grid.dash th.grh { font-size: 14px; letter-spacing: .05em; }
table.grid.dash th.grh.gr1 { background: #dbeafe; color: #1e40af; }
table.grid.dash th.grh.gr2 { background: #dcfce7; color: #166534; }
table.grid.dash th.grh.gr3 { background: #ede9fe; color: #5b21b6; }
table.grid.dash thead tr:nth-child(2) th.gr1 { background: #eff6ff; }
table.grid.dash thead tr:nth-child(2) th.gr2 { background: #f0fdf4; }
table.grid.dash thead tr:nth-child(2) th.gr3 { background: #f5f3ff; }
table.grid.dash td.selgrade { background: #fdf4ff !important; }
table.grid.dash td.selcol { background: #fae8ff !important; font-weight: 800; }
table.grid.dash thead th.selcol { background: var(--scope) !important; color: #fff; }
table.grid.dash .btn.tiny { font-size: 13px; padding: 2px 5px; min-width: 26px; }
table.grid.dash tbody th { font-size: 14px; }

/* ---- 画面の切り替え（少し引き締める）---- */
.mainnav { padding: 6px; gap: 6px; border-radius: 16px; }
.mainnav button { border-radius: 12px; }
.mainnav .nl { font-size: 15.5px; }

/* ②どのクラス：表示中のクラスと選ぶ欄を横に並べて高さを抑える */
.scope-line { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.scope-line .scope-card { flex: 1 1 180px; padding: 8px 12px; }
.scope-line .scope-picks { margin-top: 0; flex: 0 1 auto; align-self: flex-end; }
.ctrl-foot label.yearsel.inline { flex-direction: row; align-items: center; gap: 6px; margin-left: 10px; }
.ctrl-foot label.yearsel.inline select { min-width: 0; margin: 0; padding: 4px 8px; font-size: 13px; }
/* 見出し・説明・学年タブを1行に */
.sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }
.sec-head .sec-hint { font-size: 12.5px; }
.sec-head .spacer { flex: 1; }
.tabs.compact { margin: 0; gap: 4px; }
.tabs.compact button { padding: 4px 14px; font-size: 13px; }
.sec-note { margin: -4px 0 8px; font-size: 13px; }
.sec-note:empty { display: none; }
table.grid.dash th, table.grid.dash td { padding-top: 6px; padding-bottom: 6px; }

/* 上部に貼りついたタイトル帯＋画面切り替えの下に、移動先が隠れないようにする */
@media (min-width: 641px) {
  body.teacher .card, body.teacher #dashAlert, body.teacher #dashClassList { scroll-margin-top: 140px; }
}
/* 画面の高さが低いPC（1366×768 のノートPCなど）でも、ホームのクラス別集計表がスクロールなしで見えるよう詰める */
@media (min-width: 901px) and (max-height: 860px) {
  body.teacher .appbar { padding-top: 7px; padding-bottom: 7px; }
  body.teacher .wrap { padding-top: 10px; }
  body.teacher .card { margin-bottom: 10px; }
  body.teacher .mainnav { margin-bottom: 10px; top: 46px; }
  body.teacher .mainnav button { padding: 6px 10px; }
  body.teacher .mainnav .nl small { display: none; }
  body.teacher .mainnav .ni { font-size: 18px; }
  body.teacher .card.ctrl { padding: 10px 12px; }
  body.teacher .ctrl-when, body.teacher .ctrl-who { padding: 8px 10px; }
  body.teacher .ctrl-step { margin-bottom: 5px; font-size: 12px; }
  body.teacher .ctrl-step .step-no { width: 18px; height: 18px; font-size: 11px; }
  body.teacher .period-banner { padding: 5px 10px; gap: 10px; }
  body.teacher .period-banner .pb-mode { width: 34px; height: 34px; font-size: 19px; }
  body.teacher .period-banner .pb-main { font-size: 19px; }
  body.teacher .ctrl-row { margin-top: 6px; }
  body.teacher .tabs.seg.range button { padding: 3px 12px; font-size: 15px; }
  body.teacher .scope-card { padding: 5px 10px; }
  body.teacher .scope-card .sc-ico { font-size: 22px; }
  body.teacher .scope-card .sc-main { font-size: 21px; }
  body.teacher .scope-note { margin-top: 5px; font-size: 12px; }
  body.teacher .ctrl-foot { margin-top: 4px; padding-top: 4px; }
  body.teacher .ctrl-foot label.yearsel.inline select { padding: 1px 6px; }
  body.teacher .sec-head h2 { font-size: 16px; }
  body.teacher .tabs.compact button { padding: 2px 12px; }
  body.teacher table.grid.dash thead th { padding-top: 3px; padding-bottom: 3px; }
  body.teacher #dashTableCard { padding: 12px 16px; }
  body.teacher .sec-head { margin-bottom: 6px; }
  body.teacher table.grid.dash th, body.teacher table.grid.dash td { padding-top: 4px; padding-bottom: 4px; }
  body.teacher table.grid.dash .btn.tiny { padding: 0 5px; }
}
/* 幅が中くらい（タブレット横・小さめのPC）では「いつ」の操作を1行に収める */
@media (min-width: 901px) and (max-width: 1240px) {
  body.teacher .tabs.seg.range button { padding: 4px 11px; }
  body.teacher .tabs.seg.range button small { display: none; }
  body.teacher .datenav .btn.small { padding: 8px 9px; }
  body.teacher .ctrl label.scopesel select { min-width: 78px; }
  body.teacher .scope-line .scope-card { flex-basis: 160px; }
}
/* 教員画面は26列の表があるので、少し広く使う */
body.teacher .wrap { max-width: 1260px; }

@media (max-width: 900px) {
  .ctrl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .scope-card .sc-main { font-size: 22px; }
  .statcard .n { font-size: 28px; }
  .datenav input[type=date] { width: 160px; }
}

/* ---------- 印刷 ---------- */
@media print {
  .appbar, .tabs, .filters, .toolbar, .submitbar, .no-print, .toast-box { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .card { box-shadow: none; border: none; padding: 0; margin: 0 0 10px; }
  .tablewrap { overflow: visible; border: none; max-height: none; }
  table.grid { font-size: 11px; }
  table.grid th { background: #eef2f7 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pill { border: 1px solid #cbd5e1; }
}

/* ---------- スマートフォン ---------- */
@media (max-width: 640px) {
  .role-cards { grid-template-columns: 1fr; }
  .appbar { flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; }
  .appbar h1 { font-size: 16px; flex: 1 1 100%; min-width: 0; }
  .appbar .spacer { display: none; }
  .wrap { padding: 12px; }
  .card { padding: 16px; }
  .card h2 { font-size: 16px; }
  .hide-sp { display: none !important; }
  .filters { gap: 8px; }
  .filters label { flex: 1 1 44%; }
  .filters select, .filters input { width: 100%; min-width: 0; }
  .tabs button { padding: 8px 13px; font-size: 13px; }
  .btn { padding: 14px 18px; }
  .statcards { grid-template-columns: 1fr 1fr; }
  .mainnav button { min-width: calc(50% - 4px); flex-basis: calc(50% - 4px); padding: 8px 10px; }
  .mainnav .nl small { display: none; }
  .mainnav button.active::after { display: none; }
  .period-banner .pb-main { font-size: 18px; }
  .home-period { display: block; margin: 2px 0 0; }
}

/* ---- 部活動（兼部は最大3つ）2026-09-29 ---- */
.club-notice {
  margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px;
  background: #f0fdf4; border: 1px solid #86efac; color: #14532d;
  font-size: 13.5px; font-weight: 500; line-height: 1.6;
}
.club-notice::before { content: "📣 "; }
.clubrow { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.clubrow select { flex: 1; margin: 0; }
.clubplus { flex: 0 0 auto; color: var(--muted); font-weight: 700; }
.clubdel {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-size: 14px;
}
.clubdel:hover { border-color: var(--warn); color: var(--warn); background: #fef2f2; }
.clubadd { width: auto; }

/* ---- 出席停止報告フォームが不要になったお知らせ（期限つき）---- */
.legacy-notice {
  margin: 4px 0 14px; padding: 14px 16px; border-radius: 12px;
  background: #eff6ff; border: 2px solid #3b82f6; color: #1e3a8a;
}
.legacy-notice .ln-title { font-weight: 800; font-size: 15.5px; margin-bottom: 6px; }
.legacy-notice .ln-body { font-size: 14px; line-height: 1.7; white-space: pre-line; }

/* ---- 年度初めの名簿有効化リマインダー・受付サーバーの状態 ---- */
.health-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; margin: 10px 0; }
.health-grid .k { color: var(--muted); }
.health-ok { color: #047857; font-weight: 700; }
.health-ng { color: #b91c1c; font-weight: 700; }

.kubun-note { margin-top: 8px; font-size: 13px; color: #9a3412; background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px; padding: 6px 10px; line-height: 1.5; }
.reason-warn { margin-top: 6px; font-size: 13px; font-weight: 700; color: #9a3412; background: #fff7ed; border: 1px solid #f97316; border-radius: 8px; padding: 6px 10px; }

tr.derivedrow td { background: #fff7ed; }
