/* ============================================================
   School Support（スクールサポート）校務支援モック
   デザイン参照：School Engine（株式会社システムディ）
     https://www.systemd.co.jp/school-engine#feature01
   キーカラー：グリーン #70B538（ヘッダー）／オレンジ #EC6828（表頭・強調）
   本文グレー #646464 ／ 背景 #F2F2F4 ／ 面 #FFFFFF
   ============================================================ */

:root {
  /* 基盤 */
  --bg:            #F2F2F4;
  --surface:       #FFFFFF;
  --surface-alt:   #FAFAFB;
  --text:          #4A4A4A;
  --text-strong:   #333333;
  --text-muted:    #8C8C8C;
  --border:        #E2E2E7;
  --border-strong: #CFCFD6;

  /* キーカラー */
  --green:         #70B538;
  --green-dark:    #5C9C2A;
  --green-tint:    #EFF7E7;
  --orange:        #EC6828;
  --orange-dark:   #D2551A;
  --orange-tint:   #FDF0E9;
  --orange-mid:    #FADFCE;

  /* 機能色 */
  --blue:          #0170C1;
  --blue-tint:     #E9F3FB;
  --teal:          #46AACB;
  --teal-tint:     #EAF6FA;
  --emerald:       #009453;
  --emerald-tint:  #E7F5EE;
  --red:           #D2402F;
  --red-tint:      #FBEDEB;
  --yellow:        #F0A800;
  --yellow-tint:   #FDF4E0;

  /* チャート */
  --c1: #EC6828;
  --c2: #0170C1;
  --c3: #70B538;
  --c4: #46AACB;
  --c5: #F0A800;
  --c6: #009453;

  --ff: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  --shadow-sm: 0 1px 2px rgba(70,70,80,.06), 0 1px 8px rgba(70,70,80,.04);
  --shadow-md: 0 2px 6px rgba(70,70,80,.08), 0 8px 24px rgba(70,70,80,.06);
  --r:  6px;
  --r-lg: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: 14px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--ff); line-height: 1.5; font-weight: 700; color: var(--text-strong); }
h1 { font-size: 26px; letter-spacing: .04em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }
a { color: var(--blue); text-decoration: none; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
button { font-family: var(--ff); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- レイアウト ---------- */
/* ---------- 画面の絵（線の絵＝SVG）。PHP版と同じ形にそろえてあります ---------- */
.ico { flex: none; display: inline-block; vertical-align: -3px; }
.btn .ico, .modesw__btn .ico, .kindsw__btn .ico { width: 15px; height: 15px; }

.topband {
  position: sticky; top: 0; z-index: 30;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
  height: 60px;
  box-shadow: 0 1px 6px rgba(0,0,0,.10);
}
/* 左メニューを畳む・ひらくボタン（三本線） */
.topband__menu {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; cursor: pointer;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.45); border-radius: var(--r);
}
.topband__menu:hover { background: rgba(255,255,255,.18); }
.topband__menu .ico { width: 19px; height: 19px; }

.brand { display: flex; align-items: baseline; gap: 10px; color: #fff; text-decoration: none; }
.brand__name { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.brand__tag  { font-size: 11px; opacity: .92; letter-spacing: .04em; }
.topband__spacer { flex: 1 1 auto; }
.topband__school { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.demo-flag {
  font-size: 11px; padding: 2px 10px; border-radius: 9999px;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5); color: #fff;
}

/* 校種切替 */
.kindsw { display: flex; background: rgba(255,255,255,.9); border-radius: 9999px; padding: 3px; gap: 2px; }
.kindsw__btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--green-dark);
  padding: 5px 16px; border-radius: 9999px; line-height: 1.4;
}
.kindsw__btn[aria-pressed="true"] { background: var(--orange); color: #fff; }
.kindsw__btn:hover { background: var(--orange-mid); color: var(--orange-dark); }
.kindsw__btn[aria-pressed="true"]:hover { background: var(--orange-dark); color: #fff; }

.app { display: flex; align-items: flex-start; min-height: calc(100vh - 60px); }

.sidebar {
  width: 232px; flex: 0 0 232px;
  position: sticky; top: 60px;
  height: calc(100vh - 60px);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.nav { padding: 10px 0; display: flex; flex-direction: column; }
/* まとまりの見出し。左に、そのまとまりの色の帯を出します */
.nav__group {
  font-size: 10px; letter-spacing: .12em; color: var(--text-muted);
  padding: 12px 16px 4px 13px; font-weight: 700;
  border-left: 3px solid transparent;
}

/* ---------- 左メニューの色分け ----------
   まとまりごとに3色。**分類の名前ではなく「出てきた順」で決めます**
   （UiModeService::menu() が色番号を渡します）。
     c1 日々の校務 … 緑    毎日ひらくもの
     c2 評価・記録 … 青    子どもの記録を残すもの
     c3 出力・連携 … 青緑  外に出すもの・つなぐもの
   ★選んでいる行だけはオレンジ（この作りの「いまここ」の色）です。
     絵は、選んでいてもまとまりの色のままにしてあります。
     いつも同じ色でいてくれたほうが、目印として覚えやすいためです。 */
.nav__item--c1 .ico { color: var(--green); }
.nav__item--c2 .ico { color: var(--blue); }
.nav__item--c3 .ico { color: var(--teal); }

.nav__group--c1 { border-left-color: var(--green); color: var(--green-dark); }
.nav__group--c2 { border-left-color: var(--blue);  color: var(--blue); }
.nav__group--c3 { border-left-color: var(--teal);  color: var(--teal); }

/* 選んでいないときも、左端にうっすら色を置いて「どのまとまりか」を示します */
.nav__item--c1 { border-left-color: var(--green-tint); }
.nav__item--c2 { border-left-color: var(--blue-tint); }
.nav__item--c3 { border-left-color: var(--teal-tint); }

.nav__item--c1:hover { background: var(--green-tint); }
.nav__item--c2:hover { background: var(--blue-tint); }
.nav__item--c3:hover { background: var(--teal-tint); }

.nav__item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px 9px 10px;
  font-size: 13px; color: var(--text); text-decoration: none;
  border-left: 3px solid transparent;
  min-height: 40px;
}
.nav__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 有料オプションの印（契約している学校にだけ出ます） */
.nav__op {
  flex: none; font-size: 9px; font-weight: 700; letter-spacing: .04em; line-height: 1.6;
  color: var(--orange-dark); background: var(--orange-tint);
  border: 1px solid var(--orange); border-radius: 3px; padding: 0 4px;
}
.nav__item.is-active .nav__op { background: #fff; }
.nav__note {
  font-size: 10px; color: var(--text-muted); padding: 6px 12px 0;
  display: flex; align-items: center; gap: 6px;
}
.nav__item:hover { background: var(--orange-tint); }
.nav__item.is-active,
.nav__item.is-active:hover {
  background: var(--orange-tint); border-left-color: var(--orange);
  color: var(--orange-dark); font-weight: 700;
}
.nav__key { font-size: 10px; color: var(--text-muted); width: 15px; flex: 0 0 15px; }
.nav__item.is-active .nav__key { color: var(--orange); }
.nav__count {
  flex: none; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 9999px;
}
.nav__tag {
  flex: none; font-size: 9px; color: var(--teal);
  border: 1px solid var(--teal); border-radius: 3px; padding: 0 4px; line-height: 1.6;
}
.sidebar__foot {
  margin-top: auto; padding: 14px 16px; font-size: 11px; color: var(--text-muted);
  border-top: 1px solid var(--border); line-height: 1.7;
}

.main { flex: 1 1 auto; min-width: 0; }
.crumbbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 24px; font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 60px; z-index: 20;
}
.crumbbar__now { margin-left: auto; }
/* ★9/19 上の帯（タイトルバー）に小さなメニューの絵。左メニューを隠したときの行き先です */
.crumbbar__icons { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-left: 8px; }
.crumbbar__ico { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; color: var(--text-muted); text-decoration: none; }
.crumbbar__ico .ico { width: 15px; height: 15px; }
.crumbbar__ico:hover { background: var(--orange-tint); }
.crumbbar__ico.is-active { background: var(--orange); }
.crumbbar__ico.is-active .ico { color: #fff; }
@media print { .crumbbar__icons { display: none; } }
/* ★9/19 左メニューを「隠す」と、絵だけの細い形ではなく、まるごと消えます（上の帯の絵から行けます） */
.is-nav-collapsed .sidebar { display: none; }

.view { padding: 24px 24px 8px; max-width: 1360px; }
.app-foot { padding: 16px 24px 32px; font-size: 11px; color: var(--text-muted); }

/* 画面遷移時に見出しへ移すフォーカスは枠線を出さない（操作部品ではないため） */
#view h1:focus, #view h1:focus-visible { outline: none; }

/* ---------- 見出し ---------- */
/* ★9/18 見出しは小さく、説明は見出しの右へ（PHP版と同じ） */
.page-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { position: relative; padding-left: 12px; font-size: 20px; flex: 0 0 auto; }
.page-head__home { color: inherit; text-decoration: none; }
.page-head__home:hover, .page-head__home:focus-visible { color: var(--orange); text-decoration: underline; }
.page-head .page-lead { flex: 1 1 22em; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
.page-head > .flex { margin-left: auto; flex: 0 0 auto; }
.page-head h1::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 4px; border-radius: 3px; background: var(--orange);
}
.crumb { font-size: 12px; color: var(--text-muted); }
.page-lead { font-size: 13px; color: var(--text); margin-bottom: 20px; max-width: 76em; }

/* ---------- グリッド ---------- */
.grid { display: grid; gap: 16px; }
.grid--8 { grid-template-columns: repeat(8, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; }

/* ---------- カード ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.card--tight { padding: 12px 14px; }
.card--accent { border-top: 3px solid var(--orange); }
.card--green  { border-top: 3px solid var(--green); }
.card--blue   { border-top: 3px solid var(--blue); }
.card--warn   { border-color: var(--orange); background: var(--orange-tint); }
.card--flat   { box-shadow: none; }
/* ★9/14 見出しの帯ごと、左メニューの絵と同じ色でうすく塗ります（PHP版と同じ） */
.card__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -16px -18px 12px; padding: 11px 18px 10px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: color-mix(in srgb, var(--fc, transparent) 12%, var(--surface));
  border-bottom-color: color-mix(in srgb, var(--fc, var(--border)) 28%, var(--border));
}
.card--tight .card__head { margin: -12px -14px 10px; padding: 9px 14px 8px; }
.card__title { font-size: 15px; position: relative; padding-left: 10px; }
.card__title::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
  border-radius: 2px; background: var(--fc, var(--green));
}
.card__meta { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* ---------- タブ ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 2px solid var(--orange-mid); }
.tab {
  padding: 9px 18px; font-size: 13px; font-weight: 700; color: var(--text-muted);
  background: transparent; border-radius: var(--r) var(--r) 0 0; text-decoration: none;
  min-height: 40px; display: inline-flex; align-items: center;
}
.tab:hover { background: var(--orange-tint); color: var(--orange-dark); }
.tab[aria-selected="true"], .tab.is-active { background: var(--orange); color: #fff; }

/* ---------- 表 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th, .table td { padding: 7px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.table thead th, .table tr:first-child th[scope="col"] {
  background: var(--orange); color: #fff; font-weight: 700; white-space: nowrap; letter-spacing: .04em;
}
.table tbody th[scope="row"], .table th[scope="row"] {
  background: var(--orange-tint); color: var(--text-strong); font-weight: 700; white-space: nowrap;
}
.table tbody tr:nth-child(even) td { background: var(--surface-alt); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.center, .table th.center { text-align: center; }
.table--sub thead th { background: var(--orange-tint); color: var(--orange-dark); }
.table--compact th, .table--compact td { padding: 4px 6px; font-size: 12px; }
.table tr.is-attn td { background: var(--red-tint) !important; }
.table tr.is-pick td { background: var(--orange-tint) !important; }
.table tr.is-warn td { background: var(--yellow-tint) !important; } /* ★9/16 いいとこみつけ：まだ0件の子 */

/* ---------- バッジ・ドット ---------- */
.badge {
  display: inline-block; font-size: 11px; line-height: 1.7; padding: 0 8px;
  border-radius: 9999px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); white-space: nowrap;
}
.badge--line   { background: transparent; }
.badge--orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.badge--green  { background: var(--green); color: #fff; border-color: var(--green); }
.badge--blue   { background: var(--blue); color: #fff; border-color: var(--blue); }
.badge--teal   { background: var(--teal); color: #fff; border-color: var(--teal); }
.badge--red    { background: var(--red); color: #fff; border-color: var(--red); }
.badge--yellow { background: var(--yellow-tint); color: #8A6100; border-color: var(--yellow); }
.badge--muted  { color: var(--text-muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 9999px; background: var(--border-strong); }
.dot--red { background: var(--red); } .dot--yellow { background: var(--yellow); }
.dot--green { background: var(--green); } .dot--blue { background: var(--blue); }
.dot--muted { background: var(--border-strong); }
.hl { color: var(--orange); font-weight: 700; }
.hl-b { color: var(--blue); font-weight: 700; }

/* ---------- 行リスト ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px;
  border-bottom: 1px dashed var(--border); color: var(--text); text-decoration: none;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--orange-tint); }
.row--static:hover { background: transparent; }
.row__main { flex: 1 1 auto; min-width: 0; }
.row__title { font-size: 13px; font-weight: 500; }
.row__sub { font-size: 11.5px; color: var(--text-muted); }
.row__right { margin-left: auto; flex: 0 0 auto; }

/* ---------- 注記 ---------- */
.note {
  font-size: 12px; line-height: 1.8; padding: 10px 12px;
  background: var(--bg); border-left: 3px solid var(--border-strong); border-radius: 0 var(--r) var(--r) 0;
}
.note--alert { background: var(--red-tint); border-left-color: var(--red); }
.note--warn  { background: var(--yellow-tint); border-left-color: var(--yellow); }
.note--done  { background: var(--emerald-tint); border-left-color: var(--emerald); }
.note--info  { background: var(--blue-tint); border-left-color: var(--blue); }
.small { font-size: 11.5px; }
.muted { color: var(--text-muted); }
.strong { font-weight: 700; color: var(--text-strong); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 6px 18px; font-size: 13px; font-weight: 700;
  border-radius: var(--r); border: 1px solid var(--orange);
  background: var(--orange); color: #fff; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn--secondary { background: var(--surface); color: var(--orange-dark); }
.btn--secondary:hover { background: var(--orange-tint); }
.btn--green { background: var(--green); border-color: var(--green); }
.btn--green:hover { background: var(--green-dark); border-color: var(--green-dark); }
/* ★9/17 週案の「予定変更」ボタン（変更ありのふだと同じ色） */
.btn--yellow { background: var(--yellow); border-color: var(--yellow); color: #3b2c00; }
.btn--yellow:hover { filter: brightness(.94); }
/* ★9/18 週案の「未実施」ボタン（本番 app.css と同じ） */
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { filter: brightness(.92); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg); }
.btn--sm { min-height: 32px; padding: 3px 12px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-reason { font-size: 11px; color: var(--text-muted); }
.flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flex--tight { gap: 8px; }
.flex--end { justify-content: flex-end; }
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 10px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.toolbar__label { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.select, .input {
  font-family: var(--ff); font-size: 13px; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r);
  padding: 6px 10px; min-height: 36px; background: var(--surface);
}
.input--search { min-width: 200px; }

/* ---------- 統計タイル ---------- */
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 12px 14px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--border-strong);
}
.stat--accent { border-top-color: var(--orange); }
.stat--green  { border-top-color: var(--green); }
.stat--blue   { border-top-color: var(--blue); }
.stat--alert  { border-top-color: var(--red); }
.stat__label { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.stat__value { display: block; font-size: 28px; font-weight: 700; color: var(--text-strong); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat__value--text { font-size: 18px; line-height: 1.5; }
.stat__value small { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.stat__sub { display: block; font-size: 11px; color: var(--text-muted); }

/* ---------- 進捗バー ---------- */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.bar-row__name { font-size: 12px; flex: 0 0 auto; min-width: 8em; }
.bar { flex: 1 1 auto; height: 10px; background: var(--bg); border-radius: 9999px; overflow: hidden; border: 1px solid var(--border); }
.bar__fill { display: block; height: 100%; background: var(--orange); }
.bar__fill--green { background: var(--green); }
.bar__fill--red { background: var(--red); }
.bar-row__num { font-size: 12px; color: var(--text-muted); flex: 0 0 auto; min-width: 5em; text-align: right; font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack--tight { gap: 2px; }

/* ---------- 時間割・週案 ---------- */
.period {
  display: flex; align-items: baseline; gap: 12px; padding: 8px 10px;
  border-bottom: 1px dashed var(--border); font-size: 13px;
}
.period:last-child { border-bottom: 0; }
.period--now { background: var(--orange-tint); border-left: 3px solid var(--orange); }
.period--break { color: var(--text-muted); background: var(--surface-alt); }
.period__no { flex: 0 0 3.4em; font-size: 11px; color: var(--text-muted); }
.period__name { font-weight: 700; flex: 0 0 7em; white-space: nowrap; }
.period__room { margin-left: auto; font-size: 11px; color: var(--text-muted); }

.tt { width: 100%; border-collapse: collapse; font-size: 12px; }
.tt th, .tt td { border: 1px solid var(--border); padding: 6px; vertical-align: top; }
.tt thead th { background: var(--orange); color: #fff; text-align: center; }
.tt th[scope="row"] { background: var(--orange-tint); text-align: center; width: 56px; white-space: nowrap; }
.tt__subj { font-weight: 700; color: var(--text-strong); display: block; }
.tt__meta { font-size: 10.5px; color: var(--text-muted); display: block; }
.tt td.is-now { background: var(--yellow-tint); }
.tt td.is-empty { background: var(--surface-alt); }

.wcell { min-height: 74px; }
.wcell__plan, .wcell__act { display: block; font-size: 11px; line-height: 1.6; }
.wcell__plan { color: var(--text); }
.wcell__act  { color: var(--blue); border-top: 1px dotted var(--border); margin-top: 3px; padding-top: 3px; }
.wcell--diff { background: var(--yellow-tint); }
.wcell--same { background: var(--emerald-tint); }
.wcell--todo { background: var(--surface-alt); }
/* ★9/18 未実施（行わないと決めたコマ）。未記入の灰色と見分けが付くように、うすい赤にします */
.wcell--undone { background: var(--red-tint); }
/* ★9/17 週案のコマ（本番 app.css と同じ） */
.wcell__why  { display: block; font-size: 11px; line-height: 1.6; color: var(--text-muted); }
.wcell__foot { margin-top: 4px; }
/* ★9/17→9/18 コマの下の3つのボタン（実施・予定変更・未実施）と「予定を直す」。
   ［実施］はその場で決まり、ほかは押すと下に入力欄がひらきます（本番 app.css と同じ） */
.wcell__acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; margin-top: 8px; }
.wcell__acts > .btn { flex: 1 1 3.2rem; white-space: nowrap; padding-left: 4px; padding-right: 4px; font-size: .74rem; }
.wcell__ed { margin-top: 0; }
.wcell__ed > summary { display: inline-flex; align-items: center; list-style: none; cursor: pointer; }
.wcell__ed > summary::-webkit-details-marker { display: none; }
.wcell__ed > summary::marker { content: ''; }
.wcell__ed[open] > summary { margin-bottom: 6px; }
.wcell__acts > .wcell__ed { flex: 1 1 3.2rem; min-width: 0; }
.wcell__acts > .wcell__ed[open] { flex: 1 1 100%; }
.wcell__acts > .wcell__ed > summary { display: flex; width: 100%; justify-content: center;
  white-space: nowrap; padding-left: 4px; padding-right: 4px; font-size: .74rem; }
.wcell__help { margin: 6px 0 0; font-size: .72rem; line-height: 1.5; color: var(--muted); }
.wcell__form { width: 100%; max-width: 100%; }
.wcell__form .input { margin-bottom: 4px; }

/* ---------- 出欠カード ---------- */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 10px; }
.rcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow-sm); }
.rcard--attn { border-color: var(--red); background: var(--red-tint); }
.rcard--noted { border-color: var(--border-strong); background: var(--surface-alt); }
.rcard__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.rcard__no { font-size: 11px; color: var(--text-muted); width: 2em; }
.rcard__name { font-size: 13px; font-weight: 700; }
.rcard__memo { font-size: 11px; color: var(--text-muted); margin-top: 8px; min-height: 2.6em; line-height: 1.6; }
.seg { display: flex; border: 1px solid var(--border-strong); border-radius: var(--r); overflow: hidden; }
.seg__btn { white-space: nowrap;
  flex: 1 1 0; min-height: 36px; border: 0; border-right: 1px solid var(--border-strong);
  background: var(--surface); font-size: 12px; color: var(--text); cursor: pointer;
}
.seg__btn:last-child { border-right: 0; }
.seg__btn:hover { background: var(--orange-tint); }
.seg__btn[aria-pressed="true"] { background: var(--orange); color: #fff; font-weight: 700; }

.summary-bar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 12px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.summary-bar.mb-0 { margin-bottom: 0; }
.summary-bar__item { font-size: 11px; color: var(--text-muted); display: flex; align-items: baseline; gap: 6px; }
.summary-bar__num { font-size: 22px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.summary-bar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- 児童生徒ピッカー ---------- */
.picker { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); max-height: 620px; overflow-y: auto; box-shadow: var(--shadow-sm); }
.picker__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px;
  padding: 6px 12px; border: 0; border-bottom: 1px solid var(--border);
  background: var(--surface); font-size: 13px; color: var(--text); cursor: pointer; text-align: left;
}
.picker__item:last-child { border-bottom: 0; }
.picker__item:hover { background: var(--orange-tint); }
.picker__item.is-active { background: var(--orange); color: #fff; font-weight: 700; }
.picker__item.is-active .picker__no, .picker__item.is-active .picker__state { color: rgba(255,255,255,.9); }
.picker__no { font-size: 11px; color: var(--text-muted); width: 2em; }
.picker__state { margin-left: auto; font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ---------- 定義リスト ---------- */
.dl { display: grid; grid-template-columns: 8.5em 1fr; gap: 0; font-size: 12.5px; }
.dl dt { padding: 6px 8px; background: var(--orange-tint); border-bottom: 1px solid var(--surface); font-weight: 700; color: var(--text-strong); }
.dl dd { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.source { font-size: 12px; }
.source li { padding: 4px 0 4px 14px; position: relative; line-height: 1.7; }
.source li::before { content: '■'; position: absolute; left: 0; color: var(--orange); font-size: 9px; top: 7px; }

/* ---------- 評価グリッド ---------- */
.eval { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r); overflow: hidden; }
.eval__btn {
  min-width: 30px; min-height: 30px; border: 0; border-right: 1px solid var(--border-strong);
  background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.eval__btn:last-child { border-right: 0; }
.eval__btn:hover { background: var(--orange-tint); }
.eval__btn[aria-pressed="true"] { background: var(--orange); color: #fff; }
.eval__btn[aria-pressed="true"][data-v="C"] { background: var(--red); }
.eval__btn[aria-pressed="true"][data-v="A"] { background: var(--green); }
.grade-pill {
  display: inline-block; min-width: 26px; text-align: center; font-weight: 700; font-size: 13px;
  border-radius: var(--r); padding: 1px 6px; background: var(--bg); border: 1px solid var(--border-strong);
}
.grade-pill--5, .grade-pill--A { background: var(--green); color: #fff; border-color: var(--green); }
.grade-pill--4 { background: var(--emerald-tint); color: var(--emerald); border-color: var(--emerald); }
.grade-pill--3, .grade-pill--B { background: var(--blue-tint); color: var(--blue); border-color: var(--blue); }
.grade-pill--2 { background: var(--yellow-tint); color: #8A6100; border-color: var(--yellow); }
.grade-pill--1, .grade-pill--C { background: var(--red-tint); color: var(--red); border-color: var(--red); }

/* ---------- 面談枠 ---------- */
.slot-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.slot-table th, .slot-table td { border: 1px solid var(--border); padding: 4px; text-align: center; }
.slot-table thead th, .slot-table tr:first-child th { background: var(--orange); color: #fff; }
.slot-table th[scope="row"] { background: var(--orange-tint); }
.slot { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; min-width: 62px; font-size: 12px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); cursor: default; }
.slot--booked { background: var(--blue); color: #fff; border-color: var(--blue); }
.slot--open { background: var(--surface); color: var(--orange-dark); border-color: var(--orange); cursor: pointer; font-weight: 700; }
.slot--open:hover { background: var(--orange-tint); }
.slot--closed { background: var(--bg); color: var(--text-muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--text-muted); }
.legend__item { display: flex; align-items: center; gap: 6px; }

/* ---------- ステップ ---------- */
.steps { display: flex; flex-direction: column; gap: 8px; }
.step { font-size: 12px; padding: 8px 10px; background: var(--surface-alt); border-radius: var(--r); border-left: 3px solid var(--green); }
.step__num { font-size: 10px; color: var(--green); font-weight: 700; margin-right: 8px; }
.step__title { font-weight: 700; margin-right: 8px; color: var(--text-strong); }

/* ---------- 入力 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-strong); margin-bottom: 4px; }
.field__hint { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; line-height: 1.7; }
.textarea {
  width: 100%; min-height: 190px; font-family: var(--ff); font-size: 13px; line-height: 1.9;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r); padding: 10px 12px; resize: vertical;
}
.editor-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.counter { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* ---------- 帳票プレビュー ---------- */
.form-list { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.form-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 12.5px; color: var(--text); min-height: 44px;
}
.form-item:last-child { border-bottom: 0; }
.form-item:hover { background: var(--orange-tint); }
.form-item.is-active { background: var(--orange); color: #fff; }
.form-item.is-active .muted, .form-item.is-active .badge { color: #fff; border-color: rgba(255,255,255,.6); background: transparent; }
.form-item__name { font-weight: 700; }
.form-item__meta { margin-left: auto; font-size: 11px; }
.paper {
  background: #fff; border: 1px solid var(--border-strong); border-radius: 2px;
  padding: 20px 22px; box-shadow: var(--shadow-md); font-size: 12px;
}
.paper__head { text-align: center; margin-bottom: 14px; }
.paper__title { font-size: 17px; font-weight: 700; letter-spacing: .3em; color: var(--text-strong); }
.paper__sub { font-size: 11px; color: var(--text-muted); }
.paper table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.paper th, .paper td { border: 1px solid #9A9A9A; padding: 4px 6px; }
.paper th { background: #F0F0F2; font-weight: 700; text-align: center; }
.paper td.center { text-align: center; }
.paper__seal { float: right; border: 1px solid var(--red); color: var(--red); font-size: 10px; padding: 8px 10px; border-radius: 4px; }
.watermark { text-align: center; font-size: 10px; color: var(--text-muted); letter-spacing: .3em; margin-top: 10px; }

/* ---------- チャート ---------- */
.chart { width: 100%; max-width: 720px; height: auto; display: block; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-axis { stroke: var(--border-strong); stroke-width: 1; }
.ch-ref { stroke: var(--red); stroke-width: 1; stroke-dasharray: 4 3; }
.ch-ref-label { fill: var(--red); font-size: 11px; font-family: var(--ff); }
.ch-label { fill: var(--text-muted); font-size: 12px; font-family: var(--ff); }
.ch-value { fill: var(--text-strong); font-size: 12px; font-weight: 700; font-family: var(--ff); }
.ch-fill-1 { fill: var(--c1); } .ch-fill-2 { fill: var(--c2); }
.ch-fill-3 { fill: var(--c3); } .ch-fill-4 { fill: var(--c4); }
.ch-fill-5 { fill: var(--c5); } .ch-fill-6 { fill: var(--c6); }
.ch-line-1 { fill: none; stroke: var(--c1); stroke-width: 2; }
.ch-line-2 { fill: none; stroke: var(--c2); stroke-width: 2; }
.ch-dot-1 { fill: var(--c1); } .ch-dot-2 { fill: var(--c2); }

/* ---------- トースト ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--text-strong); color: #fff; font-size: 13px;
  padding: 10px 20px; border-radius: 9999px; box-shadow: var(--shadow-md); z-index: 60; max-width: 90vw;
}

/* ---------- 余白ユーティリティ ---------- */
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.perm-yes { color: var(--green); font-weight: 700; }
.perm-no { color: var(--text-muted); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1180px) {
  .grid--8 { grid-template-columns: repeat(4, 1fr); }
  .span-5, .span-8 { grid-column: span 4; } .span-6 { grid-column: span 4; }
}
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar { position: static; width: auto; height: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav { flex-direction: row; flex-wrap: wrap; padding: 8px; }
  .nav__item { border-left: 0; border-bottom: 3px solid transparent; border-radius: var(--r); }
  .nav__item.is-active { border-left: 0; border-bottom-color: var(--orange); }
  .nav__group { display: none; }
  .sidebar__foot { display: none; }
  .crumbbar { top: 0; position: static; }
  .grid--8, .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4, .span-5, .span-6, .span-8 { grid-column: span 1; }
  .topband { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .view { padding: 16px 12px; }
}


/* ============================================================
   簡単モード
   ・使う機能だけを大きく・少なく見せる表示モード
   ・通常モードのスタイルは変えず、body.is-simple で上書きする
   ============================================================ */

/* ---- ヘッダーのモード切替 ---- */
.modesw { display: flex; background: rgba(255,255,255,.9); border-radius: 9999px; padding: 3px; gap: 2px; }
.modesw__btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--green-dark);
  padding: 5px 14px; border-radius: 9999px; line-height: 1.4;
}
.modesw__btn[aria-pressed="true"] { background: var(--blue); color: #fff; }
.modesw__btn:hover { background: var(--blue-tint); color: var(--blue); }
.modesw__btn[aria-pressed="true"]:hover { background: var(--blue); color: #fff; }

/* ---- 簡単モードのメニュー（大きく・少なく） ---- */
.is-simple .nav__item { min-height: 52px; font-size: 15px; padding: 12px 14px; }
.is-simple .nav__key { display: none; }
.is-simple .nav__group { display: none; }
.is-simple .sidebar { width: 200px; flex: 0 0 200px; }
.is-simple .crumbbar { font-size: 13px; }
.is-simple .view { padding: 28px 28px 8px; }
.is-simple .page-head h1 { font-size: 22px; }
.is-simple .page-lead { font-size: 14px; }
.is-simple .page-head .page-lead { font-size: 13px; }
.is-simple .card__title { font-size: 16px; }
.is-simple .table { font-size: 13.5px; }
.is-simple .table th, .is-simple .table td { padding: 9px 12px; }
.is-simple .tab { font-size: 14px; padding: 11px 22px; }
.is-simple .btn { min-height: 44px; font-size: 14px; padding: 8px 22px; }
.is-simple .seg__btn { min-height: 46px; font-size: 14px; }
.is-simple .rcard__name { font-size: 15px; }

/* ---- 簡単モードのホーム ---- */
.simple-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--green);
  border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.simple-hero__title { font-size: 24px; color: var(--text-strong); }
.simple-hero__sub { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.simple-hero__badge {
  margin-left: auto; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 14px; border-radius: 9999px;
}
.simple-h2 { font-size: 17px; color: var(--text-strong); margin-bottom: 10px; padding-left: 12px; position: relative; }
.simple-h2::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px;
  border-radius: 3px; background: var(--orange);
}
.simple-card { padding: 10px 14px; }
.simple-empty { font-size: 14px; color: var(--text-muted); padding: 14px 4px; }

/* 大きな操作ボタン */
.bigbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bigbtn {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow-sm); min-height: 82px; color: var(--text);
}
.bigbtn:hover { border-color: var(--orange); background: var(--orange-tint); }
.bigbtn__icon {
  flex: 0 0 46px; height: 46px; border-radius: 12px; background: var(--green-tint); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
}
.bigbtn__body { flex: 1 1 auto; min-width: 0; }
.bigbtn__title { display: block; font-size: 16px; font-weight: 700; color: var(--text-strong); }
.bigbtn__sub { display: block; font-size: 12.5px; color: var(--text-muted); }
.bigbtn__arrow { font-size: 24px; color: var(--border-strong); }
.bigbtn--attn { border-color: var(--red); background: var(--red-tint); }
.bigbtn--attn .bigbtn__icon { background: var(--red); color: #fff; }
.bigbtn--attn .bigbtn__sub { color: var(--red); font-weight: 700; }
.bigbtn--warn { border-color: var(--yellow); background: var(--yellow-tint); }
.bigbtn--warn .bigbtn__icon { background: var(--yellow); color: #fff; }
.bigbtn--done .bigbtn__icon { background: var(--emerald-tint); color: var(--emerald); }

/* 今日やること */
.taskrow {
  display: flex; align-items: center; gap: 14px; padding: 14px 6px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.taskrow:last-child { border-bottom: 0; }
.taskrow:hover { background: var(--orange-tint); }
.tasrow__no {
  flex: 0 0 30px; height: 30px; border-radius: 9999px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.tasrow__main { flex: 1 1 auto; min-width: 0; }
.tasrow__title { display: block; font-size: 15px; font-weight: 700; color: var(--text-strong); }
.tasrow__sub { display: block; font-size: 12.5px; color: var(--text-muted); }
.tasrow__go {
  flex: 0 0 auto; background: var(--surface); border: 1px solid var(--orange); color: var(--orange-dark);
  font-size: 13px; font-weight: 700; padding: 6px 16px; border-radius: 9999px;
}

/* 今日の授業・出欠のようす */
.simple-period { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--border); font-size: 14px; }
.simple-period:last-child { border-bottom: 0; }
.simple-period.is-now { background: var(--orange-tint); border-radius: var(--r); }
.simple-period__no { flex: 0 0 2.4em; font-size: 12px; color: var(--text-muted); }
.simple-period__name { font-weight: 700; color: var(--text-strong); }
.simple-period__room { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.simple-nums { display: flex; gap: 18px; flex-wrap: wrap; padding: 6px 0; }
.simple-nums span { font-size: 12px; color: var(--text-muted); display: flex; align-items: baseline; gap: 5px; }
.simple-nums b { font-size: 26px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.simple-nums .is-attn b { color: var(--red); }
.btn--lg { min-height: 48px; font-size: 15px; width: 100%; }

/* ---- 管理画面：簡単モードの設定 ---- */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.preset {
  text-align: left; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer; font-family: var(--ff);
}
.preset:hover { border-color: var(--orange); background: var(--orange-tint); }
.preset.is-active { border-color: var(--orange); border-width: 2px; background: var(--orange-tint); }
.preset__name { display: block; font-size: 14px; font-weight: 700; color: var(--text-strong); }
.preset__desc { display: block; font-size: 11.5px; color: var(--text-muted); line-height: 1.6; margin: 2px 0 6px; }
.preset__count { display: inline-block; font-size: 11px; color: var(--orange-dark); border: 1px solid var(--orange); border-radius: 9999px; padding: 0 8px; }

.chk {
  min-width: 62px; min-height: 32px; border-radius: 9999px; cursor: pointer; font-family: var(--ff);
  font-size: 12px; font-weight: 700; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text-muted);
}
.chk[aria-checked="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.chk:hover { border-color: var(--orange); }
.feat-table tr.feat-group th {
  background: var(--bg); color: var(--text-muted); font-size: 11px; letter-spacing: .1em; text-align: left;
}
.feat-table tr.is-off td { opacity: .5; }

.navpv { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
/* 設定 → 簡単モードの一覧で、絵と機能名を1行に並べる */
.feat-name { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.navpv__item .ico { width: 14px; height: 14px; margin-right: 2px; }
.navpv__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.navpv__item:last-child { border-bottom: 0; }
.navpv__no { font-size: 10px; color: var(--text-muted); }

@media (max-width: 900px) {
  .is-simple .sidebar { width: auto; flex: none; }
  .bigbtns { grid-template-columns: 1fr; }
}

/* ============================================================
   チャット（標準機能）
   色はこの作りのキーカラーをそのまま使います（チャット専用の色は増やしません）。
     自分のふきだし … --green      ／ 相手のふきだし … --surface
     未読のしるし   … --orange     ／ 話している場所 … --bg
   ============================================================ */
.ch-wrap {
  display: grid; grid-template-columns: 300px 1fr; gap: 0;
  height: calc(100vh - 230px); min-height: 520px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}

/* ---- 左：部屋の一覧 ---- */
.ch-side { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-width: 0; }
.ch-side__head { padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.ch-search { display: flex; gap: 6px; }
.ch-search input[type="search"] { flex: 1; min-width: 0; }
.ch-kinds { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.ch-kind {
  font-size: 11px; padding: 2px 10px; border-radius: 20px;
  border: 1px solid var(--border-strong); color: var(--text); background: var(--surface);
}
.ch-kind:hover { background: var(--green-tint); border-color: var(--green); }
.ch-kind.is-active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }

.ch-rooms { flex: 1; overflow-y: auto; }
.ch-room {
  display: flex; gap: 10px; align-items: flex-start; width: 100%;
  padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left;
  color: var(--text); background: var(--surface);
}
.ch-room:hover { background: var(--green-tint); }
.ch-room.is-active { background: var(--green-tint); box-shadow: inset 3px 0 0 var(--green); }
.ch-room__icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--green);
}
.ch-room__icon--dm     { background: var(--teal); }
.ch-room__icon--group  { background: var(--orange); }
.ch-room__icon--school { background: var(--green); }
.ch-room__body { min-width: 0; flex: 1; }
.ch-room__top { display: flex; align-items: baseline; gap: 6px; }
.ch-room__name {
  font-size: 13px; font-weight: 700; color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ch-room__time { margin-left: auto; font-size: 11px; color: var(--text-muted); flex: none; }
.ch-room__prev {
  font-size: 11px; color: var(--text-muted); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ch-room.is-unread .ch-room__name,
.ch-room.is-unread .ch-room__prev { color: var(--text-strong); font-weight: 700; }
.ch-unread {
  flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 20px;
  background: var(--orange); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.ch-side__foot { padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface-alt); }

/* ---- 右：話している場所 ---- */
.ch-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.ch-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.ch-head__name { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.ch-head__meta { font-size: 11px; color: var(--text-muted); }
.ch-head__right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.ch-msgs { flex: 1; overflow-y: auto; padding: 16px; scroll-behavior: smooth; }
.ch-empty { color: var(--text-muted); text-align: center; padding: 48px 16px; font-size: 13px; }

.ch-datesep { text-align: center; margin: 14px 0 10px; }
.ch-datesep span {
  display: inline-block; padding: 2px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
}

.ch-msg { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-end; }
.ch-msg.ch-mine { flex-direction: row-reverse; }
.ch-msg.ch-cont { margin-top: -6px; }
.ch-msg__av {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal-tint); color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.ch-msg__av--blank { background: transparent; }
/* 自分のふきだしには、自分の顔は出しません（誰の発言かは色と位置で分かります） */
.ch-msg.ch-mine .ch-msg__av { display: none; }
.ch-msg__col {
  min-width: 0; max-width: 74%;
  display: flex; flex-direction: column; align-items: flex-start;
}
.ch-msg.ch-mine .ch-msg__col { align-items: flex-end; }
.ch-msg__who { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }

.ch-bubble {
  display: inline-block; padding: 8px 12px; font-size: 13px; line-height: 1.75;
  border-radius: 14px 14px 14px 4px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); word-break: break-word;
}
.ch-mine .ch-bubble {
  border-radius: 14px 14px 4px 14px; background: var(--green);
  border-color: var(--green); color: #fff;
}
.ch-cont .ch-bubble { border-radius: 14px; }
.ch-bubble--gone {
  background: transparent; border-style: dashed; color: var(--text-muted);
  font-style: italic; border-radius: 14px;
}

.ch-quote {
  display: block; padding: 4px 8px; margin-bottom: 6px; border-radius: var(--r);
  background: var(--green-tint); border-left: 3px solid var(--green);
  font-size: 11px; color: var(--text); line-height: 1.6;
}
.ch-mine .ch-quote { background: rgba(255,255,255,.22); border-left-color: rgba(255,255,255,.75); color: #fff; }
.ch-quote b { display: block; font-size: 11px; }

.ch-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ch-att {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 10px; border-radius: var(--r); font-size: 11px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
}
.ch-att:hover { background: var(--green-tint); border-color: var(--green); }
.ch-att__thumb { display: block; max-width: 180px; max-height: 150px; border-radius: var(--r); border: 1px solid var(--border); }
.ch-edited { font-size: 10px; opacity: .75; margin-left: 6px; }

.ch-side-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 10px; color: var(--text-muted); flex: none; padding-bottom: 2px;
}
.ch-msg:not(.ch-mine) .ch-side-meta { align-items: flex-start; }
.ch-read { color: var(--green-dark); font-weight: 700; }

.ch-acts { display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.ch-msg:hover .ch-acts, .ch-acts:focus-within { opacity: 1; }
.ch-acts button {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted);
  border-radius: var(--r); font-size: 11px; padding: 1px 7px; min-height: 22px; cursor: pointer;
}
.ch-acts button:hover { background: var(--orange-tint); color: var(--orange-dark); border-color: var(--orange); }

/* ---- 入力するところ ---- */
.ch-composer { border-top: 1px solid var(--border); background: var(--surface); padding: 10px 14px; }
.ch-replybar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  padding: 6px 10px; border-radius: var(--r);
  background: var(--green-tint); border-left: 3px solid var(--green); font-size: 11px;
}
.ch-replybar__body { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.ch-inputrow textarea {
  flex: 1; min-height: 44px; max-height: 140px; resize: vertical;
  font-size: 13px; line-height: 1.7;
}
.ch-file {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
.ch-file:hover { background: var(--green-tint); border-color: var(--green); }
.ch-file input { display: none; }
.ch-composer__hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ---- 右の引き出し（部屋の情報・新しいやりとり） ---- */
.ch-wrap--panel { grid-template-columns: 300px 1fr 320px; }
.ch-panel {
  width: 320px; flex: none; border-left: 1px solid var(--border);
  background: var(--surface); overflow-y: auto; padding: 14px;
}
.ch-panel h3 { font-size: 13px; margin-bottom: 8px; }
.ch-picker { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r); padding: 8px; }
.ch-picker label { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 2px; font-weight: 400; }
.ch-memberlist { font-size: 12px; }
.ch-memberlist li { display: flex; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border); }

@media (max-width: 1100px) {
  .ch-wrap { grid-template-columns: 230px 1fr; }
  .ch-wrap--panel { grid-template-columns: 230px 1fr 260px; }
  .ch-msg__col { max-width: 84%; }
  .ch-panel { width: 260px; }
}

/* 印刷では、やりとりは出しません（個人の連絡なので紙に残しません） */
@media print { .ch-wrap { display: none; } }

/* ============================================================
   左メニューを畳んだとき
     ・機能名・番号・「OP」・まとまりの見出しを隠し、絵だけにします
     ・押す場所（当たり）は変えません。行の高さもそのままです
     ・マウスを乗せると、機能名が吹き出し（title）で出ます
   ============================================================ */
.is-nav-collapsed .sidebar { width: 62px; flex: 0 0 62px; }
.is-nav-collapsed .nav__item { justify-content: center; padding-left: 6px; padding-right: 6px; gap: 0; }
.is-nav-collapsed .nav__key,
.is-nav-collapsed .nav__label,
.is-nav-collapsed .nav__op,
.is-nav-collapsed .nav__tag,
.is-nav-collapsed .nav__note,
.is-nav-collapsed .sidebar__foot { display: none; }

/* まとまりの見出しは、色の線だけを残します（区切りが分かるように） */
.is-nav-collapsed .nav__group {
  font-size: 0; padding: 8px 0 0; margin: 0 10px;
  border-left: 0; border-top: 2px solid currentColor; opacity: .5;
}

/* 未読の数は、畳んでも見えないと困るので、絵の右上に小さく重ねます */
.is-nav-collapsed .nav__item { position: relative; }
.is-nav-collapsed .nav__count {
  position: absolute; top: 4px; right: 6px;
  min-width: 14px; padding: 1px 3px; font-size: 9px;
}
.is-nav-collapsed .ico { width: 21px; height: 21px; }

@media print { .topband__menu { display: none; } }

/* ============================================================
   二段階認証（PHP版 public/css/app.css と同じ見た目）
   ============================================================ */
.qr {
  flex: none;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 0;
}
.qr svg { display: block; width: 190px; height: 190px; }

.mfa-body { flex: 1 1 320px; min-width: 0; }
.mfa-steps { margin: 8px 0 0 20px; list-style: decimal; }
.mfa-steps > li { margin-bottom: 12px; line-height: 1.9; }

.input--date { max-width: 200px; }
.flex--top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.mt-0 { margin-top: 0; }


/* スクールバスの年間予定（月ごとのカレンダー） */
.table tr.is-off td { opacity: .55; }
.buscal td, .buscal th { padding: 4px 2px; }
.buscal__cell { text-align: center; vertical-align: top; height: 40px; }
.buscal__cell.is-blank, .buscal__cell.is-off { background: var(--bg, #f3f4f2); }
.buscal__day { display: block; font-size: 11px; color: var(--text-muted, #7a8676); line-height: 1.2; }
.buscal__num { display: block; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.buscal__num.is-fixed { color: var(--green, #2e7d32); }
.buscal__rest { display: block; font-size: 11px; color: var(--text-muted, #7a8676); }

.buscal__cell.is-picked { outline: 2px solid var(--orange, #e8590c); outline-offset: -2px; }
.buscal__link { display: block; text-decoration: none; color: inherit; }
.buscal__link:hover { background: var(--orange-tint, #fff4ec); }
.buscal__num.is-none { color: var(--text-muted, #9aa39b); font-weight: 400; }


/* スクールバスの登録（行き・帰りを1つの表に） */
.busreg .dirhead { font-size: 12px; letter-spacing: .02em; }
.busreg .dirhead--go { background: var(--green, #2e7d32); }
.busreg .dirhead--back { background: var(--blue, #1565c0); }
.busreg td.cellsep, .busreg th.cellsep { border-left: 2px solid var(--border-strong, #c9d1c6); }

.buscal__dot { color: var(--orange, #e8590c); font-size: 8px; margin-left: 2px; vertical-align: 2px; }

/* ============================================================
   タイムカード（打刻・一覧の編集・出勤簿の出力）
   ============================================================ */
.tc-punch { text-align: center; padding: 8px 4px 4px; }
.tc-punch__day { font-size: 13px; color: var(--text-muted); letter-spacing: .04em; }
.tc-punch__time { font-size: 56px; font-weight: 700; line-height: 1.15; color: var(--text-strong); display: flex; justify-content: center; gap: 14px; }
.tc-punch__colon { color: var(--text-muted); }
.tc-punch__stamps { display: flex; gap: 8px; margin: 6px auto 8px; max-width: 260px; }
.tc-punch__stamp { flex: 1; font-size: 15px; font-weight: 700; color: var(--text); min-height: 22px; }
.tc-punch__date { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.tc-punch__btns { display: flex; gap: 6px; margin: 0 auto; max-width: 260px; }
.tc-btn {
  flex: 1; min-height: 48px; border: 0; border-radius: 6px; font: inherit; font-size: 16px; font-weight: 700;
  background: #8C8C8C; color: #fff; cursor: not-allowed; letter-spacing: .06em;
}
.tc-btn.is-ready { background: var(--orange); cursor: pointer; box-shadow: var(--shadow-sm); }
.tc-btn.is-ready:hover { background: var(--orange-dark); }
.tc-btn:disabled { opacity: .85; }

/* 「今日」の上の帯 */
.tc-strip { display: flex; align-items: center; gap: 24px; padding: 10px 18px; }
.tc-strip .tc-punch { flex: none; display: flex; align-items: center; gap: 16px; text-align: left; padding: 0; }
.tc-strip .tc-punch__time { font-size: 30px; gap: 6px; }
.tc-strip .tc-punch__stamps { margin: 0; max-width: none; flex-direction: column; gap: 0; min-width: 96px; }
.tc-strip .tc-punch__stamp { min-height: 0; font-size: 13px; }
.tc-strip .tc-punch__btns { margin: 0; max-width: none; }
.tc-strip .tc-btn { min-height: 40px; min-width: 88px; font-size: 14px; }
.tc-strip__side { flex: 1; line-height: 1.8; }
@media (max-width: 720px) {
  .tc-strip { flex-direction: column; align-items: stretch; }
  .tc-strip .tc-punch { flex-wrap: wrap; justify-content: center; }
}

/* 一覧の編集 */
.tc-table th[scope="row"] { font-weight: 700; }
.tc-table tr.is-editing td { background: var(--bg) !important; }
.tc-table tr.is-applied td, .tc-table tr.is-applied th { background: var(--orange-tint) !important; }
.tc-time { width: 84px; padding: 4px 6px; text-align: center; }
.tc-ico {
  background: transparent; border: 0; cursor: pointer; padding: 4px; margin: 0 1px; border-radius: 4px;
  color: var(--text-muted); vertical-align: middle;
}
.tc-ico:hover { background: var(--orange-tint); color: var(--orange-dark); }
.tc-ico--save { color: var(--text-strong); }
.tc-ico--del { color: var(--red); }
.tc-ico .ico { width: 18px; height: 18px; }

/* オプション画面（整理用語・見出番号・備考） */
.tc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; }
.tc-dialog {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 61;
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.tc-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--border); }
.tc-dialog__body { padding: 14px; }
.tc-dialog__body .select, .tc-dialog__body .input { width: 100%; }
.tc-dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }

/* 出勤簿の出力：氏名の選択 */
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-chip {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer;
}
.tc-chip:hover { background: var(--orange-tint); }
.tc-chip.is-on { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }

/* 出勤簿の見本 */
.tc-book__title { text-align: center; font-weight: 700; letter-spacing: .2em; margin-bottom: 8px; }
.tc-book__tbl { border-collapse: collapse; width: 100%; font-size: 11px; }
.tc-book__tbl td, .tc-book__tbl th { border: 1px solid #555; vertical-align: top; }
.tc-book__m { width: 28px; text-align: center; font-weight: 700; vertical-align: middle !important; }
.tc-book__cell { width: 5.6%; height: 44px; padding: 0; }
.tc-book__cell.is-off .tc-book__d { color: var(--red); }
.tc-book__d { display: block; text-align: center; font-size: 10px; border-bottom: 1px solid #bbb; line-height: 1.5; }
.tc-book__b { display: block; text-align: center; padding-top: 3px; line-height: 1.2; }
.tc-book__term { font-size: 8px; display: block; padding: 2px 1px; }
.tc-book__side { width: 110px; padding: 6px; line-height: 1.6; vertical-align: top; }

/* ---- ホーム（今日）の3列 ---- */
.home3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }   /* ★9/20 3列は同じ幅 */
.home3__col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home3 .card { margin-bottom: 0; }
.home3 .summary-bar__item { padding: 6px 4px; }
.home3__col--narrow .summary-bar { flex-wrap: wrap; }
@media (max-width: 900px) { .home3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home3__col:last-child { grid-column: 1 / -1; } }
@media (max-width: 720px)  { .home3 { grid-template-columns: 1fr; } .home3__col:last-child { grid-column: auto; } }

/* ============================================================
   ファイル管理（エクスプローラー風）
   ============================================================ */
.fm { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.fm .card { margin-bottom: 0; }
.fm-side { padding: 12px 8px; }
.fm-side .card__head { padding: 0 8px; }
.fm-tree { list-style: none; margin: 0; padding: 0; }
.fm-node { display: flex; align-items: center; border-radius: 6px; }
.fm-node:hover { background: var(--orange-tint); }
.fm-node.is-active { background: var(--orange); color: #fff; }
.fm-node.is-active .fm-cnt { color: #fff; border-color: rgba(255,255,255,.6); }
.fm-tw { flex: none; width: 18px; background: transparent; border: 0; color: inherit; cursor: pointer; font: inherit; font-size: 11px; padding: 0; opacity: .7; }
.fm-node__btn { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; background: transparent; border: 0; color: inherit; font: inherit; text-align: left; padding: 6px 6px 6px 2px; cursor: pointer; border-radius: 6px; }
.fm-node__btn span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-node__btn .ico { flex: none; width: 16px; height: 16px; }
.fm-cnt { margin-left: auto; font-size: 10px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; }
.fm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.fm-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.fm-crumb { background: transparent; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 2px 4px; border-radius: 4px; }
.fm-crumb:hover { background: var(--orange-tint); }
.fm-crumb.is-current { color: var(--text-strong); font-weight: 700; }
.fm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-search { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 6px; background: var(--surface); }
.fm-search .ico { width: 16px; height: 16px; color: var(--text-muted); }
.fm-search .input { border: 0; min-width: 280px; padding: 6px 4px; }
.fm-search .input:focus { outline: none; }
.fm-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-tint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fm-table tr.fm-row { cursor: pointer; }
.fm-table tr.fm-row:hover td { background: var(--orange-tint); }
/* ★9/19 エクスプローラー風に見やすく：パンくずは住所欄ふうに、木の行は詰めて、ボタンは横に */
.fm-crumbs { flex: 1 1 260px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; min-height: 32px; }
.fm-crumb.is-current { display: inline-flex; align-items: center; gap: 4px; }
.fm-node__btn { padding: 4px 6px 4px 2px; font-size: 13px; }
.fm-tree ul { padding-left: 14px; }
.fm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 8px; }
.fm-actions .fm-panel { margin-bottom: 0; }
.fm-actions .fm-panel[open] { flex-basis: 100%; }
.fm-table th, .fm-table td { padding-top: 6px; padding-bottom: 6px; }
.fm-table tr.fm-row.is-pick td { background: var(--orange-tint); }
.fm-row--dir .fm-name .ico { color: var(--orange); }
.fm-side .card__title { font-size: 13px; }

.fm-table tr.fm-row--dir { cursor: default; }
.fm-name { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-align: left; }
.fm-name .ico { width: 16px; height: 16px; color: var(--orange); }
.fm-name__t { font-weight: 600; }
.fm-kind { display: inline-block; min-width: 38px; text-align: center; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .04em; border-radius: 3px; padding: 2px 4px; }
.fm-detail__icon .fm-kind { font-size: 13px; padding: 8px 12px; }
.fm-detail__name { font-size: 15px; margin: 10px 0 12px; word-break: break-all; }
.fm-dl { display: grid; grid-template-columns: 52px 1fr; gap: 4px 8px; font-size: 12px; margin: 0 0 12px; }
.fm-dl dt { color: var(--text-muted); }
.fm-dl dd { margin: 0; }
.fm-detail__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-detail--empty { min-height: 160px; display: flex; align-items: center; }
@media (max-width: 1100px) { .fm { grid-template-columns: 200px minmax(0, 1fr); } .fm-right { grid-column: 1 / -1; } }
@media (max-width: 720px)  { .fm { grid-template-columns: 1fr; } .fm-right { grid-column: auto; } .fm-search .input { min-width: 160px; } }
.fm-search .input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

/* ---- 上の帯：学校名の右に本人の名前 ／ 左メニューの上に打刻 ---- */
.topband__user { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.45); }
.sidebar__punch { padding: 10px 10px 6px; border-bottom: 1px solid var(--border); }
.tc-punch--side { padding: 0; }
.tc-punch--side .tc-punch__day { font-size: 11px; }
.tc-punch--side .tc-punch__time { font-size: 30px; gap: 6px; }
.tc-punch--side .tc-punch__stamps { margin: 2px auto 6px; gap: 4px; }
.tc-punch--side .tc-punch__stamp { font-size: 12px; min-height: 18px; }
.tc-punch--side .tc-btn { min-height: 36px; font-size: 13px; }
.is-nav-collapsed .sidebar__punch { display: none; }
@media (max-width: 720px) { .topband__user { display: none; } }

/* ---- リンク集 ---- */
.lk-table td { vertical-align: top; }
.lk-name { font-weight: 700; color: var(--text-strong); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.lk-name:hover { color: var(--orange-dark); text-decoration: underline; }
.lk-name .ico { width: 13px; height: 13px; color: var(--text-muted); }
.lk-radio { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.lk-radio:has(:checked) { background: var(--orange-tint); border-color: var(--orange); font-weight: 700; }
.lk-preview { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); padding: 10px 12px; font-size: 13px; }
.lk-preview__h { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px; }
.lk-preview__g { color: var(--text-muted); font-size: 11px; margin: 8px 0 2px 10px; }
.lk-preview__i { padding: 3px 0 3px 22px; position: relative; }
.lk-preview__i::before { content: ''; position: absolute; left: 10px; top: 50%; width: 8px; border-top: 1px solid var(--text-muted); }
.lk-preview__i.is-new { color: var(--orange-dark); font-weight: 700; }

/* スクールバス：出欠で乗らない向き（★9/10 遅刻は行き・早退は帰り）。理由を赤い文字で出し、入力を止めます */
.bus-off-reason { color: var(--red); font-weight: 700; font-size: 12px; white-space: nowrap; }
.busreg td.bus-off { background: var(--bg, #f3f4f2); }
.bus-offs .bus-off-reason { font-size: 13px; }
.home3 .bus-off-today td, .home3 .bus-off-today th { white-space: nowrap; }
.home3 .bus-off-today td:last-child .bus-off-reason { white-space: normal; }

/* ---- 出欠（日別）：確定したあとも、選んでいる区分だけは色つきで残す（★9/11） ---- */
.seg__btn--present[aria-pressed="true"] { background: var(--green); color: #fff; }
.seg__btn--absent[aria-pressed="true"]  { background: var(--red); color: #fff; }
.seg__btn--late[aria-pressed="true"],
.seg__btn--early[aria-pressed="true"]   { background: var(--yellow); color: var(--text-strong); }
.seg.is-confirmed .seg__btn { cursor: not-allowed; }
.seg.is-confirmed .seg__btn:hover { background: var(--surface); }
.seg.is-confirmed .seg__btn[aria-pressed="false"] { opacity: .4; }
.seg.is-confirmed .seg__btn--present[aria-pressed="true"]:hover { background: var(--green); }
.seg.is-confirmed .seg__btn--absent[aria-pressed="true"]:hover  { background: var(--red); }
.seg.is-confirmed .seg__btn--late[aria-pressed="true"]:hover,
.seg.is-confirmed .seg__btn--early[aria-pressed="true"]:hover   { background: var(--yellow); }

/* ---- スクールバス：数字を小さめに（★9/11 バスの画面にだけ付ける） ---- */
.stat--small { padding: 8px 12px; }
.stat--small .stat__value { font-size: 20px; line-height: 1.4; }
.stat--small .stat__value small { font-size: 11px; }
/* ★9/19 週案簿の数字の帯は、もっと小さく（1行に 見出し＋数字＋補足） */
.stat--mini { padding: 4px 10px; border-top-width: 2px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; box-shadow: none; }
.stat--mini .stat__label { display: inline; font-size: 11px; line-height: 1.4; }
.stat--mini .stat__value { display: inline; font-size: 15px; line-height: 1.4; }
.stat--mini .stat__value--text { font-size: 12px; }
.stat--mini .stat__value small { font-size: 10px; }
.stat--mini .stat__sub { display: inline; margin-left: auto; font-size: 10px; }
.stat--mini .badge { font-size: 11px; padding: 1px 6px; }


/* ---- タイムカード（9/11 の足し込み：表示設定の左枠・記載事項・履歴・締め済み・page-head の入口） ---- */
.tc-entries { margin-left: auto; align-self: center; }
.tc-list .tc-list__side .select, .tc-list .tc-list__side .input--date { width: 100%; max-width: none; }
.tc-memo { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-table tr.is-off th[scope="row"] { color: var(--red); }
.tc-dialog--wide { width: min(760px, 94vw); }
@media (max-width: 900px) {
  .tc-list.grid--4 { grid-template-columns: 1fr; }
  .tc-list .tc-list__side + .card { grid-column: auto !important; }
}

/* ---- 上の帯：ホームへ戻るボタン（★9/11 三本線の右どなり。家の絵＋「ホーム」） ---- */
.topband__home {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 700; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.45); border-radius: var(--r);
}
.topband__home:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.topband__home .ico { width: 19px; height: 19px; }
/* ホームを開いているとき＝押した状態 */
.topband__home.is-active, .topband__home[aria-current="page"] {
  background: #fff; color: var(--green); border-color: #fff;
}
.topband__menu + .topband__home { margin-left: -12px; }
/* せまい画面では文字を消して、絵だけにします（押す場所は変わりません） */
@media (max-width: 1280px) {
  .topband__home { padding: 0 7px; gap: 0; }
  .topband__home-label { display: none; }
}
@media print { .topband__home { display: none; } }
/* ホームのぶん帯が混みあうので、名前は折り返さず、ノートパソコンの幅では説明の文字を消します（PHP 版の app.css と同じ） */
.brand { flex: none; white-space: nowrap; }
@media (max-width: 1600px) { .brand__tag { display: none; } }
@media (max-width: 1280px) { .topband { gap: 14px; padding: 0 14px; } }

/* ============================================================
   WEBメール（グループウェアの「メール」タブ。仕様書 WEBメール拡張_仕様書_20260911.md）
   ============================================================ */
/* 上の小さな行き先（受信箱・作成・下書き…）とアカウントの切替 */
.ml-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ml-sub .tc-chips { margin-right: auto; }
.ml-cnt { display: inline-block; min-width: 18px; text-align: center; font-size: 10px; line-height: 16px; border-radius: 999px; background: var(--red); color: #fff; padding: 0 5px; margin-left: 2px; }
.tc-chip.is-on .ml-cnt { background: #fff; color: var(--orange-dark); }
.ml-acct { display: inline-flex; align-items: center; gap: 6px; }
.ml-acct .select { max-width: 320px; }

/* 受信箱：左にフォルダ・右に一覧 */
.ml { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.ml .card { margin-bottom: 0; }
.ml-tree__h { padding: 10px 8px 2px; }
.ml-search { display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.ml-search label { display: flex; flex-direction: column; gap: 2px; }
.ml-search .input { width: 100%; }
.ml-search .input--date { max-width: 150px; }
.ml-list tr.ml-row { cursor: pointer; }
.ml-list tr.ml-row:hover td { background: var(--orange-tint); }
.ml-list tr.is-unread .ml-row__subj, .ml-list tr.is-unread td { font-weight: 700; color: var(--text-strong); }
.ml-list__clip { width: 24px; }
.ml-list__clip .ico { width: 15px; height: 15px; color: var(--text-muted); vertical-align: middle; }
tr.is-dim td { opacity: .55; }

/* 本文 */
.ml-show__subj { font-size: 17px; margin: 0 0 12px; }
.ml-show__dl { grid-template-columns: 64px 1fr; }
.ml-show__body { white-space: pre-wrap; line-height: 1.9; font-size: 13.5px; padding: 14px 16px; background: var(--bg); border-radius: var(--r); }
.ml-files { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-file { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--r); padding: 4px 8px 4px 10px; background: var(--surface); font-size: 12.5px; }
.ml-file .ico { width: 15px; height: 15px; color: var(--text-muted); }

/* 作成：宛先の粒（校外は橙の印） */
.ml-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: var(--r); padding: 6px 8px; background: var(--surface); }
.ml-addr__in { flex: 1 1 180px; border: 0; min-height: 28px; padding: 2px 4px; }
.ml-addr__in:focus { outline: none; }
.ml-addr:focus-within { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-tint); }
.ml-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 6px 2px 10px; font-size: 12.5px; background: var(--bg); }
.ml-chip.is-ext { border-color: var(--orange); background: var(--orange-tint); }
.ml-chip__tag { font-size: 10px; font-weight: 700; color: var(--orange-dark); }
.ml-chip__x { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font: inherit; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px; }
.ml-chip__x:hover { background: var(--red); color: #fff; }
.ml-upload { cursor: pointer; }
.ml-tips { margin: 0; padding-left: 18px; line-height: 1.8; }
.ml-pick { max-height: 50vh; overflow: auto; }
.ml-pre { white-space: pre-wrap; }
.ml-form { background: var(--bg); }

/* 送信の確認（学校の外へ出るときだけ） */
.ml-confirm { max-width: 760px; }
.ml-confirm__checks { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 12px 14px; background: var(--yellow-tint); border-radius: var(--r); font-size: 13px; }
.ml-confirm__checks p { margin: 0; }

/* 送信の待機（取り消しの帯） */
.ml-band { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; background: var(--text-strong); color: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.ml-band__t { font-weight: 700; }
.ml-band__left strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.ml-band__note { color: rgba(255,255,255,.75); }
.ml-band .btn--ghost { background: #fff; }

/* フォルダへ移す */
.ml-move__row { width: 100%; background: transparent; border: 0; border-bottom: 1px dashed var(--border); font: inherit; cursor: pointer; text-align: left; align-items: center; }
.ml-move__row .ico { width: 16px; height: 16px; color: var(--orange); }
.ml-move__row[disabled] { cursor: default; opacity: .6; }

/* 振り分けの表 */
.ml-rules .select, .ml-rules .input { min-height: 32px; padding: 3px 8px; font-size: 12.5px; }
.ml-rules .input { min-width: 140px; }

@media (max-width: 1100px) { .ml-search { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .ml { grid-template-columns: 1fr; } .ml-search { grid-template-columns: 1fr; } }
.ml-subj { width: 100%; }

/* ---- 左メニュー 4つ目のまとまり（管理）の色 ---- */
.nav__item--c4 .ico { color: var(--orange); }
.nav__group--c4 { border-left-color: var(--orange); color: var(--orange-dark); }
.nav__item--c4 { border-left-color: var(--orange-tint); }
.nav__item--c4:hover { background: var(--orange-tint); }

/* ---- WEBメール：個人／代表の切り替え（9/11） ---- */
.ml-acctsw { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.ml-acctsw .tabs { margin-bottom: 0; border-bottom: 0; }
.ml-acctsw .tab { border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font: inherit; }
.ml-acctsw .tab[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.ml-acctsw__addr { font-size: 13px; color: var(--text); }

/* ============================================================
   絵（アイコン）を機能ごとの色に（9/11 の指示：もっとカラフルに）
   左メニュー：色つきの丸の中に絵。上の帯：白い丸の中に緑の絵。
   ============================================================ */
.nav__item .ico { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.06); color: var(--text-muted); }
.is-nav-collapsed .nav__item .ico { width: 30px; height: 30px; padding: 6px; }
/* ★9/14 機能ごとの色は、ここ1か所で決めます（--fc）。
   左メニューの絵と、画面の見出しの左の帯が、同じ色になります。 */
.nav__item--f-today, .f-today { --fc: #EC6828; }
.nav__item--f-attendance, .f-attendance { --fc: #0170C1; }
.nav__item--f-hours, .f-hours { --fc: #7B4FBF; }
.nav__item--f-weekly, .f-weekly { --fc: #009453; }
.nav__item--f-diary, .f-diary { --fc: #B5651D; }
.nav__item--f-bus, .f-bus { --fc: #E0A800; }
.nav__item--f-grades, .f-grades { --fc: #C0392B; }
.nav__item--f-notes, .f-notes { --fc: #E4007F; }
.nav__item--f-career, .f-career { --fc: #2E7D32; }
.nav__item--f-connect, .f-connect { --fc: #00897B; }
.nav__item--f-duty, .f-duty { --fc: #5C6BC0; }
.nav__item--f-mail, .f-mail { --fc: #1E88E5; }
.nav__item--f-groupware, .f-groupware { --fc: #3949AB; }
.nav__item--f-chat, .f-chat { --fc: #43A047; }
.nav__item--f-timecard, .f-timecard { --fc: #F4511E; }
.nav__item--f-files, .f-files { --fc: #FB8C00; }
.nav__item--f-links, .f-links { --fc: #00ACC1; }
.nav__item--f-health, .f-health { --fc: #D81B60; }
.nav__item--f-fitness, .f-fitness { --fc: #8E24AA; }
.nav__item--f-karte, .f-karte { --fc: #6D4C41; }
.nav__item--f-forms, .f-forms { --fc: #546E7A; }
.nav__item--f-dashboard, .f-dashboard { --fc: #0097A7; }
.nav__item--f-staff, .f-staff { --fc: #7CB342; }
.nav__item--f-students, .f-students { --fc: #039BE5; }
.nav__item--f-settings, .f-settings { --fc: #757575; }
.nav__item .ico { color: var(--fc, var(--text-muted)); background: color-mix(in srgb, var(--fc, #fff) 14%, #fff); }
.nav__item.is-active .ico { box-shadow: 0 0 0 2px currentColor; }
.topband__home .ico, .topband__school .ico, .topband__user .ico, .topband__help .ico, .topband__logout .ico {
  width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #fff; color: var(--green-dark, #4A8A1F); box-sizing: border-box; }
.topband__menu .ico { width: 19px; height: 19px; }
.topband__home, .topband__school, .topband__user, .topband__help, .topband__logout { white-space: nowrap; }
.topband__home.is-active .ico { background: var(--orange); color: #fff; }
.topband__help .ico { color: #0170C1; } .topband__logout .ico { color: #C0392B; } .topband__user .ico { color: #7B4FBF; } .topband__school .ico { color: #B5651D; }

.topband__help, .topband__logout { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-size: 13px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 3px 12px 3px 4px; }
.topband__help:hover, .topband__logout:hover { background: rgba(255,255,255,.18); }
@media (max-width: 1280px) { .topband__help-label { display: none; } .topband__help { padding-right: 4px; } }
.modesw__btn, .kindsw__btn { white-space: nowrap; }
@media (max-width: 1500px) { .demo-flag { display: none; } .topband { gap: 10px; } }
.modesw, .kindsw, .topband__school, .topband__user, .topband__help, .topband__logout, .topband__home { flex: 0 0 auto; }
/* ★9/18 帯がせまいとき、「School Support」が縮んでも中の文字がはみ出し、
   モード切替の上に重なって押せなくなっていました。
   ・名前（School Support）は縮めない・切らない
   ・縮むのは学校名だけ（…で切ります）
   ・せまくなったら まず説明の文字、次に「デモ（架空データ）」を消します
   ・切替のボタンは、何があっても上に置いて押せるようにします */
.topband .brand { flex: 0 0 auto; min-width: 0; }
.topband .brand__tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topband .topband__school { flex: 0 1 auto; min-width: 0; }
.topband .modesw, .topband .kindsw { position: relative; z-index: 1; }
@media (max-width: 1700px) { .demo-flag { display: none; } }
.topband__school #school-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* ★9/14 ホームの枠は、その枠のもとになっている機能の色にします */
.lay-pnl[data-pnl="absents"]    { --fc: #0170C1; }
.lay-pnl[data-pnl="events"]     { --fc: #B5651D; }
.lay-pnl[data-pnl="timetable"]  { --fc: #7B4FBF; }
.lay-pnl[data-pnl="tasks"]      { --fc: #EC6828; }
.lay-pnl[data-pnl="bus"]        { --fc: #E0A800; }
.lay-pnl[data-pnl="duty"]       { --fc: #5C6BC0; }
.lay-pnl[data-pnl="visitors"],
.lay-pnl[data-pnl="staffmoves"],
.lay-pnl[data-pnl="whiteboard"],
.lay-pnl[data-pnl="diary"]      { --fc: #B5651D; }

/* ★9/14 本番（public_html/css/app.css）から写しました */
.gsum{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:6px;margin:0 0 12px}
.gsum__item{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 6px;padding:8px;border:1px solid var(--line,#d8dde5);border-left:4px solid #4c8be0;border-radius:6px;background:#fff;color:#333;font-size:11px;line-height:1.4;text-decoration:none;min-width:0}
.gsum__item > span{white-space:nowrap}
.gsum__item:hover{background:#f3f7fd;text-decoration:none}
.gsum__item--absent{border-left-color:#e05a4c}
.gsum__item--unset{background:#fff8e6;border-left-color:#e8a100}
.gsum__grade{font-weight:700;font-size:12px;color:#222}
.gsum__item b{font-size:12px;color:#222;margin:0 1px}
.gsum__late b{color:#b8720a}.gsum__early b{color:#7a4bb8}.gsum__absent b{color:#c8331f}
.gsum__unset{color:#a06a00}.gsum__unset b{color:#a06a00}
.lay-spacer { flex: 1 1 auto; }
.lay-btn {
  border: 1px solid transparent; background: transparent; color: var(--text-muted);
  border-radius: 6px; min-width: 22px; height: 22px; padding: 0; line-height: 1; font-size: 11px;
  cursor: pointer; opacity: .5; transition: opacity .12s;
}
.lay-btn:hover { background: var(--surface-2, #f1f3f6); color: var(--text-strong); border-color: var(--border); }
.lay-btn:disabled { opacity: .38; cursor: default; }
.lay-body { max-height: 4000px; transition: max-height .16s ease; }
.hwb__body { width: 100%; min-height: 96px; }
.hwb__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.hwb__at { font-size: 11px; color: var(--text-muted); }

/* ★9/14 枠の見出し（本番の app.css から） */
.lay-pnl.is-dragging { opacity: .35; }
.lay-pnl.drop-before { box-shadow: 0 -3px 0 0 var(--orange); }
.lay-pnl.drop-after  { box-shadow: 0  3px 0 0 var(--orange); }
.lay-head { cursor: grab; user-select: none; position: relative; flex-wrap: nowrap; gap: 6px; }
.lay-head { overflow: hidden; }   /* ★10/2 本番と同じ：ボタンが枠からはみ出さない */
.lay-head .card__title { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .lay-head .lay-btn[data-left], .lay-head .lay-btn[data-right], .lay-head .lay-btn[data-up], .lay-head .lay-btn[data-down] { display: none; } }
.lay-head .card__meta { margin-left: 0; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lay-head:active { cursor: grabbing; }
.lay-grip { color: var(--text-muted); opacity: .45; font-size: 14px; margin-right: 2px; letter-spacing: -2px; }
.lay-head:hover .lay-grip { opacity: .9; }
.lay-pnl:hover .lay-btn, .lay-head:focus-within .lay-btn { opacity: 1; }
.lay-pnl.is-min .lay-body { max-height: 0; overflow: hidden; }
/* ★9/20 枠の縦の大きさをそろえます（黒板は除く）。中身が多いときは「もっと見る」で広がります */
.lay-pnl:not(.card--board) .lay-body { height: var(--lay-h, 320px); overflow: hidden; position: relative; }
.lay-pnl:not(.card--board).is-open .lay-body { height: auto; }
.lay-pnl.is-min .lay-body { height: 0; max-height: 0; }
.lay-more { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 28px 0 8px; text-align: center;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--surface) 55%); }
.lay-more__btn { font: inherit; font-size: 12px; color: var(--orange-dark); background: var(--surface); border: 1px solid var(--orange); border-radius: 999px; padding: 3px 14px; cursor: pointer; }
.lay-more__btn:hover { background: var(--orange-tint); }
.lay-pnl.is-open .lay-more { position: static; padding: 8px 0 0; background: none; }

.lay-pnl .dgrid { grid-template-columns: 1fr; }
.lay-pnl .dgrid--2 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.lay-pnl .dadd { margin-top: 12px; padding-top: 12px; }

/* ★9/14 デモで「使う人」を切り替える選び場所（上の帯） */
.persona-pick {
  border: 0; background: transparent; color: inherit; font: inherit;
  font-size: 13px; padding: 2px 18px 2px 4px; border-radius: 6px; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M1 3.5 5 7.5 9 3.5' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center;
}
.persona-pick:hover { background-color: rgba(255,255,255,.18); }
.persona-pick:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.persona-pick option { color: #23211E; }
.sidebar-foot__note { display: block; margin-top: 6px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }

/* ---- 出欠の入力：区分の選び場所（★9/16 本番 app.css と同じ見た目。モックは aria-checked で色を付ける） ---- */
/* ★9/28 本番 app.css と同じ（ラジオの丸つきの札） */
.att-pick { display: inline-flex; align-items: center; gap: 4px; margin: 2px 6px 2px 0; padding: 0 10px 0 6px; }
.att-pick:has(input:checked) { color: #fff; font-weight: 700; }
.att-pick--present:has(input:checked) { background: var(--green); border-color: var(--green); }
.att-pick--absent:has(input:checked)  { background: var(--red); border-color: var(--red); }
.att-pick--late:has(input:checked),
.att-pick--early:has(input:checked)   { background: var(--yellow); border-color: var(--yellow); color: var(--text-strong); }
.att-pick--suspended:has(input:checked),
.att-pick--mourning:has(input:checked),
.att-pick--official:has(input:checked) { background: var(--blue); border-color: var(--blue); }
.att-pick.is-confirmed { cursor: not-allowed; }
.att-pick.is-confirmed:hover { border-color: var(--border-strong); }
.att-pick.is-confirmed:not(:has(input:checked)) { opacity: .4; }
.att-pick.is-confirmed:has(input:checked) { opacity: 1; }

/* ---------- ★9/16 成績（本番 app.css から写したもの） ---------- */
.req {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-size: 10px; font-weight: 700; line-height: 1.6; vertical-align: 1px;
  color: var(--red); background: var(--red-tint);
  border: 1px solid var(--red); border-radius: 3px; letter-spacing: .04em;
}
.chk .req, th .req, legend .req { margin-left: 4px; }
.field > .counter { display: block; margin-left: 0; text-align: right; margin-top: 4px; }
.form-inline { display: inline; }
.flex--wrap { flex-wrap: wrap; }
.role-block { border: 1px solid var(--line, #dcdcdc); border-radius: 6px; padding: 12px; }
.role-block > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; }
.role-block > summary::-webkit-details-marker { display: none; }
.role-block > summary::before { content: "▸"; color: var(--green, #70B538); font-size: 12px; }
.role-block[open] > summary::before { content: "▾"; }

/* =========================================================
   ★9/16 本番 app.css から写した規則（受講・時数・日課／学校日誌）
   ========================================================= */
.field .field__label { display: block; font-size: 12px; font-weight: 700; color: var(--text-strong); margin-bottom: 4px; }
.btn--danger { color: var(--red); border-color: var(--red); }
.btn--danger:hover { background: var(--red-tint); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }

/* 前日・前週・前月／本日／翌日・翌週・翌月 */
.dnav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; }
.dnav__date { font-size: 15px; font-weight: 600; }
.dnav__btns { display: flex; gap: 6px; flex-wrap: wrap; }
.dnav__pick { display: flex; gap: 6px; margin-left: auto; }
@media (max-width: 720px) {
  .dnav__pick { margin-left: 0; }
}

/* 入力欄の並び（画面の幅にあわせて折り返します） */
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.dgrid .field { margin-bottom: 0; }
.dgrid .field--wide { grid-column: 1 / -1; }
.dadd { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.dadd .btn { margin-top: 12px; }

.select--sm { min-height: 32px; padding: 3px 8px; font-size: 13px; width: auto; }
.textarea--sm { min-height: 60px; }
.input--num { width: 64px; text-align: center; padding-left: 6px; padding-right: 6px; }

/* 異常なし／異常あり のような、丸い選び場所 */
.radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.radio input[type="radio"] { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }

/* 児童生徒の状態 */
.dgrade th { white-space: nowrap; }
.dgrade td { padding: 4px 6px; }
/* 時数集計の「進み具合」：表のマスの中では棒を幅いっぱいに出す */
.table td > .bar { display: block; width: 100%; }
.table td .btn--danger { white-space: nowrap; }

/* ★9/17 年度更新のふりわけ（案B）のステップの帯 */
.steps-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.steps-bar__item { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px 5px 5px; color: var(--muted); }
.steps-bar__item.is-now { background: var(--orange-tint); border-color: var(--orange);
  color: var(--text); font-weight: 700; }
.steps-bar__no { width: 20px; height: 20px; border-radius: 50%; background: var(--border-strong);
  color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; }
.steps-bar__item.is-now .steps-bar__no { background: var(--orange); }

/* ---- 年間計画のカレンダー（★9/18。PHP版 app.css と同じ） ---- */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: 4px 0; font-size: 12px; background: var(--surface-alt); border: 1px solid var(--border); text-align: center; }
.cal--sun { color: var(--red); }
.cal--sat { color: var(--blue); }
.cal__cell { border: 1px solid var(--border); vertical-align: top; height: 92px; padding: 3px; }
.cal__cell--out { background: var(--surface-alt); }
.cal__cell--off { background: var(--yellow-tint); }
.cal__day {
  display: inline-block; font: inherit; font-weight: 700; line-height: 1; color: inherit;
  background: transparent; border: 1px solid transparent; border-radius: var(--r);
  padding: 2px 6px; margin-bottom: 2px; cursor: pointer;
}
button.cal__day:hover { background: var(--orange); color: #fff; }
button.cal__day:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.cal__day.is-picked { background: var(--orange); color: #fff; }
.cal__ev {
  display: block; font-size: 12px; line-height: 1.3; padding: 1px 4px; margin-top: 2px;
  border-radius: 3px; background: var(--blue-tint); border-left: 3px solid var(--blue);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal__ev--grade { background: var(--teal-tint); border-left-color: var(--teal); }
.cal__ev--class { background: var(--yellow-tint, #fff7d6); border-left-color: var(--yellow, #d4a017); }   /* ★9/30 学級だけの行事 */
.cal__ev--class { background: var(--teal-tint); border-left-color: var(--teal); }
.cal__ev--staff { background: var(--yellow-tint); border-left-color: var(--orange); }
.cal__ev--personal { background: var(--surface-alt); border-left-color: var(--border-strong); }
.cal__cell--today { box-shadow: inset 0 0 0 2px var(--orange); }
button.summary-bar__item { font: inherit; background: transparent; border: 0; cursor: pointer; }
@media (max-width: 1100px) { .cal__cell { height: 72px; } }

/* ---- 朝の職員室（★9/18）--------------------------------------------------
 * 朝、先生がすることを、その順番のまま1画面に並べた画面です。
 * 上の帯が「朝の流れ」、②が教頭先生の後ろにあった黒板です。
 */

.mo-punch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mo-punch .btn--lg { width: auto; min-width: 9em; }
.mo-punch__done {
  display: inline-block; padding: 10px 18px; border-radius: var(--r);
  background: var(--green-tint); border: 1px solid var(--green); font-size: 15px;
}
.mo-punch__note { flex: 1 1 18em; min-width: 0; font-size: 12.5px; color: var(--text-muted); }
.mo-who { margin-top: 12px; font-size: 13px; }

/* 「今日の黒板」の見出しの帯は、ほんものの黒板の色に（★9/18 利用者の指示） */
.card--board { background: var(--surface); }
.card--board .card__head {
  background: #2E4F3E;                      /* 黒板の緑 */
  border-bottom-color: #223B2E;
  color: #fff;
}
.card--board .card__title { color: #fff; }
.card--board .card__title::before { background: #F2EFE3; }   /* チョークの白 */
.card--board .card__meta { color: rgba(255, 255, 255, .78); }
.card--board .mo-col__head { border-bottom-color: #2E4F3E; }
.mo-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mo-col { min-width: 0; }
.mo-col__head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap;
  white-space: nowrap;
  font-size: 14px; margin: 0 0 8px; padding-bottom: 5px;
  border-bottom: 2px solid var(--fc, var(--orange));
}
.mo-read {
  flex: 0 0 auto;
  font: inherit; font-size: 11px; line-height: 1;
  padding: 4px 8px; border-radius: 999px; cursor: pointer;
  color: var(--text-muted); background: transparent; border: 1px solid var(--border-strong);
}
.mo-read:hover { background: var(--orange-tint); }
.mo-read.is-on { color: #fff; background: var(--green); border-color: var(--green); }
.mo-list { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; }
.mo-list li { padding: 5px 0; border-bottom: 1px dotted var(--border); line-height: 1.5; }
.mo-list li:last-child { border-bottom: 0; }
.mo-list__note { display: block; font-size: 12px; color: var(--text-muted); }

.mo-meet { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mo-meet:last-of-type { border-bottom: 0; }
.mo-meet.is-done { opacity: .62; }
.mo-meet__tick {
  flex: 0 0 auto; width: 26px; height: 26px; margin-top: 2px;
  font: inherit; font-weight: 700; line-height: 1; cursor: pointer;
  color: #fff; background: transparent; border: 2px solid var(--border-strong); border-radius: 50%;
}
.mo-meet.is-done .mo-meet__tick { background: var(--green); border-color: var(--green); }
.mo-meet__body { min-width: 0; flex: 1 1 auto; }
.mo-meet__title { font-size: 14px; margin: 0 0 4px; }

@media (max-width: 1200px) { .mo-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .mo-board { grid-template-columns: 1fr; } }
.mo-list li.is-warn { background: var(--yellow-tint); }
.lay-btn--min { font-weight: 700; font-size: 13px; }

/* 黒板・朝の打合せの［直す］（★9/18） */
.mo-col__btns { display: inline-flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.mo-edit {
  font: inherit; font-size: 11px; line-height: 1;
  padding: 4px 8px; border-radius: 999px; cursor: pointer;
  color: var(--orange); background: transparent; border: 1px solid var(--orange);
}
.mo-edit:hover { background: var(--orange); color: #fff; }
.mo-edit.is-on { background: var(--orange); color: #fff; }
.mo-ed { margin: 4px 0 8px; }
.mo-ed__row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 6px; }
.mo-ed__in { flex: 1 1 8em; min-width: 0; font-size: 12.5px; }
.mo-meet__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ホームの「朝」の2列（★9/18。下の3列と同じように動かせます） */
.home2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
/* ★9/20 黒板の入っている列は 2列ぶん（5つ選ぶと3列ぶん＝横いっぱい）。中身のない列は場所をとりません */
.home2 .lay-col--span2 { grid-column: span 2; }
.home2 .lay-col--span3 { grid-column: span 3; }
.home2 .lay-col:not(:has(.lay-pnl)) { min-height: 0; }
.home2__col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home2 .card { margin-bottom: 0; }
@media (max-width: 900px) { .home2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home2 .lay-col--span2, .home2 .lay-col--span3 { grid-column: 1 / -1; } }
@media (max-width: 720px) { .home2 { grid-template-columns: 1fr; } }
.card--board .lay-btn { color: rgba(255, 255, 255, .85); }
.card--board .lay-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .4); }
.card--board .lay-grip { color: rgba(255, 255, 255, .7); }

/* 設定 → 今日の黒板（★9/18） */
.bd-pick {
  font: inherit; font-size: 12px; line-height: 1; cursor: pointer;
  padding: 6px 10px; border-radius: 999px;
  color: var(--text-muted); background: transparent; border: 1px solid var(--border-strong);
}
.bd-pick.is-on { color: #fff; background: var(--green); border-color: var(--green); font-weight: 700; }
.bd-pick:disabled { opacity: .45; cursor: default; }
tr.is-on td { background: var(--green-tint); }
/* 選んだ数に合わせて、黒板の列を分けます */
.mo-board--1 { grid-template-columns: 1fr; }
.mo-board--2 { grid-template-columns: repeat(2, 1fr); }
.mo-board--3 { grid-template-columns: repeat(3, 1fr); }
.mo-board--4 { grid-template-columns: repeat(4, 1fr); }
.mo-board--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .mo-board--4, .mo-board--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .mo-board--3, .mo-board--4, .mo-board--5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .mo-board--2, .mo-board--3, .mo-board--4, .mo-board--5 { grid-template-columns: 1fr; } }

/* 職員動静の月の一覧（★9/18） */
.mv-month th, .mv-month td { padding: 4px 3px; font-size: 11.5px; }
.mv-month .is-off { background: var(--surface-alt); }
.mv-month .badge { padding: 1px 5px; font-size: 10.5px; }
.mv-month .is-today { box-shadow: inset 0 0 0 2px var(--orange); }
/* ★9/18 休んでいる子の理由は1行だけ（続きは … で省略。行を押すと詳細へ） */
.row__sub--1line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge .nav__op { margin-left: 4px; transform: scale(.85); }
a.mo-edit { text-decoration: none; display: inline-block; }

/* ★9/20 黒板の連絡事項の下の1行入力 */
.mo-quick { display: flex; gap: 6px; margin-top: 8px; }
.mo-quick .input { flex: 1 1 auto; min-width: 0; }
.mo-quick .btn { white-space: nowrap; flex: none; }

/* ★9/20 学校日誌は2列 */
.diary2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.diary2__col { min-width: 0; }
@media (max-width: 900px) { .diary2 { grid-template-columns: 1fr; } }

/* ★9/20 学校日誌の基本情報：天気／施錠点検1回目／2回目 を上から順に。時・分・異常なし／ありは1行に */
.dbasic { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.dbasic .field { margin-bottom: 0; }
.dbasic .select { width: auto; min-width: 8em; }
.dbasic__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dbasic__row .radio { margin-left: 6px; white-space: nowrap; }
/* 連絡事項の［直す］は小さく */
.mo-edit--sm { font-size: 10px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* ★9/20 行の中の小さな［直す］（details を1行の中に置く） */
.mo-ed--inline { display: inline-block; vertical-align: middle; }
.mo-ed--inline > summary { display: inline-block; }
summary.mo-edit::-webkit-details-marker { display: none; }
summary.mo-edit::marker { content: ""; }
.mo-ed--inline[open] { display: block; margin-top: 4px; }
#diary-notices .btn { white-space: nowrap; }

/* ★9/24 ホーム画面表示設定・WEBメールの枠（本番の app.css と同じ） */
.lay-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.lay-hidden__label { font-size: 12px; color: var(--text-muted); }
.home-display-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 900; }
.home-display { position: fixed; top: 12vh; left: 50%; transform: translateX(-50%); z-index: 901; background: #fff;
  border-radius: 10px; padding: 20px 24px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.home-display__title { font-size: 18px; margin: 0 0 8px; }
.home-display__list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.home-display__list label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mail-home__row a { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 0; border-bottom: 1px dashed var(--border, #e5e5e5); color: inherit; text-decoration: none; }
.mail-home__from { font-size: 12px; color: var(--text-muted); grid-column: 1; }
.mail-home__at { font-size: 12px; color: var(--text-muted); grid-column: 2; grid-row: 1; }
.mail-home__subj { grid-column: 1 / span 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-home__row.is-unread .mail-home__subj { font-weight: 700; }

/* ★9/24 進路：出願の進み具合（本番の app.css と同じ） */
.cp-flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cp-flow__item { border: 1px solid var(--border, #e3e3e3); border-radius: 8px; padding: 8px 10px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.cp-flow__label { font-size: 12px; color: var(--text-muted); }
.cp-flow__num { font-size: 20px; font-weight: 700; }
.cp-flow__num small { font-size: 11px; font-weight: 400; margin-left: 2px; color: var(--text-muted); }
.cp-flow__item--passed { border-color: var(--teal, #2a9d8f); }
.cp-flow__item--failed { border-color: var(--red, #d64545); }
.cp-flow__item--decided { border-color: var(--green, #2e8b45); background: var(--green-tint, #e9f5ec); }
.cp-dots { display: inline-flex; gap: 4px; }
.cp-dot { width: 12px; height: 12px; border-radius: 50%; background: #e2e2e2; display: inline-block; }
.cp-dot.is-on { background: var(--green, #2e8b45); }
.cp-dot.is-ng { background: var(--red, #d64545); }
.cp-done { background: var(--green, #2e8b45); border-color: var(--green, #2e8b45); color: #fff; }
.table tr.is-done td { background: var(--green-tint, #e9f5ec); }
@media (max-width: 900px) { .cp-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ★9/25 時間割を作る（週ごと・マス目に入れる） */
.tt--edit td.tt-cell { padding: 4px; min-width: 128px; }
.tt-cell__subj { width: 100%; font-weight: 700; margin-bottom: 3px; }
.tt-cell__sub { width: 100%; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.tt--edit td.is-empty .tt-cell__sub { opacity: .6; }

/* ★9/25 時間割づくり（本番の app.css と同じ） */
.tt--cond td.tt-cond__cell { cursor: pointer; text-align: center; height: 34px; font-size: 12px; user-select: none; }
.tt--cond td.is-ng { background: #fde2e2; color: #b42318; font-weight: 700; }
.tt--cond td.is-avoid { background: var(--yellow-tint); color: #8a6d00; }
.tt--cond td.is-prefer { background: var(--green-tint); color: #2e7d32; }
.tt--ed td.tt-drop { min-width: 110px; height: 52px; padding: 3px; vertical-align: top; cursor: pointer; }
.tt--ed td.is-ok { background: var(--green-tint); box-shadow: inset 0 0 0 2px var(--green); }
.tt--ed td.is-swap { background: var(--yellow-tint); box-shadow: inset 0 0 0 2px var(--yellow); }
.tt--ed td.is-ok::before { content: '○'; color: var(--green); font-size: 11px; float: right; }
.tt--ed td.is-swap::before { content: '△'; color: #8a6d00; font-size: 11px; float: right; }
.tt-chip { position: relative; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; cursor: grab; font-size: 12px; line-height: 1.3; }
.tt-chip.is-selected { box-shadow: 0 0 0 2px var(--orange); }
.tt-chip.is-locked { border-left-color: var(--text-muted); }
.tt-chip__subj { font-weight: 700; display: block; }
.tt-chip__meta { display: block; font-size: 10.5px; color: var(--text-muted); }
.tt-chip__lock { position: absolute; right: 4px; top: 2px; font-size: 11px; }

/* ★Phase 2 時間割づくり：A/B週の印・2時間続き・入れ替え候補 */
.tt--cond td.is-frozen { cursor: default; background: #e9e9e9; color: #777; }
.tt-chip__cyc { position: absolute; right: 4px; bottom: 2px; font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px; background: var(--blue, #2f6fdd); color: #fff; }
.tt-chip__cyc.is-b { background: var(--orange, #e07b1a); }
.tt-chip.is-len2 { border-style: dashed; }
.tt-swaps { list-style: none; padding: 0; margin: 6px 0 0; }
.tt-swaps li { padding: 3px 0; border-top: 1px dashed var(--border, #ddd); }
.tt-swaps a { text-decoration: none; }

/* ★Phase 3 教科担任制の表・児童生徒別 */
.tt-teachers td { padding: 3px 4px; white-space: nowrap; }
.tt-teachers select.is-special { border-color: var(--blue, #2f6fdd); background: #eef4ff; font-weight: 700; }
.tt-student__exchange { background: var(--yellow-tint, #fff6d6); }

/* ★Phase 4/5 未達リスク・代打候補・こう直す */
.stat--danger { border-color: #d64545; background: #fff4f4; }
.stat--warn { border-color: #e0b400; background: var(--yellow-tint, #fff6d6); }
.table tr.is-risk-red td, .table tr.is-risk-red th { background: #fff4f4; }
.table tr.is-risk-yellow td, .table tr.is-risk-yellow th { background: var(--yellow-tint, #fff6d6); }
.risk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; background: #2e9e5b; }
.risk-dot--red { background: #d64545; }
.risk-dot--yellow { background: #e0b400; }
.sub-cands { list-style: none; padding: 0; margin: 0; }
.sub-cands li { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px dashed var(--border, #ddd); }
.sub-cands .score { font-family: monospace; min-width: 3em; text-align: right; font-weight: 700; }
.sub-cands .why { color: #666; font-size: 11.5px; flex: 1; }
.tt-fix { color: #5a4300; }

/* ★9/26 保護者コネクト：メールの列 */
.connect-mail { min-width: 14em; }
.connect-mail .badge { margin-left: 4px; }
.connect-mail__edit summary { cursor: pointer; color: #667; }
.connect-mail__edit .input--sm { min-width: 12em; }

/* ★9/25 時間割：つまんで置く（PHP版 app.css と同じ） */
.sub-cands .score { font-family: var(--mono, monospace); min-width: 3em; text-align: right; font-weight: 700; }
.sub-cands .why { color: var(--text-muted); font-size: 11.5px; flex: 1; }
.tt-fix { color: #5a4300; }

/* ★9/25 時間割を作る：つまんで置く */
.tt--dnd td.tt-dcell { min-width: 112px; height: 56px; padding: 3px; vertical-align: top; transition: background .1s; }
.tt--dnd td.is-empty { background: var(--surface-alt); }
.tt--dnd td.is-over { outline: 2px dashed var(--orange); background: var(--yellow-tint); }
.tt--dnd td.is-selected { box-shadow: inset 0 0 0 2px var(--orange); }
.tt-dchip { position: relative; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 6px; padding: 3px 18px 3px 6px; font-size: 12px; line-height: 1.3; cursor: grab; user-select: none; }
.tt-dchip:active { cursor: grabbing; }
.tt-dchip.is-dragging { opacity: .5; }
.tt-dchip__subj { display: block; font-weight: 700; }
.tt-dchip__meta { display: block; font-size: 10.5px; color: var(--text-muted); }
.tt-dchip__x { position: absolute; right: 2px; top: 2px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; }
.tt-dchip__x:hover { color: var(--red); }
.tt-pal { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-dchip--pal { flex: 0 0 calc(50% - 3px); padding-right: 6px; border-left-color: var(--green); }
#tt-defaults > summary { list-style: none; }
#tt-defaults > summary::-webkit-details-marker { display: none; }
.tt-dchip.is-static { cursor: default; padding-right: 6px; }

/* ★9/26 保護者コネクト：メールの列 */
.connect-mail { min-width: 14em; }
.connect-mail .badge { margin-left: 4px; }
.connect-mail__edit summary { cursor: pointer; color: var(--muted, #667); }

/* ★9/26 ホーム：保護者からの連絡（確認） */
.connect-home .table td, .connect-home .table th { vertical-align: middle; }

/* ★9/28 時間割：備考の行・列の幅をそろえる（PHP版 app.css と同じ） */
.tt:not(.tt--all) { table-layout: fixed; width: 100%; }
.tt th:first-child, .tt td:first-child { width: 4.2em; }
.tt-note th { background: var(--surface-alt); }
.tt-note__cell { padding: 4px; vertical-align: middle; }
.tt-note__input { width: 100%; min-width: 0; }

/* ★9/28 週案簿：実施・予定変更・未実施のボタンを見やすく・縦を小さく */
.wcell { min-height: 0; }
.wcell__foot { margin-top: 2px; }
.wcell__acts { gap: 3px; margin-top: 4px; }
.wcell__acts > .btn, .wcell__acts > .wcell__ed > summary.btn {
  min-height: 24px; padding: 1px 4px; font-size: 11px; font-weight: 700; border-radius: 5px; border-width: 1.5px; line-height: 1.2;
}
.wcell__acts > .btn--green, .wcell__acts > .wcell__ed > summary.btn--green { background: #EEF8E6; border-color: var(--green-dark); color: #2E6B12; }
.wcell__acts > .btn--green:hover { background: var(--green); border-color: var(--green); color: #fff; }
.wcell__acts > .wcell__ed > summary.btn--yellow { background: #FFF6DB; border-color: #D89A00; color: #7A5600; }
.wcell__acts > .wcell__ed > summary.btn--yellow:hover { background: var(--yellow); color: #3b2c00; }
.wcell__acts > .wcell__ed > summary.btn--red { background: #FDECEA; border-color: var(--red); color: #A82F20; }
.wcell__acts > .wcell__ed > summary.btn--red:hover { background: var(--red); color: #fff; }
.wcell__acts > .wcell__ed > summary.btn--ghost { color: var(--text-muted); border-color: var(--border); }
.wcell__ed[open] > summary { margin-bottom: 4px; }
.tt td:has(> .wcell) { padding: 5px; }

/* ★9/28 時間割：札を足す */
.tt-addsubj > summary { display: inline-flex; list-style: none; cursor: pointer; }
.tt-addsubj > summary::-webkit-details-marker { display: none; }
.tt-addsubj > summary::marker { content: ''; }

/* ★9/28 年間行事のカレンダー：学校暦の区分・備考 */
.cal__cal { display: block; font-size: 10.5px; line-height: 1.3; margin-top: 2px; padding: 1px 4px; border-radius: 3px; background: var(--surface-alt); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.cal__cal b { color: var(--text); font-weight: 700; }

/* ★9/28 リンク集：1行を半分の高さに。タイトルと URL を1列ずつ、幅は固定（長い URL は … で切る） */
.lk-table { table-layout: fixed; width: 100%; }
.lk-table td, .lk-table th { vertical-align: middle; padding-top: 4px; padding-bottom: 4px; }
.lk-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-url { text-decoration: none; }
.lk-url:hover { text-decoration: underline; }

/* ★9/28 いいとこみつけ：学級一覧の「すぐ記録する」（本番 app.css と同じ） */
.note-quick__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.note-quick .field { margin: 0; }
.note-quick__who { flex: 1 1 14em; min-width: 12em; }
.note-quick__date { flex: 0 0 11em; }
.note-quick__scene { flex: 1 1 12em; min-width: 10em; }
.note-quick__vis { flex: 0 0 11em; }
.note-quick__body { flex: 1 1 24em; }
.note-quick__btn { white-space: nowrap; }
.note-quick .input, .note-quick .select { width: 100%; }

/* ★9/28 時間割：年間行事（見出しの札・時間目のあるコマ）・休みの日 */
.tt-closed { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 4px; background: rgba(255,255,255,.9); color: var(--red); font-weight: 700; }
.tt--dnd td.is-closedday { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.035) 6px 8px); }
.tt-event { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 4px; background: #FFF3E6; color: #B4520E; font-weight: 700; }
.tt--dnd td.is-eventcell { background-color: #FFF3E6; }
.tt-evt { display: block; font-size: 11px; font-weight: 700; color: #B4520E; margin: 0 0 2px 2px; }

/* ★9/28 年間計画「1件足す」：日付 〜 終了日 を1行に */
.an-dates{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.an-dates .input{width:auto;min-width:0;flex:0 0 auto}
.an-dates__sep{color:var(--muted,#6b7280)}
.an-endlbl{font-weight:400;color:var(--muted,#6b7280);font-size:.92em}

/* ★9/28 学校暦の休み・行事の日の名前を全部のコマに */
.tt-evt--closed { color: #A32C2C; }

/* ★9/28 小さいボタン（きまりの「使う／使わない」「消す」） */
.btn--xs { padding: 2px 8px; font-size: 11px; line-height: 1.5; min-height: 0; border-radius: 6px; }

/* ★9/28 きまりを足す：選択のバーが枠からはみ出さないように */
#tt-rule-form .select, #tt-rule-form .input, #tt-rule-kinds .select, #tt-rule-kinds .input { width: 100%; max-width: 100%; box-sizing: border-box; }
#tt-rule-form .select { text-overflow: ellipsis; }

/* ★9/29 時間割づくりの「年度はじめの流れ」の帯（年間計画 → 学校暦 → 標準時数 → 時間割づくり） */
.tt-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 6px; margin: 0 0 12px;
  padding: 8px 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; }
.tt-flow__lead { font-size: .8rem; font-weight: 700; color: var(--text-muted); margin-right: 4px; }
.tt-flow__item { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; text-decoration: none; }
a.tt-flow__item:hover { border-color: var(--orange); }
.tt-flow__item.is-now { background: var(--orange-tint); border-color: var(--orange); font-weight: 700; }
.tt-flow__no { width: 20px; height: 20px; border-radius: 50%; background: var(--border-strong); color: #fff;
  font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tt-flow__item.is-now .tt-flow__no { background: var(--orange); }
.tt-flow__arrow { color: var(--text-muted); }
.tt-flow__help { margin-left: auto; font-size: .8rem; }
.tt-flow__help::before { content: "？ "; font-weight: 700; }
.tt-flow__sub { flex-basis: 100%; font-size: .78rem; color: var(--text-muted); }
@media print { .tt-flow { display: none; } }

/* ★9/29 教科ごとの色（時間割の札）。左の太線が教科の色、札の地はその薄い色。
   PHP は App\Support\SubjectColor、モックは app.js の subjColor() で data-c を付けます */
.tt-dchip[data-c] { border-left-color: var(--sc, var(--blue)); background: var(--sc-bg, #fff); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tt-dchip[data-c=""] { --sc: var(--blue); --sc-bg: #fff; }
[data-c="kokugo"]   { --sc: #D9434B; --sc-bg: #FDECEC; }
[data-c="shakai"]   { --sc: #C9741F; --sc-bg: #FCF0E2; }
[data-c="math"]     { --sc: #2A74C9; --sc-bg: #E8F1FC; }
[data-c="rika"]     { --sc: #25935A; --sc-bg: #E5F4EB; }
[data-c="seikatsu"] { --sc: #7FA82B; --sc-bg: #F0F6E1; }
[data-c="ongaku"]   { --sc: #CF4592; --sc-bg: #FBE8F2; }
[data-c="art"]      { --sc: #8457C9; --sc-bg: #F1EAFB; }
[data-c="katei"]    { --sc: #17928E; --sc-bg: #E2F4F3; }
[data-c="taiiku"]   { --sc: #D19A00; --sc-bg: #FCF5DA; }
[data-c="eigo"]     { --sc: #4655C8; --sc-bg: #ECEEFC; }
[data-c="doutoku"]  { --sc: #2D9DC0; --sc-bg: #E4F4F9; }
[data-c="sougou"]   { --sc: #8C6239; --sc-bg: #F3EBE2; }
[data-c="tokkatsu"] { --sc: #6E7482; --sc-bg: #EEEFF2; }
[data-c="x0"] { --sc: #B04A6E; --sc-bg: #F8E9EF; }
[data-c="x1"] { --sc: #5E8C2E; --sc-bg: #EDF4E4; }
[data-c="x2"] { --sc: #3F6E9E; --sc-bg: #E7EEF6; }
[data-c="x3"] { --sc: #A0662A; --sc-bg: #F6EDE3; }
[data-c="x4"] { --sc: #6B5BA8; --sc-bg: #EEEBF7; }
[data-c="x5"] { --sc: #3E8C7A; --sc-bg: #E5F2EF; }

/* ★9/29 時間割の週見出しの日付は白（オレンジの上で読めるように） */
.tt thead .tt-hdate { font-size: 12px; font-weight: 700; color: #fff; }
.tt-viewseg { display: inline-flex; }
.tt-viewseg .seg__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 3em; min-height: 32px; padding: 0 12px; text-decoration: none; }

/* ★9/29 時間割の月表示（見るだけ） */
.ttm__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ttm__table th { background: var(--orange); color: #fff; text-align: center; padding: 6px; border: 1px solid var(--border); font-size: 13px; }
.ttm__table td { border: 1px solid var(--border); vertical-align: top; padding: 4px 5px 6px; height: 7.5em; }
.ttm__table td.is-out { background: var(--surface-alt); }
.ttm__table td.is-out .ttm__list { opacity: .45; }
.ttm__table td.is-closed { background: repeating-linear-gradient(135deg, #fff, #fff 6px, #F6F6F8 6px, #F6F6F8 12px); }
.ttm__table td.is-today { box-shadow: inset 0 0 0 2px var(--orange); }
.ttm__date { display: inline-block; font-weight: 700; font-size: 14px; color: var(--text-strong); text-decoration: none; margin-bottom: 2px; }
.ttm__date:hover { color: var(--orange); text-decoration: underline; }
td.is-out .ttm__date { color: var(--text-muted); font-weight: 400; }
.ttm__closed { display: block; font-size: 11px; font-weight: 700; color: var(--red); }
.ttm__evt { display: block; font-size: 11px; font-weight: 700; color: #B4520E; }
.ttm__list { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 2px; }
.ttm__list li { display: flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.25; }
.ttm__p { flex: 0 0 1.2em; text-align: right; color: var(--text-muted); font-size: 10.5px; }
.tt-mchip { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 5px; border-radius: 4px; border-left: 3px solid var(--sc, var(--blue)); background: var(--sc-bg, #fff); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ttm__counts { display: flex; flex-wrap: wrap; gap: 6px; }
.ttm__counts .tt-mchip { flex: 0 0 auto; font-size: 12px; padding: 3px 8px; }
.ttm__counts .tt-mchip b { margin-left: 6px; }
@media (max-width: 720px) { .ttm__table td { height: auto; } .ttm__list li { font-size: 10.5px; } }

/* ★9/29 月表示：日のマスを押すとその日の週へ。週表示では押した日の列に色 */
.ttm__table td.is-link { cursor: pointer; }
.ttm__table td.is-link:hover { background: var(--orange-tint); box-shadow: inset 0 0 0 2px var(--orange-mid); }
.tt thead th.is-picked { background: var(--orange-dark); box-shadow: inset 0 -3px 0 #fff; }
.tt td.is-picked { background-color: #FFF4EA; }
#tt-edit { scroll-margin-top: 110px; }
/* ★9/29 札に週案簿の予定（1行、はみ出しは …） */
.tt-dchip__plan { display: block; margin-top: 2px; font-size: 10.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px dashed rgba(0,0,0,.12); padding-top: 1px; }
.tt-ce-planbox { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.tt-ce-planbox textarea { width: 100%; resize: vertical; }

/* ★9/29 選んだ授業の入力欄は、押した授業の行のすぐ下に伸びる（表の中の1行）。× で閉じる */
.tt .tt-editrow > td { padding: 0; background: #fff; border-left: 0; border-right: 0; }
.tt-cell-edit { position: relative; box-sizing: border-box; width: 50%; margin: 8px 6px 10px; border: 2px solid var(--orange); border-radius: 10px; background: #FFF9F5; }
.tt-cell-edit::before { content: ""; position: absolute; top: -10px; left: var(--tt-arrow, 40px); margin-left: -9px; border: 9px solid transparent; border-top: 0; border-bottom-color: var(--orange); }
.tt-cell-edit .card__head { padding-right: 40px; }
.tt-cell-edit__close { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border: 1px solid var(--border-strong); border-radius: 50%; background: #fff; color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; }
.tt-cell-edit__close:hover { border-color: var(--red); color: var(--red); }
.tt-ce-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.tt-ce-cols .tt-ce-note { grid-column: 1 / -1; margin-top: 0; }
.tt-cell-edit .tt-ce-planbox { border-top: 1px dashed var(--border-strong); }
.tt-cell-edit .tt-ce-planbox textarea { max-width: 60em; }
@media (max-width: 720px) { .tt-ce-cols { grid-template-columns: 1fr; } .tt-cell-edit { width: auto !important; margin-left: 6px !important; } }

/* ★9/30 空のマスを押すと出る「入れる教科」の札 */
.tt-dcell.is-empty:hover { background: var(--orange-tint); cursor: pointer; }
.tt-dcell.is-picking { box-shadow: inset 0 0 0 2px var(--orange); }
.tt-pick__list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; }
.tt-dchip--pick { flex: 0 0 calc(25% - 5px); text-align: left; cursor: pointer; font: inherit; padding-right: 6px; }
.tt-dchip--pick:hover { box-shadow: 0 0 0 2px var(--orange); }
@media (max-width: 720px) { .tt-dchip--pick { flex-basis: calc(50% - 3px); } }

/* ★9/30 時間割・週案簿の 土・日（見るだけ。月〜金の半分の幅） */
.tt th.tt-wkend, .tt td.tt-wkend { width: 7%; min-width: 3.2em; background: #F7F7F9; }
.tt thead th.tt-wkend { background: #E98B5A; }
.tt thead th.tt-wkend.is-closed { background: #D97A48; }
.tt td.tt-wkend { background: repeating-linear-gradient(135deg, #fff, #fff 6px, #F3F3F6 6px, #F3F3F6 12px); }
.tt td.tt-wkend .tt-evt { font-size: 10px; }

/* ★9/30 年間計画：カレンダーの行事を押すと直せる */
.cal__ev--btn { display: block; width: 100%; text-align: left; border: 0; font: inherit; cursor: pointer; }
.cal__ev--btn:hover { outline: 2px solid var(--orange); }
.cal__ev.is-picked { outline: 2px solid var(--orange); background: var(--orange-tint); }

/* ★9/30 時間割づくりの条件の表示 */
.tt-cond__grid { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr; gap: 16px; padding: 12px 16px 16px; }
.tt-cond__h { margin: 0 0 4px; font-size: 14px; padding-left: 8px; border-left: 4px solid var(--border-strong); }
.tt-cond__h--hard { border-left-color: var(--red); }
.tt-cond__h--soft { border-left-color: #D19A00; }
.tt-cond__list { margin: 6px 0 0; padding-left: 1.4em; font-size: 13px; line-height: 1.6; }
.tt-cond__list li { margin-bottom: 3px; }
@media (max-width: 900px) { .tt-cond__grid { grid-template-columns: 1fr; } }

/* ★9/30 時間割づくり：押せないボタン・きまりの順位の欄 */
.btn.is-disabled { opacity: .45; pointer-events: none; }
.tt-prio { margin: 0; }
.tt-prio .input { text-align: center; padding-left: 2px; padding-right: 2px; }

/* ---- ★10/5 モックのログイン画面（本番 views/auth/login.php と同じ見た目）。最初に開いたときと、ログアウトのあとに出ます ---- */
.mock-login { position: fixed; inset: 0; z-index: 200; background: var(--bg, #f3f5f7); overflow: auto; }
.mock-login[hidden] { display: none; }
.mock-login__band { position: static; }
.mock-login .brand__tag { display: inline; }
.mock-login .login-wrap { max-width: 420px; margin: 8vh auto; }
.mock-login .login-card { background: var(--surface, #fff); border: 1px solid var(--border, #dfe3e8); border-radius: 12px; padding: 28px; box-shadow: 0 6px 24px rgba(0,0,0,.10); }
.mock-login .login-card h1 { font-size: 22px; margin-bottom: 4px; }
.mock-login .field { margin-bottom: 14px; }
.mock-login .input, .mock-login .select { width: 100%; }
.mock-login .req { display: inline-block; margin-left: 6px; font-size: 10px; color: #fff; background: #c0392b; border-radius: 3px; padding: 1px 5px; vertical-align: middle; }
body.is-login .topband, body.is-login .app, body.is-login #mock-notice { visibility: hidden; }


/* ★10/6 年度更新（教育委員会） */
.rb-steps { flex-direction: row; flex-wrap: wrap; }
.rb-steps .step { flex: 1 1 160px; min-width: 0; }
.rb-advance { padding: 10px 0; border-top: 1px solid var(--border); }
.rb-advance:first-of-type { border-top: 0; }
.rb-advance__head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rb-advance__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ★10/6 ホームの日付（過去の日を見る） */
.home-date { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.home-date .input { width: auto; }
.home-date__wd { font-size: 13px; color: var(--text-muted); }
