/* 실시간 참여 사이트의 기본 모양 (그림 수업 사이트 style.css에서 쓰는 부분만 가져왔어요)
   학교 색: 청(참) · 홍(굳) · 황(아) */

:root {
  --blue: #6c74df;      /* 청 */
  --blue-soft: #e6e8fb;
  --red: #ed727d;       /* 홍 */
  --red-soft: #fde4e6;
  --yellow: #f2c31f;    /* 황 */
  --yellow-soft: #fff4cc;
  --green: #008738;     /* 교표 초록 */
  --green-soft: #ddf2e4;
  --navy: #1f1a5e;      /* 제목 글자 */

  --bg: #fdf7e7;
  --paper: #ffffff;
  --ink: #2a2848;
  --muted: #6d6a85;
  --line: #ece4cf;
  --space: var(--blue);
  --space-soft: var(--blue-soft);
  --radius: 18px;
  --tap: 48px;
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  /* 제목: 영어·숫자는 Poppins, 한글은 Pretendard (참고 사이트와 같은 조합) */
  --font-head: "Poppins", "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif;
  font-family: var(--font);
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { margin: 0; }
h1, h2, .display { font-family: var(--font-head); font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.loading { padding: 40px; text-align: center; font-size: 1.4rem; }

/* ---------- 버튼 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 0 #c9505c; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #c9505c; }
.btn-ghost { background: var(--paper); border-color: var(--line); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.95rem; }
.btn-big { min-height: 64px; padding: 0 44px; font-size: 1.5rem; font-family: var(--font-head); font-weight: 800; }
dialog.confirm {
  border: 0;
  border-radius: 28px;
  padding: 28px 32px;
  max-width: min(90vw, 480px);
  text-align: center;
  border-top: 10px solid var(--yellow);
}
dialog.confirm::backdrop { background: rgb(31 26 94 / 0.45); }
dialog.confirm p {
  margin: 0 0 22px;
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.6;
  color: var(--navy);
  white-space: pre-line;
}
.confirm-buttons { display: flex; gap: 12px; justify-content: center; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 40px);
  max-width: 90vw;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 30;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; margin: 0; }
.login-box {
  max-width: 440px;
  margin: 12vh auto 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--paper);
  border-radius: 28px;
  border-top: 10px solid var(--blue);
  box-shadow: 0 8px 24px rgb(31 26 94 / 0.12);
  text-align: center;
}
.login-box h1 { font-size: 2rem; }
.login-input {
  min-height: 56px;
  padding: 0 18px;
  border: 3px solid var(--blue-soft);
  border-radius: 16px;
  font: inherit;
  font-size: 1.3rem;
}
.login-input:focus { outline: none; border-color: var(--blue); }
.login-error { margin: 0; color: #c9505c; font-weight: 700; }
