/* 2026 선단초등학교 하반기 공개수업 - 스타일 (v01)
 * 외부 글꼴·CDN 없이 사용자 기기에 설치된 글꼴만 씁니다. */
:root {
  --navy: #0b2a63;
  --navy-soft: #1d3a73;
  --blue: #1565e6;
  --blue-dark: #0d4fc0;
  --blue-deep: #0b3d91;
  --sky: #eaf3fd;
  --sky-2: #dcebfb;
  --line: #cfe1f5;
  --text: #16284a;
  --muted: #526078;
  --white: #fff;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok: #156b3a;
  --ok-bg: #e6f6ec;
  --warn-bg: #fff4d6;
  --radius: 12px;
  --font: "Pretendard", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Nanum Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text);
  background: #fff; word-break: keep-all; overflow-wrap: break-word;
}
body.is-admin { background: #eef4fb; }
img { max-width: 100%; height: auto; }
a { color: var(--blue-dark); }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.skip-link:focus { top: 10px; }
.noscript { padding: 24px; text-align: center; font-weight: 700; }

:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; border-radius: 4px; }
.btn-primary:focus-visible, .gc-btn:focus-visible { outline-color: var(--navy); box-shadow: 0 0 0 3px #fff; }
main:focus { outline: none; }
h1:focus { outline: none; }

/* ---------- 시연용 안내 줄 (확인용 파일에서만 쓰임) ---------- */
.demo-banner { background: #fff1c2; color: #5a4300; text-align: center; padding: 10px 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid #f0d77a; }

/* ---------- 헤더 ---------- */
.site-header { background: #fff; border-bottom: 1px solid #d6e3f3; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); min-height: 44px; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.header-tag { font-size: 1.3rem; font-weight: 800; color: var(--navy); }

/* ---------- 소개 영역 ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: #eef5fd;
  background-image: url("../assets/hero-scene.svg");
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: cover;
}
.hero-grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  padding-top: 40px; padding-bottom: 26px;
}
.hero-copy { display: contents; }
.hero-title { font-size: clamp(2.05rem, 4.5vw, 4.4rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
.hero-title span { display: block; }
.hero-title .ht-2 { color: var(--blue); }
.hero-lead { margin-top: 14px; font-size: clamp(1.1rem, 1.9vw, 1.7rem); color: #5a6579; font-weight: 500; }
.period {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; width: fit-content; max-width: 100%;
  margin-top: 22px; padding: 18px 30px; border-radius: 24px; background: rgba(230, 241, 254, .92); border: 1px solid #d4e5f9;
}
.period-icon { width: 44px; height: 44px; color: var(--blue); flex: none; }
.period-icon svg { width: 100%; height: 100%; display: block; }
.period-label { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.period-dates { display: flex; flex-direction: column; }
.period-range { font-size: clamp(1.45rem, 2.7vw, 2.4rem); line-height: 1.2; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; }
.period-sub { font-size: 1.05rem; color: #4d5b73; margin-top: 2px; }
.hero-art { position: relative; display: flex; justify-content: center; margin-top: 4px; }
/* 발밑 그림자 : 아이들이 길 위에 서 있는 느낌 */
.hero-art::after { content: ""; position: absolute; left: 22%; right: 18%; bottom: 2px; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 90, 60, .28), rgba(70, 90, 60, 0)); z-index: -1; }
.hero-art img { position: relative; z-index: 1; }
.hero-art img { display: block; width: auto; height: auto; max-height: 210px; max-width: 78%; filter: drop-shadow(0 10px 14px rgba(11, 42, 99, .12)); }

/* 모바일: 제목 → 설명 → 학생 그림 → 공개 기간 순서 */
.hero-title { order: 1; } .hero-lead { order: 2; } .hero-art { order: 3; } .period { order: 4; margin-top: 10px; }
.hero-grid { display: flex; flex-direction: column; }

@media (min-width: 980px) {
  .hero-grid { display: block; min-height: 470px; padding-top: 48px; padding-bottom: 38px; }
  .hero-title, .hero-lead, .period { max-width: 60%; }
  .period { margin-top: 26px; }
  .hero-art { position: absolute; right: 7%; bottom: 0; width: min(34%, 405px); margin: 0; z-index: 2; }
  .hero-art img { max-height: none; max-width: 100%; width: 100%; }
}
@media (min-width: 1500px) { .hero-art { right: 12%; } }

/* ---------- 학년 선택 ---------- */
.picker { background: var(--sky); padding: 30px 0 46px; position: relative; z-index: 1; }
.picker-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 16px; }
.picker-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; color: var(--navy); line-height: 1.2; }
.picker-bar { width: 1px; height: 26px; background: #9fb3cf; align-self: center; }
.picker-head p { font-size: 1.1rem; color: #4d5b73; }
.chip { margin-left: auto; font-size: .95rem; background: #dbe9f9; color: var(--navy-soft); padding: 6px 16px; border-radius: 999px; font-weight: 600; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; font-weight: 700; margin: 0 0 18px; line-height: 1.5; }
.notice svg { width: 24px; height: 24px; flex: none; margin-top: 1px; }
.notice-info { background: #fff; border: 2px solid var(--blue); color: var(--navy); }
.notice-warn { background: var(--warn-bg); border: 2px solid #e0b43c; color: #5a4300; }

.grade-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .grade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 22px; } }

.grade-card {
  display: block; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--navy); box-shadow: 0 2px 8px rgba(20, 60, 120, .07); transition: transform .12s ease, box-shadow .12s ease;
}
.grade-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20, 60, 120, .14); }
.gc-top { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 88px; background: var(--band); }
.gc-grade { font-size: clamp(2rem, 3vw, 2.8rem); font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.gc-play { width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0, 0, 0, .15); }
.gc-play svg { width: 34px; height: 34px; display: block; }
.gc-body { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 18px 16px; text-align: center; }
.gc-title { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.gc-btn { display: flex; align-items: center; justify-content: center; width: min(76%, 280px); min-height: 46px; padding: 6px 14px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 800; font-size: 1.1rem; }
.grade-card:hover .gc-btn { background: var(--blue-dark); }
.gc-meta { font-size: 1rem; color: var(--muted); }
.g1 { --band: #cfe7fb; --accent: #3b9bf1; }
.g2 { --band: #c6dcfb; --accent: #1c78e6; }
.g3 { --band: #c8f1ee; --accent: #0aa3b3; }
.g4 { --band: #c6edd7; --accent: #25a05a; }
.g5 { --band: #fdeca7; --accent: #dca506; }
.g6 { --band: #fbd45b; --accent: #b4820c; }

/* ---------- 학년별 수업 목록 ---------- */
.grade-wrap { background: var(--sky); min-height: 62vh; padding: 26px 0 56px; }
.gv-head { margin-bottom: 20px; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 20px 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--blue); color: var(--blue-dark); font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.back-btn svg { width: 20px; height: 20px; }
.back-btn:hover { background: #f1f7ff; }
.gv-kicker { margin-top: 18px; color: var(--muted); font-weight: 600; font-size: 1rem; }
.gv-title { margin-top: 2px; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--navy); line-height: 1.2; display: inline-block; padding-bottom: 6px; border-bottom: 8px solid var(--accent); }
.gv-sub { margin-top: 12px; color: #3f4d66; font-size: 1.05rem; max-width: 52em; }

.state { padding: 22px 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; font-size: 1.1rem; }
.state-title { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.state-title svg, .state-notice svg, .state-error > svg { width: 26px; height: 26px; flex: none; }
.state .btn { margin-top: 14px; }
.state-error { border: 2px solid var(--danger); background: #fff; color: #5a1410; }
.state-error .state-title svg, .state-error > svg { color: var(--danger); }
.state-error { display: block; }
.state-notice { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--blue); font-weight: 800; color: var(--navy); }
.state-empty { text-align: center; font-weight: 700; padding: 44px 16px; color: #3b4863; }
.state-loading { text-align: center; color: var(--muted); padding: 40px 16px; }

.lesson-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 640px) { .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .lesson-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.lesson-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(20, 60, 120, .07); min-width: 0; display: flex; flex-direction: column; }
.lc-thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: #dbe8f7; overflow: hidden; text-decoration: none; }
.thumb { display: block; width: 100%; height: 100%; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; flex-direction: column; gap: 6px; background: linear-gradient(135deg, var(--band), #fff 160%); color: var(--navy); }
.ph-grade { font-weight: 800; font-size: 1.5rem; }
.ph-play { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.ph-play svg { width: 30px; height: 30px; }
.thumb-go { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; background: rgba(11, 42, 99, .82); color: #fff; display: grid; place-items: center; }
.thumb-go svg { width: 22px; height: 22px; }
.lc-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; min-width: 0; }
.lc-title { font-size: 1.25rem; font-weight: 800; line-height: 1.35; color: var(--navy); overflow-wrap: anywhere; }
.lc-title a { color: inherit; text-decoration: none; }
.lc-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lc-desc { font-size: 1.02rem; color: #34425e; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; }
.lc-desc.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.lc-more { margin-top: 6px; min-height: 44px; padding: 6px 4px; background: none; border: 0; color: var(--blue-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lc-provider { font-size: .95rem; color: var(--muted); }
.lc-go { align-self: stretch; }
.lc-pending { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px; background: #eef1f6; border: 2px dashed #9aa6bb; color: #46526b; font-weight: 800; }

/* ---------- 버튼·폼 공통 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 20px; border-radius: 10px; border: 2px solid #9db4d6; background: #fff; color: var(--navy); font-weight: 800; font-size: 1.02rem; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover:not(:disabled) { background: #f1f6fd; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { min-height: 44px; padding: 6px 14px; font-size: .98rem; }
.btn-danger { border-color: #d98b86; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { background: #8f1c15; border-color: #8f1c15; }
.btn-block { width: 100%; }

/* ---------- 푸터 ---------- */
.site-footer { background: #f0f6fc; border-top: 1px solid #d6e3f3; padding: 22px 0 28px; text-align: center; color: #4d5b73; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-note { font-size: .92rem; }
.footer-school { font-size: 1rem; font-weight: 600; color: #3b4863; }
.admin-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: .92rem; color: #5b6a83; }

/* ---------- 관리자 ---------- */
.admin-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.admin-user { font-size: .95rem; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-main { padding-top: 26px; padding-bottom: 60px; min-height: 70vh; }
.admin-main h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--navy); margin-bottom: 14px; line-height: 1.25; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(20, 60, 120, .05); }
.panel.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.panel h2 { font-size: 1.35rem; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { margin-bottom: 0; }
.muted { color: var(--muted); }
.current-period { margin-bottom: 4px; font-size: 1.05rem; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-btn { justify-content: flex-end; }
.field label, .field legend, .fieldset legend { font-weight: 800; color: var(--navy); font-size: 1.02rem; padding: 0; }
.req { color: var(--danger); font-weight: 700; font-size: .92rem; }
.opt { color: var(--muted); font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; font-size: 1.02rem; border: 2px solid #8da4c6; border-radius: 10px; background: #fff; color: var(--text);
}
.form-inline input[type=date] { width: auto; min-width: 190px; }
textarea { resize: vertical; line-height: 1.6; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); background: #fffafa; }
input[type=file] { font-size: .98rem; padding: 8px 0; max-width: 100%; }
.hint { font-size: .95rem; color: var(--muted); line-height: 1.5; }
.counter { margin-left: 6px; font-weight: 700; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.radio { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 20px 6px 14px; border: 2px solid #8da4c6; border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer; }
.radio input { width: 22px; height: 22px; accent-color: var(--blue); margin: 0; }
.field-error-slot:empty { display: none; }
.field-error, .link-bad { display: flex; gap: 8px; align-items: flex-start; color: var(--danger); font-weight: 700; font-size: .98rem; line-height: 1.45; }
.field-error svg, .link-bad svg, .link-ok svg { width: 22px; height: 22px; flex: none; }
.link-ok { display: flex; gap: 8px; align-items: flex-start; color: var(--ok); font-weight: 700; font-size: .98rem; line-height: 1.45; }
.link-check:empty { display: none; }
.form-summary { display: flex; gap: 10px; align-items: center; background: var(--danger-bg); border: 2px solid var(--danger); color: #7a1510; border-radius: 12px; padding: 12px 16px; font-weight: 800; }
.form-summary svg { width: 24px; height: 24px; flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.form-status:empty, .flash-slot:empty { display: none; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-weight: 600; line-height: 1.5; margin-bottom: 14px; }
.flash svg { width: 24px; height: 24px; flex: none; }
.flash-ok { background: var(--ok-bg); border: 2px solid #62b184; color: #0f4d29; }
.flash-err { background: var(--danger-bg); border: 2px solid var(--danger); color: #7a1510; }
.flash-busy { background: #e8f1ff; border: 2px solid var(--blue); color: var(--navy); }
.form-status .flash { margin-bottom: 0; }

.thumb-preview { aspect-ratio: 16 / 9; width: min(100%, 420px); background: #eef3fa; border: 2px dashed #9db4d6; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; text-align: center; color: var(--muted); font-size: .95rem; padding: 8px; }
.thumb-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-btns:empty { display: none; }

.grade-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.tab { min-height: 46px; padding: 6px 16px; border-radius: 999px; border: 2px solid #9db4d6; background: #fff; font-weight: 800; color: var(--navy); cursor: pointer; }
.tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-count { font-weight: 600; font-size: .92rem; opacity: .85; }
.tab:disabled { opacity: .6; cursor: not-allowed; }
.grade-heading { font-size: 1.15rem; font-weight: 800; margin: 6px 0 10px; color: var(--navy); }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.ar-thumb { width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #e1ecf8; }
.ar-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-thumb-ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--band); color: var(--accent); }
.ar-thumb-ph svg { width: 34px; height: 34px; }
.ar-title { font-weight: 800; font-size: 1.1rem; color: var(--navy); overflow-wrap: anywhere; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .95rem; margin-top: 4px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: .88rem; }
.badge-on { background: var(--ok-bg); color: #0f4d29; border: 1px solid #62b184; }
.badge-off { background: #eceff4; color: #3b4863; border: 1px solid #aab4c6; }
.ar-link-bad { color: var(--danger); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.ar-link-bad svg { width: 18px; height: 18px; }
.ar-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) {
  .admin-row { grid-template-columns: 128px minmax(0, 1fr) auto; }
  .ar-actions { grid-column: auto; justify-content: flex-end; max-width: 420px; }
}

dialog.confirm { border: 0; border-radius: 16px; padding: 0; max-width: min(92vw, 460px); width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); color: var(--text); }
dialog.confirm::backdrop { background: rgba(11, 30, 70, .55); }
.confirm-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.confirm-body h2 { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.confirm-name { font-weight: 800; background: #f1f6fd; border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }
.confirm-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }

/* ---------- 작은 화면 ---------- */
@media (max-width: 599px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-row { min-height: 64px; gap: 10px; }
  .brand-logo { height: 46px; }
  .brand-name { font-size: 1.3rem; }
  .header-tag { font-size: 1rem; }
  .hero-grid { padding-top: 24px; padding-bottom: 20px; }
  .period { padding: 14px 18px; gap: 6px 14px; border-radius: 20px; width: 100%; }
  .period-icon { width: 36px; height: 36px; }
  .period-label { font-size: 1.05rem; }
  .period-dates { flex-basis: 100%; }
  .hero-art img { max-height: 190px; }
  .picker { padding-top: 22px; }
  .picker-bar { display: none; }
  .picker-head { flex-direction: column; gap: 4px; align-items: flex-start; }
  .chip { margin-left: 0; }
  .gc-top { min-height: 78px; }
  .panel { padding: 16px; }
  .admin-header-right { width: 100%; justify-content: space-between; }
  .header-row { flex-wrap: wrap; }
  .admin-user { max-width: 60vw; }
  .form-inline input[type=date] { width: 100%; }
  .form-inline .field { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .grade-card:hover { transform: none; }
}

/* ---------- 학년 비밀번호 (v05) ---------- */
.gc-lock { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--navy-soft); }
.gc-lock svg { width: 18px; height: 18px; }
.pw-box { max-width: 560px; background: #fff; border: 2px solid var(--blue); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.pw-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--navy); }
.pw-icon { width: 40px; height: 40px; border-radius: 50%; background: #e8f1ff; color: var(--blue); display: grid; place-items: center; flex: none; }
.pw-icon svg { width: 24px; height: 24px; }
.pw-help { color: var(--muted); font-size: 1rem; }
.pw-row { display: flex; gap: 10px; }
.pw-row input { flex: 1; min-width: 0; }
.pw-row .btn { flex: none; min-width: 88px; }
.tab-lock { display: inline-flex; vertical-align: -3px; margin-left: 4px; }
.tab-lock svg { width: 16px; height: 16px; }
.lock-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.lock-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.lock-row.is-locked { background: #f3f8ff; border-color: #a9c6ef; }
.lock-grade { display: inline-flex; justify-content: center; padding: 4px 0; border-radius: 999px; background: var(--band); font-weight: 800; color: var(--navy); }
.lock-on { display: inline-flex; align-items: center; gap: 6px; color: var(--navy); }
.lock-on svg { width: 18px; height: 18px; color: var(--blue); }
.lock-pw { font-size: 1.1rem; letter-spacing: .04em; background: #fff; border: 1px dashed #9db4d6; border-radius: 6px; padding: 0 8px; }
.lock-off { color: var(--muted); }
.lock-actions, .lock-form { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lock-form input { flex: 1 1 160px; max-width: 260px; min-height: 44px; }
.lock-err { flex-basis: 100%; }
@media (min-width: 760px) {
  .lock-row { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .lock-actions, .lock-form { grid-column: auto; justify-content: flex-end; }
}
@media (max-width: 599px) { .pw-row { flex-direction: column; } .pw-row .btn { width: 100%; } }
