:root {
  --primary: #2f5d50;
  --primary-ink: #fff;
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #1d2320;
  --muted: #6b726e;
  --line: #e4e2db;
  --soft: #eef2ef;
  --danger: #b4412f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55; font-size: 15px;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* 상단 바 */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .in { max-width: 1100px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { height: 34px; width: auto; border-radius: 6px; }
.brand .name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.who { color: var(--muted); font-size: 14px; white-space: nowrap; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 22px 18px 60px; }
h1 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 4px; }
h2 { font-size: 19px; letter-spacing: -.02em; margin: 0; }
.sub { color: var(--muted); margin: 0 0 18px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #cfccc3; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

/* 입력 */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=date], input[type=time], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* 카드 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 30px 26px; }
.login .logo { text-align: center; margin-bottom: 8px; }
.login .logo img { max-height: 64px; max-width: 200px; }
.login h1 { text-align: center; }
.login .sub { text-align: center; }
.msg { font-size: 14px; margin-top: 10px; min-height: 20px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--primary); }

/* 공지 */
.notice { background: color-mix(in srgb, var(--primary) 9%, #fff); border: 1px solid color-mix(in srgb, var(--primary) 25%, #fff);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; white-space: pre-wrap; }

/* 반 탭 */
.tabs-wrap { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.tabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #cfccc3 transparent; }
.tabs::-webkit-scrollbar { height: 6px; }
.tabs::-webkit-scrollbar-thumb { background: #cfccc3; border-radius: 3px; }
.tab-arrow { flex: none; width: 30px; height: 30px; margin-bottom: 8px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 12px; color: var(--muted); display: grid; place-items: center; }
.tab-arrow:hover { color: var(--ink); border-color: #cfccc3; }
.tab { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
@media (hover: none) { .tab-arrow { display: none; } .tabs { scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab .cnt { font-weight: 600; opacity: .6; margin-left: 4px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 260px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }

/* 영상 카드 목록 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.vcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 85%, #000), color-mix(in srgb, var(--primary) 55%, #fff));
  display: grid; place-items: center; position: relative; color: #fff; }
.thumb .play { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.thumb .play::after { content: ""; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.badge { position: absolute; top: 10px; left: 10px; background: #e8553f; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.badge.done { left: auto; right: 10px; background: rgba(0,0,0,.55); }
.vcard .bar { height: 4px; background: rgba(0,0,0,.08); }
.vcard .bar > i { display: block; height: 100%; background: var(--primary); }
.vcard .meta { padding: 12px 14px 14px; }
.vcard .t { font-weight: 700; letter-spacing: -.01em; line-height: 1.4; }
.vcard .g { font-size: 12.5px; color: var(--primary); font-weight: 700; margin-bottom: 2px; }
.vcard .d { font-size: 13px; color: var(--muted); margin-top: 4px; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }

/* 시청 페이지 */
.player { background: #000; border-radius: var(--radius); overflow: hidden; }
.player video { width: 100%; display: block; max-height: 75vh; background: #000; }
.watch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 16px 0 6px; }
.desc { white-space: pre-wrap; color: #3b423e; }
.resume { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--soft); border-radius: 10px; padding: 10px 14px; margin-top: 12px; font-size: 14px; }
.list { margin-top: 26px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit; }
.row:hover { background: var(--soft); }
.row.on { background: color-mix(in srgb, var(--primary) 10%, #fff); }
.row .mini { width: 40px; height: 40px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; }
.row .x { min-width: 0; flex: 1; }
.row .x .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .x .d { font-size: 12.5px; color: var(--muted); }

/* 관리자 */
.adm-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.adm-nav button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.adm-nav button.on { color: var(--ink); border-bottom-color: var(--primary); }
.split { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.side { padding: 8px; }
.side .it { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; }
.side .it:hover { background: var(--soft); }
.side .it.on { background: var(--ink); color: #fff; }
.side .it small { opacity: .6; font-weight: 600; }
.sec-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.drop.over { border-color: var(--primary); background: var(--soft); color: var(--ink); }
.uploads { margin-top: 10px; display: grid; gap: 8px; }
.up { font-size: 13px; }
.up .pb { height: 6px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.up .pb i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { font-size: 12.5px; color: var(--muted); font-weight: 700; background: #faf9f6; position: sticky; top: 0; }
.scroll { overflow: auto; max-height: 70vh; }
.chip { display: inline-block; background: var(--soft); color: var(--ink); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; margin: 2px 3px 2px 0; }
.chip.off { background: #f1e3e0; color: var(--danger); }
.vitem { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.vitem + .vitem { margin-top: 10px; }
.vitem .top { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.vitem .file { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.vitem.is-hidden { opacity: .6; }
.cell { text-align: center !important; font-weight: 700; font-size: 13px; }
.cell.c0 { color: #b9b6ad; }
.cell.c1 { background: #fbf1d9; }
.cell.c2 { background: color-mix(in srgb, var(--primary) 18%, #fff); color: var(--primary); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.swatch { width: 44px; height: 40px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.logo-prev { max-height: 60px; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
.cls-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 99; box-shadow: var(--shadow); }
footer.ft { text-align: center; color: var(--muted); font-size: 12.5px; padding: 30px 0 10px; }

/* 소셜 로그인 */
.social { display: grid; gap: 8px; margin-bottom: 16px; }
.sbtn { display: block; text-align: center; padding: 12px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.sbtn.kakao { background: #FEE500; color: #191919; }
.sbtn.naver { background: #03C75A; color: #fff; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lbl { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.nbadge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e8553f; color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 4px; }
.pcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.pcard + .pcard { margin-top: 10px; }
.pcard .kv { display: grid; grid-template-columns: 92px 1fr; gap: 4px 10px; font-size: 14px; }
.pcard .kv b { color: var(--muted); font-weight: 700; font-size: 13px; }
.warn { background: #fbf1d9; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.policy { white-space: pre-wrap; line-height: 1.7; }
.subs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sub-chip { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.sub-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.docs { padding: 6px 8px; margin-bottom: 16px; }
.docs-head { font-weight: 800; padding: 10px 10px 6px; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; }
.doc-row + .doc-row { border-top: 1px solid var(--line); }
.doc-row .ext { flex: none; width: 44px; height: 44px; border-radius: 9px; background: var(--soft); color: var(--primary); font-weight: 800; font-size: 11.5px; display: grid; place-items: center; }
.doc-row .x { flex: 1; min-width: 0; }
.doc-row .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row .d { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-s { background: #e8553f; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; vertical-align: 2px; }

/* 게시판 */
.board { overflow: hidden; }
.post-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: var(--soft); }
.post-row.pinned { background: color-mix(in srgb, var(--primary) 5%, #fff); }
.post-row .x { flex: 1; min-width: 0; }
.post-row .t { font-weight: 700; font-size: 15.5px; line-height: 1.45; }
.post-row .d { font-size: 13px; color: var(--muted); margin-top: 3px; }
.post-row .st { flex: none; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 4px 10px; border-radius: 999px; }
.post-row .st.done { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, #fff); }
.pin { display: inline-block; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 5px; margin-right: 6px; vertical-align: 2px; }
.cls { display: inline-block; color: var(--primary); font-size: 12.5px; font-weight: 800; margin-right: 6px; }
.board .empty { padding: 40px 10px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
a.file-row:hover { background: var(--soft); }
.file-row .ico { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--soft); color: var(--primary); font-weight: 800; font-size: 11.5px; display: grid; place-items: center; }
.file-row .ico.vid { background: var(--primary); color: #fff; font-size: 15px; }
.file-row .x { flex: 1; min-width: 0; }
.file-row .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .d { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar { height: 4px; background: var(--soft); border-radius: 3px; overflow: hidden; margin-top: 6px; max-width: 220px; }
.pbar i { display: block; height: 100%; background: var(--primary); }
.post-head { margin-bottom: 18px; }
.post-body { white-space: pre-wrap; line-height: 1.75; font-size: 15.5px; margin-bottom: 22px; }
.sec-h { font-size: 15px; font-weight: 800; margin: 0 0 8px; }
.boards { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 16px; max-width: 520px; }
.board-tab { border: 0; background: none; padding: 10px 6px; white-space: nowrap; border-radius: 9px; font-weight: 800; font-size: 14.5px; cursor: pointer; color: var(--muted); }
.board-tab.on { background: var(--primary); color: #fff; }
.board-tab .cnt { font-weight: 700; opacity: .75; margin-left: 2px; }

/* ───────── 앱(PWA) 설치 안내 ───────── */
.install-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 900;
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: 10px 10px 10px 12px; max-width: 520px; margin: 0 auto; }
.install-bar img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.install-bar span { flex: 1; font-size: 14px; line-height: 1.4; }
.install-bar .ib-ok { background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 10px; padding: 8px 14px; font-size: 14px; cursor: pointer; flex: none; }
.install-bar .ib-x { background: none; border: 0; color: var(--muted); font-size: 16px; padding: 6px; cursor: pointer; flex: none; }
/* 앱으로 열었을 때 아이폰 노치·홈 바 영역 피하기 */
@media (display-mode: standalone) { body { padding-bottom: env(safe-area-inset-bottom); } }

/* ── 학원 폰트: 제목·메뉴는 카페24 써라운드, 본문은 읽기 편한 기본 글꼴 ── */
@font-face {
  font-family: "Cafe24 Ssurround";
  src: url("/fonts/Cafe24Ssurround.woff2") format("woff2");
  font-weight: normal; font-style: normal; font-display: swap;
}
:root { --display: "Cafe24 Ssurround", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
h1, h2, .sec-h, .brand .name, .tab, .board-tab, .adm-nav button, .login h1, .docs-head, .notice-title {
  font-family: var(--display); font-weight: normal; letter-spacing: 0;
}
h1 { font-size: 25px; }
.brand .name { font-size: 18px; }
.tab, .board-tab { font-size: 14px; }
.adm-nav button { font-size: 15px; }
@media (max-width: 560px) { h1 { font-size: 21px; } .brand .name { font-size: 16.5px; } }
/* 제목이 길어도 잘리지 않고 줄바꿈 (NEW 표시가 가려지지 않게) */
.file-row .t { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }

/* ── 공지 게시판 ── */
.notice-row { border-bottom: 1px solid var(--line); }
.notice-row:last-child { border-bottom: 0; }
.notice-row.pinned { background: color-mix(in srgb, var(--primary) 5%, #fff); }
.notice-row summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.notice-row summary::-webkit-details-marker { display: none; }
.notice-row summary:hover { background: var(--soft); }
.notice-row .x { flex: 1; min-width: 0; }
.notice-row .t { font-weight: 700; font-size: 15.5px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.notice-row .d { font-size: 13px; color: var(--muted); margin-top: 3px; }
.notice-row .chev { flex: none; color: var(--muted); font-size: 20px; transition: transform .15s; }
.notice-row[open] .chev { transform: rotate(90deg); }
.notice-row .nb { padding: 2px 18px 18px; white-space: pre-wrap; line-height: 1.7; font-size: 15px; overflow-wrap: anywhere; }
.dot-new { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; vertical-align: 2px; }
.nitem { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.nitem .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.nitem .body { white-space: pre-wrap; font-size: 14px; color: var(--ink); margin-top: 6px; line-height: 1.6; overflow-wrap: anywhere; }

@media (max-width: 460px) { .board-tab { font-size: 12.5px; padding: 9px 3px; } .board-tab .lb { display: none; } }

/* ── 휴대폰 알림 안내 띠 ── */
.push-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 14.5px; line-height: 1.5; }
.push-bar .hint { display: block; margin-top: 4px; }

/* ── 클리닉 달력 ── */
.boards { grid-template-columns: .8fr 1fr 1fr 1fr; max-width: 640px; }
.cal { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.cal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 16px; }
.cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-g .wd { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.cal-g .wd.sun { color: #d9534f; } .cal-g .wd.sat { color: #3b6fd4; }
.cd { border: 1px solid transparent; background: none; border-radius: 9px; min-height: 58px; padding: 5px 3px; display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; color: var(--ink); }
.cd.empty { visibility: hidden; }
.cd:disabled { color: #b5b5b5; cursor: default; }
.cd.has { cursor: pointer; background: var(--soft); }
.cd.has:hover { border-color: var(--line); }
.cd.today .n { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 7px; }
.cd.sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, #fff); }
.cd .n { font-weight: 700; font-size: 14px; }
.cm { font-size: 10.5px; font-weight: 800; padding: 1px 5px; border-radius: 5px; white-space: nowrap; }
.cm.open { color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, #fff); }
.cm.mine { color: #fff; background: var(--primary); }
.cm.off { color: var(--muted); background: #eee; }
.cal-day .dh { padding: 14px 18px 4px; font-weight: 800; font-size: 15px; }
.slot-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.slot-row:last-child { border-bottom: 0; }
.slot-row .x { flex: 1; min-width: 0; }
.slot-row .t { font-weight: 700; font-size: 15.5px; }
.slot-row .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.slot-row .st { flex: none; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 4px 10px; border-radius: 999px; }
.slot-row .st.done { color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, #fff); }
.my-clinic { padding: 14px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--primary) 5%, #fff); }
.my-clinic .mh { font-weight: 800; margin-bottom: 6px; }
.my-clinic .mi { font-size: 14.5px; margin-bottom: 3px; }
@media (max-width: 460px) { .cd { min-height: 50px; } .cm { font-size: 9.5px; padding: 1px 3px; } .boards { grid-template-columns: .9fr 1fr 1fr 1.1fr; } }
.aslot { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.aslot.past { opacity: .6; }
.aslot .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.aslot .who { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.aslot .who .chip button { border: 0; background: none; cursor: pointer; color: var(--muted); margin-left: 4px; padding: 0; font-size: 13px; }
.adate { font-weight: 800; margin: 14px 0 6px; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }

/* ── 관리자 클리닉 달력 ── */
.acal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.acal-g .wd { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.acal-g .wd.sun { color: #d9534f; } .acal-g .wd.sat { color: #3b6fd4; }
.acd { min-height: 92px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; position: relative; }
.acd.empty { visibility: hidden; }
.acd:hover:not(:disabled) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 4%, #fff); }
.acd.past { background: #fafafa; color: #aaa; }
.acd:disabled { cursor: default; }
.acd.sun .n { color: #d9534f; } .acd.sat .n { color: #3b6fd4; }
.acd .n { font-weight: 800; font-size: 13.5px; }
.acd.today .n { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.acd .sc { font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); border-radius: 6px; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acd .sc.full { background: #eee; color: var(--muted); }
.acd .sc.more { background: none; color: var(--muted); }
.acd .plus { position: absolute; right: 8px; bottom: 4px; font-size: 20px; color: #ccc; }
.acd:hover .plus { color: var(--primary); }
@media (max-width: 700px) { .acal-g { gap: 3px; } .acd { min-height: 64px; padding: 4px 2px; } .acd .sc { font-size: 9.5px; padding: 1px 2px; text-overflow: clip; } .acd .plus { display: none; } .acd .sc b { display: none; } }
.acd.opened { border-color: color-mix(in srgb, var(--primary) 45%, #fff); background: color-mix(in srgb, var(--primary) 7%, #fff); }
.acd.picked { outline: 2.5px solid var(--primary); outline-offset: -2px; background: color-mix(in srgb, var(--primary) 16%, #fff); }
.acd .sc.open { background: var(--primary); color: #fff; }
.acd .sc.req { background: #fff3cd; color: #8a6100; }
.acd .pk { position: absolute; right: 7px; top: 6px; width: 18px; height: 18px; border: 1.5px solid #bbb; border-radius: 5px; font-size: 13px; line-height: 15px; text-align: center; color: #fff; background: #fff; }
.acd.picked .pk { background: var(--primary); border-color: var(--primary); }
.acal-g .wd.pickable { cursor: pointer; text-decoration: underline dotted; }
.csel-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; margin-bottom: 10px; background: var(--soft); font-size: 14px; }
.csel-bar.on { background: color-mix(in srgb, var(--primary) 12%, #fff); border: 1px solid color-mix(in srgb, var(--primary) 40%, #fff); }
.req-list .rq { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.req-list .rq:last-child { border-bottom: 0; }
.req-list .tm { flex: none; min-width: 110px; }
.req-list .nm { flex: 1; min-width: 0; }
.cday { padding: 12px 18px 14px; border-bottom: 1px solid var(--line); }
.cday:last-child { border-bottom: 0; }
.cday .t { font-weight: 700; font-size: 15.5px; }
.cday .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cday .tin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cday .tin label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.cday .tin input { width: 130px; padding: 8px 10px; }
.cday .mine-box { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, #fff); color: var(--primary); font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── 홈페이지 편집 ── */
.hcard { margin-bottom: 14px; }
.hcard h3 { font-size: 16px; margin-bottom: 10px; }
.hitem { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--soft); }
.hitem-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hgrid .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .hgrid { grid-template-columns: 1fr; } }
.hphoto { display: flex; align-items: center; gap: 12px; }
.hphoto img, .hphoto .nop { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.hphoto .nop { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.hcard div.f > span:first-child { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; color: var(--muted); }
