:root {
  --bg: #f7f0e1;
  --bg-soft: #efe7d5;
  --card: #fffcf5;
  --card-hover: #f6f0e4;
  --border: #e8dfcd;
  --text: #2b2723;
  --text-dim: #7c7261;
  --accent: #c0392b;
  --accent-soft: rgba(192, 57, 43, 0.10);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(120, 100, 70, 0.14);
  --paper: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27520%27%20height%3D%27520%27%3E%3Cfilter%20id%3D%27p%27%20x%3D%270%27%20y%3D%270%27%20width%3D%27100%25%27%20height%3D%27100%25%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.012%27%20numOctaves%3D%276%27%20seed%3D%2711%27%20stitchTiles%3D%27stitch%27%20result%3D%27n%27%2F%3E%3CfeDiffuseLighting%20in%3D%27n%27%20surfaceScale%3D%272.0%27%20diffuseConstant%3D%271.03%27%20lighting-color%3D%27%23ffffff%27%20result%3D%27l%27%3E%3CfeDistantLight%20azimuth%3D%27235%27%20elevation%3D%2759%27%2F%3E%3C%2FfeDiffuseLighting%3E%3CfeComposite%20in%3D%27l%27%20in2%3D%27SourceGraphic%27%20operator%3D%27arithmetic%27%20k1%3D%271%27%20k2%3D%270%27%20k3%3D%270%27%20k4%3D%270%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20fill%3D%27%23faf6ec%27%20filter%3D%27url%28%23p%29%27%2F%3E%3C%2Fsvg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* iOS 파란색 방지: 전화(tel:)·메일·자동감지 링크가 파란 기본색으로 뜨지 않게 본문색 상속 */
a[href^="tel:"], a[href^="mailto:"], a[href^="sms:"] { color: inherit; text-decoration: none; }
a { -webkit-tap-highlight-color: transparent; }
/* iOS 날짜/시간 입력칸 값이 파랗게 뜨는 것 방지 */
input[type="date"], input[type="month"], input[type="time"], input[type="datetime-local"] { color: var(--text); }

/* hidden 속성은 항상 숨김 (display:flex 등이 덮어쓰지 못하게) */
[hidden] { display: none !important; }

html { scrollbar-gutter: stable; }   /* 세로 스크롤바 자리 항상 확보 — 짧은 페이지(회의록 등) 전환 시 가로 밀림(레이아웃 시프트) 방지 */
body {
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
  background-color: var(--bg);
  background-image: var(--paper);
  background-size: 520px 520px;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg, rgba(247, 240, 225, 0.85));   /* 브랜딩 '상단바색' 반영(미설정 시 기본 크림) */
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);   /* 아이폰 노치/상태바가 헤더 가리지 않게(안전영역) */
}
/* 상단 배너가 떠 있으면 그 배너가 안전영역을 먹으므로 헤더는 중복 제외(Safari 15.4+ :has) */
body:has(.devmode-banner:not([hidden])) .site-header,
body:has(.dunning-banner:not([hidden])) .site-header,
body:has(.hdmi-banner:not([hidden])) .site-header { padding-top: 0; }
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
/* 헤더 버튼 콤팩트하게 (한 줄 유지) */
.header-inner .btn-add, .header-inner .header-btn { padding: 8px 13px; font-size: 0.85rem; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.brand-logo { display: inline-flex; align-items: baseline; font-weight: 900; font-size: 1.35em; line-height: 1; letter-spacing: -0.05em; font-family: "Helvetica Neue", Arial, sans-serif; }
.brand-logo .lz { color: var(--accent); }
.brand-logo .le { color: var(--text); }
.brand-name { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; color: var(--header-text, inherit); }
.brand-mark { color: var(--accent); font-size: 1.2rem; }
.brand-logo-img { height: 30px; width: auto; display: block; }
.auth-brand .brand-logo-img { height: 34px; vertical-align: middle; }
.install-ic .brand-logo-img { height: 22px; }

.search-box {
  flex: 1 1 140px;
  min-width: 90px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text-dim);
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 0.95rem; font-family: inherit;
}
.search-box input::placeholder { color: var(--text-dim); }

.btn-add {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 999px;
  padding: 9px 18px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.2s;
}
.btn-add:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(216,69,59,0.35); }
.btn-add span:not(.ba-txt) { font-size: 1.1rem; line-height: 1; }   /* ＋ 아이콘만 크게, '자료 추가' 텍스트(.ba-txt)는 버튼 글자크기 유지 */
.btn-add .ba-txt { font-size: inherit; }
.tt-head .btn-add { padding: 6px 13px; font-size: 0.8rem; font-weight: 600; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; }
.intro { padding: 48px 0 28px; }
.intro h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-dim); margin-top: 6px; font-size: 1rem; }

/* ---------- Filters ---------- */
.filters { margin-bottom: 26px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter-labeled { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.filter-labeled .filter-row { margin-bottom: 0; flex: 1; }
.filter-label { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.chip {
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 999px;
  padding: 7px 15px; font-size: 0.88rem; cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

.tag-row .chip { font-size: 0.82rem; padding: 5px 12px; }
.tag-row .chip::before { content: "#"; opacity: 0.5; margin-right: 2px; }
.tag-row .chip.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 6px;
}
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sort-select {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 7px 10px; font-family: inherit; font-size: 0.82rem;
  cursor: pointer; outline: none;
}
.sort-select:focus { border-color: var(--accent); }
.view-toggle {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 1rem;
  transition: all 0.15s;
}
.view-toggle:hover { color: var(--text); border-color: var(--accent); }
.count { color: var(--text-dim); font-size: 0.85rem; }
.type-filter { display: flex; gap: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.type-btn {
  background: none; border: none; color: var(--text-dim);
  padding: 6px 11px; border-radius: 7px; font-size: 0.82rem;
  cursor: pointer; font-family: inherit; transition: all 0.15s; white-space: nowrap;
}
.type-btn:hover { color: var(--text); }
.type-btn.active { background: var(--card-hover); color: var(--text); }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
/* 자료유형/학년별 묶어보기 */
.grid-groups { display: block; }
.group-section { margin-bottom: 30px; }
.group-header {
  display: flex; align-items: center; gap: 10px;
  margin: 0 2px 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.group-header::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: var(--accent);
}
.group-title { font-weight: 800; font-size: 1.08rem; color: var(--text); }
.group-count {
  font-size: 0.78rem; font-weight: 700; color: var(--text-dim);
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 2px 9px; border-radius: 999px;
}

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--card-hover); }
.card { position: relative; }

/* 다중 선택 */
.select-check {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.9); border: 2px solid var(--border);
  color: transparent; font-size: 0.9rem; font-weight: 900;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.grid.selecting .select-check, .grid-groups.selecting .select-check { display: flex; }
.grid.selecting .card, .grid-groups.selecting .card { cursor: pointer; }
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.card.selected .select-check { background: var(--accent); border-color: var(--accent); color: #fff; }
#selectToggle { width: auto; padding: 0 12px; white-space: nowrap; }
#selectToggle.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.bulk-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 14px;
  box-shadow: 0 6px 24px rgba(120,100,70,.25);
  max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center;
}
.bulk-count { font-weight: 800; color: var(--text); padding: 0 4px; white-space: nowrap; }
.bulk-btn {
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  border-radius: 999px; padding: 7px 13px; font-size: 0.9rem; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.bulk-btn:hover:not(:disabled) { border-color: var(--accent); }
.bulk-btn:disabled { opacity: 0.4; cursor: default; }
.bulk-btn.danger { color: #fff; background: var(--accent); border-color: var(--accent); }
.bulk-btn.danger:disabled { opacity: 0.4; }
.bulk-btn.ghost { background: transparent; }
/* 모바일: 알약(999px) 바에 버튼 5개를 넣으면 좁은 폰에서 세로로 쌓여 달걀처럼 길어짐
   → 둥근 사각 바를 좌우 꽉 차게, 선택개수는 윗줄, 버튼은 줄을 고르게 나눠 채움 */
@media (max-width: 460px) {
  .bulk-bar {
    left: 12px; right: 12px; transform: none; max-width: none;
    border-radius: 16px; padding: 10px 12px; gap: 8px;
  }
  .bulk-bar .bulk-count { width: 100%; text-align: center; }
  .bulk-bar .bulk-btn { flex: 1 1 auto; text-align: center; padding: 9px 10px; }
}

/* 홈 화면 설치 안내 */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 55;
  margin: 0 auto; max-width: 520px;
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 11px 14px;
  box-shadow: 0 6px 24px rgba(120,100,70,.25);
}
.install-ic { font-size: 1.1rem; flex-shrink: 0; }
.install-ic .brand-logo { font-size: 1.15rem; }
.install-text { flex: 1; color: var(--text); font-size: 0.9rem; line-height: 1.35; }
.install-btn {
  flex-shrink: 0; border: none; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer;
}
.install-close {
  flex-shrink: 0; border: none; background: transparent; color: var(--text-dim);
  font-size: 1rem; cursor: pointer; padding: 4px 6px;
}

/* 목록(리스트) 보기 */
.grid.list { grid-template-columns: 1fr; gap: 10px; }
.grid.list .card { flex-direction: row; }
.grid.list .card-thumb { width: 110px; min-width: 110px; aspect-ratio: 1 / 1; }
.grid.list .card-body { padding: 12px 16px; }
.grid.list .card-desc { -webkit-line-clamp: 1; }
@media (max-width: 680px) {
  .grid.list .card-thumb { width: 80px; min-width: 80px; }
}

.card-thumb {
  aspect-ratio: 16 / 10; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb img.pdf-thumb-img { object-position: top center; background: #fff; }
.card-thumb .placeholder { font-size: 2.6rem; opacity: 0.4; }
.type-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  color: #fff; font-size: 0.72rem; font-weight: 500;
  padding: 3px 9px; border-radius: 999px;
}
.expire-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(180,83,9,0.92); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.expire-badge.soon { background: rgba(200,40,40,0.94); }
.detail-expire { cursor: pointer; font-family: inherit; font-weight: 600; font-size: 0.9rem; padding: 10px 20px; border-radius: 999px; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.detail-expire:hover { border-color: #b45309; color: #d97706; }
.detail-expire-note { margin: 10px 0 0; padding: 9px 13px; border-radius: 10px; background: rgba(180,83,9,0.10); border: 1px solid rgba(180,83,9,0.25); color: var(--text); font-size: 0.86rem; }
.detail-expire-note b { font-weight: 800; }
.expire-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.expire-opt { flex: 1 1 28%; min-width: 88px; padding: 11px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.expire-opt:hover { border-color: #b45309; }
.expire-opt.active { background: #b45309; color: #fff; border-color: #b45309; }
.card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { font-size: 0.98rem; font-weight: 600; line-height: 1.35; }
.card-desc {
  font-size: 0.83rem; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: auto; padding-top: 6px; }
.card-cat { font-size: 0.74rem; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
.card-grade { font-size: 0.74rem; color: #6ee7a5; background: rgba(90,220,150,0.14); padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.card-kind { font-size: 0.74rem; color: #d8b4fe; background: rgba(180,140,255,0.14); padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.card-semester { font-size: 0.74rem; color: #fbbf85; background: rgba(255,170,80,0.14); padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.card-date { font-size: 0.74rem; color: var(--text-dim); order: 10; flex-basis: 100%; margin-top: 2px; }

.empty { text-align: center; padding: 80px 0; color: var(--text-dim); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px; max-width: 460px; width: 100%;
  box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto;
}
.detail-card { max-width: 640px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 0.9rem;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text); border-color: var(--accent); }
.modal-card h2 { margin-bottom: 20px; font-size: 1.3rem; }
/* 업데이트 안내 팝업 */
.update-card { max-width: 440px; }
.update-card .update-title { margin-bottom: 4px; font-size: 1.35rem; }
.update-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 18px; }
.update-body { display: flex; flex-direction: column; gap: 16px; }
.update-group { border-left: 3px solid var(--accent); padding-left: 12px; }
.update-group.update-important { background: var(--accent-soft); border-left-width: 4px; border-radius: 0 10px 10px 0; padding: 10px 12px; }
.update-group.update-important h3 { color: var(--accent); }
.update-group h3 { font-size: 0.98rem; font-weight: 800; margin-bottom: 6px; }
.update-group ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.update-group li { font-size: 0.9rem; line-height: 1.5; color: var(--text); }
.update-group li b { color: var(--accent); font-weight: 700; }
.update-warn { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.5; color: #d64545; background: rgba(214,69,69,0.08); border: 1px solid rgba(214,69,69,0.25); border-radius: 8px; padding: 8px 10px; }
.update-warn b { color: #d64545; }
.update-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.update-dont { background: transparent; border: 1px solid var(--border); color: var(--text-dim); padding: 10px 16px; border-radius: 10px; font-family: inherit; font-size: 0.88rem; cursor: pointer; }
.update-dont:hover { border-color: var(--accent); color: var(--text); }
.update-actions .btn-add { padding: 10px 20px; }

/* detail content */
.detail-media { width: 100%; border-radius: 12px; overflow: hidden; margin-bottom: 18px; background: var(--bg-soft); }
.detail-media img { width: 100%; display: block; }
.detail-media iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.detail-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.detail-desc { color: var(--text-dim); margin-bottom: 16px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.detail-tags span { font-size: 0.8rem; background: var(--accent-soft); color: var(--accent); padding: 3px 10px; border-radius: 999px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.detail-open, .detail-download {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  text-decoration: none; cursor: pointer; border: none; font-family: inherit;
}
.detail-open { background: var(--accent); color: #fff; }
.detail-download, .detail-edit { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.detail-download:hover, .detail-edit:hover { border-color: var(--accent); }
.detail-edit { cursor: pointer; font-family: inherit; font-weight: 600; font-size: 0.9rem; padding: 10px 20px; border-radius: 999px; }
.detail-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(180,140,255,0.14); color: #d8b4fe; border: 1px solid rgba(180,140,255,0.3);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; font-family: inherit;
}
.detail-link:hover { border-color: #d8b4fe; }
.field-hint { font-size: 0.74rem; color: var(--text-dim); font-weight: 400; }
.detail-delete {
  margin-left: auto; background: none; border: 1px solid var(--border);
  color: var(--text-dim); padding: 9px 14px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 0.85rem; transition: all 0.15s;
}
.detail-delete:hover { color: #ff8a8a; border-color: #ff8a8a; }
.detail-meta { display: flex; gap: 14px; color: var(--text-dim); font-size: 0.82rem; margin-top: 16px; flex-wrap: wrap; }

/* ---------- 자료 공유 댓글 ---------- */
.detail-comments { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.dc-head { font-size: 0.92rem; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.dc-head #dcCount { color: var(--text-dim); font-weight: 600; }
.dc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.dc-empty { color: var(--text-dim); font-size: 0.86rem; padding: 4px 0; }
.dc-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.dc-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dc-who { font-size: 0.84rem; color: var(--text); }
.dc-when { font-size: 0.73rem; color: var(--text-dim); }
.dc-del { margin-left: auto; font-size: 0.73rem; color: var(--text-dim); background: none; border: none; cursor: pointer; padding: 2px 4px; }
.dc-del:hover { color: #d33; }
.dc-edit { margin-left: auto; font-size: 0.73rem; color: var(--text-dim); background: none; border: none; cursor: pointer; padding: 2px 4px; }
.dc-edit:hover { color: var(--accent); }
.dc-edit ~ .dc-del { margin-left: 0; }   /* 수정 버튼이 있으면 삭제는 바로 옆에 붙임 */
.dc-edit-form { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.dc-edit-form textarea { resize: vertical; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 0.88rem; }
.dc-edit-btns { display: flex; justify-content: flex-end; gap: 6px; }
.dc-edit-cancel { padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--text-dim); font: inherit; font-size: 0.8rem; cursor: pointer; }
.dc-edit-save { padding: 5px 14px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.dc-edit-save:disabled { opacity: 0.5; cursor: default; }
.dc-text { font-size: 0.9rem; color: var(--text); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.dc-form { display: flex; gap: 8px; align-items: flex-end; }
.dc-form textarea { flex: 1; resize: vertical; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 0.88rem; }
.dc-send { flex-shrink: 0; padding: 9px 16px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.dc-send:disabled { opacity: 0.5; cursor: default; }
/* 대댓글(스레드) */
.dc-thread { display: flex; flex-direction: column; gap: 6px; }
.dc-replies { display: flex; flex-direction: column; gap: 6px; margin-left: 20px; }
.dc-replies:empty { display: none; }
.dc-reply-item { position: relative; background: var(--card); }
.dc-reply-item::before { content: "↳"; position: absolute; left: -15px; top: 8px; color: var(--text-dim); font-size: 0.8rem; }
.dc-reply-btn { align-self: flex-start; margin-left: 2px; font-size: 0.76rem; font-weight: 600; color: var(--text-dim); background: none; border: none; cursor: pointer; padding: 2px 4px; }
.dc-reply-btn:hover { color: var(--accent); }
.dc-reply-form { display: flex; flex-direction: column; gap: 6px; margin-left: 20px; }
.dc-reply-form textarea { resize: vertical; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 0.86rem; }
.dc-reply-btns { display: flex; justify-content: flex-end; gap: 6px; }
.dc-reply-btns .dc-send { padding: 6px 14px; font-size: 0.82rem; }
.dc-reply-cancel { padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text-dim); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }

/* 필기 중 댓글 드로어 */
.pdf-comments-btn { margin-left: auto; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pdf-comments-btn + .pdf-comments-btn { margin-left: 0; }   /* 투어·댓글 버튼은 가운데로 벌어지지 않게 우측에 나란히 */
.pdf-tour-btn { padding: 6px 10px; }
.pdf-comments-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pdf-comments-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 86vw); background: var(--card); border-left: 1px solid var(--border); box-shadow: -4px 0 18px rgba(0,0,0,.14); display: flex; flex-direction: column; z-index: 50; }
.pdf-cd-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.95rem; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.pdf-cd-head #pdfcCount { color: var(--text-dim); font-weight: 600; }
.pdf-cd-x { margin-left: auto; background: none; border: none; font-size: 1.15rem; line-height: 1; cursor: pointer; color: var(--text-dim); padding: 0 4px; }
.pdf-comments-drawer .dc-list { flex: 1; overflow-y: auto; padding: 12px 14px; margin: 0; }
.pdf-comments-drawer .dc-form { padding: 10px 14px; border-top: 1px solid var(--border); background: var(--card); }

/* ---------- Add form ---------- */
.add-form { display: flex; flex-direction: column; gap: 14px; }
.add-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; color: var(--text-dim); }
.add-form input, .add-form textarea, .add-form select {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 0.92rem; outline: none;
  transition: border-color 0.15s;
}
.add-form input:focus, .add-form textarea:focus, .add-form select:focus { border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.btn-ghost {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 9px 16px; font-weight: 500; font-size: 0.88rem;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); }
.hint { font-size: 0.78rem; color: var(--text-dim); line-height: 1.5; margin-top: 4px; }
.hint code { background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; font-size: 0.82em; }

/* dropzone */
.dropzone {
  border: 1.5px dashed var(--border); border-radius: 12px;
  padding: 22px 16px; text-align: center; cursor: pointer;
  background: var(--bg-soft); transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-inner { display: flex; flex-direction: column; gap: 4px; align-items: center; pointer-events: none; }
.dz-icon { font-size: 1.5rem; color: var(--accent); }
.dz-text { font-size: 0.9rem; color: var(--text); }
.dz-hint { font-size: 0.75rem; color: var(--text-dim); }
.hwp-upload-hint { margin: 10px 0 2px; font-size: 0.8rem; line-height: 1.5; color: #d64545; background: rgba(214,69,69,0.08); border: 1px solid rgba(214,69,69,0.25); border-radius: 8px; padding: 8px 10px; }
.edit-file-row { background: var(--surface-2, rgba(0,0,0,0.03)); border: 1px dashed var(--border, #ccc); border-radius: 8px; padding: 8px 10px; margin-bottom: 4px; }
.edit-file-row > label { margin: 0; }
.edit-cur-file { margin-top: 4px; font-size: 0.78rem; color: var(--text-dim); word-break: break-all; }
.dz-file { display: flex; flex-direction: column; align-items: stretch; gap: 5px; font-size: 0.88rem; color: var(--text); text-align: left; }
.dz-file .remove { color: var(--text-dim); cursor: pointer; font-weight: 700; margin-left: auto; padding: 0 4px; }
.dz-file .remove:hover { color: #dc2626; }
.dz-fitem { display: flex; align-items: center; gap: 8px; background: var(--chip-bg, rgba(127,127,127,0.1)); border-radius: 8px; padding: 6px 10px; }
.dz-fitem small { color: var(--text-dim); }
.dz-fmore { font-size: 0.78rem; color: var(--accent); font-weight: 600; text-align: center; margin-top: 2px; }
.dz-fwarn { font-size: 0.78rem; color: #c0392b; font-weight: 600; line-height: 1.5; background: rgba(192,57,43,0.08); border-radius: 8px; padding: 7px 10px; margin-top: 4px; }
.chk-row { flex-direction: row !important; align-items: center; gap: 8px; cursor: pointer; }
.chk-row input { width: auto; flex: none; }
.chk-row span { font-weight: 600; }
.chk-row small { font-weight: 400; color: var(--text-dim); }
.lock-badge { font-size: 0.85em; }
.detail-private-note { background: var(--chip-bg, rgba(127,127,127,0.12)); border-radius: 8px; padding: 7px 11px; font-size: 0.84rem; color: var(--text-dim); margin-bottom: 12px; }

.pw-label input { border-color: var(--accent); }

/* progress */
.progress-wrap { display: flex; align-items: center; gap: 10px; }
.progress-bar { flex: 1; height: 7px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.2s; }
.progress-text { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }

.form-msg { font-size: 0.83rem; padding: 9px 12px; border-radius: 9px; }
.form-msg.error { background: rgba(255,90,90,0.14); color: #ff8a8a; }
.form-msg.success { background: rgba(90,220,150,0.14); color: #6ee7a5; }

/* ---------- Home ---------- */
.home { padding-bottom: 80px; }
.home-hero {
  text-align: center; padding: 56px 24px 40px;
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  border-radius: 18px; margin: 24px 0 32px; border: 1px solid var(--border);
}
.home-brand { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin-bottom: 16px; }
.home-logo { height: 44px; width: auto; display: block; }
.home-slogan { font-weight: 800; letter-spacing: 0.01em; color: var(--text-dim); font-size: 1.5rem; line-height: 1; transform: translateY(0.18em); }
.home-slogan:empty { display: none; }   /* 슬로건 미설정 학원은 안 뜸 */
.home-brand .brand-mark { color: var(--accent); }
.home-hero h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; }
.home-sub { color: var(--text-dim); margin-top: 10px; font-size: 1.02rem; }
.home-cta { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.home-cta .btn-add { padding: 12px 26px; font-size: 0.95rem; }
.home-cta .btn-ghost { padding: 12px 22px; }

/* ---------- 홈: 포커스 런처 (시안 C) ---------- */
.home-launch-hero { text-align: center; padding: 40px 20px 6px; }
.home-launch-hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; margin: 12px 0 20px; text-wrap: balance; }
.hero-search { max-width: 560px; margin: 0 auto; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 16px rgba(120,100,70,0.10); color: var(--text-dim); transition: border-color 0.15s, box-shadow 0.15s; }
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 4px 18px rgba(192,57,43,0.16); }
.hero-search svg { flex: none; }
.hero-search input { flex: 1; border: none; background: none; outline: none; font-family: inherit; font-size: 1rem; color: var(--text); min-width: 0; }

.launch-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 26px 0 34px; }
.launch-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 132px; box-sizing: border-box; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 14px; cursor: pointer; font-family: inherit; color: var(--text); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.launch-tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.launch-tile .lt-ic { font-size: 1.7rem; line-height: 1; height: 42px; display: flex; align-items: center; justify-content: center; }
.launch-tile .lt-t { font-weight: 800; font-size: 0.98rem; margin-top: 4px; }
.launch-tile .lt-s { font-size: 0.76rem; color: var(--text-dim); }
.launch-tile.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(192,57,43,0.24); }
.launch-tile.primary .lt-s { color: rgba(255,255,255,0.85); }
.launch-tile.primary:hover { box-shadow: 0 12px 28px rgba(192,57,43,0.32); }

.shortcuts-title { font-size: 1.05rem; font-weight: 800; margin: 6px 0 12px; color: var(--text); }
.menu-grid { margin-bottom: 0; }               /* 메뉴줄 ↔ 링크줄 간격 = 가로 간격(14px) */
.menu-break { display: none; }                 /* 모바일 2단 줄바꿈용(데스크톱=숨김, 그리드 셀 차지 안 함) */
/* 출석 타일이 보일 때(릴리즈/개발자)만 7칸으로 줄여 한 줄에. 데스크톱에서만(모바일은 기존 반응형 유지) */
@media (min-width: 1025px) {
  .menu-grid.cols9 { grid-template-columns: repeat(9, 1fr); gap: 9px; }
  .menu-grid.cols8 { grid-template-columns: repeat(8, 1fr); gap: 10px; }
  .menu-grid.cols7 { grid-template-columns: repeat(7, 1fr); gap: 12px; }
  .menu-grid.cols6 { grid-template-columns: repeat(6, 1fr); }
  .menu-grid.cols5 { grid-template-columns: repeat(5, 1fr); }
  .menu-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
  /* 타일이 많아 한 줄에 좁혀 담을 땐(8·9칸) 패딩·글자 축소해 두 줄로 안 넘기기 */
  .menu-grid.cols8 .launch-tile, .menu-grid.cols9 .launch-tile { padding: 16px 8px; min-height: 118px; }
  .menu-grid.cols8 .lt-ic, .menu-grid.cols9 .lt-ic { font-size: 1.5rem; height: 36px; }
  .menu-grid.cols8 .lt-t, .menu-grid.cols9 .lt-t { font-size: 0.87rem; }
  .menu-grid.cols8 .lt-s, .menu-grid.cols9 .lt-s { font-size: 0.7rem; }
}
.shortcut-grid { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; margin-top: 8px; padding: 6px 2px 10px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }   /* 바로가기=작은 한 줄, 많으면 가로 스크롤(줄바꿈 X). 상하 여백=호버 리프트·그림자 안 잘리게(overflow-x auto는 세로도 clip) */
/* 바로가기 타일이 없어 그리드가 숨겨지면 그 아래 여백이 사라짐 → 출근바에 위 여백 부여(있을 땐 그리드 여백이 담당) */
#shortcutGrid[hidden] + .home-punch { margin-top: 34px; }
#shortcutGrid[hidden] + .home-punch[hidden] + .home-two { margin-top: 34px; }
.launch-tile.shortcut-tile { text-decoration: none; flex: 1 1 0; min-width: 100px; min-height: 100px; padding: 16px 12px; border-radius: 15px; gap: 5px; }   /* 개수 상관없이 전체 폭을 등분(flex-basis 0 + grow 1 → 균등). 많으면 min 100px까지 줄고 넘치면 가로 스크롤 */
.lt-ic.lt-letter { color: var(--fg, #5a4331); font-weight: 900; font-size: 2.4rem; line-height: 1; }
.launch-tile.shortcut-tile { background: var(--bg, var(--card)); }
.launch-tile.shortcut-tile .lt-ic { font-size: 1.6rem; height: 36px; }
.launch-tile.shortcut-tile .lt-ic.lt-letter { font-size: 2rem; }
.launch-tile.shortcut-tile .lt-t { color: var(--fg, var(--text)); font-size: 0.88rem; font-weight: 700; margin-top: 2px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.launch-tile.shortcut-tile.disabled { opacity: 0.5; cursor: default; }
.launch-tile.shortcut-tile.disabled:hover { transform: none; border-color: var(--border); box-shadow: none; }
.shortcut-break { display: none; }             /* 모바일 2층 줄바꿈용(데스크톱=숨김) */
.home-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.home-two .notice-board, .home-two .todo-board { margin-bottom: 32px; }

/* 전달사항 게시판 */
.notice-board {
  background: var(--card); border: 1px solid var(--accent);
  border-radius: 16px; padding: 22px 22px 20px; margin-bottom: 32px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.instant-board { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 32px; }
.instant-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.instant-head h2 { font-size: 1.15rem; }
.instant-sub { font-size: 0.78rem; font-weight: 500; color: var(--text-dim); margin-left: 6px; }
.instant-list { display: flex; flex-direction: column; gap: 10px; }
.instant-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 11px; padding: 11px 14px; flex-wrap: wrap; }
.instant-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.instant-name { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.instant-meta { font-size: 0.76rem; color: var(--text-dim); }
.instant-actions { display: flex; gap: 7px; flex-shrink: 0; }
.instant-open { background: var(--accent); color: #fff; border: none; padding: 8px 13px; border-radius: 8px; font-family: inherit; font-size: 0.83rem; font-weight: 600; cursor: pointer; }
.instant-del { background: none; border: 1px solid var(--border); color: var(--text-dim); padding: 8px 12px; border-radius: 8px; font-family: inherit; font-size: 0.8rem; cursor: pointer; }
.instant-del:hover { color: #d64545; border-color: #d64545; }
.notice-board h2 { font-size: 1.15rem; margin-bottom: 14px; }
.notice-compose { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.notice-compose textarea {
  flex: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font-family: inherit; font-size: 0.92rem; resize: vertical; outline: none;
}
.notice-compose textarea:focus { border-color: var(--accent); }
.notice-compose .btn-add { padding: 11px 20px; white-space: nowrap; }

.notice-list { display: flex; flex-direction: column; gap: 14px; max-height: 440px; overflow-y: auto; padding: 4px; }   /* 사방 4px — 알림 클릭 시 flash-hl 바깥 3px 글로우가 스크롤 컨테이너에 안 잘리게(overflow-y auto는 가로도 clip) */
.notice-empty { color: var(--text-dim); padding: 10px 0; }
.notice {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 15px 16px;
}
.notice.important { background: var(--accent-soft); border-color: var(--accent); }
.notice-pin { display: inline-block; font-size: 0.72rem; font-weight: 800; color: #fff; background: var(--accent); padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }
.notify-sub { color: var(--text-dim); font-weight: 400; }
.notice-content { white-space: pre-wrap; line-height: 1.6; font-size: 0.96rem; margin-bottom: 10px; }
.notice-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.notice-author { font-size: 0.82rem; color: var(--text-dim); }
.notice-actions { display: flex; gap: 8px; }
.notice-read, .notice-del {
  border: 1px solid var(--border); background: none; color: var(--text-dim);
  padding: 5px 13px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 0.8rem; transition: all 0.15s;
}
.notice-read:hover { color: var(--text); border-color: var(--accent); }
.notice-read.done { background: rgba(90,220,150,0.16); color: #6ee7a5; border-color: transparent; font-weight: 600; }
.notice-del:hover { color: #ff8a8a; border-color: #ff8a8a; }
.notice-readers { font-size: 0.78rem; color: var(--text-dim); margin-top: 8px; }

.notice-comments { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.comment { font-size: 0.86rem; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.comment b { color: var(--accent); }
.comment-date { color: var(--text-dim); font-size: 0.74rem; }
.comment-mod { margin-left: auto; display: flex; gap: 4px; }
.comment-edit, .comment-del { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.8rem; padding: 0 3px; }
.comment-edit:hover { color: var(--accent); }
.comment-del:hover { color: #ff8a8a; }
.comment-edit-input {
  flex: 1; background: var(--card); border: 1px solid var(--accent); border-radius: 8px;
  padding: 7px 10px; color: var(--text); font-family: inherit; font-size: 0.85rem; outline: none;
}
.comment-save, .comment-cancel {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 7px 12px; cursor: pointer; font-family: inherit; font-size: 0.8rem;
}
.comment-save { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.comment-cancel:hover { border-color: var(--accent); }
.comment-compose { display: flex; gap: 8px; margin-top: 4px; }
.comment-compose input {
  flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 11px; color: var(--text); font-family: inherit; font-size: 0.85rem; outline: none;
}
.comment-compose input:focus { border-color: var(--accent); }
.comment-post { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: 0.82rem; flex-shrink: 0; white-space: nowrap; }
.comment-post:hover { border-color: var(--accent); }

/* 할 일 (To-Do) */
.todo-board { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px 22px 20px; margin-bottom: 32px; }
.todo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.todo-head h2 { font-size: 1.15rem; }
.todo-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.todo-routine-btn { font-size: 0.82rem; padding: 5px 11px; }
/* 반복 루틴 */
.routine-help { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.routine-form { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.routine-form > input[type="text"] { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.95rem; }
.routine-days { display: flex; gap: 6px; }
.rt-day { flex: 1; padding: 8px 0; border-radius: 9px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); font-family: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.rt-day.sun { color: #d0453b; }
.rt-day.sat { color: #2f6bff; }
.rt-day.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.routine-list { display: flex; flex-direction: column; gap: 8px; }
.routine-empty { color: var(--text-dim); font-size: 0.9rem; text-align: center; padding: 8px; }
.routine-item { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.routine-item-main { flex: 1; min-width: 0; }
.routine-item-text { font-weight: 600; color: var(--text); }
.routine-item-days { font-size: 0.82rem; color: var(--accent); font-weight: 700; white-space: nowrap; }
.routine-del { background: none; border: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.routine-del:hover { color: var(--accent); background: var(--accent-soft); }
.todo-hide { font-size: 0.8rem; color: var(--text-dim); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.todo-hide input { accent-color: var(--accent); }
.todo-compose { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.todo-compose #todoText { width: 100%; }
.todo-compose input { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 0.92rem; outline: none; color-scheme: light; }
.todo-compose input:focus { border-color: var(--accent); }
.todo-compose-row { display: flex; gap: 9px; align-items: stretch; }
.due-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; }
.due-field:focus-within { border-color: var(--accent); }
.due-lbl { font-size: 0.86rem; color: var(--text-dim); white-space: nowrap; flex: none; }
/* 네이티브 날짜 입력을 완전히 투명(opacity:0)으로 → '연도.월.일'/값/아이콘 전부 숨김. 오버레이(date-ph)가 yy.mm.dd·실제날짜 표시 */
.due-field input[type="date"] { border: none; background: none; padding: 10px 0; width: 100%; font-size: 0.92rem; color-scheme: light; opacity: 0; cursor: pointer; }
.date-box { position: relative; flex: 1; min-width: 0; display: flex; }
.date-box .date-ph { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 0.92rem; pointer-events: none; }
.date-box .date-ph.has-val { color: var(--text); }
.todo-compose-row .btn-add { padding: 10px 20px; white-space: nowrap; flex: none; }

.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-empty { color: var(--text-dim); padding: 8px 0; }
.todo { display: flex; align-items: flex-start; gap: 11px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; }
.todo-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.todo-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.todo-text { font-size: 0.94rem; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.todo.done .todo-text { text-decoration: line-through; color: var(--text-dim); }
.todo-due { font-size: 0.75rem; color: var(--text-dim); background: var(--card); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.todo-due.overdue { color: #ff8a8a; border-color: #ff8a8a; font-weight: 600; }
.todo-due.none { opacity: 0.55; }
.todo.done .todo-due { opacity: 0.5; }
.todo-actions { display: flex; gap: 4px; flex-shrink: 0; margin-left: auto; }
.todo-edit, .todo-del { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.85rem; padding: 0 3px; }
.todo-edit:hover { color: var(--accent); }
.todo-del:hover { color: #ff8a8a; }
.todo-dismiss { background: none; border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; font-size: 0.74rem; padding: 3px 9px; border-radius: 999px; white-space: nowrap; font-family: inherit; }
.todo-dismiss:hover { border-color: var(--accent); color: var(--text); }
.todo-from { font-size: 0.74rem; color: var(--text-dim); background: var(--bg-soft); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.todo-prog { font-size: 0.72rem; font-weight: 700; color: #12a150; background: rgba(18,161,80,0.10); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
/* 숨긴 할 일 다시보기 */
.todo-hidden-wrap { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 8px; }
.todo-hidden-title { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); }
.todo-hidden-empty { font-size: 0.88rem; color: var(--text-dim); }
.todo-hidden-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.todo-hidden-text { flex: 1; min-width: 0; color: var(--text-dim); }
.todo-hidden-text.done { text-decoration: line-through; opacity: 0.7; }
.todo-unhide { background: none; border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; font-size: 0.76rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-family: inherit; }
.todo-unhide:hover { border-color: var(--accent); color: var(--accent); }
.todo-edit-text { flex: 1; background: var(--card); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 10px; color: var(--text); font-family: inherit; font-size: 0.9rem; outline: none; }
.todo-edit-due { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px; color: var(--text); font-family: inherit; font-size: 0.85rem; color-scheme: light dark; }
.todo-save, .todo-cancel { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-family: inherit; font-size: 0.8rem; }
.todo-save { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.todo-cancel:hover { border-color: var(--accent); }

.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 36px; }
.stat-tile { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px; text-align: center; }
.stat-num { font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1.1; min-height: 2.1rem; display: flex; align-items: center; justify-content: center; }
.stat-label { font-size: 0.82rem; color: var(--text-dim); margin-top: 6px; }

.home-section { margin-bottom: 34px; }
.home-section h2 { font-size: 1.15rem; margin-bottom: 14px; }
.home-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.home-section-head h2 { margin-bottom: 0; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-family: inherit; font-size: 0.88rem; }

.home-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shortcut-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; cursor: pointer; font-family: inherit; text-align: left; transition: all 0.15s;
}
.shortcut-card:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--card-hover); }
.shortcut-title { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.shortcut-count { font-size: 0.8rem; color: var(--text-dim); }
#gradeShortcuts .chip b { color: var(--accent); margin-left: 3px; }
.home-empty { color: var(--text-dim); padding: 30px 0; }

@media (max-width: 1024px) {
  .launch-grid { grid-template-columns: repeat(3, 1fr); }   /* 태블릿: 3개씩 2줄 */
}
@media (max-width: 760px) {
  .home-two { grid-template-columns: minmax(0, 1fr); gap: 0; }   /* minmax(0,…): 좁은 폰에서 트랙이 내용보다 넓어지지 않게(오버플로우 방지) */
  .home-two > section { min-width: 0; }
  .home-two .notice-board, .home-two .todo-board { margin-bottom: 22px; }
  .launch-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  .home-hero h1 { font-size: 1.8rem; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  /* 전달사항·할 일 보드: 모바일 압축(패딩·폰트·여백↓, 다른 섹션과 크기 맞춤) */
  .notice-board, .todo-board { padding: 15px 15px 13px; border-radius: 13px; }
  .notice-board { box-shadow: 0 0 0 2px var(--accent-soft); }
  .notice-board h2, .todo-head h2 { font-size: 1.02rem; margin-bottom: 11px; }
  .notice-compose { gap: 8px; margin-bottom: 11px; }
  .notice-compose .btn-add, .todo-compose-row .btn-add { padding: 10px 14px; }
  .notice-list { max-height: 340px; gap: 10px; }
  .notice { padding: 12px 13px; }
  .notice-content { font-size: 0.9rem; }
  .notify-check { font-size: 0.78rem; margin: 2px 0 8px; }
  .scope-row { margin: 6px 0 2px; }
  .todo-head { flex-wrap: wrap; gap: 8px; }
  .todo-head-right { width: 100%; }
  .todo-routine-btn { font-size: 0.78rem; padding: 5px 9px; }
  .todo-compose { gap: 8px; margin-bottom: 11px; }
  .todo { padding: 10px 12px; }
  /* 폰: 타일 축소. 메뉴는 규칙대로(--mcols=아랫줄 수, JS): ≤4=1단, 초과 짝수=절반 2단, 초과 홀수=2단(아랫줄 1개↑, 윗줄 가운데정렬). 부제 숨김. */
  .launch-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 16px 0 20px; }
  .menu-grid { display: flex; flex-wrap: wrap; gap: 0 6px; grid-template-columns: none; }   /* 좌우 간격 6px, 줄 간격은 줄바꿈 요소 높이로 */
  /* 각 줄을 꽉 채움(grow) → 윗줄도 양옆 여백 없이. 윗줄(개수 적음)은 타일이 조금 더 넓어짐. basis는 줄바꿈 기준. */
  .menu-grid > .launch-tile { flex: 1 1 calc((100% - (var(--mcols, 4) - 1) * 6px) / var(--mcols, 4)); }
  .menu-break { display: block; flex: 0 0 100%; height: 6px; margin: 0; }   /* 줄 간격 = 좌우 간격(6px) */
  .launch-tile { min-height: 0; padding: 11px 5px; border-radius: 12px; gap: 2px; }
  .launch-tile .lt-ic { font-size: 1.3rem; height: 28px; }
  .launch-tile .lt-t { font-size: 0.72rem; margin-top: 2px; line-height: 1.12; word-break: keep-all; }
  .launch-tile .lt-s { display: none; }
  .lt-ic.lt-letter { font-size: 1.55rem; }
  /* 모바일: 바로가기 타일도 메뉴처럼 크기 줄여 2층 배열(--scols=아랫줄 수, JS). 가로 스크롤 X */
  .shortcut-grid { margin-top: 10px; flex-wrap: wrap; overflow-x: visible; gap: 0 6px; padding: 2px 2px 4px; }
  .shortcut-grid > .shortcut-tile { flex: 1 1 calc((100% - (var(--scols, 4) - 1) * 6px) / var(--scols, 4)); }
  .shortcut-break { display: block; flex: 0 0 100%; height: 6px; margin: 0; }
  .launch-tile.shortcut-tile { min-width: 0; max-width: none; min-height: 0; padding: 11px 6px; border-radius: 12px; gap: 2px; }
  .launch-tile.shortcut-tile .lt-ic { font-size: 1.3rem; height: 28px; }
  .launch-tile.shortcut-tile .lt-ic.lt-letter { font-size: 1.55rem; }
  .launch-tile.shortcut-tile .lt-t { font-size: 0.72rem; margin-top: 2px; }
}

/* ---------- Auth screen ---------- */
.auth-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 360px; background: var(--card);
  border: 1px solid var(--border); border-radius: 18px; padding: 34px 30px;
  box-shadow: var(--shadow);
}
.auth-brand { text-align: center; font-weight: 700; letter-spacing: 0.08em; font-size: 1.2rem; margin-bottom: 22px; }
.auth-brand .brand-mark { color: var(--accent); }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-soft); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; background: none; border: none; color: var(--text-dim);
  padding: 9px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 0.9rem; transition: all 0.15s;
}
.auth-tab.active { background: var(--card-hover); color: var(--text); font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px; color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none;
  transition: border-color 0.15s;
}
.auth-form input:focus { border-color: var(--accent); }
.auth-remember { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; color: var(--text-dim); cursor: pointer; margin: -2px 2px 2px; }
.auth-remember input { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-submit { justify-content: center; padding: 12px; margin-top: 4px; }
.auth-note { font-size: 0.78rem; color: var(--text-dim); text-align: center; line-height: 1.5; }
.auth-msg { margin-top: 14px; font-size: 0.85rem; padding: 10px 12px; border-radius: 9px; text-align: center; }
.auth-msg.error { background: rgba(255,90,90,0.14); color: #ff8a8a; }
.auth-msg.success { background: rgba(90,220,150,0.14); color: #6ee7a5; }

/* 당겨서 새로고침 인디케이터 */
.ptr { position: fixed; top: -4px; left: 50%; transform: translateX(-50%); z-index: 90; width: 40px; height: 40px; border-radius: 50%; background: var(--card, #fff); box-shadow: 0 4px 14px rgba(0,0,0,0.18); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; }
.ptr .ptr-spin { font-size: 1.35rem; color: var(--accent); line-height: 1; }
.ptr.ptr-ready { box-shadow: 0 4px 16px rgba(0,0,0,0.28); }
.ptr.ptr-ready .ptr-spin { color: var(--accent); font-weight: 700; }
.ptr.ptr-anim { transition: transform 0.25s ease, opacity 0.25s ease; }
.ptr.ptr-loading .ptr-spin { animation: ptr-rotate 0.7s linear infinite; }
@keyframes ptr-rotate { to { transform: rotate(360deg); } }

/* ---------- Header user chip ---------- */
.header-btn { white-space: nowrap; }
.btn-add, .header-btn, .user-menu, .user-menu button { white-space: nowrap; }
.header-nav { display: contents; }   /* 데스크톱: 래퍼 없이 버튼들이 헤더에 그대로(기존 레이아웃 유지) */
.hdr-menu-toggle { display: none; }  /* 데스크톱: 햄버거 숨김(네비 항상 표시) */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px;
  background: #ff5a5a; color: #fff; font-size: 0.72rem; font-weight: 700;
  border-radius: 999px; line-height: 1;
}
.user-menu { position: relative; flex-shrink: 0; }
.user-menu-btn {
  display: flex; align-items: center; gap: 6px; background: var(--bg-soft);
  border: 1px solid var(--border); color: var(--text); padding: 7px 14px;
  border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 0.86rem;
  font-weight: 600; white-space: nowrap; transition: border-color 0.15s;
}
.user-menu-btn:hover { border-color: var(--accent); }
.user-menu-btn .chev { color: var(--text-dim); font-size: 0.7rem; }
.user-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  min-width: 160px; z-index: 30;
}
.user-dropdown button {
  background: none; border: none; color: var(--text); text-align: left;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; font-family: inherit;
  font-size: 0.88rem; white-space: nowrap; transition: background 0.15s;
}
.user-dropdown button:hover { background: var(--bg-soft); }

/* ---------- 캘린더 ---------- */
.calendar-page { padding-top: 28px; }
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.cal-nav h1 { font-size: 1.6rem; font-weight: 700; min-width: 150px; text-align: center; }
.cal-arrow { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 0.9rem; transition: all 0.15s; }
.cal-arrow:hover { border-color: var(--accent); color: var(--accent); }
.cal-nav .btn-ghost { margin-left: 6px; padding: 8px 16px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin-bottom: 4px; border-left: 1px solid transparent; box-sizing: border-box; }
.cal-weekdays span { text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); padding: 4px 0; }
.cal-weekdays .sun { color: #ff8a8a; }
.cal-weekdays .sat { color: #7c9cff; }
/* 날짜칸이 격자로 쭉 연결된 모양: 셀 사이 여백 없이 테두리를 공유 */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 96px; gap: 0; background: var(--card); border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-cell { height: 96px; min-height: 0; background: var(--card); border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; padding: 7px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: background 0.15s; overflow: visible; position: relative; box-sizing: border-box; }
.cal-evs { min-height: 0; }
.cal-cell:not(.empty):hover { background: var(--card-hover); }
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); z-index: 1; }
.cal-daynum { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.cal-daynum { white-space: nowrap; overflow: hidden; }
.cal-daynum.sun { color: #ff8a8a; }
.cal-daynum.holi { color: var(--accent); }
.cal-holi { font-size: 0.62rem; font-weight: 700; color: var(--accent); margin-left: 4px; }
.cal-exam { font-size: 0.62rem; font-weight: 800; color: #fff; background: #3a6ea5; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.cal-daynum.sat { color: #7c9cff; }
.cal-cell.today .cal-daynum { color: var(--accent); }
.cal-evs { display: flex; flex-direction: column; gap: 3px; overflow: visible; min-width: 0; }
.cal-ev { font-size: 0.72rem; background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cal-ev b { font-weight: 700; }
.cal-ev-meeting { background: rgba(180,140,255,0.16); color: #d8b4fe; }
.cal-ev-todo { background: rgba(90,220,150,0.14); color: #6ee7a5; }
.cal-ev-todo.done { text-decoration: line-through; opacity: 0.6; }
.cal-ev-makeup { background: rgba(245,130,11,0.16); color: #b8620a; font-weight: 600; }
.cal-ev-makeup.done { text-decoration: line-through; opacity: 0.6; }
/* ---------- 보충일정 ---------- */
.day-extra-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-mk-add { font-size: 0.8rem; padding: 6px 12px; }
.day-makeup { background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid #f5820b; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.day-makeup.done { border-left-color: #12a150; opacity: 0.85; }
.day-makeup-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.day-makeup-meta { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.mk-subj { font-size: 0.72rem; font-weight: 800; color: #2b2723; background: var(--sc, var(--text-dim)); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.day-makeup-acts { display: flex; align-items: center; gap: 4px; }
.mk-allbtn { background: none; border: 1px solid var(--border); color: var(--text-dim); font-family: inherit; font-size: 0.74rem; padding: 4px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.mk-allbtn:hover { border-color: var(--accent); color: var(--accent); }
.mk-edit, .mk-del { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.85rem; padding: 0 3px; }
.mk-edit:hover { color: var(--accent); } .mk-del:hover { color: #ff8a8a; }
.day-makeup-reason { font-size: 0.85rem; color: var(--text-dim); margin: 5px 0; }
.mk-students { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mk-stustat { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border: 1px solid var(--border); padding: 6px 10px; border-radius: 9px; }
.mk-stustat.done { border-color: #12a150; background: rgba(18,161,80,0.07); }
.mk-stustat.absent { border-color: #dc2626; background: rgba(220,38,38,0.06); }
.mk-stu-name { font-size: 0.86rem; font-weight: 600; color: var(--text); min-width: 0; }
.mk-stustat.done .mk-stu-name { color: #12a150; }
.mk-stustat.absent .mk-stu-name { color: #dc2626; }
.mk-absent-reason { font-weight: 400; color: var(--text-dim); }
.mk-stu-btns { display: flex; gap: 5px; flex-shrink: 0; }
.mk-done-btn, .mk-absent-btn { font-family: inherit; font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-dim); cursor: pointer; white-space: nowrap; }
.mk-done-btn:hover, .mk-stustat.done .mk-done-btn { background: #12a150; border-color: #12a150; color: #fff; }
.mk-absent-btn:hover, .mk-stustat.absent .mk-absent-btn { background: #dc2626; border-color: #dc2626; color: #fff; }
.mk-hist-status.absent { color: #dc2626; background: rgba(220,38,38,0.12); }
/* 보충 폼 */
.makeup-form { display: flex; flex-direction: column; gap: 12px; }
.makeup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.makeup-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); flex: 1; min-width: 130px; }
.makeup-field input, .makeup-field select { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.92rem; font-weight: 400; color-scheme: light; }
.makeup-students { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.makeup-students-label { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.mk-selcount { color: var(--accent); font-weight: 800; }
.makeup-students > input { padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; }
.mk-student-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; }
.mk-hint { font-size: 0.85rem; color: var(--text-dim); }
.mk-selall { flex-basis: 100%; text-align: left; background: none; border: 1px dashed var(--accent); color: var(--accent); font-family: inherit; font-size: 0.8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.mk-stu { background: var(--card); border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: 0.85rem; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.mk-stu.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mk-stu-g { font-size: 0.72rem; opacity: 0.7; }
.mk-stu.active .mk-stu-g { opacity: 0.9; }
.mk-selected { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-selchip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); padding: 3px 5px 3px 9px; border-radius: 999px; }
.mk-selchip button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.85rem; line-height: 1; padding: 0 2px; }
.makeup-actions { display: flex; gap: 8px; margin-top: 4px; }
.mk-conflict { background: rgba(220,38,38,0.09); border: 1.5px solid #dc2626; border-radius: 10px; padding: 12px 14px; }
.mk-conflict-title { font-weight: 800; color: #dc2626; margin-bottom: 6px; }
.mk-conflict-list { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.mk-conflict-item { font-size: 0.88rem; color: #dc2626; font-weight: 600; }
.mk-conflict-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-conflict-force { background: #dc2626; border-color: #dc2626; }
.mk-conflict-force:hover { background: #b91c1c; }
/* 학생관리 보충 이력 */
.makeup-history { display: flex; flex-direction: column; gap: 6px; }
.mk-hist-empty { font-size: 0.9rem; color: var(--text-dim); }
.mk-hist-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.mk-hist-item.done { background: rgba(18,161,80,0.06); }
.mk-hist-date { font-size: 0.82rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.mk-hist-reason { flex: 1; min-width: 0; font-size: 0.9rem; }
.mk-hist-teacher { font-size: 0.8rem; color: var(--text-dim); }
.mk-hist-status { font-size: 0.78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.mk-hist-status.done { color: #12a150; background: rgba(18,161,80,0.12); }
.mk-hist-status.pending { color: #b8620a; background: rgba(245,130,11,0.12); }
/* 보충 탭(별도 뷰) */
.mkpage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.mkpage-head .tt-title { margin: 0; }
.mkpage-filters { display: flex; gap: 6px; margin-bottom: 16px; }
.mk-tab { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim); font-family: inherit; font-size: 0.85rem; font-weight: 600; padding: 7px 16px; border-radius: 999px; cursor: pointer; }
.mk-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mkpage-subjfilters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.mk-subjtab { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim); font-family: inherit; font-size: 0.8rem; font-weight: 700; padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.mk-subjtab.active { background: var(--sc, var(--accent)); color: #2b2723; border-color: var(--sc, var(--accent)); }
.mk-subjtab[data-mksubj="all"].active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mkpage-list { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.mkpage-date { font-size: 0.95rem; font-weight: 800; color: var(--text); padding-bottom: 6px; border-bottom: 2px solid var(--accent-soft); }
.mkpage-empty { color: var(--text-dim); }
/* 기간(여러 날) 일정: 셀 폭을 꽉 채운 채색 막대로 날짜에 걸쳐 연결되게 */
/* 여러 날 일정 막대: 칸 경계 테두리(1px)까지 덮고 격자선 위로 올려 끊김 없이 연결 */
.cal-ev-range { background: var(--accent); color: #fff; border-radius: 0; margin: 0 -9px; padding-left: 9px; padding-right: 9px; position: relative; z-index: 2; }
.cal-ev-range b { color: #fff; }
.cal-ev-range.r-start { margin-left: 0; padding-left: 6px; border-radius: 5px 0 0 5px; }
.cal-ev-range.r-end { margin-right: 0; padding-right: 6px; border-radius: 0 5px 5px 0; }
/* 과목 색 일정 (파스텔 바탕 + 진한 글씨) */
.cal-ev.subj { background: var(--sc); color: #2b2723; }
.cal-ev.subj b { color: #2b2723; }
.cal-ev-range.subj { background: var(--sc); color: #2b2723; }
.cal-ev-range.subj b { color: #2b2723; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.cal-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--text-dim); }
.cal-legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.18); }
.day-event.subj { border-left: 5px solid var(--sc); }
.day-event-subj { font-size: 0.7rem; font-weight: 800; color: #2b2723; background: var(--sc); padding: 1px 7px; border-radius: 5px; }
.event-subj-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-dim); }
.event-subj-row select { flex: 0 0 auto; }

/* 공유 범위 칩 선택기 */
.scope-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.scope-label { font-size: 0.8rem; color: var(--text-dim); font-weight: 700; }
.scope-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.scope-chip {
  font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-dim); border: 1px solid var(--border); font-family: inherit;
}
.scope-chip.active { color: #2b2723; background: var(--sc, var(--accent)); border-color: var(--sc, var(--accent)); }
.scope-chip.mine.active, .scope-chip.all.active { color: #fff; background: var(--text-dim); border-color: var(--text-dim); }
.scope-chip.leads.active { color: #fff; background: #6b4f2e; border-color: #6b4f2e; }
/* 목록에 붙는 범위 태그 */
.scope-tag { font-size: 0.68rem; font-weight: 800; color: #2b2723; background: var(--sc, var(--text-dim)); padding: 1px 7px; border-radius: 5px; margin-left: 4px; }
.scope-tag.mine { background: var(--border); color: var(--text-dim); }
.scope-tag.all { background: var(--text-dim); color: #fff; }
.scope-tag.leads { background: #6b4f2e; color: #fff; }
.scope-tag.personal { background: var(--accent); color: #fff; }
/* 전달사항 개인 지정 사람 선택 */
.notice-people { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; }
.notice-people-empty { font-size: 0.8rem; color: var(--text-dim); }
.person-chip {
  font-size: 0.78rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-dim); border: 1px solid var(--border); font-family: inherit;
}
.person-chip.active { color: #fff; background: var(--accent); border-color: var(--accent); }
/* 학습 히스토리 */
.counsel-learning { margin-top: 26px; }
.lh-form { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.lh-form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.lh-form-row input, .lh-form-row select { font-family: inherit; font-size: 0.95rem; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); min-width: 0; max-width: 100%; }
.lh-form-row #lhUnit { flex: 1; min-width: 150px; }
.lh-form-row #lhDetail { flex: 2; min-width: 180px; }
.lh-wsep { color: var(--text-dim); }
.lh-bulk-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; color: var(--text-dim); cursor: pointer; }
.lh-bulk-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.lh-bulk-list { margin-top: 10px; padding: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.lh-bulk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lh-bulk-students { display: flex; flex-wrap: wrap; gap: 6px 16px; max-height: 150px; overflow-y: auto; }
.lh-bulk-count { margin-top: 8px; font-size: 0.85rem; color: var(--text-dim); }
.lh-bulk-count b { color: var(--accent); }
.lh-bulk-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; cursor: pointer; }
.lh-bulk-item input { width: 16px; height: 16px; accent-color: var(--accent); }
.lh-bulk-empty { font-size: 0.88rem; color: var(--text-dim); }
.lh-bulk-bar { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.lh-bulk-bar .lh-bulk-count { margin-top: 0; }
.lh-bulk-selall { font-size: 0.78rem; font-weight: 700; padding: 4px 13px; border: 1px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent); cursor: pointer; font-family: inherit; flex: none; }
.lh-bulk-selall:hover { background: var(--accent-soft); }
/* 같은 교재·단원 일괄 모달 */
.lmm-sub { font-size: 0.88rem; color: var(--text-dim); line-height: 1.45; margin-bottom: 12px; }
.lmm-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lmm-bar .lh-bulk-count { margin-top: 0; }
.lmm-roster { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px 2px; }
#lmmConfirm.danger { background: var(--accent); }
.lh-per-lbl { font-size: 0.9rem; font-weight: 700; color: var(--text-dim); }
/* 학습 검색 */
.learn-search { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 12px 0; }
.ls-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ls-filters select, .ls-filters input { font-family: inherit; font-size: 0.92rem; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); }
.ls-filters #lsLegend { min-width: 120px; }
.ls-count { font-size: 0.85rem; color: var(--text-dim); margin: 12px 0 8px; }
.ls-count b { color: var(--accent); }
.ls-results { margin-top: 4px; }
.ls-empty { color: var(--text-dim); font-size: 0.9rem; padding: 14px 2px; }
.ls-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s; }
.ls-card:hover { border-color: var(--accent); }
.ls-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ls-name { font-weight: 800; color: var(--text); }
.ls-grade { font-size: 0.8rem; color: var(--text-dim); }
.ls-subj { font-size: 0.75rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.ls-card-body { font-size: 0.9rem; color: var(--text); margin-bottom: 4px; }
.ls-book { font-weight: 700; }
.ls-card-detail { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.88rem; color: var(--text-dim); }
.ls-stampwrap { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lh-newbook { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; padding: 12px; background: var(--card); border: 1px dashed var(--border); border-radius: 10px; }
.lh-newbook input[type="text"] { flex: 1; min-width: 160px; font-family: inherit; font-size: 0.95rem; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); }
/* 스탬프 동그라미 + 범례 */
.lh-dots { display: inline-flex; gap: 3px; vertical-align: middle; flex-shrink: 0; }
.lh-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; display: inline-block; }
.lh-dot.on { background: var(--accent); }
.lh-dots[data-lh] { cursor: pointer; }
.lh-stamp-edit { display: inline-flex; gap: 5px; padding: 6px 4px; cursor: pointer; }
.lh-stamp-edit .lh-dot { width: 17px; height: 17px; }
.lh-form-row #lhLegend { min-width: 110px; max-width: 150px; }
/* 과목별 표 분리 */
.lh-subj-section { margin-bottom: 22px; }
.lh-subj-head { font-size: 1.05rem; font-weight: 800; color: var(--accent); margin: 0 0 8px; padding-left: 2px; }
/* 건별 스탬프 + 범례 */
.lh-stampwrap { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.lh-leg { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; text-align: center; }
/* 표 */
.lh-table-wrap { overflow-x: auto; }
.lh-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.lh-table th, .lh-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: middle; }
.lh-table thead th { background: var(--bg-soft); font-weight: 800; color: var(--text-dim); font-size: 0.85rem; }
.lh-c-book { width: 170px; } .lh-c-period { width: 90px; } .lh-c-unit { width: 160px; } .lh-c-act { width: 62px; }
.lh-book-cell { background: var(--card); vertical-align: middle; }
.lh-book { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.lh-cover { width: 130px; height: 174px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.lh-nocover { display: flex; align-items: center; justify-content: center; background: var(--bg-soft); font-size: 2.6rem; }
.lh-book-title { font-weight: 700; font-size: 0.9rem; line-height: 1.35; }
.lh-period { color: var(--text-dim); white-space: nowrap; vertical-align: middle; }
.lh-table td.lh-unit { vertical-align: middle; }
.lh-detail-cell { vertical-align: middle; }
.lh-detail-inner { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.lh-detail-txt { flex: 1; }
.lh-act { white-space: nowrap; text-align: center; }
.lh-edit, .lh-del { background: none; border: none; cursor: pointer; font-size: 0.9rem; color: var(--text-dim); padding: 3px 5px; border-radius: 6px; }
.lh-edit:hover { color: var(--text); background: var(--bg-soft); }
.lh-del:hover { color: var(--accent); background: var(--bg-soft); }
.lh-empty { text-align: center; color: var(--text-dim); padding: 18px; }
.cal-more { font-size: 0.7rem; color: var(--text-dim); padding-left: 4px; }
.cal-hint { color: var(--text-dim); font-size: 0.82rem; margin-top: 16px; text-align: center; }

/* 날짜 일정 모달 */
.day-events { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; max-height: 44vh; overflow-y: auto; }
.day-empty { color: var(--text-dim); font-size: 0.88rem; padding: 6px 0; }
.day-event { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.day-event-main { display: flex; align-items: center; gap: 9px; }
.day-event-time { font-size: 0.78rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.day-event-title { font-weight: 600; font-size: 0.95rem; }
.day-event-period { font-size: 0.72rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.day-event-memo { font-size: 0.85rem; color: var(--text-dim); margin-top: 6px; white-space: pre-wrap; }
.day-event-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.day-event-author { font-size: 0.75rem; color: var(--text-dim); }
.day-event-actions { display: flex; gap: 6px; }
.day-event-actions button { background: none; border: 1px solid var(--border); color: var(--text-dim); padding: 3px 10px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 0.76rem; transition: all 0.15s; }
.day-event-edit:hover { color: var(--accent); border-color: var(--accent); }
.day-event-del:hover { color: #ff8a8a; border-color: #ff8a8a; }
.event-compose { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--border); padding-top: 16px; }
.event-compose-row { display: flex; gap: 9px; }
.event-compose-row #eventTitle { flex: 1; }
.event-period-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.event-period-label { font-size: 0.85rem; color: var(--text-dim); }
.event-period-label em { font-style: normal; opacity: 0.75; font-size: 0.78rem; }
.event-compose input { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 0.92rem; outline: none; color-scheme: light dark; }
.event-compose input:focus { border-color: var(--accent); }
.event-compose-actions { display: flex; gap: 8px; }

/* 날짜 창의 회의록·할일 연동 섹션 */
.day-extra { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.day-extra-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 9px; color: var(--text-dim); }
.day-link-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; margin-bottom: 6px; font-size: 0.9rem; }
.day-goto { padding: 5px 12px; font-size: 0.8rem; }
.day-todo { display: flex; align-items: center; gap: 9px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; margin-bottom: 6px; font-size: 0.9rem; cursor: pointer; }
.day-todo input { accent-color: var(--accent); width: 17px; height: 17px; }
.day-todo.done span { text-decoration: line-through; color: var(--text-dim); }

@media (max-width: 680px) {
  .cal-grid { grid-auto-rows: 68px; }
  .cal-cell { height: 68px; padding: 5px; }
  .cal-daynum { font-size: 0.75rem; }
  .cal-ev { font-size: 0.62rem; padding: 1px 4px; }
  .cal-nav h1 { font-size: 1.3rem; min-width: 110px; }
}

/* ---------- 회의록 게시판 ---------- */
.meetings-page { padding-top: 0; }
.meetings-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.meetings-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }   /* 새 회의록·둘러보기 버튼 묶어 우측 정렬(가운데로 벌어지지 않게) */
.meetings-top h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.meetings-top .subtitle { color: var(--text-dim); margin-top: 6px; font-size: 0.95rem; }
.meeting-empty { color: var(--text-dim); padding: 40px 0; text-align: center; }

/* 편집기 */
.meeting-editor { display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 8px; }
.meeting-title-input, .meeting-date-input, .meeting-content-input {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font-family: inherit; outline: none; color-scheme: light dark;
}
.meeting-title-input { font-size: 1.15rem; font-weight: 600; }
.meeting-date-input { align-self: flex-start; font-size: 0.9rem; }
.meeting-content-input { font-size: 0.98rem; line-height: 1.6; resize: vertical; min-height: 220px; }
.meeting-title-input:focus, .meeting-date-input:focus, .meeting-content-input:focus { border-color: var(--accent); }
.meeting-editor-actions { display: flex; gap: 10px; }

/* 검색 */
.meeting-search {
  display: flex; align-items: center; gap: 9px; margin-bottom: 16px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 16px; color: var(--text-dim); transition: border-color 0.2s;
}
.meeting-search:focus-within { border-color: var(--accent); }
.meeting-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 0.95rem; font-family: inherit; }
.meeting-search input::placeholder { color: var(--text-dim); }

/* 게시판 목록 */
.meeting-board { display: flex; flex-direction: column; gap: 12px; }
.meeting-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
  cursor: pointer; transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.meeting-card:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--card-hover); }
.meeting-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.meeting-card-title { font-size: 1.12rem; font-weight: 700; }
.meeting-card-date { font-size: 0.82rem; color: var(--accent); font-weight: 600; white-space: nowrap; }
.meeting-card-snippet { color: var(--text-dim); font-size: 0.9rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meeting-card-author { font-size: 0.78rem; color: var(--text-dim); margin-top: 10px; }

/* 게시글 상세 */
.meeting-post { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 30px 32px; }
.meeting-post-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.meeting-post-tools { display: flex; gap: 8px; }
.meeting-post-tools .btn-ghost { padding: 7px 14px; font-size: 0.85rem; }
.meeting-post-tools .danger:hover { color: #ff8a8a; border-color: #ff8a8a; }
.meeting-post-title { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.meeting-post-byline { color: var(--text-dim); font-size: 0.86rem; margin: 12px 0 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.meeting-post-body { white-space: pre-wrap; line-height: 1.8; font-size: 1rem; color: var(--text); }

/* 회의록 첨부파일 */
.meeting-attachments { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.mattach-head { font-size: 0.9rem; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; }
.mattach-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.mattach-empty { color: var(--text-dim); font-size: 0.85rem; }
.mattach { display: flex; align-items: center; gap: 8px; }
.mattach-link { color: var(--accent); text-decoration: none; font-size: 0.9rem; background: var(--bg-soft); border: 1px solid var(--border); padding: 8px 13px; border-radius: 9px; flex: 1; transition: border-color 0.15s; }
.mattach-link:hover { border-color: var(--accent); }
.mattach-del { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 0.8rem; flex-shrink: 0; }
.mattach-del:hover { color: #ff8a8a; border-color: #ff8a8a; }
.mattach-add { padding: 8px 16px; font-size: 0.85rem; }

/* 회의록 댓글 */
.meeting-comments { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.meeting-comments-title { font-size: 1rem; margin-bottom: 14px; }
.mcomment-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.mcomment-empty { color: var(--text-dim); font-size: 0.88rem; }
.mcomment { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; }
.mcomment b { color: var(--accent); }
.mcomment-date { color: var(--text-dim); font-size: 0.75rem; }
.mcomment-mod { margin-left: auto; display: flex; gap: 4px; }
.mcomment-edit, .mcomment-del { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.82rem; padding: 0 3px; }
.mcomment-edit:hover { color: var(--accent); }
.mcomment-del:hover { color: #ff8a8a; }
.mcomment-edit-input { flex: 1; background: var(--card); border: 1px solid var(--accent); border-radius: 8px; padding: 7px 10px; color: var(--text); font-family: inherit; font-size: 0.88rem; outline: none; }
.mcomment-compose { display: flex; gap: 8px; }
.mcomment-input { flex: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; color: var(--text); font-family: inherit; font-size: 0.9rem; outline: none; }
.mcomment-input:focus { border-color: var(--accent); }
.mcomment-post, .mcomment-save, .mcomment-cancel { padding: 8px 14px; font-size: 0.82rem; white-space: nowrap; }

@media (max-width: 680px) {
  .meeting-post { padding: 22px 18px; }
  .meeting-post-title { font-size: 1.35rem; }
}

/* 내 계정 - 닉네임 */
.account-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.account-label { display: block; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 8px; }
.nick-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nick-row #nickInput { flex: 1; min-width: 120px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none; }
.nick-row #nickInput:focus { border-color: var(--accent); }
.nick-row .btn-add { padding: 10px 18px; white-space: nowrap; }
.nick-row select, .nick-pos-row select { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 0.95rem; }
.nick-current { font-size: 0.82rem; color: var(--text-dim); margin-top: 8px; }
.nick-pos-row { display: flex; gap: 10px; }
.nick-pos-row #onboardNick { flex: 1; width: auto; min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.98rem; }
.onboard-preview { font-size: 0.85rem; color: var(--text-dim); margin-top: 8px; min-height: 1.2em; }
.onboard-preview:not(:empty)::before { content: ""; }
.nick-current b { color: var(--accent); }
.account-subtitle { font-size: 1rem; margin-bottom: 14px; }

/* 알림 보내기 체크박스 */
.notify-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-dim); cursor: pointer; margin: 2px 0 10px; }
.notify-check input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ---------- 알림 ---------- */
.notif-btn {
  position: relative; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; width: 40px; height: 40px; cursor: pointer; font-size: 1.05rem;
  transition: border-color 0.15s; flex-shrink: 0;
}
.notif-btn:hover { border-color: var(--accent); }
.notif-btn .badge { position: absolute; top: -4px; right: -4px; }

.alert-list { display: flex; flex-direction: column; gap: 7px; max-height: 60vh; overflow-y: auto; }
.alert-empty { color: var(--text-dim); padding: 20px 0; text-align: center; }
.alert-upcoming { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.alert-up-title { font-weight: 800; color: var(--accent); margin-bottom: 8px; font-size: 0.95rem; }
.alert-up-item { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.alert-up-item + .alert-up-item { border-top: 1px dashed var(--border); }
.alert-up-when { flex-shrink: 0; font-size: 0.75rem; font-weight: 800; color: var(--text-dim); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.alert-up-when.today { color: #fff; background: var(--accent); border-color: var(--accent); }
.alert-up-body { color: var(--text); font-size: 0.92rem; }
.alert-item { display: flex; align-items: flex-start; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.alert-item.unread { border-color: var(--accent); background: var(--accent-soft); }
.alert-item.clickable { cursor: pointer; transition: border-color 0.12s, transform 0.12s; }
.alert-item.clickable:hover { border-color: var(--accent); transform: translateX(2px); }
.alert-go { margin-left: auto; align-self: center; color: var(--text-dim); font-size: 1.3rem; font-weight: 700; }
.alert-upcoming[data-nav] { cursor: pointer; }
.alert-upcoming[data-nav]:hover { background: var(--accent); }
.alert-upcoming[data-nav]:hover .alert-up-title, .alert-upcoming[data-nav]:hover .alert-up-body { color: #fff; }
.alert-icon { font-size: 1.1rem; flex-shrink: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-text { font-size: 0.9rem; }
.alert-text b { color: var(--accent); }
.alert-meta { font-size: 0.74rem; color: var(--text-dim); margin-top: 3px; }

/* ---------- Users list ---------- */
.users-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.user-row {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px;
}
.user-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-row-subj { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-row .u-subj, .user-row .u-subj-note { font-size: 0.76rem; color: var(--text-dim); }
.subj-chip {
  font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-dim); border: 1px solid var(--border); font-family: inherit;
}
.subj-chip.on { color: #2b2723; background: var(--sc); border-color: var(--sc); }
.user-row-roster { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.roster-chip {
  font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-dim); border: 1px solid var(--border); font-family: inherit;
}
.roster-chip.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.roster-chip:disabled { opacity: 0.5; cursor: default; }
.assign-roster { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.assign-roster .ar-head { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; }
.assign-roster .ar-sub { font-size: 0.74rem; font-weight: 400; color: var(--text-dim); margin-left: 4px; }
.assign-roster .ar-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* 팀 선택 칩 (온보딩·계정설정) */
.team-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.team-chip {
  font-size: 0.92rem; font-weight: 700; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text); border: 1.5px solid var(--border); font-family: inherit;
}
.team-chip:hover { border-color: var(--sc); }
.team-chip.on { color: #2b2723; background: var(--sc); border-color: var(--sc); }
/* 온보딩 모달 (닫기 불가) */
.onboard-modal .modal-backdrop { background: rgba(20,16,12,0.6); }
.onboard-card { max-width: 440px; width: 100%; }
.onboard-card h2 { margin-bottom: 6px; }
.onboard-sub { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 20px; line-height: 1.5; }
.onboard-card .account-label { margin-bottom: 8px; }
.onboard-card .req { color: #c0392b; }
#onboardNick { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.98rem; }
.onboard-err { color: #c0392b; font-size: 0.85rem; margin-top: 12px; }
.onboard-submit { width: 100%; margin-top: 20px; padding: 13px; font-size: 1rem; }
.onboard-submit:disabled { opacity: 0.45; cursor: not-allowed; }

/* 과목 필터 칩 (색상) + 카드 과목 뱃지 */
.chip.subj-filter.active[data-subject="all"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.subj-filter.active:not([data-subject="all"]) { background: var(--sc); color: #2b2723; border-color: var(--sc); }
.card-subject { font-weight: 800; color: #2b2723; background: var(--sc); padding: 2px 8px; border-radius: 6px; font-size: 0.72rem; }
.user-row .u-name { font-weight: 600; }
.user-row .u-id { font-size: 0.78rem; color: var(--text-dim); }
.u-badge { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; }
.u-badge.admin { background: var(--accent-soft); color: var(--accent); }
.u-badge.pending { background: rgba(255,180,60,0.16); color: #ffb43c; }
.u-badge.active { background: rgba(90,220,150,0.14); color: #6ee7a5; }
.u-badge.suspended { background: rgba(255,90,90,0.14); color: #ff8a8a; }
.user-row .u-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.user-row .u-actions button {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  padding: 5px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 0.78rem; transition: all 0.15s;
}
.user-row .u-actions button:hover { color: var(--text); border-color: var(--accent); }
.user-row .u-actions button.danger:hover { color: #ff8a8a; border-color: #ff8a8a; }
.user-row .u-actions button.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 30px 24px; text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Responsive ---------- */
/* 아주 좁을 때만(모바일) 검색창을 아래 줄로 */
@media (max-width: 680px) {
  .header-inner { gap: 8px; }
  .search-box { order: 10; width: 100%; flex-basis: 100%; }
  /* 헤더 접기: 기본은 [브랜드] ... [💬][🔔][☰] 만 한 줄. 검색·자료추가·네비·본인계정은 ☰ 안으로. */
  .brand { margin-right: auto; }   /* 브랜드 좌측, 💬🔔☰ 우측 */
  .header-inner > .search-box,
  .header-inner > .btn-add,
  .header-inner > .header-nav,
  .header-inner > .user-menu { display: none; }
  .header-inner.menu-open > .search-box { display: flex; order: 10; width: 100%; flex-basis: 100%; }
  .header-inner.menu-open > .btn-add { display: inline-flex; order: 11; flex-basis: 100%; justify-content: center; }
  .header-inner.menu-open > .header-nav { display: flex; order: 12; width: 100%; flex-basis: 100%; flex-wrap: wrap; gap: 8px; }
  .header-inner.menu-open > .user-menu { display: block; order: 13; width: 100%; flex-basis: 100%; }
  .header-nav .header-btn { flex: 1 1 calc(50% - 4px); text-align: left; }   /* 펼침: 네비 2열 */
  .btn-add .ba-txt { display: inline; }
  .hdr-menu-toggle { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 38px; height: 38px; padding: 0; font-size: 1.15rem; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: var(--text); cursor: pointer; flex-shrink: 0; }
  .hdr-menu-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
  .hdr-menu-toggle .hmt-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--header-bg, #f7f0e1); }
  .intro h1 { font-size: 1.7rem; }
  .form-row { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  /* 자료실 툴바: 폭 넘침 방지 — 유형필터는 전체폭 가로스크롤, 정렬/선택은 아래 줄 */
  .toolbar { gap: 10px; }
  .toolbar-right { width: 100%; justify-content: flex-start; gap: 6px; }
  .type-filter { width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .type-filter::-webkit-scrollbar { display: none; }
  .type-btn { padding: 6px 10px; font-size: 0.8rem; }
  .sort-select { flex: 1 1 auto; min-width: 0; padding: 7px 8px; font-size: 0.8rem; }
  #selectToggle { flex: 0 0 auto; padding: 0 11px; font-size: 0.82rem; }
  #viewToggle { flex: 0 0 auto; }
}

/* 크림/차콜 단일 테마 — 로고 배경색(#f1e8d6)을 사이트 전역 배경으로.
   OS 다크/라이트와 무관하게 항상 동일하게 보이도록 :root 하나로 고정. */

/* ---------- PDF 필기 뷰어 ---------- */
.detail-annotate { background: var(--accent); color: #fff; border: none; padding: 10px 16px; border-radius: 10px; font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.detail-annotate:hover { filter: brightness(1.06); }
.pdf-viewer { position: fixed; inset: 0; z-index: 100; background: #52504b; display: flex; flex-direction: column; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* 뷰어 안은 어떤 것도 선택되지 않게(빠른 두 번째 획이 선택으로 오인되는 것 방지) */
.pdf-viewer, .pdf-viewer * { -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none; }
.pdf-viewer canvas { -webkit-user-drag: none; }
.pdf-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); background: #2b2723; color: #f7f0e1; flex-wrap: wrap; box-shadow: 0 2px 12px rgba(0,0,0,0.35); z-index: 2; }
.pdf-close { background: rgba(255,255,255,0.14); color: #fff; border: none; padding: 8px 14px; border-radius: 8px; font-family: inherit; font-size: 0.88rem; cursor: pointer; white-space: nowrap; }
.pdf-close:hover { background: rgba(255,255,255,0.24); }
.pdf-tools-toggle { background: rgba(255,255,255,0.14); color: #fff; border: none; padding: 8px 12px; border-radius: 8px; font-family: inherit; font-size: 0.84rem; cursor: pointer; white-space: nowrap; }
.pdf-tools-toggle:hover { background: rgba(255,255,255,0.24); }
.pdf-tools-toggle.collapsed { background: rgba(192,57,43,0.85); }
.pdf-name { font-weight: 700; font-size: 0.9rem; max-width: 26vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-page-ind { font-size: 0.78rem; opacity: 0.75; white-space: nowrap; }
.pdf-page-jump { display: flex; align-items: center; gap: 7px; margin: 0; }
.pdf-page-jump input { width: 48px; text-align: center; font-family: inherit; font-size: 0.82rem; font-weight: 700;
  color: #fff; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); border-radius: 7px; padding: 5px 4px; -moz-appearance: textfield; }
.pdf-page-jump input::-webkit-outer-spin-button, .pdf-page-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdf-page-jump input::placeholder { color: rgba(255,255,255,0.55); font-weight: 600; }
.pdf-page-jump input:focus { outline: none; background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); }
.pdf-page-jump button { background: rgba(255,255,255,0.14); color: #fff; border: none; padding: 6px 10px; border-radius: 7px; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pdf-page-jump button:hover { background: rgba(255,255,255,0.26); }
/* 상단 액션(저장·PDF·녹화·비율) */
.pdf-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 본문: 왼쪽 도구 사이드바 + 페이지 */
.pdf-body { flex: 1; display: flex; min-height: 0; position: relative; }
.pdf-tools { flex-shrink: 0; width: 82px; background: #2b2723; overflow-y: auto; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 9px; box-shadow: 2px 0 10px rgba(0,0,0,0.3); z-index: 1; }
.pdf-colors { display: grid; grid-template-columns: repeat(2, 20px); gap: 6px; justify-content: center; }
.pdf-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); cursor: pointer; padding: 0; }
.pdf-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px #2b2723, 0 0 0 3px #fff; }
.pdf-widths { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.pdf-wbtn { width: 20px; height: 20px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.pdf-wbtn .dot { background: #fff; border-radius: 50%; display: block; }
.pdf-wbtn.active { background: rgba(255,255,255,0.3); border-color: #fff; }
/* 펜 굵기 직접 조절 슬라이더 */
.pdf-width-slider { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 4px; }
.pdf-width-dot { background: #fff; border-radius: 50%; display: block; width: 3px; height: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
#pdfWidthSlider { -webkit-appearance: none; appearance: none; width: 100%; max-width: 58px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.28); cursor: pointer; margin: 0; }
#pdfWidthSlider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: none; cursor: pointer; }
#pdfWidthSlider::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: #fff; border: none; cursor: pointer; }
.pdf-tool-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; width: 100%; }
/* 색 더보기(펼치기) */
.pdf-colors-toggle { width: 20px; height: 20px; border-radius: 6px; border: 1px dashed rgba(255,255,255,0.4); background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; font-size: 0.8rem; font-weight: 700; padding: 0; line-height: 1; }
.pdf-colors-toggle:hover { background: rgba(255,255,255,0.2); }
.pdf-colors-more { display: grid; grid-template-columns: repeat(2, 20px); gap: 6px; justify-content: center; }
/* 사이드바 아이콘 버튼 */
.pdf-tool.ptico { width: 100%; height: 32px; padding: 0; font-size: 1rem; border-radius: 7px; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
/* 사이드바 하단 액션(녹화·전환·저장·PDF·비율) */
.pdf-side-actions { display: flex; flex-direction: column; align-items: stretch; gap: 5px; width: 100%; margin-top: 2px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.15); }
.pdf-side-actions .pdf-tool { width: 100%; padding: 6px 3px; font-size: 0.7rem; white-space: nowrap; text-align: center; line-height: 1.1; }

/* 필기 프리셋 */
.pdf-presets { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: 60px; }
.pdf-preset {
  width: 24px; height: 24px; border-radius: 7px; padding: 0; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.pdf-preset .pdf-preset-dot { border-radius: 50%; display: block; }
.pdf-preset.hl .pdf-preset-dot { border-radius: 3px; opacity: 0.55; }
.pdf-preset.dashed { border-style: dashed; }
.pdf-preset-add { color: #fff; font-size: 1.1rem; font-weight: 700; opacity: 0.75; }
.pdf-preset-add:hover { opacity: 1; border-color: #fff; }

.pdf-page-blank { border: 1px dashed rgba(120,120,120,0.5); }
.pdf-tool { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); padding: 7px 11px; border-radius: 8px; font-family: inherit; font-size: 0.82rem; cursor: pointer; white-space: nowrap; }
.pdf-tool:hover { background: rgba(255,255,255,0.2); }
.pdf-tool.active { background: var(--accent); border-color: var(--accent); }
.pdf-pages { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: none; position: relative; }
.pdf-zoom-sizer { position: relative; margin: 0 auto; }
/* will-change는 상시가 아니라 확대/축소 중에만 JS로 켠다(setZoom).
   상시 승격하면 iOS Safari에서 거대 레이어(수십만 px)가 DOM 삽입(빈 페이지 추가) 후
   스크롤과 어긋난 채 고착돼 화면이 엉뚱한 곳으로 튀는 버그가 있다. */
.pdf-zoom { position: absolute; top: 0; left: 0; transform-origin: 0 0; width: max-content; box-sizing: border-box; padding: 18px 12px 64px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pdf-page canvas { transform: translateZ(0); }   /* GPU 합성으로 스크롤 매끄럽게 */
.pdf-zoom-ctl { width: 100%; display: flex; flex-direction: column; align-items: stretch; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: 12px; overflow: hidden; }
.pdf-zoom-ctl button { background: none; border: none; color: #fff; font-family: inherit; cursor: pointer; padding: 6px 0; }
.pdf-zoom-ctl #pdfZoomOut, .pdf-zoom-ctl #pdfZoomIn { font-size: 1.2rem; line-height: 1; }
.pdf-zoom-ctl #pdfZoomLevel { font-size: 0.72rem; font-weight: 700; padding: 5px 0; border-top: 1px solid rgba(255,255,255,0.15); border-bottom: 1px solid rgba(255,255,255,0.15); }
.pdf-zoom-ctl button:hover:not(:disabled) { background: rgba(255,255,255,0.16); }
.pdf-zoom-ctl button:disabled { opacity: 0.35; cursor: default; }
.pdf-lasso-bar { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 6px; background: rgba(43,39,35,0.94); padding: 6px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,0.45); }
.pdf-lasso-bar button { background: rgba(255,255,255,0.12); color: #fff; border: none; padding: 8px 15px; border-radius: 8px; font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.pdf-lasso-bar button:hover { background: rgba(255,255,255,0.22); }
.pdf-lasso-bar button:disabled { opacity: 0.4; cursor: default; }
.pdf-lasso-bar #lassoDelete { color: #ff8a8a; }
.pdf-paste-pop { position: fixed; transform: translate(-50%, -100%); z-index: 120; background: #2b2723; color: #fff; border: 1px solid rgba(255,255,255,0.18); padding: 9px 16px; border-radius: 10px; font-family: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,0.5); white-space: nowrap; }
.pdf-paste-pop:hover { background: #3a352f; }
.pdf-page { position: relative; box-shadow: 0 4px 22px rgba(0,0,0,0.4); background: #fff; }
.pdf-page canvas.pdf-raster { display: block; }
.pdf-page .pdf-raster.hwp-bg { display: block; background: #fff; overflow: hidden; }   /* 한글 배경: 인라인 SVG 컨테이너(흰 바탕) */
.pdf-page .pdf-raster.hwp-bg > svg { display: block; width: 100%; height: 100%; }
.pdf-page canvas.pdf-ink { position: absolute; top: 0; left: 0; touch-action: none; }
.pdf-page canvas.pdf-live-layer { position: absolute; top: 0; left: 0; pointer-events: none; }
.pdf-page canvas.pdf-laser { position: absolute; top: 0; left: 0; pointer-events: none; }
.pdf-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; background: rgba(0,0,0,0.35); z-index: 3; }
.pdf-hint { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; padding: 7px; font-size: 0.72rem; color: rgba(255,255,255,0.7); background: rgba(43,39,35,0.75); pointer-events: none; }
.pdf-hint.pdf-hint-warn { color: #ff6b6b; font-size: 0.76rem; background: rgba(43,39,35,0.9); }   /* 간이보기(rhwp 폴백) 빨간 안내 */
.pdf-hint.pdf-hint-warn b { color: #ff8787; }
.pdf-save { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.35); font-weight: 700; }
.pdf-save:hover { background: rgba(255,255,255,0.3); }
.pdf-dialog { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.45); }
.pdf-dialog-card { background: #fffcf5; color: #2b2723; border-radius: 14px; padding: 22px 22px 18px; width: min(90%, 340px); box-shadow: 0 14px 44px rgba(0,0,0,0.45); text-align: center; }
.pdf-dialog-msg { font-size: 1rem; margin-bottom: 18px; }
.pdf-dialog-actions { display: flex; flex-direction: column; gap: 9px; }
.pdf-dialog-actions button { padding: 12px; border-radius: 10px; font-family: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border); }
.pdf-dg-save { background: var(--accent); color: #fff; border-color: var(--accent); }
.pdf-dg-save:hover { filter: brightness(1.06); }
.pdf-dg-discard { background: #fff; color: #2b2723; }
.pdf-dg-cancel { background: transparent; color: #7c7261; border-color: transparent; }
.pdf-switch-card { width: min(94%, 460px); text-align: left; }
.pdf-switch-top { display: flex; gap: 8px; align-items: center; }
.pdf-switch-top input { flex: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 0.92rem; outline: none; }
.pdf-switch-x { background: none; border: none; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; }
.pdf-switch-hint { font-size: 0.78rem; color: var(--text-dim); margin: 10px 2px 12px; }
.pdf-switch-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.pdf-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; cursor: pointer; }
.pdf-switch-row:hover { border-color: var(--accent); }
.pdf-switch-row .n { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-switch-row .tag { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.pdf-switch-row .tag.inst { background: var(--accent-soft); color: var(--accent); }
.pdf-switch-row .tag.arch { background: rgba(120,120,120,0.16); color: var(--text-dim); }
.pdf-switch-empty { color: var(--text-dim); font-size: 0.85rem; padding: 14px 4px; text-align: center; }
/* 녹화 */
.pdf-rec.active { background: #c0392b; border-color: #c0392b; }
.pdf-rec-ind { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4; background: rgba(0,0,0,0.62); color: #fff; padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; gap: 7px; pointer-events: none; }
.pdf-rec-ind .rdot { width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; animation: recblink 1s steps(2, start) infinite; }
@keyframes recblink { 50% { opacity: 0.25; } }
/* 일시정지 중: 빨간 점 깜빡임 멈추고 노란톤으로 */
.pdf-rec-ind.paused .rdot { background: #f2c94c; animation: none; opacity: 1; }
.pdf-rec-ind.paused { background: rgba(0,0,0,0.72); }
.pdf-rec-pause.resume { background: #c0392b; border-color: #c0392b; }
.pdf-rec-card { width: min(94%, 460px); }
.pdf-rec-card video { width: 100%; max-height: 52vh; border-radius: 10px; background: #000; margin-bottom: 8px; }
.pdf-rec-size { font-weight: 500; font-size: 0.85rem; color: var(--text-dim); }
.rec-audio { font-size: 0.72rem; font-weight: 700; margin-left: 4px; }
.rec-audio.on { color: rgba(255,255,255,0.7); }
.rec-audio.on.live { color: #7CFC9A; }
.rec-audio.off { color: #ffd27c; }
.rec-audio.bad { color: #ff8a8a; animation: recAudioBlink 0.8s steps(1) infinite; }
@keyframes recAudioBlink { 50% { opacity: 0.35; } }
.rec-snd { font-weight: 700; }
.rec-snd.on { color: #12a150; }
.rec-snd.off { color: var(--accent); }
.pdf-rec-hint { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 14px; }
a.pdf-dg-save { display: block; text-decoration: none; text-align: center; }
/* 녹화 결과창 버튼 크게 */
#pdfRecResult .pdf-dialog-actions { gap: 11px; }
#pdfRecResult .pdf-dialog-actions a,
#pdfRecResult .pdf-dialog-actions button { padding: 17px 20px; font-size: 1.08rem; font-weight: 700; border-radius: 12px; }
@media (max-width: 640px) {
  .pdf-name { max-width: 40vw; }
  .pdf-tools { width: 74px; gap: 8px; padding: 7px 5px; }
  .pdf-tool.ptico { height: 30px; font-size: 0.95rem; }
  .pdf-side-actions .pdf-tool { font-size: 0.67rem; padding: 5px 2px; }
}

/* ===== 상담일지 / 특이사항 ===== */
.counsel-head { margin-bottom: 16px; }
.counsel-head h1 { font-size: 1.5rem; margin: 0 0 14px; }
/* 재원/퇴원 탭 */
.counsel-controls { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.counsel-controls > * { margin: 0; }
.counsel-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.counsel-tab { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim); font-family: inherit; font-size: 0.9rem; font-weight: 700; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.counsel-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ctab-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: middle; position: relative; top: -1px; }
.ctab-dot.on { background: #3f9f5e; }
.ctab-dot.off { background: #c0564b; }
.counsel-tab.active .ctab-dot { box-shadow: 0 0 0 2px color-mix(in srgb, #fff 55%, transparent); }
#newRegTitle::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3f9f5e; margin-right: 8px; vertical-align: middle; position: relative; top: -1px; }
.hp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--d, #888); vertical-align: middle; position: relative; top: -1px; }
/* 퇴원 정보 패널 */
.counsel-withdraw { background: var(--card); border: 1px solid var(--border); border-left: 4px solid #dc2626; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.wd-title { font-size: 0.98rem; font-weight: 800; color: #dc2626; }
.wd-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.wd-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); flex: 1; min-width: 150px; }
.wd-field.wd-reason { flex: 2; }
.wd-field input, .wd-field textarea { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.92rem; font-weight: 400; color-scheme: light; resize: vertical; }
.wd-group-label { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.wd-group-label small { color: var(--text-dim); font-weight: 400; }
.wd-lessons { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-lesson { font-size: 0.85rem; padding: 3px 11px; border-radius: 999px; background: var(--sc, var(--bg-soft)); color: #2b2723; border: 1px solid var(--border); }
.wd-lesson b { font-weight: 800; }
.wd-none { font-size: 0.85rem; color: var(--text-dim); }
.wd-band { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; font-weight: 600; color: var(--text); cursor: pointer; }
.wd-band input { width: 17px; height: 17px; accent-color: #dc2626; }
.wd-save-row { display: flex; }
.withdraw-help { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.withdraw-form { display: flex; flex-direction: column; gap: 12px; }
.withdraw-form textarea { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.95rem; resize: vertical; }
.withdraw-actions { display: flex; gap: 8px; margin-top: 4px; }
.wd-scope { display: flex; flex-direction: column; gap: 6px; }
.wd-scope-opt { font-size: 0.92rem; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 7px; }
.wd-scope-opt small { color: var(--text-dim); }
.wd-scope-subjs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.wd-scope-subjs-label { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); }
.wd-subjlist { display: flex; flex-direction: column; gap: 7px; }
.wd-subj-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-subj-meta { font-size: 0.86rem; color: var(--text-dim); flex: 1; min-width: 0; }
.wd-subj-restore { background: none; border: 1px solid var(--border); color: var(--text-dim); font-family: inherit; font-size: 0.76rem; padding: 3px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.wd-subj-restore:hover { border-color: var(--accent); color: var(--accent); }
.wd-title small { color: var(--text-dim); font-weight: 400; }
#counselWithdrawInfo:has(.wd-grad-body) .wd-title { color: #0e7490; }   /* 졸업 정보 제목은 청록 */
.wd-grad-body { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.wd-grad-date { font-size: 0.92rem; color: var(--text); }
.wd-grad-date b { color: #0e7490; }
.wd-grad-memo { font-size: 0.9rem; color: var(--text-dim); }
.wd-grad-hint { margin-top: 8px; font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; }
.btn-add.danger { background: #dc2626; border-color: #dc2626; }
.btn-add.danger:hover { background: #b91c1c; }
.counsel-student-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.counsel-student-select { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.95rem; min-width: 180px; }
.counsel-search-input { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.95rem; min-width: 200px; flex: 1 1 200px; max-width: 320px; }
.counsel-search-input:focus { border-color: var(--accent); background: var(--card); outline: none; }
/* 학년 필터 칩 */
.counsel-grade-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.csp-chip { font-size: 0.85rem; font-weight: 700; padding: 5px 13px; border-radius: 999px; cursor: pointer; background: var(--bg-soft); color: var(--text-dim); border: 1px solid var(--border); font-family: inherit; }
.csp-chip:hover { border-color: var(--accent); }
.csp-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 학생 리스트 */
.counsel-student-list { display: flex; flex-wrap: wrap; gap: 8px; }
.csp-empty { color: var(--text-dim); font-size: 0.9rem; padding: 8px 0; }
.csp-student { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; cursor: pointer; background: var(--card); color: var(--text); border: 1px solid var(--border); font-family: inherit; font-size: 0.95rem; font-weight: 600; }
.csp-student:hover { border-color: var(--accent); background: var(--card-hover); }
.csp-student.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.csp-student .csp-grade { font-size: 0.78rem; font-weight: 700; opacity: 0.75; }
.csp-student.active .csp-grade { opacity: 0.9; }
.counsel-newstudent { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; }
.counsel-newstudent input, .counsel-newstudent select { padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; }
.cs-photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.cs-photo-preview { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; }
.cs-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-photo-ph { font-size: 0.82rem; color: var(--text-dim); }
.cs-photo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-photo-pick { cursor: pointer; }
.counsel-year-hint { font-size: 0.78rem; color: var(--text-dim); }
.counsel-empty { color: var(--text-dim); padding: 30px 0; text-align: center; }
.counsel-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.counsel-col { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.counsel-col-title { font-size: 1.1rem; margin: 0 0 12px; }
.counsel-compose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.counsel-compose textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem; resize: vertical; }
.counsel-compose .btn-add { align-self: flex-end; }
.counsel-list { display: flex; flex-direction: column; gap: 10px; }
.counsel-rec-empty { color: var(--text-dim); font-size: 0.88rem; text-align: center; padding: 10px 0; }
.counsel-day { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 8px; background: var(--card); }
.counsel-day-sum { list-style: none; cursor: pointer; padding: 9px 12px; font-weight: 700; font-size: 0.9rem; color: var(--text); display: flex; align-items: center; gap: 8px; user-select: none; }
.counsel-day-sum::-webkit-details-marker { display: none; }
.counsel-day-sum::before { content: "▶"; font-size: 0.7rem; color: var(--text-dim); transition: transform 0.15s; }
.counsel-day[open] > .counsel-day-sum::before { transform: rotate(90deg); }
.counsel-day-cnt { font-size: 0.76rem; font-weight: 600; color: var(--text-dim); background: var(--bg-soft); border: 1px solid var(--border); padding: 1px 8px; border-radius: 999px; }
.counsel-day-body { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 10px; }
.counsel-rec { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.counsel-rec-body { font-size: 0.93rem; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.counsel-rec-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.counsel-rec-meta { font-size: 0.76rem; color: var(--text-dim); }
.counsel-rec-actions { display: flex; gap: 6px; }
.counsel-rec-actions button { background: none; border: 1px solid var(--border); color: var(--text-dim); padding: 3px 9px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 0.75rem; }
.counsel-rec-actions button:hover { color: var(--text); border-color: var(--accent); }
.counsel-edit-ta { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.9rem; resize: vertical; }
.counsel-edit-actions { display: flex; gap: 6px; margin-top: 6px; }
@media (max-width: 720px) {
  .counsel-cols { grid-template-columns: 1fr; }
}

/* ===== 성적 그래프 ===== */
.counsel-grades { margin-top: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.grade-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.grade-form select, .grade-form input { padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.grade-form input[type="number"] { width: 90px; }
.grade-exam-edit { padding: 6px 9px; font-size: 0.85rem; }
.grade-exam-editor { margin: -4px 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-soft); }
.grade-exam-editor .gee-title { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); margin-bottom: 7px; }
.grade-exam-editor .gee-title small { font-weight: 500; }
.grade-exam-editor textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.9rem; resize: vertical; }
.grade-exam-editor .gee-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.grade-exam-editor .gee-msg { font-size: 0.82rem; color: var(--text-dim); }
/* 영상 시청이력 */
.counsel-videos { margin-top: 18px; }
.cv-sub { font-size: 0.82rem; font-weight: 500; color: var(--text-dim); margin-left: 6px; }
.cv-sub .cv-linked { color: var(--accent); font-weight: 700; }
.cv-relink, .cv-link { font-size: 0.8rem; margin-left: 6px; cursor: pointer; background: none; border: 1px solid var(--border); border-radius: 7px; padding: 2px 8px; color: var(--text-dim); }
.cv-empty { color: var(--text-dim); font-size: 0.9rem; padding: 8px 0; }
.cv-list { display: flex; flex-direction: column; gap: 10px; }
.cv-row { display: flex; flex-direction: column; gap: 4px; }
.cv-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cv-title { font-weight: 600; font-size: 0.92rem; }
.cv-when { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }
.cv-barwrap { display: flex; align-items: center; gap: 8px; }
.cv-bar { flex: 1; height: 8px; background: var(--bg-soft); border-radius: 5px; overflow: hidden; }
.cv-bar-fill { height: 100%; background: var(--accent); border-radius: 5px; }
.cv-pct { font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--text-dim); min-width: 34px; text-align: right; }
.cv-linkbox { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cv-linkbox select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-family: inherit; }
.cv-linklbl { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); }
.cv-count { color: var(--text-dim); font-weight: 600; }
.cv-row-un { opacity: 0.6; }
.cv-unwatched { color: var(--text-dim); font-style: italic; }
.cv-free { font-size: 0.7rem; background: var(--bg-soft); color: var(--text-dim); border-radius: 5px; padding: 1px 5px; vertical-align: middle; }
.cv-done { font-size: 0.7rem; font-weight: 800; background: #16a34a; color: #fff; border-radius: 5px; padding: 1px 6px; letter-spacing: 0.02em; }
.cv-row-done .cv-pct { color: #16a34a; font-weight: 700; }
.cv-period { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.cv-pchip { font-size: 0.82rem; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); cursor: pointer; }
.cv-pchip.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.cv-prange { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.cv-prange input[type="date"] { padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.82rem; }
.grade-chart-wrap { margin-bottom: 14px; }
.grade-chart-scroll { overflow-x: auto; }
.grade-svg { display: block; max-width: 100%; }
.grade-grid { stroke: var(--border); stroke-width: 1; }
.grade-ylabel { fill: var(--text-dim); font-size: 10px; text-anchor: end; }
.grade-xlabel { fill: var(--text-dim); font-size: 11px; text-anchor: middle; }
.grade-xlabel.small { font-size: 9.5px; }
.grade-line { stroke-linejoin: round; stroke-linecap: round; cursor: pointer; transition: opacity 0.15s; }
.grade-line.dim { opacity: 0.25; }
.grade-dot { cursor: pointer; transition: opacity 0.15s; }
.grade-dot.dim { opacity: 0.25; }
.grade-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.grade-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--border); font-family: inherit; }
.grade-leg .grade-leg-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); border: 1px solid rgba(0,0,0,0.18); }
.grade-leg.on { background: var(--sc); color: #2b2723; border-color: var(--sc); }
.grade-leg.empty { opacity: 0.4; }
.grade-hint { color: var(--text-dim); font-size: 0.88rem; text-align: center; padding: 16px 0; }
.grade-table-title { display: flex; align-items: center; gap: 7px; font-weight: 800; margin: 6px 0 10px; }
.grade-table-title .grade-leg-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--sc); border: 1px solid rgba(0,0,0,0.18); }
.grade-table-scroll { overflow-x: auto; }
.grade-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.grade-table th, .grade-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.grade-table th { color: var(--text-dim); font-weight: 700; font-size: 0.82rem; }
.grade-score-cell { font-weight: 800; font-variant-numeric: tabular-nums; }
.grade-del { background: none; border: 1px solid var(--border); color: var(--text-dim); padding: 3px 9px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 0.75rem; }
.grade-del:hover { color: #c0392b; border-color: #c0392b; }

.grade-chart-toggle-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.grade-toggle { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); padding: 6px 13px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 0.82rem; font-weight: 700; }
.grade-toggle:hover { border-color: var(--accent); }
.grade-toggle-note { font-size: 0.76rem; color: var(--text-dim); }

/* ===== 출결 ===== */
.counsel-attendance { margin-top: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.attend-src { font-size: 0.78rem; font-weight: 500; color: var(--text-dim); }
.attend-hint { color: var(--text-dim); font-size: 0.88rem; text-align: center; padding: 16px 0; }
.attend-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.attend-range .ar-label { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); margin-right: 4px; }
.attend-range .arp { padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-size: 0.82rem; cursor: pointer; }
.attend-range .arp.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.attend-range .ar-custom { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.attend-range .ar-custom input[type="date"] { padding: 4px 7px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-size: 0.82rem; }
.attend-range .ar-tilde { color: var(--text-dim); }
.attend-range .ar-go { padding: 5px 12px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.attend-block { margin-bottom: 18px; }
.attend-block:last-child { margin-bottom: 0; }
.attend-head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 4px 0 10px; }
.attend-head .attend-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--sc); border: 1px solid rgba(0,0,0,0.18); }
.attend-cls { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); margin-left: 2px; }
.attend-table-scroll { overflow-x: auto; }
.attend-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.attend-table th, .attend-table td { padding: 7px 9px; border: 1px solid var(--border); text-align: center; vertical-align: middle; }
.attend-table th { background: var(--bg-soft); color: var(--text-dim); font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.attend-table td.att-left { text-align: left; word-break: break-word; min-width: 120px; }
.attend-table td.att-date { white-space: nowrap; color: var(--text-dim); font-weight: 600; }
.attend-table td.att-att { font-weight: 800; white-space: nowrap; }
.att-att.att-o { color: #2b7a4b; }
.att-att.att-online { color: #0e7490; font-weight: 700; }
.att-att.att-x { color: #c0392b; }
.att-att.att-late { color: #1d4ed8; }
.att-att.att-holiday { color: var(--text-dim); font-weight: 700; font-size: 0.8rem; }
.attend-table td.att-hwc { font-weight: 700; white-space: nowrap; }
.attend-table td.att-hwc-x { color: #c0392b; font-weight: 800; }
.attend-table td.att-hwc-half { color: #1d4ed8; font-weight: 800; }
.att-pa { font-weight: 700; white-space: nowrap; }
.att-pa-bad { color: #c0392b; font-weight: 800; }
.att-pa-good { color: #15803d; font-weight: 800; }
.att-test { display: inline-block; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); font-weight: 800; font-size: 0.78rem; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }

/* ===== 시간표 (캘린더 탭) ===== */
.cal-tabs { display: inline-flex; gap: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.cal-tab { background: none; border: none; color: var(--text-dim); font-family: inherit; font-size: 0.92rem; font-weight: 700; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.cal-tab.active { background: var(--accent); color: #fff; }
.tt-title { font-size: 1.5rem; margin-bottom: 4px; }
.tt-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; line-height: 1.5; }
.tt-pick-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.tt-pick-label { flex-shrink: 0; font-weight: 800; font-size: 0.9rem; padding-top: 6px; min-width: 34px; white-space: nowrap; }
.tt-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-chip { font-size: 0.88rem; font-weight: 700; padding: 7px 15px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--text); border: 1.5px solid var(--border); font-family: inherit; }
.tt-chip:hover { border-color: var(--sc, var(--accent)); }
.tt-chip.on { color: #2b2723; background: var(--sc); border-color: var(--sc); }
.tt-chip.grade.on { color: #fff; background: var(--accent); border-color: var(--accent); }   /* 학년칩은 과목색 없음 */
.tt-none { font-size: 0.82rem; color: var(--text-dim); align-self: center; }
.tt-empty { color: var(--text-dim); text-align: center; padding: 20px 0; }
.tt-grids { margin-top: 14px; }
.tt-big { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; max-width: 720px; }
.tt-scroll { overflow-x: auto; }
.tt-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; table-layout: fixed; }
.tt-table th, .tt-table td { border: 1px solid rgba(130,118,96,0.34); text-align: center; vertical-align: middle; padding: 0; height: 34px; }
.tt-table th { background: var(--bg-soft); color: var(--text-dim); font-weight: 700; }
.tt-table td.tt-time, .tt-table th.tt-time { width: 44px; background: var(--bg-soft); color: var(--text-dim); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 0.72rem; }
.tt-table .tt-sat { background: #f2ead9; }   /* 토요일 시간열 살짝 구분 */
.tt-c { background: var(--card); }
.tt-c.on { background: var(--sc); }
.tt-lb { display: block; font-size: 0.64rem; font-weight: 800; color: #2b2723; line-height: 1.1; padding: 0 1px; }
/* 시간표 음영 = 격자 위 연속 블록(오버레이), 라벨은 블록 중앙 */
.tt-inner { position: relative; }
.tt-ov { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tt-blk { position: absolute; border-radius: 2px; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05); }
.tt-blk-lb { font-size: 0.64rem; font-weight: 800; color: #2b2723; line-height: 1.1; padding: 0 2px; text-align: center; }

/* ===== 교재 주문 ===== */
.books-head h1 { font-size: 1.5rem; margin-bottom: 10px; }
.books-tabs { display: inline-flex; gap: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px; margin-bottom: 10px; }
.books-tab { background: none; border: none; color: var(--text-dim); font-family: inherit; font-size: 0.92rem; font-weight: 700; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.books-tab.active { background: var(--accent); color: #fff; }
.books-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 12px; line-height: 1.5; }
.supply-pick { flex: 1; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.book-card.ordering .supply-pick { background: var(--accent); color: #fff; border-color: var(--accent); }
.book-link { display: inline-block; margin-top: 4px; font-size: 0.8rem; color: var(--accent); text-decoration: none; }
.book-link:hover { text-decoration: underline; }
.oi-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.books-manager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 0.9rem; font-weight: 700; }
.books-manager select { font-family: inherit; font-size: 0.9rem; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text); }
.books-manager-hint { font-weight: 500; color: var(--text-dim); font-size: 0.82rem; }
.books-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.books-search-input { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.92rem; }
.books-sort { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.88rem; cursor: pointer; }
.books-newform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.books-newform input[type="text"] { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.books-newform #bkSubject { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.books-subjfilter { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.book-subj-chip { font-size: 0.82rem; font-weight: 700; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-dim); font-family: inherit; cursor: pointer; }
.book-subj-chip:hover { border-color: var(--accent); color: var(--text); }
.book-subj-chip.active { background: var(--sc, var(--accent)); color: #2b2723; border-color: var(--sc, var(--accent)); }
.book-subj-chip[data-bsubj="all"].active { background: var(--accent); color: #fff; border-color: var(--accent); }
.book-subj-tag { font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--sc, var(--bg-soft)); color: #2b2723; vertical-align: middle; }
.books-more { grid-column: 1 / -1; margin-top: 4px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; background: var(--card); color: var(--text-dim); font-family: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; }
.books-more:hover { border-color: var(--accent); color: var(--accent); }
.books-more span { font-weight: 500; }
.books-newform #bkTitle { flex: 1; min-width: 180px; }
.books-cover-pick { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 1px dashed var(--border); border-radius: 8px; cursor: pointer; font-size: 0.85rem; color: var(--text-dim); }
.books-cover-pick:hover { border-color: var(--accent); color: var(--text); }
.books-cover-name { font-size: 0.82rem; color: var(--text-dim); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.book-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.book-card.ordering { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.book-cover { aspect-ratio: 3 / 4; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-noimg { font-size: 2.4rem; opacity: 0.5; }
.book-info { padding: 10px 12px 6px; flex: 1; }
.book-title { font-weight: 700; font-size: 0.92rem; line-height: 1.35; }
.book-meta { color: var(--text-dim); font-size: 0.8rem; margin-top: 3px; }
.book-qtyrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 12px; }
.book-qty { display: flex; align-items: center; gap: 4px; }
/* 수정·삭제는 카드 우측 상단(표지 위)에 올려 수량 줄과 분리 — 좁은 카드에서도 줄 안 넘침 */
.book-admin-acts { position: absolute; top: 7px; right: 7px; display: flex; gap: 5px; z-index: 2; }
.bq-btn { width: 30px; height: 30px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); border-radius: 8px; font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bq-btn:hover { border-color: var(--accent); color: var(--accent); }
.bq-input { width: 46px; text-align: center; padding: 6px 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.92rem; font-weight: 700; -moz-appearance: textfield; }
.bq-input::-webkit-outer-spin-button, .bq-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.book-del { background: rgba(255,255,255,0.92); border: 1px solid var(--border); border-radius: 8px; padding: 4px 7px; cursor: pointer; font-size: 0.85rem; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.book-del:hover { border-color: #c0392b; background: #fff; }
.book-edit { background: rgba(255,255,255,0.92); border: 1px solid var(--border); border-radius: 8px; padding: 4px 7px; cursor: pointer; font-size: 0.85rem; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.book-edit:hover { border-color: var(--accent); background: #fff; }
.book-stock { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 0.82rem; color: var(--text-dim); font-weight: 600; }
.book-stock.has { color: var(--text); }
.book-stock .bk-stock-n { color: var(--accent); font-weight: 800; }
.bk-stock-ctrl { display: inline-flex; gap: 4px; margin-left: 2px; }
.bk-stk { width: 24px; height: 24px; line-height: 1; border: 1px solid var(--border); background: var(--card-bg, rgba(127,127,127,0.06)); border-radius: 6px; cursor: pointer; font-size: 0.95rem; font-weight: 700; color: var(--text); padding: 0; }
.bk-stk:hover { border-color: var(--accent); color: var(--accent); }
.books-stock-field { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.books-stock-field input { width: 90px; flex: none; }

.books-orderbar { position: sticky; bottom: env(safe-area-inset-bottom); z-index: 20; margin: 0 -4px 20px; padding: 4px; }
.books-orderbar-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--accent); border-radius: 14px; padding: 12px 16px; box-shadow: 0 6px 22px rgba(0,0,0,0.16); }
.ob-recipient { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 200px; }
.ob-recipient label { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); }
.ob-recipient label b { color: #c0392b; }
.ob-recipient input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem; }
.ob-note { flex: 1; min-width: 140px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.9rem; align-self: flex-end; }
.ob-summary { font-weight: 800; font-size: 0.95rem; white-space: nowrap; align-self: flex-end; padding-bottom: 8px; }
.books-orderbar .btn-add { align-self: flex-end; }
.books-orderbar .btn-add:disabled { opacity: 0.45; cursor: not-allowed; }

.books-orders { margin-bottom: 30px; }
.books-orders-list { display: flex; flex-direction: column; gap: 10px; }
.order-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.order-card.done { opacity: 0.7; }
.order-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.order-recipient { font-weight: 800; }
.order-when { color: var(--text-dim); font-size: 0.8rem; margin-left: auto; }
.order-badge { background: #2b7a4b; color: #fff; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.order-items { list-style: none; display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; }
.order-items li { font-size: 0.9rem; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.order-items li:last-child { border-bottom: none; }
.oi-pub { color: var(--text-dim); font-size: 0.8rem; }
.order-note { margin-top: 6px; font-size: 0.85rem; color: var(--text-dim); }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.order-total { font-weight: 800; font-size: 0.9rem; }
.order-actions { display: flex; gap: 6px; }
.order-act { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); padding: 5px 11px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 0.8rem; font-weight: 700; }
.order-act:hover { border-color: var(--accent); }
.order-act.danger:hover { border-color: #c0392b; color: #c0392b; }
.books-empty { color: var(--text-dim); text-align: center; padding: 24px 0; }
@media (max-width: 640px) {
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .ob-summary { padding-bottom: 0; }
}

/* ===== 출근부 ===== */
.ts-head h1 { font-size: 1.5rem; margin-bottom: 4px; }
.ts-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 12px; line-height: 1.5; }
.ts-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.ts-pick { font-size: 0.9rem; font-weight: 700; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.ts-pick select { font-family: inherit; font-size: 0.92rem; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-weight: 600; }
.ts-monthnav { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1rem; }
.ts-status { font-size: 0.9rem; font-weight: 700; padding: 8px 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; display: inline-block; margin-bottom: 6px; }
/* 출근부 수정 요청 취합(원장용) */
.ts-requests { max-width: 620px; margin: 0 0 16px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; }
.ts-req-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ts-req-title { font-weight: 800; font-size: 0.98rem; }
.ts-req-title b { color: var(--accent); }
.ts-req-all { font-size: 0.82rem; padding: 6px 12px; }
.ts-req-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.ts-req-info { min-width: 0; font-size: 0.9rem; }
.ts-req-reason { color: var(--text-dim); }
.ts-req-reason.none { font-style: italic; opacity: 0.7; }
.ts-req-at { display: block; font-size: 0.76rem; color: var(--text-dim); margin-top: 2px; }
.ts-req-btns { display: flex; gap: 6px; flex-shrink: 0; }
.ts-req-ok, .ts-req-no { padding: 6px 14px; font-size: 0.85rem; }
.ts-req-note { font-size: 0.86rem; font-weight: 600; color: var(--text-dim); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px; }
.ts-table-wrap { overflow-x: auto; margin-bottom: 14px; }
.ts-table { width: 100%; max-width: 560px; border-collapse: collapse; font-size: 0.9rem; }
.ts-table th, .ts-table td { border: 1px solid var(--border); padding: 5px 10px; text-align: center; }
.ts-table th { background: var(--bg-soft); color: var(--text-dim); font-weight: 700; }
.ts-table td.ts-date { text-align: left; white-space: nowrap; font-weight: 600; }
.ts-dow { color: var(--text-dim); font-size: 0.82rem; }
.ts-sun td.ts-date, .ts-sun .ts-dow { color: #c0392b; }
.ts-sat td.ts-date, .ts-sat .ts-dow { color: #2f6bff; }
.ts-dur { color: var(--text-dim); white-space: nowrap; }
.ts-inp { border: 1px solid var(--border); border-radius: 7px; padding: 5px 6px; font-family: inherit; font-size: 0.88rem; background: var(--card); color: var(--text); color-scheme: light; }
.ts-locked { font-size: 0.88rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.ts-empty { color: var(--text-dim); }
/* 일별 수정요청 */
.ts-reqcell { white-space: nowrap; text-align: right; }
.ts-reqbtn { font-size: 0.75rem; font-weight: 600; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-family: inherit; cursor: pointer; white-space: nowrap; }
.ts-reqbtn:hover { border-color: var(--accent); color: var(--accent); }
.ts-savebtn { font-size: 0.75rem; font-weight: 800; padding: 4px 11px; border: none; border-radius: 999px; background: var(--accent); color: #fff; font-family: inherit; cursor: pointer; white-space: nowrap; }
.ts-savebtn:hover { filter: brightness(1.08); }
tr.ts-dirty { background: rgba(192,57,43,0.06); }
.ts-granted { font-size: 0.75rem; font-weight: 700; color: #12a150; white-space: nowrap; }
.ts-pend { font-size: 0.75rem; font-weight: 700; color: #d98a00; white-space: nowrap; }
.ts-row-granted { background: rgba(18,161,80,0.06); }
.ts-req-date { color: var(--accent); }
.ts-foot { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin-bottom: 30px; }
.ts-foot-top { display: flex; align-items: center; gap: 10px; max-width: 560px; margin-bottom: 6px; }
.ts-total { font-size: 1.05rem; }
.ts-total b { color: var(--accent); }
.ts-saved { font-size: 0.85rem; font-weight: 700; color: var(--accent); opacity: 0; transition: opacity 0.2s; }
.ts-saved.show { opacity: 1; }
.ts-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-actions select { font-family: inherit; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); }
.ts-submit { font-size: 1rem; padding: 11px 26px; }
/* 일별 비고 입력 */
.ts-memo-cell { min-width: 120px; }
.ts-memo-inp { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 0.88rem; padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--text); }
.ts-memo-inp:focus { outline: none; border-color: var(--accent); }
/* 접기/펼치기 */
.ts-fold-btn { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: 0.92rem; font-weight: 700; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; cursor: pointer; margin-bottom: 10px; }
.ts-fold-btn:hover { background: var(--card-hover); }
.ts-fold-caret { font-size: 0.7rem; color: var(--text-dim); }
/* 원버튼 출퇴근 */
.ts-punch { max-width: 560px; margin: 4px 0 14px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.ts-punch-label { font-size: 0.9rem; font-weight: 700; color: var(--text-dim); }
.ts-punch-now, .ts-punch-done { font-size: 0.95rem; color: var(--text); }
.ts-punch-now b, .ts-punch-done b { color: var(--accent); }
.ts-punch-btn { font-family: inherit; font-size: 1.15rem; font-weight: 800; padding: 15px 44px; border: none; border-radius: 999px; color: #fff; cursor: pointer; box-shadow: 0 3px 10px rgba(192,57,43,0.25); transition: transform 0.06s, filter 0.15s; }
.ts-punch-btn:active { transform: scale(0.97); }
.ts-punch-in { background: var(--accent); }
.ts-punch-out { background: #6b4f2e; box-shadow: 0 3px 10px rgba(107,79,46,0.25); }
.ts-punch-btn:hover { filter: brightness(1.06); }
.ts-punch-reset { font-family: inherit; font-size: 0.85rem; padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); cursor: pointer; }
.ts-punch-hint { font-size: 0.78rem; color: var(--text-dim); }
.ts-autosave { font-size: 0.82rem; color: var(--text-dim); margin: 0 0 10px; }
.ts-autosave b { color: var(--text); }
/* 홈 원버튼 출퇴근 바 */
.home-punch { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; padding: 14px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.home-punch .hp-left { display: flex; align-items: baseline; gap: 10px; }
.home-punch .hp-title { font-size: 1.02rem; font-weight: 800; color: var(--text); }
.home-punch .hp-date { font-size: 0.88rem; color: var(--text-dim); }
.home-punch .hp-right { display: flex; align-items: center; gap: 12px; }
.home-punch .hp-now { font-size: 0.95rem; color: var(--text); }
.home-punch .hp-now b, .home-punch .hp-done b { color: var(--accent); }
.home-punch .hp-done { font-size: 0.98rem; font-weight: 700; color: var(--text); }
.home-punch .hp-btn { font-size: 1rem; padding: 11px 32px; }
/* 알림 설정 (알림 모달의 ⚙️ 패널) */
.alert-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-right: 44px; }
.alert-head h2 { margin: 0; }
.alert-gear { margin-left: auto; background: none; border: none; font-size: 1.15rem; cursor: pointer; padding: 4px 6px; border-radius: 8px; line-height: 1; opacity: 0.75; transition: background 0.15s, opacity 0.15s; }
.alert-gear:hover { background: var(--bg-soft); opacity: 1; }
.notify-panel { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.notify-types-lbl { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; }
.notify-preview { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.notify-radio { display: flex; align-items: flex-start; gap: 9px; font-size: 0.92rem; color: var(--text); cursor: pointer; }
.notify-radio input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.notify-radio span { display: flex; flex-direction: column; line-height: 1.35; }
.notify-radio small { font-size: 0.78rem; color: var(--text-dim); }
/* @언급 자동완성 드롭다운 */
.mention-pop { position: fixed; z-index: 3000; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.14); padding: 4px; max-height: 240px; overflow-y: auto; }
.mention-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 0.92rem; }
.mention-item.active, .mention-item:hover { background: var(--bg-soft); }
.mention-nick { font-weight: 700; color: var(--text); }
.mention-pos { font-size: 0.78rem; color: var(--text-dim); }
/* 알림 클릭 시 해당 항목 강조(3번 반짝) */
@keyframes flashHl {
  0%   { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent); }
  16%  { background: transparent;        box-shadow: 0 0 0 3px rgba(192,57,43,0); }
  33%  { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent); }
  50%  { background: transparent;        box-shadow: 0 0 0 3px rgba(192,57,43,0); }
  66%  { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent); }
  100% { background: transparent;        box-shadow: 0 0 0 0 transparent; }
}
.flash-hl { animation: flashHl 1.9s ease-out; border-radius: 10px; }
/* 학생별 알림 설정 모달 */
.cn-sub { font-size: 0.88rem; color: var(--text-dim); margin: 0 0 14px; }
.cn-sub b { color: var(--text); }
.cn-grade-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cn-student-list { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; }
.cn-bulk { display: flex; align-items: center; gap: 8px; padding: 4px 2px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cn-bulk-lbl { font-weight: 800; color: var(--accent); margin-right: auto; }
.cn-bulk-btn { font-family: inherit; font-size: 0.82rem; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); cursor: pointer; }
.cn-bulk-btn:hover { background: var(--card-hover); }
.cn-student { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 8px; font-size: 0.95rem; cursor: pointer; }
.cn-student:hover { background: var(--bg-soft); }
.cn-student input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.cn-empty { font-size: 0.9rem; color: var(--text-dim); padding: 8px 2px; }
/* 학생 인적사항 헤더 */
.counsel-student-header { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.csh-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); background: var(--bg-soft); }
.csh-photo-ph { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; color: var(--text-dim); }
.csh-body { min-width: 0; }
.csh-name { font-size: 1.25rem; font-weight: 800; color: var(--text); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.csh-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.csh-actions .btn-ghost { font-size: 0.82rem; padding: 5px 10px; white-space: nowrap; }
/* 학적 변경 묶음 드롭다운 메뉴 */
.record-menu { position: absolute; z-index: 1200; background: var(--paper, #fff); border: 1px solid var(--border, #e5e5e5); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 5px; min-width: 150px; }
.record-menu .rm-item { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 7px; padding: 9px 12px; font-size: 0.9rem; color: var(--text, #222); cursor: pointer; white-space: nowrap; }
.record-menu .rm-item:hover { background: var(--bg, #f3f3f3); }
.csh-name span { font-size: 0.95rem; font-weight: 700; color: var(--text-dim); }
.csh-name-phone { font-size: 0.98rem; font-weight: 600; margin-left: 10px; }
.csh-name-phone a { color: var(--accent); text-decoration: none; }
.csh-name-phone a:hover { text-decoration: underline; }
.csh-info { margin-top: 5px; font-size: 0.9rem; color: var(--text-dim); line-height: 1.7; }
.csh-info a { color: var(--accent); text-decoration: none; }
.csh-info a:hover { text-decoration: underline; }
.csh-dot { opacity: 0.5; margin: 0 2px; }
/* 형제 연결 */
.csh-siblings { margin-top: 7px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.88rem; }
.csh-sib-lbl { color: var(--text-dim); font-weight: 600; }
.csh-sib-none { color: var(--text-dim); opacity: 0.7; }
.csh-sib { display: inline-flex; align-items: center; background: var(--chip-bg, rgba(127,127,127,0.12)); border: 1px solid var(--line, rgba(127,127,127,0.25)); border-radius: 999px; overflow: hidden; }
.csh-sib-go { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 0.86rem; padding: 3px 4px 3px 11px; cursor: pointer; }
.csh-sib-go:hover { text-decoration: underline; }
.csh-sib-wd .csh-sib-go { color: var(--text-dim); text-decoration: line-through; }
.csh-sib-x { background: none; border: 0; color: var(--text-dim); font-size: 0.78rem; line-height: 1; padding: 3px 9px 3px 4px; cursor: pointer; }
.csh-sib-x:hover { color: #dc2626; }
.csh-sib-add { background: none; border: 1px dashed var(--line, rgba(127,127,127,0.4)); color: var(--text-dim); border-radius: 999px; font-size: 0.82rem; font-weight: 600; padding: 3px 11px; cursor: pointer; }
.csh-sib-add:hover { color: var(--accent); border-color: var(--accent); }
.sib-pick { display: flex; flex-direction: column; gap: 5px; max-height: 340px; overflow-y: auto; margin-top: 6px; }
.sib-opt { text-align: left; background: var(--card-bg, rgba(127,127,127,0.06)); border: 1px solid var(--line, rgba(127,127,127,0.18)); border-radius: 9px; padding: 9px 12px; cursor: pointer; color: var(--text); }
.sib-opt:hover { border-color: var(--accent); background: var(--chip-bg, rgba(127,127,127,0.12)); }
.sib-opt small { color: var(--text-dim); font-weight: 500; margin-left: 4px; }
#sibSearch { width: 100%; box-sizing: border-box; }
/* 개발모드 */
.devmode-banner { position: sticky; top: 0; z-index: 60; background: #6d28d9; color: #fff; text-align: center; font-size: 0.85rem; font-weight: 600; padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top)); }
.devmode-banner b { font-weight: 800; }
/* 구독료 연체 독촉 배너(원장) */
.dunning-banner { position: sticky; top: 0; z-index: 60; background: #b4531f; color: #fff; text-align: center; font-size: 0.85rem; font-weight: 600; padding: 7px 12px; padding-top: calc(7px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: center; gap: 8px; }
.dunning-banner.warn { background: #b3261e; }
.dunning-banner b { font-weight: 800; }
.dunning-banner .dun-link { background: rgba(255,255,255,.22); color: #fff; border: none; border-radius: 6px; padding: 2px 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.dunning-banner .dun-x { background: none; border: none; color: #fff; font-size: 1rem; cursor: pointer; opacity: .85; line-height: 1; }
.dun-box { background: #fcefe3; border: 1px solid #e9bfa0; color: #8a3b12; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 2px 0 12px; }
.dun-box.warn { background: #fde7e5; border-color: #e9b4b0; color: #93221b; }
.hdmi-banner { position: sticky; top: 0; z-index: 61; background: #b45309; color: #fff; font-size: 0.85rem; font-weight: 600; padding: 7px 12px; padding-top: calc(7px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; }
.hdmi-banner .hdmi-msg { flex: 1; min-width: 0; }
.hdmi-banner b { font-weight: 800; }
.hdmi-banner .hdmi-refresh { flex: none; background: #fff; color: #b45309; border: 0; border-radius: 7px; font-weight: 800; font-size: 0.85rem; padding: 5px 12px; cursor: pointer; }
.hdmi-banner .hdmi-dismiss { flex: none; background: transparent; color: #fff; border: 0; font-size: 1rem; line-height: 1; padding: 4px 6px; cursor: pointer; opacity: 0.85; }
#devModeBtn.on { color: #6d28d9; font-weight: 800; }
#devModeBtn.on #devModeState { color: #6d28d9; }
.alert-dev { margin-top: 3px; font-size: 0.76rem; font-weight: 600; color: #6d28d9; background: rgba(109,40,217,0.08); border-radius: 6px; padding: 3px 7px; display: inline-block; }
/* 릴리즈 관리 */
.exam-sync-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.exam-sync-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.exam-sync-row .esy-label { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; }
.exam-sync-row .esy-cnt { font-weight: 600; font-size: 0.78rem; color: var(--text-dim); margin-left: 4px; }
.exam-sync-row select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 0.82rem; background: var(--card); color: var(--text); }
.release-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.release-empty { color: var(--text-dim); font-size: 0.9rem; padding: 10px 0; }

/* 브랜딩 설정 모달 */
.brand-card { max-width: 560px; }
.brand-form { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 14px; }
.brand-logo-field { display: flex; flex-direction: column; gap: 7px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.brand-logo-lbl { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); }
.brand-logo-row { display: flex; align-items: center; gap: 14px; }
.brand-logo-preview { width: 76px; height: 76px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 6px; flex-shrink: 0; }
.brand-logo-actions { display: flex; flex-direction: column; gap: 6px; }
.brand-logo-hint { font-size: 0.74rem; color: var(--text-dim); line-height: 1.4; }
.brand-field { display: flex; flex-direction: column; gap: 5px; }
.brand-field > span { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); }
.brand-field > span small { font-weight: 500; }
.brand-field input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.95rem; }
.br-ch-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.br-ch-row > span { min-width: 86px; color: var(--text-dim); }
.br-ch-row input[type="checkbox"] { flex: none; }
.br-ch-row input[type="text"] { flex: 1; }
.brand-colors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.brand-color { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); }
.brand-color > span { flex: 1; font-size: 0.82rem; font-weight: 700; color: var(--text-dim); }
.brand-color input[type="color"] { width: 40px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; padding: 0; }
.brand-color.unset input[type="color"] { opacity: 0.35; }
.brc-clear { font-size: 0.72rem; padding: 3px 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); cursor: pointer; font-family: inherit; }
.brand-color:not(.unset) .brc-clear { color: var(--accent); border-color: var(--accent); }
.brand-shortcuts { display: flex; flex-direction: column; gap: 8px; }
.brand-hometiles { display: flex; flex-direction: column; gap: 6px; }
.brand-ht-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 14px; margin-top: 2px; }
.brand-ht-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; padding: 3px 2px; }
.brand-ht-item input { width: auto; accent-color: var(--accent); flex-shrink: 0; }
.brand-sc-head { display: flex; align-items: center; justify-content: space-between; }
.brand-sc-head > span { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); }
.brand-sc-list { display: flex; flex-direction: column; gap: 7px; }
.brand-sc-row { display: grid; grid-template-columns: 44px 1fr 1.6fr 34px 28px; gap: 6px; align-items: center; }
.brand-sc-row.sc-sortable { grid-template-columns: 18px 44px 1fr 1.6fr 34px 28px; }   /* 맨 앞 드래그 핸들 컬럼 */
.brsc-drag { cursor: grab; color: var(--text-dim); font-size: 1rem; line-height: 1; text-align: center; user-select: none; -webkit-user-select: none; touch-action: none; }
.brsc-drag:active { cursor: grabbing; }
.brand-sc-row.sc-dragging { opacity: 0.5; }
.brand-subj-row { grid-template-columns: 1fr 34px 28px; }
.brand-subjects { display: flex; flex-direction: column; gap: 8px; }
.brand-schools { display: flex; flex-direction: column; gap: 8px; }
.brand-school-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.brand-field textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.85rem; resize: vertical; }
.brand-restart-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-restart-msg { font-size: 0.8rem; color: var(--text-dim); }
.brand-restart-msg.wait { color: #d97706; }
.brand-restart-msg.err { color: #d64545; }
@media (max-width: 560px) { .brand-school-grid { grid-template-columns: 1fr; } }
/* 담당자 지정 */
.assignees-body { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 14px; }
.as-feature { border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; background: var(--bg-soft); }
.as-feat-label { font-size: 0.86rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.as-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 0.84rem; cursor: pointer; color: var(--text); }
.as-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.as-chip input { margin: 0; }
.as-pos { font-size: 0.72rem; color: var(--text-dim); }
.as-chip.on .as-pos { color: var(--accent); }
.as-chip.locked { cursor: default; opacity: 0.92; }
.as-chip.locked input { cursor: default; }
.as-lock { font-size: 0.68rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 6px; margin-left: 1px; }
.brand-sc-row input { padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.85rem; min-width: 0; }
.brand-sc-row input[type="color"] { width: 34px; height: 30px; padding: 0; cursor: pointer; }
.brsc-apps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 1px 2px 5px; }
.brsc-apps-lbl { font-size: 0.72rem; font-weight: 800; color: var(--text-dim); }
.brsc-app { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--text); cursor: pointer; white-space: nowrap; }
.brsc-app input { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }
.brsc-del { border: none; background: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; }
.brsc-del:hover { color: #d64545; }
.brand-msg { padding: 9px 12px; border-radius: 10px; font-size: 0.88rem; font-weight: 600; }
.brand-msg.ok { background: rgba(34,160,94,0.1); color: #1f9d55; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.brand-msg.err { background: rgba(200,60,60,0.1); color: #d64545; }
.btn-add.sm, .btn-ghost.sm { font-size: 0.8rem; padding: 5px 10px; }
@media (max-width: 560px) { .brand-colors { grid-template-columns: 1fr; } .brand-sc-row { grid-template-columns: 40px 1fr 30px 26px; } .brand-sc-row.sc-sortable { grid-template-columns: 18px 40px 1fr 30px 26px; } .brand-sc-row .brsc-url { grid-column: 1 / -1; } }
.release-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.release-name { font-weight: 700; }
.release-toggles { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.release-toggle { font-size: 0.82rem; font-weight: 700; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-dim); font-family: inherit; cursor: pointer; white-space: nowrap; }
.release-toggle.on { background: #12a150; border-color: #12a150; color: #fff; }
.release-toggle.rt-btn { font-size: 0.78rem; padding: 6px 11px; }
.release-toggle.rt-btn.on { background: #2f6fed; border-color: #2f6fed; color: #fff; }   /* 버튼 표시 토글은 파란색 구분 */
.csh-enroll { margin-top: 6px; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); }
.csh-subjects { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.csh-subj-lbl { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); margin-right: 2px; }
.csh-subj { font-size: 0.8rem; font-weight: 700; color: #2b2723; background: var(--sc, var(--bg-soft)); padding: 3px 11px; border-radius: 999px; }
.csh-subj em { font-style: normal; font-weight: 500; opacity: 0.75; margin-left: 3px; }
.csh-subj.wd { opacity: 0.55; text-decoration: line-through; }
.csh-subj-none, .csh-subj-loading { font-size: 0.8rem; color: var(--text-dim); }
/* 새 학생 폼 */
.cs-form-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
/* 학생 수강 과목 선택 */
.cs-subj-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cs-subj-label { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); }
.cs-subj-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-subj-chip { font-size: 0.82rem; font-weight: 700; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-dim); font-family: inherit; cursor: pointer; }
.cs-subj-chip.active { background: var(--sc, var(--accent)); color: #2b2723; border-color: var(--sc, var(--accent)); }
/* 신규 상담 탭 */
.consult-view { margin-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.consult-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.consult-hint { font-size: 0.85rem; color: var(--text-dim); }
.consult-hint b { color: var(--accent); }
.consult-form { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cf-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.cf-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.cf-fld { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 130px; font-size: 0.72rem; font-weight: 600; color: var(--text-dim); }
.cf-fld > input, .cf-fld > select { height: 38px; box-sizing: border-box; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem; font-weight: 400; }
.cf-sched { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; padding: 10px 12px; background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 9px; }
.cf-sched-head { font-size: 0.78rem; font-weight: 800; color: var(--text-dim); }
.cf-sched-row { display: flex; align-items: baseline; gap: 8px; font-size: 0.85rem; flex-wrap: wrap; }
.cf-sched-subj { font-weight: 700; font-size: 0.78rem; padding: 2px 10px; border-radius: 999px; background: var(--sc, var(--card)); color: #2b2723; }
.cf-sched-cls { color: var(--text-dim); font-weight: 600; }
.cf-sched-time { font-weight: 700; color: var(--text); }
.cf-sched-sep { color: var(--text-dim); margin: 0 5px; }
.cf-sched-none { color: var(--text-dim); }
.cf-field { display: flex; flex-direction: column; gap: 7px; }
.cf-label { font-size: 0.82rem; font-weight: 700; color: var(--text-dim); }
.cf-label small { font-weight: 500; color: var(--text-dim); }
/* 상담 창구 목록 인라인 편집(원장) */
.cf-src-edit { margin-left: 6px; padding: 1px 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); font-family: inherit; font-size: 0.68rem; font-weight: 700; cursor: pointer; }
.cf-src-edit:hover { color: var(--text); border-color: var(--accent); }
.cf-src-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.cf-src-ed-label { font-size: 0.76rem; font-weight: 700; color: var(--text-dim); }
.cf-src-ed-label small { font-weight: 500; }
.cf-src-editor textarea { resize: vertical; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.9rem; line-height: 1.5; }
.cf-src-ed-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.cf-src-ed-msg { margin-right: auto; font-size: 0.76rem; font-weight: 700; }
.cf-src-ed-msg.ok { color: var(--ok, #12a150); }
.cf-src-ed-msg.err { color: #c0392b; }
.cf-subjs { display: flex; gap: 6px; flex-wrap: wrap; }
.consult-form textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem; resize: vertical; }
.cf-check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text); cursor: pointer; }
.cf-trials { display: flex; flex-direction: column; gap: 8px; }
.cf-trial-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cf-trial-check { display: flex; align-items: center; gap: 7px; cursor: pointer; min-width: 90px; }
.cf-trial-name { font-size: 0.86rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--sc, var(--bg-soft)); color: #2b2723; }
.cf-trial-date { padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; }
.cf-trial-teacher { padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; min-width: 120px; }
.cf-trial-date:disabled, .cf-trial-teacher:disabled { opacity: 0.4; }
.cf-actions { display: flex; gap: 10px; }
.consult-list { display: flex; flex-direction: column; gap: 12px; }
.consult-empty { color: var(--text-dim); padding: 20px 4px; }
.consult-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.cc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cc-name { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.cc-info { font-size: 0.84rem; color: var(--text-dim); }
.cc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-tag { font-size: 0.76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sc, var(--bg-soft)); color: #2b2723; }
.cs-tag.trial { background: transparent; border: 1px dashed var(--sc, var(--border)); color: var(--text); }
.cs-tag.band { background: var(--accent-soft); color: var(--accent); }
.cc-content { font-size: 0.9rem; color: var(--text); white-space: pre-wrap; line-height: 1.5; background: var(--bg-soft); border-radius: 8px; padding: 8px 11px; }
.cc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.consult-card.dismissed { opacity: 0.72; background: var(--bg-soft); }
.cc-dism-badge { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); background: var(--bg); border: 1px solid var(--border); padding: 2px 9px; border-radius: 999px; margin-left: auto; }
.consult-card.from-parent { border-color: color-mix(in srgb, var(--accent, #c0392b) 45%, var(--border)); box-shadow: inset 3px 0 0 var(--accent, #c0392b); }
.cc-parent-badge { font-size: 0.72rem; font-weight: 800; color: var(--accent, #c0392b); background: color-mix(in srgb, var(--accent, #c0392b) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent, #c0392b) 35%, transparent); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
/* 학부모 가입 승인 */
.board-cfg-btn#boardSignupBtn.has-pending { color: #fff; background: var(--accent, #c0392b); border-color: var(--accent, #c0392b); font-weight: 800; }
.su-sec { margin-top: 6px; }
.su-sec + .su-sec { margin-top: 16px; }
.su-h { font-size: 0.82rem; font-weight: 800; color: var(--text-dim); margin: 0 0 8px; }
.su-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.su-row:last-child { border-bottom: none; }
.su-info b { font-weight: 800; }
.su-actions { display: flex; gap: 6px; flex: none; }
.su-badge { font-size: 0.74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.su-badge.su-approved { color: #2b7a4b; background: color-mix(in srgb, #2b7a4b 13%, transparent); }
.su-badge.su-rejected { color: #c0392b; background: color-mix(in srgb, #c0392b 13%, transparent); }
.consult-dism-toggle { align-self: flex-start; margin-top: 4px; padding: 7px 14px; border: 1px dashed var(--border); border-radius: 999px; background: transparent; color: var(--text-dim); font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.consult-dism-toggle:hover { border-color: var(--accent); color: var(--accent); }
.consult-dismissed { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.cr-band { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.cr-band-opt { display: flex; align-items: center; gap: 9px; font-size: 0.95rem; color: var(--text); cursor: pointer; }
.cr-band-opt small { color: var(--text-dim); font-size: 0.8rem; }
.cr-subj-wrap { margin: 2px 0 14px; }
.cr-subj-lbl { display: block; font-size: 0.92rem; color: var(--text); margin-bottom: 8px; }
.cr-subj-lbl small { color: var(--text-dim); font-size: 0.78rem; font-weight: 400; }
.cr-subjects { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-subj-opt { display: flex; align-items: center; gap: 6px; font-size: 0.92rem; color: var(--text); cursor: pointer; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; border-left: 4px solid var(--sc, var(--border)); background: var(--card); }

/* 고객문의 */
.iq-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.iq-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.iq-form input, .iq-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 0.95rem; font-family: inherit; box-sizing: border-box; }
.iq-form textarea { resize: vertical; min-height: 96px; }
.iq-hist-title { font-size: 0.9rem; color: var(--text-dim); margin: 6px 0 10px; }
.iq-list { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; }
.iq-empty { color: var(--text-dim); font-size: 0.88rem; text-align: center; padding: 14px 0; }
.iq-item { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: var(--card); }
.iq-item-head { display: flex; align-items: center; gap: 8px; }
.iq-item-subj { font-weight: 700; font-size: 0.94rem; }
.iq-st { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.iq-st.open { background: rgba(245, 158, 11, 0.16); color: #d97706; }
.iq-st.prog { background: rgba(59, 130, 246, 0.16); color: #2563eb; }
.iq-st.done { background: rgba(21, 163, 74, 0.16); color: #15a34a; }
.iq-item-meta { font-size: 0.78rem; color: var(--text-dim); margin: 4px 0 6px; }
.iq-item-body { font-size: 0.9rem; color: var(--text); white-space: pre-wrap; line-height: 1.5; }
.iq-item-answer { margin-top: 10px; padding: 9px 12px; border-radius: 9px; background: rgba(59, 130, 246, 0.08); border-left: 3px solid #2563eb; }
.iq-ans-label { font-size: 0.76rem; font-weight: 700; color: #2563eb; margin-bottom: 4px; }
.iq-ans-body { font-size: 0.9rem; color: var(--text); white-space: pre-wrap; line-height: 1.5; }

/* 통계 탭 (신규 등록 / 퇴원 건수) */
#statsView { padding-top: 4px; }
.flow-stats { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.flow-title { font-size: 1rem; margin: 0; }
.flow-period { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.flow-per-btn { font-size: 0.85rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-dim); font-family: inherit; cursor: pointer; }
.flow-per-btn:hover { border-color: var(--accent); color: var(--text); }
.flow-per-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.flow-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-dim); }
.flow-custom input { padding: 6px 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; }
.flow-custom .btn-add { padding: 6px 14px; }
.flow-range { font-size: 0.88rem; font-weight: 700; color: var(--text-dim); }
.flow-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.flow-panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px; display: flex; flex-direction: column; gap: 13px; }
.flow-panel.new { border-left: 4px solid #12a150; }
.flow-panel.wd { border-left: 4px solid #e06a5a; }
.flow-panel-head { display: flex; align-items: baseline; justify-content: space-between; }
.flow-panel-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.flow-panel-total { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.flow-panel-total small { font-size: 0.85rem; font-weight: 600; color: var(--text-dim); margin-left: 2px; }
.flow-sub { display: flex; flex-direction: column; gap: 6px; }
.flow-sub-label { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); }
.flow-sub-label small { font-weight: 500; }
.flow-bar-row { display: grid; grid-template-columns: 40px 1fr 28px; align-items: center; gap: 9px; }
.flow-bar-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.flow-bar-track { height: 14px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.flow-bar-fill { display: block; height: 100%; border-radius: 999px; min-width: 2px; transition: width 0.3s; }
.flow-bar-val { font-size: 0.85rem; font-weight: 700; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.flow-none, .flow-loading { color: var(--text-dim); font-size: 0.88rem; padding: 4px 0; }

/* 학생관리 통계 */
.counsel-stats { margin-top: 12px; margin-bottom: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.stat-title { font-size: 0.9rem; font-weight: 800; color: var(--text-dim); }
.wd-stat-btn { margin-left: 8px; font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-dim); cursor: pointer; }
.wd-stat-btn:hover { border-color: var(--accent); color: var(--accent); }
/* 퇴원 통계 모달 */
.wd-filters { display: flex; flex-direction: column; gap: 9px; margin: 4px 0 14px; }
.wd-frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wd-flabel { font-size: .8rem; font-weight: 700; color: var(--text-dim); min-width: 32px; }
.wd-frow input[type="month"] { padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .85rem; }
.wd-tilde { color: var(--text-dim); }
.wd-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.wd-chip { font-size: .8rem; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; white-space: nowrap; }
.wd-chip.sel { background: var(--sc, var(--accent)); color: #fff; border-color: transparent; font-weight: 700; }
.wd-summary { font-size: .95rem; padding: 10px 12px; background: var(--bg-soft, #faf7f2); border-radius: 10px; margin-bottom: 12px; }
.wd-summary b { color: var(--accent); font-weight: 800; }
.wd-range { color: var(--text-dim); font-size: .82rem; font-weight: 500; }
.wd-section-label { font-size: .76rem; font-weight: 700; color: var(--text-dim); margin: 12px 0 6px; letter-spacing: .03em; }
.wd-months { display: flex; flex-direction: column; gap: 5px; }
.wd-mrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.wd-mrow.wd-click { cursor: pointer; }
.wd-mrow.wd-click:hover .wd-bar-fill { filter: brightness(1.08); }
.wd-caret { font-size: .68rem; color: var(--text-dim); display: inline-block; transition: transform .15s; }
.wd-mrow.open .wd-caret { transform: rotate(180deg); }
.wd-detail { flex-basis: 100%; margin: 3px 0 5px 58px; display: flex; flex-direction: column; gap: 3px; padding: 7px 11px; background: var(--bg-soft, #f2ede4); border-radius: 8px; }
.wd-detail-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .82rem; }
.wd-d-name { font-weight: 600; color: var(--text); }
.wd-d-meta { color: var(--text-dim); font-size: .8rem; text-align: right; }
.wd-d-subj { color: var(--sc, var(--accent)); font-weight: 700; }
.wd-m { font-size: .83rem; color: var(--text); min-width: 58px; font-variant-numeric: tabular-nums; }
.wd-bar { flex: 1; height: 16px; background: var(--bg-soft, #f0ebe3); border-radius: 5px; overflow: hidden; }
.wd-bar-fill { display: block; height: 100%; background: var(--accent, #db6d28); border-radius: 5px; transition: width .2s; }
.wd-c { font-size: .83rem; font-weight: 700; color: var(--text); min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.wd-sum-line { font-size: .88rem; color: var(--text); line-height: 1.6; }
.wd-sum-line b { color: var(--accent); }
.stat-total { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.02rem; font-weight: 700; }
.stat-total-num b { color: var(--accent); font-size: 1.15rem; }
.stat-total-dot { color: var(--text-dim); }
.stat-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stat-group-label { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); min-width: 62px; }
.stat-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.stat-chip { font-size: 0.85rem; padding: 4px 11px; border-radius: 999px; background: var(--sc, var(--bg-soft)); color: #2b2723; border: 1px solid var(--border); white-space: nowrap; }
.stat-chip.grade { background: var(--bg-soft); color: var(--text); }
.stat-chip b { font-weight: 800; }
.stat-none { font-size: 0.85rem; color: var(--text-dim); }
.stat-hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.stat-chip { cursor: pointer; font-family: inherit; transition: box-shadow 0.12s, transform 0.12s; }
.stat-chip:hover { transform: translateY(-1px); }
.stat-chip.sel { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); font-weight: 700; }
.stat-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.95rem; color: var(--text); min-height: 20px; }
.stat-filter-hint { font-size: 0.85rem; color: var(--text-dim); }
.stat-filter-num { color: var(--accent); font-size: 1.15rem; }
.stat-clear { background: none; border: 1px solid var(--border); color: var(--text-dim); font-family: inherit; font-size: 0.76rem; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.stat-clear:hover { border-color: var(--accent); color: var(--accent); }
.cs-form-row input, .cs-form-row select { flex: 1; min-width: 140px; font-family: inherit; font-size: 0.95rem; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); }
.cs-form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-classpick { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.cscp-lbl { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); }
.cscp-lbl small { font-weight: 500; }
.cscp-subj { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cscp-sname { font-weight: 800; font-size: 0.82rem; color: var(--sc); min-width: 36px; }
.cscp-cls { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; cursor: pointer; }
.cscp-cls input { margin: 0; }
.cscp-cls:has(input:checked) { background: var(--accent-soft, rgba(99,102,241,0.12)); border-color: var(--accent); }
.cscp-none { font-size: 0.85rem; color: var(--text-dim); padding: 2px 0; }
.cscp-toggle { align-self: flex-start; margin-top: 2px; padding: 3px 8px; font-size: 0.8rem; background: none; border: none; color: var(--accent); cursor: pointer; font-family: inherit; }
.cscp-toggle:hover { text-decoration: underline; }
/* 알림 켜기/끄기 버튼을 텍스트 아래 전체폭으로 — ⚙️ 설정 기어(우상단)와 세로로 겹쳐 '같이 눌리는' 혼동 방지 */
.notify-device { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.notify-device-txt { display: flex; flex-direction: column; gap: 2px; }
.notify-device-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.notify-device-sub { font-size: 0.8rem; color: var(--text-dim); }
.notify-device .btn-add, .notify-device .btn-ghost { white-space: nowrap; width: 100%; }
.notify-panel { margin-top: 4px; }
.notify-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; transition: opacity 0.2s; }
.notify-type { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--text); cursor: pointer; }
.notify-type input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.notify-hint { font-size: 0.82rem; color: var(--text-dim); margin: 10px 0 0; }

/* ===== 출석 체크 (릴리즈 기능) ===== */
.attend-page { max-width: 820px; }
.attend-topbar h1 { margin: 0 0 10px; font-size: 1.4rem; }
.attend-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.attend-controls input[type="date"] { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text); font-family: inherit; }
.attend-sub { color: var(--text-dim); font-size: 0.86rem; margin: 0 0 16px; }
.attend-sub b { color: var(--text); }
.attend-empty { color: var(--text-dim); text-align: center; padding: 40px 12px; }
.att-class { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: var(--card); }
.att-class-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.att-cl-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); font-size: 0.9rem; }
.att-cl-name { font-weight: 800; border-left: 3px solid var(--sc, #888); padding-left: 8px; }
.att-cl-cnt { margin-left: auto; color: var(--text-dim); font-size: 0.82rem; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.att-row:first-child { border-top: none; }
.att-row.marked { background: rgba(200,60,40,0.05); }
.att-name { min-width: 74px; font-weight: 600; }
.att-btns { display: inline-flex; gap: 5px; }
.att-st { border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-dim); border-radius: 999px; padding: 5px 12px; font-family: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer; }
.att-st.on.att-ok { background: #16a34a; color: #fff; border-color: #16a34a; }
.att-st.on.att-late { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.att-st.on.att-absent { background: #dc2626; color: #fff; border-color: #dc2626; }
.att-st.on.att-early { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.att-reason { flex: 1 1 130px; min-width: 110px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.84rem; }

/* 출석 체크 — 확장(과제/수업내용/다음숙제/비고/일괄) */
.att-bulk { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; flex-wrap: wrap; }
.att-bulk-lbl { font-size: 0.74rem; font-weight: 800; color: var(--text-dim); margin-right: 2px; }
.att-bulkbtn { border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 8px; padding: 5px 10px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.att-bulkbtn:hover { border-color: var(--accent); color: var(--text); }
.att-class-head { flex-wrap: wrap; }
.att-class-fields { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.015); flex-wrap: wrap; }
.att-cf { display: flex; flex-direction: column; gap: 3px; flex: 1 1 220px; min-width: 160px; font-size: 0.76rem; color: var(--text-dim); font-weight: 700; }
.att-cf input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.88rem; font-weight: 400; }
.att-hwgrp { display: inline-flex; align-items: center; gap: 4px; }
.att-lbl { font-size: 0.76rem; color: var(--text-dim); font-weight: 700; margin-right: 2px; }
.att-hw { border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-dim); border-radius: 7px; width: 30px; padding: 5px 0; font-family: inherit; font-size: 0.84rem; font-weight: 800; cursor: pointer; }
.att-hw.on.att-hw-o { background: #16a34a; color: #fff; border-color: #16a34a; }
.att-hw.on.att-hw-x { background: #dc2626; color: #fff; border-color: #dc2626; }
.att-note { flex: 1 1 120px; min-width: 90px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.84rem; }

/* 출석 체크 — 담당강사·시간·과제절반 */
.att-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.att-toggle { border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); border-radius: 999px; padding: 7px 14px; font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.att-toggle.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.att-toolhint { color: var(--text-dim); font-size: 0.78rem; }
.att-tsel { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 8px; padding: 4px 8px; font-family: inherit; font-size: 0.82rem; }
.att-tname { font-size: 0.78rem; font-weight: 700; color: var(--accent); background: rgba(192,57,43,0.08); border-radius: 7px; padding: 2px 6px; }
.att-time { width: 82px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.8rem; margin-left: 4px; }
.att-hw.on.att-hw-half { background: #d97706; color: #fff; border-color: #d97706; }

/* 출석 — 담당지정 버튼·다음숙제 개별·지정 그리드 */
.att-assignbtn { border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); border-radius: 999px; padding: 7px 14px; font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.att-assignbtn:hover { border-color: var(--accent); }
.att-hn { flex: 1 1 130px; min-width: 100px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.84rem; }
.assign-card { max-width: 760px; width: 94vw; }
.assign-grid { overflow-x: auto; margin-top: 8px; }
.ag-table { display: table; border-collapse: collapse; min-width: 100%; }
.ag-row { display: flex; }
.ag-head { position: sticky; top: 0; background: var(--bg-soft); font-weight: 800; }
.ag-cls { flex: 0 0 116px; padding: 8px 10px; border: 1px solid var(--border); font-size: 0.86rem; white-space: nowrap; position: sticky; left: 0; background: var(--card); z-index: 1; }
.ag-head .ag-cls { background: var(--bg-soft); }
.ag-cell { flex: 0 0 92px; padding: 5px 6px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.ag-cell.ag-off { color: var(--text-dim); }
.ag-sel { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 4px 4px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.78rem; }
/* 과목 탭 */
.ag-subjtabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.ag-subjtab { border: 1.5px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 999px; padding: 5px 16px; font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.ag-subjtab.on { background: var(--sc, var(--accent)); border-color: var(--sc, var(--accent)); color: #fff; }
/* 복수 담당강사 셀 */
.ag-multi { position: relative; padding: 3px 4px; cursor: pointer; }
.ag-multi > summary { list-style: none; width: 100%; text-align: center; font-size: 0.78rem; line-height: 1.25; padding: 4px 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); overflow-wrap: anywhere; }
.ag-multi > summary::-webkit-details-marker { display: none; }
.ag-multi[open] > summary { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.ag-none { color: var(--text-dim); }
.ag-menu { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); z-index: 20; min-width: 130px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; }
.ag-opt { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 7px; font-size: 0.86rem; white-space: nowrap; cursor: pointer; }
.ag-opt:hover { background: var(--bg-soft); }
.ag-opt input { width: 16px; height: 16px; accent-color: var(--accent); }
/* 본인 담당 체크(self) */
.sa-modebar { display: inline-flex; gap: 0; border: 1.5px solid var(--border); border-radius: 999px; padding: 2px; margin-bottom: 10px; }
.sa-mode { border: 0; background: transparent; color: var(--text-dim); border-radius: 999px; padding: 5px 16px; font-family: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
.sa-mode.on { background: var(--accent); color: #fff; }
.sa-cell { flex-direction: column; gap: 3px; cursor: pointer; user-select: none; }
.sa-cell input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.sa-cell.on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.sa-co { font-size: 0.62rem; color: var(--text-dim); line-height: 1.05; text-align: center; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-reason { flex: 1 1 130px; min-width: 90px; }
.ai-hwreason { flex: 1 1 120px; min-width: 88px; }
/* ===== 주간 출결 보고서 ===== */
.wr-controls { flex-wrap: wrap; gap: 10px; align-items: center; }
.wr-subjtabs { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.wr-subjtab { border: 1.5px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 999px; padding: 5px 14px; font-family: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
.wr-subjtab.on { background: var(--sc, var(--accent)); border-color: var(--sc, var(--accent)); color: #fff; }
.wr-weeknav { display: inline-flex; align-items: center; gap: 8px; }
.wr-weeknav b { min-width: 96px; text-align: center; font-variant-numeric: tabular-nums; }
.wr-body { margin-top: 6px; }
/* 실제 출력물(흰 종이)처럼 미리보기 — 라이트/다크 공통, 과목색(--wrc)로 헤더 틴트 */
.wr-doc { background: #fff; color: #1a1a1a; border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.wr-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; color: #111; }
.wr-class { margin-bottom: 24px; }
.wr-clsname { font-size: 1.02rem; font-weight: 800; margin: 0 0 8px; color: #111; }
.wr-tscroll { overflow-x: auto; }
.wr-table { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
.wr-table th, .wr-table td { border: 1px solid #999; padding: 5px 7px; text-align: center; vertical-align: middle; word-break: break-word; color: #1a1a1a; }
.wr-table th { background: var(--wrh, #eee); font-weight: 700; }
.wr-st { white-space: nowrap; }   /* 학생 이름 줄바꿈 방지(칸이 이름 폭에 맞춰 넓어짐) */
.wr-date { background: var(--wrh, #eee); font-weight: 700; white-space: nowrap; }
.wr-time { display: block; font-size: 0.66rem; color: #555; font-weight: 400; }
.wr-track { display: block; font-size: 0.64rem; font-weight: 800; color: #b4531f; margin-top: 2px; }
.att-track-cell { font-size: 0.82rem; font-weight: 700; color: #b4531f; white-space: nowrap; }
.wr-fld { background: var(--wrh, #eee); font-weight: 700; white-space: nowrap; }
.wr-span { background: #fff; }
.wr-att { background: var(--wrr, #f7f7f7); }
.wr-closed { background: #f3efe6; color: #8a6d3b; font-weight: 700; }
.wr-table .wr-x { color: #c0392b; font-weight: 700; }
.wr-table .wr-blue { color: #1d4ed8; font-weight: 700; }
.wr-table .wr-good { color: #15803d; font-weight: 700; }
.wr-na { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cline x1='0' y1='100' x2='100' y2='0' stroke='%23111' stroke-width='0.75' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }

/* ===== 출석 체크 — 심플 재설계 ===== */
.att-toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.att-class { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; background: var(--card); overflow: hidden; }
.att-class-head { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.att-cl-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.88rem; color: var(--text-dim); }
.att-cl-name { font-weight: 800; font-size: 1rem; border-left: 3px solid var(--sc, #888); padding-left: 9px; }
.att-cl-cnt { color: var(--text-dim); font-size: 0.82rem; }
.att-dttoggle { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 0.82rem; font-weight: 700; color: var(--text-dim); cursor: pointer; }
.att-dttoggle input { accent-color: var(--accent); width: 15px; height: 15px; }
/* 수업종류(교재) — 출석 헤더: 오늘 수업 종류 입력 + 이 요일 기본 체크 */
.att-track { display: inline-flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.att-track-lbl { font-size: 0.88rem; line-height: 1; }
.att-track-in { width: 88px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 7px; font-family: inherit; font-size: 0.8rem; font-weight: 700; background: var(--bg); color: var(--text); }
.att-track-in:focus { border-color: var(--accent); outline: none; }
.att-track-def { display: inline-flex; align-items: center; gap: 2px; font-size: 0.7rem; font-weight: 700; color: var(--text-dim); cursor: pointer; white-space: nowrap; }
.att-track-def input { width: 13px; height: 13px; accent-color: var(--accent); }
.att-dtn { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.att-dtn-btn { width: 22px; height: 22px; line-height: 1; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 6px; font-size: 0.9rem; font-weight: 700; cursor: pointer; padding: 0; }
.att-dtn-btn:hover { border-color: var(--accent); color: var(--accent); }
.att-dtn-n { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); min-width: 26px; text-align: center; }
.ai-dt { flex: 1 1 70px; min-width: 56px; }
.ar-dts { display: flex; gap: 5px; flex: 1 1 140px; min-width: 120px; }
.ar-dts .ai-dt { flex: 1 1 0; min-width: 0; text-align: center; }
.dt-cell { display: inline-flex; align-items: center; gap: 3px; flex: 1 1 0; min-width: 0; }
.dt-rt { flex: none; width: 24px; height: 28px; border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 6px; font-size: 0.72rem; font-weight: 800; cursor: pointer; padding: 0; }
.dt-rt:hover { border-color: #dc2626; color: #dc2626; }
.dt-cell.retest .ai-dt { border-color: #dc2626; background: rgba(220,38,38,0.07); color: #b91c1c; font-weight: 700; }
.dt-cell.retest .dt-rt { background: #dc2626; border-color: #dc2626; color: #fff; }
.att-dtlabels { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; flex: 1 1 180px; min-width: 0; margin-left: 4px; }
.att-dtl-lead { flex: none; white-space: nowrap; font-size: 0.78rem; font-weight: 700; color: var(--text-dim); }
.att-dtl { flex: 1 1 0; min-width: 0; font-size: 0.82rem; padding: 5px 9px; }
/* 휴강 */
.att-closebtn { border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 8px; padding: 5px 11px; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.att-dttoggle + .att-closebtn { margin-left: 0; }
.att-closebtn:not(.on):hover { border-color: #b45309; color: #b45309; }
.att-closebtn.on { margin-left: auto; background: #b45309; border-color: #b45309; color: #fff; }
.att-class.att-closed { opacity: 0.96; }
.att-class.att-closed .att-cl-name { border-left-color: #b45309; }
.att-closed-body { display: flex; align-items: center; gap: 10px; padding: 16px; }
.att-closed-tag { font-weight: 800; color: #b45309; background: rgba(180,83,9,0.12); border: 1px solid rgba(180,83,9,0.3); border-radius: 8px; padding: 5px 12px; }
.att-closed-reason { color: var(--text); font-weight: 600; }
.att-cfields { display: flex; gap: 8px; padding: 10px 16px; flex-wrap: wrap; }
.att-cfields .ai-wide { flex: 1 1 240px; }
.att-bulkrow { display: flex; gap: 6px; padding: 0 16px 10px; }
.att-bulkbtn { border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-dim); border-radius: 999px; padding: 5px 12px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.att-bulkbtn:active { transform: scale(0.96); }
/* 학생 행: 2줄(출석 / 세부) */
.ar { padding: 11px 16px; border-top: 1px solid var(--border); }
.ar-mark { background: rgba(217,119,6,0.05); }
.ar-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ar-bot { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-left: 2px; flex-wrap: wrap; }
.ar-name { font-weight: 700; font-size: 0.95rem; min-width: 66px; }
.ar-lbl { font-size: 0.74rem; color: var(--text-dim); font-weight: 700; }
/* 세그먼트 버튼(연결된 pill) */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg .ap { border: none; border-left: 1px solid var(--border); }
.seg .ap:first-child { border-left: none; }
.ap { background: transparent; color: var(--text-dim); font-family: inherit; font-size: 0.84rem; font-weight: 700; padding: 6px 13px; cursor: pointer; }
.seg-sm .ap { padding: 5px 0; width: 32px; text-align: center; font-size: 0.82rem; }
.ap.on.ap-ok { background: #16a34a; color: #fff; }
.ap.on.ap-late { background: #f59e0b; color: #fff; }
.ap.on.ap-absent { background: #dc2626; color: #fff; }
.ap.on.ap-early { background: #7c3aed; color: #fff; }
.ap.on.ap-hw-o { background: #16a34a; color: #fff; }
.ap.on.ap-hw-half { background: #d97706; color: #fff; }
.ap.on.ap-hw-x { background: #dc2626; color: #fff; }
/* 라이트 인풋 */
.ai { border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.85rem; padding: 6px 10px; }
.ai:focus { outline: none; border-color: var(--accent); }
.ai-time { width: 50px; flex: 0 0 auto; padding: 5px 6px; }
.ai-hn { flex: 1 1 120px; min-width: 90px; }
.ai-prog { flex: 1 1 120px; min-width: 90px; }
.ai-last { flex: 1 1 100px; min-width: 80px; }

/* 출석 입력행 — 항목별 라벨 그룹(출결/과제/수업준비/수업태도) + 개별진도·개별과제 체크박스 + 비고 = 한 줄. 개별 체크 시 입력칸 펼침, 사유는 해당 드롭다운 바로 아래. */
.ar { display: flex; align-items: flex-start; gap: 6px 8px; flex-wrap: wrap; padding: 9px 14px; border-top: 1px solid var(--border); }
.ar-name { font-weight: 700; font-size: 0.93rem; min-width: 48px; flex: 0 0 auto; align-self: flex-start; padding-top: 15px; }
.arg { display: flex; flex-direction: column; gap: 2px; align-items: stretch; flex: 0 1 auto; min-width: 78px; max-width: 120px; }
.arg-lbl { font-size: 0.64rem; font-weight: 800; color: var(--text-dim); letter-spacing: 0.02em; padding-left: 2px; white-space: nowrap; line-height: 1.2; }
.arg-ctl { display: flex; align-items: center; gap: 5px; }
.arg-ctl > .att-sel { flex: 1 1 auto; min-width: 68px; max-width: 100%; }
.arg > .ai { width: 100%; min-width: 0; flex: none; box-sizing: border-box; }
/* 사유칸: 드롭다운을 넓히지 않도록 좁은 고정폭(내용 길면 스크롤 입력) */
.arg > .ai-reason, .arg > .ai-hwreason, .arg > .ai-prepreason, .arg > .ai-atdreason { width: 92px; }
/* 개별진도/개별과제 체크박스 그룹 — 평소엔 체크박스만(한 줄에 정리), 체크 시 입력칸 아래로 펼침 */
.arg-ic { min-width: 0; max-width: none; padding-top: 15px; }   /* 드롭다운 컨트롤 줄에 맞춰 체크박스 정렬(라벨 높이만큼) */
.arg-chkbox { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--text-dim); cursor: pointer; white-space: nowrap; user-select: none; }
.arg-chkbox input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: none; }
.arg-ic > .ai { width: 108px; min-width: 0; margin-top: 3px; }   /* 개별진도/개별과제 입력칸도 좁게(내용 길면 스크롤) */
.arg-note { flex: 1 1 110px; max-width: none; min-width: 96px; }
.arg-note > .ai { width: 100%; }
.arg-note .ar-dts { width: 100%; flex: 0 0 auto; }   /* 세로(column) 그룹 안에서 flex-basis 140px가 높이로 자라지 않게 */
.att-sel { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-family: inherit; font-size: 0.85rem; font-weight: 700; background: var(--bg); color: var(--text); cursor: pointer; }
.att-hwsel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 과제 칸: 직전수업 과제 리마인더(긴 텍스트) 말줄임 */
.att-sel.st-ok { background: rgba(22,163,74,0.12); color: #15803d; border-color: rgba(22,163,74,0.35); }
.att-sel.st-online { background: rgba(8,145,178,0.12); color: #0e7490; border-color: rgba(8,145,178,0.4); }
.att-sel.st-late { background: rgba(245,158,11,0.15); color: #b45309; border-color: rgba(245,158,11,0.4); }
.att-sel.st-absent { background: rgba(220,38,38,0.12); color: #b91c1c; border-color: rgba(220,38,38,0.35); }
.att-sel.st-early { background: rgba(124,58,237,0.12); color: #6d28d9; border-color: rgba(124,58,237,0.35); }
.att-hwsel.hw-o { background: rgba(22,163,74,0.10); color: #15803d; }
.att-hwsel.hw-half { background: rgba(217,119,6,0.12); color: #b45309; }
.att-hwsel.hw-x { background: rgba(220,38,38,0.10); color: #b91c1c; }
.att-sel.st-none, .att-hwsel.hw-none { color: var(--text-dim); background: var(--bg); }
.att-hwsel.hw-none { color: var(--text-dim); }
/* 수업준비(우수/보통/미흡)·수업태도(상/중/하) 드롭다운 색 — 과제와 동일 톤(우수·상=초록, 보통·중=슬레이트, 미흡·하=빨강) */
.att-prepsel.prep-good, .att-atdsel.atd-good { background: rgba(22,163,74,0.10); color: #15803d; }
.att-prepsel.prep-mid, .att-atdsel.atd-mid { background: rgba(100,116,139,0.12); color: #475569; }
.att-prepsel.prep-bad, .att-atdsel.atd-bad { background: rgba(220,38,38,0.10); color: #b91c1c; }
.att-prepsel.prep-none, .att-atdsel.atd-none { color: var(--text-dim); background: var(--bg); }
.ai-prepreason, .ai-atdreason { flex: 1 1 120px; min-width: 88px; }

/* 출석 — 저장 토스트 · 지각/조퇴 분 입력칸 */
.att-toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px); background: #16a34a; color: #fff; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; box-shadow: 0 6px 20px rgba(0,0,0,0.28); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 3000; }
/* 출근 리마인더 배너(학원 WiFi 접속 + 미출근) */
.punch-remind { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3200; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--accent); border-left: 4px solid var(--accent); box-shadow: 0 8px 28px rgba(0,0,0,0.22); border-radius: 14px; padding: 12px 14px; max-width: min(94vw, 460px); animation: prPop .25s ease; }
@keyframes prPop { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.punch-remind .pr-ic { font-size: 1.5rem; flex: none; }
.punch-remind .pr-txt { font-size: 0.9rem; line-height: 1.35; color: var(--text); flex: 1; min-width: 0; word-break: keep-all; }
.punch-remind .pr-txt small { color: var(--text-dim); font-size: 0.76rem; }
.punch-remind .pr-go { flex: none; background: var(--accent); color: #fff; border: none; border-radius: 9px; padding: 9px 14px; font-family: inherit; font-weight: 700; font-size: 0.86rem; cursor: pointer; white-space: nowrap; }
.punch-remind .pr-go:hover { filter: brightness(1.06); }
.punch-remind .pr-go:disabled { opacity: 0.6; cursor: default; }
.punch-remind .pr-x { flex: none; background: none; border: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; padding: 2px 4px; }
/* 모바일: 한 줄에 다 넣으면 텍스트가 글자단위로 쪼개짐 → 아이콘+문구 윗줄, 출근처리 버튼 전체폭 아랫줄.
   ✕는 카드 우상단에 절대배치해 문구가 가로폭을 최대로 쓰게 함(좁은 폰에서 부제 줄바꿈 최소화). */
@media (max-width: 460px) {
  .punch-remind {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    transform: none; max-width: none; width: auto;
    display: grid; grid-template-columns: auto 1fr;
    grid-template-areas: "ic txt" "go go"; gap: 8px 10px; padding: 13px 15px;
  }
  .punch-remind .pr-ic { grid-area: ic; align-self: start; font-size: 1.35rem; }
  .punch-remind .pr-txt { grid-area: txt; align-self: center; padding-right: 20px; }   /* ✕ 자리 */
  .punch-remind .pr-x { position: absolute; top: 9px; right: 11px; padding: 4px; font-size: 1.05rem; line-height: 1; }
  .punch-remind .pr-go { grid-area: go; width: 100%; padding: 12px; font-size: 0.95rem; }
}
/* 아주 좁은 폰(≤340px): 여백·아이콘 더 조여 문구 공간 확보 */
@media (max-width: 340px) {
  .punch-remind { padding: 12px; gap: 7px 8px; }
  .punch-remind .pr-ic { font-size: 1.2rem; }
  .punch-remind .pr-txt { font-size: 0.86rem; }
  .punch-remind .pr-txt small { font-size: 0.73rem; }
}
.att-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.att-toast.err { background: #dc2626; max-width: min(92vw, 520px); white-space: normal; text-align: center; border-radius: 14px; }
.ai-time { width: 96px; }

/* 출석 — 이동 배지 · 반 이동 지정 */
.ar-moved { display: inline-block; margin-left: 6px; font-size: 0.66rem; font-weight: 800; color: #fff; background: #0ea5b7; border-radius: 5px; padding: 1px 5px; vertical-align: middle; }
.att-hwsel.hw-prevhw { color: var(--text-dim); font-style: italic; opacity: 0.72; } /* 과제 미입력 자리에 직전 수업 과제 연하게 표시 */
.move-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 10px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.move-form select { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.85rem; }
.move-arrow { color: var(--text-dim); font-weight: 800; }
.move-list { display: flex; flex-direction: column; gap: 7px; max-height: 46vh; overflow-y: auto; }
.move-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 0.88rem; }
.move-item span { flex: 1; }
.move-del { border: 1px solid var(--border); background: var(--bg-soft); color: #b91c1c; border-radius: 7px; padding: 4px 10px; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.move-empty { color: var(--text-dim); text-align: center; padding: 24px; }

/* 출석 — 탭 + 반 관리 */
.attend-tabs { display: flex; gap: 6px; margin: 8px 0 14px; }
.attab { border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-dim); border-radius: 999px; padding: 8px 18px; font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.attab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 미완료 과제 관리뷰 */
#incompleteHwModal .modal-card { max-width: 560px; }   /* 미완료 과제 목록이 넉넉히 보이도록 */
.ihw-list { display: flex; flex-direction: column; gap: 14px; }
.ihw-scope { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 12px; background: var(--bg-soft, #f2ede4); border: 1px solid var(--border); border-radius: 10px; }
.ihw-scope-btn { padding: 6px 13px; border: none; border-radius: 7px; background: transparent; color: var(--text-dim); font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ihw-scope-btn.on { background: var(--card, #fff); color: var(--accent, #db6d28); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.ihw-grade { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ihw-ghead { width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: var(--bg-soft); border: none; cursor: pointer; font-family: inherit; font-size: 0.98rem; font-weight: 800; color: var(--text); text-align: left; }
.ihw-gtri { color: var(--text-dim); font-size: 0.8rem; }
.ihw-gcnt { margin-left: auto; font-size: 0.78rem; font-weight: 600; color: var(--text-dim); }
.ihw-gbody { padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ihw-stu { border-top: 1px solid var(--border); padding-top: 10px; }
.ihw-stu:first-child { border-top: none; padding-top: 4px; }
.ihw-stu-name { font-weight: 800; font-size: 0.95rem; margin-bottom: 6px; }
.ihw-stu-cnt { font-size: 0.74rem; font-weight: 700; color: var(--accent, #c0392b); margin-left: 4px; }
.ihw-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ihw-item + .ihw-item { border-top: 1px dashed var(--border); }
.ihw-item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ihw-hw { font-weight: 700; font-size: 0.9rem; }
.ihw-meta { font-size: 0.76rem; color: var(--text-dim); }
.ihw-badge { flex-shrink: 0; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.ihw-badge.x { background: color-mix(in srgb, #dc2626 15%, transparent); color: #b91c1c; }
.ihw-badge.half { background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; }
.ihw-badge.vid { background: color-mix(in srgb, #0891b2 15%, transparent); color: #0e7490; }
.ihw-item.ihw-video { opacity: 0.97; }
.ihw-done { flex-shrink: 0; border: 1px solid var(--accent, #c0392b); background: var(--card); color: var(--accent, #c0392b); border-radius: 8px; padding: 6px 12px; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: background .12s, color .12s; }
.ihw-done:hover { background: var(--accent, #c0392b); color: #fff; }
.ihw-done:disabled { opacity: 0.6; cursor: default; }
.cm-import { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); }
.cm-rosterhint { margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); color: var(--text-dim); font-size: 0.85rem; }
.cm-managed { color: #15803d; font-weight: 700; font-size: 0.85rem; }
.cm-notyet { color: var(--text-dim); font-size: 0.85rem; }
.cm-import button { margin-left: auto; }
.cm-subjtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.cm-subjtab { border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 8px; padding: 6px 16px; font-family: inherit; font-weight: 700; cursor: pointer; }
.cm-subjtab.on { background: var(--sc, #888); color: #fff; border-color: var(--sc, #888); }
.cm-addclass { display: flex; gap: 8px; margin-bottom: 14px; }
.cm-addclass input { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.cm-class { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; background: var(--card); overflow: hidden; }
.cm-class-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.cm-clsname { font-size: 1rem; }
.cm-cnt { color: var(--text-dim); font-size: 0.82rem; }
.cm-delclass { margin-left: auto; border: 1px solid var(--border); background: var(--bg); color: #b91c1c; border-radius: 7px; padding: 4px 10px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.cm-closeclass { margin-left: auto; border: 1px solid rgba(8,145,178,0.4); background: rgba(8,145,178,0.08); color: #0e7490; border-radius: 7px; padding: 4px 10px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.cm-closeclass + .cm-delclass { margin-left: 6px; }
.cm-reopenclass { margin-left: auto; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 7px; padding: 4px 10px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.cm-reopenclass + .cm-delclass { margin-left: 6px; }
.cm-renameclass { margin-left: auto; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 7px; padding: 4px 10px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.cm-renameclass + .cm-closeclass { margin-left: 6px; }
.cm-closed-sec { margin-top: 18px; }
.cm-closed-head { font-size: 0.86rem; font-weight: 800; color: #0e7490; margin: 0 2px 8px; }
.cm-closed-head small { color: var(--text-dim); font-weight: 600; }
.cm-class-closed { opacity: 0.72; }
.cm-class-closed .cm-clsname { color: var(--text-dim); }
.cc-bulk { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.cc-bulk-lbl { font-size: 0.82rem; color: var(--text-dim); font-weight: 700; }
.cc-students { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.cc-row { display: flex; align-items: center; gap: 10px; }
.cc-name { flex: 1 1 auto; font-weight: 700; font-size: 0.92rem; }
.cc-dec { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-family: inherit; font-size: 0.85rem; background: var(--bg); color: var(--text); cursor: pointer; }
.cc-empty { color: var(--text-dim); font-size: 0.88rem; }
.cm-sched { display: flex; gap: 6px; padding: 12px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.cm-day { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 0.72rem; color: var(--text-dim); font-weight: 700; }
.cm-time { width: 92px; border: 1px solid var(--border); border-radius: 7px; padding: 5px 6px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.76rem; text-align: center; }
.cm-room { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cm-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.cm-bulkroom { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.85rem; }
.cm-bulkdays { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cm-bulkchk { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: var(--text-dim); cursor: pointer; }
.cm-bulkchk:has(input:checked) { background: var(--accent-soft, rgba(99,102,241,0.12)); border-color: var(--accent); color: var(--text); }
.cm-bulkapply { padding: 5px 12px; font-size: 0.82rem; }
.cm-room-lbl { font-size: 0.85rem; font-weight: 700; color: var(--text-dim); }
.cm-roomsel { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.88rem; }
.cm-room-hint { font-size: 0.76rem; color: var(--text-dim); }
.cm-rmwrap { display: flex; flex-direction: column; align-items: stretch; gap: 3px; margin-top: 2px; width: 92px; }
.cm-rmchip { display: inline-flex; align-items: center; justify-content: space-between; gap: 2px; padding: 2px 4px 2px 6px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 0.68rem; font-weight: 700; color: var(--text); }
.cm-rmx { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 0.85rem; line-height: 1; padding: 0 1px; }
.cm-rmx:hover { color: #c0392b; }
.cm-rmadd { width: 92px; border: 1px dashed var(--border); border-radius: 6px; padding: 2px 3px; background: var(--card); color: var(--text-dim); font-family: inherit; font-size: 0.68rem; }
.rm-conflict { margin: 8px 0 12px; padding: 10px 14px; border-radius: 10px; background: #fdecec; border: 1px solid #f5b5b5; color: #b02a2a; font-size: 0.85rem; }
:root[data-theme="dark"] .rm-conflict, :root:not([data-theme="light"]) .rm-conflict { background: rgba(192,57,43,0.15); border-color: rgba(192,57,43,0.5); color: #f0a0a0; }
.rm-conflict ul { margin: 6px 0 0; padding-left: 18px; }
.rm-conflict li { margin: 2px 0; }
.tt-c.tt-conflict { background: repeating-linear-gradient(45deg, #f8d3d3, #f8d3d3 6px, #f3bcbc 6px, #f3bcbc 12px); color: #7a1f1f; }
.cm-studs { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 14px; align-items: center; }
.cm-stud { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 0.85rem; }
.cm-studdel { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 0.9rem; line-height: 1; padding: 0 2px; }
.cm-studdel:hover { color: #dc2626; }
.cm-studsel { border: 1px dashed var(--border); border-radius: 999px; padding: 5px 10px; background: var(--bg); color: var(--accent); font-family: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.cm-nostud { color: var(--text-dim); font-size: 0.85rem; }
/* 학생 다중추가 패널 */
.cm-add { margin: 0 14px 12px; }
.cm-add-sum { display: inline-block; list-style: none; border: 1px dashed var(--border); border-radius: 999px; padding: 6px 14px; color: var(--accent); font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.cm-add-sum::-webkit-details-marker { display: none; }
.cm-add[open] .cm-add-sum { background: var(--bg-soft); }
.cm-add-panel { margin-top: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--bg); }
.cm-add-top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.cm-gfilter { border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.86rem; font-weight: 700; }
.cm-add-go { margin-left: auto; }
.cm-add-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px; max-height: 240px; overflow-y: auto; }
.cm-add-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 0.88rem; }
.cm-add-item:hover { background: var(--bg-soft); }
.cm-add-item input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.cm-add-item em { margin-left: auto; font-style: normal; font-size: 0.72rem; color: var(--text-dim); }
.cm-add-empty { color: var(--text-dim); font-size: 0.85rem; padding: 6px; }

/* ===== 기출성적 ===== */
.counsel-toptabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.counsel-toptab { font-size: 1rem; font-weight: 800; padding: 8px 16px; background: transparent; border: none; border-bottom: 3px solid transparent; color: var(--text-dim); cursor: pointer; font-family: inherit; }
.counsel-toptab.active { color: var(--text); border-bottom-color: var(--accent); }
@media (max-width: 680px) {
  /* 학생관리 모바일 — 탭 글자 세로쪼개짐 방지(nowrap) + 상단탭 가로스크롤 / 하위탭 2단 wrap */
  .counsel-head h1 { font-size: 1.3rem; }
  .counsel-toptabs { gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .counsel-toptabs::-webkit-scrollbar { display: none; }
  .counsel-toptab { white-space: nowrap; flex: 0 0 auto; padding: 8px 11px; font-size: 0.92rem; }
  .counsel-tabs { flex-wrap: wrap; gap: 6px; }
  .counsel-tab { white-space: nowrap; padding: 7px 14px; font-size: 0.86rem; }
  .counsel-controls { padding: 11px 12px; }
  .counsel-student-select { min-width: 0; width: 100%; }
  .exam-create-row input { min-width: 0; }
  .exam-head h1 { font-size: 1.2rem; }
  /* 학생 상세 헤더: 사진 위 → 본문 전체폭, 액션버튼은 카드 전체폭에 좌측정렬로 깔끔히 접힘(퇴원처리 넘침 방지) */
  .counsel-student-header { flex-wrap: wrap; }
  .csh-body { flex: 1 1 100%; min-width: 0; }
  .csh-actions { width: 100%; margin-left: 0; margin-top: 6px; justify-content: flex-start; }
  /* 수납 테이블: 고정(sticky) 이름열 폭 축소(고정 112px) → 스크롤되는 금액·상태 영역 더 넓게.
     word-break:keep-all로 이름이 글자단위로 세로로 쪼개지지 않게(과목·결제일 칩만 아래로 줄바꿈) */
  .pay-table td.pay-name, .pay-table th.pay-name { white-space: normal; word-break: keep-all; width: 112px; min-width: 112px; max-width: 112px; line-height: 1.35; }
  .pay-table .pay-subj, .pay-table .pay-billday { margin-left: 0; margin-right: 3px; }
}
.exam-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.exam-head h1 { margin: 0; font-size: 1.35rem; }
.exam-create { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.exam-create-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.exam-create-row select, .exam-create-row input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 0.9rem; background: var(--bg); }
.exam-create-row input { flex: 1; min-width: 180px; }
.exam-pick-label { font-weight: 700; margin-bottom: 8px; }
.exam-pick-label small { color: var(--text-dim); font-weight: 400; }
.exam-pick { display: flex; flex-wrap: wrap; gap: 8px; max-height: 240px; overflow-y: auto; margin-bottom: 12px; }
.exam-pick-item { display: flex; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; cursor: pointer; background: var(--bg); }
.exam-pick-item .epi-grade { color: var(--text-dim); font-size: 0.76rem; font-weight: 600; }
/* 전체 학년(혼합) 선택 시 학년별 그룹 */
.exam-pick-grp { width: 100%; }
.exam-pick-grp + .exam-pick-grp { margin-top: 8px; }
.exam-pick-ghead { font-size: 0.78rem; font-weight: 800; color: var(--text-dim); margin: 4px 0 6px; }
.exam-pick-grp .exam-pick-item { display: inline-flex; margin: 0 6px 6px 0; }
.exam-create-actions { display: flex; gap: 8px; }
.exam-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; margin-bottom: 18px; align-items: stretch; }
.exam-sheet-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 11px 13px 10px; min-width: 0; border: 1px solid var(--border); border-left: 3px solid var(--sc, var(--border)); border-radius: 10px; background: var(--card); cursor: pointer; font-family: inherit; }
.exam-sheet-card.active { border-color: var(--accent); border-left-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.exam-sheet-card .es-title { font-weight: 700; font-size: 0.92rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-sheet-card .es-meta, .exam-sheet-card .es-date { font-size: 0.73rem; color: var(--text-dim); }
.exam-sheet-card .es-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.exam-sheet-card .es-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; }
.exam-sheet-card .es-by { font-size: 0.72rem; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.exam-subj-chips { margin: 0; flex: 1 1 auto; }
.exam-mine-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.exam-empty { color: var(--text-dim); padding: 10px 0; }
.exam-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ex-title-input { font-size: 1.05rem; font-weight: 800; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; background: var(--card); color: var(--text); }
.ex-sub { color: var(--text-dim); font-weight: 700; }
.ex-spacer { flex: 1; }
.ex-danger { color: var(--accent); }
.exam-table-wrap { overflow-x: auto; }
.exam-table { border-collapse: collapse; width: 100%; min-width: 380px; }
.exam-table th, .exam-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: center; }
.exam-table th { background: var(--bg-soft); font-weight: 800; font-size: 0.85rem; }
.exam-table .ex-rank { width: 58px; font-weight: 800; }
.exam-table td.ex-name { text-align: left; white-space: nowrap; font-weight: 600; }
.exam-table .ex-avg { font-weight: 800; background: var(--bg-soft); }
.exam-table tfoot .ex-foot td { background: var(--bg-soft); font-weight: 800; border-top: 2px solid var(--border); }
.exam-table tfoot .ex-foot .ex-name { text-align: center; color: var(--text-dim); }
.exam-table tfoot .ex-foot-cell { font-variant-numeric: tabular-nums; }
.ex-score { width: 58px; padding: 4px; border: 1px solid var(--border); border-radius: 6px; text-align: center; font-family: inherit; background: var(--card); color: var(--text); }
.ex-cell { white-space: nowrap; }
.ex-rt { display: inline-block; vertical-align: middle; margin-left: 4px; width: 24px; height: 26px; line-height: 1; border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); border-radius: 5px; font-size: 0.68rem; font-weight: 800; cursor: pointer; padding: 0; }
.ex-rt:hover { border-color: #dc2626; color: #dc2626; }
.ex-cell.retest .ex-score { border-color: #dc2626; background: rgba(220,38,38,0.08); color: #b91c1c; font-weight: 700; }
.ex-cell.retest .ex-rt { background: #dc2626; border-color: #dc2626; color: #fff; }
.ex-rd-del, .ex-stu-del { border: none; background: transparent; color: var(--text-dim); cursor: pointer; font-size: 0.72rem; padding: 0 2px; }
.exam-addstu { margin-top: 12px; padding: 12px; border: 1px dashed var(--border); border-radius: 10px; }
.exam-selall { font-size: 0.78rem; font-weight: 700; padding: 3px 12px; border: 1px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent); cursor: pointer; font-family: inherit; margin-left: 6px; }
.ex-rd-label { width: 130px; max-width: 170px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 0.8rem; font-weight: 700; text-align: center; background: var(--card); color: var(--text); }
.exam-table th.ex-rd { padding: 4px 6px; }
.ex-mode { display: inline-flex; gap: 12px; align-items: center; font-size: 0.82rem; color: var(--text-dim); }
.ex-mode label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ex-rd-total { font-size: 0.72rem; color: var(--text-dim); margin-top: 3px; }
.ex-rd-totinp { width: 46px; padding: 2px 4px; border: 1px solid var(--border); border-radius: 5px; text-align: center; font-family: inherit; font-size: 0.75rem; background: var(--card); color: var(--text); }
.ex-conv { display: block; font-size: 0.68rem; color: var(--accent); font-weight: 700; margin-top: 2px; }
.ex-rd-ctl { display: flex; align-items: center; justify-content: center; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.ex-rd-mode { font-size: 0.7rem; padding: 1px 3px; border: 1px solid var(--border); border-radius: 5px; font-family: inherit; background: var(--card); color: var(--text-dim); }

/* ===== 기출성적 다듬기 ===== */
.exam-table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 2px 14px; }
.exam-table th, .exam-table td { border: none; border-bottom: 1px solid var(--border); padding: 9px 10px; }
.exam-table thead th { background: transparent; border-bottom: 2px solid var(--border); color: var(--text-dim); font-weight: 700; font-size: 0.8rem; vertical-align: bottom; }
.exam-table tbody tr:last-child td { border-bottom: none; }
.exam-table tbody tr { }
.exam-table tbody tr:hover { background: var(--card-hover); }
.exam-table td.ex-name { font-weight: 700; color: var(--text); }
.exam-table .ex-avg { background: transparent; }
.ex-rankbadge { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 50%; font-weight: 800; font-size: 0.82rem; background: var(--bg-soft); color: var(--text-dim); }
.ex-rankbadge.r1 { background: #f3d675; color: #6b5200; box-shadow: 0 1px 3px rgba(180,150,0,.3); }
.ex-rankbadge.r2 { background: #d9dde3; color: #495663; }
.ex-rankbadge.r3 { background: #e7c39c; color: #6f4622; }
.ex-rankbadge.none { background: transparent; color: var(--text-dim); }
.ex-avgpill { display: inline-block; min-width: 44px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 0.92rem; }
.ex-avgpill.none { background: transparent; color: var(--text-dim); font-weight: 600; }
.ex-score:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ex-conv { opacity: 0.9; }
.exam-sheet-card { transition: border-color .12s, box-shadow .12s; }
.exam-sheet-card:hover { border-color: var(--text-dim); }
.exam-detail-head { gap: 8px; padding: 4px 2px 12px; }
.ex-title-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* ===== 기출성적: 한 화면에 더 담기 + 틀고정 ===== */
.exam-table th, .exam-table td { white-space: nowrap; padding: 6px 9px; }
.ex-conv { display: inline; margin-left: 5px; font-size: 0.72rem; }   /* 환산점수: 아래→옆 */
/* 등수·학생 왼쪽 고정, 평균 오른쪽 고정 (엑셀 틀고정처럼) */
.exam-table th.ex-rank, .exam-table td.ex-rank { position: sticky; left: 0; z-index: 2; background: var(--card); width: 48px; min-width: 48px; }
.exam-table th.ex-name, .exam-table td.ex-name { position: sticky; left: 48px; z-index: 2; background: var(--card); box-shadow: 3px 0 4px -2px rgba(0,0,0,0.10); }
.exam-table th.ex-avg, .exam-table td.ex-avg { position: sticky; right: 0; z-index: 2; background: var(--card); box-shadow: -3px 0 4px -2px rgba(0,0,0,0.10); }
.exam-table thead th.ex-rank, .exam-table thead th.ex-name, .exam-table thead th.ex-avg { z-index: 3; }
.exam-table tbody tr:hover td.ex-rank, .exam-table tbody tr:hover td.ex-name, .exam-table tbody tr:hover td.ex-avg { background: var(--card-hover); }

/* ===== 수납관리 (월별 수업료 수납) ===== */
.pay-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.pay-head h1 { margin: 0; font-size: 1.35rem; }
.pay-spacer { flex: 1 1 auto; }
.pay-month-nav { display: flex; align-items: center; gap: 4px; }
.pay-month-nav button { width: 30px; height: 32px; border: 1px solid var(--border); background: var(--card); border-radius: 8px; cursor: pointer; font-size: 0.9rem; color: var(--text); }
.pay-month-nav button:hover { border-color: var(--text-dim); }
.pay-month-nav input[type=month] { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-family: inherit; font-weight: 700; }
.pay-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pay-stat { flex: 1 1 130px; min-width: 120px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.pay-stat .ps-label { font-size: 0.76rem; color: var(--text-dim); font-weight: 700; }
.pay-stat .ps-val { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.pay-stat .ps-val small { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }
.pay-stat.ok { border-color: rgba(34,160,94,0.4); }
.pay-stat.ok .ps-val { color: #1f9d55; }
.pay-stat.due { border-color: rgba(200,60,60,0.4); }
.pay-stat.due .ps-val { color: #d64545; }
.pay-stat.carry { border-color: rgba(217,119,6,0.45); background: rgba(217,119,6,0.06); }
.pay-stat.carry .ps-val { color: #d97706; }
/* 원비 자동청구(청구서 자동발송) */
.pay-stat.autoinv { border-color: rgba(59,133,254,0.4); background: rgba(59,133,254,0.05); }
.pay-stat.autoinv .ps-val { font-size: 0.95rem; }
.pay-inv-sw { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.pay-inv-sw input { cursor: pointer; }
.btn-mini { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border: 1px solid var(--accent, #3985fe); color: var(--accent, #3985fe); background: transparent; border-radius: 999px; cursor: pointer; }
.btn-mini:hover { background: var(--accent, #3985fe); color: #fff; }
.pay-inv-chip { font-size: 0.68rem; font-weight: 800; padding: 1px 7px; margin-left: 4px; color: #2563eb; background: rgba(59,133,254,0.1); border-radius: 999px; white-space: nowrap; vertical-align: middle; }
/* 급여 명세(payroll) */
.payroll-card { max-width: 760px; width: 94vw; }
.payroll-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.payroll-head h2 { margin: 0; }
.payroll-note { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; margin: 6px 0 14px; }
.payroll-note .payroll-warn { color: #b45309; }
.pr-table-wrap { overflow-x: auto; }
.pr-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.pr-table th, .pr-table td { padding: 8px 9px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.pr-table th:first-child, .pr-table td:first-child, .pr-name { text-align: left; }
.pr-table thead th { font-size: 0.74rem; color: var(--text-dim); font-weight: 700; }
.pr-name .pr-pos { font-size: 0.72rem; color: var(--text-dim); margin-left: 5px; }
.pr-hours small { display: block; font-size: 0.68rem; color: var(--text-dim); font-weight: 500; }
.pr-wage-inp { width: 86px; text-align: right; padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; background: var(--card); color: var(--text); font-size: 0.84rem; }
.pr-adj-btn { font-size: 0.78rem; font-weight: 700; padding: 3px 9px; border: 1px dashed var(--border); border-radius: 8px; background: transparent; color: var(--text-dim); cursor: pointer; }
.pr-adj-btn:hover { border-color: var(--accent, #3985fe); color: var(--accent, #3985fe); }
.pr-wh { color: #d64545; }
.pr-net b { color: #1f9d55; }
.pr-slip-btn { font-size: 1rem; padding: 2px 7px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); cursor: pointer; }
.pr-table tfoot td { font-weight: 800; border-top: 2px solid var(--border); border-bottom: none; }
/* 명세서 문서(detailModal 내) */
.pr-slip-doc { max-width: 420px; margin: 0 auto; }
.pr-slip-doc h2 { text-align: center; margin: 0 0 4px; }
.pr-slip-meta { text-align: center; color: var(--text-dim); font-size: 0.85rem; margin-bottom: 16px; }
.pr-slip-tb { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.pr-slip-tb td { padding: 8px 4px; border-bottom: 1px solid var(--border); }
.pr-slip-tb td.r { text-align: right; }
.pr-slip-tb .pr-slip-mid td { font-weight: 700; background: var(--bg-soft, rgba(0,0,0,0.02)); }
.pr-slip-tb .pr-slip-net td { font-size: 1.1rem; border-bottom: none; border-top: 2px solid var(--text); padding-top: 12px; }
.pr-slip-foot { font-size: 0.74rem; color: var(--text-dim); margin: 14px 0; line-height: 1.5; }
.pr-slip-btns { display: flex; gap: 8px; justify-content: flex-end; }
@media print {
  body.printing-slip > *:not(.modal) { display: none !important; }
  body.printing-slip .modal#detailModal { position: static; background: #fff; }
  body.printing-slip .modal#detailModal .modal-backdrop, body.printing-slip .modal-close, body.printing-slip .pr-slip-btns { display: none !important; }
  body.printing-slip .modal#detailModal .modal-card { box-shadow: none; max-width: 100%; }
}
.pay-rem-over { font-size: 0.72rem; font-weight: 800; color: #d97706; margin-top: 2px; white-space: nowrap; }
.pay-past-note { margin: 0 0 10px; padding: 9px 13px; border: 1px solid rgba(217,119,6,0.4); background: rgba(217,119,6,0.08); color: #b45309; border-radius: 10px; font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.pay-past-note b { font-weight: 800; }
.pay-addstu { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 12px 14px; margin-bottom: 14px; }
.pay-add-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-add-head select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; }
.pay-table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 2px 14px; }
/* 모바일: 가로 스크롤 시 고정 체크박스 왼쪽 패딩(14px)으로 비고정 셀이 비쳐보이는 것 방지 — sticky가 가장자리에 밀착되게 좌우 패딩 제거. (베이스 .pay-table-wrap 뒤에 둬야 소스 순서상 적용됨) */
@media (max-width: 680px) {
  .pay-table-wrap { padding-left: 0; padding-right: 0; }
}
.pay-table { border-collapse: collapse; width: 100%; min-width: 880px; }
.pay-search { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.88rem; width: 160px; }
.pay-search:focus { border-color: var(--accent); outline: none; }
.pay-sort-sel { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.pay-sort-sel:focus { border-color: var(--accent); outline: none; }
.pay-bulkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.pay-bulkbar .pbb-count { font-weight: 800; color: var(--accent); }
.pay-bulkbar button { padding: 6px 14px; font-size: 0.85rem; }

/* 교재비: 학생별 교재 건별 목록 셀 */
.pay-table td.pay-amt-book { text-align: left; min-width: 240px; white-space: normal; }
.pay-book-list { display: flex; flex-direction: column; gap: 3px; }
.pay-book-item { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; font-size: 0.82rem; }
.pay-book-item .pbi-title { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.pay-book-item .pbi-price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.pay-book-item .pbi-date { color: var(--text-dim); font-size: 0.74rem; }
.pay-book-del { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 0.72rem; opacity: 0.55; padding: 0 2px; }
.pay-book-del:hover { color: #d64545; opacity: 1; }
.pay-book-empty { color: var(--text-dim); font-size: 0.8rem; }
.pay-book-total { margin-top: 2px; padding-top: 3px; border-top: 1px dashed var(--border); font-size: 0.82rem; color: var(--text-dim); }
.pay-book-total b { color: var(--accent); font-variant-numeric: tabular-nums; }

/* 수강료 기본 + 추가항목(수동) */
.pay-tuit { display: flex; flex-direction: column; gap: 4px; }
.pay-tuit-base { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pay-bd { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 3px 0 1px; cursor: help; }
.pay-bd-item { font-size: 0.74rem; color: #0e7490; background: rgba(8,145,178,0.08); border: 1px solid rgba(8,145,178,0.22); border-radius: 6px; padding: 1px 6px; }
.pay-bd-item.bytable { color: var(--text-dim); background: var(--bg-soft); border-color: var(--border); }
.pay-bd-item b { font-weight: 800; }
.pay-extra-list { display: flex; flex-direction: column; gap: 3px; }
.pay-extra-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; font-size: 0.82rem; }
.pay-extra-item .pei-label { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.pay-extra-item .pei-price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.pay-extra-del { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 0.72rem; opacity: 0.55; padding: 0 2px; }
.pay-extra-del:hover { color: #d64545; opacity: 1; }
.pay-tuit-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pay-extra-add { border: 1px dashed var(--border); background: none; color: var(--text-dim); cursor: pointer; font-size: 0.74rem; border-radius: 6px; padding: 1px 7px; }
.pay-extra-add:hover { color: var(--accent); border-color: var(--accent); }
.pay-tuit-total { font-size: 0.82rem; color: var(--text-dim); }
.pay-tuit-total b { color: var(--accent); font-variant-numeric: tabular-nums; }
.pay-appr-wrap { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.pay-in-appr { width: 100%; min-width: 0; padding: 3px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: #15803d; font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.pay-in-appr::placeholder { color: var(--text-dim); }
.pay-in-appr:focus { border-color: #15803d; outline: none; }
.pay-receipt-link { font-size: 0.72rem; color: var(--accent); white-space: nowrap; }
/* 할인(프로모션) 표시 */
.pay-disc-list { display: flex; flex-direction: column; gap: 3px; }
.pay-disc-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; font-size: 0.82rem; }
.pay-disc-item .pdi-label { color: #15803d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.pay-disc-item .pdi-price { font-variant-numeric: tabular-nums; font-weight: 700; color: #15803d; }
.pay-disc-del { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 0.72rem; opacity: 0.55; padding: 0 2px; }
.pay-disc-del:hover { color: #d64545; opacity: 1; }
.pay-disc-add { border: 1px dashed #86c99a; background: none; color: #15803d; cursor: pointer; font-size: 0.74rem; border-radius: 6px; padding: 1px 7px; margin-left: 5px; }
.pay-disc-add:hover { border-color: #15803d; background: rgba(21,128,61,0.06); }
/* 프로모션 모달 */
.promo-card { max-width: 560px; }
.promo-form { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 4px; }
.promo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.promo-row .promo-lb { min-width: 72px; font-weight: 700; font-size: 0.88rem; color: var(--text); }
.promo-row input[type="text"], .promo-row input[type="number"], .promo-row input[type="month"] { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; }
.promo-row input[type="text"] { flex: 1; min-width: 160px; }
.promo-unit { color: var(--text-dim); }
.promo-period { display: flex; gap: 14px; }
.promo-period label { display: flex; align-items: center; gap: 5px; font-size: 0.88rem; cursor: pointer; }
.promo-targets-head { justify-content: space-between; align-items: center; }
.promo-targets-ctl { display: flex; align-items: center; gap: 6px; }
.promo-targets-ctl input[type="search"] { padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; width: 120px; }
.promo-mini { font-size: 0.74rem; padding: 3px 9px; }
.promo-stu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: var(--surface, var(--card)); }
.promo-stu { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; font-size: 0.85rem; cursor: pointer; }
.promo-stu:hover { background: var(--hover, rgba(0,0,0,0.04)); }
.promo-stu.on { background: rgba(21,128,61,0.1); }
.promo-stu .ps-name { font-weight: 600; }
.promo-stu .ps-grade { color: var(--text-dim); font-size: 0.78rem; }
.promo-empty { color: var(--text-dim); font-size: 0.85rem; padding: 10px; text-align: center; }
.promo-count { color: #15803d; font-weight: 700; margin-right: auto; }
.promo-existing { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.promo-existing h3 { font-size: 0.92rem; margin: 0 0 8px; }
.promo-ex-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: 0.85rem; }
.promo-ex-item .pex-sub { color: var(--text-dim); font-size: 0.78rem; }
.pay-carry { font-size: 0.8rem; color: #c0392b; background: rgba(192,57,69,0.07); border-radius: 6px; padding: 1px 7px; align-self: flex-start; cursor: help; }
.pay-carry b { font-variant-numeric: tabular-nums; }

/* 교재 불러오기 모달 */
.bookimport-card { max-width: 760px; width: 92vw; }
.bookimport-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 6px; align-items: stretch; }
.bi-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bi-cat-chips { margin: 0 0 2px; }
.bi-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); grid-auto-rows: min-content; gap: 8px; align-content: start; min-width: 0; max-height: 56vh; overflow-y: auto; overflow-x: hidden; padding: 2px; }
.bi-book { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); cursor: pointer; font-family: inherit; text-align: left; }
.bi-book:hover { border-color: var(--text-dim); }
.bi-book.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.bi-book img { width: 100%; height: 76px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); }
.bi-book-noimg { display: flex; align-items: center; justify-content: center; height: 76px; font-size: 26px; background: var(--bg-soft); border-radius: 6px; }
.bi-custom { border-style: dashed; }
.bi-custom .bi-custom-ic { background: var(--accent-soft); color: var(--accent); }
.bi-custom .bi-book-title { color: var(--accent); }
.bi-book-title { font-size: 0.78rem; font-weight: 700; color: var(--text); line-height: 1.25; }
.bi-book-sub { font-size: 0.68rem; color: var(--text-dim); }
.bi-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bi-fld { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; font-weight: 700; color: var(--text-dim); }
.bi-fld input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; font-weight: 500; }
.bi-fld input[readonly] { background: var(--bg-soft); font-weight: 700; }
.bi-stu-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.85rem; margin-top: 4px; }
.bi-pick { min-height: 150px; max-height: 240px; overflow-y: auto; flex: none; align-content: flex-start; align-items: flex-start; }
.bi-hint { flex: 1 1 auto; font-size: 0.82rem; color: var(--text-dim); text-align: left; }
@media (max-width: 640px) { .bookimport-body { grid-template-columns: 1fr; } }
.pay-table th, .pay-table td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: center; white-space: nowrap; }
.pay-table thead th { background: transparent; border-bottom: 2px solid var(--border); color: var(--text-dim); font-weight: 700; font-size: 0.8rem; }
.pay-table tbody tr:last-child td { border-bottom: none; }
.pay-table th.pay-sel, .pay-table td.pay-sel { position: sticky; left: 0; z-index: 2; background: var(--card); width: 36px; min-width: 36px; text-align: center; padding: 8px 6px; }
.pay-table th.pay-name, .pay-table td.pay-name { position: sticky; left: 36px; z-index: 2; background: var(--card); text-align: left; font-weight: 700; color: var(--text); box-shadow: 3px 0 4px -2px rgba(0,0,0,0.10); }
.pay-table thead th.pay-sel, .pay-table thead th.pay-name { z-index: 3; }
.pay-rowsel, #paySelAll { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.pay-table tr.pay-row-sel td { background: var(--accent-soft); }
.pay-table tr.pay-row-sel td.pay-sel, .pay-table tr.pay-row-sel td.pay-name { background: var(--accent-soft); }
.pay-table td.pay-grade { color: var(--text-dim); font-size: 0.85rem; }
.pay-table td.pay-amt { text-align: right; }
.pay-in-amt { width: 96px; text-align: right; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; font-variant-numeric: tabular-nums; }
.pay-in-date { padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; }
.pay-in-method { padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; }
.pay-in-memo { width: 130px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; }
.pay-in-note { width: 150px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: rgba(240,180,60,0.08); color: var(--text); font-family: inherit; }
.pay-in-note:focus { background: var(--bg); }
.pay-table th.pay-note { color: #c07b1f; }
.pay-switch { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.pay-switch input { width: 17px; height: 17px; accent-color: #1f9d55; cursor: pointer; }
.pay-switch span { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); }
.pay-table tr.pay-paid td.pay-name { color: #1f9d55; }
.pay-table tr.pay-paid .pay-switch span { color: #1f9d55; }
.pay-table tr.pay-due .pay-switch span { color: #d64545; }
.pay-stu-del { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 0.78rem; opacity: 0; padding: 0 2px; }
.pay-table td.pay-name:hover .pay-stu-del { opacity: 0.7; }
.pay-stu-del:hover { color: #d64545; opacity: 1; }
.pay-subj { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); font-size: 0.68rem; font-weight: 700; vertical-align: middle; }
.pay-billday { display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.66rem; font-weight: 700; vertical-align: middle; }
.pay-add-date { font-weight: 700; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 6px; }
.pay-add-date input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; }
.pay-add-hint { font-size: 0.8rem; color: var(--text-dim); margin: 2px 0 8px; }
.pay-add-chips { margin: 4px 0 10px; }
.pay-amt-tag { margin-left: 4px; color: #c07b1f; font-size: 0.75rem; cursor: help; }
.pay-wd { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(214,69,69,0.1); color: #c0392b; font-size: 0.72rem; font-weight: 800; white-space: nowrap; cursor: help; vertical-align: middle; }
.pay-table tr.pay-wd-row td.pay-name { color: #c0392b; }
.pay-testpay { margin-left: 2px; border: 1px solid var(--border); background: var(--card); border-radius: 7px; padding: 3px 7px; cursor: pointer; font-size: 0.82rem; line-height: 1; }
.pay-testpay:hover { border-color: #3182f6; background: rgba(49,130,246,0.08); }
/* 부분납부: 납부액 입력 + 완납 버튼 + 미납금 */
.pay-paybox { display: flex; align-items: center; gap: 5px; }
.pay-in-paidamt { width: 84px; text-align: right; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-family: inherit; font-variant-numeric: tabular-nums; }
.pay-full-btn { padding: 4px 9px; border: 1px solid var(--border); background: var(--card); border-radius: 7px; cursor: pointer; font-size: 0.78rem; font-weight: 700; font-family: inherit; color: var(--text-dim); white-space: nowrap; }
.pay-full-btn:hover { border-color: #1f9d55; color: #1f9d55; background: rgba(34,160,94,0.08); }
.pay-table td.pay-rem { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-rem-done { color: #1f9d55; }
.pay-rem-due { color: #d64545; }
.pay-rem-zero { color: var(--text-dim); font-weight: 500; }
.pay-table tr.pay-partial td.pay-name { color: #c07b1f; }
.msg-both { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 8px; font-size: 0.88rem; font-weight: 700; color: var(--text); cursor: pointer; }
.msg-both input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.msg-body { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.9rem; line-height: 1.5; resize: vertical; }
.msg-hint { flex: 1 1 auto; font-size: 0.8rem; color: var(--text-dim); text-align: left; }

/* 요금표 모달(학년×과목 그리드) */
.price-card { max-width: 560px; }
.price-modal-hint { flex: 1 1 auto; font-size: 0.78rem; color: var(--text-dim); text-align: left; }
.price-grid-wrap { overflow: auto; max-height: 60vh; border: 1px solid var(--border); border-radius: 12px; }
.price-grid { border-collapse: collapse; width: 100%; }
.price-grid th, .price-grid td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 6px 8px; text-align: center; white-space: nowrap; }
.price-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-soft); font-size: 0.8rem; font-weight: 800; color: var(--text-dim); }
.price-grid th.pg-corner, .price-grid th.pg-grade { position: sticky; left: 0; z-index: 1; background: var(--card); font-weight: 800; }
.price-grid thead th.pg-corner { z-index: 3; }
.price-grid tr:last-child th, .price-grid tr:last-child td { border-bottom: none; }
.price-grid th:last-child, .price-grid td:last-child { border-right: none; }
.pg-in { width: 84px; text-align: right; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-family: inherit; font-variant-numeric: tabular-nums; }
.price-grid td.pg-sum { font-weight: 800; color: var(--accent); font-size: 0.82rem; background: var(--bg-soft); }
.price-grid th.pg-sum { color: var(--text-dim); }

/* 반(강좌)별 월정액 */
.class-fee-wrap:not(:empty) { margin-top: 14px; }
.cff-title { font-size: 0.82rem; font-weight: 800; color: var(--text-dim); margin-bottom: 8px; }
.cff-title small { font-weight: 600; color: var(--text-dim); opacity: 0.85; }
.cff-group { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.cff-subj { font-weight: 800; font-size: 0.82rem; padding: 6px 10px; background: var(--bg-soft); color: var(--text); border-left: 4px solid var(--sc, var(--accent)); }
.cff-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--border); }
.cff-name { font-size: 0.85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cff-in { width: 110px; flex: none; text-align: right; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-family: inherit; font-variant-numeric: tabular-nums; }
.cff-in::placeholder { color: var(--text-dim); opacity: 0.7; font-size: 0.8rem; }

/* 라이브 송출 버튼 */
.pdf-tool.pdf-live.active { background: #c0392b; color: #fff; border-color: #c0392b; animation: pdfLivePulse 1.6s infinite; }
@keyframes pdfLivePulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* 라이브 채팅 오버레이 (송출 화면) */
.pdf-live-chat { position: fixed; right: 16px; bottom: 16px; width: 300px; max-width: 46vw; height: 300px; display: flex; flex-direction: column; background: rgba(30,26,22,0.92); color: #fff; border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,0.4); z-index: 99999; overflow: hidden; backdrop-filter: blur(6px); }
.pdf-live-chat .plc-head { display: flex; align-items: center; gap: 6px; padding: 9px 12px; font-weight: 800; font-size: 13px; background: rgba(0,0,0,0.25); cursor: move; user-select: none; -webkit-user-select: none; }
.pdf-live-chat .plc-badge { background: #ffcf33; color: #3a2a00; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; min-width: 16px; text-align: center; }
.pdf-live-chat.plc-alert { animation: plcAlert 0.8s ease; }
@keyframes plcAlert { 0%, 100% { box-shadow: 0 8px 28px rgba(0,0,0,0.4); } 25%, 60% { box-shadow: 0 0 0 3px #ffcf33, 0 8px 28px rgba(0,0,0,0.55); } }
.pdf-live-chat .plc-min { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; line-height: 1; padding: 0 4px; }
.pdf-live-chat .plc-recpause { background: rgba(255,255,255,0.16); border: none; color: #fff; font-size: 11.5px; font-weight: 800; cursor: pointer; padding: 3px 9px; border-radius: 999px; margin-right: 4px; white-space: nowrap; }
.pdf-live-chat .plc-recpause.paused { background: #c0392b; }
.pdf-live-chat .plc-head.rec-paused { background: rgba(192,57,43,0.55); }
.pdf-live-chat .plc-msgs { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.pdf-live-chat .plc-msg { font-size: 13px; line-height: 1.45; word-break: break-word; }
.pdf-live-chat .plc-msg b { color: #ffb4a8; font-weight: 700; }
.pdf-live-chat .plc-msg.me b { color: #8fd0ff; }
.pdf-live-chat .plc-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid rgba(255,255,255,0.12); }
.pdf-live-chat .plc-input { flex: 1; border: none; border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; font-family: inherit; }
.pdf-live-chat .plc-send { border: none; border-radius: 8px; background: #c0392b; color: #fff; font-weight: 700; padding: 0 12px; cursor: pointer; font-size: 13px; }
.pdf-live-chat.mini { height: auto; }
.pdf-live-chat.mini .plc-msgs, .pdf-live-chat.mini .plc-form { display: none; }

/* 라이브 손들기 패널(오버레이 상단) */
.pdf-live-chat .plc-hands { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.12); background: rgba(192,57,43,0.15); display: flex; flex-direction: column; gap: 5px; max-height: 120px; overflow-y: auto; }
.pdf-live-chat .plc-hrow { display: flex; align-items: center; gap: 6px; }
.pdf-live-chat .plc-hname { font-size: 12.5px; font-weight: 700; }
.pdf-live-chat .plc-hbtn { border: none; border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 700; cursor: pointer; background: rgba(255,255,255,0.2); color: #fff; }
.pdf-live-chat .plc-hbtn.ok { background: #2e9e5b; }
.pdf-live-chat .plc-hbtn.off { background: #c0392b; }
.pdf-live-chat.mini .plc-hands { display: none; }

/* 라이브 시작 다이얼로그 */
.live-dlg-back { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 100000; display: flex; align-items: center; justify-content: center; }
.live-dlg { background: #fffcf5; color: #241c14; border-radius: 16px; padding: 20px 22px; width: 340px; max-width: 90vw; box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.live-dlg h3 { margin: 0 0 14px; font-size: 18px; }
.live-dlg label { display: block; font-size: 12px; font-weight: 700; color: #7a6f5c; -webkit-text-fill-color: #7a6f5c; margin: 10px 0 4px; }
.live-dlg input, .live-dlg select { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #e0d7c3; border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff; color: #241c14; -webkit-text-fill-color: #241c14; }
.live-dlg .ld-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.live-dlg .ld-actions button { border: none; border-radius: 10px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.live-dlg .ld-cancel { background: #eee6d8; color: #241c14; }
.live-dlg .ld-go { background: #c0392b; color: #fff; }

/* 라이브 저장 알림 + 다이얼로그 체크박스 */
.live-save-note { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: rgba(30,26,22,0.95); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 700; z-index: 100001; box-shadow: 0 6px 24px rgba(0,0,0,0.35); }
.live-dlg .ld-save { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 600; color: #241c14; cursor: pointer; }
.live-dlg .ld-picker { border: 1px solid #e0d7c3; border-radius: 10px; background: #faf6ec; padding: 8px 10px; margin-top: 6px; max-height: 200px; overflow-y: auto; }
.live-dlg .ldp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 800; color: #7a6f5c; padding-bottom: 7px; border-bottom: 1px solid #e0d7c3; margin-bottom: 5px; }
.live-dlg .ldp-all { border: none; background: none; color: #c0392b; font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 4px; }
.live-dlg .ldp-row { display: flex; align-items: center; gap: 8px; padding: 5px 2px; font-size: 13.5px; font-weight: 500; color: #241c14; cursor: pointer; }
.live-dlg input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; min-width: 20px; flex: none;
  border: 1.5px solid #c9bda3; border-radius: 5px; background-color: #fff; cursor: pointer;
  margin: 0; vertical-align: middle; padding: 0; box-sizing: border-box;
  background-repeat: no-repeat; background-position: center; background-size: 13px 13px;
}
.live-dlg input[type="checkbox"]:checked {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
}
.live-dlg .ldp-empty { color: #7a6f5c; font-size: 12.5px; padding: 6px 2px; }

/* 라이브 오버레이 시청자 */
.pdf-live-chat .plc-parts { padding: 7px 12px; font-size: 12.5px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.12); }
.pdf-live-chat .plc-parts .pp-count { color: #8fd0ff; }
.pdf-live-chat .plc-parts .pp-names { font-weight: 400; color: rgba(255,255,255,0.75); }
.pdf-live-chat.mini .plc-parts { display: none; }

/* 플랜 커스텀 안내(브랜딩) */
.brand-plan-note { margin: -4px 0 10px; padding: 8px 12px; background: rgba(230,160,40,.12); border: 1px solid rgba(230,160,40,.4); border-radius: 8px; font-size: 13px; color: #b8791a; }

/* 운영팀 공지(플랫폼) 전달사항 */
.notice.platform { border-color: #3b5bdb; box-shadow: 0 0 0 1px rgba(59,91,219,.15); }
.notice-pin.platform { background: #3b5bdb; color: #fff; }

/* 서비스 일시중지 안내 화면 */
.suspend-screen { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--bg, #f7f0e1); padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); }
.suspend-card { max-width: 420px; text-align: center; background: var(--card, #fff); border: 1px solid var(--border, #e3ddc9); border-radius: 18px; padding: 40px 28px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.suspend-ic { font-size: 48px; margin-bottom: 12px; }
.suspend-card h1 { font-size: 20px; margin: 0 0 14px; color: var(--text, #2a2a2a); }
.suspend-card p { color: var(--text-dim, #666); font-size: 15px; line-height: 1.6; margin: 0; }
.suspend-contact { margin-top: 16px !important; font-weight: 600; color: var(--text, #2a2a2a) !important; }

/* 사용자 메뉴 현재 플랜 뱃지 */
.plan-badge { padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--accent, #c0392b); border-top: 1px solid var(--border, #eee); margin-top: 4px; }

/* ── 상위플랜 잠금노출(teaser) ── */
.plan-locked { position: relative; opacity: .62; }
.plan-locked::after { content: "🔒"; position: absolute; top: 3px; right: 5px; font-size: .78em; line-height: 1; opacity: .95; pointer-events: none; filter: none; }
.plan-locked.pl-inline::after { position: static; margin-left: 4px; }
.plan-toast { position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(12px); background: rgba(32,24,18,.95); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .92rem; font-weight: 600; box-shadow: 0 8px 26px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 99999; max-width: 90vw; }
.plan-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.plan-toast b { color: #ffd9c9; }

/* ===== 선생님 채팅 ===== */
.chat-shell { position: relative; z-index: 1; width: min(900px, 94vw); height: min(82vh, 720px); margin: 6vh auto 0; background: var(--card); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.chat-head h2 { font-size: 1.05rem; margin: 0 auto 0 0; }
.chat-head .modal-close { position: static; margin: 0; flex-shrink: 0; }
.chat-reports-btn { padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .82rem; cursor: pointer; flex-shrink: 0; }
.chat-body { flex: 1; display: flex; min-height: 0; }
.chat-rooms { width: 270px; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--bg-soft); }
.chat-rooms-top { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--border); }
.chat-new { flex: 1; padding: 7px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .82rem; font-weight: 600; cursor: pointer; }
.chat-room-list { flex: 1; overflow-y: auto; }
.chat-room-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: none; border-bottom: 1px solid var(--border); background: none; cursor: pointer; text-align: left; color: var(--text); }
.chat-room-item:hover { background: var(--card); }
.chat-room-item.active { background: var(--accent-soft); }
.chat-room-ic { font-size: 1.1rem; flex-shrink: 0; }
.chat-room-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-room-title { font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-prev { font-size: .78rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-unread { flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.chat-sec { display: flex; align-items: center; gap: 6px; padding: 9px 13px 4px; font-size: .72rem; font-weight: 800; letter-spacing: .3px; color: var(--text-dim); text-transform: none; background: var(--bg); }
.chat-sec-un { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .64rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
/* 유형별 폴더형 탭(선생님/학부모/학생) */
.chat-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--border); }
.chat-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--border); border-bottom: none; border-radius: 9px 9px 0 0; background: var(--bg); color: var(--text-dim); font-size: .76rem; font-weight: 700; cursor: pointer; margin-bottom: -1px; white-space: nowrap; }
.chat-tab.active { background: var(--bg-soft); color: var(--text); }
.chat-tab-ic { font-size: .92rem; line-height: 1; }
.chat-tab-un { min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .6rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
/* 새 대화 플로팅 버튼(FAB) — 상단 버튼줄 제거, 우하단으로 */
.chat-rooms { position: relative; }
.chat-room-list { padding-bottom: 72px; }
.chat-fab-wrap { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 2; }
.chat-fab { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.22); display: flex; align-items: center; justify-content: center; transition: transform .15s ease; }
.chat-fab:hover { filter: brightness(1.07); }
.chat-fab.open { transform: rotate(45deg); }
.chat-fab-menu { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }
.chat-fab-menu .chat-new { flex: none; white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.16); }
.chat-room-item.k-parent .chat-room-ic, .chat-room-item.k-tsdm .chat-room-ic, .chat-room-item.k-class .chat-room-ic { filter: saturate(1.1); }
.chat-convo { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-convo-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: .9rem; padding: 20px; text-align: center; }
.chat-convo-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-convo-head { display: flex; align-items: center; gap: 8px; padding: 11px 15px; border-bottom: 1px solid var(--border); font-weight: 700; }
.chat-back { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg-who { font-size: .74rem; color: var(--text-dim); margin: 0 0 2px 4px; }
.chat-bubble-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-msg.mine .chat-bubble-row { flex-direction: row-reverse; }
.chat-bubble { padding: 8px 12px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); font-size: .9rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-msg.mine .chat-bubble { background: var(--accent); color: #fff; border-color: var(--accent); }
.chat-msg.deleted .chat-bubble { font-style: italic; color: var(--text-dim); background: transparent; }
.chat-msg-when { font-size: .68rem; color: var(--text-dim); margin: 2px 4px 0; }
/* 확인 체크(카톡 공감류 단일 체크) */
.chat-foot { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.chat-msg.mine .chat-foot { flex-direction: row-reverse; }
.chat-foot .chat-msg-when { margin: 0; }
.chat-ack { display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: .67rem; line-height: 1; padding: 2px 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); cursor: pointer; opacity: .45; transition: opacity .12s, background .12s, color .12s, border-color .12s; }
.chat-ack:hover { opacity: 1; }
.chat-ack.has { opacity: 1; background: var(--bg-soft); font-weight: 700; }
.chat-ack.on { opacity: 1; background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chat-ack-who { font-size: .66rem; color: var(--text-dim); line-height: 1.3; opacity: .9; }
.chat-msg.mine .chat-ack-who { text-align: right; }
.chat-msg-actions { opacity: 0; transition: opacity .12s; }
.chat-bubble-row:hover .chat-msg-actions { opacity: 1; }
.chat-mact { background: none; border: none; font-size: .72rem; color: var(--text-dim); cursor: pointer; padding: 2px; }
.chat-mact:hover { color: #e5484d; }
.chat-more { align-self: center; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-size: .78rem; cursor: pointer; }
.chat-empty { color: var(--text-dim); font-size: .86rem; text-align: center; padding: 20px; line-height: 1.6; }
.chat-send-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); }
#chatInput { flex: 1; resize: none; min-height: 38px; max-height: 120px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: .9rem; }
.chat-send-btn { flex-shrink: 0; padding: 9px 16px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.chat-pick-card { max-width: 420px; }
.chat-pick-card h2 { font-size: 1.05rem; margin: 0 0 12px; }
#chatGroupName, #chatPickSearch { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; margin-bottom: 10px; }
.chat-std-warn { color: var(--danger, #c0392b); }
.chat-pick-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.chat-pick-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.chat-pick-item:hover { background: var(--bg-soft); }
.chat-pick-item small { color: var(--text-dim); }
.chat-pick-item input { accent-color: var(--accent); width: 17px; height: 17px; flex-shrink: 0; }
.chat-pick-row { display: flex; align-items: center; gap: 4px; }
.chat-pick-row .chat-pick-item { flex: 1; }
.chat-pw-reset { flex-shrink: 0; border: 1px solid var(--border); background: var(--bg-soft); border-radius: 8px; padding: 7px 9px; font-size: 1rem; cursor: pointer; line-height: 1; }
.chat-pw-reset:hover { background: var(--accent); filter: none; }
.pw-reset-card { max-width: 380px; }
.pw-reset-who { color: var(--text-dim); font-size: .85rem; margin: 2px 0 12px; }
.pw-reset-box { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.pw-reset-box code { flex: 1; font-size: 1.25rem; font-weight: 700; letter-spacing: 1px; font-family: ui-monospace, Menlo, monospace; color: var(--text); word-break: break-all; }
.pw-reset-box button { flex-shrink: 0; border: none; border-radius: 8px; background: var(--accent); color: #fff; padding: 8px 13px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.pw-reset-note { font-size: .8rem; color: var(--text-dim); line-height: 1.5; }
.chat-pick-actions { display: flex; }
.chat-pick-go { flex: 1; padding: 12px; border: none; border-radius: 12px; background: var(--accent); color: #fff; font-size: .95rem; font-weight: 700; cursor: pointer; transition: filter .15s, transform .05s; }
.chat-pick-go:hover { filter: brightness(1.07); }
.chat-pick-go:active { transform: translateY(1px); }
.chat-reports-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.chat-report-item { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.chat-report-meta { font-size: .76rem; color: var(--text-dim); margin-bottom: 6px; }
.chat-report-msg { font-size: .9rem; margin-bottom: 9px; padding: 7px 10px; background: var(--bg-soft); border-radius: 8px; }
.chat-report-acts { display: flex; gap: 7px; }
.chat-report-acts button { padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .8rem; cursor: pointer; }
.chat-rep-del:hover { color: #e5484d; border-color: #e5484d; }
@media (max-width: 640px) {
  /* 아이폰 노치/상태바(black-translucent)·홈인디케이터가 헤더·입력창을 덮지 않게 안전영역 여백(border-box라 100dvh 안에 포함) */
  .chat-shell { width: 100vw; height: 100vh; height: 100dvh; margin: 0; border-radius: 0; border: none; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .chat-rooms { width: 100%; }
  .chat-convo { display: none; }
  .chat-convo.open { display: flex; position: absolute; inset: 0; top: 52px; background: var(--card); z-index: 2; }
  .chat-back { display: inline; }
  .chat-msg { max-width: 86%; }
}

/* 채팅 도킹(한쪽 고정) 모드 */
.chat-dock-btn, .chat-dock-flip { padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .82rem; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
@media (min-width: 641px) {
  /* 오른쪽 고정(기본) */
  body.chat-docked { padding-right: 350px; transition: padding .18s ease; }
  body.chat-docked .chat-modal { position: fixed; inset: 0 0 0 auto; width: 350px; padding: 0; background: none; display: block; pointer-events: none; z-index: 48; }
  body.chat-docked .chat-modal .modal-backdrop { display: none; }
  body.chat-docked .chat-shell { pointer-events: auto; width: 350px; height: 100vh; height: 100dvh; margin: 0; border-radius: 0; border: none; border-left: 1px solid var(--border); box-shadow: -6px 0 22px rgba(0,0,0,.13); }
  /* 컨텍스트 메뉴·이미지뷰어는 모달 직계라 도킹 시 pointer-events:none 상속 → 복구(클릭 먹통 방지) */
  body.chat-docked .chat-ctx-menu, body.chat-docked .chat-lightbox { pointer-events: auto; }
  body.chat-docked .chat-rooms { width: 100%; }
  body.chat-docked .chat-body { position: relative; }
  body.chat-docked .chat-convo { position: absolute; inset: 0; background: var(--card); display: none; z-index: 3; }
  body.chat-docked .chat-convo.open { display: flex; }
  body.chat-docked .chat-back { display: inline; }
  body.chat-docked .chat-head { padding: 10px 12px; gap: 5px; }
  body.chat-docked .chat-head h2 { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.chat-docked .chat-reports-btn, body.chat-docked .chat-dock-btn, body.chat-docked .chat-dock-flip { padding: 4px 8px; font-size: .78rem; }
  /* 채팅 오른쪽 고정 시 ? 도움말 버튼이 채팅 새채팅(+)과 겹치지 않게 패널 왼쪽으로 비켜줌(왼쪽 고정·모바일은 우하단이 비어 그대로) */
  body.chat-docked:not(.chat-dock-left) .help-fab { right: calc(350px + 16px); }
  /* 왼쪽 고정 */
  body.chat-docked.chat-dock-left { padding-right: 0; padding-left: 350px; }
  body.chat-docked.chat-dock-left .chat-modal { inset: 0 auto 0 0; }
  body.chat-docked.chat-dock-left .chat-shell { border-left: none; border-right: 1px solid var(--border); box-shadow: 6px 0 22px rgba(0,0,0,.13); }
}
@media (max-width: 640px) { .chat-dock-btn, .chat-dock-flip { display: none; } }

/* 그룹 멤버 관리 */
.chat-convo-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-members-btn { flex-shrink: 0; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .8rem; cursor: pointer; white-space: nowrap; }
.chat-members-card { max-width: 420px; }
.chat-members-card h2 { font-size: 1.05rem; margin: 0 0 14px; }
.chat-members-sec { margin-bottom: 16px; }
.chat-members-sec:last-child { margin-bottom: 0; }
.chat-members-lbl { font-size: .82rem; font-weight: 800; color: var(--text-dim); margin-bottom: 8px; }
.chat-members-list { display: flex; flex-direction: column; gap: 2px; max-height: 34vh; overflow-y: auto; }
.chat-member-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 8px; background: var(--bg-soft); font-size: .9rem; }
.chat-mem-tag { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 7px; font-weight: 700; font-size: .72rem; }
.chat-mem-tag.director { background: var(--accent); color: #fff; }
.chat-mem-tag.ext { background: var(--bg-soft); color: var(--text-dim); border: 1px solid var(--border); }
.chat-member-row small { color: var(--text-dim); }
.chat-kick { flex-shrink: 0; padding: 4px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text-dim); font-size: .78rem; cursor: pointer; }
.chat-kick:hover { color: #e5484d; border-color: #e5484d; }
.chat-add-list { display: flex; flex-direction: column; gap: 2px; max-height: 30vh; overflow-y: auto; margin-bottom: 10px; }

/* 방 나가기 */
.chat-members-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: center; }
.chat-leave-btn { padding: 8px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: #e5484d; font-size: .85rem; font-weight: 600; cursor: pointer; }
.chat-leave-btn:hover { background: rgba(229,72,77,.08); border-color: #e5484d; }

/* 채팅 첨부·링크·구분선 */
.chat-attach-btn { flex-shrink: 0; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 1.05rem; cursor: pointer; }
.chat-attach-btn:hover { border-color: var(--accent); }
.chat-pending { display: flex; align-items: center; gap: 6px; padding: 7px 12px; margin: 0 12px; border: 1px solid var(--border); border-radius: 10px 10px 0 0; border-bottom: none; background: var(--bg-soft); font-size: .84rem; color: var(--text); }
.chat-pending-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pending-x { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text-dim); font-size: .95rem; }
.chat-body-grp { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; max-width: 100%; }
.chat-msg.mine .chat-body-grp { align-items: flex-end; }
.chat-img-wrap { display: inline-block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); max-width: 240px; }
.chat-img { display: block; max-width: 240px; max-height: 280px; width: auto; height: auto; }
.chat-file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .88rem; max-width: 240px; }
.chat-file-chip:hover { border-color: var(--accent); }
.chat-file-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-chip small { color: var(--text-dim); flex-shrink: 0; }
.chat-link { color: #2f6fed; text-decoration: underline; word-break: break-all; }
.chat-msg.mine .chat-link { color: #cfe0ff; }
.chat-divider { display: flex; align-items: center; gap: 10px; margin: 6px 2px; color: var(--accent); font-size: .74rem; font-weight: 700; }
.chat-divider::before, .chat-divider::after { content: ""; flex: 1; height: 1px; background: var(--accent); opacity: .4; }
/* 그룹 이름 변경 */
.chat-rename-row { display: flex; gap: 7px; margin-bottom: 14px; }
.chat-rename-row input { flex: 1; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font: inherit; font-size: .88rem; }
.chat-rename-btn { flex-shrink: 0; padding: 8px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-size: .83rem; font-weight: 600; cursor: pointer; }
.chat-rename-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 메시지 컨텍스트 메뉴 */
.chat-ctx-menu { position: fixed; z-index: 100000; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.24); padding: 5px; display: flex; flex-direction: column; min-width: 128px; }
.chat-ctx-item { text-align: left; padding: 9px 14px; border: none; background: none; color: var(--text); font-size: .9rem; cursor: pointer; border-radius: 8px; white-space: nowrap; }
.chat-ctx-item:hover { background: var(--bg-soft); }
.chat-ctx-item.danger:hover { background: rgba(229,72,77,.1); color: #e5484d; }
.chat-msg { -webkit-touch-callout: none; }
.chat-bubble, .chat-file-chip, .chat-img-wrap { -webkit-user-select: none; user-select: none; }
.chat-link { -webkit-user-select: text; user-select: text; }
/* 답글(인용) */
.chat-reply-quote { display: block; text-align: left; max-width: 100%; margin-bottom: 4px; padding: 5px 10px; border: none; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--bg-soft); color: var(--text-dim); cursor: pointer; font: inherit; }
.chat-msg.mine .chat-reply-quote { border-left-color: #fff; background: rgba(192,57,43,.12); }
.chat-reply-quote:hover { filter: brightness(.97); }
.chat-reply-who { display: block; font-size: .72rem; font-weight: 700; color: var(--accent); }
.chat-msg.mine .chat-reply-who { color: var(--accent); }
.chat-reply-txt { display: block; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
/* 답글 작성 바(입력창 위) */
.chat-reply-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; margin: 0 12px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px 10px 0 0; border-bottom: none; background: var(--bg-soft); font-size: .82rem; }
.chat-reply-ic { color: var(--accent); font-weight: 700; }
.chat-reply-info { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.chat-reply-snip { color: var(--text-dim); margin-left: 7px; }
.chat-reply-x { background: none; border: none; cursor: pointer; color: var(--text-dim); font-size: .95rem; }
/* 멘션 */
.chat-mention { color: #2f6fed; font-weight: 700; background: rgba(47,111,237,.1); border-radius: 4px; padding: 0 2px; }
.chat-msg.mine .chat-mention { color: #dfe9ff; background: rgba(255,255,255,.18); }
.chat-mention.me { color: var(--accent); background: var(--accent-soft); }
.chat-msg.mine .chat-mention.me { color: #fff; background: rgba(255,255,255,.28); }
.chat-mention-box { margin: 0 12px; max-height: 190px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--card); box-shadow: 0 -4px 18px rgba(0,0,0,.12); display: flex; flex-direction: column; padding: 4px; }
.chat-mention-item { text-align: left; padding: 8px 12px; border: none; background: none; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; border-radius: 8px; white-space: nowrap; }
.chat-mention-item small { color: var(--text-dim); margin-left: 6px; }
.chat-mention-item:hover, .chat-mention-item.active { background: var(--accent-soft); color: var(--accent); }
/* 답글 점프 시 반짝 */
@keyframes chatFlash { 0%,100% { background: transparent; } 20% { background: var(--accent-soft); } }
.chat-msg.chat-flash .chat-bubble { animation: chatFlash 1.4s ease; }
/* 메시지 수정 인라인 폼 */
.chat-msg.editing { width: 100%; max-width: 100%; align-self: stretch; }
.chat-edit { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.chat-edit-input { width: 100%; min-height: 54px; max-height: 160px; resize: vertical; padding: 9px 11px; border: 1px solid var(--accent); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: .9rem; }
.chat-edit-btns { display: flex; gap: 7px; justify-content: flex-end; }
.chat-edit-btns button { padding: 6px 14px; border-radius: 8px; font-size: .84rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.chat-edit-save { background: var(--accent) !important; color: #fff !important; border-color: var(--accent) !important; }

/* 이미지 라이트박스 뷰어 */
.chat-lightbox { position: fixed; inset: 0; z-index: 100001; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; }
.chat-lb-img { max-width: 92vw; max-height: 80vh; border-radius: 8px; box-shadow: 0 12px 44px rgba(0,0,0,.55); }
.chat-lb-close { position: fixed; top: 16px; right: 18px; width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff; font-size: 1.15rem; cursor: pointer; }
.chat-lb-close:hover { background: rgba(255,255,255,.28); }
.chat-lb-dl { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; box-shadow: 0 6px 22px rgba(0,0,0,.45); }
.chat-lb-dl:hover { filter: brightness(1.08); }
.chat-img-wrap { cursor: zoom-in; }
.chat-file-dl { margin-left: auto; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.auth-legal { text-align: center; margin-top: 14px; font-size: 0.82rem; color: var(--text-dim); }
.auth-legal a { color: var(--text-dim); text-decoration: underline; }
/* 새 채팅 배너(토스트) — 앱 사용 중 새 메시지 */
.chat-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(140%); z-index: 2000; display: flex; align-items: center; gap: 10px; max-width: 420px; width: calc(100% - 32px); box-sizing: border-box; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 12px 14px; cursor: pointer; opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.chat-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.chat-toast .ct-ic { font-size: 1.2rem; flex: none; }
.chat-toast .ct-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-toast .ct-title { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-toast .ct-prev { font-size: 0.85rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-toast .ct-x { flex: none; background: none; border: none; color: var(--text-dim); font-size: 0.9rem; cursor: pointer; padding: 4px; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .chat-toast { transition: opacity .2s; } }

/* ---------- 🚐 차량 운행정보 (제스트) ---------- */
.sh-sec { margin: 0 0 22px; }
.sh-sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sh-sec-head h2 { font-size: 1.05rem; margin: 0; }
.sh-sub { font-size: 0.78rem; color: var(--text-dim); font-weight: 500; }
.sh-add { padding: 7px 13px; font-size: 0.82rem; margin-left: auto; }
.sh-date { padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.86rem; }
.sh-memo-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-height: 52px; }
.sh-memo-text { white-space: pre-wrap; line-height: 1.5; font-size: 0.95rem; }
.sh-memo-empty { color: var(--text-dim); font-size: 0.9rem; }
.sh-memo-edit { display: flex; gap: 8px; margin-top: 10px; }
.sh-memo-edit textarea { flex: 1; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem; resize: vertical; min-height: 44px; }

/* 요일 필터 */
.sh-day-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sh-day-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.sh-day-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 노선 카드 */
.sh-group-title { font-size: 0.85rem; font-weight: 800; color: var(--text-dim); margin: 14px 0 8px; }
.sh-group-title:first-child { margin-top: 0; }
.sh-routes { display: flex; flex-direction: column; gap: 12px; }
.sh-route { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.sh-route-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sh-route-name { font-weight: 800; font-size: 1rem; }
.sh-badge { font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.sh-badge.in { background: #dbeafe; color: #1d4ed8; }
.sh-badge.out { background: #fef3c7; color: #b45309; }
.sh-badge.both { background: #ede9fe; color: #6d28d9; }
.sh-route-time { font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.sh-route-days { font-size: 0.82rem; color: var(--text-dim); }
.sh-route-acts { margin-left: auto; display: flex; gap: 6px; }
.sh-icon-btn { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; font-size: 0.78rem; color: var(--text-dim); cursor: pointer; font-family: inherit; }
.sh-icon-btn:hover { color: var(--text); }
.sh-icon-btn.del:hover { color: #e5484d; border-color: #e5484d; }
.sh-route-vehicle { margin-top: 9px; font-size: 0.86rem; color: var(--text); background: var(--bg-soft); border-radius: 8px; padding: 6px 10px; display: inline-flex; gap: 8px; flex-wrap: wrap; }
.sh-route-vehicle .sh-vphone { color: var(--accent); }
.sh-stops-view { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.sh-stop-view { display: flex; gap: 10px; font-size: 0.88rem; align-items: baseline; }
.sh-stop-view .sh-stop-t { flex: none; width: 56px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.sh-stop-view .sh-stop-dot { color: var(--text-dim); }
.sh-route-students { margin-top: 10px; }
.sh-route-students-label { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 5px; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sh-chip { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px; font-size: 0.82rem; }
.sh-route-note { margin-top: 9px; font-size: 0.85rem; color: var(--text-dim); }
.sh-empty { color: var(--text-dim); font-size: 0.9rem; padding: 10px 2px; }

/* 차량 카드 */
.sh-vehicles { display: flex; flex-wrap: wrap; gap: 12px; }
.sh-vehicle { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 13px 16px; min-width: 220px; flex: 1 1 240px; max-width: 340px; }
.sh-vehicle-top { display: flex; align-items: center; gap: 8px; }
.sh-vehicle-name { font-weight: 800; font-size: 1rem; }
.sh-vehicle-plate { font-size: 0.82rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.sh-vehicle-acts { margin-left: auto; display: flex; gap: 6px; }
.sh-vehicle-driver { margin-top: 8px; font-size: 0.9rem; }
.sh-vehicle-driver .sh-vphone { color: var(--accent); font-weight: 700; }
.sh-vehicle-cap { margin-top: 4px; font-size: 0.82rem; color: var(--text-dim); }

/* 편집 모달: 요일 선택·정류장 */
.sh-field { margin: 4px 0 12px; }
.sh-field-label { display: block; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 7px; }
.sh-days-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.sh-day-pick { padding: 7px 0; width: 40px; text-align: center; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.sh-day-pick.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sh-stops { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; }
.sh-stop-edit { border: 1px solid var(--border); border-radius: 11px; padding: 9px 10px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 7px; }
.sh-stop-head { display: flex; gap: 7px; align-items: center; }
.sh-stop-head input.sh-stop-name { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.sh-stop-head input.sh-stop-time { flex: none; width: 104px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.sh-stop-head .sh-stop-del { flex: none; background: none; border: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; padding: 4px 6px; }
.sh-stop-head .sh-stop-del:hover { color: #e5484d; }
.sh-stop-pax { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sh-pax-label { flex: none; font-size: 0.74rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.sh-pax-label.board { background: #dcfce7; color: #15803d; }
.sh-pax-label.alight { background: #fee2e2; color: #b91c1c; }
.sh-pax-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sh-pax-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 2px 5px 2px 10px; font-size: 0.82rem; }
.sh-pax-chip button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.78rem; line-height: 1; padding: 2px; }
.sh-pax-chip button:hover { color: #e5484d; }
.sh-pax-add { background: none; border: 1px dashed var(--border); border-radius: 999px; color: var(--accent); cursor: pointer; font-size: 0.8rem; font-weight: 700; padding: 3px 11px; font-family: inherit; }
.sh-stop-add { font-size: 0.82rem; padding: 6px 12px; }
/* 노선 카드 정류장별 승차/하차 표시 */
.sh-stop-view { flex-wrap: wrap; }
.sh-pax-tag { font-size: 0.8rem; margin-left: 6px; }
.sh-pax-tag .sh-pax-k { font-weight: 800; font-size: 0.72rem; padding: 1px 7px; border-radius: 999px; margin-right: 4px; }
.sh-pax-tag.board .sh-pax-k { background: #dcfce7; color: #15803d; }
.sh-pax-tag.alight .sh-pax-k { background: #fee2e2; color: #b91c1c; }
/* 학생 선택 리스트 */
.sh-pick-list { max-height: 44vh; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px; margin: 10px 0; }
.sh-pick-item { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; font-size: 0.88rem; }
.sh-pick-item input { margin: 0; }
.sh-pick-item .spi-grade { color: var(--text-dim); font-size: 0.78rem; margin-left: auto; }
#shStudentPickModal #shPickSearch { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem; }
#shRouteModal textarea, #shVehicleModal textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 0.92rem; resize: vertical; }

/* 화이트라벨 대상: 운영사 흔적 멘트 (기본 노출, 화이트라벨 ON이면 JS로 숨김) */
.footer-support { margin-top: 5px; font-size: 0.82rem; color: var(--text-dim); cursor: pointer; }
.footer-support:hover { color: var(--accent); }
.acct-operator { padding: 10px 12px 4px; margin-top: 5px; font-size: 0.72rem; color: var(--text-dim); text-align: center; border-top: 1px solid var(--border); }
.update-sign { text-align: right; font-size: 0.86rem; color: var(--text-dim); margin: 8px 2px 2px; }

/* 학부모 초대코드 모달 (zefit 연동) */
.pi-student { font-weight: 600; color: var(--accent); font-size: 0.9em; }
.pi-newrow { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.pi-explabel { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: var(--text-dim); }
.pi-explabel select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card, #fff); color: var(--text); }
.pi-newrow .btn-add { margin-left: auto; }
.pi-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.pi-empty { color: var(--text-dim); font-size: 0.86rem; text-align: center; padding: 14px 0; }
.pi-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.pi-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pi-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.pi-meta { font-size: 0.76rem; color: var(--text-dim); }
.pi-item-act { display: flex; gap: 6px; flex-shrink: 0; }
.pi-item.done { opacity: 0.72; background: var(--surface-2, rgba(127,127,127,0.06)); }
.pi-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.pi-badge.open { background: rgba(46,160,67,0.15); color: #2ea043; }
.pi-badge.used { background: rgba(110,118,129,0.18); color: var(--text-dim); }
.pi-badge.exp { background: rgba(219,109,40,0.16); color: #d1660f; }
/* 소통 게시판 */
.board-card { max-width: 560px; width: 92vw; display: flex; flex-direction: column; max-height: 86vh; }
.board-sub { font-size: .82rem; color: var(--text-dim); margin: -4px 0 10px; }
.board-compose { border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-bottom: 12px; background: var(--card); }
.board-compose textarea { width: 100%; border: none; background: none; color: var(--text); resize: vertical; font: inherit; outline: none; box-sizing: border-box; }
.board-rt-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.board-rt-tools select { font-size: .8rem; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); }
.board-rt-b { min-width: 30px; height: 28px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); cursor: pointer; font-size: .85rem; }
.board-rt-b:hover { border-color: var(--accent, #c0392b); }
.board-rt-color { display: inline-flex; align-items: center; gap: 2px; cursor: pointer; font-size: .9rem; }
.board-rt-color input { width: 26px; height: 24px; border: none; background: none; padding: 0; cursor: pointer; }
.board-rt-input { min-height: 54px; max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--bg); color: var(--text); font-size: .9rem; line-height: 1.5; box-sizing: border-box; }
.board-rt-input:focus { outline: none; border-color: var(--accent, #c0392b); }
.board-rt-input:empty:before { content: attr(data-ph); color: var(--text-dim); pointer-events: none; }
.board-compose-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.board-compose-spacer { flex: 1; }
.board-attach-btn { cursor: pointer; }
.board-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bd-att-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }
.bd-att-chip button { border: none; background: none; cursor: pointer; color: var(--text-dim); }
.board-feed { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.board-empty { color: var(--text-dim); text-align: center; padding: 24px 0; }
.board-more { display: block; margin: 12px auto 4px; }
/* 경영 대시보드 홈 배너(원장 전용) */
.dash-banner { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin: 4px 0 18px; padding: 15px 18px; border: 1px solid var(--border); border-left: 4px solid var(--accent, #a8322b); border-radius: 14px; cursor: pointer; font-family: inherit; color: var(--text); background: var(--card); transition: border-color .14s, box-shadow .14s; }
.dash-banner:hover { box-shadow: 0 2px 12px color-mix(in srgb, var(--accent, #a8322b) 14%, transparent); }
.dash-banner-ic { flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.35rem; border-radius: 12px; background: color-mix(in srgb, var(--accent, #a8322b) 16%, var(--card)); }
.dash-banner-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-banner-txt b { font-size: 1.02rem; font-weight: 800; }
.dash-banner-txt small { font-size: .82rem; color: var(--text-dim); font-weight: 600; }
.dash-banner-go { margin-left: auto; flex-shrink: 0; font-size: .88rem; font-weight: 800; color: var(--accent, #a8322b); white-space: nowrap; }
/* 경영 대시보드 */
.dashboard-page { padding-top: 16px; padding-bottom: 48px; }
.dash-month { color: var(--text-dim); font-size: .9rem; margin-left: auto; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.dash-kpi { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 14px 16px; }
.dash-kpi-t { font-size: .82rem; color: var(--text-dim); font-weight: 700; }
.dash-kpi-v { font-size: 1.5rem; font-weight: 800; margin-top: 4px; color: var(--text); }
.dash-kpi-sub { font-size: .8rem; color: var(--text-dim); font-weight: 600; }
.dash-kpi-v .up, .dash-kpi-sub.up { color: #5f9070; }
.dash-kpi-v .down, .dash-kpi-sub.down { color: #b23b33; }
.dash-section { margin-top: 26px; }
.dash-section h2 { font-size: 1rem; margin: 0 0 10px; }
.dash-section h2 small { color: var(--text-dim); font-weight: 600; }
.dash-nav-hint { color: var(--text-dim); font-size: .82rem; margin: 20px 0 0; }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 10px; }
.dash-card { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 16px 18px; }
.dash-card h2 { font-size: .95rem; margin: 0 0 14px; }
.dash-card h2 small { color: var(--text-dim); font-weight: 600; }
.dash-card-wide { grid-column: 1 / -1; }
.dash-card .dash-bars { justify-content: space-between; }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; justify-content: flex-start; }
.dash-bar-col { flex: 0 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; height: 100%; }
.dash-bar-val { font-size: .72rem; color: var(--text-dim); font-weight: 700; margin-bottom: 3px; white-space: nowrap; }
.dash-bar-track { width: 100%; flex: 1; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--text) 6%, transparent); border-radius: 7px; overflow: hidden; }
.dash-bar-fill { width: 100%; border-radius: 7px; min-height: 3px; transition: height .35s cubic-bezier(.22,1,.36,1); box-shadow: 0 1px 6px color-mix(in srgb, var(--text) 14%, transparent); }
.dash-bar-lab { font-size: .76rem; color: var(--text-dim); margin-top: 5px; }
.dash-card h2.dash-h-up { color: #5f9070; }
.dash-card h2.dash-h-down { color: #b23b33; }
/* 꺾은선그래프 */
.dash-line { position: relative; height: 150px; }
.dash-line-svg { position: absolute; left: 0; top: 20px; width: 100%; height: 108px; overflow: visible; pointer-events: none; }   /* 108 = 150(.dash-line) - 20(값) - 22(월) */
.dash-line-cols { position: absolute; inset: 0; display: flex; }
.dash-line-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.dash-line-col .dash-bar-val { height: 18px; line-height: 18px; margin-bottom: 2px; }
.dash-line-col .dash-bar-lab { height: 20px; line-height: 20px; margin-top: 2px; }
.dash-line-spacer { flex: 1; position: relative; width: 100%; }
.dash-line-dot { position: absolute; left: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, 50%); box-shadow: 0 0 0 2.5px var(--card); }
.dash-line-col-nav { cursor: pointer; border-radius: 8px; transition: background .12s; }
.dash-line-col-nav:hover { background: color-mix(in srgb, var(--accent, #a8322b) 7%, transparent); }
.dash-line-col-nav:hover .dash-bar-lab { color: var(--accent, #a8322b); }
.dash-line-col-nav:focus-visible { outline: 2px solid var(--accent, #a8322b); outline-offset: 2px; }
.dash-bar-col-nav { cursor: pointer; border-radius: 8px; transition: background .12s; }
.dash-bar-col-nav:hover { background: color-mix(in srgb, var(--accent, #a8322b) 8%, transparent); }
.dash-bar-col-nav:hover .dash-bar-fill { filter: brightness(1.06) saturate(1.05); }
.dash-bar-col-nav:hover .dash-bar-lab { color: var(--accent, #a8322b); }
.dash-bar-col-nav:focus-visible { outline: 2px solid var(--accent, #a8322b); outline-offset: 2px; }
.dash-dual { display: flex; gap: 14px; }
.dash-dual-col { flex: 1; min-width: 0; }
.dash-dual-h { font-size: .82rem; font-weight: 700; margin-bottom: 6px; text-align: center; }
.dash-dual-h.up { color: #5f9070; } .dash-dual-h.down { color: #b23b33; }
.dash-dual .dash-bars { height: 96px; }
.dash-risk { display: flex; flex-direction: column; gap: 8px; }
.dash-risk-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 11px 14px; cursor: pointer; }
.dash-risk-row:hover { border-color: #f43f5e; }
.dash-risk-name { font-weight: 800; color: var(--text); white-space: nowrap; }
.dash-risk-name small { color: var(--text-dim); font-weight: 600; margin-left: 6px; }
.dash-risk-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
.dash-risk-chip { font-size: .78rem; font-weight: 700; color: #e11d48; background: color-mix(in srgb, #f43f5e 13%, transparent); border-radius: 999px; padding: 3px 10px; }
.dash-hint { color: var(--text-dim); font-size: .8rem; margin-top: 10px; }
/* 신규 등록 명단 모달 */
.newreg-sum { margin: 2px 0 10px; color: var(--text-dim); font-size: .9rem; }
.newreg-sub { font-weight: 400; font-size: .82em; opacity: .75; }
.newreg-sum b { color: var(--text); }
.newreg-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; }
.newreg-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 11px 14px; cursor: pointer; }
.newreg-row:hover { border-color: var(--accent, #a8322b); }
.newreg-name { font-weight: 800; color: var(--text); white-space: nowrap; }
.newreg-name small { color: var(--text-dim); font-weight: 600; margin-left: 6px; }
.newreg-meta { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.newreg-subj { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.newreg-tag { font-size: .76rem; font-weight: 700; color: var(--sc, var(--accent, #a8322b)); background: color-mix(in srgb, var(--sc, #a8322b) 13%, transparent); border-radius: 999px; padding: 3px 9px; }
.newreg-date { color: var(--text-dim); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.board-page { padding-top: 16px; padding-bottom: 40px; }
.board-page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.board-page-head h1 { margin: 0; font-size: 22px; }
.board-page #boardBackBtn { flex-shrink: 0; }
.board-students { margin-top: 16px; border-top: 2px solid var(--line, #eee); padding-top: 12px; }
.board-students-head { font-weight: 700; margin-bottom: 8px; }
.board-students-head small { font-weight: 400; color: var(--text-dim); }
.board-stu-search { margin-bottom: 8px; }
.board-stu-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; font-size: 14px; }
.board-stu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.board-stu { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; background: var(--paper, #fff); cursor: pointer; }
.board-stu:hover { border-color: var(--accent, #c0392b); }
.board-stu-name { font-weight: 600; }
.board-stu-grade { color: var(--text-dim); font-size: 13px; }
.board-stu-go { margin-left: auto; color: var(--accent, #c0392b); font-size: 13px; white-space: nowrap; }
/* 소통게시판 탭(전체/개별) — 선택 탭은 강조색으로 채워 명확히 구분 */
.board-tabs { display: flex; gap: 8px; margin: 2px 0 14px; }
.board-tab { padding: 9px 18px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-size: .9rem; font-weight: 700; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.board-tab:not(.active):hover { color: var(--text); border-color: var(--text-dim); }
.board-tab.active { background: var(--accent, #c0392b); color: #fff; border-color: var(--accent, #c0392b); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent, #c0392b) 35%, transparent); }
.board-cfg-btn { margin-left: auto; align-self: center; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-size: .85rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.board-cfg-btn ~ .board-cfg-btn { margin-left: 0; }   /* 두 번째부터는 auto 해제 → 우측에 나란히 붙게(가운데 뜨는 것 방지) */
.board-cfg-btn:hover { color: var(--text); border-color: var(--text-dim); }
.pf-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 10px 0 14px; }
.pf-item { display: flex; align-items: center; gap: 9px; font-size: .92rem; cursor: pointer; padding: 5px 2px; }
.pf-item input { width: 18px; height: 18px; accent-color: var(--accent, #c0392b); flex-shrink: 0; }
.pf-item input:disabled { cursor: default; }
.pf-policy { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; margin: 2px 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); cursor: pointer; font-size: .9rem; line-height: 1.5; }
.pf-policy input { width: 18px; height: 18px; accent-color: var(--accent, #c0392b); flex-shrink: 0; margin-top: 1px; }
.pf-policy input:disabled { cursor: default; }
.pf-policy-sub { color: var(--text-dim); font-size: .8rem; }
.pf-sc-sec { margin: 4px 0 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 9px; }
.pf-sc-head { font-size: .9rem; font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pf-sc-head .pf-policy-sub { font-weight: 400; }
.pf-sc-sec .brsc-del { border: none; background: none; cursor: pointer; color: var(--text-dim); font-size: .9rem; }
/* 학원소개(랜딩) 편집기 — 좌측 폼 + 우측 실시간 미리보기 */
.lp-edit-card { max-width: 1120px; width: 96vw; }
.lp-edit-split { display: flex; gap: 16px; margin-top: 10px; align-items: stretch; }
.lp-edit-pane { flex: 1 1 46%; min-width: 0; display: flex; flex-direction: column; }
.lp-preview-pane { flex: 1 1 54%; min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.lp-preview-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: .82rem; font-weight: 700; color: var(--text-dim); border-bottom: 1px solid var(--border); background: var(--card); }
.lp-prev-tools { display: flex; gap: 6px; }
.lp-prev-btn { border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text-dim); width: 30px; height: 28px; cursor: pointer; font-size: .9rem; }
.lp-prev-btn:hover { border-color: var(--accent, #c0392b); color: var(--accent, #c0392b); }
.lp-prev-btn.on { border-color: var(--accent, #c0392b); color: var(--accent, #c0392b); background: color-mix(in srgb, var(--accent, #c0392b) 8%, transparent); }
.lp-preview-stage { flex: 1; min-height: 0; display: flex; justify-content: center; overflow: auto; background: #e9edf2; }
.lp-preview-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.lp-preview-stage.mobile { padding: 14px 0; }
.lp-preview-stage.mobile .lp-preview-frame { width: 390px; max-width: 100%; height: 760px; max-height: 100%; border-radius: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.18); flex: none; }
@media (max-width: 860px) { .lp-edit-split { flex-direction: column; } .lp-preview-pane { min-height: 420px; } }
.lp-edit-body { flex: 1; min-height: 0; max-height: 72vh; overflow-y: auto; margin: 0 0 12px; padding-right: 6px; display: flex; flex-direction: column; gap: 16px; }
.lp-sec-ed { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.lp-sec-ed h3 { margin: 0 0 10px; font-size: .95rem; font-weight: 800; color: var(--accent, #c0392b); }
.lp-f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; }
.lp-f:last-child { margin-bottom: 0; }
.lp-fl { font-size: .8rem; font-weight: 700; color: var(--text-dim); }
.lp-fl2 { font-size: .8rem; font-weight: 700; color: var(--text-dim); margin: 6px 0 4px; }
.lp-in { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg, #fff); color: var(--text); font-family: inherit; font-size: .9rem; }
textarea.lp-in { resize: vertical; line-height: 1.5; }
.lp-in:disabled { opacity: .7; }
.lp-list { display: flex; flex-direction: column; gap: 8px; }
.lp-lrow { display: flex; align-items: flex-start; gap: 6px; }
.lp-lrow .lp-in { flex: 1; min-width: 0; }
.lp-del { flex-shrink: 0; width: 30px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text-dim); cursor: pointer; }
.lp-del:hover { color: #c0392b; border-color: #c0392b; }
.lp-addrow { align-self: flex-start; padding: 6px 12px; border: 1px dashed var(--border); border-radius: 9px; background: transparent; color: var(--text-dim); font-size: .85rem; cursor: pointer; }
.lp-addrow:hover { border-color: var(--accent, #c0392b); color: var(--accent, #c0392b); }
.lp-tmpls { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-tmpl { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-size: .85rem; }
.lp-tmpl.on { border-color: var(--accent, #c0392b); background: color-mix(in srgb, var(--accent, #c0392b) 8%, transparent); font-weight: 700; }
.lp-tmpl input { accent-color: var(--accent, #c0392b); }
.lp-steps-ed { display: flex; gap: 6px; margin-bottom: 9px; }
.lp-steps-ed .lp-in { flex: 1; min-width: 0; }
.lp-imgrow { display: flex; gap: 6px; align-items: center; }
.lp-imgrow .lp-in { flex: 1; min-width: 0; }
.lp-color-row { display: flex; gap: 8px; align-items: center; }
.lp-color-row .lp-in { flex: 1; min-width: 0; }
.lp-color { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer; flex-shrink: 0; }
.lp-color-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lp-color-btns button { padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-size: .84rem; cursor: pointer; }
.lp-color-btns button:hover { border-color: var(--accent, #c0392b); color: var(--accent, #c0392b); }
.lp-upbtn { flex-shrink: 0; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text-dim); cursor: pointer; font-size: .95rem; }
.lp-upbtn:hover { border-color: var(--accent, #c0392b); color: var(--accent, #c0392b); }
.lp-blk { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 9px; background: var(--bg); }
.lp-blk-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lp-blk-ty { font-size: .78rem; font-weight: 800; color: var(--accent, #c0392b); background: color-mix(in srgb, var(--accent, #c0392b) 9%, transparent); border-radius: 6px; padding: 2px 9px; }
.lp-blk-ops { display: flex; gap: 4px; }
.lp-blk-ops button { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-soft); color: var(--text-dim); cursor: pointer; }
.lp-blk-ops button:disabled { opacity: .35; cursor: default; }
.lp-blk-ops button:not(:disabled):hover { border-color: var(--accent, #c0392b); color: var(--accent, #c0392b); }
.lp-blk-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lp-blk-add button { padding: 7px 12px; border: 1px dashed var(--border); border-radius: 9px; background: transparent; color: var(--text-dim); font-size: .84rem; cursor: pointer; }
.lp-blk-add button:hover { border-color: var(--accent, #c0392b); color: var(--accent, #c0392b); border-style: solid; }
/* 개별게시판 학생 드릴인: 학부모 화면 미리보기 서브탭 + 섹션 */
.board-ptabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.board-ptabs::-webkit-scrollbar { display: none; }
.board-ptab { flex: 0 0 auto; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-size: .85rem; font-weight: 700; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.board-ptab:not(.on):hover { color: var(--text); border-color: var(--text-dim); }
.board-ptab.on { background: var(--accent, #c0392b); color: #fff; border-color: var(--accent, #c0392b); }
.board-preview { display: flex; flex-direction: column; gap: 14px; }
.bp-note { font-size: .8rem; color: var(--text-dim); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 0; }
.bp-sec { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.bp-t { font-weight: 800; font-size: .92rem; margin-bottom: 9px; color: var(--text); }
.bp-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: .88rem; }
.bp-sec .bp-line:first-of-type { border-top: none; }
.bp-line.col { flex-direction: column; align-items: stretch; gap: 3px; }
.bp-line-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bp-line-sub { font-size: .8rem; color: var(--text-dim); }
.bp-muted { font-size: .8rem; color: var(--text-dim); font-weight: 500; }
.bp-tag { flex-shrink: 0; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); }
.bp-tag.ok { background: color-mix(in srgb, #16a34a 16%, transparent); color: #15803d; }
.bp-tag.absent { background: color-mix(in srgb, #dc2626 15%, transparent); color: #b91c1c; }
.bp-tag.late { background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; }
.bp-pill { flex-shrink: 0; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); }
.bp-pill.mine { background: color-mix(in srgb, var(--accent, #c0392b) 14%, transparent); color: var(--accent, #c0392b); }
.bp-att-block { margin-bottom: 12px; }
.bp-att-block:last-child { margin-bottom: 0; }
.bp-att-head { font-weight: 700; font-size: .86rem; margin-bottom: 6px; }
.bp-att-cls { color: var(--text-dim); font-weight: 500; margin-left: 6px; font-size: .8rem; }
.bp-att-scroll { overflow-x: auto; }
.bp-att-tbl { width: 100%; border-collapse: collapse; font-size: .8rem; }
.bp-att-tbl th, .bp-att-tbl td { border: 1px solid var(--border); padding: 5px 7px; text-align: left; vertical-align: top; }
.bp-att-tbl th { background: var(--bg-soft); color: var(--text-dim); font-weight: 700; white-space: nowrap; }
.bp-att-badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--bg-soft); color: var(--text-dim); }
.bp-att-badge.ok { background: color-mix(in srgb, #16a34a 16%, transparent); color: #15803d; }
.bp-att-badge.absent { background: color-mix(in srgb, #dc2626 15%, transparent); color: #b91c1c; }
.bp-att-badge.late { background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; }
.bp-att-detail { font-size: .74rem; color: var(--text-dim); margin-top: 2px; }
.bp-vid { padding: 7px 0; border-top: 1px solid var(--border); }
.bp-sec .bp-vid:first-of-type { border-top: none; }
.bp-vid-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; }
.bp-bar { height: 6px; border-radius: 999px; background: var(--bg-soft); margin-top: 5px; overflow: hidden; }
.bp-bar-fill { height: 100%; background: var(--accent, #c0392b); border-radius: 999px; }
/* 전체게시판 분리 그룹 바 + 설정 모달 */
.board-segbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.board-seg { padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-size: .82rem; font-weight: 700; cursor: pointer; }
.board-seg.active { background: color-mix(in srgb, var(--accent, #c0392b) 14%, transparent); color: var(--accent, #c0392b); border-color: var(--accent, #c0392b); }
.board-seg-collect { margin-right: 4px; border-style: dashed; }
.board-seg-collect::after { content: ""; display: inline-block; width: 1px; height: 11px; margin-left: 9px; vertical-align: -1px; background: var(--border); }
.board-seg-gear { margin-left: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--card); cursor: pointer; padding: 5px 9px; font-size: .85rem; }
.board-seg-add { padding: 6px 13px; border: 1.5px dashed var(--accent, #c0392b); border-radius: 999px; background: transparent; color: var(--accent, #c0392b); font-size: .82rem; font-weight: 700; cursor: pointer; }
.board-seg-add:hover { background: color-mix(in srgb, var(--accent, #c0392b) 10%, transparent); }
.board-seg-card { max-width: 460px; }
.board-seg-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; max-height: 52vh; overflow-y: auto; }
.board-seg-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.board-seg-row-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.board-seg-name { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: var(--card); color: var(--text); }
.board-seg-del { border: none; background: none; color: var(--danger, #c0392b); cursor: pointer; font-size: .82rem; white-space: nowrap; }
.board-seg-grades { display: flex; flex-wrap: wrap; gap: 5px; }
.board-seg-g.active { background: var(--accent, #c0392b); color: #fff; border-color: var(--accent, #c0392b); }
.board-seg-sub { font-size: .76rem; font-weight: 700; color: var(--text-dim); margin: 10px 0 5px; }
.board-seg-sub small { font-weight: 400; }
.board-seg-classes { display: flex; flex-direction: column; gap: 5px; }
.board-seg-subj { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.board-seg-subj-h { width: 100%; text-align: left; display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: var(--bg-soft); border: none; cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--text); }
.board-seg-subj-arrow::before { content: "\25B8"; font-size: .7rem; color: var(--text-dim); }
.board-seg-subj.open .board-seg-subj-arrow::before { content: "\25BE"; }
.board-seg-subj-cnt { color: var(--accent, #c0392b); font-weight: 700; }
.board-seg-subj-c { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 10px; }
.board-seg-c.active { background: var(--accent, #c0392b); color: #fff; border-color: var(--accent, #c0392b); }
.board-seg-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.board-seg-msg { font-size: .82rem; color: var(--text-dim); }
/* 개별게시판 허브: 받는 학생 다중선택 */
.board-recipients { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; background: var(--card); }
.board-rec-head { font-weight: 700; margin-bottom: 8px; }
.board-rec-head small { font-weight: 400; color: var(--text-dim); }
.board-rec-actions { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; }
.board-rec-count { margin-left: auto; font-size: .8rem; color: var(--accent, #c0392b); font-weight: 700; }
.board-rec-list { max-height: 44vh; overflow-y: auto; }
.board-rec-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line, #e5e5e5); border-radius: 10px; background: var(--paper, #fff); }
.board-rec-item.sel { border-color: var(--accent, #c0392b); background: color-mix(in srgb, var(--accent, #c0392b) 7%, transparent); }
.board-rec-pick { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; cursor: pointer; }
.board-rec-pick input { width: 17px; height: 17px; accent-color: var(--accent, #c0392b); flex-shrink: 0; }
.board-rec-name { font-weight: 600; }
.board-rec-grade { color: var(--text-dim); font-size: 13px; }
.board-rec-go { margin-left: auto; color: var(--accent, #c0392b); font-size: 13px; white-space: nowrap; background: none; border: none; cursor: pointer; padding: 4px 6px; }
.pe-compose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pe-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pe-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-dim); flex: 1 1 120px; }
.pe-field input { font-size: 14px; }
.pe-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px 2px; border-bottom: 1px solid var(--line, #eee); }
.pe-item-main { flex: 1; min-width: 0; }
.pe-when { margin-left: 8px; color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.pe-memo { margin-top: 3px; color: var(--text-dim); font-size: 13px; white-space: pre-wrap; }
.pe-item-act { display: flex; gap: 4px; flex-shrink: 0; }
.pe-byparent { background: color-mix(in srgb, var(--accent, #c0392b) 6%, transparent); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.pe-tag { margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent, #c0392b) 14%, transparent); color: var(--accent, #c0392b); white-space: nowrap; }
.bd-post { border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.bd-post-head { display: flex; align-items: center; gap: 8px; }
.bd-nick { font-size: .9rem; }
.bd-time { font-size: .72rem; color: var(--text-dim); }
.bd-board-tag { font-size: .7rem; font-weight: 700; color: var(--accent, #c0392b); background: color-mix(in srgb, var(--accent, #c0392b) 11%, transparent); border: 1px solid color-mix(in srgb, var(--accent, #c0392b) 30%, transparent); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.bd-del { margin-left: auto; border: none; background: none; cursor: pointer; opacity: .6; font-size: .9rem; }
.bd-del.sm { margin-left: 4px; font-size: .74rem; }
.bd-text { margin: 6px 0; font-size: .9rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.bd-atts { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; align-items: flex-start; }
.bd-att-img img, .bd-att-vid { max-width: 100%; border-radius: 8px; max-height: 320px; }
.bd-att-link { font-size: .84rem; color: var(--accent, #c0392b); word-break: break-all; }
/* 이모지 반응 바 */
.bd-react-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bd-react { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); cursor: pointer; font-size: .95rem; line-height: 1; transition: background .12s, border-color .12s; }
.bd-react:hover { background: var(--bg-soft); }
.bd-react.on { background: color-mix(in srgb, var(--accent, #c0392b) 13%, transparent); border-color: var(--accent, #c0392b); }
.bd-react-n { font-size: .78rem; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.bd-react.on .bd-react-n { color: var(--accent, #c0392b); }
.bd-react-who { margin-top: 6px; font-size: .76rem; color: var(--text-dim); line-height: 1.6; }
/* 투표 (글 내 표시 + 작성 빌더) */
.bd-polls { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 2px; }
.bd-poll { border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; background: var(--bg-soft); }
.bd-poll-q { font-weight: 700; font-size: .9rem; margin-bottom: 9px; line-height: 1.45; }
.bd-poll-badge { font-size: .68rem; font-weight: 700; color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; margin-left: 4px; white-space: nowrap; }
.bd-poll-opts { display: flex; flex-direction: column; gap: 6px; }
.bd-poll-opt { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); cursor: pointer; font-size: .86rem; text-align: left; overflow: hidden; transition: border-color .12s; }
.bd-poll-opt:hover { border-color: var(--accent, #c0392b); }
.bd-poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent, #c0392b) 12%, transparent); z-index: 0; transition: width .25s ease; }
.bd-poll-opt.on { border-color: var(--accent, #c0392b); }
.bd-poll-opt.on .bd-poll-bar { background: color-mix(in srgb, var(--accent, #c0392b) 20%, transparent); }
.bd-poll-mark { position: relative; z-index: 1; width: 16px; color: var(--accent, #c0392b); font-weight: 900; }
.bd-poll-t { position: relative; z-index: 1; flex: 1; min-width: 0; }
.bd-poll-n { position: relative; z-index: 1; font-size: .76rem; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-poll-meta { margin-top: 8px; font-size: .76rem; color: var(--text-dim); }
.bd-poll-who { margin-top: 5px; font-size: .74rem; color: var(--text-dim); line-height: 1.6; }
.bd-poll-who b { color: var(--text); font-weight: 700; }
.board-polls-edit { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.bpe-poll { border: 1px dashed var(--border); border-radius: 10px; padding: 10px; background: var(--bg-soft); }
.bpe-head { display: flex; gap: 6px; align-items: center; }
.bpe-q { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .85rem; font-weight: 700; font-family: inherit; }
.bpe-q:focus, .bpe-opt input:focus { outline: none; border-color: var(--accent, #c0392b); }
.bpe-polldel { flex: none; border: none; background: none; cursor: pointer; font-size: .95rem; padding: 4px; }
.bpe-opts { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bpe-opt { display: flex; gap: 6px; align-items: center; }
.bpe-opt input { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: .84rem; font-family: inherit; }
.bpe-optdel { flex: none; border: none; background: none; cursor: pointer; color: var(--text-dim); font-size: .85rem; padding: 4px 6px; }
.bpe-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bpe-optadd { border: none; background: none; cursor: pointer; color: var(--accent, #c0392b); font-size: .82rem; font-weight: 700; padding: 2px 0; }
.bpe-multi { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--text-dim); cursor: pointer; }
/* 채팅 투표 */
.chat-poll-edit { padding: 8px 10px 0; }
.chat-polls { margin: 4px 0 2px; max-width: 460px; }
.chat-polls .bd-poll { background: var(--card); }
.chat-msg.mine .chat-polls .bd-poll { background: var(--bg-soft); }
/* 해시태그(중분류) */
.board-tags-input { width: 100%; box-sizing: border-box; margin-top: 8px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-size: .85rem; font-family: inherit; }
.board-tags-input:focus { outline: none; border-color: var(--accent, #c0392b); }
.board-mine-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; margin-right: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-size: .8rem; font-weight: 700; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.board-mine-chip:hover { color: var(--text); border-color: var(--text-dim); }
.board-mine-chip.active { background: var(--accent, #c0392b); color: #fff; border-color: var(--accent, #c0392b); }
.board-tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.board-tag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-dim); font-size: .8rem; font-weight: 700; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.board-tag-chip:hover { color: var(--text); border-color: var(--text-dim); }
.board-tag-chip.active { background: var(--accent, #c0392b); color: #fff; border-color: var(--accent, #c0392b); }
.board-tag-n { font-size: .72rem; font-weight: 700; opacity: .7; font-variant-numeric: tabular-nums; }
.bd-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.bd-tag { padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); color: var(--accent, #c0392b); font-size: .76rem; font-weight: 700; cursor: pointer; }
.bd-tag:hover { background: color-mix(in srgb, var(--accent, #c0392b) 12%, transparent); border-color: var(--accent, #c0392b); }
.bd-cmts { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.bd-cmt { font-size: .82rem; line-height: 1.4; }
.bd-cmt b { margin-right: 4px; }
.bd-cmt.reply { margin-left: 18px; padding-left: 8px; border-left: 2px solid var(--border); }
.bd-reply-btn { margin-left: 6px; border: none; background: none; color: var(--text-dim); font-size: .74rem; cursor: pointer; padding: 0; }
.bd-reply-btn:hover { color: var(--accent, #c0392b); text-decoration: underline; }
.bd-reply-hint { font-size: .78rem; color: var(--text-dim); align-self: center; white-space: nowrap; }
.bd-reply-hint .bd-reply-x { border: none; background: none; color: var(--accent, #c0392b); cursor: pointer; font-size: .74rem; padding: 0 2px; }
.bd-cmt-form { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.bd-cmt-input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; background: var(--bg); color: var(--text); font-size: .82rem; }
.bd-cmt-send { border: none; background: var(--accent-soft); border-radius: 8px; padding: 0 12px; cursor: pointer; font-size: .8rem; color: var(--text); flex-shrink: 0; }
/* 출근부 IP 제한 설정(원장) */
.ts-ipcfg { margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.ts-ipcfg-top { display: flex; align-items: center; gap: 7px; font-size: .88rem; cursor: pointer; }
.ts-ipcfg-body { margin-top: 10px; }
.ts-ip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ts-ip-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--accent-soft); border-radius: 8px; padding: 3px 8px; font-size: .82rem; }
.ts-ip-chip code { font-family: ui-monospace, Menlo, monospace; }
.ts-ip-chip button { border: none; background: none; cursor: pointer; color: var(--text-dim); font-size: .8rem; }
.ts-ip-none { font-size: .82rem; color: var(--text-dim); }
.ts-ip-cur { font-size: .84rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ts-ip-cur b { font-family: ui-monospace, Menlo, monospace; }
.ts-ip-hint { font-size: .76rem; color: var(--text-dim); margin: 7px 0 0; line-height: 1.5; }
.ts-ip-warn { font-size: .82rem; color: #b4531f; background: rgba(219,109,40,0.1); border-radius: 8px; padding: 7px 10px; margin: 0 0 8px; line-height: 1.5; }
.btn-ghost.sm { padding: 5px 10px; font-size: 0.8rem; }

/* ===== 알림톡 설정 (토글) ===== */
.at-status { font-size: .86rem; line-height: 1.55; margin: 2px 0 6px; }
.at-list { display: flex; flex-direction: column; gap: 10px; }
.at-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft, #faf7f2); }
.at-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.at-info b { font-size: .9rem; color: var(--text); }
.at-sample { font-size: .77rem; color: var(--text-dim); line-height: 1.5; }
.at-eg { display: inline-block; font-size: .64rem; font-weight: 700; color: var(--accent); background: var(--accent-soft, #fbeee3); border-radius: 5px; padding: 1px 5px; margin-right: 4px; vertical-align: middle; }
.at-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.at-switch input { opacity: 0; width: 0; height: 0; }
.at-slider { position: absolute; inset: 0; background: var(--border, #ccc); border-radius: 24px; transition: .2s; }
.at-slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.at-switch input:checked + .at-slider { background: var(--accent, #db6d28); }
.at-switch input:checked + .at-slider::before { transform: translateX(20px); }

/* ===== 도움말 봇 (? 버튼) ===== */
.help-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 1400;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent, #db6d28); color: #fff; font-size: 1.5rem; font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22); transition: transform .12s ease, box-shadow .12s ease;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.help-fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 6px 20px rgba(0,0,0,0.28); }
.help-fab:active { transform: scale(0.97); }
/* 둘러보기(투어) 버튼 — 전 탭 통일: 화면 '최상단 우측'에 고정(pill FAB). 탭별 hidden 토글로 현재 탭 것만 노출(한 번에 하나).
   z-index는 헤더(20) 위로 둬서 헤더/배너에 안 가려지게(모달 50·투어오버레이 4000보다는 아래). */
.tour-fab {
  position: fixed; top: calc(env(safe-area-inset-top) + 64px); right: 16px; z-index: 30;
  display: inline-flex !important; align-items: center; gap: 4px;
  padding: 7px 13px; border-radius: 999px; cursor: pointer; width: auto; height: auto;
  background: var(--card, #fff); color: var(--text); border: 1px solid var(--border);
  font-family: inherit; font-size: 0.82rem; font-weight: 700; line-height: 1; white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15); transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.tour-fab:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(0,0,0,0.22); background: var(--bg-soft, #f3f0ea); }
.tour-fab:active { transform: scale(0.97); }
.tour-fab[hidden] { display: none !important; }   /* display 지정이 hidden 기본값을 덮으므로 명시적으로 숨김 */
body.chat-docked:not(.chat-dock-left) .tour-fab { right: calc(350px + 16px); }   /* 채팅 우측 도킹 시 가리지 않게 밀기(help-fab과 동일) */
@media (max-width: 640px) { .tour-fab { top: calc(env(safe-area-inset-top) + 58px); right: 12px; padding: 6px 11px; font-size: 0.78rem; } }
.tour-fab { display: none !important; }   /* 상단 '둘러보기' 버튼 제거 — 우측 하단 ? 버튼(도움말/둘러보기)로 일원화 (2026-11-08) */
.help-card { max-width: 440px; width: 92vw; max-height: 82vh; display: flex; flex-direction: column; }
.help-h { margin: 0 0 4px; }
.help-sub { font-size: .86rem; color: var(--text-dim); margin: 0 0 12px; line-height: 1.5; }
.help-searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.help-searchbar input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border, #e3ddd4); border-radius: 10px; font-size: .92rem; background: var(--card, #fff); color: var(--text, #2a2a2a); }
.help-searchbar .btn-add { white-space: nowrap; }
.help-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.help-answers, .help-faq { }
.help-acard { border: 1px solid var(--border, #e3ddd4); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg-soft, #faf7f2); }
.help-aq { font-weight: 700; font-size: .92rem; margin-bottom: 6px; color: var(--text, #2a2a2a); }
.help-aa { font-size: .88rem; line-height: 1.6; color: var(--text, #333); }
.help-aa b { color: var(--accent, #db6d28); }
.help-cat { margin-bottom: 14px; }
.help-cat-t { font-size: .74rem; font-weight: 700; color: var(--text-dim); letter-spacing: .04em; margin-bottom: 7px; text-transform: uppercase; }
.help-q { display: block; width: 100%; text-align: left; padding: 9px 12px; margin-bottom: 6px; border: 1px solid var(--border, #e3ddd4); border-radius: 10px; background: var(--card, #fff); color: var(--text, #333); font-size: .86rem; cursor: pointer; transition: background .12s, border-color .12s; }
.help-q:hover { background: var(--accent-soft, #fbeee3); border-color: var(--accent, #db6d28); }
.help-empty { font-size: .86rem; color: var(--text-dim); text-align: center; padding: 18px 0; }
.help-noanswer { text-align: center; padding: 10px 0; }
.help-noanswer p { font-size: .9rem; color: var(--text, #333); line-height: 1.6; margin: 0 0 12px; }
.help-again { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.help-inq-btn { padding: 10px 14px; border: none; border-radius: 10px; background: var(--accent, #db6d28); color: #fff; font-size: .88rem; font-weight: 600; cursor: pointer; }
.help-inq-btn:hover { filter: brightness(1.05); }
.help-inq-link { background: none; border: none; color: var(--accent, #db6d28); font-size: .82rem; cursor: pointer; text-decoration: underline; padding: 6px; }
.help-foot { border-top: 1px solid var(--border, #eee); margin-top: 12px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.help-foot span { font-size: .82rem; color: var(--text-dim); }
.help-inq-btn, .help-q { font-family: inherit; }
/* 도움말 아코디언(FAQ·튜토리얼 다시 보기) */
.help-acc { border-top: 1px solid var(--border, #e8e2d8); }
.help-acc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: none; border: none; padding: 13px 2px; font-family: inherit; font-size: .92rem; font-weight: 800; color: var(--text); cursor: pointer; text-align: left; }
.help-acc-t { transition: color .12s; }
.help-acc-h:hover .help-acc-t { color: var(--accent, #a8322b); }
.help-acc-ic { color: var(--text-dim); font-size: .78rem; transition: transform .16s ease; flex: none; }
.help-acc-h.open .help-acc-ic { transform: rotate(180deg); }
.help-acc-body { padding-bottom: 12px; }
.help-tours-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.help-tour-btn { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--border, #e3ddd4); border-radius: 10px; background: var(--card, #fff); color: var(--text, #333); font-family: inherit; font-size: .83rem; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .12s, border-color .12s; }
.help-tour-btn:hover { background: var(--accent-soft, #fbeee3); border-color: var(--accent, #db6d28); }
@media (max-width: 640px) { .help-tours-btns { grid-template-columns: 1fr; } }

/* ===== 가이드 투어 ===== */
.tour-overlay { position: fixed; inset: 0; z-index: 4000; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10,12,16,0.62); transition: all .22s ease; pointer-events: none; }
.tour-pop { position: fixed; z-index: 4001; width: min(340px, calc(100vw - 24px)); background: var(--bg, #fff); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,0.3); padding: 16px 18px; }
.tour-pop.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-step { font-size: 0.74rem; color: var(--text-dim); font-weight: 700; margin-bottom: 4px; }
.tour-title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; color: var(--text); }
.tour-body { margin: 0 0 14px; font-size: 0.9rem; line-height: 1.55; color: var(--text); }
.tour-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-skip { border: none; background: none; color: var(--text-dim); font-size: 0.84rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.tour-nav { display: flex; gap: 8px; }
.tour-prev { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 8px; padding: 7px 12px; font-size: 0.85rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.tour-next { padding: 7px 16px; font-size: 0.85rem; }

/* ===== 시작하기 체크리스트 ===== */
.setup-checklist { background: linear-gradient(135deg, rgba(8,145,178,0.08), rgba(219,109,40,0.06)); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; }
.sc-head { display: flex; align-items: center; gap: 10px; }
.sc-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.sc-prog { font-size: 0.82rem; font-weight: 700; color: #0e7490; background: rgba(8,145,178,0.12); border-radius: 999px; padding: 2px 9px; }
.sc-hide { margin-left: auto; border: none; background: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; line-height: 1; }
.sc-bar { height: 6px; background: var(--bg-soft); border-radius: 999px; margin: 10px 0 12px; overflow: hidden; }
.sc-bar-fill { height: 100%; background: #0e9488; border-radius: 999px; transition: width .3s ease; }
.sc-steps { display: flex; flex-direction: column; gap: 7px; }
.sc-step { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; }
.sc-step.done .sc-label { color: var(--text-dim); text-decoration: line-through; }
.sc-chk { flex-shrink: 0; }
.sc-label { font-weight: 600; color: var(--text); }
.sc-go { margin-left: auto; border: 1px solid rgba(8,145,178,0.4); background: rgba(8,145,178,0.08); color: #0e7490; border-radius: 8px; padding: 4px 12px; font-size: 0.8rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.sc-go:hover { background: rgba(8,145,178,0.16); }
.sc-go.sc-go-done { border-color: var(--border); background: var(--bg); color: var(--text-dim); font-weight: 600; }
.sc-go.sc-go-done:hover { background: var(--bg-soft); color: var(--text); }
.sc-more { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.sc-more-head { font-size: 0.84rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.sc-more-head small { color: var(--text-dim); font-weight: 600; }
.sc-more-btns { display: flex; flex-wrap: wrap; gap: 7px; }
.sc-more-btn { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.sc-more-btn:hover { background: var(--bg-soft); border-color: #0e7490; color: #0e7490; }

/* ============================================================
   홈 스타일 프리셋: 제스트 페이퍼 (body.home-paper)
   브랜딩 설정 '홈 스타일 = 제스트 페이퍼' 선택 시 서버가 body 클래스로 주입.
   기본 홈은 영향 없음 — 전부 .home-paper 스코프. 색은 기본 토큰(크림·잉크레드) 그대로.
   v1: 히어로 좌측정렬·확대 + 메인 타일 강조색 아이콘 칩 + 간격 리파인 (CSS만, 오프라인 안전)
   ============================================================ */
.home-paper .home-launch-hero { text-align: left; padding: 34px 4px 4px; }
.home-paper .home-brand { justify-content: flex-start; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.home-paper .home-logo { height: 56px; }
.home-paper .home-brand { gap: 14px; margin: 0 0 20px; align-items: flex-end; }
.home-paper .home-slogan { font-size: 1.85rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1; color: var(--text-dim); transform: translateY(0.08em); }
.home-paper .home-launch-hero h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; line-height: 1.22; letter-spacing: -0.02em; margin: 6px 0 0; }
.home-paper .hero-search { margin: 0; }

/* Phosphor 라인아이콘(자체호스팅, 오프라인). .home-paper 메인 타일에서만 사용. */
@font-face {
  font-family: 'PhosphorHome';
  src: url('/phosphor.woff2?v=1') format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
}

/* 메인 메뉴 타일: 이모지를 숨기고 강조색 칩 안에 라인아이콘 — 바로가기·글자아이콘 타일은 제외 */
.home-paper #menuGrid .launch-tile .lt-ic {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 2px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 0;   /* 이모지 숨김 */
  transition: background 0.15s;
}
.home-paper #menuGrid .launch-tile .lt-ic::before {
  font-family: 'PhosphorHome'; font-weight: normal; font-style: normal;
  font-size: 26px; line-height: 1; color: var(--accent); display: inline-block;
  -webkit-font-smoothing: antialiased;
}
.home-paper #menuGrid .launch-tile:hover .lt-ic { background: rgba(192, 57, 43, 0.16); }
.home-paper #menuGrid .launch-tile.primary .lt-ic { background: rgba(255, 255, 255, 0.18); }
.home-paper #menuGrid .launch-tile.primary:hover .lt-ic { background: rgba(255, 255, 255, 0.26); }
.home-paper #menuGrid .launch-tile.primary .lt-ic::before { color: #fff; }
.home-paper #menuGrid .launch-tile { gap: 6px; }

/* 타일별 글리프 (목업과 동일 Phosphor 아이콘) */
.home-paper #launchArchive  .lt-ic::before { content: "\e24a"; }   /* folder */
.home-paper #launchInstant  .lt-ic::before { content: "\e3b4"; }   /* pencil-simple */
.home-paper #launchCalendar .lt-ic::before { content: "\e7b4"; }   /* calendar-dots */
.home-paper #launchMeetings .lt-ic::before { content: "\e198"; }   /* clipboard-text */
.home-paper #launchCounsel  .lt-ic::before { content: "\e62c"; }   /* graduation-cap */
.home-paper #launchBooks    .lt-ic::before { content: "\e390"; }   /* package */
.home-paper #launchBoard    .lt-ic::before { content: "\e324"; }   /* megaphone */
.home-paper #launchAttend   .lt-ic::before { content: "\e186"; }   /* check-square */

@media (max-width: 640px) {
  .home-paper .home-launch-hero { text-align: center; padding: 20px 4px 2px; }
  .home-paper .home-brand { justify-content: center; }
  .home-paper .home-logo { height: 42px; }
  .home-paper .home-slogan { font-size: 1.15rem; }
  .home-paper #menuGrid .launch-tile .lt-ic { width: 40px; height: 40px; border-radius: 12px; }
  .home-paper #menuGrid .launch-tile .lt-ic::before { font-size: 22px; }
}

/* 홈 스타일 프리셋 — 상단 네비·섹션 제목 등의 이모지를 라인아이콘으로.
   마크업은 이모지를 <span class="hemj" data-i="..">로 감싼 것뿐 — 기본 테마에선 .hemj에 스타일이 없어 이모지 그대로 보임. */
.home-paper .hemj { font-size: 0; display: inline-flex; vertical-align: -0.12em; }
.home-paper .hemj::before {
  font-family: 'PhosphorHome'; font-weight: normal; font-style: normal;
  font-size: 1.05rem; line-height: 1; color: var(--accent); display: inline-block;
  -webkit-font-smoothing: antialiased;
}
.home-paper h2 .hemj::before { font-size: 1.3rem; }
.home-paper .dash-banner-ic.hemj::before { font-size: 1.5rem; }
.home-paper .hemj[data-i="cal"]::before     { content: "\e7b4"; }
.home-paper .hemj[data-i="meet"]::before    { content: "\e198"; }
.home-paper .hemj[data-i="grad"]::before    { content: "\e62c"; }
.home-paper .hemj[data-i="pkg"]::before     { content: "\e390"; }
.home-paper .hemj[data-i="clock"]::before   { content: "\e19a"; }
.home-paper .hemj[data-i="users"]::before   { content: "\e68e"; }
.home-paper .hemj[data-i="chat"]::before    { content: "\e16c"; }
.home-paper .hemj[data-i="bell"]::before    { content: "\e0ce"; }
.home-paper .hemj[data-i="plus"]::before    { content: "\e3d4"; }
.home-paper .hemj[data-i="mega"]::before    { content: "\e324"; }
.home-paper .hemj[data-i="check"]::before   { content: "\e184"; }
.home-paper .hemj[data-i="bolt"]::before    { content: "\e2de"; }
.home-paper .hemj[data-i="books"]::before   { content: "\e758"; }
.home-paper .hemj[data-i="chart"]::before   { content: "\e150"; }
.home-paper .hemj[data-i="routine"]::before { content: "\e094"; }
.home-paper .hemj[data-i="hide"]::before    { content: "\e224"; }
.home-paper .hemj[data-i="eye"]::before     { content: "\e220"; }
.home-paper .hemj[data-i="user"]::before    { content: "\e4c2"; }
.home-paper .hemj[data-i="pin"]::before     { content: "\e3e2"; }
.home-paper .hemj[data-i="due"]::before     { content: "\e10a"; }
.home-paper .hemj[data-i="lock"]::before    { content: "\e2fa"; }
/* 자료추가(＋) 버튼은 강조색 배경이라 글리프 흰색 */
.home-paper #openAddBtn .hemj::before { color: #fff; }

/* 홈 스타일(home-paper) — 런타임 이모지→라인아이콘 치환 스팬. 색은 주변 글자색 상속(버튼·danger 등 안전). */
.home-paper .hp-ico {
  font-family: 'PhosphorHome'; font-style: normal; font-weight: normal; font-variant: normal;
  line-height: 1; color: currentColor; font-size: 1.05em; vertical-align: -0.08em;
  -webkit-font-smoothing: antialiased; display: inline-block;
}

/* ============================================================
   제스트 페이퍼 홈 — 목업형 레이아웃 (타일·바로가기·오늘수업 카드). 전부 .home-paper 스코프.
   ============================================================ */
/* 기본 '경영 대시보드' 배너 숨김 — 오늘수업 카드의 탭이 대체 */
.home-paper #launchDashboard { display: none !important; }

/* 메뉴 타일 → 가로 알약(아이콘칩 + 라벨) */
.home-paper #menuGrid.launch-grid { display: flex; flex-wrap: wrap; grid-template-columns: none; gap: 10px; margin: 20px 0 8px; }
.home-paper #menuGrid .launch-tile { flex: 1 1 128px; flex-direction: row; align-items: center; justify-content: flex-start; min-height: 0; padding: 12px 13px; gap: 10px; border-radius: 14px; }
.home-paper #menuGrid .launch-tile .lt-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; margin: 0; }
.home-paper #menuGrid .launch-tile .lt-ic::before { font-size: 20px; }
.home-paper #menuGrid .launch-tile .lt-t { font-weight: 600; font-size: 13px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.home-paper #menuGrid .launch-tile .lt-s { display: none; }

/* 바로가기 → 가로형(글자칩 + 이름 + 화살표) */
.home-paper #shortcutGrid.launch-grid { display: flex; flex-wrap: wrap; grid-template-columns: none; gap: 10px; margin: 8px 0 22px; padding: 0; overflow: visible; }
.home-paper #shortcutGrid .shortcut-tile { flex: 1 1 150px; flex-direction: row; align-items: center; justify-content: flex-start; min-height: 0; padding: 12px 14px; gap: 12px; border-radius: 14px; }
.home-paper #shortcutGrid .shortcut-tile .lt-ic { width: 38px; height: 38px; flex: 0 0 38px; margin: 0; border-radius: 10px; background: color-mix(in srgb, var(--fg, var(--accent)) 13%, transparent); display: flex; align-items: center; justify-content: center; }
.home-paper #shortcutGrid .shortcut-tile .lt-ic.lt-letter { font-size: 20px; font-weight: 800; }
.home-paper #shortcutGrid.launch-grid { align-items: stretch; }
.home-paper #shortcutGrid .shortcut-tile .lt-t { font-weight: 600; font-size: 13px; line-height: 1.2; margin: 0; min-width: 0; max-width: none; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }

/* 오늘 수업 카드 */
.home-paper #hpTodayCard { display: block; margin: 18px 0 22px; }
.hp-tc { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.hp-tc-tabs { display: inline-flex; align-self: flex-start; gap: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-bottom: 13px; }
.hp-tc-tabs button { border: none; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-dim); padding: 6px 15px; border-radius: 999px; cursor: pointer; }
.hp-tc-tabs button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.hp-tc-pane[hidden] { display: none; }
.hp-tc-ph { display: flex; align-items: center; margin-bottom: 6px; }
.hp-tc-ph .t { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hp-tc-ph .t::before { font-family: 'PhosphorHome'; content: "\e7b4"; color: var(--accent); font-size: 16px; }
.hp-tc-ph.dash .t::before { content: "\e150"; }
.hp-tc-ph .d { margin-left: auto; color: var(--text-dim); font-size: 12px; }
.hp-tc-list { list-style: none; margin: 4px 0 0; padding: 0; }
.hp-tc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; cursor: pointer; transition: background .12s; }
.hp-tc-list li + li { border-top: 1px solid var(--border); }
.hp-tc-list li:hover { background: var(--accent-soft); }
.hp-tc-list li .chk { width: 22px; height: 22px; flex: none; border-radius: 7px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: #fff; }
.hp-tc-list li.done .chk { background: #5f9070; border-color: #5f9070; }
.hp-tc-list li.done .chk::before { font-family: 'PhosphorHome'; content: "\e182"; font-size: 13px; }
.hp-tc-list li .meta { min-width: 0; flex: 1; }
.hp-tc-list li .meta .n { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-tc-list li .meta .s { font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
.hp-tc-list li .time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-dim); font-weight: 600; flex: none; }
.hp-tc-list li .chev { flex: none; width: 15px; color: var(--text-dim); }
.hp-tc-list li .chev::before { font-family: 'PhosphorHome'; content: "\e13a"; font-size: 14px; opacity: 0; transition: opacity .12s; }
.hp-tc-list li:hover .chev::before { opacity: 1; }
.hp-tc-pf { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--accent-ink, var(--accent)); font-weight: 600; font-size: 12.5px; cursor: pointer; background: none; border: none; font-family: inherit; padding: 2px; }
.hp-tc-pf::after { font-family: 'PhosphorHome'; content: "\e06c"; font-size: 14px; }
.hp-tc-empty { color: var(--text-dim); font-size: 13px; padding: 14px 4px 6px; }
.hp-tc-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 6px; }
.hp-tc-kpi { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; }
.hp-tc-kpi .dk { font-size: 11.5px; color: var(--text-dim); }
.hp-tc-kpi .dv { font-size: 18px; font-weight: 800; margin-top: 2px; }
@media (max-width: 560px) {
  .home-paper #menuGrid.launch-grid, .home-paper #shortcutGrid.launch-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 제스트 페이퍼 — 히어로 2단(왼쪽 로고·제목 / 오른쪽 오늘수업 카드), 검색창 숨김 */
.home-paper .hero-search { display: none; }
.home-paper .hp-hero-row { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 26px; align-items: stretch; margin: 24px 0 10px; }
.home-paper .hp-hero-row .home-launch-hero { padding: 8px 4px; display: flex; flex-direction: column; justify-content: center; }
.home-paper .hp-hero-row #hpTodayCard { margin: 0; height: 100%; min-height: 300px; }
.home-paper .hp-hero-row .hp-tc { height: 100%; display: flex; flex-direction: column; }
.home-paper .hp-hero-row .hp-tc .hp-tc-pane { display: flex; flex-direction: column; flex: 1; }
.home-paper .hp-hero-row .hp-tc-pf { margin-top: auto; align-self: flex-start; }
@media (max-width: 860px) {
  .home-paper .hp-hero-row { grid-template-columns: 1fr; }
  .home-paper .hp-hero-row #hpTodayCard { height: auto; min-height: 0; }
}

/* 홈 프리뷰 카드에서 반 클릭 → 출석부 해당 반으로 스크롤 시 잠깐 강조 */
.att-class { scroll-margin-top: 88px; }   /* sticky 헤더(~69px)+여백만큼 덜 내려가게 — 반 윗부분 안 잘리게 */
@media (pointer: coarse) { .att-class { scroll-margin-top: 132px; } }   /* 아이패드 등 터치기기: 헤더가 더 커서 조금 더 덜 내려가게(마우스 PC는 88 유지) */
.att-class.att-flash { animation: attFlash 1.6s ease-out; border-radius: 12px; }
@keyframes attFlash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px rgba(0,0,0,0); } }

/* ============================================================
   제티스 페이퍼 — 목업 세부값 대조 반영 (hero/preview card/stats)
   ============================================================ */
/* 통계: 먹색 숫자 24px (목업 .stat .v) — 빨강 아님 */
.home-paper .stat-tile { padding: 16px 16px; }
.home-paper .stat-num { color: var(--accent); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; min-height: 1.7rem; }
.home-paper .stat-label { font-size: 12px; }

/* 프리뷰 카드: 목업 .preview 그림자 + 완료행 체크=강조색 체크표시(초록박스 아님) */
.home-paper .hp-tc { box-shadow: 0 14px 34px rgba(120, 96, 60, 0.10); }
.home-paper .hp-tc-list li .chk { border: 1.5px solid var(--border); border-radius: 6px; background: transparent; color: var(--accent); }
.home-paper .hp-tc-list li.done .chk { background: transparent; border-color: transparent; }
.home-paper .hp-tc-list li.done .chk::before { content: "\e182"; font-family: 'PhosphorHome'; font-size: 17px; color: var(--accent); font-weight: 700; }
.home-paper .hp-tc-list li .meta .n { font-weight: 500; }
.home-paper .hp-tc-list li.done .meta .n { color: var(--text-dim); }

/* 제티스 페이퍼 — 목업 대조 추가분 (#2 출퇴근 칩 · #3 패널 테두리) */
/* #2 오늘 출퇴근: 시계를 칩 안에 (목업 .clockbar .ci) */
.home-paper .home-punch .hp-left { align-items: center; }
.home-paper .home-punch .hp-title .hp-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; color: var(--accent); font-size: 18px; margin-right: 9px; vertical-align: middle; }
/* #3 전달사항·할일 패널: 목업 .panel = 은은한 테두리·18px (빨간 테두리/글로우 제거) */
.home-paper .notice-board { border-color: var(--border); box-shadow: none; border-radius: 18px; }
.home-paper .todo-board { border-radius: 18px; }

/* ============================================================
   홈 스타일 프리셋: 스튜디오 화이트 (body.home-studio — home-paper 레이아웃 위에 스킨만 덮음)
   순백 캔버스 · 얇은 선 · 각진 모서리 · 그림자 제거 · 잉크레드 포인트 유지
   ============================================================ */
/* 홈 영역 토큰을 화이트 미니멀로 재정의 → home-paper 컴포넌트가 자동으로 흰 카드/얇은선이 됨 */
.home-studio #homeScreen {
  --card: #ffffff; --bg: #f1eee8; --bg-soft: #efece5; --border: #e4e0d7;
  --shadow: none; --accent-soft: rgba(192,57,43,.07);
}
/* 순백 캔버스 — 홈이 보일 때만 뷰포트 전체를 희게(다른 탭엔 영향 없음) */
.home-studio #homeScreen::before { content: ""; position: fixed; inset: 0; background: #f7f5f0; z-index: -1; }
/* 각진 모서리 · 그림자 제거(스위스 미니멀) */
.home-studio .hp-tc { border-radius: 4px; box-shadow: none; }
.home-studio .hp-tc-tabs { border-radius: 3px; }
.home-studio .hp-tc-tabs button { border-radius: 2px; }
.home-studio .hp-tc-tabs button.on { box-shadow: none; }
.home-studio .hp-tc-kpi { border-radius: 3px; }
.home-studio #menuGrid .launch-tile { border-radius: 4px; }
.home-studio #menuGrid .launch-tile .lt-ic { border-radius: 3px; }
.home-studio #shortcutGrid .shortcut-tile { border-radius: 4px; }
.home-studio #shortcutGrid .shortcut-tile .lt-ic { border-radius: 3px; }
.home-studio .notice-board, .home-studio .todo-board { border-radius: 4px; box-shadow: none; }
.home-studio .stat-tile { border-radius: 4px; }
.home-studio .home-punch .hp-title .hp-ico { border-radius: 3px; }
/* 타이포 — 제목 진하고 타이트, 라벨에 자간 */
.home-studio #homeTitle { font-weight: 800; letter-spacing: -.022em; }
.home-studio .home-slogan { letter-spacing: .14em; }
.home-studio .notice-board h2, .home-studio .todo-board h2 { letter-spacing: .03em; font-weight: 800; }
.home-studio #homeScreen .btn-add, .home-studio #homeScreen .btn-ghost { border-radius: 4px; }

/* ============================================================
   제티스 페이퍼 — 학생관리 카드 목업 대조 반영
   ============================================================ */
/* 재원생/퇴원생/졸업생 상태 알약 (목업 .tag) — 일반 적용 */
.csh-name .csh-status { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; line-height: 1.3; align-self: center; }
.csh-status.active { color: #2f8f52; background: rgba(90, 200, 120, 0.15); }
.csh-status.wd { color: var(--accent); background: var(--accent-soft); }
.csh-status.grad { color: var(--text-dim); background: var(--bg-soft); }

/* 학년·학교·성별 아이콘 = 강조색 (목업 .info i = accent-ink) */
.home-paper .csh-info .hp-ico { color: var(--accent); }
/* 수강과목 칩 = 연한 틴트 + 과목색 글자 (목업 .sjb) — 진한 배경 아님 */
.home-paper .csh-subj { background: var(--sc, var(--bg-soft)); color: color-mix(in srgb, var(--scl, var(--sc)) 82%, #000 18%); font-weight: 700; }
.home-paper .csh-subj em { color: var(--text-dim); opacity: 0.95; font-weight: 500; }
/* 표준 과목은 목업과 동일한 채도 높은 색 (칩 한정, 학원 과목색 전역은 불변) */
.home-paper .csh-subj[data-subj="국어"] { background: rgba(209, 75, 122, 0.12); color: #c23e6c; }
.home-paper .csh-subj[data-subj="영어"] { background: rgba(47, 111, 176, 0.12); color: #2f6fb0; }
.home-paper .csh-subj[data-subj="수학"] { background: rgba(198, 144, 28, 0.15); color: #b5811a; }
.home-paper .csh-subj[data-subj="R&D / 행정팀"], .home-paper .csh-subj[data-subj="R&D"] { background: rgba(63, 143, 82, 0.14); color: #3f8f52; }
/* 액션/툴 버튼 = 둥근 사각(목업 .tbtn/.hbtn 8~9px) — 알약 아님 */
.home-paper .btn-ghost { border-radius: 10px; }
.home-paper .btn-add { border-radius: 10px; }

/* ============================================================
   학생관리 레이아웃 수정 (일반 적용)
   ============================================================ */
/* 1) 성적: 차트 + 표를 나란히(옆으로). 표 없을 땐 차트가 전체 폭 */
.grade-ct-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.grade-ct-row .grade-chart-wrap { flex: 1 1 340px; min-width: 0; margin-bottom: 0; }
.grade-ct-row .grade-table-wrap { flex: 1 1 300px; min-width: 0; }
.grade-ct-row .grade-table-wrap:empty { display: none; }
/* 2) 영상시청·보강·학습 히스토리에 흰 박스 (성적·출결과 동일) */
.counsel-videos, .counsel-makeups, .counsel-learning { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
/* 3) 섹션 간 일관 여백 — 보강이 출결에 붙던 문제 해소 */
.counsel-videos, .counsel-attendance, .counsel-makeups, .counsel-learning { margin-top: 20px; }
