:root {
  color-scheme: light;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }

/* Tailwind의 flex/grid 유틸리티가 hidden 속성보다 우선 적용되는 걸 방지
   (같은 태그에 display를 지정하는 클래스와 hidden 속성이 같이 있으면,
   나중에 로드되는 Tailwind 쪽이 이겨서 hidden이 무시돼버린다) */
[hidden] { display: none !important; }

/* 학년/학기 숫자 입력에서 스핀 화살표 제거(숫자만 직접 입력) */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", -apple-system, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Google Fonts에서 로드하는 Material Symbols 아이콘 폰트를 실제 아이콘으로 렌더링하기 위한 필수 규칙
   (Google이 배포하는 표준 스니펫 — 이게 없으면 "photo_camera" 같은 글자가 그대로 보인다) */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

/* 상단 헤더는 fixed(h-20=80px)이므로 모든 화면 본문에 그만큼 위쪽 여백이 필요 */
main { padding: 92px 12px 32px 12px; max-width: 640px; margin: 0 auto; }

/* 홈 화면은 자체 Tailwind 레이아웃(max-w-5xl 등)이 폭/중앙정렬을 담당하므로 기본 제약을 해제 */
#home-view { max-width: none; margin: 0; padding-left: 0; padding-right: 0; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1220;
    --card: #131b2c;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #24304a;
  }
}

/* 랜딩 메뉴 버튼 (퀴즈 풀기의 과목 선택 목록에서 재사용) */
.menu-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-card:active { background: #f1f5f9; }

.menu-label { font-size: 17px; font-weight: 700; color: var(--text); }

.menu-desc { font-size: 13px; color: var(--muted); }

/* 퀴즈 등록 */
.register-queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.register-queue-item {
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
}

.register-queue-item.done { color: #1565c0; }
.register-queue-item.failed { color: #c62828; }

/* 퀴즈 풀기 */
.solve-score {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin: 40px 0 20px;
}

.primary-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.primary-btn:active { opacity: 0.85; }

@media (prefers-color-scheme: dark) {
  .menu-card:active { background: #1b263b; }
}
