/* 글꼴 Pretendard(OFL) 는 화면마다 <link href="/fonts/pretendard.css"> 로 app.css 와 나란히 받음(app.css 안에서 불러 차례로 받으면 3G 에서 첫 그림이 한 번 더 늦어짐) -- 쓰는 글자만 그때그때 받음(dynamic subset) */
/* 공통 옷 -- 학생(폰) · 선생님(PC) · 운영자 · 소개 화면이 함께 씀. 색은 여기 토큰만 바꾸면 됨.
   글자 크기 12 · 13 · 15 · 17 · 20 · 24 · 32 · 44 / 여백 4 의 배수. 강조색은 한 가지(--brand): 학원 화면은 학원 색, 제품 화면(.product)은 잉크 파랑. */
:root {
  --brand: #2f6fde; --brand-ink: #fff; --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --brand-dark: color-mix(in srgb, var(--brand) 84%, #000);
  --ink: #141a26; --ink2: #4b5262; --ink3: #646978; --line: #e3e4e8; --line2: #d3d5db; --bg: #f5f6f8; --card: #fff;
  --ok: #187a4b; --ok-soft: #e7f4ec; --bad: #b8403a; --bad-soft: #fbecea; --warn: #8a5e0f; --warn-soft: #fbf3df;
  --r: 14px; --r-s: 9px; --sh: 0 1px 2px rgba(20,26,38,.05), 0 2px 10px rgba(20,26,38,.04);
  --font: 'Pretendard Variable', 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}
/* 제품 화면(소개 · 운영자 · 도움말 · 약관): «공책과 형광펜» -- 따뜻한 종이 바탕, 잉크 글, 형광펜 노랑은 한두 군데만 */
.product {
  --brand: #22408f; --brand-soft: #eaeef8; --brand-dark: #19316f;
  --paper: #f7f5f0; --paper2: #efece4; --hl: #ffd84d; --hl-soft: #fff3c2;
  --bg: var(--paper); --line: #e4e1d9; --line2: #d2cec4; --ink2: #4d5260; --ink3: #63666f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 700; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }   /* 화면이 바뀔 때 초점을 받는 제목(키보드로 다음 칸에 가면 고리가 보임) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 18px; margin-bottom: 14px; }
.muted { color: var(--ink2); } .small { font-size: .88em; } .tiny { font-size: .78em; color: var(--ink3); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
/* 단추: 주(primary · 색 채움) · 보조(흰 바탕 + 선) · 글자(ghost). 높이 44 고정, 누르면 살짝 눌림 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line2, var(--line)); background: #fff; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); transition: background-color .12s, border-color .12s, transform .06s; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: #b9bcc4; background: #fcfcfd; }
.btn:active { transform: translateY(1px); background: #f1f2f4; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.primary:active { background: var(--brand-dark); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-dark); }   /* 바탕 위 글자 단추: 학원 색보다 조금 짙게(대비 4.5:1) */
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { color: var(--bad); }
.btn.big { min-height: 54px; font-size: 1.08em; width: 100%; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: .88em; color: var(--ink2); margin-bottom: 4px; font-weight: 600; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line2, var(--line)); border-radius: 10px; background: #fff; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line2, var(--line)); background: #fff; border-radius: 99px; padding: 7px 14px; cursor: pointer; font-size: .92em; min-height: 38px; color: var(--ink); }
.chip:hover { border-color: #b9bcc4; }
.chip:active { background: #f1f2f4; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.badge { display: inline-block; font-size: .75em; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.banner { padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: #6f4c0c; margin-bottom: 12px; font-size: .92em; }
.banner.bad { background: var(--bad-soft); color: #8f2c24; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92em; font-variant-numeric: tabular-nums; }
table.tbl th, table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.tbl th { font-size: .85em; color: var(--ink2); font-weight: 600; background: #fafafb; position: sticky; top: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1b2130; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 99; font-size: .95em; box-shadow: 0 6px 24px rgba(20,26,38,.2); max-width: calc(100vw - 32px); }
.hide { display: none !important; }
.empty { text-align: center; color: var(--ink3); padding: 28px 10px; }
dialog { border: 0; border-radius: var(--r); padding: 20px; max-width: min(560px, calc(100vw - 24px)); box-shadow: 0 16px 48px rgba(20,26,38,.22); color: var(--ink); }
dialog::backdrop { background: rgba(20,26,38,.4); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .logo { font-weight: 800; color: var(--brand); }
/* 제품 글자 로고: «숙제노트» -- 이름 아래 형광펜 한 줄 */
.wordmark { display: inline-flex; align-items: baseline; gap: 0; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 20px; line-height: 1; }
.wordmark b { font-weight: 800; background: linear-gradient(transparent 58%, var(--hl, #ffd84d) 58%, var(--hl, #ffd84d) 92%, transparent 92%); padding: 0 1px; }
.wordmark small { font-size: 13px; font-weight: 600; color: var(--ink3); letter-spacing: 0; margin-left: 8px; }
/* 자리 모양(불러오는 동안) */
.skel { display: block; background: linear-gradient(90deg, rgba(20,26,38,.05), rgba(20,26,38,.09), rgba(20,26,38,.05)); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: 8px; min-height: 14px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* 움직임 줄이기(기기 설정): 반짝임 · 떨림 · 색종이 · 올라오는 창 등 연출을 모두 끔(student.css · tv.css 에도 따로 있음) */
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; } }
@media print { .noprint { display: none !important; } body { background: #fff; } }
