/* 講習コマ割り（夏期・冬期・春期）用の追加スタイル。色や基本の部品は styles.css を使う。 */

/* 通常授業／講習の切替（両方のページで使う） */
.mode-nav { background: #0f2740; }
.mode-nav-inner { display: flex; gap: 4px; width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.mode-nav a { display: flex; align-items: baseline; gap: 8px; padding: 10px 18px; border-radius: 10px 10px 0 0; color: #b8c8da; font-size: 14px; font-weight: 700; text-decoration: none; }
.mode-nav a small { font-size: 11px; font-weight: 500; opacity: .8; }
.mode-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.mode-nav a.is-active { background: var(--bg); color: var(--navy); }

/* 実行カード */
.workspace.is-form .action-card.simple { display: block; }
.run-box { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.run-points { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: 13px; }
.run-points li + li { margin-top: 4px; }
.run-box .primary-button { margin-top: 0; }

/* 読み込みの確認 */
.import-panel { margin: 12px 0; padding: 16px 18px; border: 2px solid var(--accent); border-radius: 12px; background: var(--accent-tint); }
.import-panel h3 { margin: 0 0 10px; color: var(--navy); font-size: 15px; }
.import-mode { display: grid; gap: 6px; margin: 12px 0; padding: 0; border: 0; }
.import-mode legend { margin-bottom: 4px; padding: 0; color: var(--navy); font-size: 13px; font-weight: 700; }
.import-mode .fe-check { justify-self: start; border-radius: 10px; }
.import-keep { margin: 2px 0 6px 26px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.import-keep h4 { margin: 0 0 8px; color: var(--navy); font-size: 13px; }
.import-keep h4 small { margin-left: 6px; font-weight: 500; }
.keep-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--navy); font-size: 13px; font-weight: 700; }
.keep-caption .muted { font-weight: 500; }
.keep-list { display: grid; gap: 4px; max-height: 230px; margin: 0 0 10px; overflow: auto; }
.keep-list .fe-check, .import-keep > .fe-check { justify-self: start; border-radius: 10px; }
.keep-list .tag { flex: none; }
.keep-students { margin: 8px 0; }
.keep-students summary { color: var(--navy); font-size: 13px; font-weight: 700; cursor: pointer; }
.keep-students .fe-inline { margin-top: 8px; }
.keep-students small { margin-left: 4px; }
.import-report { margin: 12px 0; padding: 12px 16px; border-left: 4px solid #e0a030; border-radius: 8px; background: var(--warn-tint); font-size: 13px; }
.import-report strong { color: var(--warn); }
.import-report ul { margin: 4px 0; padding-left: 1.2em; }

/* 入力エディタ */
.season-page .fe-tabs { align-items: center; }
.season-page .fe-tabs .save-state { margin-left: auto; padding: 0 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.fe-table.narrow { min-width: 360px; max-width: 620px; }
.fe-table.matrix { min-width: 320px; max-width: 520px; width: auto; }
.fe-table.matrix th, .fe-table.matrix td { padding: 3px 12px; text-align: center; }
.fe-table.matrix td:first-child, .fe-table.matrix th:first-child { text-align: left; }
.fe-table.matrix input { width: 18px; height: 18px; accent-color: var(--accent); }
.chip.is-base { padding-right: 12px; background: var(--bg); color: var(--muted); }
.date-weeks { display: grid; gap: 6px; margin: 8px 0; }
.date-week { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.date-week-label { flex: 0 0 76px; color: var(--muted); font-size: 12px; }
.date-week .chip { padding: 2px 4px 2px 10px; font-size: 13px; font-weight: 600; }
.commit { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.req { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 700; color: var(--navy); }
.req .fe-input { min-height: 34px; }
.fixed-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.group-table { min-width: 560px; }
.group-table th { text-align: center; }
.group-table td:first-child { white-space: nowrap; font-weight: 600; color: var(--navy); }
.group-table .week-row td { padding-top: 12px; background: var(--bg); font-size: 12px; color: var(--muted); }
.group-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

/* 講師×科目の一覧（まとめて選ぶ表） */
.tm { margin: 4px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tm h3 { margin: 0 0 4px; color: var(--navy); font-size: 15px; }
.tm.is-inferred { border: 2px solid #e0a030; }
.tm .fe-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.tm-wrap { max-height: 470px; margin-top: 8px; overflow: auto; }
.fe-table.matrix.tm-table { min-width: 0; max-width: none; }
.tm-table thead th { position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tm-table td:first-child { white-space: nowrap; }
.tm-table .tm-sep { border-left: 2px solid var(--line-strong); }
.tm-table tr.is-unset td { background: var(--warn-tint); }
.tm-table tr.is-inactive .loc-link { color: var(--muted); font-weight: 500; }
.fixed-tools { margin: 6px 0 10px; }

/* 日付×コマのマス目（生徒の×・講師のNG） */
.sx-wrap { overflow-x: auto; padding-bottom: 4px; }
.sx { border-collapse: separate; border-spacing: 2px; }
.sx th { padding: 0; font-weight: 600; }
.sx .wk { padding-left: 8px; }
.sx-day, .sx-row { display: grid; width: 100%; min-width: 34px; padding: 2px 4px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--navy); font-size: 11px; line-height: 1.3; cursor: pointer; }
.sx-row { min-width: 56px; text-align: left; }
.sx-day small, .sx-row small { color: var(--faint); font-size: 10px; font-weight: 500; }
.sx-day:hover, .sx-row:hover { border-color: var(--line-strong); background: var(--bg); }
.sx-day.is-off { background: #e3e8ee; color: var(--muted); }
.sx-cell { width: 34px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; }
.sx-cell:hover { border-color: var(--accent); }
.sx-cell.is-off { border-color: #c3ccd6; background: #e3e8ee; }

/* 結果 */
.print-only { display: none; }
.metrics-5 { grid-template-columns: repeat(5, 1fr); }
.metrics-5 .metric small { display: inline; }
.metric em { display: block; color: var(--muted); font-size: 11px; font-style: normal; }
.season-page .fe-inline > .fe-input { flex: 0 1 240px; width: auto; }
.season-page .fe-field { align-content: start; }
.season-page .fe-check.fe-section { margin-top: 12px; }
.season-page .fe-inline > .fe-input[data-bind$=".aliases"] { flex: 1 1 260px; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.day-gap { flex-basis: 100%; height: 0; }
.day-chip { display: grid; min-width: 78px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 700; cursor: pointer; }
.day-chip small { color: var(--muted); font-size: 11px; font-weight: 500; }
.day-chip:hover { border-color: var(--line-strong); background: var(--bg); }
.day-chip.is-active { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent) inset; }
.day-title { margin: 0 0 8px; color: var(--navy); font-size: 17px; }
.group-line { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.day-table { min-width: 560px; }
.day-table .slot-col { width: 150px; }
.booths { display: flex; flex-wrap: wrap; gap: 8px; }
.booth { display: grid; gap: 4px; align-content: start; width: 172px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfd; }
.booth-teacher { color: var(--navy); font-size: 13px; font-weight: 700; }
.booth.is-external { border-style: dashed; }

.grid-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 11px; }
.season-grid { border-collapse: separate; border-spacing: 0; font-size: 11px; line-height: 1.3; }
.season-grid th, .season-grid td { min-width: 46px; padding: 2px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; background: #fff; }
.season-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--navy-tint); color: var(--navy); font-size: 11px; }
.season-grid thead th small, .season-grid .g-name small { display: block; color: var(--muted); font-weight: 500; }
.season-grid .g-name { position: sticky; left: 0; z-index: 1; min-width: 110px; max-width: 130px; text-align: left; color: var(--navy); font-size: 12px; }
.season-grid thead .g-name { z-index: 3; }
.season-grid .g-slot { min-width: 44px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.season-grid tr.first > * { border-top: 2px solid var(--navy-2); }
.season-grid .wk { border-left: 2px solid var(--line-strong); }
.season-grid .g-x { background: #eef1f4; color: #a6b1bc; }
.season-grid .g-lesson { background: var(--accent-tint); }
.season-grid .g-lesson b { display: block; color: var(--navy); }
.season-grid .g-lesson span { display: block; color: var(--muted); white-space: nowrap; }
.season-grid .g-lesson.is-fixed { background: #f3ecfa; }
.season-grid .is-dim { opacity: .25; }
.season-grid .is-hit { box-shadow: 0 0 0 2px var(--accent) inset; }
.season-grid.shift td { min-width: 52px; font-size: 12px; }
.season-grid.shift td b { color: var(--navy); }
.season-grid.shift .tag { display: block; margin-bottom: 1px; padding: 0 4px; font-size: 10px; }

@media (max-width: 900px) {
  .run-box { grid-template-columns: 1fr; }
  .metrics-5 { grid-template-columns: repeat(2, 1fr); }
  .season-page .fe-tabs .save-state { display: none; }
}
@media (max-width: 600px) {
  .mode-nav-inner { width: calc(100% - 16px); }
  .mode-nav a { padding: 8px 12px; font-size: 13px; }
  .booth { width: 100%; }
}

/* 印刷：表示中の表だけを横向きで */
@media print {
  .mode-nav, .import-panel, .import-report, .day-chips { display: none !important; }
  .print-only { display: block; margin: 0 0 6px; color: #16324f; font-size: 14px; }
  .season-page .result-banner { display: none !important; }
  .grid-wrap { max-height: none; overflow: visible; border: 0; }
  .season-grid { font-size: 8px; }
  .season-grid th, .season-grid td { min-width: 0; padding: 1px 2px; }
  .season-grid thead th, .season-grid .g-name { position: static; }
  .season-grid .g-lesson, .season-grid .g-x, .season-grid thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .booth { break-inside: avoid; }
  .season-page .toolbar select { display: none; }
  .season-page .toolbar .legend, .season-page .toolbar { display: flex !important; }
}
