@font-face {
  font-family: "Pretendard";
  /* 자주 쓰는 한글 2,350자와 영문·숫자만 담은 글꼴(543KB). 없는 글자는 아래 기본 글꼴로 표시된다. */
  src: url("../fonts/PretendardSubset.woff") format("woff");
  font-weight: 45 930;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #2563d9;
  --primary-hover: #1a4fb8;
  --primary-weak: #eef3fd;
  --navy: #12305f;
  --g95: #131416;
  --g90: #1e2124;
  --g70: #464c53;
  --g60: #58616a;
  --g50: #6d7882;
  --g40: #8a949e;
  --g30: #b1b8be;
  --g20: #cdd1d5;
  --g10: #e6e8ea;
  --g5: #f4f5f6;
  --g3: #f8f9fa;
  --present: #e5f3d7;
  --present-line: #b4d995;
  --present-ink: #2c5a12;
  --out: #fff0d4;
  --out-line: #f0b04a;
  --out-ink: #874d00;
  --danger: #d63d1e;
  --danger-weak: #fdefec;
  --merit: #2563d9;
  --sun: #d63d1e;
  --sat: #2563d9;
  --radius: 10px;
  --radius-s: 6px;
  font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--g90);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--g3); font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; -webkit-text-size-adjust: 100%; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--g50); }
.small { font-size: 14px; }
.xs { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 머리글 ── */
.util { background: var(--g95); color: #d5d9de; font-size: 13px; }
.util .wrap { display: flex; align-items: center; height: 36px; gap: 16px; }
.util .who { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.util a, .util button.linkish { color: #d5d9de; }
.util a:hover, .util button.linkish:hover { color: #fff; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; width: 100%; }
.masthead { background: #fff; }
.masthead .wrap { display: flex; align-items: center; gap: 18px; height: 76px; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--g90); }
.brand:hover { text-decoration: none; }
.brand img { height: 42px; width: auto; display: block; }
.brand .bar { width: 1px; height: 22px; background: var(--g20); }
.brand .name { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.masthead .clock { margin-left: auto; text-align: right; line-height: 1.25; }
.masthead .clock .t { font-size: 22px; font-weight: 700; letter-spacing: 0; }
.masthead .clock .d { font-size: 13px; color: var(--g50); }
.gnb { background: #fff; border-bottom: 1px solid var(--g20); border-top: 1px solid var(--g10); position: sticky; top: 0; z-index: 30; }
.gnb .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.gnb .wrap::-webkit-scrollbar { display: none; }
.gnb a { display: block; padding: 14px 14px 12px; font-size: 17px; font-weight: 600; color: var(--g70); border-bottom: 3px solid transparent; white-space: nowrap; }
.gnb a:hover { color: var(--g95); text-decoration: none; }
.gnb a.on { color: var(--primary); border-bottom-color: var(--primary); }
/* 폰 화면: 메뉴가 옆으로 잘리지 않게 3칸씩 줄을 나눠 모두 보이게 한다(여러 줄이 되므로 위에 고정하지 않음) */
@media (max-width: 760px) {
  .gnb { position: static; }
  .gnb .wrap.wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: visible; padding: 0 8px; }
  .gnb .wrap.wrap a { font-size: 15px; padding: 11px 2px 9px; text-align: center; border-bottom-width: 2px; }
}

/* ── 본문 ── */
main { flex: 1; }
.page-head { padding: 28px 0 20px; }
.crumb { font-size: 13px; color: var(--g50); margin-bottom: 6px; }
.crumb span + span::before { content: "›"; margin: 0 7px; color: var(--g30); }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.3; }
.page-head .lead { color: var(--g60); margin-top: 6px; }
.section { padding-bottom: 48px; }
.panel { background: #fff; border: 1px solid var(--g10); border-radius: var(--radius); padding: 24px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.panel-head .aside { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel h3 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 > .panel + .panel { margin-top: 0; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
footer { border-top: 1px solid var(--g10); background: #fff; color: var(--g50); font-size: 13px; }
footer .wrap { padding-top: 22px; padding-bottom: 28px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
footer img { height: 26px; opacity: .8; }

/* ── 버튼·입력 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: var(--radius-s); border: 1px solid var(--g30);
  background: #fff; color: var(--g90); font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--g5); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.dark { background: var(--g90); border-color: var(--g90); color: #fff; }
.btn.danger { color: var(--danger); border-color: #efb4a7; }
.btn.danger:hover { background: var(--danger-weak); }
.btn.s { height: 34px; padding: 0 12px; font-size: 14px; }
.btn.l { height: 52px; font-size: 17px; }
.btn.full { width: 100%; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; color: var(--primary); }
.field { display: block; margin-bottom: 18px; }
.field > .lab { display: block; font-size: 15px; font-weight: 600; margin-bottom: 7px; color: var(--g80, #33363d); }
.field > .lab em { font-style: normal; font-weight: 400; color: var(--g50); font-size: 14px; margin-left: 4px; }
.field .help { font-size: 14px; color: var(--g50); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; border: 1px solid var(--g30); border-radius: var(--radius-s); padding: 0 14px;
  background: #fff; font-size: 16px; color: var(--g90);
}
textarea.input { height: auto; padding: 12px 14px; line-height: 1.6; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 217, .15); }
.input.s { height: 38px; font-size: 15px; padding: 0 10px; }
.input.w-auto { width: auto; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1 1 0; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--g30); border-radius: var(--radius-s); overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; height: 40px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--g70); cursor: pointer; border-left: 1px solid var(--g20); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--g90); color: #fff; }
.opt-group { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { border: 1px solid var(--g30); background: #fff; border-radius: var(--radius-s); height: 44px; padding: 0 14px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--g70); }
.opt small { font-weight: 400; color: var(--g50); margin-left: 4px; }
.opt.on { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.opt.on small { color: var(--primary); }

/* ── 알림 상자 ── */
.box { border-radius: var(--radius-s); padding: 14px 16px; font-size: 15px; line-height: 1.55; }
.box.info { background: var(--g5); color: var(--g70); }
.box.notice { background: var(--primary-weak); color: #1d3f86; }
.box.warn { background: #fff6e5; color: #6e4300; border: 1px solid #f6d79d; }
.box.error { background: var(--danger-weak); color: #a32a12; }
.box b { font-weight: 700; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 13px; font-weight: 600; background: var(--g5); color: var(--g70); white-space: nowrap; }
.tag.out { background: var(--out); color: var(--out-ink); }
.tag.ok { background: var(--present); color: var(--present-ink); }
.tag.blue { background: var(--primary-weak); color: var(--primary); }
.tag.red { background: var(--danger-weak); color: var(--danger); }
.tag.line { background: #fff; border: 1px solid var(--g20); }

/* ── 표 ── */
.tbl-wrap { border-top: 2px solid var(--g90); overflow: auto; max-height: 560px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { background: var(--g5); font-weight: 600; color: var(--g70); text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--g20); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--g10); vertical-align: middle; }
.tbl tr.err td { background: #fff7f5; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--g3); }
.tbl .r { text-align: right; }
.tbl .empty { text-align: center; color: var(--g50); padding: 36px 12px; }

/* ── 토스트·모달 ── */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 460px; }
#toast .t { background: var(--g90); color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 15px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
#toast .t.err { background: #a32a12; }
.modal-back { position: fixed; inset: 0; background: rgba(19, 20, 22, .5); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; }
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; border-bottom: 1px solid var(--g10); }
.modal-h h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 18px 24px 24px; }

/* ── 로그인 ── */
body.auth { background: var(--g5); }
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { background: #fff; border: 1px solid var(--g10); border-radius: 14px; width: 100%; max-width: 440px; padding: 40px 36px 32px; }
.auth-card .logo { display: block; height: 52px; margin: 0 auto 26px; }
.auth-card h1 { font-size: 24px; font-weight: 700; text-align: center; letter-spacing: -0.035em; }
.auth-card .sub { text-align: center; color: var(--g50); margin: 6px 0 26px; font-size: 15px; }
.auth-card .foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--g10); text-align: center; font-size: 15px; color: var(--g60); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--g20); border-radius: var(--radius-s); overflow: hidden; margin-bottom: 26px; }
.auth-tabs a { text-align: center; padding: 11px 0; font-weight: 600; color: var(--g60); font-size: 15px; }
.auth-tabs a:hover { text-decoration: none; background: var(--g3); }
.auth-tabs a.on { background: var(--g90); color: #fff; }
.auth-note { font-size: 14px; color: var(--g50); line-height: 1.6; margin-top: 16px; }
@media (max-width: 480px) { .auth-card { padding: 32px 22px 26px; border: 0; border-radius: 0; } .auth-wrap { padding: 0; align-items: stretch; } body.auth { background: #fff; } }

/* ── 학생 홈 ── */
.today { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 760px) { .today { grid-template-columns: 1fr; } }
.clock-panel .date { color: var(--g60); font-size: 15px; }
.clock-panel .time { font-size: 52px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 10px; }
.clock-panel .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--g10); border-radius: var(--radius); overflow: hidden; background: #fff; }
.kv > div { padding: 18px 20px; }
.kv > div + div { border-left: 1px solid var(--g10); }
.kv .k { font-size: 14px; color: var(--g50); font-weight: 600; }
.kv .v { font-size: 20px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; word-break: keep-all; }
.kv .v.none { color: var(--g40); font-weight: 500; font-size: 16px; }
.kv.wide { grid-template-columns: 1fr; }
.dday-line { display: flex; align-items: baseline; gap: 12px; }
.dday-line .n { font-size: 34px; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }
.status { border: 1px solid var(--g10); border-left: 5px solid var(--g30); border-radius: var(--radius-s); padding: 14px 16px; background: #fff; }
.status .s1 { font-weight: 700; font-size: 17px; }
.status .s2 { font-size: 14px; color: var(--g60); margin-top: 2px; }
.status.present { border-left-color: #7cbf4f; background: var(--present); border-color: var(--present-line); }
.status.present .s1 { color: var(--present-ink); }
.status.out { border-left-color: var(--out-line); background: var(--out); border-color: #f4cf8f; }
.status.out .s1 { color: var(--out-ink); }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--g10); border-radius: var(--radius); overflow: hidden; }
.stat3 > div { padding: 16px 12px; text-align: center; }
.stat3 > div + div { border-left: 1px solid var(--g10); }
.stat3 .k { font-size: 14px; color: var(--g50); }
.stat3 .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stat3 .v.m { color: var(--merit); }
.stat3 .v.d { color: var(--danger); }
.list-item { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--g10); }
.list-item:last-child { border-bottom: 0; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .t1 { font-weight: 700; }
.list-item .t2 { font-size: 14px; color: var(--g60); }
.list-item .amt { font-weight: 700; white-space: nowrap; }
.list-item .amt.m { color: var(--merit); }
.list-item .amt.d { color: var(--danger); }
.empty-text { color: var(--g50); font-size: 15px; padding: 18px 0; }

/* ── 달력 ── */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-head .title { font-size: 20px; font-weight: 700; margin: 0 6px; min-width: 120px; text-align: center; letter-spacing: -0.02em; }
.cal-head .icon { width: 36px; height: 36px; padding: 0; font-size: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 2px solid var(--g90); }
.cal .wd { text-align: center; font-size: 14px; font-weight: 600; padding: 8px 0; color: var(--g60); border-bottom: 1px solid var(--g20); background: var(--g5); }
.cal .wd.sun { color: var(--sun); }
.cal .wd.sat { color: var(--sat); }
.cal .day { min-height: 104px; border-bottom: 1px solid var(--g10); border-right: 1px solid var(--g10); padding: 6px 7px; cursor: pointer; background: #fff; text-align: left; font-size: 13px; line-height: 1.4; display: flex; flex-direction: column; gap: 2px; border-top: 0; border-left: 0; }
.cal .day:nth-child(7n + 7) { border-right: 0; }
.cal .day:hover { background: var(--g3); }
.cal .day .dn { font-size: 14px; font-weight: 600; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal .day.sun .dn { color: var(--sun); }
.cal .day.sat .dn { color: var(--sat); }
.cal .day.other { background: var(--g3); }
.cal .day.other .dn { color: var(--g30); }
.cal .day.today .dn { background: var(--primary); color: #fff; }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--g90); }
.cal .day .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--g70); }
.cal .day .ln b { font-weight: 600; color: var(--g50); margin-right: 3px; }
.cal .day .ln.note { color: var(--navy); font-weight: 600; }
.cal .day .dots { display: none; gap: 3px; margin-top: 2px; }
.cal .day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--g40); display: block; }
.cal .day .dots i.note { background: var(--navy); }
@media (max-width: 760px) {
  .cal .day { min-height: 54px; align-items: center; padding: 5px 2px; }
  .cal .day .ln { display: none; }
  .cal .day .dots { display: flex; }
}
.day-detail { margin-top: 16px; }
/* 외박: 보라색 계열로 외출(주황)과 구분 */
.cell.stay { background: #f3e8ff; border-color: #c4b5fd; }
.cell.stay .st { color: #5b21b6; }
.legend .l5 { background: #f3e8ff; border-color: #c4b5fd; }
.status.stay { border-left-color: #8b5cf6; background: #f3e8ff; border-color: #c4b5fd; }
.status.stay .s1 { color: #5b21b6; }
.tag.stay { background: #ede9fe; color: #5b21b6; }
.stat-cal .day .cnt.stay { color: #6d28d9; }
.stat-cal .day .cnt { font-size: 15px; font-weight: 700; color: var(--out-ink); }
.stat-cal .day .cnt.zero { color: var(--g30); font-weight: 500; font-size: 13px; }
@media (max-width: 760px) { .stat-cal .day .cnt { font-size: 13px; } }

/* ── 관리자 현황판 ── */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--g10); border-radius: var(--radius); background: #fff; overflow: hidden; margin-bottom: 16px; }
.summary > div { padding: 16px 20px; }
.summary > div + div { border-left: 1px solid var(--g10); }
.summary .k { font-size: 14px; color: var(--g50); font-weight: 600; }
.summary .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.summary .v small { font-size: 15px; font-weight: 500; color: var(--g50); margin-left: 4px; }
.summary .v.out { color: var(--out-ink); }
.summary .v.ok { color: var(--present-ink); }
@media (max-width: 760px) { .summary { grid-template-columns: 1fr 1fr; } .summary > div:nth-child(3) { border-left: 0; } .summary > div:nth-child(n + 3) { border-top: 1px solid var(--g10); } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input { width: 200px; height: 40px; }
.legend { display: flex; gap: 14px; font-size: 14px; color: var(--g60); margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1100px) { .legend { flex-basis: 100%; } }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; border: 1px solid; }
.legend .l1 { background: var(--present); border-color: var(--present-line); }
.legend .l2 { background: var(--out); border-color: var(--out-line); }
.legend .l3 { background: #fff; border-color: var(--g20); }
.legend .l4 { background: #fff8ec; border-color: var(--out-line); border-style: dashed; }
.group-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--g20); }
.group-title:first-child { margin-top: 0; }
.group-title h3 { font-size: 18px; font-weight: 700; margin: 0; }
.group-title span { color: var(--g50); font-size: 14px; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.cell { position: relative; text-align: left; border: 1px solid var(--g20); background: #fff; border-radius: 8px; padding: 10px 11px; min-height: 92px; cursor: pointer; display: flex; flex-direction: column; }
.cell:hover { border-color: var(--g40); }
.cell .nm { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.cell .no { font-size: 12px; color: var(--g50); }
.cell .st { margin-top: auto; font-size: 13px; line-height: 1.4; padding-top: 6px; }
.cell .st b { display: block; font-size: 14px; }
.cell .pen { position: absolute; top: 9px; right: 9px; font-size: 12px; font-weight: 700; color: var(--danger); }
.cell.present { background: var(--present); border-color: var(--present-line); }
.cell.out { background: var(--out); border-color: var(--out-line); }
.cell.out .st { color: var(--out-ink); }
.cell.plan { background: #fff8ec; border: 1px dashed var(--out-line); }
.cell.plan .soon { color: var(--out-ink); }
.cell .soon { color: var(--g60); }
.duty-strip { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--g10); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 16px; font-size: 15px; }
.duty-strip .k { color: var(--g50); font-weight: 600; margin-right: 8px; }
.duty-strip .v { font-weight: 700; }

.dropzone { border: 1px dashed var(--g30); border-radius: var(--radius); padding: 28px 16px; text-align: center; background: var(--g3); cursor: pointer; color: var(--g60); }
.dropzone b { color: var(--g90); display: block; margin-bottom: 4px; }
.dropzone.drag { border-color: var(--primary); background: var(--primary-weak); }
.pick { max-height: 300px; overflow: auto; border: 1px solid var(--g20); border-radius: var(--radius-s); }
.pick label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--g10); cursor: pointer; font-size: 15px; }
.pick label:last-child { border-bottom: 0; }
.pick label:hover { background: var(--g3); }
.pick input { width: 18px; height: 18px; accent-color: var(--primary); }
.pick .tag { margin-left: auto; }

/* 스톱워치 */
.sw { text-align: center; padding: 18px 0 6px; }
.sw .disp { font-size: 64px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.sw .disp .cs { font-size: 32px; color: var(--g40); font-weight: 600; }
.sw-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 22px; }
.laps { margin-top: 18px; border-top: 1px solid var(--g20); }
.laps .lap { display: grid; grid-template-columns: 70px 1fr 1fr; padding: 10px 4px; border-bottom: 1px solid var(--g10); font-size: 15px; }
.laps .lap span:nth-child(2) { color: var(--g50); text-align: right; }
.laps .lap span:nth-child(3) { font-weight: 700; text-align: right; }

/* 모바일 */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .util .site { display: none; }
  .masthead .wrap { height: 60px; gap: 12px; }
  .brand img { height: 30px; }
  .brand .bar { display: none; }
  .brand .name { font-size: 17px; }
  .masthead .clock .t { font-size: 17px; }
  .masthead .clock .d { display: none; }
  .gnb a { font-size: 15px; padding: 12px 10px 10px; }
  .page-head { padding: 20px 0 14px; }
  .page-head h1 { font-size: 23px; }
  .panel { padding: 18px 16px; }
  .clock-panel .time { font-size: 44px; }
  .sw .disp { font-size: 52px; }
  .toolbar .input { width: 100%; }
  .legend { margin-left: 0; }
}

/* 인쇄 */
.print-only { display: none; }
@media print {
  body.print-mode > *:not(#printArea) { display: none !important; }
  body.print-mode #printArea { display: block !important; }
}
.slips { display: grid; grid-template-columns: repeat(3, 1fr); }
.slip { border: 1px dashed #999; padding: 12px; font-size: 13px; break-inside: avoid; line-height: 1.5; }
.slip b { font-size: 16px; }
.qr-box svg { width: 280px; height: 280px; display: block; margin: 0 auto; }

/* ── 외출 신청·승인 ── */
.tag.wait { background: #ede9fe; color: #5b21b6; }
.tag.place-in { background: #e0f2fe; color: #075985; }
.tag.place-out { background: #fce7f3; color: #9d174d; }
.pending-panel { border: 2px solid #7c3aed; background: #faf5ff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.pending-panel .panel-head h2 { color: #5b21b6; }
.pending-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #e9d5ff; flex-wrap: wrap; }
.pending-row:last-child { border-bottom: 0; }
.pending-row .who { min-width: 150px; }
.pending-row .who b { font-size: 17px; }
.pending-row .what { flex: 1; min-width: 220px; font-size: 15px; }
.pending-row .acts { display: flex; gap: 6px; }
.btn.approve { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn.approve:hover { background: #15803d; }
.cell .req { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; color: #fff; background: #7c3aed; border-radius: 4px; padding: 1px 6px; }
.cell.has-req { box-shadow: 0 0 0 2px #7c3aed inset; }
.gnb a .badge-n { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; background: #7c3aed; color: #fff; font-size: 12px; text-align: center; padding: 0 6px; margin-left: 4px; vertical-align: 2px; }
.seg.big button { height: 48px; font-size: 16px; padding: 0 22px; }

/* ── 식단 카드 ── */
.meals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--g10); border-radius: var(--radius); overflow: hidden; background: #fff; }
.meals > div { padding: 16px 18px; }
.meals > div + div { border-left: 1px solid var(--g10); }
.meals .k { font-size: 14px; color: var(--g50); font-weight: 600; }
.meals .k small { font-weight: 400; margin-left: 4px; }
.meals .v { font-size: 17px; font-weight: 700; margin-top: 4px; word-break: keep-all; line-height: 1.45; }
.meals .v.none { color: var(--g40); font-weight: 500; font-size: 15px; }
@media (max-width: 760px) { .meals { grid-template-columns: 1fr; } .meals > div + div { border-left: 0; border-top: 1px solid var(--g10); } }

/* ── 공지사항 ── */
.notice-item { border-bottom: 1px solid var(--g10); }
.notice-item:last-child { border-bottom: 0; }
.notice-item > button { width: 100%; text-align: left; background: none; border: 0; padding: 14px 4px; cursor: pointer; display: flex; gap: 10px; align-items: center; font-size: 16px; }
.notice-item > button:hover { background: var(--g3); }
.notice-item .ttl { flex: 1; font-weight: 600; min-width: 0; }
.notice-item .dt { font-size: 13px; color: var(--g50); white-space: nowrap; }
.notice-item .body { padding: 4px 4px 18px; white-space: pre-wrap; line-height: 1.7; font-size: 15px; color: var(--g70); }
.file-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--g20); border-radius: var(--radius-s); margin-top: 8px; color: var(--g90); font-size: 15px; background: #fff; }
.file-link:hover { text-decoration: none; border-color: var(--primary); }
.file-link .ext { font-size: 11px; font-weight: 800; color: #fff; background: #dc2626; border-radius: 3px; padding: 1px 5px; }
.file-link .sz { margin-left: auto; font-size: 13px; color: var(--g50); }
.pin { color: var(--danger); font-weight: 700; font-size: 13px; }
