/* 2026 AI 디지털 활용 선도학교 운영 담당자 소통 지원 — 전북특별자치도교육청
   색상: 교육청 로고(남색·코랄·청록·노랑) + 교육비전 「살아가는 힘을 키우는 전북교육」(파랑·주황·차콜) */
:root {
  --navy: #0f2a5f;
  --navy-2: #173c80;
  --navy-3: #0a1f47;
  --blue: #2479f7;
  --blue-2: #1662d8;
  --blue-soft: #eaf2ff;
  --orange: #f07d00;
  --orange-soft: #fff2e3;
  --coral: #ea5a48;
  --coral-soft: #fdecea;
  --teal: #00a9a6;
  --teal-soft: #e0f5f4;
  --yellow: #f9c823;
  --yellow-soft: #fff8dc;
  --charcoal: #333;

  --ink: #1b2233;
  --ink-2: #465066;
  --ink-3: #6b7486;
  --line: #dfe4ec;
  --line-2: #edf0f5;
  --bg: #fff;
  --bg-2: #f5f7fb;
  --ok: #0f8a5f;
  --ok-soft: #e4f6ee;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(15, 42, 95, .06), 0 4px 16px rgba(15, 42, 95, .06);
  --wrap: 1200px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg-2); word-break: keep-all; overflow-wrap: break-word; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.hidden { display: none !important; }

/* ---------- 머리글 ---------- */
.util { background: var(--navy-3); color: #d9e2f2; font-size: 13px; }
.util .wrap { display: flex; justify-content: space-between; align-items: center; gap: 0 12px; min-height: 36px; flex-wrap: wrap; } /* 두 줄이 되면 줄 사이는 좁게 */
.util a { color: inherit; text-decoration: none; }
.util a:hover { text-decoration: underline; color: #fff; }
.util-links { display: flex; gap: 4px 16px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.util-links span { opacity: .8; }
.util-user { display: flex; align-items: center; gap: 10px; padding: 2px 0 5px; }
.util-user img { width: 22px; height: 22px; border-radius: 50%; }
.util-user button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 12px; }
.util-user button:hover { background: rgba(255,255,255,.12); }

.masthead { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; min-width: 0; }
.brand-logo { display: block; flex: none; }
.brand .jbe { display: block; height: 40px; width: auto; }
.brand .bar { width: 1px; height: 34px; background: var(--line); flex: none; }
.brand .site { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit; }
.brand .site small { font-size: 13px; color: var(--ink-3); font-weight: 600; line-height: 1.25; }
.brand .site b { font-size: 18px; color: var(--navy); line-height: 1.3; letter-spacing: -0.03em; }
.mast-actions { display: flex; gap: 8px; align-items: center; }
/* 위쪽 AI 단추도 아래 떠 있는 AI 단추와 같은 모양(흰 바탕 + 무지개 동그라미) */
.btn-ai { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px 6px 6px; font-weight: 700; font-size: 15px; box-shadow: 0 4px 14px rgba(15, 42, 95, .15); }
.btn-ai .orb { width: 32px; height: 32px; border-radius: 50%; background: conic-gradient(from 200deg, var(--blue), var(--teal), var(--yellow), var(--orange), var(--coral), var(--blue)); display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.btn-ai .orb .ic { width: 17px; height: 17px; }
.btn-ai:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(15, 42, 95, .2); }
.menu-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; }

.gnb { border-top: 1px solid var(--line-2); background: #fff; }
.gnb ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.gnb ul::-webkit-scrollbar { display: none; }
.gnb a { display: flex; align-items: center; gap: 3px; padding: 14px 8px 12px; /* 학교 메뉴 11칸(운영모델 추가)이 1,160px 안에 들도록 */ text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15.5px; border-bottom: 3px solid transparent; white-space: nowrap; }
.gnb a:hover { color: var(--navy); }
.gnb a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--orange); }
.gnb .badge { background: var(--coral); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 6px; line-height: 18px; min-width: 18px; text-align: center; }
/* 메뉴 10칸(교원 AI 역량체계·예산관리 추가): 넓은 화면은 좌우 여백 10px, 1,280px 이하 창은 글자 15px·아이콘 숨김으로 한 줄에 */
@media (max-width: 1280px) { .gnb a { font-size: 15px; } .gnb a .ic { display: none; } }

.preview-bar { background: var(--yellow-soft); border-bottom: 1px solid #f1dc8f; font-size: 14px; }
.preview-bar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 44px; flex-wrap: wrap; }

/* ---------- 본문 공통 ---------- */
main { min-height: 60vh; outline: none; }
.page { padding: 28px 0 64px; }
.page-head { background: #fff; border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 26px; padding-bottom: 22px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.page-head h1 { font-size: 28px; color: var(--navy); }
.page-head p { color: var(--ink-2); margin-top: 6px; }
.section { margin-top: 28px; }
.section:first-child { margin-top: 0; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-title h2 { font-size: 20px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.sec-title h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--orange); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.grid > .card + .card, .stack > .card + .card { margin-top: 0; } /* 격자 안에서는 간격을 grid gap으로만(첫 칸만 위로 솟던 문제) */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; padding: 10px 16px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1.2; min-height: 42px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-2); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { background: var(--blue-2); }
.btn-line { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-line:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.btn-danger { background: #fff; border-color: #f2c4bd; color: #c0392b; }
.btn-danger:hover:not(:disabled) { background: var(--coral-soft); }
.btn-sm { padding: 6px 10px; font-size: 13.5px; min-height: 34px; border-radius: 8px; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { background: transparent; border: 0; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.icon-btn:hover { background: var(--bg-2); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-2); white-space: nowrap; }
.chip.muted { background: var(--line-2); color: var(--ink-3); }
.chip.warn { background: var(--orange-soft); color: #b85c00; }
.chip.danger { background: var(--coral-soft); color: #c0392b; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.navy { background: var(--navy); color: #fff; }
.chip.teal { background: var(--teal-soft); color: #00807d; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); display: inline-block; flex: none; }

.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 80px 20px; text-align: center; color: var(--ink-3); }
.loading .spin { width: 28px; height: 28px; border-width: 3px; color: var(--blue); margin-bottom: 12px; }
.skeleton { background: linear-gradient(90deg, var(--line-2), #f8f9fc, var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }

.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty .ic { width: 28px; height: 28px; color: #b6bfce; }
.empty b { color: var(--ink-2); }

.notice-box { display: flex; gap: 10px; background: var(--blue-soft); border: 1px solid #cfe0fb; color: #1c3f7a; border-radius: var(--radius); padding: 14px 16px; font-size: 14.5px; }
.notice-box.warn { background: var(--orange-soft); border-color: #f8d6ae; color: #7a4300; }
.notice-box.ok { background: var(--ok-soft); border-color: #bfe6d3; color: #0b5e41; }
.notice-box .ic { margin-top: 2px; }

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .label { font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--ink-3); }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; font-size: 16px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(36,121,247,.15); outline-offset: 0; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.checks input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.frow3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.tbl thead th { background: #f3f6fb; color: var(--ink-2); font-weight: 700; font-size: 13.5px; position: sticky; top: 0; white-space: nowrap; }
.tbl tbody tr:hover { background: #fafbfe; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl .clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--blue-soft); }
dl.info { display: grid; grid-template-columns: 150px 1fr; margin: 0; border-top: 2px solid var(--navy); }
dl.info dt, dl.info dd { padding: 11px 14px; border-bottom: 1px solid var(--line-2); margin: 0; }
dl.info dt { background: #f5f7fb; font-weight: 600; color: var(--ink-2); font-size: 14.5px; }
dl.info dd { white-space: pre-line; }
dl.info dd.ct-dd { white-space: normal; }
dl.info dd.ct-dd > div + div { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ---------- 학교 담당자(관리자 학교 정보 창): 대표 + 추가 담당자 카드 ---------- */
.ct-list { display: grid; gap: 14px; margin-bottom: 10px; }
.ct-card { position: relative; min-width: 0; margin: 0; padding: 14px 14px 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ct-card.main { background: #f7f9fd; }
.ct-card legend { padding: 0 6px; margin-left: -4px; font-weight: 700; font-size: 13.5px; color: var(--navy); }
.ct-card .field { margin-bottom: 12px; }
.ct-del { position: absolute; top: -13px; right: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--coral); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ct-del svg { width: 14px; height: 14px; }
.ct-del:hover, .ct-del:focus-visible { border-color: var(--coral); background: var(--coral-soft); }
.ct-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px dashed #b9c3d6; border-radius: var(--radius); background: transparent; color: var(--navy); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.ct-add svg { width: 16px; height: 16px; }
.ct-add:hover, .ct-add:focus-visible { border-color: var(--navy); background: var(--blue-soft); }
.ct-add[hidden], #ct-dirty[hidden] { display: none; }
.ct-help { margin: 8px 0 14px; }
#ct-dirty { margin-right: auto; align-self: center; }

/* ---------- 첫 화면(로그인 전) ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, #dce9ff 0%, transparent 60%), radial-gradient(900px 380px at -10% 110%, #fff0dd 0%, transparent 60%), #f7f9fd; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; padding-top: 30px; padding-bottom: 52px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 16px; min-width: 0; }
.hero .vision { width: min(420px, 90%); margin-bottom: 22px; }
/* 슬로건 움직임: 그림과 같은 크기·자리(위아래 반짝 여유만큼 음수 여백), 오른쪽 아래 작은 멈춤 단추 */
.hero .vmw { position: relative; width: min(400px, calc(100% - 36px)); }
.hero .vmw .vision { width: 100%; margin: 0; display: block; }
.hero .vmw > svg.vm { display: block; width: 100%; height: auto; margin: -1.2% 0; }
.vm-toggle { position: absolute; right: -32px; bottom: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.9); color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: .7; }
.vm-toggle:hover, .vm-toggle:focus-visible { opacity: 1; color: var(--navy); border-color: var(--navy); }
.vm-toggle svg { width: 13px; height: 13px; }
.hero h1 { font-size: clamp(30px, 3.2vw, 40px); line-height: 1.25; color: var(--navy); letter-spacing: -0.04em; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .lead { font-size: 16.5px; color: var(--ink-2); }
.hero .ask-form { margin-top: 2px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.ask-chips button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.ask-chips button:hover, .ask-chips button:focus-visible { border-color: var(--navy); color: var(--navy); }
.dev-login { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.dev-login .ic { width: 15px; height: 15px; }
.login-card { background: #fff; border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(15,42,95,.14); overflow: hidden; border: 1px solid var(--line); }
.login-card .lc-head { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 22px 24px; }
.login-card .lc-head small { opacity: .8; font-size: 13px; }
.login-card .lc-head h2 { font-size: 21px; margin-top: 4px; }
/* 2단계 머리 오른쪽 슬로건 「모두가 빛나게, 다함께 새롭게」(남색 글자는 흰색으로 바꾼 그림) */
.login-card .lc-split { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lc-slogan { position: relative; flex: 0 1 210px; min-width: 0; }
.lc-slogan > svg.sm { display: block; width: 100%; height: auto; }
.lc-slogan .vm-toggle { right: -6px; bottom: -20px; width: 20px; height: 20px; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.45); color: #fff; }
.lc-slogan .vm-toggle svg { width: 10px; height: 10px; }
.lc-slogan .vm-toggle:hover, .lc-slogan .vm-toggle:focus-visible { background: rgba(255,255,255,.28); color: #fff; border-color: #fff; }
.login-card .lc-body { padding: 22px 24px 24px; }
.steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.steps li b { display: block; color: var(--ink); font-size: 15px; }
.steps .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-2); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.steps li.on .n { background: var(--blue); color: #fff; }
.steps li.done .n { background: var(--ok); color: #fff; }
.gbtn-box { min-height: 48px; display: flex; justify-content: center; }
.inapp { margin-top: 12px; }
.fi.b { background: var(--blue-soft); color: var(--blue-2); }
.fi.o { background: var(--orange-soft); color: var(--orange); }
.fi.t { background: var(--teal-soft); color: var(--teal); }
.fi.c { background: var(--coral-soft); color: var(--coral); }

.verify-wrap { max-width: 480px; margin: 48px auto; padding: 0 20px; }

/* ---------- 학교 담당자 첫 화면 ---------- */
.welcome { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 60%, #2a5bb0 100%); color: #fff; border-radius: var(--radius-lg); padding: 26px 28px; position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; right: -40px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(240,125,0,.35), transparent 70%); }
.welcome small { opacity: .85; }
.welcome h1 { font-size: 26px; margin-top: 4px; position: relative; }
.welcome .row { margin-top: 12px; position: relative; }
.welcome .chip { background: rgba(255,255,255,.14); color: #fff; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: 14px; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 30px; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; line-height: 1.1; }
.stat .v small { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.stat a { font-size: 13.5px; }
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 999px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line-2); }
.list > li:last-child { border-bottom: 0; }
.li-row { display: flex; gap: 12px; align-items: center; padding: 12px 2px; text-decoration: none; color: inherit; }
a.li-row:hover .li-title { color: var(--blue-2); text-decoration: underline; }
.li-title { font-weight: 600; flex: 1; min-width: 0; }
/* 공문 대장: 목록 접기·펼치기, 이중 제출 '이상 없음' 체크와 뺀 목록 */
.fold-body[hidden] { display: none; }
.fold-btn { min-width: 108px; justify-content: center; }
.dual-act { display: inline-flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.dual-ok { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border: 1px solid #b9dfcb; border-radius: 999px; background: #fff; color: var(--ok); font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.dual-ok:hover, .dual-ok:focus-within { border-color: var(--ok); background: var(--ok-soft); }
.dual-ok input { width: 16px; height: 16px; margin: 0; accent-color: var(--ok); cursor: pointer; }
.dual-done { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 6px; }
.dual-done > summary { cursor: pointer; padding: 6px 2px; color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.dual-done > summary:hover { color: var(--navy); }
.li-meta { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick a { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.quick a:hover { border-color: var(--blue); transform: translateY(-1px); }
.quick .fi { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.quick span { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.ask-box { background: linear-gradient(135deg, #f0f6ff, #fff6ec); border: 1px solid #d9e6fb; border-radius: var(--radius-lg); padding: 22px; }
.ask-box h2 { font-size: 19px; color: var(--navy); display: flex; gap: 8px; align-items: center; }
/* 질문 상자: 둥근 테두리 안에 글칸 + 오른쪽 음성(빨강)·보내기(남색) 동그라미 단추 */
.ask-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; background: #fff; border: 2px solid var(--navy); border-radius: 999px; padding: 6px 6px 6px 18px; }
.ask-form:focus-within { box-shadow: 0 0 0 3px rgba(36,121,247,.15); }
.ask-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 8px 0; border-radius: 0; }
.ask-form input:focus { outline: 0; border: 0; }
.ask-form button { border-radius: 50%; width: 46px; height: 46px; min-height: 46px; padding: 0; flex: none; }
.ask-form button[type=submit] .t { display: none; }
/* 음성 입력 단추 */
/* 음성 단추: 눈에 띄게 빨강(듣는 중엔 더 진한 빨강+물결) */
.ask-form .ask-mic { color: #fff; background: #e03131; border-color: #e03131; box-shadow: 0 3px 10px rgba(224,49,49,.35); }
.ask-form .ask-mic .ic { width: 20px; height: 20px; }
.lbl-row { display: flex; align-items: center; gap: 8px; }
.lbl-row > label { font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.mic-mini { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid #e03131; background: #e03131; color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.mic-mini .ic { width: 15px; height: 15px; }
.mic-mini:hover, .ask-form .ask-mic:hover, .ai-foot .mic:hover { border-color: #c92a2a; background: #c92a2a; color: #fff; }
.mic-mini.rec, .ask-form .ask-mic.rec { background: #a51d2d; border-color: #a51d2d; color: #fff; animation: micPulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .mic-mini.rec, .ask-form .ask-mic.rec { animation: none; } }
.sugs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sugs button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; color: var(--ink-2); }
.sugs button:hover { border-color: var(--blue); color: var(--blue-2); }

/* ---------- 과제 안내 ---------- */
.ov { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.ov div { padding: 16px; border-right: 1px solid var(--line-2); }
.ov div:last-child { border-right: 0; }
.ov small { display: block; color: var(--ink-3); font-weight: 600; font-size: 13px; }
.ov b { color: var(--navy); font-size: 15.5px; }
.task { border-left: 5px solid var(--blue); }
.task.orange { border-left-color: var(--orange); }
.task.teal { border-left-color: var(--teal); }
.task.yellow { border-left-color: var(--yellow); }
.task h3 { font-size: 18px; color: var(--navy); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.task ul { margin-top: 10px; display: grid; gap: 6px; }
.task li::marker { color: var(--orange); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.timeline b { color: var(--blue-2); }
.src { font-size: 13px; color: var(--ink-3); margin-top: 10px; }

/* ---------- 공지 ---------- */
.nlist { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); border-top: 2px solid var(--navy); border-radius: 4px; }
.nlist > li { border-bottom: 1px solid var(--line-2); }
.nitem > button { width: 100%; text-align: left; background: none; border: 0; padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
.nitem > button:hover { background: #fafbfe; }
.nitem .t { flex: 1; font-weight: 600; font-size: 16px; }
.nitem.unread .t { color: var(--navy); }
.nitem .d { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.nitem .body { padding: 4px 18px 20px 18px; border-top: 1px dashed var(--line); background: #fcfdff; }
.nitem .body .txt { padding-top: 14px; line-height: 1.8; }
/* 공지 글꼴 꾸미기(표시) */
.rt-c-red { color: #d32f2f; } .rt-c-blue { color: #1565c0; } .rt-c-green { color: #2e7d32; } .rt-c-orange { color: #e65100; } .rt-c-purple { color: #6a1b9a; }
.rt-bg-yellow { background: #fff176; padding: 0 2px; border-radius: 2px; }
.rt-sm { font-size: .88em; } .rt-lg { font-size: 1.2em; } .rt-xl { font-size: 1.45em; line-height: 1.5; }
/* 공지 꾸밈 편집기 */
.rte { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.rte:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.rte-bar button { min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rte-bar button:hover { background: #fff; border-color: var(--line); }
.rte-bar .sw span { width: 16px; height: 16px; border-radius: 50%; background: var(--c); display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.rte-bar .sw.plain span { background: #1f2937; }
.rte-bar .hl { background: #fff176; padding: 0 4px; border-radius: 3px; color: var(--ink); }
.rte-bar select { height: 32px; width: auto; padding: 0 28px 0 8px; font-size: 14px; border-radius: 8px; }
.rte-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rte-area { min-height: 220px; max-height: 55vh; overflow: auto; padding: 12px 14px; line-height: 1.8; outline: none; white-space: pre-wrap; word-break: break-word; }
.rte-one .rte-area { min-height: 0; max-height: none; padding: 9px 12px; line-height: 1.6; } /* 한 줄(공지 제목) */
.rte-area font[size="1"], .rte-area font[size="2"] { font-size: .88em; }
.rte-area font[size="3"] { font-size: 1em; }
.rte-area font[size="4"], .rte-area font[size="5"] { font-size: 1.2em; }
.rte-area font[size="6"], .rte-area font[size="7"] { font-size: 1.45em; }
.attach { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.attach .attach-one { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* 파일 「보기」 단추(누리집 안에서 바로 보기 — viewer.js) */
.btn-view { color: var(--blue-2); border-color: #c7d8f5; background: #f4f8ff; }
.btn-view:hover, .btn-view:focus-visible { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-2); }
.files li .btn-view + .btn, .files li .btn-view + a.btn { margin-left: -4px; }

/* ---------- 제출 ---------- */
.item-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item-card + .item-card { margin-top: 16px; }
.item-head { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.item-head h3 { font-size: 17.5px; color: var(--navy); flex: 1; min-width: 200px; }
.item-body { padding: 16px 20px 20px; }
.item-desc { color: var(--ink-2); white-space: pre-line; font-size: 15px; }
.files { list-style: none; padding: 0; margin: 14px 0 0; border: 1px solid var(--line-2); border-radius: 10px; }
.files li { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.files li:last-child { border-bottom: 0; }
.files .n { flex: 1 1 180px; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; } /* 좁은 창에서는 단추들이 아랫줄로 */
.files .m { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.fbadge { font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: #eef1f6; color: #536079; flex: none; letter-spacing: .02em; }
.fbadge.hwp { background: #e3f0ff; color: #1662d8; }
.fbadge.pdf { background: #fdecea; color: #c0392b; }
.fbadge.xls { background: #e4f6ee; color: #0f8a5f; }
.fbadge.doc { background: #e8eefc; color: #2b4fb3; }
.fbadge.ppt { background: #fff0e3; color: #c25e00; }
.drop { display: block; width: 100%; margin-top: 14px; border: 2px dashed #c9d5e8; border-radius: 12px; padding: 22px; text-align: center; color: var(--ink-3); background: #fafcff; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-2); }
.drop b { color: var(--navy); }
.drop .drop-note { color: var(--coral); font-weight: 600; margin: 6px 0 4px; word-break: keep-all; }
.drop.disabled { cursor: not-allowed; opacity: .6; }
.queue { margin-top: 10px; display: grid; gap: 8px; }
.qrow { display: grid; grid-template-columns: 1fr 140px; gap: 10px; align-items: center; font-size: 14px; }
.qrow .progress { height: 6px; }
.qrow.err { color: #c0392b; }

/* ---------- 자료실 ---------- */
.lib-row { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.lib-row:last-child { border-bottom: 0; }
/* 자료실 소주제 토글(노션처럼 접고 펴기) */
.lib-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.lib-tog { margin-bottom: 10px; }
.lib-tog > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; user-select: none; }
.lib-tog > summary::-webkit-details-marker { display: none; }
.lib-tog > summary:hover { background: var(--bg-2); }
.lib-tog > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.lib-tog > summary h2 { margin: 0; font-size: 18px; color: var(--navy); }
.lib-tog .tri { flex: none; width: 0; height: 0; border-left: 8px solid var(--ink-3); border-top: 5px solid transparent; border-bottom: 5px solid transparent; transition: transform .15s; }
.lib-tog[open] .tri { transform: rotate(90deg); }
.lib-tog[open] > summary { border-color: var(--blue-2); }
.lib-tog .lib-card { padding: 0; margin: 8px 0 14px 20px; }
.lib-row .t { flex: 1; min-width: 0; }
.lib-row .t b { display: block; }
.lib-row .t span { font-size: 13.5px; color: var(--ink-3); }

/* ---------- 묻고 답하기 ---------- */
.qa { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.qa + .qa { margin-top: 10px; }
.qa .q { display: flex; gap: 10px; align-items: flex-start; }
.qa .q b { flex: 1; }
.qa .qbody { margin-top: 6px; color: var(--ink-2); white-space: pre-line; font-size: 15px; }
.qa .ans { margin-top: 12px; background: var(--blue-soft); border-radius: 10px; padding: 12px 14px; white-space: pre-line; font-size: 15px; }
.qa .ans small { display: block; color: var(--blue-2); font-weight: 700; margin-bottom: 4px; }
details.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
details.faq + details.faq { margin-top: 8px; }
details.faq summary { padding: 14px 16px; cursor: pointer; font-weight: 600; list-style: none; display: flex; gap: 10px; }
details.faq summary::before { content: "Q"; color: var(--blue); font-weight: 800; }
details.faq[open] summary { border-bottom: 1px dashed var(--line); }
details.faq .a { padding: 14px 16px; white-space: pre-line; color: var(--ink-2); }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 16px; font-weight: 700; color: var(--ink-3); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------- 관리자 ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { width: auto; min-width: 120px; min-height: 40px; padding: 6px 10px; font-size: 14.5px; }
.filters input[type=search] { min-width: 200px; }
.mat td.ok { color: var(--ok); font-weight: 800; text-align: center; }
.mat td.no { color: #c9ced8; text-align: center; }
.mat td.cnt { text-align: center; font-weight: 700; color: var(--ok); }
.mat td.cellst { text-align: center; font-weight: 800; cursor: pointer; white-space: nowrap; }
.mat td.cellst:hover { background: var(--blue-soft); outline: 2px solid #c7d8f5; outline-offset: -2px; }
.mat td.st-제출 { color: var(--ok); }
/* 제출 칸: 체크 대신 제출 색으로 채운 사각형(한눈에 보이게) */
.sq { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; background: var(--ok); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; vertical-align: middle; }
.sq-legend { width: 13px; height: 13px; border-radius: 3px; vertical-align: -2px; }
.mat td.st-보완 { color: #c0392b; background: var(--coral-soft); font-size: 13px; }
.mat td.st-미제출 { color: #c9ced8; }
.mat td small { font-size: 11px; color: var(--ink-3); margin-left: 1px; }
.mat td.school-cell, .mat tr[data-sid] td:not(.cellst) { cursor: pointer; }
/* 학교별 현황: 5개교씩 묶어 연한 파스텔 두 가지 색을 번갈아 칠하고, 묶음 사이에 선을 긋는다 */
.mat tbody tr:nth-child(10n+1), .mat tbody tr:nth-child(10n+2), .mat tbody tr:nth-child(10n+3), .mat tbody tr:nth-child(10n+4), .mat tbody tr:nth-child(10n+5) { background: #f3f7ff; }
.mat tbody tr:nth-child(10n+6), .mat tbody tr:nth-child(10n+7), .mat tbody tr:nth-child(10n+8), .mat tbody tr:nth-child(10n+9), .mat tbody tr:nth-child(10n) { background: #fdf8ee; }
.mat tbody tr:nth-child(5n) td { border-bottom: 2px solid #d9e0ec; }
.mat tr[data-sid]:hover td:not(.cellst) { background: #e6eefc; }
/* 대시보드 학교별 현황: 「제출 보기」 등으로 거른 조건 요약 줄(처음에 잠깐 노랗게), 고른 항목 칸 강조 */
#school-table:focus { outline: none; }
.flt-sum { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px 10px 14px; border: 1px solid #c7d8f5; border-radius: var(--radius); background: var(--blue-soft); color: var(--navy); animation: flt-in 1.6s ease-out; }
.flt-sum > .ic { width: 18px; height: 18px; flex: none; }
.flt-sum .t { flex: 1 1 auto; min-width: 0; }
.flt-sum .n { font-weight: 800; color: var(--blue-2); white-space: nowrap; }
@keyframes flt-in { 0%, 40% { background: var(--yellow-soft); border-color: var(--yellow); } }
.mat th.sel { background: #dbe7ff; color: var(--navy); box-shadow: inset 0 -3px 0 var(--blue); }
.mat td.sel { box-shadow: inset 2px 0 0 #a9c5f5, inset -2px 0 0 #a9c5f5; }
.item-stat { padding: 6px 0 10px; border-bottom: 1px dashed var(--line-2); }
.item-stat:last-child { border-bottom: 0; }
.st-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-opt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.st-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.st-opt input { margin-top: 4px; width: 16px; height: 16px; }
.st-opt b { display: block; font-size: 14.5px; }
.st-opt small { display: block; color: var(--ink-3); font-size: 12.5px; }
.mh { font-size: 16px; color: var(--navy); margin: 4px 0 8px; }
.fix-box { margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(160px, 260px) 1fr 90px; gap: 12px; align-items: center; padding: 8px 0; font-size: 14.5px; }
.bar-row .progress { height: 10px; }
.bar-row b { text-align: right; color: var(--navy); }

/* ---------- 창(모달) ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 20, 45, .45); z-index: 300; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: var(--radius-lg); width: min(560px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(960px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { font-size: 19px; color: var(--navy); }
.modal-body { padding: 20px; }
.confirm-msg { font-size: 16px; margin-bottom: 8px; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 15px; z-index: 500; opacity: 0; transition: .2s; pointer-events: none; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: #b3261e; }
#toast.ok { background: var(--ok); }
/* 로그인 안내: 아래쪽 어두운 바탕과 겹쳐도 잘 보이게 파스텔 초록 */
#toast.nudge { background: #d4f3de; color: #14532d; border: 1.5px solid #9ed9b4; font-weight: 700; box-shadow: 0 8px 26px rgba(15, 42, 95, .22); }

/* ---------- AI 도우미 ---------- */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15,42,95,.2); font-weight: 700; color: var(--navy); }
.ai-fab .orb { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(from 200deg, var(--blue), var(--teal), var(--yellow), var(--orange), var(--coral), var(--blue)); display: flex; align-items: center; justify-content: center; color: #fff; }
.ai-fab .orb .ic { width: 18px; height: 18px; }
.ai-fab small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
/* AI 도우미 알림 움직임(paper.jbedu.ai.kr과 같은 방식): 평소엔 6초마다 빛줄기가 지나가고 무지개 동그라미가 반짝,
   처음 들어왔을 때(창마다 한 번) 오른쪽 아래 단추가 통통 튀며 말풍선 인사 */
.btn-ai, .ai-fab { overflow: hidden; isolation: isolate; }
.btn-ai { position: relative; }
.btn-ai::after, .ai-fab::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(0,106,255,0) 20%, rgba(0,106,255,.16) 45%, rgba(255,205,27,.22) 55%, rgba(0,106,255,0) 80%, transparent 100%);
  transform: translateX(-120%) skewX(-18deg); animation: aiShine 6s ease-in-out infinite; }
.ai-fab::after { animation-delay: .5s; }
.btn-ai .orb, .ai-fab .orb { animation: aiOrb 6s ease-in-out infinite; }
.ai-fab .orb { animation-delay: .5s; }
@keyframes aiShine { 0%, 62% { transform: translateX(-120%) skewX(-18deg); } 80%, 100% { transform: translateX(320%) skewX(-18deg); } }
@keyframes aiOrb { 0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(255,205,27,0); } 78% { box-shadow: 0 0 0 5px rgba(255,205,27,.45); } }
.ai-fab.hello { animation: fabHop 1.3s ease-in-out .5s both; transform-origin: 50% 100%; }
.ai-fab.hello .orb { animation: fabWave 1.3s ease-in-out .5s both, aiOrb 6s ease-in-out 1.8s infinite; }
@keyframes fabHop { 0%, 100% { transform: none; } 25% { transform: translateY(-12px); } 50% { transform: none; } 70% { transform: translateY(-6px); } 88% { transform: none; } }
@keyframes fabWave { 0%, 100% { transform: none; } 25% { transform: rotate(-14deg); } 50% { transform: rotate(12deg); } 75% { transform: rotate(-6deg); } }
.fab-bubble { position: fixed; right: 26px; bottom: 100px; z-index: 91; background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 14px; padding: 9px 13px; font: inherit; font-size: 13.5px; font-weight: 700; box-shadow: 0 8px 20px rgba(15,42,95,.14); white-space: nowrap; cursor: pointer;
  opacity: 0; transform: scale(.6) translateY(8px); transform-origin: 85% 100%; transition: opacity .35s ease, transform .45s cubic-bezier(.3,1.5,.5,1); pointer-events: none; }
.fab-bubble.show { opacity: 1; transform: none; pointer-events: auto; }
.fab-bubble::after { content: ""; position: absolute; right: 26px; bottom: -7px; width: 12px; height: 12px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.ai-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff; z-index: 250; box-shadow: -10px 0 40px rgba(15,42,95,.18); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .25s ease; }
.ai-panel.open { transform: none; }
/* 닫힌 창은 숨김(화면을 돌리거나 크기가 바뀔 때 잠깐 비치지 않게, 키보드 이동에서도 제외) */
.ai-panel:not(.open) { visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
.ai-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.ai-head .orb { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(from 200deg, var(--blue), var(--teal), var(--yellow), var(--orange), var(--coral), var(--blue)); display: flex; align-items: center; justify-content: center; flex: none; }
.ai-head b { display: block; }
.ai-head small { opacity: .8; font-size: 12.5px; }
.ai-head .icon-btn { color: #fff; }
.ai-head .icon-btn:hover { background: rgba(255,255,255,.12); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: #f7f9fc; }
.msg { max-width: 92%; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); padding: 12px 14px; border-radius: 16px 16px 16px 4px; }
.msg.ai p + p, .msg.ai p + ul, .msg.ai ul + p, .msg.ai h4 + p { margin-top: 6px; }
.msg.ai h4 { font-size: 15px; color: var(--navy); margin: 8px 0 4px; }
.msg.ai ul, .msg.ai ol { margin: 4px 0; }
.mdt-wrap { overflow-x: auto; margin: 8px 0; }
.mdt { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.mdt th, .mdt td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.mdt th { background: #f3f6fb; }
.msg .status { font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.msg .err { color: #b3261e; }
.att { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfe; }
.att h5 { margin: 0 0 8px; font-size: 14px; color: var(--navy); display: flex; gap: 6px; align-items: center; }
.att .doc-prev { max-height: 220px; overflow: auto; font-size: 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; }
.att .field { margin-bottom: 10px; }
.att input, .att textarea, .att select { min-height: 38px; font-size: 14.5px; padding: 8px 10px; }
.att textarea { min-height: 90px; }
.ai-foot { border-top: 1px solid var(--line); padding: 12px; background: #fff; }
/* 입력 상자: 둥근 테두리 안에 글칸 + 오른쪽 음성(빨강)·보내기(남색) 동그라미 단추 */
.ai-foot form { display: flex; gap: 8px; align-items: flex-end; background: #fff; border: 2px solid var(--navy); border-radius: 26px; padding: 5px 5px 5px 16px; }
.ai-foot form:focus-within { box-shadow: 0 0 0 3px rgba(36,121,247,.15); }
.ai-foot textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; resize: none; border: 0; outline: 0; background: transparent; border-radius: 0; padding: 11px 0; }
.ai-foot textarea:focus { outline: 0; border: 0; }
.ai-foot form .btn-primary { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: none; }
.ai-foot .meta { font-size: 12px; color: var(--ink-3); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; }
/* 음성: 마이크·자동 읽기·듣기 */
.ai-foot .mic { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid #e03131; background: #e03131; color: #fff; box-shadow: 0 3px 10px rgba(224,49,49,.35); }
.ai-foot .mic .ic { width: 22px; height: 22px; }
.ai-foot .mic.rec { background: #a51d2d; border-color: #a51d2d; color: #fff; animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,49,49,.55); } 50% { box-shadow: 0 0 0 9px rgba(224,49,49,0); } }
.ai-head .icon-btn.on { background: rgba(255,255,255,.18); }
.speak-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 4px 10px 4px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.speak-btn .ic { width: 15px; height: 15px; }
.speak-btn:hover { border-color: var(--navy); color: var(--navy); }
.speak-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-reduced-motion: reduce) { .ai-foot .mic.rec { animation: none; } }
.ai-back { position: fixed; inset: 0; background: rgba(10,20,45,.3); z-index: 240; display: none; }
.ai-back.show { display: block; }

/* ---------- 바닥글 ---------- */
.foot { background: #1d2433; color: #aeb7c7; font-size: 14px; margin-top: 40px; }
.foot .wrap { padding-top: 28px; padding-bottom: 32px; display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.foot img { height: 36px; width: auto; opacity: .95; }
.foot .fi-txt { flex: 1; min-width: 260px; line-height: 1.8; }
.foot a { color: #dfe6f3; }
.foot .copy { color: #7f8aa0; font-size: 13px; margin-top: 6px; }

/* ---------- 인쇄(문서 저장) ---------- */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; font-size: 11pt; color: #000; }
  #print-area .p-meta { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #0f2a5f; padding-bottom: 8px; margin-bottom: 16px; font-size: 9pt; color: #555; }
  #print-area .p-meta img { height: 28px; }
  #print-area h1 { font-size: 18pt; color: #0f2a5f; margin-bottom: 12px; }
  #print-area h2 { font-size: 13pt; color: #0f2a5f; margin: 14px 0 6px; }
  #print-area .p-foot { margin-top: 24px; font-size: 9pt; color: #666; border-top: 1px solid #ccc; padding-top: 8px; }
}

/* ---------- 처음 화면: 도교육청 확인의견 ---------- */
.stack { display: grid; gap: 16px; align-content: start; }
.memo-card { border-left: 4px solid var(--ok); background: #f6fbf8; }
.memo-text { white-space: pre-line; font-size: 14.5px; line-height: 1.7; color: var(--ink); max-height: 220px; overflow: auto; }

/* ---------- 실시 여부 체크 항목 ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; margin-left: auto; background: #fff; }
.seg button { border: 0; background: transparent; padding: 5px 14px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on[data-v="1"] { background: var(--ok); color: #fff; }
.seg button.on[data-v="0"] { background: #fff3e0; color: #b25e00; }
.seg button:disabled { cursor: default; opacity: .75; }
.chk-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fafcff; }

/* ---------- 공문 서류 ---------- */
.doc-box { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #f8faff; }
.doc-box h4 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; color: var(--navy); margin: 0 0 8px; }
.doc-box h4 .ic { width: 18px; height: 18px; }
.doc-one + .doc-one { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.doc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gm-banner { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; background: linear-gradient(135deg, #f4f7ff, #fff8ef); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.gm-banner .gm-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; }
.gm-banner .gm-body { flex: 1; min-width: 14em; }
.gm-banner h2 { font-size: 18px; color: var(--navy); margin: 0 0 4px; }
.gm-banner .gm-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.gm-say { display: inline-block; background: #fff; border: 1px dashed var(--navy); color: var(--navy); border-radius: 8px; padding: 2px 10px; font-weight: 700; }
#msg-text { max-height: 220px; overflow: auto; margin: 0; }
.check-text { white-space: pre-wrap; font-size: 14px; background: #fffdf5; border: 1px solid #f0e2b6; border-radius: 10px; padding: 10px 12px; }

/* ---------- 학교 지역 그림 배너(jbtraining 14개 시군 그림): 처음 화면 환영 배너(.welcome)·메뉴 머리(.ph-scene) ----------
   그림이 잘리지 않게(2026-10-20 사용자): 그림 높이 = 배너 높이, 폭 = 높이 × 1600/560(그림 비율).
   배너가 그림보다 넓으면 오른쪽에 붙여 통째로 보이고, 남는 왼쪽은 같은 그림을 흐리게 늘여 깔아(.wl-blur) 그림 왼쪽 끝이 스며들게 한다.
   배너가 그림보다 좁으면(휴대폰 등) 가운데 두고 좌우만 조금 잘린다 */
.wl-bg { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity .8s ease; overflow: hidden; }
.wl-bg > svg { width: 100%; height: 100%; display: block; }
.wl-blur { display: none; position: absolute; inset: -24px -48px; filter: blur(26px) saturate(1.08); }
.wl-blur svg { width: 100%; height: 100%; display: block; }
.wl-blur * { animation: none !important; }
@supports (width: 1cqh) {
  .wl-bg { container-type: size; }
  .wl-bg > svg { position: absolute; top: 0; left: 50%; height: 100%; width: 285.72cqh; transform: translateX(-50%); }
  @container (min-aspect-ratio: 1600 / 560) {
    .wl-bg > svg { left: auto; right: 0; transform: none;
      -webkit-mask-image: linear-gradient(90deg, transparent, #000 min(26%, 240px)); mask-image: linear-gradient(90deg, transparent, #000 min(26%, 240px)); }
    .wl-blur { display: block; }
  }
}
.scene-on .wl-bg { opacity: 1; }
.welcome.scene-on { background: #f6e7cf; min-height: 200px; display: flex; flex-direction: column; justify-content: center; }
.welcome.scene-on::after { content: ""; position: absolute; inset: 0; top: 0; right: 0; width: auto; height: auto; border-radius: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(10, 31, 71, .82) 0%, rgba(10, 31, 71, .62) 42%, rgba(10, 31, 71, .2) 68%, rgba(10, 31, 71, 0) 82%); }
.welcome > small, .welcome > h1, .welcome > .row { position: relative; z-index: 1; }
.welcome.scene-on > small, .welcome.scene-on > h1 { text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.wl-toggle { position: absolute; right: 14px; top: 12px; z-index: 2; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55); background: rgba(10, 31, 71, .35); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wl-toggle[hidden] { display: none; }
.wl-toggle svg { width: 12px; height: 12px; }
.wl-place { display: none; }
.scene-on .wl-place { display: block; position: absolute; right: 50px; top: 15px; z-index: 2; font-size: 12px; color: #fff; background: rgba(10, 31, 71, .38); padding: 2px 10px; border-radius: 999px; }
/* 메뉴 머리(과제 안내·공지사항·제출하기·우리 학교·수업 공개·자료실·묻고 답하기) */
.page-head.ph-scene { position: relative; overflow: hidden; isolation: isolate; border-bottom: 0; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 60%, #2a5bb0 100%); }
.page-head.ph-scene.scene-on { background: #f6e7cf; }
.page-head.ph-scene.scene-on::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 31, 71, .84) 0%, rgba(10, 31, 71, .66) 40%, rgba(10, 31, 71, .22) 66%, rgba(10, 31, 71, 0) 80%); }
.page-head.ph-scene .wrap { position: relative; z-index: 1; min-height: 200px; display: flex; flex-direction: column; justify-content: center; }
.page-head.ph-scene .wl-toggle { right: 20px; top: 14px; }
.page-head.ph-scene .wl-place { right: 58px; top: 17px; }
.page-head.ph-scene .crumb { color: rgba(255, 255, 255, .82); padding-right: 260px; }
.page-head.ph-scene h1 { color: #fff; }
.page-head.ph-scene p { color: rgba(255, 255, 255, .95); max-width: 620px; }
.page-head.ph-scene .crumb, .page-head.ph-scene h1, .page-head.ph-scene p { text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }

/* ---------- 우리 학교: 운영 결과보고서 칸 ---------- */
.report-card .rp-note { display: block; margin-top: 2px; font-weight: 400; }

/* ---------- 제출 파일 옮김 알림(관리자 「옮기기」) ---------- */
.notice-box.moved-box { background: #eef5ff; border-color: #bcd3f7; }
.notice-box.moved-box > .ic, .notice-box.moved-box > svg { color: #1662d8; }
.moved-list { margin: 6px 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.moved-list .small { color: var(--ink-2); margin-top: 2px; }
.files li.moved-note { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 6px; margin-top: -4px; padding: 6px 10px; border-radius: 8px; background: #eef5ff; color: #1b4f9c; font-size: 13px; line-height: 1.5; }
.files li.moved-note .ic, .files li.moved-note svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.files li.moved-note span { flex: 1; min-width: 0; }
.mv-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafd; }
.mv-file > div { display: flex; flex-direction: column; min-width: 0; }
.mv-file b { overflow-wrap: anywhere; }
.mv-from { padding: 8px 12px; border-radius: 8px; background: #f3f5f9; color: var(--ink-2); }

/* ---------- 선생님 캐릭터가 있는 카드 ---------- */
.card.stat.mood { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.card.stat.mood .mood-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-self: center; }
.card.stat.mood .msc-card { flex: none; gap: 6px; margin-bottom: -2px; }
.card.stat.mood .msc-bubble, .mood-banner .msc-bubble { max-width: 168px; font-size: 13px; padding: 6px 11px; }
/* 캐릭터 옆으로 말풍선(오른쪽) */
.mood-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, #f3f8ff 0%, #fff8ef 100%); }
.mood-banner .msc-card { flex-direction: row-reverse; align-items: center; gap: 10px; }
.mood-banner .msc-card .msc-bubble::after, .mood-banner .mb-say::after { left: -7px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(135deg); }
.mood-banner .mb-text { display: flex; flex-direction: column; gap: 2px; margin-left: auto; text-align: right; }
.mood-banner .mb-text b { font-size: 17px; color: var(--navy); }
.mood-banner .mb-text span { font-size: 13px; color: var(--ink-3); }
/* 묻고 답하기: 두 선생님 + 말풍선 */
.qna-hello { padding: 8px 18px; }
.qna-hello .duo { display: flex; align-items: flex-end; gap: 0; }
.qna-hello .duo .msc-card { flex-direction: column; }
.qna-hello .mb-say { max-width: 330px; font-size: 15px; padding: 10px 16px; }
/* 과제 안내 편집 단추(관리자) */
.guide-edit { margin-left: 6px; }

@media (max-width: 760px) {
  .welcome.scene-on { min-height: 150px; }
  .welcome.scene-on::after { background: linear-gradient(180deg, rgba(10, 31, 71, .55) 0%, rgba(10, 31, 71, .78) 75%); }
  .scene-on .wl-place { display: none; }
  .page-head.ph-scene .wrap { min-height: 160px; padding-top: 22px; padding-bottom: 20px; }
  .page-head.ph-scene.scene-on::after { background: linear-gradient(180deg, rgba(10, 31, 71, .6) 0%, rgba(10, 31, 71, .8) 75%); }
  .page-head.ph-scene .crumb { padding-right: 40px; }
  .card.stat.mood .msc-bubble { max-width: 130px; font-size: 12.5px; }
  .card.stat.mood .msc { width: 92px; height: auto; }
  .mood-banner { padding: 10px 12px; }
  .mood-banner .mb-text { margin-left: 0; text-align: left; width: 100%; }
  .mood-banner .msc-card .msc { width: 84px; height: auto; }
  .qna-hello .duo .msc { width: 76px; height: auto; }
  .qna-hello .mb-say { font-size: 14px; }
  .grid.keep2 { grid-template-columns: 1fr 1fr; }
  .qna-hello .mb-say::after { left: 52px; top: -7px; transform: rotate(-135deg); }
}

/* ---------- 관리 대시보드: 오늘의 지역 배너 + 항목별 원형 그래프 ---------- */
.admin-hero { margin-bottom: 4px; }
.dn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; align-items: start; padding: 18px 16px 14px; position: relative; }
.dn { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.dn-svg { width: 132px; height: 132px; overflow: visible; }
.dn-seg { cursor: pointer; transition: stroke-width .15s ease, opacity .15s ease; }
.dn-seg:hover, .dn-seg:focus-visible { stroke-width: 19; outline: none; }
.dn-row:hover .dn-seg:not(:hover) { opacity: .82; }
.dn-num { font-size: 26px; font-weight: 800; fill: var(--navy); letter-spacing: -0.03em; }
.dn-pct { font-size: 14px; font-weight: 700; }
.dn-sub { font-size: 10.5px; fill: var(--ink-3); font-weight: 600; }
.dn figcaption { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.dn figcaption b { font-size: 13.5px; color: var(--ink); line-height: 1.35; word-break: keep-all; max-width: 170px; }
.dn-legend { font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 4px; }
.dn-legend > span { white-space: nowrap; }
.dn-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-left: 4px; }
.dn-legend i.dn-rest-key { background: #e3e8f0; border: 1px solid #c9d1de; }
.dn-cheer { display: flex; align-items: flex-end; justify-content: center; gap: 0; align-self: end; }
.dn-cheer .msc-card { gap: 4px; }
.dn-cheer .msc-bubble { max-width: 150px; font-size: 12.5px; padding: 6px 10px; }
.dn-tip { position: absolute; z-index: 5; transform: translate(-50%, -100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); box-shadow: 0 6px 18px rgba(15, 42, 95, .14); pointer-events: none; white-space: nowrap; }
@media (max-width: 760px) {
  .dn-row { grid-template-columns: 1fr 1fr; gap: 14px 6px; padding: 14px 8px; }
  .dn-svg { width: 112px; height: 112px; }
  .dn figcaption b { font-size: 12.5px; }
  .dn-legend { font-size: 11.5px; }
  .dn-cheer { grid-column: 1 / -1; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .g4, .g5, .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov div { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 760px) {
  .brand .jbe { height: 30px; }
  .brand .bar { display: none; }
  .brand .site small { font-size: 11.5px; }
  .brand .site b { font-size: 15px; }
  .masthead-row { min-height: 64px; }
  .btn-ai .t { display: none; }
  .btn-ai { padding: 5px; }
  .util-links span { display: none; }
  .hero h1 { font-size: clamp(22px, 6.9vw, 29px); }
  .hero .lead { font-size: 16px; }
  .page-head h1 { font-size: 23px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .sch-grid > .sc-scale { order: 1; } /* 휴대폰: 학교 정보 → 운영계획서 → 결과보고서 → 운영 규모 */
  .frow, .frow3 { grid-template-columns: 1fr; }
  dl.info { grid-template-columns: 110px 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .bar-row { grid-template-columns: 1fr 70px; }
  .bar-row .progress { grid-column: 1 / -1; grid-row: 2; }
  .ai-fab small { display: none; }
  .ai-fab { padding: 10px; right: 14px; bottom: 14px; }
  .ai-fab .t { display: none; }
  .welcome h1 { font-size: 21px; }
  .modal-back { padding: 0; }
  .modal { border-radius: 0; min-height: 100%; }
  .foot .wrap { flex-direction: column; gap: 14px; }
  .ov { grid-template-columns: 1fr; }
  .qrow { grid-template-columns: 1fr; gap: 4px; }
  /* 상단 바로가기: 한 줄로 두고 옆으로 밀어 보기 */
  .util .wrap { padding-bottom: 2px; }
  .util-links { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; max-width: 100%; font-size: 12.5px; gap: 14px; }
  .util-links::-webkit-scrollbar { display: none; }
  /* 사이트 이름은 줄바꿈 없이 */
  .brand { gap: 10px; }
  .brand .site small, .brand .site b { white-space: nowrap; }
  /* 목록 한 줄: 제목이 좁아지면 뒤쪽 표시는 다음 줄로 */
  .li-row { flex-wrap: wrap; row-gap: 6px; }
  .li-title { min-width: 9em; }
  .li-row > :last-child:not(.li-title) { margin-left: auto; }
  /* 표 첫 칸(항목 이름)이 너무 좁아지지 않게: 모자라면 표를 옆으로 밀어 본다 */
  .tbl:not(.mat) td:first-child, .tbl:not(.mat) th:first-child { min-width: 8em; }
  /* 칸이 많은 표는 휴대폰에서 한 줄씩 카드로(옆으로 밀지 않아도 다 보이게) */
  .table-wrap:has(.m-cards) { overflow: visible; }
  .tbl.m-cards thead { display: none; }
  .tbl.m-cards, .tbl.m-cards tbody, .tbl.m-cards tr, .tbl.m-cards td { display: block; width: 100%; }
  .tbl.m-cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.m-cards tr:last-child { border-bottom: 0; }
  .tbl.m-cards td { border: 0; padding: 4px 0; text-align: left; min-width: 0 !important; display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
  .tbl.m-cards td[data-label]::before { content: attr(data-label); flex: none; width: 4.6em; color: var(--ink-3); font-size: 12.5px; font-weight: 600; padding-top: 2px; }
  .tbl.m-cards td.m-head { font-size: 15.5px; padding-bottom: 6px; }
  .tbl.m-cards td.m-act { justify-content: flex-end; padding-top: 8px; }
  .tbl.m-cards td[colspan] { display: block; }
  /* 자료실: 내려받기 단추는 그림만, 파일 표시는 같은 너비(제목 줄 맞춤) */
  .lib-row { gap: 10px; padding: 12px 14px; }
  .lib-row .fbadge { width: 46px; padding-left: 0; padding-right: 0; text-align: center; }
  .lib-row .lbl, .lib-row .btn-view span { display: none; }
  .lib-row .btn-sm { padding: 8px 10px; }
  .lib-row .t span { font-size: 13px; }
  /* 파일 목록: 이름은 한 줄 전체를 쓰고, 크기·단추는 아랫줄 */
  .files li { flex-wrap: wrap; row-gap: 6px; }
  .files li > .fbadge { width: 46px; padding-left: 0; padding-right: 0; text-align: center; align-self: flex-start; margin-top: 2px; }
  .files li > .n { flex: 1 1 calc(100% - 56px); word-break: keep-all; overflow-wrap: anywhere; line-height: 1.5; }
  .files li > .m { margin-left: 56px; margin-right: auto; }
  .doc-box { padding: 10px 12px; }
  /* 처음 화면 질문칸: 입력칸을 넓게(단추는 그림만) */
  .ask-form { gap: 6px; padding-left: 14px; }
  .lc-slogan { flex-basis: 150px; }
  /* 탭 이름이 길면 잘리지 않고 두 줄로 */
  .tabs { gap: 0; }
  .tabs button { flex: 1 1 0; white-space: normal; padding: 10px 8px; font-size: 14.5px; line-height: 1.35; text-align: center; word-break: keep-all; }
  /* AI 단추가 글을 가리지 않게: 단추를 작게, 맨 아래는 단추 높이만큼 비워 둠 */
  .ai-fab { padding: 8px; }
  .ai-fab .orb { width: 30px; height: 30px; }
  .fab-bubble { right: 12px; bottom: 72px; }
  .fab-bubble::after { right: 20px; }
  .foot { padding-bottom: 76px; }
}
@media (max-width: 420px) {
  .quick, .g4, .g5 { grid-template-columns: 1fr 1fr; }
  .brand .jbe { height: 24px; }
  .brand .site small { font-size: 10.5px; }
  .brand .site b { font-size: 14px; }
}

/* 관리 대시보드 머리: 오른쪽 「학교 담당자 화면으로 보기」 */
.page-head .ph-split { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.as-school { flex: 0 1 380px; background: linear-gradient(135deg, var(--teal-soft), #eef4ff); border: 1px solid #bfe3e1; border-radius: var(--radius); padding: 14px 16px; }
.as-t { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; color: var(--navy); }
.as-t .ic { flex: none; margin-top: 2px; color: var(--teal); }
.as-t b { display: block; font-size: 15.5px; }
.as-t span { font-size: 13px; color: var(--ink-2); }
.as-field { position: relative; }
.as-field input { width: 100%; }
.as-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(15, 42, 95, .16); max-height: 320px; overflow: auto; }
.as-list li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.as-list li span { font-size: 13px; color: var(--ink-3); }
.as-list li[aria-selected], .as-list li:hover { background: var(--teal-soft); }
.as-list li.none { cursor: default; color: var(--ink-3); background: none; }
.preview-bar .pv-sub { color: var(--ink-3); font-size: 13px; }
@media (max-width: 760px) {
  .page-head .ph-split { flex-direction: column; align-items: stretch; gap: 14px; }
  .as-school { flex-basis: auto; }
}
/* 학교별 현황 표: 내려 볼 때 위 메뉴 아래에 붙는 표 머리(admin.js floatHead) */
.tbl-float { position: fixed; z-index: 40; overflow: hidden; background: #f3f6fb; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; box-shadow: 0 6px 14px rgba(15, 42, 95, .14); pointer-events: none; }
.tbl-float table { table-layout: fixed; }
.tbl-float thead th { position: static; }
/* 보는 각도(scene.js applyView): 그림을 살짝 돌리고(--turn), 층마다 가까울수록 옆으로(--pan × 깊이 --d). 메뉴를 옮기면 부드럽게 움직인다 */
.wl-bg { perspective: 900px; }
.wl-instant .wl-bg { transition: none; }
.wl-bg > svg { rotate: y var(--turn, 0deg); scale: var(--zoom, 1); transform-origin: 50% 50%; transition: rotate 1.6s cubic-bezier(.22, .7, .2, 1), scale 1.6s cubic-bezier(.22, .7, .2, 1); }
.wl-bg .pl { transform-box: view-box; transform-origin: 50% 100%; transform: translateX(calc(var(--pan, 0px) * var(--d, 0))) scale(calc(1 + .24 * var(--d, 0) * var(--spread, 0))); transition: transform 1.6s cubic-bezier(.22, .7, .2, 1); }
@supports (width: 1cqh) {
  .wl-bg > svg { left: calc(50% - 142.86cqh); transform: none; } /* 가운데 맞춤을 transform 대신 left로(돌리기와 섞이지 않게) */
  @container (min-aspect-ratio: 1600 / 560) { .wl-bg > svg { left: auto; } }
}
/* 기기의 「움직임 줄이기」와 상관없이 각도 이동을 보여 준다(누리집 방침: 움직임은 처음부터 재생, 멈춤은 오른쪽 위 단추) */

/* 할 일 메모 카드 (처음 화면) — 학교가 스스로 적는 체크리스트 */
.todo-card .todo-add { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.todo-card .todo-add input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; color: var(--ink); background: #fff; }
.todo-card .todo-add input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.todo-card .todo-add .mic-mini { flex: none; }
.todo-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 14.5px; line-height: 1.55; }
.todo-chk { flex: none; width: 21px; height: 21px; margin-top: 1px; padding: 0; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.todo-chk svg { width: 13px; height: 13px; }
.todo-list li.done .todo-chk { background: var(--ok); border-color: var(--ok); }
.todo-list li.done .todo-text { color: var(--ink-3); text-decoration: line-through; }
.todo-text { flex: 1; min-width: 0; word-break: break-word; color: var(--ink); }
.todo-del { flex: none; padding: 2px; border: 0; background: none; color: var(--ink-3); cursor: pointer; line-height: 1; }
.todo-del:hover { color: var(--coral); }
.todo-del svg { width: 15px; height: 15px; }

/* ── 예산관리(학교 화면, 관리자 장부 창) ── */
.bk-ref-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
/* 세부 집행 내역 정렬(예산 항목 순 / 집행일 순) */
.bk-sort { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.bk-sort > span { padding: 0 8px 0 10px; }
.bk-sort button { border: 0; border-left: 1px solid var(--line); background: #fff; padding: 6px 11px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.bk-sort button[aria-pressed="true"] { background: var(--navy); color: #fff; font-weight: 700; }
.bk-sort button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
/* 세부 집행 내역 줄 옮기기(▲▼)·지우기(×) */
.bk-acts { white-space: nowrap; text-align: center; }
.bk-mv { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--navy); font-size: 10px; line-height: 1; cursor: pointer; vertical-align: middle; margin-right: 2px; }
.bk-mv:hover:not(:disabled), .bk-mv:focus-visible { background: var(--blue-soft, #eaf2ff); border-color: var(--blue); }
.bk-mv:disabled { opacity: .3; cursor: default; }
.bk-big { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.bk-ok, .bk-warn { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.bk-ok { color: var(--ok); } .bk-warn { color: var(--coral); }
.bk-ok .ic, .bk-warn .ic { width: 16px; height: 16px; }
.bk-save.bk-ok, .bk-save.bk-warn { font-weight: 600; }
.bk-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.bk-t2 { table-layout: fixed; }
.bk-t th, .bk-t td { border: 1px solid var(--line); padding: 7px 8px; text-align: center; vertical-align: middle; }
.bk-t th { background: #f2f2f2; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.bk-t td.num { text-align: right; font-variant-numeric: tabular-nums; }
.bk-t td.auto { background: var(--bg-2); color: var(--ink-2); }
.bk-t td.yel, .bk-t td.yel input { background: #fff7cc; }
.bk-t input, .bk-t select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; font: inherit; color: var(--ink); background: #fff; }
.bk-t input.num { text-align: right; font-variant-numeric: tabular-nums; }
.bk-t input:focus, .bk-t select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.bk-t input:disabled, .bk-t select:disabled { background: transparent; border-color: transparent; color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
.bk-t td.yel input:disabled { background: #fff7cc; }
.bk-qty { display: flex; gap: 4px; } .bk-qty input:first-child { flex: 1.3; } .bk-qty input:last-child { flex: 1; text-align: center; }
.bk-del { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px; }
.bk-del:hover:not(:disabled) { color: var(--coral); }
.bk-del:disabled { opacity: .3; cursor: not-allowed; }
.bk-t tr.tot td { font-weight: 800; background: #fafbfd; }
.bk-t .minus { color: var(--coral); }
.bk-t td.c { text-align: center; }
/* 한글 문서 모양 미리보기 */
.bk-wrap { background: #e9ecf1; border-radius: 12px; padding: 22px; overflow-x: auto; }
.bk-paper { width: 794px; margin: 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); padding: 56px 60px 64px; font-family: "Malgun Gothic", "맑은 고딕", sans-serif; color: #000; }
.bk-title { border: 2px solid #000; text-align: center; font-size: 20px; font-weight: 800; padding: 12px 8px; margin-bottom: 22px; }
.bk-h { font-size: 15px; font-weight: 800; margin: 18px 0 6px; display: flex; justify-content: space-between; align-items: flex-end; }
.bk-h small { font-size: 12px; font-weight: 400; }
.bk-ht { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bk-ht th, .bk-ht td { border: 1px solid #000; padding: 5px 6px; text-align: center; height: 26px; }
.bk-ht th { background: #f2f2f2; font-weight: 700; }
.bk-ht td.num { text-align: right; }
@media (max-width: 760px) { .bk-wrap { padding: 12px; } .bk-paper { transform-origin: 0 0; } }
.bk-mis { color: var(--coral); font-weight: 800; }
.tbl.budget tr[data-sid] { cursor: pointer; }
