/* =====================================================================
   KEDe 統合デザイン — 「黒板と出席簿」
   黒板の緑と、チョークの白・黄色。データは出席簿のような罫線の行で見せる。
   サイトごとの色は site.php の theme で :root を上書きできる。
   ===================================================================== */
:root {
  --board: #22372f;        /* 黒板 */
  --board-2: #2d473d;      /* 黒板（明） */
  --board-line: #3d5a4f;
  --chalk: #f3f5f2;        /* ページ地（冷たい白） */
  --paper: #ffffff;
  --ink: #1d2622;          /* 本文 */
  --pencil: #5c6a64;       /* 補足 */
  --rule: #d8dfdb;         /* 罫線 */
  --rule-soft: #e8ece9;
  --yellow: #efc94c;       /* チョークの黄 */
  --yellow-ink: #6b5410;
  --yellow-soft: #fbf3d6;
  --enji: #a33a4a;         /* えんじ（注意・取消） */
  --enji-soft: #f7e6e9;
  --leaf: #2f7a57;         /* 完了 */
  --leaf-soft: #e1f0e8;
  --sky: #2c5d86;          /* リンク */
  --r-sm: 6px;
  --r-md: 12px;
  --shadow: 0 1px 0 rgba(29, 38, 34, 0.06);
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-head: "Zen Maru Gothic", "BIZ UDPGothic", "Hiragino Maru Gothic ProN", sans-serif;
  --tabbar-h: 62px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt" 0;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.4; margin: 0 0 .6em; letter-spacing: .02em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--pencil); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------------
   上部バー（黒板）
   --------------------------------------------------------------------- */
.board-bar { background: var(--board); color: var(--chalk); border-bottom: 3px solid var(--board-line); }
.board-bar__in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { color: var(--chalk); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: .06em; white-space: nowrap; }
.brand small { display: block; font-size: .7rem; font-weight: 500; opacity: .75; letter-spacing: .02em; }
.topnav { display: none; gap: 2px; flex: 1; }
.topnav a { color: #d9e3de; text-decoration: none; padding: 6px 10px; border-radius: var(--r-sm); font-size: .92rem; }
.topnav a:hover { background: var(--board-2); color: #fff; }
.topnav a[aria-current="page"] { color: var(--yellow); box-shadow: inset 0 -2px 0 var(--yellow); border-radius: 0; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who a, .who button { color: var(--chalk); }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; text-decoration: none; }
.bell:hover { background: var(--board-2); }
.bell svg { width: 22px; height: 22px; }
.bell__n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: var(--r-sm); font-size: .9rem; color: var(--chalk); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: var(--board-2); }
.usermenu__panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 6px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.usermenu__panel a, .usermenu__panel button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--chalk); }
.btn-login { background: var(--yellow); color: var(--ink) !important; text-decoration: none; padding: 7px 14px; border-radius: var(--r-sm); font-weight: 700; font-size: .9rem; }

/* 緊急のお知らせ帯 */
.alert-band { background: var(--enji); color: #fff; }
.alert-band__in { max-width: 1080px; margin: 0 auto; padding: 8px 16px; font-size: .92rem; display: flex; gap: 10px; align-items: baseline; }
.alert-band a { color: #fff; font-weight: 700; }

/* ---------------------------------------------------------------------
   本文
   --------------------------------------------------------------------- */
.page { max-width: 760px; margin: 0 auto; padding: 22px 16px calc(var(--tabbar-h) + 40px); }
.page--wide { max-width: 1080px; }
.page-head { margin: 4px 0 18px; }
.page-head h1 { margin-bottom: .2em; }
.page-head p { color: var(--pencil); margin: 0; }
.crumbs { font-size: .85rem; color: var(--pencil); margin-bottom: 6px; }
.crumbs a { color: var(--pencil); }

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel--quiet { background: transparent; border-style: dashed; box-shadow: none; }
.panel--note { background: var(--yellow-soft); border-color: #ecdca0; }
.section { margin: 30px 0 14px; }
.section > h2 { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 0; }
.section > h2 .aside { margin-left: auto; font-family: var(--font-body); font-weight: 400; font-size: .85rem; }

/* 出席簿のような行リスト */
.rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); }
.rows--boxed { border-top: 1px solid var(--rule); border-radius: var(--r-md); }
.rows > li { display: grid; grid-template-columns: minmax(7.5em, 32%) 1fr; gap: 4px 14px; padding: 12px 16px; border-bottom: 1px solid var(--rule-soft); align-items: baseline; }
.rows > li:last-child { border-bottom: 0; }
.rows .k { color: var(--pencil); font-size: .88rem; }
.rows .v { min-width: 0; overflow-wrap: anywhere; }
.rows--link > li { grid-template-columns: 1fr auto; }
.rows--link a.rowlink { color: var(--ink); text-decoration: none; display: block; }
.rows--link a.rowlink:hover strong { text-decoration: underline; }
.rows .date { color: var(--pencil); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { padding: 22px 16px; color: var(--pencil); text-align: center; }

/* 状態ラベル */
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .8rem; line-height: 1.7; white-space: nowrap; border: 1px solid transparent; vertical-align: 1px; }
.chip--ok { background: var(--leaf-soft); color: var(--leaf); }
.chip--warn { background: var(--yellow-soft); color: var(--yellow-ink); }
.chip--danger { background: var(--enji-soft); color: var(--enji); }
.chip--plain { background: var(--rule-soft); color: var(--pencil); }
.chip--board { background: var(--board); color: var(--yellow); }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: var(--r-sm); border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.3; }
.btn:hover { background: #33403a; }
.btn--yellow { background: var(--yellow); border-color: #d9b234; color: var(--ink); }
.btn--yellow:hover { background: #f4d466; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: var(--rule-soft); }
.btn--danger { background: var(--paper); color: var(--enji); border-color: #e2b7be; }
.btn--danger:hover { background: var(--enji-soft); }
.btn--line { background: #06c755; border-color: #06c755; color: #fff; }
.btn--line:hover { background: #05b34c; }
.btn--block { width: 100%; }
.btn--sm { min-height: 34px; padding: 4px 12px; font-size: .88rem; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }

/* フォーム */
.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.req { color: var(--enji); font-size: .8rem; margin-left: 4px; font-weight: 400; }
.hint { color: var(--pencil); font-size: .84rem; margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9c4bf; border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 16px;
}
textarea.input { min-height: 110px; line-height: 1.6; }
textarea.input--code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 220px; }
.input:focus { border-color: var(--board); outline: 3px solid rgba(239, 201, 76, .55); outline-offset: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); margin-bottom: 8px; background: #fff; cursor: pointer; }
.choice input { margin-top: .45em; width: 18px; height: 18px; flex: none; accent-color: var(--board); }
.choice:has(input:checked) { border-color: var(--board); background: #eef4f1; }
.inline-form { display: inline; }
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr; }

/* お知らせ */
.notice { border-left: 4px solid var(--ink); background: var(--paper); padding: 12px 14px; margin-bottom: 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.notice--ok { border-color: var(--leaf); background: var(--leaf-soft); }
.notice--error { border-color: var(--enji); background: var(--enji-soft); }
.notice--warn { border-color: #d9b234; background: var(--yellow-soft); }
.notice h3 { margin: 0 0 4px; font-size: 1rem; }
.notice p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------------
   トップの黒板（このデザインの主役）
   --------------------------------------------------------------------- */
.chalkboard {
  position: relative; background: var(--board); color: var(--chalk);
  border-radius: 14px; border: 10px solid #6b4f36; /* 木枠 */
  padding: 22px 20px 18px; margin: 0 0 22px;
  box-shadow: inset 0 0 60px rgba(0,0,0,.25), 0 2px 0 #4a3624;
}
.chalkboard::after { /* チョーク置き */
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -10px; height: 6px; background: #5a4230; border-radius: 0 0 4px 4px;
}
.chalkboard__date { position: absolute; top: 14px; right: 18px; writing-mode: vertical-rl; font-family: var(--font-head); font-size: .85rem; color: #cfdad4; letter-spacing: .1em; }
.chalkboard h1 { font-size: clamp(1.5rem, 5.4vw, 2.2rem); color: #fff; margin: 0 2.2em .2em 0; text-shadow: 0 0 1px rgba(255,255,255,.4); }
.chalkboard__meta { color: #cfdad4; font-size: .92rem; margin-bottom: 14px; }
.countdown { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 16px; font-family: var(--font-head); }
.countdown__n { font-size: clamp(2.6rem, 11vw, 4rem); line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.countdown__u { color: #e6ece9; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.step { border: 1px dashed #6f8c80; border-radius: 10px; padding: 10px 12px; color: #dbe4df; min-height: 92px; display: flex; flex-direction: column; gap: 2px; }
.step__no { font-family: var(--font-head); font-size: .78rem; color: #a9bcb3; }
.step__label { font-family: var(--font-head); font-size: 1.05rem; color: #fff; }
.step__when { font-size: .78rem; color: #b8c9c1; }
.step__mine { margin-top: auto; }
.step--now { border: 2px solid var(--yellow); background: rgba(239, 201, 76, .09); }
.step--now .step__label { color: var(--yellow); }
.step--done { opacity: .62; }
.step--done .step__label::after { content: "　済"; font-size: .8rem; color: #a9bcb3; }
.step--skip { display: none; }
.chalkboard .actions { margin-top: 16px; }
.chalkboard .btn--ghost { color: var(--chalk); border-color: #6f8c80; }
.chalkboard .btn--ghost:hover { background: var(--board-2); }

/* 時間割のような入口 */
.timetable { display: grid; grid-template-columns: repeat(2, 1fr); border: 2px solid var(--ink); border-radius: var(--r-md); overflow: hidden; background: var(--paper); }
.timetable a { display: flex; flex-direction: column; gap: 2px; padding: 14px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-height: 84px; }
.timetable a:nth-child(2n) { border-right: 0; }
.timetable a:hover { background: var(--yellow-soft); }
.timetable strong { font-family: var(--font-head); font-size: 1.02rem; }
.timetable span { font-size: .8rem; color: var(--pencil); }

/* タブ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--ink); margin-bottom: 0; overflow-x: auto; }
.tabs button, .tabs a { background: none; border: 0; padding: 8px 14px; font: inherit; color: var(--pencil); cursor: pointer; text-decoration: none; border-radius: var(--r-sm) var(--r-sm) 0 0; white-space: nowrap; }
.tabs [aria-selected="true"] { background: var(--ink); color: #fff; }
.tabpanel[hidden] { display: none; }

/* スライド */
.slides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 18px; padding: 0 16px 6px; }
.slides a { flex: 0 0 86%; scroll-snap-align: start; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--rule); background: var(--paper); }
.slides img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* 表 */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
.table th { background: #f6f8f7; font-weight: 700; color: var(--pencil); white-space: nowrap; font-size: .84rem; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }

/* ページ送り */
.pager { display: flex; gap: 6px; justify-content: center; margin: 16px 0; }
.pager a, .pager span { min-width: 38px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); text-align: center; text-decoration: none; color: var(--ink); background: var(--paper); }
.pager span[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 日程調整のカレンダー */
.cal { margin-bottom: 18px; }
.cal__month { font-family: var(--font-head); margin: 0 0 8px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font-size: .75rem; color: var(--pencil); }
.cal__day { min-height: 54px; border: 1px solid var(--rule-soft); border-radius: var(--r-sm); padding: 4px; font-size: .8rem; background: #fff; }
.cal__day--blank { border: 0; background: transparent; }
.cal__day--has { border-color: var(--board); }
.cal__day b { display: block; font-variant-numeric: tabular-nums; }
.slot { display: block; margin-top: 3px; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: block; text-align: center; border: 1px solid var(--board); border-radius: 4px; padding: 2px 0; font-size: .78rem; cursor: pointer; }
.slot input:checked + span { background: var(--board); color: var(--yellow); }
.slot input:focus-visible + span { outline: 3px solid var(--yellow); }
.bar { height: 8px; background: var(--rule-soft); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--board); }
.bar--top > i { background: var(--yellow); }

/* チャット */
.chat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 360px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); }
.chat__log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg--them { align-self: flex-start; background: #eef2f0; border-bottom-left-radius: 4px; }
.msg--me { align-self: flex-end; background: var(--board); color: #fff; border-bottom-right-radius: 4px; }
.msg img { display: block; max-width: 220px; border-radius: 8px; margin-top: 4px; }
.msg__meta { display: block; font-size: .72rem; opacity: .7; margin-top: 2px; }
.chat__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--rule); align-items: flex-end; }
.chat__form textarea { flex: 1; min-height: 44px; max-height: 140px; resize: vertical; }

/* アルバム */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); display: block; }
.photos figcaption { font-size: .72rem; color: var(--pencil); }

/* 下のタブバー（スマホ） */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--rule); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; z-index: 40; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--pencil); text-decoration: none; font-size: .7rem; position: relative; }
.tabbar svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--board); font-weight: 700; }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--yellow); border-radius: 0 0 3px 3px; }
.tabbar .bell__n { top: 4px; right: calc(50% - 22px); }

/* フッター */
.foot { max-width: 1080px; margin: 0 auto; padding: 24px 16px calc(var(--tabbar-h) + 30px); color: var(--pencil); font-size: .84rem; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot a { color: var(--pencil); }
.foot .copy { flex-basis: 100%; }

/* ポップアップ */
.popup { position: fixed; inset: 0; background: rgba(20, 28, 25, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90; }
.popup[hidden] { display: none; }
.popup__box { background: var(--paper); border-radius: var(--r-md); max-width: 460px; width: 100%; padding: 20px; border-top: 6px solid var(--yellow); }

/* 記事本文（WordPress・イベント説明） */
.prose { line-height: 1.9; }
.prose h2 { margin-top: 1.6em; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--r-sm); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 6px 10px; }
.prose blockquote { margin: 1em 0; padding: 8px 14px; border-left: 4px solid var(--rule); color: var(--pencil); }

/* 当日ページの進行表 */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--board); }
.timeline li { position: relative; padding: 6px 0 14px 18px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 12px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 3px solid var(--board); }
.timeline time { font-family: var(--font-head); font-variant-numeric: tabular-nums; margin-right: 10px; }

/* ---------------------------------------------------------------------
   ログイン画面
   --------------------------------------------------------------------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 16px 40px; background: var(--board); background-image: radial-gradient(circle at 20% 10%, rgba(255,255,255,.06), transparent 40%); }
.auth__brand { color: var(--chalk); font-family: var(--font-head); font-size: 1.3rem; margin: 6px 0 16px; text-align: center; letter-spacing: .08em; }
.auth__brand small { display: block; font-size: .8rem; color: #b8c9c1; letter-spacing: .02em; }
.auth__card { width: 100%; max-width: 420px; background: var(--paper); border-radius: var(--r-md); padding: 22px; }
.auth__card h1 { font-size: 1.3rem; }
.auth__or { display: flex; align-items: center; gap: 10px; color: var(--pencil); font-size: .85rem; margin: 16px 0; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.auth__foot { color: #b8c9c1; font-size: .8rem; margin-top: 18px; text-align: center; max-width: 420px; }
.auth__foot a { color: #e6ece9; }
.line-btn { display: flex; align-items: center; gap: 10px; justify-content: center; }
.line-btn img { width: 22px; height: 22px; border-radius: 4px; }
.line-btn small { display: block; font-weight: 400; font-size: .75rem; opacity: .9; }
.code-box { font-family: var(--font-head); font-size: 2.2rem; letter-spacing: .3em; text-align: center; padding: 14px; background: var(--yellow-soft); border: 2px dashed #d9b234; border-radius: var(--r-md); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   管理画面
   --------------------------------------------------------------------- */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.admin__side { background: var(--board); color: var(--chalk); padding: 14px; }
.admin__side .brand { display: block; margin-bottom: 10px; }
.admin__nav { display: flex; gap: 4px; overflow-x: auto; }
.admin__nav a { color: #d9e3de; text-decoration: none; padding: 7px 10px; border-radius: var(--r-sm); white-space: nowrap; font-size: .9rem; }
.admin__nav a:hover { background: var(--board-2); }
.admin__nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); font-weight: 700; }
.admin__nav .grp { display: none; }
.admin__main { padding: 20px 16px 60px; min-width: 0; }
.admin__main .page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.admin__main .page-head .actions { margin: 0 0 0 auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; text-decoration: none; color: var(--ink); }
.stat b { display: block; font-family: var(--font-head); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--pencil); font-size: .85rem; }
.stat--warn { border-color: #d9b234; background: var(--yellow-soft); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 140px; min-height: 40px; padding: 6px 10px; }

/* ---------------------------------------------------------------------
   画面幅ごと
   --------------------------------------------------------------------- */
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .timetable { grid-template-columns: repeat(4, 1fr); }
  .timetable a:nth-child(2n) { border-right: 1px solid var(--rule); }
  .timetable a:nth-child(4n) { border-right: 0; }
  .slides a { flex-basis: 48%; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .chalkboard { padding: 28px 30px 22px; }
}
@media (min-width: 900px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  .page, .foot { padding-bottom: 40px; }
  .admin { grid-template-columns: 230px 1fr; }
  .admin__side { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .admin__nav { flex-direction: column; overflow: visible; }
  .admin__nav .grp { display: block; color: #9fb3aa; font-size: .75rem; margin: 12px 10px 2px; }
  .admin__main { padding: 26px 30px 60px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .board-bar, .tabbar, .foot, .alert-band, .actions, .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .panel { border: 0; box-shadow: none; }
}
