/* 학급 게시판 키오스크 화면.
   대상 해상도: 900x1600 세로 (1600x900 패널을 270도 회전).
   교실은 형광등이 켜져 있고 창이 있어 밝다. 그래서 밝은 바탕에 진한 글씨로 간다.
   교실 뒤에서도 읽혀야 하므로 본문 기준 글자를 30px 이상으로 잡는다. */

:root {
  --bg: #eef2f8;
  --bg-card: #ffffff;
  --bg-card-2: #e7edf6;
  --line: #cfd8e6;
  --line-strong: #aebbcf;
  --fg: #14202f;
  --fg-dim: #55637a;
  --accent: #1257c4;
  --accent-soft: #e3edfd;
  --amber: #a35a00;
  --amber-soft: #fdf0d9;
  --warn: #c0341a;
  --warn-soft: #fde8e3;

  --pad: 34px;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(20, 32, 47, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pretendard", "Noto Sans KR", "NanumGothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  cursor: none;                     /* 키오스크에는 마우스 커서가 보이면 안 된다 */
}

/* ------------------------------------------------------ 상·하단 바 */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
  background: var(--bg-card);
  border-bottom: 3px solid var(--accent);
  flex: 0 0 auto;
}

.class-name { font-size: 40px; font-weight: 800; letter-spacing: -0.5px; }
.today      { font-size: 25px; color: var(--fg-dim); margin-top: 4px; }
.bar-right  { text-align: right; }
.clock      { font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; color: var(--accent); }
.weekday    { font-size: 23px; color: var(--fg-dim); margin-top: 6px; }

.footer {
  border-bottom: none;
  border-top: 2px solid var(--line);
  padding: 16px var(--pad);
}

.dots { display: flex; gap: 12px; }
.dots span {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--line-strong); transition: background .3s, transform .3s;
}
.dots span.on { background: var(--accent); transform: scale(1.3); }

.status { font-size: 19px; color: var(--fg-dim); }
.status.warn { color: var(--warn); font-weight: 600; }

/* ------------------------------------------------------ 슬라이드 */

#stage {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  /* 나가는 화면은 빨리 사라지고, 들어오는 화면은 그 뒤에 뜬다.
     동시에 겹치면 글자가 서로 비쳐 지저분해진다. */
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: none;
  transition: opacity .35s ease .25s, transform .35s ease .25s;
}

.slide-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 24px;
  flex: 0 0 auto;
}

.slide-title .dot {
  width: 16px; height: 44px; border-radius: 8px;
  background: var(--accent);
}

.slide-body {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ------------------------------------------------------ 공지 */

.notice {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 10px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}
.notice.pinned { border-left-color: var(--amber); background: var(--amber-soft); }

.notice-title { font-size: 37px; font-weight: 700; line-height: 1.3; }
.notice-body  { font-size: 29px; color: var(--fg-dim); margin-top: 10px; line-height: 1.5; white-space: pre-wrap; }
.notice-when  { font-size: 22px; color: var(--amber); font-weight: 600; margin-top: 12px; }
.pin-badge {
  display: inline-block; font-size: 21px; font-weight: 800;
  background: var(--amber); color: #fff;
  border-radius: 8px; padding: 3px 12px; margin-right: 12px;
  vertical-align: middle;
}

/* ------------------------------------------------------ 급식 */

.meal-main {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  flex: 0 0 auto;
  box-shadow: var(--shadow);
}
.meal-date { font-size: 28px; color: var(--accent); font-weight: 800; margin-bottom: 18px; }
.meal-dishes { display: flex; flex-wrap: wrap; gap: 12px; }
.dish {
  font-size: 33px; font-weight: 600;
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px 20px;
}
.meal-kcal { font-size: 23px; color: var(--fg-dim); margin-top: 18px; }

.meal-week { display: flex; flex-direction: column; gap: 9px; }
.meal-week-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: baseline;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 23px;
}
.meal-week-row .d { color: var(--accent); font-weight: 700; }
.meal-week-row .m { color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------ 오늘 시간표 */

.tt-today { display: flex; flex-direction: column; gap: 11px; }
.tt-row {
  display: grid;
  grid-template-columns: 105px 1fr 190px;
  align-items: center;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 22px;
  box-shadow: var(--shadow);
}
.tt-row.changed { border-color: var(--warn); border-width: 2px; background: var(--warn-soft); }
.tt-period  { font-size: 29px; font-weight: 800; color: var(--accent); }
.tt-subject { font-size: 35px; font-weight: 700; }
.tt-teacher { font-size: 25px; color: var(--fg-dim); text-align: right; }
.tt-badge {
  font-size: 20px; font-weight: 800; color: #fff;
  background: var(--warn); border-radius: 7px; padding: 2px 10px; margin-left: 12px;
  vertical-align: middle;
}
.tt-time { font-size: 21px; color: var(--fg-dim); font-weight: 500; }

/* ------------------------------------------------------ 주간 시간표 */

.ttw {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  align-content: start;
}
.ttw-head, .ttw-row {
  display: grid;
  grid-template-columns: 84px repeat(5, 1fr);
  gap: 6px;
}
.ttw-head div {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  padding: 12px 0;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
}
.ttw-head div:first-child { background: var(--fg-dim); }
.ttw-head div.today { background: var(--amber); }

.ttw-period {
  font-size: 25px;
  font-weight: 800;
  color: var(--fg-dim);
  text-align: center;
  padding: 14px 0;
  background: var(--bg-card-2);
  border-radius: 10px;
}
.ttw-cell {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.ttw-cell .s { font-size: 26px; font-weight: 700; line-height: 1.15; }
.ttw-cell .t { font-size: 18px; color: var(--fg-dim); }
.ttw-cell.empty { background: var(--bg); border-style: dashed; }
.ttw-cell.changed {
  background: var(--warn-soft);
  border-color: var(--warn);
  border-width: 2px;
}
.ttw-cell.changed .s { color: var(--warn); }
.ttw-col-today { background: var(--amber-soft); }

.ttw-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  color: var(--fg-dim);
  margin-top: 10px;
  flex: 0 0 auto;
}
.ttw-legend .swatch {
  width: 26px; height: 18px; border-radius: 5px;
  background: var(--warn-soft); border: 2px solid var(--warn);
  display: inline-block;
}

/* ------------------------------------------------------ 일정 */

.sched-group { margin-bottom: 6px; }
.sched-head {
  font-size: 26px; font-weight: 800; color: var(--accent);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.sched-item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 12px 6px;
  font-size: 29px;
}
.sched-item .when { color: var(--amber); font-size: 25px; font-weight: 700; }
.sched-item .memo { display: block; font-size: 21px; color: var(--fg-dim); margin-top: 4px; }

/* ------------------------------------------------------ 빈 상태 / 오류 */

.empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 31px;
  color: var(--fg-dim);
  text-align: center;
  line-height: 1.6;
}

.stale-tag {
  display: inline-block;
  font-size: 19px;
  color: var(--warn);
  border: 1px solid var(--warn);
  border-radius: 7px;
  padding: 2px 10px;
  margin-left: 14px;
  vertical-align: middle;
}
