/* 톤: 따뜻한 미니멀 에디토리얼. 오트밀 종이 위에 테라코타 한 색, 그림자 대신 가는 선. */
:root {
  --oatmeal: #f1e9dc;
  --paper: #fbf7f0;
  --ink: #2f2620;
  --muted: #6b5d50;
  --line: #d9ccb9;
  --terracotta: #b25d3e;
  --terracotta-deep: #94492e;
  --terracotta-soft: #f0d9cb;
  --sans: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --serif: "Noto Serif KR", "Source Han Serif K", "NanumMyeongjo", "Batang", serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--oatmeal);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1 { font: 600 clamp(1.75rem, 4vw, 2.5rem)/1.25 var(--serif); letter-spacing: -.02em; }
h2 { font: 600 1.25rem/1.3 var(--serif); }
.loading { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.muted { color: var(--muted); font-size: .875rem; }
.error { color: var(--terracotta-deep); }
.eyebrow { font-size: .875rem; letter-spacing: .02em; color: var(--muted); }
.tag { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.empty { padding: 36px 0; color: var(--muted); text-align: center; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* 입력과 버튼 */
label { display: block; flex: 1; margin-bottom: 16px; font-size: .875rem; font-weight: 600; }
input, select, textarea {
  display: block; width: 100%; min-height: 46px; margin-top: 6px; padding: 10px 12px;
  font: 400 1rem/1.5 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 4px;
}
input[type="search"] { margin-top: 0; }
input::placeholder { color: var(--muted); }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .student:focus-visible {
  outline: 2px solid var(--terracotta); outline-offset: 2px;
}
button {
  min-height: 46px; padding: 10px 18px; font: 600 1rem/1.3 var(--sans); color: #fff;
  background: var(--terracotta); border: 0; border-radius: 4px; cursor: pointer; touch-action: manipulation;
}
button:hover:not(:disabled) { background: var(--terracotta-deep); }
button:disabled { color: #f7f1e8; background: #a99a88; cursor: not-allowed; }
button.wide { width: 100%; min-height: 52px; }
button.outline { color: var(--terracotta-deep); background: transparent; border: 1px solid var(--terracotta); }
button.outline:hover:not(:disabled) { color: #fff; background: var(--terracotta); }
button.text-link { min-height: 32px; padding: 0; color: var(--terracotta-deep); background: transparent; font-size: .9375rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
button.text-link:hover:not(:disabled) { background: transparent; color: var(--ink); }

.status { display: inline-flex; align-items: center; gap: .45em; font-size: .875em; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: .6em; height: .6em; background: #7d9463; border-radius: 50%; }
.status.offline { padding: .25em .7em; font-weight: 700; color: #fff; background: var(--terracotta-deep); border-radius: 4px; }
.status.offline::before { background: #fff; }

/* 로그인 */
.auth-view { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px; }
.auth-card { width: min(100%, 380px); }
.auth-card h1 { margin: 6px 0 32px; font-size: 2.5rem; }
.auth-card .error { min-height: 1.5em; margin-top: 14px; }
.auth-card > .error:first-child { margin-bottom: 14px; }

/* 교사 앱: 위 프로필, 가운데 내용, 아래 고정 메뉴 */
.teacher-view { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.profile, .tabs { width: min(100%, 1080px); margin: 0 auto; padding-inline: clamp(18px, 4vw, 40px); }
.profile { display: flex; align-items: center; gap: 12px; padding-block: 18px 6px; }
.profile strong { margin-right: auto; font-weight: 600; }
.avatar {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px;
  font: 600 1.125rem/1 var(--serif); color: var(--terracotta-deep); background: var(--terracotta-soft); border-radius: 50%;
}
.tab { padding-block: 16px 24px; }
.tab > h1, .page-head { margin-bottom: 24px; }
.page-head { align-items: center; }

.summary { padding: clamp(22px, 4vw, 34px); margin-bottom: 36px; background: var(--paper); border-top: 3px solid var(--terracotta); }
.summary-line { margin: 10px 0 24px; font: 500 clamp(1.5rem, 4.4vw, 2.125rem)/1.3 var(--serif); letter-spacing: -.02em; }
.summary-total { font-weight: 700; color: var(--terracotta-deep); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 24px; border-block: 1px solid var(--line); }
.stats > div { padding: 12px 14px; border-left: 1px solid var(--line); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: .8125rem; color: var(--muted); }
.stats dd { margin-top: 2px; font: 600 1.5rem/1.3 var(--serif); font-variant-numeric: tabular-nums; }

/* 카드뉴스처럼 번호와 큰 이름으로 읽는 타임라인 */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.timeline .empty { background: var(--paper); }
.story { display: flex; flex-direction: column; min-height: 268px; padding: 20px 22px; background: var(--paper); }
.story-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.story-number { font: 500 .9375rem/1 var(--serif); color: var(--terracotta-deep); }
.story h3 { margin: 0; font: 600 2.125rem/1.2 var(--serif); letter-spacing: -.02em; }
.story-room { margin-top: 4px; font-weight: 600; color: var(--terracotta-deep); }
.story-message { display: -webkit-box; margin: 14px 0 20px; overflow: hidden; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.story-meta { margin-top: auto; font-size: .8125rem; color: var(--muted); }
.badge { flex: none; align-self: flex-start; padding: 3px 9px; font-size: .8125rem; font-weight: 600; color: var(--muted); background: #e9e0d2; border-radius: 3px; white-space: nowrap; }
.badge.sent { color: var(--terracotta-deep); background: var(--terracotta-soft); }
.badge.received { color: #fff; background: #8a6d4f; }
.badge.done { color: #fff; background: var(--terracotta); }

/* 호출 탭 */
.call-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.call-grid h2 { margin-bottom: 16px; }
.picker .section-head h2 { margin-bottom: 0; }
.row { display: flex; gap: 12px; }
.roster { margin-top: 14px; border-top: 1px solid var(--line); max-height: 460px; overflow-y: auto; }
.student {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; align-items: center;
  width: 100%; min-height: 62px; padding: 9px 10px; font-weight: 400; color: var(--ink); text-align: left;
  background: transparent; border-bottom: 1px solid var(--line); border-radius: 0;
}
.student:hover:not(:disabled) { background: var(--paper); }
.student[aria-pressed="true"], .student[aria-pressed="true"]:hover:not(:disabled) { background: var(--terracotta-soft); box-shadow: inset 3px 0 0 var(--terracotta); }
.student:focus-visible { outline-offset: -2px; }
.student-name { font-weight: 700; }
.student-class { grid-row: 2; font-size: .8125rem; color: var(--muted); }
.room { grid-row: 1 / 3; grid-column: 2; font: 600 1.125rem/1 var(--serif); color: var(--terracotta-deep); }
.room.none { font: 400 .875rem/1 var(--sans); color: var(--muted); }
.target { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 20px; padding: 18px 20px; background: var(--paper); border-left: 3px solid var(--terracotta); }
.target-name { font-weight: 600; }
.target-room { font: 700 1.875rem/1.2 var(--serif); color: var(--terracotta-deep); }
.target-note { flex-basis: 100%; font-size: .8125rem; color: var(--muted); }
.target.none { border-left-color: var(--muted); }
.target.none .target-room { color: var(--muted); }
.feedback { min-height: 1.5em; margin-top: 12px; font-size: .9375rem; }

/* 기록 탭 */
.calls { border-bottom: 1px solid var(--line); }
.call-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.call-row .badge { justify-self: start; }
.call-text { display: grid; gap: 3px; }
.call-row time { font-size: .875rem; white-space: nowrap; }

/* 연락·공지 탭 */
.panel { padding: clamp(18px, 3vw, 28px); margin-bottom: 28px; background: var(--paper); border-top: 3px solid var(--terracotta); }
.panel h2 { margin-bottom: 6px; }
.panel > .muted { margin-bottom: 14px; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(16px, 3vw, 32px); align-items: start; }
.panel-grid .panel { margin-bottom: 0; }
.presence-row, .quick-replies { display: flex; flex-wrap: wrap; gap: 8px; }
button.presence-choice[aria-pressed="true"], button.presence-choice[aria-pressed="true"]:hover:not(:disabled) { color: #fff; background: var(--terracotta); }
.requests { border-bottom: 1px solid var(--line); }
.request { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.request-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.request-head time { margin-left: auto; }
.request-message { line-height: 1.6; white-space: pre-wrap; }
.reply-form { display: grid; gap: 8px; }
.reply-form textarea { margin-top: 0; }
.reply-form > button { justify-self: start; }
.reply-form .feedback { margin-top: 0; min-height: 0; }
.reply-done { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--paper); }

/* 콘텐츠 관리 */
.content-view { padding-bottom: 40px; }
label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; }
button.small { min-height: 38px; padding: 6px 12px; font-size: .875rem; }
button.outline[data-armed], button.outline[data-armed]:hover:not(:disabled) { color: #fff; background: var(--terracotta); }
.content-list { margin-top: 16px; }
.content-list .empty { padding: 14px 0; font-size: .9375rem; }
.content-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.content-item > div { min-width: 0; }
.content-item strong { margin-right: 8px; font-size: .9375rem; }
.content-item p { margin-top: 3px; line-height: 1.5; white-space: pre-wrap; }
.class-picker, .class-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.class-picker { margin-bottom: 14px; }
.class-picker > legend { padding: 0; margin-bottom: 8px; font-size: .875rem; font-weight: 600; }
.quick-classes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.class-group { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 8px; }
.class-group > legend { padding: 0 0 2px; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.class-group label.check { margin: 0; gap: 6px; }
.content-actions { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
form.panel > button.text-link { display: block; margin-top: 8px; }
.panel form.password-form { margin-bottom: 16px; }

/* 내 정보 탭 */
button.avatar { min-height: 42px; padding: 0; }
button.avatar, button.avatar:hover:not(:disabled) { color: var(--terracotta-deep); background: var(--terracotta-soft); }
.auth-note { margin-bottom: 20px; line-height: 1.6; }
.auth-card .password-form .feedback { min-height: 1.5em; }
.nav-item { position: relative; }
.nav-count:not(:empty) { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 18px; padding: 1px 5px; font-size: .75rem; font-weight: 700; line-height: 16px; color: #fff; background: var(--terracotta); border-radius: 9px; }
.account { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.account dt, .account dd { padding: 14px 0; border-top: 1px solid var(--line); }
.account dt { color: var(--muted); }

/* 하단 고정 메뉴 */
.bottom-nav {
  position: fixed; inset: auto 0 0; z-index: 10; display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line);
}
.nav-item {
  display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  max-width: 150px; min-height: 68px; padding: 6px 4px; font-size: .8125rem; font-weight: 500;
  color: var(--muted); background: transparent; border-radius: 0;
}
.nav-item:hover:not(:disabled) { color: var(--ink); background: transparent; }
.nav-item[aria-current="page"], .nav-item[aria-current="page"]:hover:not(:disabled) { font-weight: 700; color: var(--terracotta-deep); }
.nav-item:focus-visible { outline-offset: -3px; }
.nav-icon { display: block; width: 26px; height: 26px; }
.nav-icon svg { display: block; width: 100%; height: 100%; }

/* 칠판 화면: 교실 뒤에서도 읽히도록 글자를 화면 크기에 맞춰 키운다. */
.board-view { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
.board-view > .board-bar { grid-row: 1; }
.board-view > .emergency { grid-row: 2; }
.board-view > .board { grid-row: 3; }
.board-bar { display: flex; align-items: center; gap: 1em; padding: .6em clamp(16px, 2vw, 40px); font-size: clamp(1rem, 1vw, 2rem); border-bottom: 1px solid var(--line); }
.board-bar strong { font: 600 1.375em/1.3 var(--serif); }
.call-count { margin-right: auto; font-weight: 700; color: var(--terracotta-deep); }
.bar-date { font-weight: 500; white-space: nowrap; }
.bar-clock { font: 600 1.375em/1.3 var(--serif); font-variant-numeric: tabular-nums lining-nums; color: var(--terracotta-deep); }
button.quiet { min-height: 44px; padding: .4em .8em; font-size: .875em; font-weight: 500; color: var(--muted); background: transparent; }
button.quiet:hover:not(:disabled) { color: var(--ink); background: transparent; }
button.quiet[data-armed], button.quiet[data-armed]:hover:not(:disabled) { font-weight: 700; color: #fff; background: var(--terracotta); }
.board { min-height: 0; overflow-y: auto; }
.idle { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: clamp(12px, 2vh, 32px); min-height: 100%; padding: clamp(14px, 2vw, 40px); }
.idle-hero { text-align: center; }
.idle-note { font: 600 clamp(1.25rem, 2.2vw, 3rem)/1.35 var(--serif); }
.board-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(14px, 2vw, 40px); align-items: start; font-size: clamp(1rem, 1.15vw, 1.625rem); }
.board-panel { padding-top: 14px; border-top: 3px solid var(--terracotta); }
.board-panel h2 { margin-bottom: 12px; font-size: 1.25em; }
.board-panel .section-head { margin-bottom: 0; }
.board-note { margin-bottom: 20px; line-height: 1.6; white-space: pre-wrap; }
.lunch-head { padding-top: 14px; border-top: 1px solid var(--line); }
.board-panel h2.lunch-head { margin-top: 20px; }
.idle-dday { margin-top: .3em; font: 600 clamp(1.25rem, 2.2vw, 3rem)/1.3 var(--serif); color: var(--terracotta-deep); }
.board-lunch { line-height: 1.6; white-space: pre-wrap; }
.board-list li { padding: 7px 0; line-height: 1.5; border-top: 1px solid var(--line); white-space: pre-wrap; }
.board-list li:first-child { padding-top: 0; border-top: 0; }
.board-list strong { color: var(--terracotta-deep); }
.schedule li { display: grid; grid-template-columns: 4em minmax(0, 1fr) auto; gap: 10px; padding: 7px 8px; border-top: 1px solid var(--line); }
.schedule li.current { padding-block: .6em; font-size: 1.3em; font-weight: 700; color: var(--terracotta-deep); background: var(--terracotta-soft); }
.schedule li.current time { font-size: .75em; }
.lesson-detail { grid-column: 1 / -1; font-size: .8em; font-weight: 600; line-height: 1.4; color: var(--ink); }
.board-posts li.pinned { font-weight: 600; }
.board-request { padding: 12px 0; border-top: 1px solid var(--line); }
.board-request p { margin-top: 4px; line-height: 1.5; }
.board-reply { margin-top: 8px; padding: 10px 12px; background: var(--terracotta-soft); }
.board-reply button { margin-top: 8px; }
.panel-stack { display: grid; gap: clamp(14px, 2vw, 40px); align-content: start; min-height: 0; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-bottom: 10px; text-align: center; }
.calendar-head { font-size: .78em; color: var(--muted); }
.calendar-day { padding: .15em 0; font-variant-numeric: tabular-nums; border-radius: 3px; }
.calendar-day.has-items .calendar-number { font-weight: 700; color: var(--terracotta-deep); text-decoration: underline; text-underline-offset: 3px; }
.calendar-day.today { background: var(--terracotta-soft); }
.calendar.detail { gap: 4px; text-align: left; }
.calendar.detail .calendar-head { font-weight: 600; text-align: center; }
.calendar.detail .calendar-day { min-height: 92px; padding: .35em .45em; background: var(--paper); }
.calendar.detail .calendar-day.today { background: var(--terracotta-soft); }
.calendar-item { margin-top: 2px; padding: 1px 4px; font-size: .82em; line-height: 1.35; color: #fff; background: var(--terracotta); border-radius: 2px; }
.calendar-item.assignment { background: #8a6d4f; }
.calendar-item.assessment { background: var(--terracotta-deep); }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.calendar-nav h2 { font-size: 1.25em; }
.profile-photo { display: grid; place-items: center; flex: none; width: 96px; height: 96px; overflow: hidden; font: 600 2rem/1 var(--serif); color: var(--terracotta-deep); background: var(--terracotta-soft); border-radius: 50%; }
.profile-photo img, .avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar { overflow: hidden; }
.profile-edit { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.profile-edit > div:last-child { flex: 1; min-width: 0; }
.teacher-card { display: flex; gap: 14px; padding: 12px; margin-bottom: 12px; background: var(--paper); border-left: 3px solid var(--terracotta); }
.teacher-card > div:last-child { min-width: 0; }
.teacher-intro { margin-top: 6px; line-height: 1.5; white-space: pre-wrap; }
.teacher-post { padding-top: 6px; margin-top: 6px; line-height: 1.5; border-top: 1px solid var(--line); white-space: pre-wrap; }
#default-room-panel select { flex: none; width: 130px; margin-top: 0; }
.board-panel.clickable { cursor: pointer; }
.board-panel #open-contact { margin-bottom: 8px; }
.board-modal { width: min(96vw, 1500px); max-width: none; max-height: 92vh; max-height: 92dvh; padding: 0; color: var(--ink); background: var(--oatmeal); border: 0; border-top: 4px solid var(--terracotta); font-size: clamp(1rem, 1.05vw, 1.5rem); }
.board-modal::backdrop { background: #2f262099; }
.modal-inner { padding: clamp(16px, 2vw, 32px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { font-size: 1.5em; }
.schedule-detail { overflow-x: auto; margin-bottom: 12px; }
.schedule-detail table { width: 100%; border-collapse: collapse; background: var(--paper); }
.schedule-detail th, .schedule-detail td { padding: .7em .9em; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.schedule-detail th { font-size: .875em; font-weight: 600; color: var(--muted); }
.schedule-detail tr.current td { font-size: 1.15em; font-weight: 700; color: var(--terracotta-deep); background: var(--terracotta-soft); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 2vw, 32px); margin-bottom: 14px; }
.contact-grid h3 { margin: 0 0 10px; font: 600 1.15em/1.3 var(--serif); }
.blackboard { margin: 10px 0 8px; padding: .3em; font-size: .875em; text-align: center; color: var(--paper); background: var(--muted); }
.classroom { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
button.desk, .desk.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; padding: 6px 2px; font-size: .9375em; font-weight: 600; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 3px; }
button.desk small { font-size: .78em; font-weight: 400; color: var(--muted); }
button.desk:hover:not(:disabled) { background: var(--terracotta-soft); }
button.desk[aria-pressed="true"], button.desk[aria-pressed="true"]:hover:not(:disabled) { color: #fff; background: var(--terracotta); border-color: var(--terracotta); }
button.desk[aria-pressed="true"] small { color: #fff; }
button.desk:disabled { color: #b5a896; background: transparent; }
button.desk:disabled small { color: #b5a896; }
.teacher-desk.available small { font-weight: 600; color: var(--terracotta-deep); }
.desk.empty { min-height: 44px; font-size: .75em; font-weight: 400; color: #a99a88; background: transparent; border-style: dashed; }
.offices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px 14px; max-height: 56vh; overflow-y: auto; align-items: start; }
.office h4 { margin: 0 0 5px; font-size: .875em; font-weight: 700; }
.office-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; }
.contact-hint { margin-bottom: 8px; }
.contact-form .row button { flex: 1; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
.emergency { display: flex; flex-wrap: wrap; gap: .4em 1em; padding: .7em clamp(16px, 2vw, 40px); font-size: clamp(1.125rem, 2vw, 2.75rem); font-weight: 600; color: #fff; background: var(--terracotta-deep); }
.emergency strong { flex: none; }
.board-error { padding: 15vh 24px; font-size: clamp(1.25rem, 2.6vw, 3rem); text-align: center; color: var(--terracotta-deep); }

/* 호출이 오면 칠판 전체가 테라코타로 바뀐다. 줄이 늘면 잘리지 않고 칠판 영역이 스크롤된다. */
.board.has-calls { display: grid; grid-auto-rows: minmax(min-content, 1fr); gap: clamp(10px, 1.2vw, 24px); padding: clamp(10px, 1.6vw, 32px); background: var(--terracotta); animation: attention 1s ease-in-out 3; }
.board.many { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }
.call { display: flex; flex-direction: column; padding: clamp(18px, 3vw, 64px); text-align: center; background: var(--paper); }
.call-from { font-size: clamp(1.25rem, min(3.2vw, 5vh), 4rem); font-weight: 700; color: var(--terracotta-deep); }
.call-class { margin-top: .3em; font-size: clamp(1.125rem, min(2.8vw, 4.5vh), 3.5rem); font-weight: 700; }
.call h1 { font: 700 clamp(2.75rem, min(8.5vw, 15vh), 11rem)/1.2 var(--serif); letter-spacing: -.02em; }
.where { margin-top: .3em; font-size: clamp(1.5rem, min(4.2vw, 7vh), 5.5rem); font-weight: 700; color: var(--terracotta-deep); }
.where-label { margin-right: .6em; font-size: .6em; font-weight: 600; color: var(--muted); white-space: nowrap; }
.call-message { flex: 1 1 auto; margin-top: .7em; font-size: clamp(1.125rem, min(2.8vw, 4.5vh), 3.5rem); line-height: 1.45; white-space: pre-wrap; }
.from { margin: .6em 0; font-size: clamp(1rem, min(1.8vw, 3vh), 2.25rem); color: var(--muted); }
.ack { position: sticky; bottom: clamp(10px, 1.6vw, 32px); flex: none; align-self: center; width: min(100%, 720px); min-height: clamp(64px, 11vh, 150px); font-size: clamp(1.375rem, min(3vw, 5vh), 3.75rem); }
.board.many .call, .call.long { padding: clamp(16px, 1.8vw, 40px); }
.board.many .call h1, .call.long h1 { font-size: clamp(2.25rem, min(4.2vw, 8vh), 6rem); }
.board.many .where, .call.long .where { font-size: clamp(1.25rem, min(2.4vw, 4.5vh), 3.25rem); }
.board.many .call-message, .call.long .call-message { font-size: clamp(1rem, min(1.7vw, 3vh), 2.25rem); }
.board.many .call-from, .call.long .call-from,
.board.many .call-class, .call.long .call-class { font-size: clamp(1rem, min(1.7vw, 3vh), 2.25rem); }
.board.many .ack, .call.long .ack { min-height: clamp(56px, 8vh, 110px); font-size: clamp(1.125rem, min(2vw, 3.5vh), 2.5rem); }
.board.many .call.long .call-message { font-size: clamp(.9375rem, min(1.35vw, 2.4vh), 1.75rem); }
.board.many .call.long .where { font-size: clamp(1.125rem, min(1.7vw, 3vh), 2.25rem); }
.board.many .call.long h1 { font-size: clamp(2rem, min(3.4vw, 6.5vh), 5rem); }
@keyframes attention { 50% { background: #d98a68; } }

/* 가로 화면의 칠판은 페이지가 밀리지 않게 한 화면에 맞추고, 긴 내용은 칸 안에서 밀어 본다. */
@media (min-width: 1000px) {
  .idle { height: 100%; }
  .board-panels { grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 0; height: 100%; align-items: stretch; }
  .board-panel { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .schedule li { padding-block: 5px; }
}
@media (max-width: 760px) {
  .call-grid { grid-template-columns: minmax(0, 1fr); }
  .roster { max-height: 340px; }
}
@media (max-width: 520px) {
  .call-row { grid-template-columns: minmax(0, 1fr) auto; }
  .call-row .call-text { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .board.has-calls { animation: none; }
}
#board-accounts-form { margin-top: 20px; }
