/* 教室ノート（先生の画面）だけの見た目 2026-10-11。iPad・PC が主・最大幅 960px */

/* 上のタブ（5 つ）。狭い画面では横にすべらせる */
.tabs {
  position: sticky; top: 0; z-index: 30;
  margin: 10px -16px 0; padding: 0 16px;
  background: var(--ivory); border-bottom: 1px solid var(--line);
}
.tabs-in { position: relative; max-width: 960px; margin: 0 auto; display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: 52px; padding: 0 16px; text-decoration: none; color: var(--sub);
  font-size: 15px; font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs a[aria-current="page"] { color: var(--ebony); border-bottom-color: var(--brass); }
.badge:empty { display: none; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ng); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }

.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-row h2.sec { margin-bottom: 6px; }

/* 今日のレッスン */
.lesson { display: grid; grid-template-columns: 76px 1fr; gap: 4px 14px; }
.lesson .time { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.lesson .time small { display: block; font-family: var(--sans); font-size: 12px; color: var(--sub); font-weight: 500; }
.lesson .who-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lesson .who-row b { font-family: var(--serif); font-size: 20px; }
.lesson .songs { margin: 2px 0 6px; padding: 0; list-style: none; font-size: 14px; color: var(--ebony-2); }
.lesson .songs li { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lesson .body { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0; }
.att { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 6px; margin-right: auto; }
.att .pick { min-width: 72px; font-size: 15px; }
.att .pick[data-v="欠席"][aria-pressed="true"] { background: var(--ng); border-color: var(--ng); box-shadow: none; }
details.prev { margin: 8px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); }
details.prev summary { min-height: 48px; display: flex; align-items: center; padding: 0 14px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ebony-2); }
details.prev .prev-in { padding: 0 14px 12px; font-size: 14px; }
.prev-in .pi { padding: 6px 0; border-top: 1px dashed var(--line); }
.prev-in .pi:first-child { border-top: 0; }
.prev-in .pi b { display: block; font-size: 13px; }
.note-form { margin-top: 10px; padding: 14px; border: 1.5px solid var(--ebony); border-radius: 12px; background: #fff; }
.note-form .nf-song { padding: 8px 0; border-top: 1px dashed var(--line); }
.note-form .nf-song:first-of-type { border-top: 0; padding-top: 0; }
.note-form .nf-song > b { font-size: 15px; }
.nf-two { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 700px) { .nf-two { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .lesson { grid-template-columns: 1fr; } }

/* 表は狭い画面では横にすべらせる（つぶさない） */
#students { min-width: 700px; }
#program { min-width: 640px; }
#fees { min-width: 480px; }

/* 生徒一覧 */
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #fbf6ea; }
.name-btn { border: 0; background: none; padding: 0; min-height: 44px; font-family: var(--serif); font-size: 17px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 4px; }
.cur-songs { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.cur-songs li { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 2px 0; }
.cur-songs li span:first-child { min-width: 0; }
.unpaid-dot { color: var(--ng); font-weight: 700; }

/* 詳細の小窓 */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(21, 18, 15, .45); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.modal-box { width: 100%; max-width: 600px; background: var(--ivory-hi); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); padding: 18px 18px 20px; border-top: 4px solid var(--ebony); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.modal-head h2 { font-family: var(--serif); margin: 0; font-size: 22px; }
.song-edit { padding: 12px 0; border-top: 1px solid var(--line); }
.song-edit .btn-row .btn { flex: 1 1 auto; }

/* 振替 */
.req .req-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req .req-top b { font-family: var(--serif); font-size: 18px; }
.req dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; font-size: 15px; }
.req dt { color: var(--sub); font-size: 13px; padding-top: 2px; white-space: nowrap; }
.req dd { margin: 0; }
.slot-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.slot-pick .pick { font-size: 14px; font-weight: 500; }
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(108px, 1fr)); gap: 6px; min-width: 760px; }
.wg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.wg-day { background: var(--ivory-hi); border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-height: 100px; }
.wg-day.closed { background: transparent; border-style: dashed; }
.wg-day.today { border-color: var(--ebony); border-width: 2px; }
.wg-d { font-size: 13px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.wg-d.sun { color: var(--ng); }
.slot { display: flex; justify-content: space-between; gap: 4px; font-size: 12px; padding: 3px 6px; border-radius: 6px; margin: 2px 0; background: var(--ivory-lo); color: var(--sub); font-variant-numeric: tabular-nums; }
.slot.free { background: var(--brass-soft); color: var(--brass-ink); font-weight: 700; box-shadow: inset 0 0 0 1px #e2cc9c; }
.slot.furi { background: var(--ebony); color: var(--ivory-hi); }
.slot.pend { box-shadow: inset 0 0 0 1.5px var(--ng); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--sub); margin: 6px 0 10px; }
.legend .slot { display: inline-flex; margin: 0; }

/* 月謝 */
.sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; }
.sum .stat { background: var(--ivory-hi); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.sum .s-l { font-size: 13px; color: var(--sub); }
.sum .s-n { font-family: var(--serif); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sum .stat.ng { border-color: #e5bdb4; background: var(--ng-soft); }
.sum .stat.ng .s-n { color: var(--ng); }
@media (max-width: 520px) { .sum .s-n { font-size: 19px; } }
.tbl tr.unpaid td { background: #fbefec; }

/* 発表会 */
.rec-info { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.rec-info span b { font-weight: 700; }
.updown { display: inline-flex; gap: 4px; }
.updown button { width: 48px; height: 48px; border-radius: 10px; border: 1px solid #cfc5b3; background: var(--ivory-hi); font-size: 16px; }
.updown button:disabled { opacity: .3; cursor: default; }
.no { font-family: var(--serif); font-size: 18px; font-weight: 700; text-align: center; }
.print-only { display: none; }
.tbl tr.moved td { animation: moved .6s ease-out; }
@keyframes moved { from { background: var(--brass-soft); } to { background: transparent; } }

/* 印刷＝発表会のプログラムだけ */
@media print {
  @page { size: A4 portrait; margin: 18mm 16mm; }
  html, body { background: #fff; }
  body { padding: 0; font-size: 12pt; }
  .keys-band, .site-head, .tabs, .reset-area, .toast, .no-print, .modal { display: none !important; }
  main { max-width: none; }
  .print-only { display: block; text-align: center; margin: 0 0 8mm; }
  .print-only h1 { font-family: var(--serif); font-size: 22pt; margin: 0 0 2mm; letter-spacing: .1em; }
  .print-only p { margin: 0; font-size: 11pt; }
  .print-only .staff { height: 9px; margin: 4mm auto 0; width: 60%; background: repeating-linear-gradient(to bottom, #888 0 1px, transparent 1px 2px); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table-wrap { border: 0; box-shadow: none; overflow: visible; }
  .tbl th { background: #fff; color: #000; border-bottom: 1.5px solid #000; }
  .tbl td { border-bottom: 1px solid #bbb; padding: 7px 6px; }
  .tbl .col-ud, .tbl .col-min { display: none; }
}

@media print { #program { min-width: 0; } }
