/* === 화면 테마 (리천 학사일정 시수배정 도우미와 같은 7종) ===
   실제 색 값은 아래 [data-theme="…"] 블록에 있고, ui.js 의 THEMES 에는 이름·설명·미리보기 색만 둔다. */
:root {
  --font: "Pretendard Variable", Pretendard, "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --bg: #f4f6fa;
  --bg-2: #ffffff;
  --bg-3: #eef1f6;
  --panel: #ffffff;
  --line: #dfe3ea;
  --line-2: #c9cfda;
  --line-strong: #b3bbc8;
  --text: #1c2333;
  --text-2: #4a5568;
  --text-3: #7b8597;
  --primary: #2f5bea;
  --primary-2: #244bc4;
  --primary-soft: #e8eefc;
  --accent: #0d9488;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --sun: #dc2626;
  --sat: #2563eb;
  --sidebar: #1c2333;
  --sidebar-text: #c7cfdd;
  --sidebar-active: #2f5bea;
  --sidebar-active-text: #fff;
  --sidebar-brand: #fff;
  --sidebar-hover: rgba(255, 255, 255, .07); --sidebar-hover-text: #fff;
  --sidebar-strong: #e2e8f0;
  --sidebar-line: rgba(255, 255, 255, .08); --sidebar-box: rgba(255, 255, 255, .06);
  --topbar-line: var(--line);
  --on-primary: #fff;
  --logo-1: #2f5bea;
  --logo-2: #0d9488;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --radius: 10px;
  --cell-holiday: #fff1f1;
  --cell-event: #eef4ff;
  --cell-off: #f3f4f6;
  --cell-exam: #f3e8ff;
  --cell-chang: #e6f7f1;

  /* 이전 테마 변수 이름과의 호환 */
  --c-primary: var(--primary);
  --c-primary-hov: var(--primary-2);
  --c-primary-soft: var(--primary-soft);
  --c-focus-ring: var(--primary-soft);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1420; --bg-2: #171d2b; --bg-3: #1e2637; --panel: #171d2b;
  --line: #2a3346; --line-2: #3a4457; --line-strong: #4d586e;
  --text: #e6eaf2; --text-2: #b4bccb; --text-3: #7f8a9d;
  --primary: #5b82ff; --primary-2: #7a9aff; --primary-soft: #1d2a4d;
  --danger-soft: #3b1a1a; --warn-soft: #3a2c10; --ok-soft: #10301c;
  --sidebar: #0b0f18; --sidebar-text: #aab3c5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --cell-holiday: #3a1c1c; --cell-event: #1b2740; --cell-off: #1e2330; --cell-exam: #2c1f3d; --cell-chang: #123227;
}
[data-theme="navy"] {
  --bg: #f4f1e8; --bg-2: #ffffff; --bg-3: #ebe7dc; --panel: #ffffff;
  --line: #e2dccd; --line-2: #cfc7b3; --line-strong: #b9b09b;
  --text: #19223a; --text-2: #454f68; --text-3: #7c8296;
  --primary: #1f3b73; --primary-2: #172d59; --primary-soft: #e6ebf6; --accent: #b08d3c;
  --sidebar: linear-gradient(180deg, #10203f 0%, #0a1427 100%); --sidebar-text: #c7cfe0; --sidebar-brand: #ffffff;
  --sidebar-active: #c9a24b; --sidebar-active-text: #10182b; --sidebar-strong: #e8d9a9; --sidebar-line: rgba(201, 162, 75, .22); --sidebar-box: rgba(255, 255, 255, .06);
  --topbar-line: #d9cf9f; --logo-1: #d4b15a; --logo-2: #1f3b73;
  --shadow: 0 1px 2px rgba(25, 34, 58, .06), 0 6px 18px rgba(25, 34, 58, .09);
}
[data-theme="charcoal"] {
  --bg: #f7f6f3; --bg-2: #ffffff; --bg-3: #ecebe6; --panel: #ffffff;
  --line: #e2ddd3; --line-2: #cec7b9; --line-strong: #b8b0a0;
  --text: #22211e; --text-2: #4c4943; --text-3: #85807a;
  --primary: #2a2a2e; --primary-2: #141416; --primary-soft: #e9e4d8; --accent: #b8975a;
  --sidebar: linear-gradient(180deg, #f3efe6 0%, #e7e1d3 100%); --sidebar-text: #5a564d; --sidebar-brand: #1b1b1d;
  --sidebar-hover: rgba(0, 0, 0, .06); --sidebar-hover-text: #1b1b1d;
  --sidebar-active: #2a2a2e; --sidebar-active-text: #efe2bd; --sidebar-strong: #1b1b1d; --sidebar-line: rgba(0, 0, 0, .1); --sidebar-box: rgba(0, 0, 0, .05);
  --topbar-line: #d9d0bd; --logo-1: #d4b87a; --logo-2: #2a2a2e;
  --shadow: 0 1px 2px rgba(34, 33, 30, .06), 0 6px 18px rgba(34, 33, 30, .08);
}
[data-theme="emerald"] {
  --bg: #eef5f0; --bg-2: #ffffff; --bg-3: #e0ece5; --panel: #ffffff;
  --line: #d3e2d9; --line-2: #b9cfc4; --line-strong: #a0b9ae;
  --text: #12261e; --text-2: #3d5147; --text-3: #6f857a;
  --primary: #0f6b58; --primary-2: #0b5546; --primary-soft: #d9efe6; --accent: #b8943a;
  --sidebar: linear-gradient(180deg, #0f3c30 0%, #071e17 100%); --sidebar-text: #bcd3c8; --sidebar-brand: #ffffff;
  --sidebar-active: #c2a04a; --sidebar-active-text: #0c2a22; --sidebar-strong: #e4d6a3; --sidebar-line: rgba(194, 160, 74, .22); --sidebar-box: rgba(255, 255, 255, .06);
  --topbar-line: #bcd4c7; --logo-1: #d4b15a; --logo-2: #0f6b58;
  --cell-chang: #dff3ea; --shadow: 0 1px 2px rgba(19, 37, 30, .06), 0 6px 18px rgba(19, 37, 30, .09);
}
[data-theme="burgundy"] {
  --bg: #faf4f3; --bg-2: #ffffff; --bg-3: #f1e4e2; --panel: #ffffff;
  --line: #e9d8d5; --line-2: #d6c0bc; --line-strong: #c3aaa5;
  --text: #2a161b; --text-2: #594246; --text-3: #8e797c;
  --primary: #7d1f3c; --primary-2: #641830; --primary-soft: #f6e3e8; --accent: #b98363;
  --sidebar: linear-gradient(180deg, #4b1028 0%, #23080f 100%); --sidebar-text: #e3ccd2; --sidebar-brand: #ffffff;
  --sidebar-active: #d6a385; --sidebar-active-text: #2c0b17; --sidebar-strong: #f0d4c4; --sidebar-line: rgba(214, 163, 133, .25); --sidebar-box: rgba(255, 255, 255, .07);
  --topbar-line: #e3c9c6; --logo-1: #d6a385; --logo-2: #7d1f3c;
  --cell-holiday: #fde9ec; --shadow: 0 1px 2px rgba(42, 25, 28, .06), 0 6px 18px rgba(42, 25, 28, .09);
}
[data-theme="midnight"] {
  color-scheme: dark;
  --bg: #07090d; --bg-2: #0f1218; --bg-3: #161b23; --panel: #0f1218;
  --line: #232a36; --line-2: #313a49; --line-strong: #414b5d;
  --text: #efe9db; --text-2: #c2bba9; --text-3: #8b8576;
  --primary: #c9a24b; --primary-2: #dbb864; --primary-soft: #2a2314; --on-primary: #16120a; --accent: #5fb3a1;
  --danger-soft: #3b1a1a; --warn-soft: #3a2c10; --ok-soft: #10301c;
  --sidebar: linear-gradient(180deg, #0b0d12 0%, #000000 100%); --sidebar-text: #b9b3a5; --sidebar-brand: #f3e9cf;
  --sidebar-active: #c9a24b; --sidebar-active-text: #16120a; --sidebar-strong: #e0bf6a; --sidebar-line: rgba(201, 162, 75, .22); --sidebar-box: rgba(255, 255, 255, .05);
  --topbar-line: #3a3120; --logo-1: #e0bf6a; --logo-2: #8a6d2c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 22px rgba(0, 0, 0, .5);
  --cell-holiday: #3a1c1c; --cell-event: #1b2438; --cell-off: #1a1f29; --cell-exam: #2b1f3a; --cell-chang: #11302a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }

/* === 레이아웃 === */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.topbar { background: var(--panel); color: var(--text); padding: 10px 20px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 100; border-bottom: 2px solid var(--topbar-line); box-shadow: var(--shadow); min-height: 49px; }
.topbar h1 { font-size: 21px; font-weight: 700; flex: 1; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; letter-spacing: -.2px; }
.topbar h1 .brand-line1 { font-weight: 800; letter-spacing: .5px; color: var(--primary); }
.topbar h1 .brand-sep { opacity: .4; }
.topbar h1 .brand-line2 { font-weight: 700; }
.topbar h1 .brand-school { font-weight: 400; color: var(--text-3); font-size: 13px; margin-left: 4px; }
.topbar .user-info { font-size: 13px; color: var(--text-2); }
.topbar button { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px; cursor: pointer; font-size: 12px; min-height: 30px; }
.topbar button:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

/* 테마 피커 (상단바·로그인: 작은 원, 왼쪽 반 = 사이드바색, 오른쪽 반 = 주 색) */
.theme-picker { display: flex; gap: 6px; align-items: center; }
.theme-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); cursor: pointer; padding: 0; transition: transform .15s; }
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--primary-soft); }

/* 테마 카드 (설정 → 일반, 학사일정 도우미와 같은 미리보기) */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.theme-card { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 5px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-2); color: var(--text); cursor: pointer; font: inherit; text-align: left; transition: border-color .12s, box-shadow .12s, transform .05s; min-height: 0; }
.theme-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.theme-card.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.theme-prev { display: flex; gap: 3px; height: 54px; border-radius: 6px; padding: 4px; overflow: hidden; }
.theme-prev .tp-side { width: 22%; border-radius: 3px; display: flex; flex-direction: column; gap: 3px; padding: 4px 3px; }
.theme-prev .tp-side i { display: block; height: 3px; border-radius: 2px; opacity: .55; }
.theme-prev .tp-side i.act { height: 5px; opacity: 1; }
.theme-prev .tp-main { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.theme-prev .tp-bar { height: 7px; border-radius: 2px; border: 1px solid; }
.theme-prev .tp-cards { flex: 1; display: flex; gap: 3px; }
.theme-prev .tp-cards span { flex: 1; border-radius: 3px; border: 1px solid; padding: 3px; display: flex; flex-direction: column; gap: 3px; }
.theme-prev .tp-cards b { display: block; height: 4px; border-radius: 2px; }
.theme-prev .tp-cards b + b { width: 60%; opacity: .35; }
.theme-name { font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.theme-name .chk { display: none; color: var(--primary); font-size: 12px; }
.theme-card.on .theme-name .chk { display: inline; }
.theme-desc { font-size: 10.5px; color: var(--text-3); padding: 0 2px 2px; line-height: 1.35; }

/* === 레이아웃: 좌측 사이드바 + 콘텐츠 === */
.layout { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 220px; background: var(--sidebar); border-right: 1px solid var(--sidebar-line); padding: 14px 0; flex-shrink: 0; position: sticky; top: 49px; height: calc(100vh - 49px); overflow-y: auto; align-self: flex-start; z-index: 80; }
.sidebar button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 20px; background: none; border: none; text-align: left; font-size: 13.5px; color: var(--sidebar-text); cursor: pointer; border-left: 3px solid transparent; transition: background .15s, color .15s; min-height: 38px; font-weight: 500; }
.sidebar button:hover { background: var(--sidebar-hover); color: var(--sidebar-hover-text); }
.sidebar button.active { background: var(--sidebar-active); color: var(--sidebar-active-text); border-left-color: var(--sidebar-active); font-weight: 700; }
.sidebar .sb-section { padding: 14px 22px 6px; font-size: 11px; color: var(--sidebar-text); opacity: .6; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.sidebar-backdrop { display: none; }

.hamburger { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 6px; cursor: pointer; font-size: 16px; line-height: 1; display: none; min-height: 30px; }
.hamburger:hover { background: var(--primary-soft); color: var(--primary); }

.content-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.main { flex: 1; padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* === 카드 === */
.card { background: var(--panel); border-radius: 14px; padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; padding: 0; border: none; }
.card-head .head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-head .head-meta { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* 서브탭 (설정/일정등록 내부) - 상단 고정 */
.sub-tabs-wrap { position: sticky; top: 49px; z-index: 80; background: var(--bg); padding: 10px 0 8px; margin: -10px 0 14px; }
.sub-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-3); border-radius: 10px; border: 1px solid var(--line); }
.sub-tabs button { background: none; border: none; padding: 5px 12px; font-size: 12.5px; color: var(--text-3); cursor: pointer; border-radius: 7px; font-weight: 600; min-height: 30px; transition: background .15s, color .15s; }
.sub-tabs button:hover { color: var(--primary); }
.sub-tabs button.active { background: var(--panel); color: var(--primary); box-shadow: var(--shadow); }

/* 필터 영역 */
.control-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; background: var(--bg-3); border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--line); }
.control-bar label { font-size: 12px; color: var(--text-3); font-weight: 500; margin-right: 2px; }
.control-bar input, .control-bar select { min-height: 38px; padding: 6px 12px; min-width: 0; width: auto; font-size: 13px; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.row label { min-width: 80px; font-size: 13px; color: var(--text-3); font-weight: 500; }

/* === 폼 === */
input[type=text], input[type=search], input[type=password], input[type=date], input[type=time], input[type=email], input[type=tel], input[type=number], select, textarea {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font-size: 14px; background: var(--bg-2); color: var(--text); width: 100%; min-height: 42px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[readonly] { background: var(--bg-3); color: var(--text-2); }

.btn { background: var(--primary); color: var(--on-primary); border: none; border-radius: 7px; padding: 6px 12px; cursor: pointer; font-size: 13px; min-height: 34px; font-weight: 600; transition: background .15s, transform .1s; }
.btn:hover { background: var(--primary-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line-2); }
.btn.secondary:hover { background: var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.sm { padding: 3px 9px; font-size: 11.5px; min-height: 28px; border-radius: 5px; }
.btn.print { background: var(--panel); color: var(--primary); border: 1px solid var(--primary); }
.btn.print:hover { background: var(--primary-soft); }
.btn.print::before { content: '🖨'; margin-right: 4px; font-size: 12px; }

/* === 테이블 === */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; background: var(--panel); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }
.table th { background: var(--bg-3); font-weight: 600; color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.table tbody tr:hover td { background: var(--bg-3); }
.scroll-x { overflow-x: auto; border-radius: 10px; }

/* === 주간 그리드 === */
.weekly-grid { min-width: 820px; border: 1px solid var(--line); }
.weekly-grid th, .weekly-grid td { padding: 8px 10px; }
.weekly-grid .date-cell { width: 110px; background: var(--bg-3); font-weight: 700; white-space: nowrap; color: var(--text); font-size: 13px; border-right: 1px solid var(--line); }
.weekly-grid .weekend-sun { color: var(--sun); }
.weekly-grid .weekend-sat { color: var(--sat); }
.weekly-grid .dept-col { min-width: 170px; }
.weekly-grid .ev { padding: 6px 8px; background: var(--primary-soft); border-left: 3px solid var(--primary); margin-bottom: 4px; font-size: 12px; border-radius: 4px; }
.weekly-grid .ev:last-child { margin-bottom: 0; }
.weekly-grid .ev .t { font-weight: 600; color: var(--text); line-height: 1.35; }
.weekly-grid .ev .c { color: var(--text-3); font-size: 11px; margin-top: 3px; white-space: pre-wrap; line-height: 1.4; }
.weekly-grid tbody tr:hover td { background: var(--bg-2); }

/* === 월간 달력 === */
.cal { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.cal th { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); color: var(--on-primary); padding: 10px; font-weight: 600; font-size: 13px; letter-spacing: .5px; }
.cal th.sun { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); color: #fff; }
.cal th.sat { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: #fff; }
.cal td { border-top: 1px solid var(--line); border-left: 1px solid var(--line); height: 108px; vertical-align: top; padding: 5px 6px; font-size: 11px; transition: background .1s; }
.cal td:first-child { border-left: none; }
.cal td.out { background: var(--bg-3); color: var(--text-3); }
.cal td:hover { background: var(--primary-soft); }
.cal td.out:hover { background: var(--bg-3); }
.cal .d { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--text-2); }
.cal td.sun .d { color: var(--sun); }
.cal td.sat .d { color: var(--sat); }
.cal .e { background: var(--primary-soft); border-left: 2px solid var(--primary); padding: 3px 6px; margin-bottom: 2px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
.cal .e.muted { background: var(--bg-3); color: var(--text-3); border-left-color: var(--line-2); }

/* === 학기 달력 (스택) === */
.term-calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 18px; }
.term-month { background: var(--panel); border-radius: 12px; padding: 14px; border: 1px solid var(--line); }
.term-month-head { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: flex; justify-content: space-between; align-items: baseline; }
.term-month-head .count { font-size: 12px; font-weight: 500; color: var(--text-3); }
.term-month .cal td { height: 78px; font-size: 10px; }
.term-month .cal .d { font-size: 12px; margin-bottom: 2px; }
.term-month .cal .e { padding: 2px 4px; font-size: 10px; margin-bottom: 1px; }

/* === 대시보드 카드 === */
.stat-card { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); color: var(--on-primary); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.stat-card .stat-label { font-size: 13px; opacity: .85; margin-bottom: 6px; letter-spacing: .5px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat-card .stat-sub { font-size: 12px; opacity: .8; margin-top: 8px; }

/* 통계 타일 그리드 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-tile { background: var(--panel); border-radius: 12px; padding: 16px; border: 1px solid var(--line); }
.stat-tile .label { font-size: 11px; color: var(--text-3); letter-spacing: .5px; font-weight: 600; text-transform: uppercase; }
.stat-tile .value { font-size: 24px; font-weight: 800; color: var(--primary); margin-top: 6px; letter-spacing: -.5px; }
.stat-tile .hint { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.stat-tile.accent { background: linear-gradient(135deg, var(--primary-soft) 0%, var(--panel) 100%); }
.stat-tile.accent .value { color: var(--primary); }

/* 월별 막대 차트 */
.month-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-top: 4px; padding: 8px 4px 4px; }
.month-bars .bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.month-bars .bar .bval { font-size: 10px; color: var(--text-3); }
.month-bars .bar .bfill { width: 100%; background: var(--primary-soft); border-radius: 4px 4px 0 0; min-height: 2px; border-top: 3px solid var(--primary); }
.month-bars .bar .blabel { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* 학사일정 유형 뱃지 (파스텔 칩은 어두운 테마에서도 어두운 글자로 읽힘) */
.aca-type { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.aca-type.휴업     { background: #fef3c7; color: #92400e; }
.aca-type.재량휴업 { background: #fef3c7; color: #92400e; }
.aca-type.방학     { background: #dbeafe; color: #1e40af; }
.aca-type.개학     { background: #dcfce7; color: #166534; }
.aca-type.종업     { background: #fce7f3; color: #9d174d; }
.aca-type.공휴일   { background: #fee2e2; color: #991b1b; }
.aca-type.시험     { background: #ede9fe; color: #5b21b6; }
.aca-type.행사     { background: #e0e7ff; color: #3730a3; }

/* 학사일정 달력 (월간 스택) */
.aca-cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.aca-cal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.aca-cal-head { font-weight: 700; color: var(--text); padding-bottom: 6px; border-bottom: 2px solid var(--primary); margin-bottom: 6px; display: flex; justify-content: space-between; }
.aca-cal table { width: 100%; border-collapse: separate; border-spacing: 0; }
.aca-cal th { padding: 4px; font-size: 11px; color: var(--text-3); font-weight: 600; }
.aca-cal th.sun { color: var(--sun); }
.aca-cal th.sat { color: var(--sat); }
.aca-cal td { height: 52px; border: 1px solid var(--line); vertical-align: top; padding: 2px; font-size: 10px; cursor: pointer; transition: background .1s; }
.aca-cal td:hover { background: var(--primary-soft); }
.aca-cal td.out { background: var(--bg-3); color: var(--text-3); cursor: default; }
.aca-cal td.out:hover { background: var(--bg-3); }
.aca-cal .d { font-weight: 600; font-size: 11px; color: var(--text-2); }
.aca-cal td.sun .d { color: var(--sun); }
.aca-cal td.sat .d { color: var(--sat); }
.aca-cal .marker { display: block; padding: 1px 3px; margin-top: 1px; border-radius: 3px; font-size: 9px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aca-cal .marker.재량휴업, .aca-cal .marker.휴업 { background: #fef3c7; color: #92400e; }
.aca-cal .marker.방학 { background: #dbeafe; color: #1e40af; }
.aca-cal .marker.개학 { background: #dcfce7; color: #166534; }
.aca-cal .marker.종업 { background: #fce7f3; color: #9d174d; }
.aca-cal .marker.공휴일 { background: #fee2e2; color: #991b1b; }
.aca-cal .marker.시험 { background: #ede9fe; color: #5b21b6; }
.aca-cal .marker.행사 { background: #e0e7ff; color: #3730a3; }

/* 모달 */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--panel); color: var(--text); border-radius: 14px; padding: 20px; max-width: 440px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.3); border: 1px solid var(--line); }
.modal h3 { font-size: 16px; margin-bottom: 12px; color: var(--text); }
.modal .row { display: block; margin-bottom: 10px; }
.modal .row label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 4px; font-weight: 600; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* === 로그인 (바탕은 테마의 사이드바 색) === */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--sidebar); }
.login-card { background: var(--panel); color: var(--text); border-radius: 16px; padding: 36px 32px; width: 100%; max-width: 400px; box-shadow: 0 25px 50px rgba(0,0,0,.25); border: 1px solid var(--line); }
.login-card .brand-main { text-align: center; font-size: 24px; color: var(--text); font-weight: 800; letter-spacing: -.2px; line-height: 1.3; margin-bottom: 10px; }
.login-card .brand-main .brand-line1 { color: var(--primary); }
.login-card h1 { text-align: center; font-size: 18px; margin-bottom: 4px; color: var(--primary); font-weight: 800; letter-spacing: .5px; line-height: 1.3; }
.login-card .sub { text-align: center; color: var(--text-3); font-size: 13px; margin-bottom: 26px; }
.login-card .row { display: block; margin-bottom: 14px; }
.login-card label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.login-card .btn { width: 100%; margin-top: 10px; min-height: 38px; font-size: 14px; }
.login-card .err { white-space: pre-wrap; }

.login-theme-picker { display: flex; justify-content: center; gap: 10px; margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.login-theme-picker .theme-dot { width: 22px; height: 22px; }

/* Google 로그인 버튼 */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.google-btn .g-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 800; font-size: 15px; font-family: Arial, sans-serif; }

/* === 공통 유틸 === */
.muted { color: var(--text-3); font-size: 12px; }
.err { color: var(--danger); font-size: 13px; padding: 10px 12px; background: var(--danger-soft); border-radius: 8px; margin: 8px 0; border: 1px solid var(--line); }
.ok { color: var(--ok); font-size: 13px; padding: 10px 12px; background: var(--ok-soft); border-radius: 8px; margin: 8px 0; border: 1px solid var(--line); }
.flex { display: flex; gap: 8px; }
.flex-1 { flex: 1; }
.center { text-align: center; }
.hidden { display: none !important; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; background: #e0e7ff; color: #3730a3; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge.admin  { background: #fef3c7; color: #92400e; }
.badge.dept   { background: #dbeafe; color: #1e40af; }
.badge.viewer { background: #e5e7eb; color: #374151; }

/* === 브랜드 푸터 === */
.brand-footer { padding: 20px; text-align: center; font-size: 11px; color: var(--text-3); line-height: 1.7; border-top: 1px solid var(--line); background: var(--bg-3); margin-top: 20px; }
.brand-footer.compact { border: none; background: none; margin-top: 20px; padding: 12px 0 0; font-size: 10px; }
.brand-footer a { color: var(--primary); }
.brand-footer .copyright { margin-top: 4px; color: var(--text-3); font-size: 10.5px; }

/* === 하단 고정 메뉴 (스마트폰) — 기본은 숨김, 768px 이하에서 표시 === */
.bottom-nav, .more-sheet, .more-backdrop { display: none; }

/* === 반응형 === */
@media (max-width: 768px) {
  .topbar { padding: 6px 10px; gap: 8px; min-height: 44px; }
  .topbar h1 { font-size: 17px; gap: 4px; }
  .topbar h1 .brand-school { display: none; }
  .topbar .user-info { display: none; }
  .topbar button, .hamburger { padding: 4px 9px; font-size: 12px; min-height: 30px; border-radius: 6px; }
  .hamburger { font-size: 16px; }
  .main { padding: 12px 12px calc(64px + env(safe-area-inset-bottom, 0px)); }   /* 하단 메뉴에 가리지 않게 */
  .card { padding: 12px; border-radius: 12px; margin-bottom: 14px; }
  .card-head { padding-bottom: 10px; margin-bottom: 12px; }
  .row { gap: 6px; margin-bottom: 8px; }
  .row label { min-width: 70px; font-size: 12px; }
  .theme-dot { width: 18px; height: 18px; }
  .term-calendar { grid-template-columns: 1fr; }

  /* 버튼·입력칸 최소화 */
  .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 7px; }
  .btn.sm { min-height: 28px; padding: 3px 9px; font-size: 11px; border-radius: 5px; white-space: nowrap; }
  .btn.print { min-height: 28px; padding: 3px 9px; font-size: 11px; }
  .btn.print::before { font-size: 12px; margin-right: 4px; }
  .actions { gap: 4px; }
  input[type=text], input[type=search], input[type=password], input[type=date], input[type=time], input[type=email], input[type=tel], input[type=number], select, textarea { min-height: 36px; padding: 7px 10px; font-size: 13px; border-radius: 7px; }
  textarea { min-height: 64px; }
  .control-bar { padding: 8px 10px; gap: 6px; margin-bottom: 12px; }
  .control-bar input, .control-bar select { min-height: 32px; padding: 4px 8px; font-size: 12px; }
  .sub-tabs-wrap { top: 44px; padding: 6px 0 6px; margin: -6px 0 10px; }
  .sub-tabs { gap: 2px; padding: 3px; }
  .sub-tabs button { padding: 6px 12px; font-size: 12px; min-height: 30px; }
  .table th, .table td { padding: 8px 8px; }

  /* 사이드바 → 드로어 */
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar { position: fixed; top: 44px; left: 0; bottom: 0; height: calc(100vh - 44px); width: 260px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 4px 0 16px rgba(0,0,0,.18); z-index: 200; padding-bottom: 70px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open ~ .sidebar-backdrop { display: block; position: fixed; inset: 44px 0 0 0; background: rgba(0,0,0,.35); z-index: 150; }

  /* 하단 고정 메뉴: 일정등록 · 주간일정 · 월간일정 · 설정 */
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 180; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.08); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 6px 2px 5px; background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: -.2px; -webkit-tap-highlight-color: transparent; }
  .bottom-nav button .bn-icon { display: inline-flex; line-height: 0; }
  .bottom-nav button .bn-icon svg { width: 22px; height: 22px; }
  .bottom-nav button.active { color: var(--primary); }
  .bottom-nav button.active .bn-icon { background: var(--primary-soft); border-radius: 10px; padding: 2px 10px; }
  .bottom-nav button:active { color: var(--primary); }

  /* 더보기 시트: 하단 바 위로 펼쳐지는 전체 메뉴 (관리자는 부서 설정·사용자 등록·학사 일정·백업 포함) */
  .more-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 170; }
  .more-sheet { position: fixed; left: 0; right: 0; bottom: calc(54px + env(safe-area-inset-bottom, 0px)); z-index: 175; background: var(--panel); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.18); padding: 10px 12px 14px; transform: translateY(110%); transition: transform .2s ease; }
  .more-sheet.open { display: block; transform: translateY(0); }
  .more-sheet-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-2); padding: 2px 4px 10px; }
  .more-sheet-head .more-close { background: none; border: none; color: var(--text-3); font-size: 16px; padding: 4px 8px; cursor: pointer; }
  .more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .more-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 8px 4px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; color: var(--text-2); font-size: 11.5px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .more-grid button .bn-icon { display: inline-flex; line-height: 0; color: var(--text-2); }
  .more-grid button.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
  .more-grid button.active .bn-icon { color: var(--primary); }
}
@media (max-width: 480px) {
  .row { flex-direction: column; align-items: stretch; }
  .row label { min-width: auto; margin-bottom: 4px; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 7px 6px; }
  .cal td { height: 64px; font-size: 10px; padding: 3px; }
  .cal .d { font-size: 11px; }
  .theme-picker { gap: 4px; }
  .topbar .theme-picker { display: none; }   /* 좁은 화면에서는 설정에서 고른다 */
  .card-head h2 { font-size: 15px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-tile { padding: 10px 12px; }
  .stat-tile .value { font-size: 20px; }
  .stat-card { padding: 14px 16px; }
  .stat-card .stat-value { font-size: 20px; }
}

/* === 인쇄 === */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff !important; color: #111 !important; }
  .topbar, .sidebar, .sidebar-backdrop, .hamburger, .bottom-nav, .bottom-nav-wrap, .more-sheet, .more-backdrop, .brand-footer, button, .theme-picker, .btn, .control-bar, .sub-tabs, [data-no-print], #toast { display: none !important; }
  .layout { display: block !important; }
  .content-main { display: block !important; }
  .main { padding: 0 !important; max-width: 100% !important; margin: 0 !important; }
  .card { border: none !important; box-shadow: none !important; padding: 0 !important; margin-bottom: 14px !important; page-break-inside: avoid; border-radius: 0 !important; background: #fff !important; color: #111 !important; }
  .card-head { border-bottom: 2px solid #111 !important; padding-bottom: 8px; margin-bottom: 12px; }
  .card-head h2 { font-size: 18pt; font-weight: 700; color: #111 !important; }
  .table { font-size: 10pt; border: 1px solid #000 !important; border-radius: 0 !important; background: #fff !important; }
  .table th, .table td { border-bottom: 1px solid #888 !important; padding: 5px 6px !important; color: #111 !important; }
  .table th { background: #eee !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal { border: 1px solid #000 !important; border-radius: 0 !important; background: #fff !important; }
  .cal th { background: #333 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal th.sun { background: #b91c1c !important; }
  .cal th.sat { background: #1d4ed8 !important; }
  .cal td { height: auto !important; min-height: 60px; color: #111 !important; }
  .cal .d { color: #111 !important; }
  .cal .e { background: #f0f0f0 !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ev, .weekly-grid .ev { background: #f0f0f0 !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; page-break-inside: avoid; }
  .weekly-grid .ev .t, .weekly-grid .ev .c, .weekly-grid .date-cell { color: #111 !important; background: #fff !important; }
  .scroll-x { overflow: visible !important; }
  .weekly-grid { min-width: auto !important; }
  .term-calendar { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .term-month { border: 1px solid #888 !important; box-shadow: none !important; page-break-inside: avoid; background: #fff !important; }
  .term-month-head { color: #111 !important; }
  a { color: inherit !important; text-decoration: none !important; }
}

/* === v2: 로그인 계열 화면 === */
.auth-links { display: flex; justify-content: center; gap: 18px; margin-top: 14px; font-size: 12px; }
.auth-links a { color: var(--primary); }
.join-who { margin: -4px 0 10px; font-size: 12px; }
.join-who .ok, .join-who .err { margin: 0; }
.invite-code { font-family: Consolas, 'Courier New', monospace; font-size: 30px; font-weight: 800; letter-spacing: 6px; text-align: center; padding: 14px 8px; background: var(--primary-soft); color: var(--primary); border-radius: 10px; margin: 6px 0 4px; user-select: all; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
label.check input { width: 18px; height: 18px; min-height: 0; margin: 0; }

/* === v2: 부서 원형 머릿글 뱃지 === */
.dept-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: -.3px; vertical-align: middle; line-height: 1; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,.18); white-space: nowrap; }
.dept-badge.sm { min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; font-size: 9px; }
.dept-badge.dim { opacity: .3; }
.dept-badge[role=button] { cursor: pointer; }
.dept-name { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dept-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.dept-legend-item { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-size: 12px; cursor: pointer; min-height: 0; }
.dept-legend-item:hover { border-color: var(--primary); color: var(--primary); }
.dept-legend-item.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.dept-legend-item.dim { opacity: .45; }
.dept-legend-item.clear { background: var(--primary); color: var(--on-primary); border-color: var(--primary); padding: 3px 12px; }
.cal .e { display: flex; align-items: center; gap: 4px; }
.cal .e .dept-badge { flex-shrink: 0; }
.weekly-grid th.dept-col { white-space: nowrap; }

/* === v2: 일간 뷰 === */
.daily-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.daily-date { font-size: 18px; font-weight: 800; }
.daily-date.sun { color: var(--sun); } .daily-date.sat { color: var(--sat); }
.daily-list { display: grid; gap: 12px; }
.daily-dept { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel); }
.daily-dept-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.daily-item { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.daily-time { min-width: 64px; font-size: 12px; color: var(--text-3); font-weight: 600; padding-top: 2px; }
.daily-body { flex: 1; min-width: 0; }
.daily-body .t { font-weight: 700; }
.daily-body .c { color: var(--text-3); font-size: 12px; white-space: pre-wrap; margin-top: 2px; line-height: 1.5; }
@media (max-width: 480px) {
  .daily-item { flex-wrap: wrap; }
  .daily-item .actions { width: 100%; justify-content: flex-end; }
  .dept-legend { margin-bottom: 10px; }
}
@media print {
  .dept-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .daily-dept { page-break-inside: avoid; }
}

/* === v2: 출력 (DocModel → HTML 표, 인쇄 머리글) === */
.print-header { display: none; }
.doc { color: #111; }
.doc-title { font-size: 16pt; font-weight: 800; text-align: center; margin: 4px 0 2px; color: var(--text); }
.doc-subtitle { font-size: 9.5pt; text-align: center; color: var(--text-3); margin-bottom: 10px; }
.doc-h { font-weight: 700; margin: 12px 0 6px; color: var(--text); }
.doc-p { font-size: 9pt; color: var(--text-2); margin: 6px 0; }
.doc-break { height: 10px; }
.doc-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; color: #111; margin-bottom: 8px; }
.doc-table th, .doc-table td { border: 1px solid #555; padding: 3px 5px; vertical-align: middle; line-height: 1.35; word-break: break-word; }
.doc-table th { font-weight: 700; }
.doc-table .dl { line-height: 1.3; }
.doc-table .dl + .dl { margin-top: 1px; }
.export-btn { white-space: nowrap; }
@media (max-width: 768px) { .doc-table { font-size: 8pt !important; } .doc-table th, .doc-table td { padding: 2px 3px; } }
@media print {
  .print-header { display: block; font-size: 10pt; color: #333; text-align: center; margin: -6px 0 8px; }
  .dept-legend { display: flex !important; gap: 4px 10px; margin: 0 0 8px; }
  .dept-legend-item { border: none !important; background: none !important; color: #111 !important; padding: 0 !important; opacity: 1 !important; font-size: 9pt; }
  .dept-legend-item.clear { display: none !important; }
  .dept-badge { box-shadow: none; }
  .cal .e, .weekly-grid .ev { background: #fff !important; }
  .cal .e { border-left-width: 3px !important; }
  .doc-table, .doc-table th, .doc-table td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-table tr { page-break-inside: avoid; }
  .doc-break { page-break-after: always; height: 0; }
  .daily-dept { border: 1px solid #888 !important; background: #fff !important; }
  .daily-item { border-top-color: #ccc !important; }
  .daily-time, .daily-body .c { color: #333 !important; }
}

/* === 부서 관리 표 === */
.dept-table { min-width: 640px; }
.dept-table td { vertical-align: middle; }
.dept-table td:first-child { white-space: nowrap; }
.dept-table input, .dept-table select { min-height: 34px; padding: 6px 8px; font-size: 13px; }
.dept-name-cell { display: flex; align-items: center; gap: 6px; }

/* === 일정 등록: 시각 + 교시 === */
.time-wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; flex: 1; }
.time-group { display: flex; align-items: center; gap: 6px; }
.time-group input[type=time] { width: 128px; min-width: 0; }
.time-group select { width: auto; min-width: 96px; }
@media (max-width: 480px) { .time-group input[type=time] { width: 112px; } .time-group select { min-width: 84px; } }

/* === 부서별 등록: 상단 고정 블록 (제목·부서·빠른 등록) + 표 머리글 고정 === */
.sticky-block { position: sticky; z-index: 70; background: var(--panel); margin: -20px -20px 0; padding: 20px 20px 8px; border-radius: 14px 14px 0 0; }
.sticky-block .card-head { margin-bottom: 12px; }
.sticky-block .row { margin-bottom: 4px; }
.sticky-block .control-bar { margin-bottom: 10px; }
.sticky-block .dept-legend { margin-bottom: 8px; }
.sticky-block .daily-head { margin-bottom: 6px; }
.table thead th { background: var(--bg-3); }
.table.sticky-head { overflow: visible; border-radius: 0; }   /* overflow:hidden 이면 머리글 고정이 표 안에 갇힌다 */
@media (max-width: 768px) { .sticky-block { margin: -12px -12px 0; padding: 12px 12px 6px; } }
@media print { .sticky-block { position: static; } .table thead th { position: static !important; } }

/* === 주간 일정: 주 선택 체크 + 머리글 고정 === */
.week-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: -4px 0 10px; }
.week-picker label.check { font-size: 12.5px; padding: 2px 6px; border-radius: 6px; }
.week-picker label.check.cur { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.weekly-wrap { overflow: visible; }
.weekly-grid tr.week-start td { border-top: 2px solid var(--line-2); }
.weekly-grid tbody tr:first-child.week-start td { border-top: none; }
/* 화면 폭 맞춤 표: 가로 스크롤 없이 열을 균등 분배, 넘치는 부서는 아래 표로 */
.weekly-grid.fit { min-width: 0; width: 100%; table-layout: fixed; }
.weekly-grid.fit .date-cell { width: 104px; }
.weekly-grid.fit .dept-col { min-width: 0; }
.weekly-grid.fit th, .weekly-grid.fit td { overflow-wrap: anywhere; }
.weekly-part-head { margin: 14px 0 6px; font-weight: 600; }
@media (max-width: 480px) { .weekly-grid.fit .date-cell { width: 84px; font-size: 12px; } }
@media print {
  .weekly-part-head { page-break-before: always; margin: 0 0 6px; color: #333 !important; }   /* 넘치는 부서 표는 다음 페이지 */
  .weekly-grid.fit { width: 100% !important; table-layout: fixed; font-size: 9pt; }
  .weekly-grid.fit tr { page-break-inside: avoid; }
  .weekly-grid.fit thead { display: table-header-group; }
  .week-picker { display: none !important; }
}

/* === 일정표 촘촘하게: 여백 최소 + 가는 선 격자 (주간·월간·학기) === */
.table.weekly-grid { border-collapse: collapse; border-spacing: 0; border: 1px solid var(--line-strong); border-radius: 0; box-shadow: none; }
.table.weekly-grid th, .table.weekly-grid td { border: 1px solid var(--line-strong); padding: 2px 4px; vertical-align: top; line-height: 1.3; }
.table.weekly-grid th { padding: 4px; font-size: 11.5px; text-transform: none; letter-spacing: 0; }
.table.weekly-grid .date-cell { padding: 3px 5px; font-size: 12px; width: 96px; background: var(--bg-3); border-right: 1px solid var(--line-strong); }
.table.weekly-grid tbody tr:hover td { background: transparent; }
.table.weekly-grid tbody tr:nth-child(even) .date-cell { background: var(--bg-3); }
.weekly-grid .ev { padding: 1px 4px 1px 5px; margin: 0 0 2px; border-left-width: 2px; border-radius: 2px; font-size: 11.5px; line-height: 1.3; }
.weekly-grid .ev .t { line-height: 1.3; }
.weekly-grid .ev .c { font-size: 10.5px; margin-top: 1px; line-height: 1.3; }
.weekly-grid tr.week-start td { border-top-width: 2px; }
.weekly-grid.fit .date-cell { width: 92px; }

.cal { border-collapse: collapse; border-spacing: 0; border: 1px solid var(--line-strong); border-radius: 0; }
.cal th { padding: 4px; font-size: 12px; letter-spacing: 0; border: 1px solid var(--line-strong); }
.cal td { border: 1px solid var(--line-strong); padding: 2px 3px; height: 84px; font-size: 11px; line-height: 1.25; }
.cal td:first-child { border-left: 1px solid var(--line-strong); }
.cal .d { font-size: 12px; margin-bottom: 2px; }
.cal .e { padding: 1px 3px; margin-bottom: 1px; border-left-width: 2px; border-radius: 2px; gap: 3px; font-size: 11px; line-height: 1.25; }
.term-month .cal td { height: 64px; font-size: 10px; }
.term-month .cal .e { padding: 0 2px; font-size: 10px; }
@media (max-width: 480px) { .cal td { height: 56px; } .weekly-grid.fit .date-cell { width: 80px; } }
@media print {
  .table.weekly-grid, .table.weekly-grid th, .table.weekly-grid td, .cal, .cal th, .cal td { border-color: #555 !important; }
  .table.weekly-grid th, .table.weekly-grid td { padding: 1px 3px !important; font-size: 8.5pt; }
  .weekly-grid .ev { margin-bottom: 1px !important; }
}

/* === 부서 이니셜 뱃지 축소 === */
.dept-badge { min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; font-size: 9px; letter-spacing: -.4px; }
.dept-badge.sm { min-width: 15px; height: 15px; padding: 0 2px; border-radius: 8px; font-size: 8px; }
.dept-legend-item { font-size: 11.5px; gap: 4px; padding: 1px 7px 1px 3px; }
.cal .e { gap: 2px; }
.daily-dept-head .dept-badge { min-width: 20px; height: 20px; font-size: 9.5px; }

/* === 부서 이니셜 뱃지 더 축소 === */
.dept-badge { min-width: 15px; height: 15px; padding: 0 2px; border-radius: 8px; font-size: 8px; letter-spacing: -.5px; box-shadow: none; }
.dept-badge.sm { min-width: 12px; height: 12px; padding: 0 2px; border-radius: 6px; font-size: 7px; letter-spacing: -.5px; }
.dept-legend-item { font-size: 11px; gap: 3px; padding: 1px 6px 1px 3px; }
.daily-dept-head .dept-badge { min-width: 16px; height: 16px; font-size: 8px; }
.dept-name .dept-badge { min-width: 15px; height: 15px; }

/* === 주간 일정표 날짜 열 축소 === */
.table.weekly-grid .date-cell, .weekly-grid.fit .date-cell { width: 62px; min-width: 62px; padding: 3px 4px; font-size: 12px; white-space: nowrap; }
.weekly-grid .date-cell .wd { font-weight: 500; font-size: 11px; }
@media (max-width: 480px) { .weekly-grid.fit .date-cell { width: 56px; min-width: 56px; font-size: 11px; } }
.table.weekly-grid thead th:first-child, .weekly-grid.fit thead th:first-child { width: 62px; min-width: 62px; padding: 4px 2px; font-size: 10.5px; }
@media (max-width: 480px) { .weekly-grid.fit thead th:first-child { width: 56px; min-width: 56px; } }

/* === 주간 일정표 날짜 열 대폭 축소 (두 줄) === */
.table.weekly-grid .date-cell, .weekly-grid.fit .date-cell, .table.weekly-grid thead th:first-child, .weekly-grid.fit thead th:first-child { width: 46px; min-width: 46px; max-width: 46px; padding: 2px 2px; text-align: center; }
.weekly-grid .date-cell .md { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.weekly-grid .date-cell .wd { font-size: 10.5px; font-weight: 500; line-height: 1.2; }
.table.weekly-grid thead th:first-child { font-size: 10.5px; }
@media (max-width: 480px) { .table.weekly-grid .date-cell, .weekly-grid.fit .date-cell, .weekly-grid.fit thead th:first-child { width: 42px; min-width: 42px; max-width: 42px; } }

/* === 주간 일정표 셀: 띠 없이 같은 글꼴, 일정 사이 점선 === */
.weekly-grid .ev { background: none !important; border-left: none !important; border-radius: 0; padding: 1px 0 2px; margin: 0; box-shadow: none; }
.weekly-grid .ev + .ev { border-top: 1px dotted var(--line-2); margin-top: 1px; padding-top: 2px; }
.weekly-grid .ev .t, .weekly-grid .ev .c { font-size: 11.5px; font-weight: 400; color: var(--text); line-height: 1.3; margin: 0; }
.weekly-grid .ev .c { white-space: pre-wrap; }
@media (min-width: 769px) {
  .table.weekly-grid .date-cell, .weekly-grid.fit .date-cell, .table.weekly-grid thead th:first-child, .weekly-grid.fit thead th:first-child { width: 60px; min-width: 60px; max-width: 60px; }
  .weekly-grid .date-cell .md { font-size: 12px; } .weekly-grid .date-cell .wd { font-size: 11px; }
}
@media print { .weekly-grid .ev { background: none !important; } .weekly-grid .ev + .ev { border-top-color: #999; } }

/* === 월간·학기 달력: 일정 칸의 띠(배경·왼쪽 색줄) 없음 === */
.cal .e, .term-month .cal .e { background: none !important; border-left: none !important; border-radius: 0; padding: 1px 0; color: var(--text); font-weight: 400; }
.cal .e.muted { background: none !important; color: var(--text-3); }
@media print { .cal .e { background: none !important; border-left: none !important; } }

/* === 일정표 형태 탭 (가로 날짜·부서 / 일정표) === */
.form-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 2px 0 8px; }
.form-tab { border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text-2); padding: 3px 10px; font-size: 12px; line-height: 1.4; border-radius: 6px; cursor: pointer; font-weight: 600; min-height: 0; }
.form-tab:hover { border-color: var(--primary); color: var(--primary); }
.form-tab.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.form-hide { margin-left: 8px; font-size: 12px; }

/* === 가로 날짜(월~일) × 세로 부서 표 === */
.wr-head { margin: 12px 0 4px; font-size: 13px; }
#dyBox > .wr-head:first-child, .wr-wrap + .wr-head { margin-top: 12px; }
.table.wr-grid { table-layout: fixed; width: 100%; border-collapse: collapse; border: 1px solid var(--line-strong); font-size: 11.5px; border-radius: 0; }
.table.wr-grid th, .table.wr-grid td { border: 1px solid var(--line-strong); padding: 2px 4px; vertical-align: top; line-height: 1.3; overflow-wrap: anywhere; }
.table.wr-grid thead th { text-align: center; font-size: 11.5px; padding: 3px 2px; white-space: nowrap; }
.wr-grid th.sun { color: var(--sun); } .wr-grid th.sat { color: var(--sat); }
.wr-grid td.out, .wr-grid th.out { background: var(--bg-3); color: var(--text-3); }
.wr-grid th.hl { background: var(--primary-soft); color: var(--primary); }
.wr-grid td.hl { background: var(--primary-soft); }
.wr-grid td.wr-dept { vertical-align: middle; font-weight: 600; font-size: 11.5px; }
.wr-grid td.wr-dept .nm { margin-left: 3px; }
.wr-grid .ev { padding: 1px 0 2px; }
.wr-grid .ev + .ev { border-top: 1px dotted var(--line-2); padding-top: 2px; }
.wr-grid .ev .t, .wr-grid .ev .c { font-size: 11.5px; font-weight: 400; color: var(--text); }
.wr-grid .ev .c { white-space: pre-wrap; }
@media (max-width: 768px) {
  .wr-wrap { overflow-x: auto; }
  .table.wr-grid { min-width: 560px; }
  .wr-grid td.wr-dept .nm { display: block; margin: 1px 0 0; font-size: 10.5px; }
}
@media print {
  .wr-wrap { overflow: visible !important; }
  .table.wr-grid { min-width: 0 !important; font-size: 8.5pt; }
  .wr-grid thead { display: table-header-group; }
  .wr-grid tr { page-break-inside: avoid; }
  .wr-grid td.out, .wr-grid th.out { background: #f2f2f2 !important; }
  .wr-grid td.hl, .wr-grid th.hl { background: #fff !important; color: #000 !important; }
}

/* === 인쇄는 제목과 일정표만: 부제(학교·출력일)·범례·형태 탭 숨김 === */
@media print {
  .print-header, .dept-legend, .form-tabs, .head-meta, .daily-head .muted { display: none !important; }
}

/* === 형태 탭은 조건(날짜·범위) 줄 오른쪽 옆에 === */
.control-bar .form-tabs { margin: 0 0 0 10px; flex-wrap: nowrap; }
.control-bar .form-tabs .form-hide { white-space: nowrap; }
@media (max-width: 768px) { .control-bar .form-tabs { margin: 4px 0 0; flex-wrap: wrap; } }
.control-bar .form-tabs input[type=checkbox] { min-height: 0; padding: 0; width: 14px; height: 14px; }
.control-bar .form-tabs .form-hide { font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; margin: 0 0 0 6px; }

/* 휴대폰: 가로 스크롤 상자 안에서는 머리글 고정이 표 중간에 떠서, 표를 화면 폭에 맞춘다 */
@media (max-width: 768px) {
  .wr-wrap { overflow: visible; }
  .table.wr-grid { min-width: 0; font-size: 10.5px; }
  .table.wr-grid th, .table.wr-grid td { padding: 2px; }
  .table.wr-grid thead th { font-size: 10px; white-space: normal; }
  .wr-grid .ev .t, .wr-grid .ev .c { font-size: 10.5px; }
}
.wr-grid td.wr-dept .nm { margin: 0; }
@media (max-width: 768px) { .wr-grid td.wr-dept .nm { margin: 0; font-size: 10.5px; } }

/* === 인라인 일정 추가·수정 === */
.ie-form { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; margin: 2px 0; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary-soft); text-align: left; }
.ie-form.new { border-style: dashed; }
.ie-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ie-field { display: inline-flex; align-items: center; gap: 6px; margin: 0; min-width: 0; font-size: 12px; color: var(--text-3); font-weight: 500; }
.ie-field.grow { flex: 1 1 280px; }
.ie-field.place { flex: 0 1 220px; }
.ie-field .ie-l { white-space: nowrap; min-width: 26px; }
.ie-field input, .ie-field select, .ie-field textarea { min-height: 30px; padding: 3px 8px; font-size: 13px; width: auto; min-width: 0; }
.ie-field.grow input, .ie-field.grow textarea, .ie-field.place input { flex: 1; width: 100%; }
.ie-field textarea { min-height: 44px; resize: vertical; }
.ie-field input[type=date] { width: 140px; }
.ie-field input[type=time] { width: 108px; }
.ie-pair { display: inline-flex; align-items: center; gap: 4px; }
.ie-tag { font-size: 11px; font-weight: 700; color: var(--primary); border: 1px solid var(--primary); border-radius: 10px; padding: 1px 8px; background: var(--bg-2); }
.ie-dept { font-size: 12px; font-weight: 600; color: var(--text); }
.ie-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ie-hint { margin-right: auto; font-size: 11px; }
.table tr.ie-tr > td { padding: 4px; background: var(--bg-2); }
.daily-item.ie-item { display: block; padding: 4px 0; }
tr.ie-editable { cursor: default; }
tr.ie-editable:hover > td { background: var(--primary-soft); }
.daily-item.ie-editable:hover { background: var(--primary-soft); }
.table tr.ie-add > td { padding: 4px 6px; background: var(--bg-2); }
.ie-add-btn { border: 1px dashed var(--primary); background: transparent; color: var(--primary); font-weight: 700; font-size: 12px; padding: 3px 12px; border-radius: 6px; cursor: pointer; min-height: 0; }
.ie-add-btn:hover { background: var(--primary-soft); }
.ie-add-hint { margin-left: 10px; font-size: 11px; }
/* 휴대폰: 입력 칸을 세로로 쌓는다 */
@media (max-width: 768px) {
  .ie-form { padding: 8px; }
  .ie-line { flex-direction: column; align-items: stretch; gap: 6px; }
  .ie-field { display: flex; width: 100%; }
  .ie-field .ie-l { min-width: 34px; }
  .ie-field input[type=date], .ie-field.grow, .ie-field.place { flex: 1; width: 100%; }
  .ie-field input[type=date] { flex: 1; }
  .ie-pair { flex: 1; }
  .ie-pair input[type=time], .ie-pair select { flex: 1; width: 0; }
  .ie-hint { display: none; }
  .ie-actions .btn { flex: 1; min-height: 36px; }
  .ie-add-hint { display: none; }
}
@media print { .ie-add, .ie-tr { display: none !important; } }

/* === 공휴일 이름 (학사일정의 '공휴일') === */
.hol { color: var(--sun); font-size: 10px; font-weight: 600; line-height: 1.2; }
.wr-grid thead th .hol { display: block; white-space: normal; margin-top: 1px; }
.weekly-grid .date-cell .hol { font-size: 9.5px; margin-top: 1px; word-break: keep-all; }
.cal td .d .hol { margin-left: 4px; font-size: 10px; }
.cal td.holi .d { color: var(--sun); }
.daily-hol { font-size: 13px; }
@media print { .hol { color: #c00 !important; } }

/* === 달력 칸 팝업 (그날 일정 전체) === */
.cal td.has-pop { cursor: pointer; }
.cal td.has-pop:hover { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-pop { position: fixed; z-index: 400; display: none; max-height: min(70vh, 520px); overflow-y: auto; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); padding: 8px 10px; font-size: 12.5px; line-height: 1.45; text-align: left; }
.cal-pop.show { display: block; }
.cal-pop-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.cal-pop-head b { font-size: 13.5px; }
.cal-pop-head b.sun { color: var(--sun); } .cal-pop-head b.sat { color: var(--sat); }
.cal-pop-head .hol { font-size: 12px; }
.cal-pop-head .muted { margin-left: auto; font-size: 11.5px; }
.cal-pop-item { padding: 5px 0; border-bottom: 1px dotted var(--line-2); }
.cal-pop-item:last-child { border-bottom: none; }
.cal-pop-top { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); }
.cal-pop-dept { font-weight: 600; }
.cal-pop-time { margin-left: auto; color: var(--text-3); white-space: nowrap; }
.cal-pop-title { margin-top: 2px; font-weight: 600; }
.cal-pop-content { color: var(--text-3); font-size: 11.5px; white-space: pre-wrap; margin-top: 1px; }
.cal-pop-empty { padding: 4px 0; }
@media print { .cal-pop { display: none !important; } .cal td.has-pop:hover { box-shadow: none; } }

/* === 부서 등록 표: 칸 여백 축소 === */
.table.dept-table th, .table.dept-table td { padding: 3px 6px; }
.table.dept-table th { padding-top: 5px; padding-bottom: 5px; }
.dept-table input, .dept-table select { min-height: 28px; padding: 2px 6px; }
.dept-table .actions { gap: 3px; }
.dept-table .btn.sm { padding-top: 2px; padding-bottom: 2px; min-height: 0; }

/* === 부서 등록: 작은 이동 화살표, 이니셜 칸 === */
.dept-table .mv-btn { border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text-2); font-size: 8px; line-height: 1; width: 18px; height: 18px; padding: 0; border-radius: 4px; cursor: pointer; min-height: 0; }
.dept-table .mv-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.dept-table .mv-btn:disabled { opacity: .3; cursor: default; }
.dept-table .dept-hdr-inp { width: 64px; min-width: 0; text-align: center; }

/* === 휴대폰: 부서 등록 입력칸 글자 축소 === */
@media (max-width: 768px) {
  .dept-table input, .dept-table select, .dept-table .dept-hdr-inp { font-size: 11.5px; min-height: 24px; padding: 1px 5px; }
  .dept-table .dept-name-cell input { min-width: 104px !important; }
  .dept-table .dept-hdr-inp { width: 52px; }
  .card .row input.dept-add-inp { font-size: 11.5px; min-height: 30px; padding: 4px 8px; }
  .dept-table input::placeholder, .card .row input.dept-add-inp::placeholder { font-size: 11px; }
}

/* === 부서 등록: 위쪽 블록·표 머리글 고정 === */
.dept-wrap { overflow: visible; }
@media (max-width: 768px) { .dept-wrap { overflow-x: auto; } }
#adminDeptSticky .card-head { margin-bottom: 8px; }

/* === 부서 등록(PC): 부서 이름 칸은 좁게, 교사 칸이 남는 폭을 모두 === */
@media (min-width: 769px) {
  .table.dept-table { table-layout: fixed; }
  .dept-table thead th:nth-child(1) { width: 78px; }
  .dept-table thead th:nth-child(2) { width: 200px; }
  .dept-table thead th:nth-child(3) { width: 74px; }
  .dept-table thead th:nth-child(4) { width: 90px; }
  .dept-table thead th:nth-child(6) { width: 108px; }
  .dept-table .dept-name-cell { display: flex; align-items: center; gap: 4px; }
  .dept-table .dept-name-cell input { flex: 1; width: 100%; min-width: 0 !important; }
  .dept-table td:nth-child(5) { min-width: 0 !important; white-space: normal; word-break: keep-all; line-height: 1.5; }
}

/* === 교사 등록: 한 줄 입력 === */
.user-add-row { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.user-add-row .ua-field { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 12px; color: var(--text-3); font-weight: 500; min-width: 0; }
.user-add-row .ua-l { white-space: nowrap; }
.user-add-row input, .user-add-row select { min-height: 32px; padding: 4px 8px; font-size: 13px; width: auto; }
.user-add-row .ua-name { width: 140px; }
.user-add-row .ua-email { width: 200px; }
.user-add-row .btn { white-space: nowrap; }
@media (max-width: 768px) {
  .user-add-row .ua-field { flex: 1 1 45%; }
  .user-add-row .ua-field input, .user-add-row .ua-field select { flex: 1; width: 100%; font-size: 12px; min-height: 30px; }
  .user-add-row .btn { flex: 1 1 100%; }
}
@media (min-width: 769px) {
  .user-add-row { flex-wrap: nowrap; gap: 8px; }
  .user-add-row .ua-field { gap: 4px; flex: 0 1 auto; }
  .user-add-row .ua-name { width: 110px; }
  .user-add-row .ua-email { width: 160px; }
  .user-add-row select { max-width: 150px; padding: 4px 6px; }
}
.user-add-row .ua-phone { width: 130px; }
@media (min-width: 769px) {
  .user-add-row .ua-name { width: 96px; }
  .user-add-row .ua-email { width: 150px; }
  .user-add-row .ua-phone { width: 118px; }
  .user-add-row select { max-width: 140px; }
}

/* === 교사 일괄 등록 창 === */
.modal.modal-wide { max-width: 920px; max-height: calc(100vh - 32px); overflow-y: auto; }
.bulk-guide { font-size: 12px; line-height: 1.6; margin-bottom: 8px; }
.bulk-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bulk-text { width: 100%; min-height: 140px; font-family: ui-monospace, Consolas, 'Malgun Gothic', monospace; font-size: 12px; tab-size: 12; white-space: pre; }
.bulk-result { margin-top: 8px; }
.bulk-sum { font-size: 13px; margin-bottom: 4px; }
.err-text { color: var(--sun); }
.bulk-scroll { max-height: 40vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.table.bulk-table { font-size: 12px; border: none; border-radius: 0; }
.table.bulk-table th, .table.bulk-table td { padding: 3px 6px; white-space: nowrap; }
.table.bulk-table tr.bad td { background: color-mix(in srgb, var(--sun) 8%, transparent); }
.table.bulk-table td.ok { color: var(--primary); font-weight: 600; }

/* 교사 명단: 비활성 계정은 흐리게 */
.table tr.user-inactive td { opacity: .5; }

/* === 교사 명단: PC 는 칸 따로, 휴대폰은 소속(부서·구분·권한)·연락처(이메일·휴대폰)를 한 칸으로 === */
.user-table .c-combo, .user-table .c-contact { display: none; }
.user-table .combo-sub { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; color: var(--text-2); }
@media (max-width: 768px) {
  .user-table .c-dept, .user-table .c-pos, .user-table .c-role, .user-table .c-email, .user-table .c-phone { display: none; }
  .user-table .c-combo, .user-table .c-contact { display: table-cell; }
  .user-table .c-contact { font-size: 11.5px; word-break: break-all; }
  .user-table .c-name { white-space: nowrap; }
}
@media (max-width: 768px) {
  .user-table .c-last { display: none; }
  .user-table .contact-last { font-size: 10.5px; margin-top: 2px; }
}
@media (max-width: 768px) {
  .user-table th, .user-table td { padding: 5px 4px; }
  .user-table .c-contact { min-width: 120px; word-break: normal; overflow-wrap: anywhere; }
  .user-table .c-act .actions { flex-direction: column; align-items: stretch; gap: 3px; }
  .user-table .c-act .btn.sm { font-size: 11px; padding: 2px 6px; min-height: 0; white-space: nowrap; }
  .user-table .c-combo .dept-name { white-space: nowrap; }
}
@media (max-width: 768px) {
  .user-table .c-contact { min-width: 96px; }
  .user-table .c-combo .dept-name { white-space: normal; }
  .user-table .c-act .btn.sm { padding: 2px 4px; letter-spacing: -.3px; }
}

/* === 교사 명단: 안내 한 줄, 표 맨 위 교사 추가 줄 === */
.user-guide { font-size: 12px; line-height: 1.6; margin: -4px 0 8px; }
.user-table tr.ie-add > td { padding: 4px 6px; background: var(--bg-2); }
/* 휴대폰: 관리 버튼 더 작게, 소속 칸의 구분·권한은 한 줄로 */
@media (max-width: 768px) {
  .user-table .c-act .actions { gap: 2px; }
  .user-table .c-act .btn.sm { font-size: 10px; padding: 1px 4px; line-height: 1.5; border-radius: 4px; }
  .user-table .combo-sub { flex-wrap: nowrap; white-space: nowrap; }
  .user-table .combo-sub .badge { font-size: 10px; padding: 0 5px; }
}

/* === 교사 명단: 관리 버튼 가로 폭 축소 === */
.user-table .c-act { width: 1%; white-space: nowrap; }
.user-table .c-act .actions { gap: 3px; flex-wrap: nowrap; }
.user-table .c-act .btn.sm { padding-left: 6px; padding-right: 6px; min-width: 0; }
@media (max-width: 768px) {
  .user-table .c-act .actions { flex-direction: column; align-items: flex-end; }
  .user-table .c-act .btn.sm { width: auto; padding: 1px 5px; }
}

/* 교사 명단 관리 버튼: PC 는 한 줄(수정·비번초기화·비활성·삭제), 휴대폰은 [수정 삭제] 한 줄 + 아래 나머지 */
.user-table .c-act .a-grp { display: contents; }
.user-table .c-act .a-edit { order: 1; } .user-table .c-act .a-reset { order: 2; }
.user-table .c-act .a-toggle { order: 3; } .user-table .c-act .a-del { order: 4; }
@media (max-width: 768px) {
  .user-table .c-act .actions { flex-direction: column; align-items: flex-end; gap: 3px; }
  .user-table .c-act .a-grp { display: flex; gap: 3px; justify-content: flex-end; }
  .user-table .c-act .a-more { flex-direction: column; align-items: flex-end; }
}

/* === 설정 > 일반: 공휴일 목록 === */
.hol-list { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.hol-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; background: var(--bg-2); }
.hol-chip b { color: var(--sun); font-weight: 600; }
.hol-del { border: none; background: transparent; color: var(--text-3); font-size: 13px; line-height: 1; padding: 0 4px; cursor: pointer; min-height: 0; }
.hol-del:hover { color: var(--sun); }

/* === 설정 > 공통일정 표 === */
.table.common-table th, .table.common-table td { padding: 4px 8px; vertical-align: middle; }
.common-table .c-no { width: 44px; text-align: center; color: var(--text-3); }
.common-table .c-date { white-space: nowrap; width: 1%; }
.common-table .c-note { color: var(--text-2); font-size: 12px; }
.common-table .c-act { width: 1%; white-space: nowrap; }
.common-table .c-act .actions { gap: 3px; flex-wrap: nowrap; }
.common-table thead th:first-child { text-align: center; }
.ct-tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--bg-2); white-space: nowrap; }
.ct-tag[data-type="공휴일"] { color: var(--sun); border-color: var(--sun); }
.ct-tag[data-type="재량휴업"] { color: #c2410c; border-color: #c2410c; }
.ct-tag[data-type="방학"] { color: var(--sat); border-color: var(--sat); }
.ct-tag[data-type="시험"] { color: #7c3aed; border-color: #7c3aed; }
@media (max-width: 768px) {
  .table.common-table th, .table.common-table td { padding: 4px 4px; font-size: 12px; }
  .common-table .c-no { width: 28px; }
  .common-table .c-act .actions { flex-direction: column; align-items: flex-end; gap: 2px; }
  .common-table .c-act .btn.sm { font-size: 10px; padding: 1px 5px; }
}
.common-table .c-note .muted { white-space: nowrap; }

/* === 공통일정 이름: 구분마다 색 (날짜를 빨갛게 칠하는 것은 공휴일만) === */
.hol-wrap .hol { display: inline !important; margin: 0 !important; }
.wr-grid thead th .hol-wrap, .weekly-grid .date-cell .hol-wrap { display: block; margin-top: 1px; white-space: normal; line-height: 1.2; }
.cal td .d .hol-wrap { margin-left: 4px; }
.daily-hol { margin-left: 4px; }
.hol[data-type="재량휴업"] { color: #c2410c; }
.hol[data-type="방학"] { color: var(--sat); }
.hol[data-type="개학"], .hol[data-type="종업"] { color: #0f766e; }
.hol[data-type="시험"] { color: #7c3aed; }
.hol[data-type="행사"] { color: var(--text-2); }
@media print {
  .hol[data-type="재량휴업"] { color: #c2410c !important; }
  .hol[data-type="방학"] { color: #1d4ed8 !important; }
  .hol[data-type="시험"] { color: #7c3aed !important; }
  .hol[data-type="개학"], .hol[data-type="종업"] { color: #0f766e !important; }
  .hol[data-type="행사"] { color: #444 !important; }
}
/* 휴대폰 공통일정: 수정·삭제 한 줄 */
@media (max-width: 768px) {
  .common-table .c-act .actions { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 3px; }
}

/* === 머릿글 색: 공휴일·재량휴업·그 밖의 공통일정이 있는 날의 날짜 칸 배경 === */
:root { --ct-hol: #fde2e2; --ct-disc: #ffe7d1; --ct-vac: #dbeafe; --ct-exam: #ede9fe; --ct-term: #d5f5ee; --ct-event: #e9edf2; }
.wr-grid thead th[data-ctype="공휴일"], .weekly-grid .date-cell[data-ctype="공휴일"], .cal td[data-ctype="공휴일"] .d { background: var(--ct-hol) !important; }
.wr-grid thead th[data-ctype="재량휴업"], .weekly-grid .date-cell[data-ctype="재량휴업"], .cal td[data-ctype="재량휴업"] .d { background: var(--ct-disc) !important; }
.wr-grid thead th[data-ctype="방학"], .weekly-grid .date-cell[data-ctype="방학"], .cal td[data-ctype="방학"] .d { background: var(--ct-vac) !important; }
.wr-grid thead th[data-ctype="시험"], .weekly-grid .date-cell[data-ctype="시험"], .cal td[data-ctype="시험"] .d { background: var(--ct-exam) !important; }
.wr-grid thead th[data-ctype="개학"], .wr-grid thead th[data-ctype="종업"], .weekly-grid .date-cell[data-ctype="개학"], .weekly-grid .date-cell[data-ctype="종업"],
.cal td[data-ctype="개학"] .d, .cal td[data-ctype="종업"] .d { background: var(--ct-term) !important; }
.wr-grid thead th[data-ctype="행사"], .weekly-grid .date-cell[data-ctype="행사"], .cal td[data-ctype="행사"] .d { background: var(--ct-event) !important; }
.cal td[data-ctype] .d { margin: -4px -4px 2px; padding: 2px 4px; border-radius: 2px; }
/* 어두운 테마(기본 어둡게·미드나잇 골드): 반투명 색으로 */
[data-theme="dark"], [data-theme="midnight"] {
  --ct-hol: rgba(239, 68, 68, .28); --ct-disc: rgba(234, 88, 12, .28); --ct-vac: rgba(59, 130, 246, .26);
  --ct-exam: rgba(139, 92, 246, .28); --ct-term: rgba(20, 184, 166, .26); --ct-event: rgba(148, 163, 184, .22);
}
@media print {
  .wr-grid thead th[data-ctype], .weekly-grid .date-cell[data-ctype], .cal td[data-ctype] .d { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* 휴대폰 공통일정: 수정·삭제 버튼 더 작게 */
@media (max-width: 768px) {
  .common-table .c-act .actions { gap: 2px; }
  .common-table .c-act .btn.sm { font-size: 9.5px; padding: 0 4px; line-height: 1.6; min-height: 0; border-radius: 4px; letter-spacing: -.2px; }
}

/* === 공통일정 구분 색: 설정의 구분 색(--ctc)으로 날짜 머릿글 배경 === */
.wr-grid thead th[data-ctype], .weekly-grid .date-cell[data-ctype], .cal td[data-ctype] .d { background: color-mix(in srgb, var(--ctc, #64748b) 17%, var(--panel)) !important; }
@media print {
  .wr-grid thead th[data-ctype], .weekly-grid .date-cell[data-ctype], .cal td[data-ctype] .d { background: color-mix(in srgb, var(--ctc, #64748b) 17%, #fff) !important; }
  .hol[style] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* 구분 관리 창 */
.ct-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; margin-bottom: 8px; }
.ct-row { display: flex; align-items: center; gap: 6px; }
.ct-row .mv-btn { border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text-2); font-size: 8px; line-height: 1; width: 18px; height: 18px; padding: 0; border-radius: 4px; cursor: pointer; min-height: 0; }
.ct-row .mv-btn:disabled { opacity: .3; cursor: default; }
.ct-color { width: 30px; height: 26px; padding: 0 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); cursor: pointer; flex-shrink: 0; min-height: 0; }
.ct-name { flex: 1; min-width: 0; min-height: 28px; padding: 2px 8px; font-size: 13px; font-weight: 600; }
.ct-name[readonly] { background: var(--bg-3); cursor: default; }
.ct-builtin { font-size: 11px; color: var(--text-3); width: 44px; text-align: center; flex-shrink: 0; }
.ct-row .btn.sm { width: 44px; flex-shrink: 0; padding-left: 0; padding-right: 0; }
.ct-new { padding-top: 8px; border-top: 1px dashed var(--line); }
.ct-new .ct-name { font-weight: 400; }
/* === 휴대폰: 부서 이니셜 글자 축소 === */
@media (max-width: 768px) {
  .dept-badge { min-width: 15px; height: 15px; padding: 0 2px; border-radius: 8px; font-size: 7.5px; letter-spacing: -.5px; }
  .dept-badge.sm { min-width: 13px; height: 13px; padding: 0 2px; border-radius: 7px; font-size: 6.5px; }
  .daily-dept-head .dept-badge { min-width: 16px; height: 16px; font-size: 7.5px; }
}

/* 휴대폰 하단 바: 6칸 (일정등록·일간·주간·월간·설정·더보기) */
@media (max-width: 768px) {
  .bottom-nav button { font-size: 10.5px; letter-spacing: -.4px; padding: 6px 0 5px; min-width: 0; }
  .bottom-nav button.active .bn-icon { padding: 2px 8px; }
}

/* === 설정 > 일반: 저장 위치 === */
.storage-body .row { margin-bottom: 6px; }
.storage-kind { margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--text-2); }
.storage-path { line-height: 1.6; word-break: keep-all; }
.storage-path a { font-size: 12px; margin-left: 4px; }
.storage-guide { font-size: 12px; line-height: 1.6; margin-top: 6px; }
.fp-tops { display: flex; gap: 6px; margin-bottom: 6px; }
.fp-crumb { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 6px; font-size: 12px; }
.fp-crumb-btn { border: none; background: none; color: var(--primary); cursor: pointer; padding: 0 2px; font-size: 12px; min-height: 0; }
.fp-crumb-btn + .fp-crumb-btn::before { content: '/ '; color: var(--text-3); }
.fp-list { max-height: 45vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.fp-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.fp-row:last-child { border-bottom: none; }
.fp-open { border: none; background: none; text-align: left; cursor: pointer; color: var(--text); font-size: 13px; flex: 1; min-height: 0; padding: 2px 0; }
/* === 카드 제목 줄 오른쪽 버튼: 휴대폰에서 작게 === */
@media (max-width: 768px) {
  .card-head { gap: 6px; }
  .card-head .head-actions { gap: 4px; }
  .card-head .head-actions .btn { font-size: 11px; padding: 3px 8px; min-height: 0; line-height: 1.5; }
}
@media (max-width: 768px) { .storage-body { font-size: 12.5px; } .storage-path { font-size: 12.5px; } }
/* 휴대폰 하단 바: 7칸 */
@media (max-width: 768px) {
  .bottom-nav button { font-size: 9.5px; letter-spacing: -.5px; gap: 1px; }
  .bottom-nav button .bn-icon svg { width: 20px; height: 20px; }
  .bottom-nav button.active .bn-icon { padding: 2px 6px; }
}
/* 휴대폰 연간일정: 날짜 아래 줄에 (요일) */
@media (max-width: 768px) { .doc-table .dwd { display: block; } }
/* 휴대폰 연간일정: 날짜 칸 넓게 (월·건수 칸은 좁게) */
@media (max-width: 768px) {
  #yrBox .doc-table col:nth-child(1) { width: 30px !important; }
  #yrBox .doc-table col:nth-child(2) { width: 58px !important; }
  #yrBox .doc-table col:nth-child(4) { width: 28px !important; }
}

/* === 여러 학교 방식: 첫 화면 === */
.landing-recent { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.landing-school { justify-content: flex-start; text-align: left; gap: 6px; }
.landing-school .muted { font-size: 11px; }
.landing-sep { margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); text-align: center; }
.linkbtn { border: none; background: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 2px 4px; min-height: 0; }
.landing-reg { margin-top: 6px; }
.landing-found { display: flex; flex-direction: column; gap: 4px; margin: -4px 0 10px; }
.landing-found:empty { display: none; }
.reg-check:empty { display: none; }
.neis-list { display: flex; flex-direction: column; gap: 3px; margin: -4px 0 8px; max-height: 260px; overflow-y: auto; }
.neis-list:empty { display: none; }
.neis-item { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; line-height: 1.45; }
.neis-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.neis-item .muted { font-size: 11.5px; }
.neis-note { font-size: 12px; color: var(--text-2); margin: -4px 0 6px; }
.neis-note:empty { display: none; }
.reg-find { display: flex; gap: 6px; align-items: stretch; }
.reg-find input { flex: 1; min-width: 0; }
.reg-find .btn { flex: 0 0 auto; min-width: 64px; }
.reg-hint { font-size: 12.5px; color: var(--primary); margin: 0 0 8px; line-height: 1.5; }
.reg-hint:empty { display: none; }
.reg-picked { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin: -4px 0 8px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary-soft); font-size: 13px; }
.reg-picked-loc { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.reg-picked .btn { flex: 0 0 auto; }
.landing-enter { margin-top: 4px; }
.landing-enter .reg-note, .landing-reg .reg-note { margin-bottom: 8px; }
.login-card .reg-find .btn, .login-card .reg-picked .btn, .login-card .reg-dupe .btn { width: auto; margin-top: 0; min-height: 0; font-size: 12.5px; }
.login-card .reg-find .btn { min-height: 36px; padding: 0 14px; }
.reg-picked-main { min-width: 0; flex: 1; }
.neis-link { display: flex; flex-direction: column; gap: 6px; }
.reg-check { margin: -2px 0 10px; }
.reg-dupe { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; font-size: 12.5px;
  background: color-mix(in srgb, var(--sun) 8%, transparent); border: 1px solid color-mix(in srgb, var(--sun) 40%, transparent); color: var(--text); }
.reg-note { padding: 7px 10px; border-radius: 8px; font-size: 12px; line-height: 1.5; background: var(--bg-3); color: var(--text-2); }
.reg-addr { font-size: 12px; color: var(--text-3); margin: -2px 0 10px; word-break: break-all; }
.reg-addr b { color: var(--text); font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
/* 저장 위치: 계정 바꾸기 진행 */
.switch-box { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--primary); border-radius: 10px; background: var(--primary-soft); }
.switch-head { font-size: 13px; }
.switch-bar { height: 8px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.switch-bar-in { height: 100%; background: var(--primary); transition: width .2s; }
.switch-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.switch-actions .muted { margin-right: auto; font-size: 12px; }

/* === 운영자 화면 (/operator) === */
.op-wrap { max-width: 1180px; margin: 0 auto; padding: 16px; }
.op-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.op-title { font-size: 18px; color: var(--text); }
.op-top-actions { display: flex; gap: 6px; }
.op-access { margin-left: 8px; font-size: 11.5px; color: #15803d; border: 1px solid #15803d; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.op-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.op-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.op-tile:hover { border-color: var(--primary); }
.op-tabs-wrap { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 6px 0 8px; margin-bottom: 4px; }
.op-tabs button { font-size: 13px; padding: 6px 14px; }
.op-tab-n { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--bg-3); color: var(--text-3); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.op-tab-n.warn { background: #c2410c; color: #fff; }
.op-tile-v { font-size: 22px; font-weight: 800; color: var(--text); }
.op-tile-l { font-size: 12px; color: var(--text-3); }
.op-tile.ok .op-tile-v { color: #15803d; } .op-tile.warn .op-tile-v { color: #c2410c; } .op-tile.bad .op-tile-v { color: var(--sun); }
input.op-search { min-height: 30px; padding: 3px 10px; font-size: 13px; width: 220px; }
.table.op-table { min-width: 760px; }
.table.op-table th { white-space: nowrap; }
.table.op-table th, .table.op-table td { padding: 6px 8px; font-size: 12.5px; vertical-align: middle; }
.op-email, .op-used { font-size: 12px; color: var(--text-2); word-break: break-all; }
.op-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--text-2); white-space: nowrap; }
.op-badge.ok { color: #15803d; border-color: #15803d; } .op-badge.warn { color: #c2410c; border-color: #c2410c; } .op-badge.bad { color: var(--sun); border-color: var(--sun); }
.op-reason { font-size: 11px; margin-top: 2px; }
tr.op-suspended td { background: color-mix(in srgb, var(--sun) 6%, transparent); }
tr.op-dim td { opacity: .6; }
.op-need { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 10px; }
.op-new { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.op-f { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--text-3); margin: 0; }
.op-f.grow { flex: 1 1 240px; }
.op-f input { min-height: 30px; padding: 3px 8px; font-size: 13px; }
.op-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .5px; }
.op-made { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border: 1px dashed var(--primary); border-radius: 8px; background: var(--primary-soft); font-size: 13px; }
.op-made .op-code { font-size: 16px; color: var(--primary); }
@media (max-width: 768px) {
  .op-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  input.op-search { width: 100%; }
}

/* === 체험판 · 정식 버전 === */
.trial-badge { align-self: center; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 10px; border: 1px solid #c2410c; color: #c2410c; background: color-mix(in srgb, #c2410c 8%, transparent); cursor: pointer; letter-spacing: 0; }
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, #c2410c 45%, transparent); border-radius: 10px; background: color-mix(in srgb, #c2410c 7%, var(--panel)); font-size: 13px; line-height: 1.6; color: var(--text); }
.trial-banner b { color: #c2410c; }
body.trial .export-btn, body.trial .btn.print { opacity: .5; }
.lic-step { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.lic-step-t { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.lic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin-bottom: 8px; }
.lic-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--text-3); margin: 0; }
.lic-grid label.wide { grid-column: 1 / -1; }
.lic-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lic-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lic-got { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--primary); border-radius: 8px; background: var(--primary-soft); font-size: 13px; }
.lic-got .lic-code { font-size: 17px; color: var(--primary); }
.lic-grid input, .lic-grid textarea { font-size: 13px; }
.lic-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 1px; text-transform: uppercase; }
.lic-status { font-size: 12.5px; padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; background: var(--bg-3); color: var(--text-2); }
.lic-status.pending { background: color-mix(in srgb, #c2410c 8%, transparent); color: #9a3412; }
.lic-status.approved { background: color-mix(in srgb, #15803d 9%, transparent); color: #166534; }
.lic-status.rejected { background: color-mix(in srgb, var(--sun) 8%, transparent); color: var(--sun); }
@media (max-width: 768px) { .lic-grid, .lic-grid.three { grid-template-columns: 1fr; } .op-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 체험판: 인쇄(Ctrl+P 포함) 대신 안내만 */
@media print {
  body.trial > * { display: none !important; }
  body.trial::before { content: '체험판에서는 인쇄할 수 없습니다. 정식 버전 인증 후 인쇄하세요.'; display: block; padding: 40px; font-size: 16px; }
}

/* === Google 계정 연결 전: 저장 안 됨 안내 === */
.unsaved-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--sun) 45%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--sun) 7%, var(--panel)); font-size: 13px; line-height: 1.6; color: var(--text); }
.unsaved-banner b { color: var(--sun); }
.connect-card { border-color: color-mix(in srgb, var(--sun) 45%, transparent); }
