/* ============================================================
   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。src/Domain/UiMode/FeatureIcon.php で作ります） ----------
   色は文字と同じ色（currentColor）です。選んでいる行では、文字と一緒に色が変わります。 */
.ico { flex: none; display: inline-block; vertical-align: -3px; }
.btn .ico, .modesw__btn .ico, .link .ico { width: 15px; height: 15px; }
.topband__help .ico { width: 16px; height: 16px; }

/* ---------- レイアウト ---------- */
.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: flex; align-items: center; gap: 6px; color: #fff; }
.topband__school select {
  font-size: 12px; min-height: 30px; padding: 2px 8px; max-width: 220px;
  border-radius: var(--r); border: 1px solid rgba(255,255,255,.6); background: #fff; color: var(--text);
}
.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 {
  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;
}

/* ---------- 左メニューの色分け ----------
   まとまりごとに4色。**分類の名前ではなく「出てきた順」で決めます**
   （UiModeService::menu() が色番号を渡します）。
     c1 校務支援機能     … 緑    毎日ひらくもの
     c2 グループウェア機能 … 青    先生どうしの連絡・共有
     c3 保健             … 青緑  子どもの体の記録
     c4 管理             … オレンジ（★9/11。下の「左メニュー 4つ目のまとまり」）
   ★選んでいる行だけはオレンジ（この作りの「いまここ」の色）です。
     絵は、選んでいてもまとまりの色のままにしてあります。
     いつも同じ色でいてくれたほうが、目印として覚えやすいためです。 */
.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;
}
/* 機能名。長い名前でも「OP」と未読の数を押し出さないよう、ここだけ縮みます */
.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; }
/* ★10/13 左メニューの「▼」で開く一覧（保健など、中にたくさん画面がある機能） */
.nav__wrap { position: relative; }
.seg__btn { white-space: nowrap; }
.nav__wrap > .nav__item { padding-right: 34px; }
.nav__more {
  position: absolute; top: 4px; right: 6px; width: 28px; height: 32px;
  border: 0; background: transparent; cursor: pointer; border-radius: 6px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.nav__more:hover { background: var(--bg); color: var(--text); }
.nav__caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; transition: transform .15s; }
.nav__wrap.is-open .nav__caret { transform: rotate(180deg); }
.nav__sub { display: none; list-style: none; margin: 0; padding: 2px 0 6px 0; background: var(--bg); border-left: 3px solid var(--border); }
.nav__wrap.is-open .nav__sub { display: block; }
.nav__subitem { display: block; padding: 5px 12px 5px 38px; font-size: 12px; color: var(--text); text-decoration: none; }
.nav__subitem:hover { background: var(--surface); }
.nav__subitem.is-active { color: var(--orange-dark); font-weight: 700; }
.nav__subitem.is-active::before { content: '▸ '; }
/* 設定 → 簡単モードの一覧で、絵と機能名を1行に並べる */
.feat-name { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.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 {
  margin-left: auto; 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 a { display: inline-flex; align-items: center; gap: 4px; }
.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 小さくして、説明は見出しの右へ） ----------
 * 見出しと説明が画面の上を大きく取っていたので、1行に並べました。
 *   ・見出し（h1）は、その機能の最初の画面へ戻る入口です（押せます）。
 *   ・説明は見出しの右に、小さな字で続けます。せまい画面では下に折り返します。
 */
.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 h1::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 4px; border-radius: 3px; background: var(--orange);
}
.page-head__home { color: inherit; text-decoration: none; }
.page-head__home:hover, .page-head__home:focus-visible { color: var(--orange); text-decoration: underline; }
.crumb { font-size: 12px; color: var(--text-muted); }
.page-lead { font-size: 13px; color: var(--text); margin-bottom: 20px; max-width: 76em; }
.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; }

/* ---------- グリッド ---------- */
.grid { display: grid; gap: 16px; }
/* ★10/2 1fr → minmax(0, 1fr)：中の入力欄や select が列より広いとき、列を押し広げて横スクロールが出ていた（1280px の名簿の個人票・担当授業） */
.grid--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1280px) {
  .grid--8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--8 > .span-5, .grid--8 > .span-6, .grid--8 > .span-8 { grid-column: 1 / -1; }
  .grid--8 > .span-3 { grid-column: span 2; }
}
.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 見出しの帯ごと、左メニューの絵と同じ色でうすく塗ります（利用者の声）。
   カードの内側の余白（16px 18px）のぶん外へ広げて、端から端まで帯にします。
   --fc が決まっていない画面では、これまでどおり色なしの帯です。 */
.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;
  /* ★9/14 左メニューの絵と同じ色。--fc が決まっていない画面ではこれまでの緑のまま */
  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"] { 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 週案の「未実施」ボタン（未実施のふだと同じ色） */
.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); }
/* ★9/13 名簿から外す（削除）など、気をつけて押してほしいボタン */
.btn--danger { color: var(--red); border-color: var(--red); }
.btn--danger:hover { background: var(--red-tint); }
.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 {
  max-width: 100%;   /* ★10/2 列より広がらない */
  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, #fdf0ee); }
/* ★9/17 週案のコマ：ふだんは読む形。［修正］［実施を記録］を押したときだけ入力欄をひらきます */
.wcell__why  { display: block; font-size: 11px; line-height: 1.6; color: var(--text-muted); }
.wcell__foot { margin-top: 4px; }
.wcell__ed { margin-top: 6px; }
.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; }
/* ★9/17→9/18 コマの下の3つのボタン（実施・予定変更・未実施）と「予定を直す」。
   ・［実施］はその場で決まります（押したらすぐ保存）
   ・［予定変更］［未実施］［予定を直す］は、押すと下に入力欄がひらきます
   ・ひらいた入力欄は、その行をまるごと使います（となりのボタンと重ならないように） */
.wcell__acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.wcell__acts > .btn { flex: 1 1 4rem; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.wcell__acts > .wcell__ed { flex: 1 1 4rem; margin-top: 0; 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: 6px; padding-right: 6px; }
.wcell__help { margin: 6px 0 0; font-size: .74rem; 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 {
  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; }
/* ラベル（ラジオ）でも同じ見た目にする。1マスごとに送らず、まとめて保存するため */
.eval__btn { display: inline-flex; align-items: center; justify-content: center; position: relative; padding: 0; user-select: none; }
.eval__btn input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.eval__btn:has(input:checked) { background: var(--orange); color: #fff; }
.eval__btn:has(input:checked)[data-v="C"] { background: var(--red); }
.eval__btn:has(input:checked)[data-v="A"] { background: var(--green); }
.eval__btn:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: -2px; }
.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 .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; }
.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; }
.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; }
.field > .counter { display: block; margin-left: 0; text-align: right; margin-top: 4px; }

/* ---------- 帳票プレビュー ---------- */
.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--5, .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; }
/* ★9/11 見出し・余白は通常モードと同じにします（簡単モードだけ大きいと、画面が下に押されて使いにくい） */
.is-simple .view { padding: 24px 24px 8px; }
.is-simple .page-lead { font-size: 13px; }
.is-simple .page-head h1 { font-size: 22px; }
.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; }

/* ---- 簡単モードのホーム ---- */
/* ★9/11 ホームの「こんにちは」の帯：通常モードの見出しと同じ高さに（前は大きすぎました） */
.simple-hero {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--green);
  border-radius: var(--r-md, 8px); padding: 8px 14px; margin-bottom: 12px;
}
.simple-hero__title { font-size: 17px; color: var(--text-strong); }
.simple-hero__sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.simple-hero__badge {
  margin-left: auto; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; 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; }
/* 年間予定などで「その日は運行しない」行を、うすく見せます */
.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 { background: var(--bg); }
.buscal__cell.is-off { background: var(--bg); }
.buscal__day { display: block; font-size: 11px; color: var(--text-muted); 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); }
.buscal__rest { display: block; font-size: 11px; color: var(--text-muted); }

.navpv { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.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; }
}

/* ---- Laravel 版で追加 ---- */
.flash { margin-bottom: 16px; }
.form-inline { display: inline; }
.input--sm { min-height: 32px; padding: 3px 8px; font-size: 12px; }
.login-wrap { max-width: 420px; margin: 8vh auto; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-md); }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .lead { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.login-card .field { margin-bottom: 14px; }
.login-card input { width: 100%; }
.err { color: var(--red); font-size: 12px; margin-top: 4px; }
table.table td form { margin: 0; }
.demo-accounts { font-size: 11px; color: var(--text-muted); margin-top: 16px; line-height: 1.9; }

/* ---- 帳票プレビュー ---- */
.form-preview{width:100%;height:520px;border:1px solid var(--line,#dcdcdc);border-radius:6px;background:#fff;margin-bottom:8px}
.flex--wrap{flex-wrap:wrap;gap:8px}

/* ---- 権限管理 ---- */
.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:"▾"}
.cat-row{background:#F2F2F4;font-size:12px;color:#646464;font-weight:bold}

/* ---- 取扱説明書への入口（上部バー） ---- */
.topband__help {
  display: inline-flex; align-items: center; gap: 5px;
  color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.55); border-radius: 9999px;
  padding: 2px 12px; line-height: 1.7;
}
.topband__help:hover { background: rgba(255,255,255,.18); }

/* ---- 上部の帯：画面がせまいとき ----
   ノートパソコン（1280以下）でも、上の帯が2段に折り返さないようにします。
   まず説明の文字を消し、次に学校名を「…」で切ります。
   ボタンそのものは、どの幅でも必ず1行に並べます。 */
.topband { flex-wrap: nowrap; }
.brand { flex: none; white-space: nowrap; }
/* ★9/18 1440px くらいのノートパソコンでも帯が横にはみ出していたので、説明の文字を早めに消します
   （モックの上の帯で、この文字がモード切替に重なって押せなくなっていたのと同じところです） */
@media (max-width: 1600px) { .brand__tag { display: none; } }
.modesw { flex: none; }
.topband__logout { flex: none; }

/* ★10/2 教育委員会（学校を選ぶ select＋「見る学校を変える」が付く）は 1400px でも帯がはみ出し、ログアウトが隠れていた。
   学校名は縮められるようにし、1500px 以下では「見る学校を変える」「取扱説明書」を絵だけにします */
.topband__school { flex: 0 1 auto; min-width: 0; }
.topband__school select { max-width: 220px; }
.topband__user { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1500px) {
  .topband { gap: 16px; }
  .topband__school select { max-width: 160px; }
  .topband__school .btn { font-size: 0; gap: 0; padding: 4px 8px; }
  .topband__school .btn .ico { width: 17px; height: 17px; }
  .topband__manual { font-size: 0; gap: 0; padding: 2px 8px; }
  .topband__manual .ico { width: 17px; height: 17px; }
}

@media (max-width: 1280px) {
  .topband { gap: 14px; padding: 0 14px; }
  .brand__tag { display: none; }
  .topband__school { min-width: 0; }
  .topband__school > :not(svg) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 1080px) {
  .brand__name { font-size: 18px; }
  .topband__help { padding: 2px 8px; }
  /* 文字は消し、絵だけ残します（押す場所は変わりません） */
  .topband__help { font-size: 0; gap: 0; }
  .topband__help .ico { width: 17px; height: 17px; }
}

/* ---- 取扱説明書への入口（左メニューの下） ---- */
.sidebar__foot a.link { white-space: nowrap; }

/* ============================================================
   チャット（標準機能）
   色はこの作りのキーカラーをそのまま使います（チャット専用の色は増やしません）。
     自分のふきだし … --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; } }

/* ============================================================
   二段階認証
   ============================================================ */

/* 6けたを入れる欄。数字が読みやすいように、大きく・字間をあけます */
.input--code {
  font-size: 22px;
  letter-spacing: .32em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 10px 12px;
}

.input--date { max-width: 200px; }

/* QRコード。白地のまま出したいので、まわりに枠だけ付けます */
.qr {
  display: inline-block;
  margin: 10px 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 0;
}
.qr svg { display: block; width: 200px; height: 200px; }

/* 手で打ち込むときの合い言葉 */
.code-key {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  font-size: 14px;
  letter-spacing: .08em;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  user-select: all;
}

/* 予備の番号。印刷して保管していただくものなので、大きめに出します */
.codes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  margin: 10px 0;
  padding: 0;
}
.codes li {
  padding: 7px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
}
.codes code {
  font-size: 15px;
  letter-spacing: .1em;
  user-select: all;
}

/* 登録の手順（1. 2. と続くもの） */
.mfa-steps { margin: 8px 0 0 20px; list-style: decimal; }
.mfa-steps > li { margin-bottom: 16px; line-height: 1.9; }

/* 印刷するときは、予備の番号だけを出します */
@media print {
  .topband, .sidebar, .crumbbar, .tabs, .btn, form { display: none !important; }
  .main { margin: 0 !important; }
  #recovery { border: none; }
}


/* スクールバスの登録・年間予定（行き・帰りを1つの表に） */
.busreg .dirhead { font-size: 12px; letter-spacing: .02em; color: #fff; }
.busreg .dirhead--go { background: var(--green); }
.busreg .dirhead--back { background: var(--blue); }
.busreg td.cellsep, .busreg th.cellsep { border-left: 2px solid var(--border-strong); }
.buscal__link { display: block; text-decoration: none; color: inherit; }
.buscal__link:hover { background: var(--orange-tint); }
.buscal__cell.is-picked { outline: 2px solid var(--orange); outline-offset: -2px; }
.buscal__dot { color: var(--orange); font-size: 8px; margin-left: 2px; vertical-align: 2px; }
.buscal__num.is-none { color: var(--text-muted); font-weight: 400; }


/* ============================================================
   タイムカード（打刻・一覧の編集・出勤簿の出力）
   提案モック（mock/css）と同じ見た目にそろえてあります。
   ============================================================ */
.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-punch__form { flex: 1; display: flex; margin: 0; }
.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; width: 100%;
}
.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-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-table tr.is-voided td, .tc-table tr.is-voided th { color: var(--text-muted); text-decoration: line-through; }
.tc-table tr.is-voided td:last-child { text-decoration: none; }
.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; display: inline-flex; align-items: center; text-decoration: none;
}
.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%; max-width: none; }
.tc-dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }

/* 出勤簿の出力：氏名の選択（押すと色が変わる。中身は checkbox） */
.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; display: inline-flex; align-items: center; gap: 4px;
}
.tc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tc-chip:hover { background: var(--orange-tint); }
.tc-chip.is-on, .tc-chip:has(input:checked) { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.tc-chip:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* 出勤簿の見本 */
.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; }

/* 上の帯：学校名の右に本人の名前 ／ 左メニューの上に打刻 */
.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); color: #fff; }
.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; } }

/* ============================================================
   ファイル管理（エクスプローラー風）
   ============================================================ */
.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; text-decoration: none; text-align: center; }
.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; text-decoration: none; }
.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; text-decoration: none; }
.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); }
.fm-search .input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fm-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--text-muted); text-decoration: none; }
.fm-ico:hover { background: var(--orange-tint); color: var(--orange-dark); }
.fm-ico .ico { width: 16px; height: 16px; }
.fm-panel { margin-bottom: 8px; }
.fm-panel > summary { display: inline-flex; list-style: none; cursor: pointer; }
.fm-panel > summary::-webkit-details-marker { display: none; }
.fm-panel__body { margin-top: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-alt); }
.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-name { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-align: left; text-decoration: none; flex-wrap: wrap; }
.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; }
.fm-chip { display: inline-block; font-size: 11px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 8px; color: var(--text); text-decoration: none; margin: 0 2px 2px 0; }
.fm-chip:hover { border-color: var(--orange); color: var(--orange-dark); background: var(--orange-tint); }
@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; } }

/* ---- リンク集 ---- */
.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__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); }
.busreg td.bus-off + td, .busreg td.bus-off + td + td, .busreg td.bus-off + td + td + td { opacity: .55; }
.bus-offs .bus-off-reason { font-size: 13px; }

/* ホーム（今日）の3列（モックの .home3 と同じ並び）：左＝出欠・行事、中＝時間割・未処理・受信、右＝バス・調査の期限・よく使う入力 */
.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 .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
.home3 .table-wrap { overflow-x: auto; }
.home3 .table--nowrap td, .home3 .table--nowrap th { white-space: nowrap; }
.home3 .table--nowrap td:last-child, .home3 .table--nowrap td:last-child .bus-off-reason { white-space: normal; }
.home3 .row.is-attn { background: var(--red-tint); }
.home3 .btn--sm { white-space: nowrap; }
/* ★9/20 3列は 900px まで保ちます（ノートPCの拡大表示でも3列で出るように） */
@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; } }

/* ---- 出欠の入力：区分の選び場所（★9/11 確定したあとも、選んでいる区分だけは色つきで残す） ---- */
.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); }
/* 確定ずみ（または直せない人）。押せないことは disabled と薄さで分かります。選んでいる区分の色はそのまま */
.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/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); }
@media (max-width: 900px) {
  .tc-list.grid--4 { grid-template-columns: 1fr; }
  .tc-list .span-3 { grid-column: auto; }
}

/* ---- 上の帯：ホームへ戻るボタン（★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;
}
/* せまい画面では文字を消して、絵だけにします（押す場所は変わりません） */
@media (max-width: 1280px) {
  .topband__home { padding: 0 7px; gap: 0; }
  .topband__home-label { display: none; }
}
@media print { .topband__home { display: none; } }
.topband__menu + .topband__home { margin-left: -12px; }

/* ---- 左メニュー 4つ目のまとまり（管理）の色（9/11。モックの style.css と同じ） ---- */
.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); }

/* ============================================================
   絵（アイコン）を機能ごとの色に（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; }

/* ============================================================
   WEBメール（9/11 提案モックの .ml-* と同じ形。仕様書 WEBメール拡張_仕様書_20260911.md）
   ============================================================ */
/* 個人／代表の切り替え（上のタブ） */
.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); }

/* 小さな行き先（受信箱・作成・下書き…） */
.ml-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ml-sub .tc-chips { margin-right: auto; }
.ml-sub .tc-chip { text-decoration: none; color: inherit; }
.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 { 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: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-subj { width: 100%; }
.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); }
a.tc-overlay { display: block; }

/* 送信の確認（学校の外へ出るときだけ） */
.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-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; } }
.tc-dialog--wide { width: min(760px, 94vw); }

/* ---- ホーム：児童生徒の名前を出さない人（教育委員会など）への人数だけの案内（9/11） ---- */
.today-names-hidden { line-height: 1.7; }

/* ---- スクールバス：乗車名簿を1つの表に（9/11）。便ごとの見出し行で区切ります ---- */
.bus-roster tr.bus-route-head th { background: var(--orange-tint); color: var(--text-strong); text-align: left; border-top: 2px solid var(--orange); padding: 8px 10px; }
.bus-roster .bus-route-head__name { font-size: 14px; font-weight: 700; margin-right: 10px; }
.bus-roster .bus-route-head__time { color: var(--text-muted); font-weight: 400; margin-right: 10px; }
.bus-roster .bus-route-head__count { font-weight: 400; margin-right: 8px; }
.bus-roster tr.bus-route-empty td { color: var(--text-muted); padding: 6px 10px 12px; }
.bus-roster tr.is-off td { background: var(--bg); }
/* 登録・年間予定の便ごとの見出しも同じ見た目に */
.bus-route-band { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; padding: 6px 10px; background: var(--orange-tint); border-top: 2px solid var(--orange); border-radius: var(--r); }
.bus-route-band__name { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.bus-route-band .small { color: var(--text-muted); }
@media print { .bus-roster tr.bus-route-head th { background: #f3f3f3 !important; -webkit-print-color-adjust: exact; } }

/* ---- スクールバス：登録を1人1行に（9/11 夜）。学級／お名前／行き／帰り／覚え書き ---- */
/* ★9/11 便ごとの帯：上段に、色つきで少し大きく */
.busreg-band { gap: 10px 12px; padding: 10px 12px; margin-bottom: 14px; background: transparent; border: 0; }
.busreg-band__route { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line, #d8dde5); border-left: 6px solid #4c8be0; background: #fff; }
.busreg-band__route--c0 { border-left-color: #4c8be0; background: #eef4fd; }
.busreg-band__route--c1 { border-left-color: #2f9e6a; background: #ebf7f0; }
.busreg-band__route--c2 { border-left-color: #e8792c; background: #fdf1e8; }
.busreg-band__route--c3 { border-left-color: #8a5bd6; background: #f3edfb; }
.busreg-band__name { color: var(--text-strong); font-size: 15px; margin-right: 6px; }
.busreg-band__dir { color: #555; font-size: 13px; }
.busreg-band__num { font-size: 24px; font-weight: 700; line-height: 1; }
.busreg-band__num--go { color: #2f9e6a; }
.busreg-band__num--back { color: #2c6fd1; }
.busreg-band__cap { color: #777; font-size: 13px; margin-left: 4px; }
.busreg2 { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.busreg2__head, .busreg2__row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(260px, 2fr) minmax(260px, 2fr) minmax(110px, .8fr); gap: 0; align-items: center; }
.busreg2--classes .busreg2__head, .busreg2--classes .busreg2__row { grid-template-columns: 64px minmax(150px, 1fr) minmax(260px, 2fr) minmax(260px, 2fr) minmax(110px, .8fr); }
.busreg2__c { padding: 6px 8px; min-width: 0; }
.busreg2__head { background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; }
.busreg2__head .dirhead { color: #fff; }
.busreg2__head .dirhead--go { background: var(--green); }
.busreg2__head .dirhead--back { background: var(--blue); }
.busreg2__hint { display: block; font-size: 10.5px; font-weight: 400; opacity: .9; }
.busreg2__group { background: var(--orange-tint); border-top: 2px solid var(--orange); padding: 5px 10px; font-size: 13px; font-weight: 700; color: var(--text-strong); }
.busreg2__row { border-top: 1px solid var(--border); }
.busreg2__row:nth-child(even) { background: var(--surface-alt); }
.busreg2__row.is-off { background: var(--bg); }
.busreg2__row.is-off .busreg2__name { color: var(--text-muted); }
.busreg2__no { display: inline-block; min-width: 1.6em; font-size: 11px; color: var(--text-muted); }
.busreg2__name { font-weight: 700; }
.busreg2__usual { display: block; font-size: 11px; }
.busd { display: grid; grid-template-columns: auto 1fr 1fr; gap: 4px 6px; align-items: center; border-left: 3px solid transparent; }
.busd--go { border-left-color: var(--green); }
.busd--back { border-left-color: var(--blue); }
.busd.is-blocked { grid-template-columns: auto 1fr; }
.busd__seg { min-width: 116px; }
.busd .seg__btn { display: flex; align-items: center; justify-content: center; position: relative; min-height: 30px; font-size: 12px; padding: 0 8px; }
.busd .seg__btn input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.busd .seg__btn:has(input:checked) { font-weight: 700; }
.busd .seg__btn--ride:has(input:checked) { background: var(--green); color: #fff; }
.busd .seg__btn--no:has(input:checked) { background: var(--border-strong); color: var(--text-strong); }
.busd .seg__btn:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: -2px; }
.busd .seg__btn:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.busd .seg__btn:has(input:disabled:checked) { opacity: 1; }
.busd__route, .busd__stop { font-size: 12px; min-width: 0; max-width: 100%; }
.busd__mark { grid-column: 1 / -1; font-size: 10.5px; line-height: 1.2; }
.busd__mark--usual { color: var(--text-muted); }
.busd__mark--changed { color: var(--orange-dark); font-weight: 700; }
.busd.is-usual .busd__mark--changed, .busd.is-changed .busd__mark--usual { display: none; }
.busd.is-changed .busd__route, .busd.is-changed .busd__stop { font-weight: 700; border-color: var(--orange); }
.busd .bus-off-reason { white-space: normal; }
/* 狭い画面（タブレット）では、行きと帰りが縦に並びます（1人ぶんがひとまとまりのカードのように） */
@media (max-width: 1100px) {
  .busreg2__head { display: none; }
  .busreg2__row, .busreg2--classes .busreg2__row { grid-template-columns: 1fr; gap: 4px; padding: 6px 0; }
  .busreg2__c--class { display: none; }
  .busd { grid-template-columns: auto minmax(120px, 1fr) minmax(120px, 1fr); }
  .busd::before { content: '行き'; font-size: 11px; font-weight: 700; color: var(--green-dark); grid-column: 1 / -1; }
  .busd--back::before { content: '帰り'; color: var(--blue); }
  .busd.is-blocked { grid-template-columns: auto 1fr; }
}
@media (max-width: 560px) {
  .busd { grid-template-columns: 1fr; }
  .busd.is-blocked { grid-template-columns: 1fr; }
}
.busd .seg__btn { white-space: nowrap; }
.busd .select { width: 100%; min-width: 0; padding-left: 6px; padding-right: 20px; }
.busreg2__c--note .input { width: 100%; box-sizing: border-box; }

/* ★9/11 ホーム上部：学年別の出欠サマリ（小さな1行チップ。押すと出欠管理へ） */
/* ★9/14 1年から6年までを1行に並べます。
   ・枠は等分（grid）。画面がせまいときだけ2行・3行に折り返します
   ・中の文字を少し詰めました（「遅刻 0」→「遅刻0」）。読みやすさは変えていません */
.gsum{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:6px;margin:0 0 12px}
/* ★せまいときは枠の中で2行に折り返します（枠そのものは1列に並んだまま）。
   数字のかたまり（遅刻0 など）は途中で切れないように、子だけ nowrap にしています */
.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}

/* ★9/11 ホームの枠の並べ替え・表示設定（仕様書 20260911） --------------- */
.lay { align-items: start; }
.lay-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* 列の末尾。ふだんは薄く、ドラッグ中だけ受け皿として広がります */
.lay-drop-end { min-height: 10px; border-radius: 6px; transition: all .12s; }
.lay-drop-end.drop-here { min-height: 64px; border: 2px dashed var(--orange); background: var(--orange-tint); }

.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; }
/* ★10/2 1280px 以下では ◀▲▼▶ を隠す（⋮ の中に同じものがある）。− と ⋮ は残す */
@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-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-pnl:hover .lay-btn, .lay-head:focus-within .lay-btn { opacity: 1; }
.lay-btn:hover { background: var(--surface-2, #f1f3f6); color: var(--text-strong); border-color: var(--border); }
.lay-btn:disabled { opacity: .38; cursor: default; }

/* 最小化は高さのアニメーション（display:none だと畳む動きが出ません） */
.lay-body { max-height: 4000px; transition: max-height .16s ease; }
.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-menu {
  position: absolute; right: 4px; top: 100%; z-index: 20; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.14); padding: 4px; display: flex; flex-direction: column;
}
.lay-menu__item {
  text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 6px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.lay-menu__item:hover:not([disabled]) { background: var(--orange-tint); }
.lay-menu__item[disabled] { opacity: .38; cursor: default; }

.lay-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.lay-hidden.is-empty { display: none; }
.lay-hidden__label { font-size: 12px; color: var(--text-muted); }
.lay-reset { margin: 4px 0 16px; }

@media print { .lay-btn, .lay-grip, .lay-hidden, .lay-reset { display: none !important; } }

/* ★9/13 ログイン画面の「ログインIDを覚える」 */
.field--check { margin-bottom: 16px; }
.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; }
.field--check .field__hint { margin-top: 6px; }

/* =========================================================
   学校日誌（9/14）── 日付の送り、入力の並び、児童生徒の状態
   ========================================================= */

/* 前日・前週・前月／本日／翌日・翌週・翌月 */
.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; }

/* ホームの枠の中の、狭い入力 */
.lay-pnl .dgrid { grid-template-columns: 1fr; }
/* 中の列がひろい枠（今日の行事）では2列に */
.lay-pnl .dgrid--2 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.lay-pnl .dadd { margin-top: 12px; padding-top: 12px; }
.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 ホームの枠は、その枠のもとになっている機能の色にします */
.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"]   { --fc: #B5651D; }  /* 日誌 */
.lay-pnl[data-pnl="staffmoves"] { --fc: #B5651D; }  /* 日誌 */
.lay-pnl[data-pnl="whiteboard"] { --fc: #B5651D; }  /* 日誌 */
.lay-pnl[data-pnl="diary"]      { --fc: #B5651D; }  /* 日誌 */

/* ★9/14 上の帯の「取扱説明書」（図解つき）。せまい画面では文字を隠して絵だけにします */
.topband__manual { margin-left: -4px; }
@media (max-width: 1180px) { .topband__manual span, .topband__manual { font-size: 0; } .topband__manual .ico { font-size: 16px; } }

/* ★9/15 見るだけのアカウント（教育委員会）の断り */
.ro-note { border-left: 4px solid #2F7BC4; }

/* ★9/15 ［印刷］［CSV］のボタン。タブの帯の右はしに寄せます（保健管理・体力テスト・個人カルテ） */
.ex-btns { display: flex; gap: 6px; margin: -8px 0 16px; justify-content: flex-end; }
.ex-btns .btn { min-width: 64px; }
@media print { .ex-btns { display: none; } }

/* ---- 週案簿：提出と確認の流れ（★9/16）表示中の週の行 ---- */
.table tr.is-current td { background: var(--green-tint); }

/* ★9/17 新年度のふりわけ（案A） */
.rp-more { display: inline-block; }
.rp-more > summary { display: inline-flex; align-items: center; list-style: none; cursor: pointer; }
.rp-more > summary::-webkit-details-marker { display: none; }
.rp-more > summary::marker { content: ''; }
.rp-more[open] > summary { margin-bottom: 6px; }
.rp-more__form { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; }
.rp-more__form .select, .rp-more__form .input { min-width: 8rem; }

/* ---- 年間計画のカレンダー（★9/18） ---------------------------------------
 * 月ごとの升目。日を押すと、左の「行事を1件足す」に日付が入ります。
 * 休みの日（学校暦）は色を変えます。土日も学校暦から決めます。
 */

.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th {
  padding: 4px 0;
  font-size: var(--fs-sm);
  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--flat { cursor: default; }
.cal__ev {
  display: block;
  font-size: var(--fs-sm);
  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 学級だけの行事 */
/* ★9/18 予定表の月カレンダー。対象ごとに色を変えます（予定表の印と同じ考え方） */
.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); }

@media (max-width: 1100px) {
  .cal__cell { height: 72px; }
}
.cal__day.is-picked { background: var(--orange); color: #fff; }

/* =========================================================
 * ★9/19 朝の職員室（ホームの上の2列：今日の黒板・朝の打合せ・学年団・補教）
 *   提案用モック（mock/css/style.css）と同じ見た目です。
 * ========================================================= */

/* ホームの「朝」の2列。下の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列ぶん＝横いっぱい）。中身のない列は場所をとりません */
/* ★9/20 上のまとまりは「黒板の段（列0。2列ぶん・3列ぶん）」＋「その下の3列（列1〜3。同じ幅）」。
   列0 は黒板が入っている列。中身のない列も場所は残します（そこへ ▶ で動かせるように） */
.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 .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 .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); }
.card--board .mo-col__head { border-bottom-color: #2E4F3E; }

.mo-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.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; } }
.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-col__btns { display: inline-flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.mo-col__btns .form-inline { display: inline; }
.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-edit {
  font: inherit; font-size: 11px; line-height: 1; display: inline-block; text-decoration: none;
  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; text-decoration: none; }
.mo-edit--btn { list-style: none; }
.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 li.is-warn { background: var(--yellow-tint); }
.mo-list__note { display: block; font-size: 12px; color: var(--text-muted); }
.mo-list__note .form-inline { display: inline; margin-left: 6px; }

.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 .form-inline { flex: 0 0 auto; }
.mo-meet__tick {
  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 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; margin: 0 0 4px; }
.mo-ed { margin: 4px 0 8px; }

/* 休んでいる子：理由は1行だけ（続きは…）。OP の印はバッジの中に */
.row__sub--1line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge .nav__op { margin-left: 4px; transform: scale(.85); }
a.row { color: inherit; text-decoration: none; }
a.row:hover { background: var(--orange-tint); }

/* ホームの枠のボタン（◀▲▼▶ −） */
.lay-btn--min { font-weight: 700; font-size: 13px; }

/* 勤怠管理：シフト管理（ひと月の表） */
.mv-month th, .mv-month td { padding: 4px 3px; font-size: 11.5px; }
.mv-month .is-off { background: var(--surface-alt); }
.mv-month .is-today { box-shadow: inset 0 0 0 2px var(--orange); }
.mv-month .badge { padding: 1px 5px; font-size: 10.5px; }

/* 設定 → 今日の黒板 */
tr.is-on td { background: var(--green-tint); }
/* せまい列（左の300px）では ◀▶ を出しません（⋮ の中に同じものがあります） */
/* ★9/20 どの列でも ◀▶ が使えます（前は左の列だけ隠していました） */
.lay-head .card__meta { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ★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メールの枠 */
.lay-settings { margin-right: 4px; }
.home-display { margin: auto; border: 1px solid var(--border, #ddd); border-radius: 10px; padding: 20px 24px; max-width: 420px; width: calc(100% - 32px); }
.home-display::backdrop { background: rgba(0, 0, 0, .35); }
.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__row a:hover .mail-home__subj { text-decoration: underline; }
.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 進路：出願の進み具合 */
.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 時間割づくり */
.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--cond td.is-none:hover { background: var(--surface-alt); }
.tt--ed td.tt-drop { min-width: 110px; height: 52px; padding: 3px; vertical-align: top; transition: background .1s; }
.tt--ed td.is-free { background: var(--surface-alt); }
.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--ed td.is-over { outline: 2px dashed var(--orange); }
.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:active { cursor: grabbing; }
.tt-chip.is-selected { box-shadow: 0 0 0 2px var(--orange); }
.tt-chip.is-bad { border-left-color: var(--red); background: #fff4f4; }
.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; }
.text-red { color: var(--red); }
.table tr.is-muted td { color: var(--text-muted); }

/* ★Phase 2 時間割づくり：教室別・全校・A/B週・先生本人の希望 */
.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); color: #fff; }
.tt-chip__cyc.is-b { background: var(--orange); }
.tt-chip.is-len2 { border-style: dashed; }
.tt--all { font-size: 11px; }
.tt--all th, .tt--all td { padding: 2px 3px; white-space: nowrap; }
.tt--all td.tt-all__cell { min-width: 3.2em; text-align: center; cursor: pointer; }
.tt--all td.tt-all__cell:hover { background: var(--surface-alt); }
.tt--all td.is-bad { background: #fff4f4; color: var(--red); font-weight: 700; }
.tt--all th.tt-all__day { background: var(--surface-alt); }
.tt-swaps { list-style: none; padding: 0; margin: 6px 0 0; }
.tt-swaps li { padding: 3px 0; border-top: 1px dashed var(--border); }
.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); background: #eef4ff; font-weight: 700; }
.tt-student__exchange { background: var(--yellow-tint); }

/* ★Phase 4 時数ダッシュボードの未達リスク・代打候補 */
.stat--danger { border-color: var(--red); background: #fff4f4; }
.stat--warn { border-color: var(--yellow); background: var(--yellow-tint); }
.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); }
.risk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; background: var(--green); }
.risk-dot--red { background: var(--red); }
.risk-dot--yellow { background: var(--yellow); }
.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); }
.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); }
.connect-mail__edit .input--sm { min-width: 12em; }

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

/* ★9/28 時間割：備考の行・休みの日の名前・列の幅をそろえる */
.tt:not(.tt--all) { table-layout: fixed; width: 100%; }
.tt th:first-child, .tt td:first-child { width: 4.2em; }
.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-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__acts > .wcell__ed > summary.btn--ghost:hover { color: var(--text); }
.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 いいとこみつけ：学級一覧の「すぐ記録する」 */
.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-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/6 年度更新（教育委員会） */
.rb-steps { flex-direction: row; flex-wrap: wrap; }
.rb-steps .step { flex: 1 1 160px; min-width: 0; }
.rb-intake-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; align-items: end; }
.rb-intake-form .field { margin: 0; min-width: 0; }
.rb-intake-form__go { align-self: end; }
.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); }
.home-date.is-past { padding: 8px 10px; border-radius: var(--r); background: var(--orange-tint); border: 1px solid var(--orange); }
.home-date__note { font-size: 12.5px; flex: 1 1 260px; min-width: 0; }
@media print { .home-date { display: none; } }
