/* =====================================================
 * 모아랩(MoaLab) — 디자인 시스템
 * 라이트 SaaS 대시보드: 화이트/그레이 기반 + 모아킷 브랜드(티일) 포인트
 * 상태색(초록·빨강·주황·앰버)은 의미 전달용이라 브랜드색과 분리해 유지한다.
 * ===================================================== */
/* Pretendard가 설치된 환경에서는 자동 적용되고, 없으면 시스템 한글 폰트로 대체됩니다.
 * (외부 CDN 의존 없음 — 기관 내부망에서도 동일하게 동작) */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* 색상 시스템 */
  --brand-900: #0c1210;
  --brand-800: #12302c;
  --brand-700: #1b4038;
  --brand-600: #0a6f61;   /* 텍스트·버튼 겸용 — 흰 배경/흰 글자 양쪽 6.07:1 (AA) */
  --brand-500: #17b6a0;
  --brand-50: #e6f7f4;
  --mint-600: #0d9488;
  --mint-50: #ecfdf7;
  --accent-600: #5b8def;
  --accent-50: #eaf1fd;
  --orange-600: #ea8a0c;
  --orange-50: #fff5e6;
  --green-600: #16a34a;
  --green-50: #e9f9ef;
  --red-600: #dc2626;
  --red-50: #feecec;
  --amber-600: #d97706;
  --amber-50: #fef3c7;

  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e8edf4;
  --line-strong: #d9e1ec;
  --text: #1c2740;
  --text-2: #5a6b8c;
  --text-3: #8a97b1;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -16px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -12px rgba(12, 18, 16, .35);

  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 9px;

  --sidebar-w: 248px;
  --header-h: 62px;
}

html, body { height: 100%; }
body {
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
a { color: var(--brand-600); text-decoration: none; }
svg.ic { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* 인쇄 차단 */
#print-guard { display: none; }
@media print {
  body > #app { display: none !important; }
  #print-guard { display: block; font-size: 24px; padding: 40px; }
}

/* ============ 폼 공통 ============ */
.input, .form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: #fff; transition: border-color .12s, box-shadow .12s;
}
.input:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; align-items: end; }
.form-grid label, .field-label {
  display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px;
}
.msg { margin-top: 10px; font-size: 13px; min-height: 18px; }
.msg.err { color: var(--red-600); }
.msg.ok { color: var(--green-600); }

/* ============ 버튼 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 10px;
  padding: 10px 16px; font-weight: 700; font-size: 13.5px; border: 1px solid transparent;
  transition: transform .05s, box-shadow .12s, background .12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: #fff; box-shadow: 0 6px 16px -6px rgba(14, 143, 126, .45);
}
.btn-primary:hover { background: linear-gradient(135deg, #1d4fd7, #2f66e6); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-soft { background: var(--brand-50); color: var(--brand-600); }
.btn-soft:hover { background: #e0ebff; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-sm svg.ic { width: 14px; height: 14px; }
.btn-danger { background: var(--red-50); color: var(--red-600); }
.btn-danger:hover { background: #fcdada; }

/* ============ 레이아웃 ============ */
.shell { display: flex; min-height: 100vh; }

/* --- 사이드바 --- */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
  color: #b6ccc7; display: flex; flex-direction: column; z-index: 60;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px;
}
.sidebar .brand .mark {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -4px rgba(14, 143, 126, .45);
}
.sidebar .brand .mark img { width: 26px; height: auto; }
.sidebar .brand .bt { color: #fff; font-weight: 800; font-size: 14.5px; line-height: 1.3; }
.sidebar .brand .bs { font-size: 11px; color: #89a49e; }
.sidebar nav { padding: 6px 12px; flex: 1; overflow-y: auto; }
.sidebar .nav-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: #6478ad;
  padding: 16px 12px 7px;
}
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; color: #b6ccc7; padding: 10px 12px;
  border-radius: 10px; margin-bottom: 2px; font-weight: 600; font-size: 13.5px;
}
.sidebar nav a svg.ic { width: 17px; height: 17px; opacity: .85; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a.active {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: #fff; box-shadow: 0 8px 18px -8px rgba(14, 143, 126, .75);
}
.sidebar .side-foot {
  margin: 12px; padding: 13px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); font-size: 12px; line-height: 1.8;
}
.side-foot .ok { color: #5eead4; font-weight: 700; }
.side-foot .bad { color: #fca5a5; font-weight: 700; }
.side-foot .tz { color: #6478ad; font-size: 11px; }

/* --- 메인/헤더 --- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header {
  height: var(--header-h); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  position: sticky; top: 0; z-index: 50;
}
.header .page-title { font-size: 16.5px; font-weight: 800; color: var(--brand-800); white-space: nowrap; }
.hamburger { display: none; background: none; border: none; color: var(--text-2); padding: 6px; }

.search-box {
  min-width: 0; flex: 1; max-width: 440px; display: flex; align-items: center; gap: 9px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 8px 13px;
  color: var(--text-3); margin-left: auto;
}
.search-box:focus-within { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.search-box input { border: none; background: none; outline: none; flex: 1; min-width: 0; }
.search-box svg.ic { width: 15px; height: 15px; }

.header .icon-btn {
  position: relative; background: none; border: none; color: var(--text-2);
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.header .icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn .dot {
  position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 3px;
  background: var(--red-600); color: #fff; border-radius: 999px; font-size: 9.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.profile-chip { display: flex; align-items: center; gap: 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.profile-chip .who { text-align: right; line-height: 1.25; }
.profile-chip .nm { font-weight: 800; font-size: 13px; }
.profile-chip .rl { font-size: 11.5px; color: var(--text-3); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, #41e3ce, var(--brand-600));
  display: flex; align-items: center; justify-content: center;
}

/* 알림 드롭다운 */
.notif-panel {
  position: absolute; right: 90px; top: calc(var(--header-h) - 6px); width: 340px; z-index: 100;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md);
  overflow: hidden;
}
.notif-panel .np-head { padding: 13px 16px; font-weight: 800; border-bottom: 1px solid var(--line); font-size: 13px; }
.notif-panel .np-item { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.notif-panel .np-item:last-child { border-bottom: none; }
.notif-panel .np-item .t { color: var(--text-3); font-size: 11px; margin-top: 2px; }

.content { padding: 24px; flex: 1; }

/* ============ 카드 ============ */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card > h2, .card-title {
  font-size: 14.5px; font-weight: 800; margin-bottom: 16px; color: var(--brand-800);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.card-title .sub, h2 .sub { font-weight: 500; color: var(--text-3); font-size: 12px; }
.card-title .spacer, h2 .spacer { flex: 1; }

.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.grid.main-cols { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.col-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* 통계 카드 */
.stat { display: flex; gap: 14px; align-items: flex-start; }
.stat .tile {
  width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
}
.stat .tile svg.ic { width: 21px; height: 21px; }
.tile.blue { background: var(--brand-50); color: var(--brand-600); }
.tile.mint { background: var(--mint-50); color: var(--mint-600); }
.tile.violet { background: var(--accent-50); color: var(--accent-600); }
.tile.orange { background: var(--orange-50); color: var(--orange-600); }
.tile.green { background: var(--green-50); color: var(--green-600); }
.tile.red { background: var(--red-50); color: var(--red-600); }
.stat .lb { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.stat .num { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 4px; }
.stat .num .unit { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 2px; }
.delta { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; display: inline-flex; gap: 3px; }
.delta.up { color: var(--green-600); background: var(--green-50); }
.delta.flat { color: var(--text-3); background: var(--bg); }

/* ============ 배지 ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3.5px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-50); color: var(--green-600); }
.badge.red { background: var(--red-50); color: var(--red-600); }
.badge.amber { background: var(--amber-50); color: var(--amber-600); }
.badge.blue { background: var(--brand-50); color: var(--brand-600); }
.badge.violet { background: var(--accent-50); color: var(--accent-600); }
.badge.gray { background: #eef1f6; color: var(--text-2); }
.badge.plain::before { display: none; }
.badge .ic { width: 13px; height: 13px; stroke-width: 2; }
.ph-t-with-icon,
.field-label-with-icon,
.heading-with-icon,
.notice-with-icon,
.cell-main-with-icon,
.pick-item-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ph-t-with-icon .ic,
.heading-with-icon .ic { width: 18px; height: 18px; color: var(--brand-600); }
.field-label-with-icon .ic,
.notice-with-icon .ic,
.cell-main-with-icon .ic,
.pick-item-label .ic { width: 15px; height: 15px; flex: none; }
.notice-with-icon { align-items: flex-start; }
.live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 5px;
  color: #f87171;
  font-weight: 800;
}
.live-status .ic { width: 14px; height: 14px; }

/* ============ 토글 ============ */
.toggle { position: relative; width: 44px; height: 25px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .tr { position: absolute; inset: 0; background: #cfd8e5; border-radius: 999px; transition: .16s; cursor: pointer; }
.toggle .tr::before {
  content: ''; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: .16s; box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
}
.toggle input:checked + .tr { background: var(--brand-600); }
.toggle input:checked + .tr::before { transform: translateX(19px); }

/* 보안 설정 행 */
.sec-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sec-row:last-child { border-bottom: none; }
.sec-row .tile { width: 38px; height: 38px; border-radius: 11px; }
.sec-row .tile svg.ic { width: 17px; height: 17px; }
.sec-row .sx { flex: 1; min-width: 0; }
.sec-row .sl { font-weight: 700; font-size: 13.5px; }
.sec-row .sd { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }

/* ============ 테이블 ============ */
.tbl-scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 800; letter-spacing: .03em;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: #fafbfe; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .cell-main { font-weight: 700; }
.tbl .cell-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; font-weight: 500; }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* 역할 플로우 */
.roles-flow { display: flex; gap: 0; align-items: stretch; }
.role-box {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
.role-box .rc {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: 10px;
}
.role-box .rc svg.ic { width: 19px; height: 19px; }
.role-box .rn { font-weight: 800; font-size: 13.5px; }
.role-box .rr { font-size: 11px; color: var(--text-3); font-weight: 600; margin: 1px 0 8px; }
.role-box .rd { font-size: 12px; color: var(--text-2); line-height: 1.75; }
.role-arrow { display: flex; align-items: center; color: var(--line-strong); padding: 0 7px; }
.role-arrow svg.ic { width: 16px; height: 16px; stroke-width: 2.4; }

/* ============ 주간 시간표 매트릭스 ============ */
.matrix-wrap { overflow-x: auto; }
table.matrix { width: 100%; border-collapse: separate; border-spacing: 5px; min-width: 520px; }
.matrix th {
  font-size: 11.5px; color: var(--text-3); font-weight: 800; padding: 4px 6px; text-align: center;
}
.matrix th.day-col { width: 42px; }
.matrix td { padding: 0; }
.matrix .day-cell {
  background: var(--bg); border-radius: 9px; text-align: center; font-weight: 800; font-size: 12.5px;
  color: var(--text-2); padding: 13px 6px;
}
.matrix .slot {
  border-radius: 9px; padding: 9px 10px; font-size: 12px; font-weight: 700; text-align: center; line-height: 1.4;
  min-height: 42px; display: flex; flex-direction: column; justify-content: center; gap: 1px;
}
.slot.allow { background: var(--green-50); color: #15803d; border: 1px solid #c8eed5; }
.slot.allow .who { font-size: 10.5px; font-weight: 600; color: #4d9e6a; }
.slot.deck-allow { background: var(--brand-50); color: var(--brand-600); border: 1px solid #d4e2fd; }
.slot.deck-allow .who { font-size: 10.5px; font-weight: 600; color: #7396dd; }
.slot.blocked { background: var(--red-50); color: #c04747; border: 1px solid #f6d5d5; opacity: .8; }
.slot.locked {
  color: var(--text-3); border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, #f3f5f9, #f3f5f9 6px, #eaeef5 6px, #eaeef5 12px);
}

/* 시간창 관리 리스트 */
.win-list { display: flex; flex-direction: column; gap: 8px; }
.win-row {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 14px; background: #fff;
}
.win-row .wd {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-800); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.win-row .wt { font-weight: 700; }
.win-row .wtar { font-size: 12px; color: var(--text-2); }
.win-row .spacer { flex: 1; }
.win-row.off { opacity: .55; }

/* ============ 덱 카드 (학생/미리보기) ============ */
.deck-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.deck-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s;
}
.deck-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.deck-thumb {
  height: 132px; position: relative; overflow: hidden; padding: 16px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
}
.deck-thumb .dt { font-weight: 800; font-size: 17px; text-shadow: 0 2px 8px rgba(0, 0, 0, .25); position: relative; }
.deck-thumb .deco {
  position: absolute; right: -18px; top: -20px; font-size: 74px; opacity: .28; transform: rotate(-8deg);
}
.deck-thumb .deck-thumb-icon {
  right: 4px;
  top: 4px;
  transform: rotate(-7deg);
}
.deck-thumb .deck-thumb-icon .ic { width: 82px; height: 82px; stroke-width: 1.2; }
.deck-thumb .orb {
  position: absolute; width: 130px; height: 130px; border-radius: 50%; left: -40px; bottom: -70px;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 70%);
}
.dg-0 { background: linear-gradient(135deg, var(--brand-800), var(--brand-600)); }
.dg-1 { background: linear-gradient(135deg, #134e4a, #0d9488); }
.dg-2 { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.dg-3 { background: linear-gradient(135deg, #7c2d12, #ea8a0c); }
.deck-card .body { padding: 15px 16px 16px; }
.deck-card .desc { color: var(--text-2); font-size: 12.5px; min-height: 36px; margin-bottom: 12px; line-height: 1.55; }
.deck-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* 미리보기 카드 (대시보드 우측) */
.preview-kv { display: grid; grid-template-columns: 76px 1fr; row-gap: 9px; font-size: 13px; margin: 14px 0; }
.preview-kv .k { color: var(--text-3); font-weight: 600; }
.preview-kv .v { font-weight: 700; }

/* ============ 로그 ============ */
.log-list { display: flex; flex-direction: column; }
.log-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.log-item:last-child { border-bottom: none; }
.log-item .li-main { flex: 1; min-width: 0; }
.log-item .li-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.log-item .li-who { font-weight: 700; font-size: 13px; }
.log-item .li-det { font-size: 12px; color: var(--text-2); margin-top: 2px; word-break: break-all; }
.log-item .li-meta { font-size: 11.5px; color: var(--text-3); text-align: right; white-space: nowrap; line-height: 1.6; }

/* ============ 리포트 차트 ============ */
.chart-bars { display: flex; gap: 10px; align-items: flex-end; height: 170px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-col .bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.chart-col .bar { width: 13px; border-radius: 5px 5px 2px 2px; min-height: 3px; }
.bar.b-login { background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); }
.bar.b-block { background: linear-gradient(180deg, #f87171, var(--red-600)); }
.bar.b-capture { background: linear-gradient(180deg, #fbbf24, var(--amber-600)); }
.chart-col .cl { font-size: 11px; color: var(--text-3); font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-top: 12px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.rank-list { display: flex; flex-direction: column; gap: 9px; }
.rank-row { display: flex; align-items: center; gap: 10px; }
.rank-row .rk {
  width: 24px; height: 24px; border-radius: 7px; background: var(--bg); color: var(--text-2);
  font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.rank-row .rn2 { flex: 1; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rbar { height: 7px; border-radius: 99px; background: linear-gradient(90deg, #41e3ce, var(--brand-600)); }
.rank-row .rv { font-size: 12px; color: var(--text-2); font-weight: 700; width: 42px; text-align: right; }

/* ============ 로그인 ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(140deg, #0b1836 0%, #16295c 45%, #2454c7 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(10px);
}
.login-wrap::before { width: 480px; height: 480px; right: -140px; top: -160px; background: radial-gradient(circle, rgba(124, 58, 237, .35), transparent 65%); }
.login-wrap::after { width: 420px; height: 420px; left: -120px; bottom: -160px; background: radial-gradient(circle, rgba(13, 148, 136, .3), transparent 65%); }
.login-card {
  background: #fff; border-radius: 22px; padding: 42px 40px; width: 400px; max-width: 100%;
  box-shadow: var(--shadow-lg); position: relative; z-index: 2;
}
.login-card .lmark {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 18px;
  background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px -8px rgba(14, 143, 126, .5);
}
.login-card .lmark img { width: 34px; height: auto; }
.login-card .logo { font-size: 21px; font-weight: 800; color: var(--brand-800); letter-spacing: -.02em; }
.login-card .sub { color: var(--text-2); margin: 5px 0 26px; font-size: 13px; }
.login-card label { display: block; font-weight: 700; margin: 15px 0 6px; font-size: 12.5px; color: var(--text-2); }
.login-card .btn-primary { width: 100%; margin-top: 24px; justify-content: center; padding: 12px; font-size: 14px; }
.login-error { color: var(--red-600); margin-top: 12px; font-size: 13px; min-height: 18px; }
.otp-secret {
  background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px;
  font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; margin: 8px 0;
}

/* ============ 차단 화면 ============ */
.blocked-wrap { max-width: 680px; margin: 40px auto; text-align: center; }
.blocked-hero {
  width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 18px;
  background: var(--red-50); color: var(--red-600);
  display: flex; align-items: center; justify-content: center;
}
.blocked-hero svg.ic { width: 38px; height: 38px; }
.blocked-wrap h2 { font-size: 21px; margin-bottom: 8px; letter-spacing: -.02em; }
.blocked-wrap > p { color: var(--text-2); margin-bottom: 24px; }

/* ============ 편집기 ============ */
.editor { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.slide-list { display: flex; flex-direction: column; gap: 8px; }
.slide-item {
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fff;
  cursor: pointer; display: flex; align-items: center; gap: 9px; transition: border-color .1s;
}
.slide-item:hover { border-color: var(--line-strong); }
.slide-item.active { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .13); }
.slide-item .n {
  color: var(--text-3); font-size: 11px; font-weight: 800; width: 22px; height: 22px; flex-shrink: 0;
  background: var(--bg); border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.slide-item .t { flex: 1; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor textarea {
  width: 100%; min-height: 210px; padding: 13px; border: 1px solid var(--line-strong);
  border-radius: 11px; resize: vertical; line-height: 1.65; font-size: 13.5px;
}
.editor textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .13); }

/* ============ 슬라이드 렌더링 ============ */
.slide-frame {
  aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; justify-content: center; padding: 6.5% 7%;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  letter-spacing: -0.015em;
}
.slide-frame.align-center { text-align: center; align-items: center; }

.slide-frame h1 {
  font-size: 2.35em; font-weight: 800; margin-bottom: .45em; line-height: 1.18; letter-spacing: -.03em;
}
.slide-frame h1::after {
  content: ''; display: block; width: 1.5em; height: .13em; border-radius: 99px;
  background: var(--sl-accent); margin-top: .32em;
}
.slide-frame.align-center h1::after { margin-left: auto; margin-right: auto; }
.slide-frame h2 {
  font-size: 1.32em; font-weight: 800; margin: .7em 0 .35em; color: var(--sl-accent);
  letter-spacing: -.01em;
}
.slide-frame p { font-size: 1.06em; line-height: 1.75; margin: .3em 0; opacity: .94; }
.slide-frame ul, .slide-frame ol { margin: .45em 0 .45em 1.35em; }
.slide-frame li { font-size: 1.06em; line-height: 1.9; opacity: .94; }
.slide-frame li::marker { color: var(--sl-accent); font-weight: 800; }
.slide-frame strong { color: var(--sl-strong, inherit); }
.slide-frame img {
  max-width: 72%; max-height: 42%; border-radius: 12px; margin: .5em 0;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .45);
}
.slide-frame code {
  background: rgba(127, 127, 127, .18); padding: 1px 8px; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: .92em;
}
/* 은은한 코너 광원 장식 */
.slide-frame::before {
  content: ''; position: absolute; width: 42%; aspect-ratio: 1; border-radius: 50%;
  right: -14%; top: -22%; background: radial-gradient(circle, var(--sl-glow), transparent 68%);
  pointer-events: none;
}

/* 테마: 배경 레이어드 그라데이션 + 포인트 컬러 */
.theme-navy {
  color: #f2f6ff; --sl-accent: #56ccf2; --sl-strong: #9bdcff; --sl-glow: rgba(86, 204, 242, .22);
  background:
    radial-gradient(120% 90% at -10% 115%, rgba(124, 58, 237, .30), transparent 55%),
    linear-gradient(150deg, #0a1230 0%, #14295e 55%, #1c3d80 100%);
}
.theme-white {
  color: #12302c; --sl-accent: #0e8f7e; --sl-strong: #0b7566; --sl-glow: rgba(14, 143, 126, .10);
  background:
    radial-gradient(110% 85% at -8% 112%, rgba(13, 148, 136, .07), transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #f2f6fd 100%);
}
.theme-mint {
  color: #0b3a34; --sl-accent: #0d9488; --sl-strong: #0f766e; --sl-glow: rgba(13, 148, 136, .16);
  background:
    radial-gradient(110% 85% at -8% 112%, rgba(59, 130, 246, .08), transparent 55%),
    linear-gradient(150deg, #f2fdf9 0%, #d3f6ea 60%, #b9efe0 100%);
}
.theme-sunset {
  color: #fff5ec; --sl-accent: #ffb45e; --sl-strong: #ffd29b; --sl-glow: rgba(255, 180, 94, .25);
  background:
    radial-gradient(120% 90% at -10% 115%, rgba(124, 45, 90, .55), transparent 60%),
    linear-gradient(150deg, #38102e 0%, #7c2d3e 55%, #bf4f3a 100%);
}
.theme-violet {
  color: #f6f2ff; --sl-accent: #c4b5fd; --sl-strong: #ddd2ff; --sl-glow: rgba(196, 181, 253, .24);
  background:
    radial-gradient(120% 90% at -10% 115%, rgba(37, 99, 235, .30), transparent 58%),
    linear-gradient(150deg, #201040 0%, #46209a 55%, #6a2fd0 100%);
}
.theme-dark {
  color: #f4f5f7; --sl-accent: #fbbf24; --sl-strong: #fde08a; --sl-glow: rgba(251, 191, 36, .13);
  background:
    radial-gradient(110% 85% at -8% 112%, rgba(59, 130, 246, .10), transparent 55%),
    linear-gradient(160deg, #0b0e15 0%, #1a2233 100%);
}

/* 이미지 전용 슬라이드 (PPT 변환): 여백 없이 원본 그대로 */
.slide-frame.img-slide { padding: 0; background: #0b0e15; }
.slide-frame.img-slide::before { display: none; }
.slide-frame.img-slide img.full {
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; margin: 0; border-radius: 0; box-shadow: none;
}

/* 동영상 전용 슬라이드 — 검은 배경에 꽉 차게 재생 (슬라이드 사이 삽입 영상) */
.slide-frame.video-slide { padding: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.slide-frame.video-slide::before { display: none; }
.slide-frame.video-slide .video-box {
  width: 100%; height: 100%; margin: 0; max-width: none; border-radius: 0; box-shadow: none;
}
.slide-frame.video-slide .video-box iframe, .slide-frame.video-slide .video-box video {
  width: 100%; height: 100%; object-fit: contain;
}

/* ============ 프레젠테이션 ============ */
.present-overlay { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; }
.present-overlay .stage { flex: 1; position: relative; overflow: hidden; }
.present-overlay .slide-frame {
  position: absolute; inset: 0; border-radius: 0; border: none; aspect-ratio: auto;
  font-size: clamp(14px, 2.2vw, 30px); box-shadow: none;
}
.present-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #0b0f1d; color: #7d8db0; padding: 10px 18px; font-size: 12.5px;
}
.present-bar button { background: #1c2740; color: #dbe4f5; border: none; border-radius: 8px; padding: 7px 14px; font-weight: 700; }
.present-bar button:hover { background: #2a3a5e; }
.progress { height: 4px; background: var(--brand-800); }
.progress .fill { height: 100%; background: linear-gradient(90deg, #41e3ce, var(--brand-600)); transition: width .2s; }

/* 워터마크 / 블랙아웃 / 보호 */
.watermark { position: absolute; inset: 0; pointer-events: none; z-index: 50; background-repeat: repeat; }
.blackout {
  position: fixed; inset: 0; z-index: 999; background: #000; color: #5a6b8c;
  display: flex; align-items: center; justify-content: center; font-size: 17px; text-align: center; line-height: 1.8;
}
.no-select, .no-select * {
  user-select: none !important; -webkit-user-select: none !important; -webkit-touch-callout: none !important;
}

/* ============ 모달 / 토스트 ============ */
.modal-back {
  position: fixed; inset: 0; z-index: 200; background: rgba(11, 24, 54, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 18px; width: 480px; max-width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 26px; box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.modal .m-sub { color: var(--text-2); font-size: 12.5px; margin-bottom: 18px; }
.modal .m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

#toast-zone { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--brand-800); color: #fff; padding: 11px 18px; border-radius: 11px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-md); animation: toast-in .18s ease-out;
}
.toast.warn { background: var(--red-600); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ 기타 ============ */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.page-head .ph-t { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.page-head .desc { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  border: 1px solid var(--line-strong); background: #fff; padding: 7px 15px; border-radius: 999px;
  font-weight: 700; color: var(--text-2); font-size: 12.5px;
}
.tabs button.active { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.mt { margin-top: 16px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.empty-note { color: var(--text-3); font-size: 13px; padding: 18px 0; text-align: center; }
.side-overlay { display: none; }

/* 자료 간략 목록 — 제목 위주, 시선 피로 최소화 */
.deck-list { display: flex; flex-direction: column; }
.deck-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 6px; border-bottom: 1px solid var(--line);
}
.deck-line:last-child { border-bottom: none; }
.dl-left { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.dl-ico {
  width: 34px;
  height: 34px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--brand-600);
}
.dl-ico .ic { width: 17px; height: 17px; }
.dl-body { min-width: 0; }
.dl-title {
  font-weight: 700; font-size: 15px; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dl-meta { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-meta .ic { width: 11px; height: 11px; vertical-align: -2px; }
.deck-paid-mark {
  display: inline-flex;
  margin-left: 3px;
  color: var(--amber-600);
  vertical-align: -2px;
}
.deck-paid-mark .ic { width: 14px; height: 14px; }
.dl-actions { display: flex; gap: 6px; flex: none; }
.amber-text { color: var(--amber-600, #b45309); font-weight: 600; }

/* 웹앱 라이브러리 과목 폴더 트리 */
.deck-library-tree-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.subject-tree-panel {
  position: sticky;
  top: 78px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.subject-tree-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.subject-tree-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.subject-tree-head b { font-size: 14px; }
.subject-tree-head span { color: var(--text-3); font-size: 10.5px; }
.subject-tree-head > div:last-child { display: flex; gap: 4px; }
.subject-tree-head > div:last-child button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2, #f7f9fc);
  color: var(--text-2);
  font-weight: 800;
}
.subject-tree-head > div:last-child button:hover {
  border-color: var(--brand-500);
  color: var(--brand-600);
}
.subject-tree-all,
.subject-tree-uncategorized {
  width: calc(100% - 16px);
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.subject-tree-all:hover,
.subject-tree-uncategorized:hover,
.subject-tree-row:hover { background: var(--surface-2, #f7f9fc); }
.subject-tree-all.selected,
.subject-tree-uncategorized.selected {
  background: var(--brand-50);
  color: var(--brand-600);
  box-shadow: inset 3px 0 0 var(--brand-600);
}
.subject-root-icon {
  width: 24px;
  height: 24px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 7px;
  background: #f0f3f8;
  color: var(--text-2);
}
.selected .subject-root-icon { background: #d8f2ed; color: var(--brand-600); }
.subject-root-icon .ic { width: 14px; height: 14px; }
.subject-tree-all b,
.subject-tree-uncategorized b {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subject-tree-all em,
.subject-tree-uncategorized em,
.subject-folder-count {
  min-width: 21px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2, #f1f4f9);
  color: var(--text-3);
  font-size: 10px;
  font-style: normal;
  text-align: center;
}
.subject-tree {
  max-height: calc(100vh - 290px);
  overflow: auto;
  padding: 0 8px 8px;
}
.subject-tree-row {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 2px 0;
  padding: 2px 4px 2px var(--tree-indent);
  border-radius: 8px;
}
.subject-tree-row.selected {
  background: var(--brand-50);
  color: var(--brand-600);
  box-shadow: inset 3px 0 0 var(--brand-600);
}
.subject-tree-toggle {
  width: 25px;
  height: 29px;
  flex: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
}
.subject-tree-toggle:disabled { cursor: default; }
.subject-tree-toggle > span {
  width: 7px;
  height: 7px;
  display: block;
  margin: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .12s ease;
}
.subject-tree-toggle.open > span { transform: rotate(45deg); }
.subject-tree-toggle:disabled > span { display: none; }
.subject-tree-folder {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  padding: 6px 4px 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.subject-folder-icon {
  width: 22px;
  height: 22px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: #f1f4f9;
  color: var(--text-2);
}
.subject-tree-row.selected .subject-folder-icon { background: #d8f2ed; color: var(--brand-600); }
.subject-folder-icon .ic { width: 14px; height: 14px; }
.subject-folder-name {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subject-tree-deck {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: var(--tree-indent);
  padding: 7px 8px 7px 32px;
  border-radius: 7px;
  color: var(--text-2);
}
.subject-deck-icon {
  width: 22px;
  height: 22px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: #f4f6fa;
  color: var(--text-3);
}
.subject-deck-icon .ic { width: 13px; height: 13px; }
.subject-tree-deck:hover {
  background: var(--surface-2, #f7f9fc);
  color: var(--brand-600);
}
.subject-tree-deck b {
  min-width: 0;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subject-tree-help {
  padding: 11px 14px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2, #f7f9fc);
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.55;
}
.deck-folder-content { min-width: 0; }
.deck-folder-toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.deck-folder-toolbar > div:first-child { min-width: 0; }
.deck-folder-toolbar > div:first-child > b {
  display: inline-block;
  max-width: min(520px, 60vw);
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}
.deck-folder-toolbar small {
  margin-left: 8px;
  color: var(--text-3);
}
.deck-folder-breadcrumb {
  overflow: hidden;
  margin-bottom: 3px;
  color: var(--text-3);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deck-folder-breadcrumb span {
  margin: 0 4px;
  color: var(--brand-500);
}
.deck-cost-tabs {
  justify-content: flex-end;
  margin: 0;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: #edf1f7;
}
.deck-cost-tabs button {
  border: 0;
  background: transparent;
  padding: 7px 11px;
}
.deck-cost-tabs button.active {
  background: #fff;
  color: var(--brand-800);
  box-shadow: var(--shadow-sm);
}

/* 상세 시트 (간략 목록의 "관리 ⋯") */
.sheet-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin: 12px 0 4px; }
.sheet-detail > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sd-k { color: var(--text-2); flex: none; }
.sd-v { color: var(--text-1); font-weight: 600; text-align: right; word-break: break-all; }
@media (max-width: 900px) {
  .deck-library-tree-layout { grid-template-columns: 1fr; }
  .subject-tree-panel { position: static; }
  .subject-tree { max-height: 320px; }
}
@media (max-width: 620px) {
  .sheet-detail { grid-template-columns: 1fr; }
  .dl-actions .btn { padding-left: 9px; padding-right: 9px; }
  .deck-folder-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .deck-folder-toolbar > div:first-child > b { max-width: 76vw; }
  .deck-cost-tabs { justify-content: flex-start; }
  .subject-tree { max-height: 280px; }
  .deck-line { align-items: flex-start; flex-direction: column; }
  .dl-actions { width: 100%; padding-left: 45px; }
}

/* 계약·보안 동의서 본문 (스크롤 박스) */
.agreement-doc {
  max-height: 42vh; overflow-y: auto; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2, rgba(127,127,127,.05));
  font-size: 13.5px; line-height: 1.85; color: var(--text-1);
  white-space: normal; word-break: keep-all;
}

/* ============ 반응형 ============ */
@media (max-width: 1180px) {
  .grid.stats { grid-template-columns: repeat(2, 1fr); }
  .grid.main-cols { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: var(--shadow-lg);
  }
  .shell.side-open .sidebar { transform: none; }
  .shell.side-open .side-overlay {
    display: block; position: fixed; inset: 0; background: rgba(11, 24, 54, .4); z-index: 55;
  }
  .hamburger { display: flex; }
  .header .page-title { font-size: 15px; }
  .profile-chip .who { display: none; }
  .content { padding: 16px; }
  .editor { grid-template-columns: 1fr; }
  .roles-flow { flex-direction: column; gap: 10px; }
  .role-arrow { transform: rotate(90deg); justify-content: center; padding: 0; }
  .notif-panel { right: 12px; left: 12px; width: auto; }
  .search-box { max-width: none; }
}
@media (max-width: 700px) {
  .grid.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .num { font-size: 21px; }
  .header { gap: 6px; padding: 0 10px; }
  .header .page-title { display: none; }
  .header .icon-btn { width: 34px; height: 34px; }
  .profile-chip { gap: 0; padding-left: 0; border-left: 0; }
  .avatar { display: none; }
  .search-box { gap: 6px; padding: 8px 9px; }
  /* 테이블 → 카드형 리스트 */
  .tbl.resp thead { display: none; }
  .tbl.resp, .tbl.resp tbody, .tbl.resp tr, .tbl.resp td { display: block; width: 100%; }
  .tbl.resp tr { border: 1px solid var(--line); border-radius: 13px; margin-bottom: 12px; padding: 8px 4px; background: #fff; }
  .tbl.resp td { border: none; padding: 7px 12px; }
  .tbl.resp td[data-label]::before {
    content: attr(data-label); display: block; font-size: 10.5px; font-weight: 800; color: var(--text-3);
    letter-spacing: .04em; margin-bottom: 3px;
  }
}

/* ============ 외부 웹앱 임베드 ============ */
.embed-wrap {
  position: relative; height: calc(100vh - 200px); min-height: 420px;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow-sm);
}
.embed-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-wrap:fullscreen { border-radius: 0; border: none; }
.snippet-box {
  background: var(--brand-900); color: #c8d6f5; border-radius: 10px; padding: 13px 14px;
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 11px; line-height: 1.65;
  overflow-x: auto; white-space: pre; margin-top: 8px;
}

/* ============ 슬라이드 동영상 ============ */
.slide-frame .video-box {
  width: min(82%, 760px); aspect-ratio: 16 / 9; margin: .5em 0;
  border-radius: 10px; overflow: hidden; background: #000; flex-shrink: 0;
}
.slide-frame.align-center .video-box { margin-left: auto; margin-right: auto; }
.slide-frame .video-box iframe, .slide-frame .video-box video {
  width: 100%; height: 100%; border: 0; display: block;
}

/* ============ 업로드 배경 슬라이드 ============ */
.slide-frame.custom-bg { background-size: cover; background-position: center; }
.slide-frame.custom-bg::before { display: none; }
.slide-frame.tone-light {
  color: #fff; --sl-accent: #ffd166; --sl-strong: #ffe9b3; --sl-glow: transparent;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .55);
}
.slide-frame.tone-dark {
  color: #12302c; --sl-accent: #0e8f7e; --sl-strong: #0b7566; --sl-glow: transparent;
  text-shadow: 0 1px 12px rgba(255, 255, 255, .6);
}

/* ============ 내보내기 (관리자: PDF 저장/백업) ============ */
.export-pages { display: flex; flex-direction: column; gap: 18px; max-width: 1000px; }
@media print {
  /* 내보내기 화면에서만 인쇄 허용 (기본은 인쇄 차단 유지) */
  body.allow-print > #app { display: block !important; }
  body.allow-print #print-guard { display: none !important; }
  body.allow-print .sidebar, body.allow-print .header,
  body.allow-print .export-toolbar, body.allow-print .side-overlay { display: none !important; }
  body.allow-print .content { padding: 0 !important; }
  body.allow-print .export-pages { gap: 0; max-width: none; }
  body.allow-print .print-page { page-break-after: always; break-inside: avoid; }
  body.allow-print .print-page .slide-frame {
    border-radius: 0; border: none; box-shadow: none; width: 100%;
  }
}

/* ============ 수업 자료 선택 / 관리 ============ */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pick-item {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: #fff; transition: border-color .1s, background .1s;
}
.pick-item:hover { border-color: var(--brand-500); }
.pick-item:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }
.pick-item input { width: 16px; height: 16px; accent-color: var(--brand-600); }
.pick-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item-label { min-width: 0; }

.item-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.item-row {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 11px; padding: 10px 12px; background: #fff;
}
.item-row .ir-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.item-row .ir-ic {
  width: 28px;
  height: 28px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-600);
}
@media (max-width: 460px) {
  #btn-help { display: none; }
}
.item-row .ir-ic .ic { width: 15px; height: 15px; }
.item-row .ir-title { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ir-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.ir-toggle input { width: 15px; height: 15px; accent-color: var(--brand-600); }
.item-row .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ============ 수업 일정 캘린더 ============ */
.cal-wrap { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(84px, 1fr)); min-width: 640px; }
.cal-corner, .cal-head {
  position: sticky; top: 0; background: #fff; z-index: 2;
  text-align: center; font-size: 12px; font-weight: 800; color: var(--text-2);
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.cal-times { display: flex; flex-direction: column; }
.cal-time { font-size: 10.5px; color: var(--text-3); text-align: right; padding-right: 6px; border-top: 1px solid var(--line); box-sizing: border-box; }
.cal-daywrap { position: relative; border-left: 1px solid var(--line); }
.cal-line { border-top: 1px solid var(--line); box-sizing: border-box; }
.cal-day { position: absolute; inset: 0; }
.cal-ev {
  position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 4px 7px; overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: default;
}
.cal-ev .ce-t { font-size: 11.5px; font-weight: 800; color: var(--text); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev .ce-m { font-size: 10px; color: var(--text-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ AI 프로젝트 모듈 ============ */
.join-project-note {
  display: flex; flex-direction: column; gap: 3px; margin: 10px 0 2px; padding: 12px 14px;
  border: 1px solid #cfeae5; border-radius: 11px; background: #f2fbf9; color: #0b7566;
}
.join-project-note b { font-size: 14px; }
.join-project-note span { font-size: 12px; color: #6d5d9b; }

.project-page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px;
}
.project-page-head h2, .student-project-head h2 { margin: 5px 0 7px; font-size: 25px; letter-spacing: -.04em; }
.project-page-head p, .student-project-head p { color: var(--text-2); line-height: 1.65; }
.project-eyebrow { color: var(--accent-600); font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.project-back { display: inline-block; margin-bottom: 5px; color: var(--text-2); font-size: 12px; font-weight: 700; }

.project-stat-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px;
}
.project-stat {
  position: relative; min-height: 112px; padding: 19px 20px; border: 1px solid var(--line);
  border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden;
}
.project-stat::after {
  content: ""; position: absolute; right: -24px; bottom: -33px; width: 86px; height: 86px;
  border-radius: 50%; background: var(--brand-50);
}
.project-stat:nth-child(2)::after { background: var(--mint-50); }
.project-stat:nth-child(3)::after { background: var(--accent-50); }
.project-stat:nth-child(4)::after { background: var(--orange-50); }
.project-stat span { display: block; color: var(--text-2); font-size: 12px; font-weight: 700; }
.project-stat strong { display: inline-block; margin-top: 14px; font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.project-stat small { margin-left: 4px; color: var(--text-3); font-size: 12px; }

.project-list { display: flex; flex-direction: column; gap: 12px; }
.project-card {
  display: flex; align-items: center; gap: 22px; padding: 20px 22px; border: 1px solid var(--line);
  border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm);
}
.project-card-main { flex: 1; min-width: 0; }
.project-card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.project-card-meta, .project-card-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: 12px; }
.project-card-meta { margin-top: 8px; }
.project-card-meta span:not(:last-child)::after, .project-card-foot span:not(:last-child)::after {
  content: ""; display: inline-block; width: 3px; height: 3px; margin-left: 18px; border-radius: 50%;
  background: var(--line-strong); vertical-align: middle;
}
.project-progress { height: 6px; margin: 15px 0 8px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.project-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #41e3ce, var(--brand-600)); }
.project-empty { padding: 24px; color: var(--text-3); text-align: center; }
.project-empty-large {
  display: flex; flex-direction: column; gap: 7px; padding: 60px; border: 1px dashed var(--line-strong);
  border-radius: 16px; background: rgba(255, 255, 255, .7);
}
.project-empty-large b { color: var(--text); font-size: 16px; }
.project-card .btn.is-loading {
  pointer-events: none;
  color: var(--text-2);
  background: var(--bg);
}
.project-route-state {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: left;
}
.project-route-state h3 { margin-bottom: 5px; }
.project-route-state p { color: var(--text-2); }
.project-route-spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: project-route-spin .75s linear infinite;
}
.project-route-error {
  flex-direction: column;
  border-color: #fecaca;
  background: var(--red-50);
  text-align: center;
}
.project-route-actions { display: flex; gap: 8px; }
@keyframes project-route-spin { to { transform: rotate(360deg); } }

.project-form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: start;
}
.project-field { display: flex; flex-direction: column; gap: 7px; }
.project-field > span { color: var(--text-2); font-size: 12px; font-weight: 750; }
.project-field input, .project-field select, .project-field textarea,
.project-resource-edit textarea, .project-resource-edit > input,
.project-weight-grid input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--text); line-height: 1.5; resize: vertical;
}
.project-field input[type="color"] { min-height: 44px; padding: 5px; }
.project-field input:focus, .project-field select:focus, .project-field textarea:focus,
.project-resource-edit textarea:focus, .project-resource-edit > input:focus, .project-weight-grid input:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.project-span-2 { grid-column: 1 / -1; }
.project-privacy-note {
  margin-top: 15px; padding: 11px 13px; border-radius: 10px; background: var(--mint-50);
  color: #0f766e; font-size: 12px; line-height: 1.55;
}

.project-code-box {
  display: grid; grid-template-columns: auto auto; gap: 3px 12px; align-items: center;
  padding: 14px 17px; border: 1px solid #cfeae5; border-radius: 13px; background: var(--accent-50);
}
.project-code-box span { color: #6d5d9b; font-size: 11px; font-weight: 750; }
.project-code-box strong { grid-row: 2; color: #0b7566; font-size: 24px; letter-spacing: .12em; }
.project-code-box .btn { grid-row: 1 / 3; grid-column: 2; }

.project-section {
  margin-bottom: 18px; padding: 21px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-sm);
}
.project-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.project-section-head h3 { margin-bottom: 5px; font-size: 16px; }
.project-section-head p { color: var(--text-2); font-size: 12px; }
.project-section-head > span { padding: 6px 10px; border-radius: 99px; background: var(--brand-50); color: var(--brand-600); font-size: 11px; font-weight: 800; }
.project-session-control { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.project-session-control button {
  display: flex; min-height: 115px; flex-direction: column; align-items: flex-start; gap: 7px; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; color: var(--text-2); text-align: left;
}
.project-session-control button:hover { border-color: #b8c8df; }
.project-session-control button.open { border-color: #a8c2ff; background: var(--brand-50); color: var(--brand-600); }
.project-session-control button i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef2f7;
  font-style: normal;
}
.project-session-control button.open i { background: #d8f2ed; }
.project-session-control button i .ic { width: 14px; height: 14px; }
.project-session-control button b { color: inherit; font-size: 12px; }
.project-session-control button span { color: var(--text-2); font-size: 11px; line-height: 1.4; }
.project-next-open { margin-top: 13px; }

.project-team-table-wrap { overflow-x: auto; }
.project-team-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.project-team-table th {
  padding: 9px 11px; border-bottom: 1px solid var(--line); color: var(--text-3);
  font-size: 11px; font-weight: 750; text-align: left;
}
.project-team-table td { padding: 13px 11px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 12px; }
.project-team-table tbody tr:last-child td { border-bottom: 0; }
.project-team-table td > b { display: block; color: var(--text); font-size: 13px; }
.project-team-table td small { display: block; margin-top: 4px; color: var(--text-3); font-size: 10px; }
.project-code-copy {
  padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff;
  color: var(--accent-600); font-weight: 800; letter-spacing: .1em;
}
.project-mini-steps { display: flex; gap: 4px; }
.project-mini-steps i { display: block; width: 16px; height: 6px; border-radius: 99px; background: #e3e8f0; }
.project-mini-steps i.is-writing { background: var(--brand-500); }
.project-mini-steps i.is-done { background: var(--green-600); }

.project-team-modal { min-width: min(780px, 82vw); }
.project-team-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.project-tabs { display: flex; gap: 5px; margin: 17px 0; overflow-x: auto; }
.project-tabs button {
  flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text-2); font-size: 11px; font-weight: 700;
}
.project-tabs button.active { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); }
.project-result-head {
  display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0;
  border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 12px;
}
.project-result-head b { color: var(--text); font-size: 14px; }
.project-result-list { padding: 5px 0; }
.project-result-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.project-result-row span { color: var(--text-3); font-size: 11px; }
.project-result-row b { color: var(--text); font-size: 12px; line-height: 1.6; }
.project-result-group { margin: 9px 0; padding: 12px; border-radius: 10px; background: #f8fafc; }
.project-result-group > b { display: block; margin-bottom: 6px; }
.project-version-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.project-version-list span { padding: 6px 8px; border-radius: 7px; background: #f3f6fa; color: var(--text-2); font-size: 10px; }
.project-result-section { margin-top: 18px; }
.project-feedback-card { margin-top: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.project-feedback-card p { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin-top: 7px; color: var(--text-2); font-size: 11px; line-height: 1.5; }
.project-feedback-card p span { color: var(--text-3); }

/* 학생 6차시 */
.student-project-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px;
}
.student-project-head > div > span { color: var(--accent-600); font-size: 11px; font-weight: 800; }
.student-project-stepper {
  display: flex; align-items: center; margin-bottom: 20px; padding: 15px 17px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; overflow-x: auto;
}
.student-project-stepper > b { flex: 1; min-width: 14px; height: 2px; background: var(--line); }
.student-project-stepper a, .student-project-stepper > span {
  display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 5px; color: var(--text-3);
}
.student-project-stepper i {
  display: grid; width: 29px; height: 29px; place-items: center; border: 2px solid var(--line-strong);
  border-radius: 50%; background: #fff; font-size: 10px; font-style: normal; font-weight: 800;
}
.student-project-stepper i .ic { width: 12px; height: 12px; }
.student-project-stepper span { font-size: 9px; font-weight: 700; white-space: nowrap; }
.student-project-stepper .open { color: var(--brand-600); }
.student-project-stepper .open i { border-color: #a8c2ff; }
.student-project-stepper .done { color: var(--green-600); }
.student-project-stepper .done i { border-color: var(--green-600); background: var(--green-50); }
.student-project-stepper .active i { border-color: var(--accent-600); background: var(--accent-600); color: #fff; box-shadow: 0 0 0 4px var(--accent-50); }
.student-project-stepper .locked { opacity: .65; }
.student-project-form {
  padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm);
}
.project-lesson-intro {
  margin-bottom: 20px; padding: 14px 16px; border-left: 4px solid var(--accent-600);
  border-radius: 0 10px 10px 0; background: var(--accent-50); color: #554679; line-height: 1.65;
}
.project-resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.project-resource-choice {
  display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer; transition: .12s;
}
.project-resource-choice:hover { border-color: #b8c8df; }
.project-resource-choice:has(input:checked) { border-color: var(--accent-600); background: var(--accent-50); }
.project-resource-choice input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent-600); }
.project-resource-choice span { display: flex; flex-direction: column; gap: 4px; }
.project-resource-choice b { font-size: 12px; }
.project-resource-choice small { color: var(--text-2); font-size: 10px; line-height: 1.5; }
.project-resource-choice em { color: var(--green-600); font-size: 9px; font-style: normal; font-weight: 700; }
.project-weight-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 11px; background: #f8fafc; }
.project-weight-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 10px; font-weight: 700; }
.project-weight-grid input { padding: 8px; }
.project-save-bar {
  position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 9px; margin: 24px -22px -22px;
  padding: 13px 22px; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; background: rgba(255,255,255,.96);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .04); backdrop-filter: blur(8px);
}
.project-save-bar > div { flex: 1; display: flex; flex-direction: column; gap: 3px; color: var(--text-2); font-size: 11px; }
.project-save-bar small { color: var(--text-3); font-size: 9px; }
.project-locked {
  display: flex; min-height: 420px; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: center;
}
.project-lock-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--brand-50);
  color: var(--brand-600);
}
.project-lock-icon .ic { width: 30px; height: 30px; }
.project-locked p { margin-bottom: 7px; color: var(--text-2); }

/* 제한형 웹앱 제작기 */
.project-builder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.project-builder-panel { min-width: 0; }
.project-preview-panel {
  position: sticky; top: 82px; align-self: start; padding: 15px; border: 1px solid var(--line);
  border-radius: 15px; background: #f6f8fb;
}
.project-phone { width: 230px; margin: 0 auto; padding: 8px; border: 7px solid #17233d; border-radius: 28px; background: #17233d; box-shadow: 0 18px 35px -18px rgba(15, 23, 42, .45); }
.project-phone-top { width: 65px; height: 7px; margin: -2px auto 7px; border-radius: 99px; background: #050a14; }
.project-phone-screen {
  min-height: 375px; padding: 32px 17px 20px; border-radius: 16px; background:
    radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--project-color) 22%, white), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--project-color) 7%, white), #fff 48%);
}
.project-phone-chip { padding: 5px 7px; border-radius: 99px; background: color-mix(in srgb, var(--project-color) 12%, white); color: var(--project-color); font-size: 8px; font-weight: 800; }
.project-phone-screen h3 { margin-top: 23px; color: #12302c; font-size: 27px; letter-spacing: -.06em; }
.project-phone-screen p { min-height: 50px; margin-top: 8px; color: #66728a; font-size: 10px; line-height: 1.55; }
.project-phone-cards { display: flex; gap: 5px; margin: 25px 0 22px; }
.project-phone-cards i { flex: 1; height: 63px; border: 1px solid #e4e9f1; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); }
.project-phone-screen button { width: 100%; padding: 10px; border: 0; border-radius: 9px; background: var(--project-color); color: #fff; font-size: 9px; font-weight: 800; }
.project-preview-run { width: 100%; margin-top: 14px; }
.project-builder-actions { display: flex; gap: 8px; margin-top: 14px; }
.project-resource-edit { display: grid; grid-template-columns: 170px 1fr; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.project-resource-toggle { display: flex; grid-row: 1 / 3; gap: 8px; align-items: flex-start; cursor: pointer; }
.project-resource-toggle input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent-600); }
.project-resource-toggle span { display: flex; flex-direction: column; gap: 4px; }
.project-resource-toggle small { color: var(--text-3); font-size: 9px; }
.project-resource-edit textarea, .project-resource-edit > input { padding: 8px 9px; font-size: 11px; }
.project-feedback-form { margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); }
.project-feedback-form h3 { margin-bottom: 13px; }
.project-test-results { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.project-test-results article { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.project-test-results article > i { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--accent-50); color: var(--accent-600); font-style: normal; font-weight: 800; }
.project-test-results p { margin-top: 3px; color: var(--text-2); font-size: 10px; line-height: 1.5; }
.project-test-results small { color: var(--text-3); font-size: 9px; }

.project-publish-card {
  display: grid; grid-template-columns: 1fr 128px; gap: 18px; align-items: center; margin-bottom: 20px; padding: 19px;
  border: 1px solid #cfeae5; border-radius: 15px; background: linear-gradient(135deg, #f4fbfa, #fff);
}
.project-publish-card > div { min-width: 0; }
.project-publish-card span { color: var(--accent-600); font-size: 10px; font-weight: 800; }
.project-publish-card h3 { margin: 5px 0; font-size: 22px; }
.project-publish-card p, .project-publish-card em { color: var(--text-2); font-size: 11px; font-style: normal; }
.project-publish-card a { display: block; margin-top: 9px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-publish-card img { grid-row: 1 / 3; grid-column: 2; width: 128px; height: 128px; border: 8px solid #fff; border-radius: 12px; }
.project-publish-card > button { justify-self: start; }

/* 공개 광주픽 */
.public-project-app {
  min-height: 100vh; background: #f8fafc; color: #12302c; font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
}
.public-project-app > header {
  display: flex; height: 68px; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid #e8edf4; background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
}
.public-project-app > header a { display: flex; align-items: baseline; gap: 9px; color: #12302c; }
.public-project-app > header b { color: var(--project-color); font-size: 19px; letter-spacing: -.05em; }
.public-project-app > header a span, .public-project-app > header > span { color: #8792a8; font-size: 10px; }
.public-project-app > main { min-height: calc(100vh - 134px); }
.public-project-app > footer {
  display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 20px; padding: 15px max(24px, calc((100vw - 1120px) / 2));
  border-top: 1px solid #e8edf4; background: #fff; color: #8792a8; font-size: 10px;
}
.public-project-app > footer b { color: #46536e; }
.public-project-hero {
  display: flex; min-height: calc(100vh - 134px); flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 24px; background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--project-accent) 22%, transparent), transparent 24%),
    radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--project-color) 17%, transparent), transparent 30%),
    linear-gradient(180deg, #fff, color-mix(in srgb, var(--project-color) 5%, white)); text-align: center;
}
.public-project-hero > span, .public-project-title > span {
  padding: 7px 11px; border-radius: 99px; background: color-mix(in srgb, var(--project-color) 10%, white);
  color: var(--project-color); font-size: 11px; font-weight: 850;
}
.public-project-hero h1 { margin-top: 24px; font-size: clamp(52px, 8vw, 92px); letter-spacing: -.09em; line-height: .95; }
.public-project-hero > p { max-width: 610px; margin-top: 22px; color: #65718a; font-size: clamp(16px, 2vw, 21px); line-height: 1.65; }
.public-project-hero > button, .public-project-input form > button {
  margin-top: 32px; padding: 15px 24px; border: 0; border-radius: 12px; background: var(--project-color);
  color: #fff; font-size: 14px; font-weight: 850; box-shadow: 0 14px 28px -15px var(--project-color);
}
.public-project-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-top: 28px; }
.public-project-trust b { color: #7c879d; font-size: 10px; }
.public-project-trust b::before { content: "✓"; margin-right: 5px; color: #16a34a; }

.public-project-input, .public-project-results, .public-resource-detail { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 80px; }
.public-project-title { text-align: center; }
.public-project-title h1 { margin-top: 14px; font-size: clamp(30px, 4vw, 45px); letter-spacing: -.06em; }
.public-project-title p { margin-top: 10px; color: #7c879d; line-height: 1.6; }
.public-project-input form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; width: min(760px, 100%); margin: 38px auto 0;
  padding: 25px; border: 1px solid #e8edf4; border-radius: 20px; background: #fff; box-shadow: 0 24px 60px -36px rgba(15,23,42,.35);
}
.public-project-input form label { display: flex; flex-direction: column; gap: 8px; }
.public-project-input form label > span { color: #5d6981; font-size: 11px; font-weight: 800; }
.public-project-input form select { width: 100%; padding: 12px; border: 1px solid #dce3ed; border-radius: 10px; background: #fff; }
.public-project-input form > button { grid-column: 1 / -1; width: 100%; }
.public-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 36px; }
.public-result-grid article {
  position: relative; display: flex; min-height: 390px; flex-direction: column; padding: 23px; border: 1px solid #e4e9f1;
  border-radius: 18px; background: #fff; box-shadow: 0 18px 45px -35px rgba(15,23,42,.4);
}
.public-result-grid article > i {
  display: grid; width: 33px; height: 33px; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--project-color) 11%, white);
  color: var(--project-color); font-style: normal; font-weight: 900;
}
.public-result-score { position: absolute; top: 23px; right: 23px; color: var(--project-color); font-size: 12px; font-weight: 900; }
.public-result-grid h2 { margin-top: 25px; font-size: 20px; letter-spacing: -.04em; }
.public-result-grid p { min-height: 67px; margin-top: 10px; color: #6d7890; font-size: 12px; line-height: 1.65; }
.public-result-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.public-result-tags span { padding: 5px 7px; border-radius: 6px; background: #f2f5f9; color: #65718a; font-size: 9px; }
.public-result-grid strong { margin-top: 18px; color: #46536e; font-size: 11px; line-height: 1.7; }
.public-result-grid button {
  width: 100%; margin-top: auto; padding: 11px; border: 1px solid color-mix(in srgb, var(--project-color) 38%, white);
  border-radius: 9px; background: #fff; color: var(--project-color); font-weight: 850;
}
.public-retry { display: block; margin: 24px auto 0; padding: 11px 15px; border: 0; background: transparent; color: var(--project-color); font-weight: 800; }
.public-back { margin-bottom: 18px; border: 0; background: transparent; color: #65718a; font-weight: 800; }
.public-resource-detail-card { padding: clamp(24px, 5vw, 52px); border: 1px solid #e4e9f1; border-radius: 23px; background: #fff; }
.public-resource-detail-card > span { color: #16a34a; font-size: 11px; font-weight: 900; }
.public-resource-detail-card > h1 { margin-top: 10px; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.07em; }
.public-resource-detail-card > p { max-width: 750px; margin-top: 16px; color: #65718a; font-size: 15px; line-height: 1.8; }
.public-resource-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 32px; }
.public-resource-columns > div { padding: 20px; border-radius: 14px; background: #f7f9fc; }
.public-resource-columns h3 { margin-bottom: 11px; font-size: 13px; }
.public-resource-columns ul { padding-left: 18px; color: #65718a; font-size: 12px; line-height: 2; }
.public-source-box {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; padding: 17px 19px;
  border: 1px solid #dbe6ff; border-radius: 13px; background: #f5f8ff;
}
.public-source-box > div { display: flex; flex-direction: column; gap: 4px; }
.public-source-box b { color: #293650; font-size: 12px; }
.public-source-box span { color: #7c879d; font-size: 10px; }
.public-source-box a { padding: 10px 13px; border-radius: 8px; background: var(--project-color); color: #fff; font-size: 11px; font-weight: 800; }
.public-resource-detail-card .public-caution { margin-top: 13px; color: #a06b16; font-size: 10px; }

@media (max-width: 980px) {
  .project-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-session-control { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-builder-layout { grid-template-columns: 1fr; }
  .project-preview-panel { position: static; }
  .project-phone { width: 250px; }
  .public-result-grid { grid-template-columns: 1fr; }
  .public-result-grid article { min-height: 330px; }
}

@media (max-width: 700px) {
  .project-page-head, .student-project-head { flex-direction: column; }
  .project-page-head > .btn { width: 100%; }
  .project-stat-grid { gap: 8px; }
  .project-stat { min-height: 96px; padding: 15px; }
  .project-stat strong { font-size: 25px; }
  .project-card { flex-direction: column; align-items: stretch; }
  .project-card .btn { justify-content: center; }
  .project-card-meta span:not(:last-child)::after, .project-card-foot span:not(:last-child)::after { display: none; }
  .project-card-meta, .project-card-foot { flex-direction: column; gap: 5px; }
  .project-form-grid { grid-template-columns: 1fr; }
  .project-span-2 { grid-column: auto; }
  .project-resource-grid { grid-template-columns: 1fr; }
  .project-weight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-session-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-code-box { width: 100%; }
  .project-save-bar { flex-wrap: wrap; }
  .project-save-bar > div { flex: 1 0 100%; }
  .project-save-bar .btn { flex: 1; }
  .project-resource-edit { grid-template-columns: 1fr; }
  .project-resource-toggle { grid-row: auto; }
  .project-publish-card { grid-template-columns: 1fr; }
  .project-publish-card img { grid-row: auto; grid-column: auto; }
  .project-team-modal { min-width: min(92vw, 620px); }
  .project-result-row { grid-template-columns: 1fr; gap: 4px; }
  .public-project-app > header { padding: 0 18px; }
  .public-project-app > header > span { display: none; }
  .public-project-app > footer { flex-direction: column; align-items: flex-start; padding: 18px; }
  .public-project-input form { grid-template-columns: 1fr; padding: 18px; }
  .public-project-input form > button { grid-column: auto; }
  .public-resource-columns { grid-template-columns: 1fr; }
  .public-source-box { flex-direction: column; align-items: stretch; }
  .public-source-box a { text-align: center; }
}
