:root {
  --bg: #ffffff;
  --side: #f7f7f5;
  --hover: rgba(55, 53, 47, 0.06);
  --active: rgba(55, 53, 47, 0.1);
  --text: #37352f;
  --muted: #787774;
  --faint: #a5a4a0;
  --line: #e9e9e7;
  --line-soft: #f1f1ef;
  --accent: #2383e2;
  --accent-soft: #e7f3fb;
  --danger: #d44c47;
  --danger-soft: #fdebec;
  --warn-soft: #fbf3db;
  --warn-text: #7a5a12;
  --ok: #448361;
  --ok-soft: #edf3ec;
  --shadow: 0 0 0 1px rgba(15, 15, 15, 0.05), 0 3px 6px rgba(15, 15, 15, 0.08), 0 12px 28px rgba(15, 15, 15, 0.14);
  --hour: 48px;
  /* 장비별 색 (배경 / 글자 / 테두리) */
  --c0: #e7f3f8; --c0t: #1f5f85; --c0b: #5b9fc4;
  --c1: #edf3ec; --c1t: #2f6b4b; --c1b: #6aa884;
  --c2: #f6f3f9; --c2t: #6a3f96; --c2b: #a17fc6;
  --c3: #fbecdd; --c3t: #a35a15; --c3b: #dc9a59;
  --c4: #faf1f5; --c4t: #a03468; --c4b: #d37fa7;
  --c5: #fbf3db; --c5t: #806212; --c5b: #cfa93c;
  --c6: #fdebec; --c6t: #a63a36; --c6b: #dd7f7b;
  --c7: #f1f1ef; --c7t: #55534e; --c7b: #9b9a97;
  --meet-research: #2f3b69; --meet-research-text: #ffffff; --meet-research-bar: #8fa4ff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919; --side: #202020; --hover: rgba(255, 255, 255, 0.055); --active: rgba(255, 255, 255, 0.1);
    --text: #e6e6e4; --muted: #9b9b98; --faint: #6f6f6c; --line: #2f2f2f; --line-soft: #262626;
    --accent: #4a9fea; --accent-soft: #1d2f40; --danger: #e5645f; --danger-soft: #3a2322;
    --warn-soft: #39321c; --warn-text: #e3c26b; --ok: #6fb58d; --ok-soft: #1f2c25;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 30px rgba(0, 0, 0, 0.5);
    --c0: #1c2c38; --c0t: #8cc3e4; --c0b: #3f7ea3;
    --c1: #1f2c25; --c1t: #8fcfa9; --c1b: #47805f;
    --c2: #2a2333; --c2t: #c3a3e6; --c2b: #7556a0;
    --c3: #36281b; --c3t: #eab27a; --c3b: #a36a2e;
    --c4: #33212a; --c4t: #e89fc2; --c4b: #a04f78;
    --c5: #332d19; --c5t: #e0c267; --c5b: #96781f;
    --c6: #382221; --c6t: #ee9f9b; --c6b: #a84d49;
    --c7: #2a2a2a; --c7t: #c2c2bf; --c7b: #6b6b68;
    --meet-research: #c9d3ff; --meet-research-text: #1b2140; --meet-research-bar: #6b7fd6;
  }
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; word-break: keep-all;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.icon { display: inline-flex; width: 16px; height: 16px; flex: none; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---------- 버튼 · 입력 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg); cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: background 0.12s;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.btn.primary:hover { filter: brightness(0.94); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.icon-only { width: 32px; padding: 0; }
.btn.sm.icon-only { width: 28px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); outline: none; min-width: 0;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted); }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: 6px; padding: 9px 12px; margin-bottom: 14px; font-size: 13px; }
.form-warn { background: var(--warn-soft); color: var(--warn-text); border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; }
.form-warn ul { margin: 6px 0 0; padding-left: 18px; }

.seg { display: inline-flex; padding: 2px; background: var(--hover); border-radius: 7px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 5px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--bg); color: var(--text); font-weight: 500; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.06); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12.5px; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.busy { background: var(--accent-soft); color: var(--accent); }
.pill.stop { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn-text); }
.issue-text { color: var(--warn-text); }
.issue-box { display: flex; align-items: center; gap: 10px; }
.pill.gray { background: var(--hover); color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* ---------- 로그인 ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--side); }
.auth-card { width: 100%; max-width: 360px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 32px 28px 28px; }
.auth-card h1 { font-size: 20px; margin: 14px 0 4px; }
.auth-card > p { color: var(--muted); margin-bottom: 22px; }
.auth-card .btn.primary { width: 100%; height: 36px; margin-top: 4px; }
.logo { width: 36px; height: 36px; border-radius: 8px; background: var(--text); color: var(--bg); display: grid; place-items: center; }
.logo .icon { width: 20px; height: 20px; }
.demo-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.demo-box .row { margin-top: 8px; }

/* ---------- 레이아웃 ---------- */
.shell { display: flex; height: 100%; }
.side { width: 232px; flex: none; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 10px 8px; }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 14px; font-weight: 600; }
.brand .logo { width: 24px; height: 24px; border-radius: 5px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; letter-spacing: .02em; }
.brand-name small { font-size: 10px; font-weight: 500; letter-spacing: .08em; color: var(--muted, #888); }
.brand .logo .icon { width: 14px; height: 14px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); text-decoration: none; cursor: pointer; font-weight: 500; text-align: left;
}
.nav a:hover, .nav button:hover { background: var(--hover); }
.nav a.on { background: var(--active); color: var(--text); }
.nav-label { margin: 14px 8px 4px; font-size: 11.5px; color: var(--faint); font-weight: 500; }
.badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: 8px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--active); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.page { flex: 1; overflow: auto; padding: 28px 40px 60px; }
.page-inner { max-width: 920px; margin: 0 auto; }
.page h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 22px; }
.section-title { font-size: 15px; font-weight: 600; margin: 34px 0 10px; display: flex; align-items: center; gap: 8px; }

/* ---------- 일정 ---------- */
.cal-wrap { display: flex; flex-direction: column; height: 100%; }
.cal-bar { display: flex; align-items: center; gap: 10px; padding: 14px 20px 12px; flex-wrap: wrap; }
.cal-bar h1 { font-size: 18px; font-weight: 650; margin-right: 2px; white-space: nowrap; }
.cal-bar .input { width: auto; height: 32px; }
.cal-scroll { flex: 1; overflow: auto; border-top: 1px solid var(--line); position: relative; }
.cal-inner { min-width: 760px; }
.cal-head { display: grid; grid-template-columns: 54px repeat(7, 1fr); position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.cal-head .dh { padding: 8px 0 7px; text-align: center; font-size: 12.5px; color: var(--muted); border-left: 1px solid var(--line-soft); }
.cal-head .dh b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 3px; padding: 0 4px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.cal-head .dh.today b { background: var(--accent); color: #fff; }
.cal-head .dh.today { color: var(--accent); }
.cal-body { display: grid; grid-template-columns: 54px repeat(7, 1fr); position: relative; }
.cal-gutter { position: relative; height: calc(var(--hour) * 24); }
.cal-gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); }
.cal-day {
  position: relative; height: calc(var(--hour) * 24); border-left: 1px solid var(--line-soft); cursor: cell; touch-action: pan-x pan-y;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px); background-size: 100% var(--hour);
}
.cal-day.weekend { background-color: color-mix(in srgb, var(--side) 55%, transparent); }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.drag-sel { position: absolute; left: 2px; right: 2px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 5px; z-index: 4; pointer-events: none; font-size: 11.5px; color: var(--accent); padding: 2px 6px; }
.ev {
  position: absolute; overflow: hidden; border-radius: 5px; padding: 3px 6px 3px 8px; font-size: 12px; line-height: 1.35; cursor: pointer;
  border: 0; text-align: left; z-index: 2; box-shadow: 0 0 0 1px var(--bg);
}
.ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { display: block; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev:hover { filter: brightness(0.96); z-index: 4; }
.ev.meet { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px var(--bg); }
.ev.meet::before { background: var(--text); }
.ev.past { opacity: 0.55; }
.ev.mine b::after { content: " ·나"; font-weight: 500; opacity: 0.7; }
.ev.stopped { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(128, 128, 128, 0.16) 6px 8px); }
.c0 { background: var(--c0); color: var(--c0t); } .c0::before, .dot.c0 { background: var(--c0b); }
.c1 { background: var(--c1); color: var(--c1t); } .c1::before, .dot.c1 { background: var(--c1b); }
.c2 { background: var(--c2); color: var(--c2t); } .c2::before, .dot.c2 { background: var(--c2b); }
.c3 { background: var(--c3); color: var(--c3t); } .c3::before, .dot.c3 { background: var(--c3b); }
.c4 { background: var(--c4); color: var(--c4t); } .c4::before, .dot.c4 { background: var(--c4b); }
.c5 { background: var(--c5); color: var(--c5t); } .c5::before, .dot.c5 { background: var(--c5b); }
.c6 { background: var(--c6); color: var(--c6t); } .c6::before, .dot.c6 { background: var(--c6b); }
.c7 { background: var(--c7); color: var(--c7t); } .c7::before, .dot.c7 { background: var(--c7b); }
.dot.meet { background: var(--text); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 월별 달력 ---------- */
.month { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.m-head, .m-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 560px; }
.m-head { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
.m-head div { padding: 7px 10px; font-size: 12.5px; color: var(--muted); border-left: 1px solid var(--line-soft); }
.m-grid { flex: 1; grid-auto-rows: minmax(108px, 1fr); }
.m-cell { min-width: 0; padding: 4px 4px 6px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); cursor: cell; }
.m-cell.weekend { background-color: color-mix(in srgb, var(--side) 55%, transparent); }
.m-date { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; margin-bottom: 1px; border: 0; border-radius: 12px; background: none; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.m-date:hover { background: var(--hover); }
.m-cell.other .m-date { color: var(--faint); font-weight: 500; }
.m-cell.today .m-date { background: var(--accent); color: #fff; }
.m-ev { position: relative; display: flex; align-items: center; gap: 5px; width: 100%; height: 20px; flex: none; padding: 0 6px 0 9px; border: 0; border-radius: 4px; font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; }
.m-ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.m-ev time { flex: none; opacity: 0.75; font-variant-numeric: tabular-nums; }
.m-ev b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.m-ev:hover { filter: brightness(0.96); }
.m-ev.meet { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.m-ev.meet::before { background: var(--text); }
.m-ev.past { opacity: 0.55; }
.m-more { height: 18px; padding: 0 6px; border: 0; background: none; font-size: 12px; color: var(--muted); text-align: left; cursor: pointer; }
.m-more:hover { color: var(--text); }

/* ---------- 미팅 시간 투표 ---------- */
.modal.wide { max-width: 840px; }
.btn .badge { margin-left: 2px; }
.poll-panels { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; }
.poll-panels > div { flex: 1; min-width: 250px; }
.pgrid { display: grid; grid-template-rows: 36px; grid-auto-rows: 19px; margin-top: 10px; padding: 0 1px 1px 0; user-select: none; -webkit-user-select: none; }
.pgrid.mine { touch-action: none; cursor: pointer; }
.pg-day { text-align: center; font-size: 11px; line-height: 1.3; color: var(--muted); }
.pg-day b { display: block; font-size: 12px; color: var(--text); }
.pg-time { font-size: 10.5px; color: var(--faint); text-align: right; padding-right: 6px; transform: translateY(-8px); }
.pg-cell { margin: 0 -1px -1px 0; border: 1px solid var(--line); font-size: 10.5px; line-height: 18px; text-align: center; color: var(--ok); }
.pg-cell.half { border-top-style: dotted; }
.pgrid.mine .pg-cell:hover { background: var(--accent-soft); }
.pgrid.mine .pg-cell.on { background: var(--accent); border-color: var(--accent); }
.pgrid.all .pg-cell.full { background: var(--ok); color: #fff; font-weight: 700; }

/* ---------- 면담 가능 시간 ---------- */
.pgrid.office { margin-top: 14px; }
.pgrid.office .pg-cell.on { background: var(--ok); border-color: var(--ok); }
.pgrid.office.mine .pg-cell.on { background: var(--accent); border-color: var(--accent); }
.pgrid.office .pg-cell.gone:not(.on) { background: var(--side); }
.pgrid.office .pg-cell.gone.on { opacity: 0.45; }
.pg-day.weekend { color: var(--faint); }
.office-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.office-list li { display: flex; gap: 10px; padding: 2px 0; }
.office-list span { width: 96px; flex: none; color: var(--muted); }

/* ---------- 점검 일정 ---------- */
.ev.maint, .m-ev.maint { background: var(--c7); color: var(--c7t); background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(128, 128, 128, 0.2) 6px 8px); }
.ev.maint::before, .m-ev.maint::before { background: var(--c7b); }

/* ---------- 오늘 화면 · 통계 ---------- */
.card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.today-grid .card { margin: 0; }
.today-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.today-item:hover .grow { text-decoration: underline; }
.today-item time { width: 104px; flex: none; font-variant-numeric: tabular-nums; color: var(--muted); }
.today-item.past { opacity: 0.55; }
.linkish { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 500; }
.linkish:hover { text-decoration: underline; }
.table.num td:not(:first-child), .table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 사용 기록 ---------- */
.log-banner { display: flex; align-items: center; gap: 10px; margin: 0 20px 10px; padding: 7px 8px 7px 12px; background: var(--warn-soft); color: var(--warn-text); border-radius: 8px; font-size: 13px; }
.log-line { display: flex; align-items: center; gap: 10px; }
.scroll-box { max-height: 220px; overflow: auto; }

/* ---------- 장비 ---------- */
.manage-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding: 8px 10px; background: var(--side); border-radius: 8px; }
.eq-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.eq-item { display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line); align-items: flex-start; }
.eq-item:first-child { border-top: 0; }
.eq-item:hover { background: var(--side); }
.eq-item h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eq-item h3 button { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.eq-item h3 button:hover { text-decoration: underline; }
.eq-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 4px; }
.eq-meta span { display: inline-flex; align-items: center; gap: 5px; }
.eq-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.eq-item .dot { margin-top: 6px; width: 10px; height: 10px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 12px; }

/* ---------- 논문함 ---------- */
.paper-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.paper-project { display: flex; gap: 6px; flex: 0 1 280px; min-width: 200px; }
.paper-search { flex: 1 1 180px; min-width: 150px; }
.paper-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; min-height: 28px; font-size: 13px; }
.paper-table input[type="checkbox"], .lookup-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.paper-table .cell-check { width: 36px; padding-right: 0; }
.paper-table .cell-title { min-width: 260px; }
.paper-table .cell-title .linkish { text-align: left; }
.paper-table .cell-title .pill { height: 20px; font-size: 12px; vertical-align: 1px; }
.paper-table tr.on td { background: var(--accent-soft); }
.paper-table tr.pinned td:first-child { box-shadow: inset 3px 0 0 var(--warn-text); }
.paper-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.star-btn { border: 0; background: none; padding: 0 5px 0 0; cursor: pointer; font-size: 15px; line-height: 1; color: var(--faint); vertical-align: -1px; }
.star-btn:hover { color: var(--warn-text); }
.star-btn.on, .star-badge { color: var(--warn-text); font-weight: 700; }
.star-badge { margin-right: 5px; font-size: 14px; }
.paper-table .cell-read { white-space: nowrap; }
.read-btn { font-size: 12.5px; color: var(--muted); }
.read-btn.on { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); font-weight: 500; }
.paper-note { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.notion-mark.sm { width: 15px; height: 15px; border-width: 1px; border-radius: 3px; font-size: 9.5px; }
.paper-title { align-items: flex-start; line-height: 1.4; }
.modal.mid { max-width: 620px; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.lookup-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.lookup-row.dim .lookup-title { color: var(--muted); }
.lookup-check { width: 16px; flex: none; padding-top: 3px; }
.lookup-head { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.lookup-title { font-weight: 500; overflow-wrap: anywhere; }
.lookup-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.popover.menu { width: 240px; padding: 5px; }
.popover.menu button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; }
.popover.menu button:hover { background: var(--hover); }
.menu-note { padding: 7px 10px; font-size: 12.5px; color: var(--muted); }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--line-soft); }
.scroll-box.tall { max-height: 60vh; }

/* ---------- 변경 기록 ---------- */
.chg-list li { align-items: flex-start; }
.chg-title { font-weight: 500; overflow-wrap: anywhere; }
.chg-meta { flex: none; text-align: right; font-size: 12px; color: var(--muted); line-height: 1.4; }
.chg-diff { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.chg-key { display: inline-block; min-width: 52px; margin-right: 6px; color: var(--faint); }
.chg-diff del { color: var(--danger); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.chg-diff ins { color: var(--ok); text-decoration: none; }
.toast.has-action { display: flex; align-items: center; gap: 14px; }
.toast button { border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- 표 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table-box { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 8px 14px; background: var(--side); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table td.actions { text-align: right; white-space: nowrap; }
.table select.input { height: 28px; width: auto; padding: 0 6px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; background: var(--side); border-radius: 8px; align-items: flex-start; }
.callout .icon { margin-top: 3px; }
.copy-row { display: flex; gap: 6px; margin-top: 8px; }
.copy-row .input { font-size: 13px; }

/* ---------- 모달 · 팝오버 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 15, 15, 0.45); display: grid; place-items: start center; padding: 9vh 16px 24px; overflow: auto; z-index: 50; }
.modal { width: 100%; max-width: 460px; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); padding: 22px 24px 20px; position: relative; }
.modal.narrow { max-width: 380px; }
.modal h2 { font-size: 17px; font-weight: 650; margin-bottom: 16px; padding-right: 30px; }
.modal .close { position: absolute; top: 14px; right: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.detail-row { display: flex; gap: 12px; padding: 7px 0; align-items: flex-start; }
.detail-row > .icon { color: var(--muted); margin-top: 3px; }
.detail-title { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 650; margin-bottom: 10px; padding-right: 30px; }
.link-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.link-btn:hover { background: var(--hover); }
.link-btn .icon:last-child { margin-left: auto; color: var(--muted); }
.notion-mark { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--text); display: grid; place-items: center; font-weight: 700; font-size: 12px; font-family: Georgia, serif; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--bg); user-select: none; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.chip.static { cursor: default; height: 24px; font-size: 13px; background: var(--hover); border-color: transparent; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.list-plain li:first-child { border-top: 0; }

.popover { position: fixed; z-index: 60; width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; background: var(--bg); border-radius: 10px; box-shadow: var(--shadow); }
.popover h3 { font-size: 13px; color: var(--muted); font-weight: 500; padding: 12px 14px 6px; }
.notif { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 14px; cursor: pointer; border-top: 1px solid var(--line-soft); }
.notif:hover { background: var(--hover); }
.notif.unread { background: var(--accent-soft); }
.notif time { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; }
.toast { background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 8px; font-size: 13.5px; box-shadow: var(--shadow); animation: rise 0.18s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .side { width: auto; flex-direction: row; align-items: center; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; }
  .brand { padding: 0 6px 0 4px; }
  .brand > span:last-child, .side-foot .grow, .side-foot .avatar, .nav button > span:not(.icon):not(.badge) { display: none; }
  .nav .badge { margin-left: 0; }
  .nav .nav-label, .nav a.out { display: none; }
  .nav { display: flex; gap: 2px; flex: 1; }
  .nav a, .nav button { width: auto; padding: 0 8px; gap: 6px; }
  .side-foot { margin: 0; padding: 0; border: 0; }
  .main { min-height: 0; }
  .page { padding: 20px 16px 48px; }
  .cal-bar { padding: 10px 12px; }
  .cal-inner { min-width: 880px; }
  .m-ev time { display: none; }
  .m-grid { grid-auto-rows: minmax(92px, 1fr); }
  .eq-item { flex-wrap: wrap; }
  .eq-actions { width: 100%; justify-content: flex-start; padding-left: 24px; }
  .field-row { flex-wrap: wrap; }
  .field-row > * { flex-basis: 120px; }
  .nav { overflow-x: auto; }
  .nav a, .nav button { flex: none; }
  .paper-project { flex: 1 1 100%; }
  .lookup-row { flex-wrap: wrap; }
  .lookup-actions { width: 100%; justify-content: flex-start; padding-left: 26px; }
}

/* 도트 아바타와 논문 토론 */
.pixel-avatar { width:40px; height:40px; flex:none; image-rendering:pixelated; shape-rendering:crispEdges; }
.avatar-edit { border:0; padding:0; background:var(--hover); border-radius:8px; cursor:pointer; display:flex; }
.avatar-preview { display:flex; justify-content:center; padding:22px; background:var(--side); margin:16px 0; border-radius:12px; }
.avatar-preview .pixel-avatar { width:112px; height:112px; }
.avatar-choices { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:16px 0; }
.avatar-swatch { width:32px; height:32px; border:3px solid transparent; border-radius:50%; cursor:pointer; }
.avatar-swatch.selected { outline:2px solid var(--text); outline-offset:3px; }
.discussion-paper { font-weight:500; margin:8px 0; padding-right:24px; overflow-wrap:anywhere; }
.discussion-list { height:min(42vh,420px); min-height:160px; overflow-y:auto; padding:16px 4px; margin:12px 0; border-block:1px solid var(--line); }
.discussion-message { display:flex; align-items:flex-start; gap:10px; margin-bottom:18px; }
.discussion-content { min-width:0; max-width:88%; }
.discussion-bubble { margin-top:5px; padding:10px 14px; border-radius:0 12px 12px 12px; background:var(--side); white-space:pre-wrap; overflow-wrap:anywhere; }
.discussion-message.mine .discussion-bubble { background:var(--accent-soft); }
.discussion-empty { text-align:center; padding:40px 12px; }
.discussion-compose textarea { resize:vertical; max-height:180px; }
.mention-wrap { position:relative; }
.mention-list { position:absolute; left:0; bottom:calc(100% + 4px); z-index:5; min-width:180px; max-width:100%; padding:4px; background:var(--bg); border:1px solid var(--line); border-radius:8px; box-shadow:0 6px 20px rgb(0 0 0 / .12); }
.mention-list[hidden] { display:none; }
.mention-option { display:flex; align-items:center; gap:8px; width:100%; padding:6px 8px; border:0; border-radius:6px; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.mention-option .pixel-avatar, .mention-option svg { width:22px; height:22px; flex:none; }
.mention-option.on, .mention-option:hover { background:var(--accent-soft); }
.mention { color:var(--accent); font-weight:600; }
.mention.me { background:var(--accent-soft); border-radius:4px; padding:0 2px; }
.discussion-bubble.mentions-me { box-shadow:inset 3px 0 0 var(--accent); }
@media(max-width:600px) { .discussion-list { height:35vh; } .discussion-content { max-width:calc(100% - 48px); } }

/* 32px character collection — natural coats, personal scarves */
.avatar-preview { gap:24px; align-items:center; justify-content:flex-start; padding:18px 26px; background:linear-gradient(120deg,var(--side),var(--accent-soft)); border:1px solid var(--line); }
.avatar-stage { width:136px; height:136px; display:grid; place-items:center; border-radius:18px; background:radial-gradient(circle,#ffffff88 1px,transparent 1px); background-size:8px 8px; flex:none; }
.avatar-preview .pixel-avatar { width:128px; height:128px; filter:drop-shadow(0 5px 0 #4037450a); }
.avatar-preview-caption { display:flex; flex-direction:column; gap:8px; }
.avatar-preview-caption strong { font-size:23px; }
.avatar-preview-caption span { font-size:12px; color:var(--muted); }
.avatar-animal-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; }
.avatar-animal-card { display:flex; flex-direction:column; align-items:center; gap:6px; padding:10px 3px 8px; background:var(--bg); border:1px solid var(--line); border-radius:10px; cursor:pointer; color:var(--muted); font-size:12px; transition:background .15s,transform .15s; }
.avatar-animal-card .pixel-avatar { width:56px; height:56px; }
.avatar-animal-card:hover { background:var(--hover); transform:translateY(-2px); }
.avatar-animal-card.selected { background:var(--accent-soft); border-color:var(--accent); color:var(--text); box-shadow:0 0 0 1px var(--accent); font-weight:600; }
.avatar-choices { justify-content:flex-start; padding:2px 4px; }
@media(max-width:600px) { .avatar-animal-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } .avatar-preview{padding:12px;gap:12px;} .avatar-stage{width:104px;height:104px;} .avatar-preview .pixel-avatar{width:96px;height:96px;} .avatar-preview-caption strong{font-size:19px;} }

/* Project citation map */
.paper-map > p { margin:12px 0; }
.paper-map-layout { display:grid; grid-template-columns:minmax(0,1fr) 270px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.paper-map-canvas { overflow:auto; min-height:400px; background:var(--side); }
.paper-map-canvas svg { display:block; }
.map-node { cursor:pointer; }
.map-node:focus circle { stroke:var(--accent);stroke-width:4; }
.paper-map-detail { padding:20px; display:flex; flex-direction:column; align-items:flex-start; gap:14px; border-left:1px solid var(--line); }
.paper-map-detail h3 { overflow-wrap:anywhere; }
.missing-papers { margin-top:20px; padding:18px 20px; border:1px solid var(--line); border-radius:12px; background:var(--side); }
.missing-paper-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
.missing-paper-card { padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--bg); cursor:pointer; transition:border-color .15s,box-shadow .15s; }
.missing-paper-card:hover { border-color:var(--accent); }
.missing-paper-card.selected { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.missing-paper-title { font-weight:600; line-height:1.45; overflow-wrap:anywhere; }
.author-filter-bar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:10px 0 12px; }
.author-filter-bar[hidden] { display:none; }
.reading-path-box { margin-top:20px; padding:18px 20px; border:1px solid var(--line); border-radius:12px; background:var(--side); }
.reading-path-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:10px; }
.reading-step-card { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--bg); text-align:left; cursor:pointer; transition:border-color .15s,box-shadow .15s; }
.reading-step-card:hover { border-color:var(--accent); }
.reading-step-card.selected { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.reading-step-num { font-size:11.5px; font-weight:700; color:var(--accent); letter-spacing:0.04em; }
.reading-step-title { font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
/* Anonymous rehearsal feedback */
.rehearsal-list { display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-top:24px; }
.rehearsal-card { padding:24px;border:1px solid var(--line);border-radius:12px;text-decoration:none;background:var(--side); }
.rehearsal-card h3 { margin:14px 0;overflow-wrap:anywhere; }
.guest-feedback { max-width:1120px;margin:auto;padding:32px 24px; }
.feedback-board { padding-top:20px; }
.feedback-board h1 { margin:12px 0 20px;overflow-wrap:anywhere; }
.feedback-board > .hint { margin:12px 0; }
.feedback-board > [role=status] { min-height:22px;margin:8px 0; }
.join-code { font:600 18px ui-monospace,monospace;letter-spacing:1px;padding:8px 12px;border-radius:8px;background:var(--side); }
.reaction-bar { display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:22px; }
.reaction-button { padding:20px 8px;border:1px solid var(--line);border-radius:12px;font-weight:600;cursor:pointer;color:var(--text); }
.reaction-button:disabled { opacity:.45;cursor:default; }
.confused { background:var(--warn-soft); }
.fast { background:var(--danger-soft); }
.question { background:var(--accent-soft); }
.question-compose { padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--side);margin:12px 0 28px; }
.question-compose h3 { margin-bottom:12px; }
.question-compose textarea { background:var(--bg); }
.question-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-top:18px;align-items:start; }
.question-card { padding:20px;border:1px solid var(--line);border-top:4px solid #e4c66c;border-radius:12px;background:var(--bg);box-shadow:0 3px 10px #00000005; }
.question-card:nth-child(3n+2) { border-top-color:#89bca5; }
.question-card:nth-child(3n) { border-top-color:#a49acb; }
.question-card.resolved { background:var(--ok-soft); }
.question-card.hidden-question { opacity:.6;border-style:dashed; }
.question-body { margin:18px 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8; }
.timeline-row { display:flex;align-items:center;gap:12px;margin:12px 0;flex-wrap:wrap; }
.timeline-bars { display:flex;width:230px;min-height:22px; }
.timeline-segment { text-align:center;min-width:18px;font-size:12px;color:var(--text); }
.feedback-board > div:has(> .timeline-row) { padding:20px;border:1px solid var(--line);border-radius:12px;margin-bottom:28px; }
@media(max-width:760px) { .paper-map-layout{grid-template-columns:1fr;} .paper-map-detail{border-left:0;border-top:1px solid var(--line);} .guest-feedback{padding:16px;} .reaction-bar{gap:6px;} .reaction-button{font-size:13px;padding:18px 4px;} .question-grid{grid-template-columns:1fr;} .question-compose .row{flex-wrap:wrap;gap:10px;} }
.questi-brand { display:flex;align-items:center;gap:12px;margin:4px 0 16px;color:var(--muted);font-size:13px; }
.questi-brand strong { font-size:26px;letter-spacing:-1px;color:var(--accent); }
.feedback-board > div:has(> .timeline-row) { margin-top:24px; }
.question-compose label { margin:0 0 12px; }
.question-compose label[hidden] { display:none; }
.questi-create { padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--side); }
.presenter-picker { border:1px solid var(--line);border-radius:10px;padding:14px;display:flex;flex-wrap:wrap;gap:10px;margin:16px 0; }
.presenter-picker legend { font-size:13px;color:var(--muted);padding:0 6px; }
.presenter-choice { display:flex;align-items:center;gap:6px;padding:7px 10px;background:var(--bg);border-radius:6px;font-size:13px; }
.feedback-board select[aria-label="발표자별 질문 보기"] { width:160px; }
.question-compose .field { margin-bottom:12px;min-width:170px; }
.watch-page { max-width:1500px;margin:auto;padding:32px;background:var(--side);min-height:100vh; }
.watch-head { display:flex;align-items:center;gap:16px;margin-bottom:24px; }
.watch-brand { font-size:30px;color:var(--accent);letter-spacing:-1px; }
.watch-page h1 { margin-bottom:12px;overflow-wrap:anywhere; }
.watch-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:22px;margin-top:30px; }
.watch-grid .question-body { font-size:20px;line-height:1.7; }
@media(max-width:600px) { .watch-page{padding:20px;} .watch-grid{grid-template-columns:1fr;} .watch-grid .question-body{font-size:17px;} }
.btn[hidden] { display:none !important; }

/* QuesTi phone participation and equipment controls */
.participation-qr { display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; padding:16px; background:#fff; border:1px solid var(--border,#e5e3dd); border-radius:16px; }
.participation-qr svg { display:block; width:220px; max-width:100%; height:auto; }
.qr-url { overflow-wrap:anywhere; max-width:260px; }
.watch-intro { display:flex; gap:32px; align-items:flex-start; margin:20px 0 32px; }
.watch-join { flex:0 0 280px; }
.eq-actions { flex-wrap:wrap; }
@media(max-width:650px) { .watch-intro { flex-direction:column; } .watch-join { flex:auto; width:100%; } }

.watch-main { min-width:0; }
@media(min-width:651px) { .watch-join { position:sticky; top:20px; } }
@media(max-width:650px) { .watch-main { width:100%; } .watch-join { order:-1; } }

/* Independent physical sample histories */
.sample-toolbar { margin:18px 0; }
.sample-filters { display:flex;flex-wrap:wrap;gap:12px;align-items:end;padding:18px;background:var(--side);border-radius:12px;margin:20px 0; }
.sample-filters .field:first-child { flex:2 1 320px; }
.sample-filters .field { flex:1 1 150px;margin:0; }
.sample-card { display:block;color:inherit;text-decoration:none;border:1px solid var(--border,#ddd);border-radius:12px;padding:20px;margin:12px 0;background:var(--bg,#fff); }
.sample-card:hover { border-color:#2383e2; }
.sample-card h3,.sample-hero h2 { margin:10px 0; }
.sample-record { border:1px solid var(--border,#ddd);border-radius:12px;padding:18px;margin:14px 0;background:var(--bg,#fff); }
.sample-record h3 { margin:10px 0; }
.sample-record p { margin:10px 0; }
.sample-hero { padding:24px;background:var(--side,#f7f7f5);border-radius:14px;margin-top:20px; }
.sample-form-grid,.sample-facts { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.sample-facts { grid-template-columns:repeat(4,minmax(0,1fr));margin-top:20px; }
.sample-facts b,.sample-detail-row b { font-size:12px;color:var(--muted,#777); }
.sample-detail-row { display:grid;grid-template-columns:150px 1fr;gap:12px;margin:12px 0; }
.sample-stage { padding:16px;border:1px solid var(--border,#ddd);border-radius:10px;margin:12px 0; }
.sample-pre { white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit; }
.sample-search-form { padding:20px;margin:20px 0;background:var(--side,#f7f7f5);border-radius:12px; }
.sample-table-scroll { overflow:auto; }
.sample-table-scroll td { min-width:190px;vertical-align:top; }
@media(max-width:650px){.sample-form-grid,.sample-facts{grid-template-columns:1fr}.sample-detail-row{grid-template-columns:1fr;gap:4px}.sample-filters{display:block}.sample-filters .field{margin-bottom:12px}.sample-stage{padding:12px}}

.sample-import-preview {max-height:360px; overflow:auto; padding:8px; border:1px solid var(--border, #ddd); margin:12px 0;}
.sample-import-preview p {overflow-wrap:anywhere;}

.ev.external-request,.m-ev.external-request,.today-item.external-request{background:#f3e8ff!important;color:#6b21a8!important;border-color:#9333ea!important;border-left:4px solid #9333ea!important}

.research-panel{padding:16px;margin:12px 0;border:1px solid #ddd;border-radius:10px;background:#fff;flex-shrink:0}.cal-wrap>.research-panel{margin:8px 16px;max-height:310px;overflow:auto}.research-panel summary{cursor:pointer;font-weight:600}.research-time-row{display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:10px}.research-notice{white-space:pre-wrap;overflow-wrap:anywhere}.research-call{border-top:1px solid #ddd;margin-top:16px;padding-top:12px}.research-option{padding:8px 0;border-bottom:1px solid #eee}@media(max-width:640px){.research-time-row{grid-template-columns:1fr}.research-option{align-items:flex-start}}

.research-voters{flex-basis:100%;overflow-wrap:anywhere;color:#4a5563}.research-response-summary{background:#f5f7fa;padding:12px;border-radius:8px;margin:12px 0}.research-response-summary p{overflow-wrap:anywhere}

/* ---------- 미팅 종류: 개인미팅(흰 바탕) · 전체 연구미팅(진한 바탕) ---------- */
.ev.meet.research, .m-ev.meet.research { background: var(--meet-research); color: var(--meet-research-text); box-shadow: 0 0 0 1px var(--bg); }
.ev.meet.research::before, .m-ev.meet.research::before { background: var(--meet-research-bar); }
.dot.meet.research { background: var(--meet-research); }
.dot.meet.personal { background: var(--bg); box-shadow: inset 0 0 0 2px var(--text); }
.pill.research { background: var(--meet-research); color: var(--meet-research-text); }
.partner { display: inline-flex; align-items: center; gap: 3px; margin-right: 5px; font-style: normal; font-weight: 600; vertical-align: top; }
.partner .pixel-avatar { width: 16px; height: 16px; flex: none; }
.ev .partner { max-width: 100%; }
.m-ev .partner { flex: none; margin-right: 0; font-weight: 500; }
.m-ev .partner .pixel-avatar { width: 14px; height: 14px; }
.today-item .partner .pixel-avatar, .detail-title .partner .pixel-avatar { width: 20px; height: 20px; }
.chip .pixel-avatar { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.meet-preview { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ev-preview { position: relative; display: inline-flex; align-items: center; padding: 3px 8px 3px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; overflow: hidden; }
.ev-preview::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.ev-preview.meet.personal { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.ev-preview.meet.personal::before { background: var(--text); }
.ev-preview.meet.research { background: var(--meet-research); color: var(--meet-research-text); }
.ev-preview.meet.research::before { background: var(--meet-research-bar); }
.seg button .dot { margin-right: 6px; }

/* 장비 순서 변경 (관리자) */
.order-list { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; max-height: 55vh; overflow-y: auto; }
.order-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-bottom: 1px solid var(--line-soft); background: var(--bg); cursor: grab; }
.order-item:last-child { border-bottom: 0; }
.order-item.dragging { opacity: 0.45; background: var(--hover); }
.order-handle { color: var(--faint); font-size: 14px; line-height: 1; }
.order-num { width: 18px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.order-item .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 개인 학기 시간표 */
.ev.class { background: repeating-linear-gradient(135deg, var(--hover) 0 6px, transparent 6px 10px), var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.ev.class::before { background: var(--faint); }
.dot.class { background: var(--faint); }
.tt-rows { display: flex; flex-direction: column; gap: 6px; }
.tt-row { display: flex; align-items: center; gap: 6px; }
.tt-row .tt-title { flex: 2 1 120px; min-width: 0; }
.tt-row .tt-day { flex: 0 0 64px; }
.tt-row .tt-time { flex: 0 0 132px; }
.tt-row .tt-loc { flex: 1 1 80px; min-width: 0; }
@media (max-width: 640px) {
  .tt-row { flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
  .tt-row .tt-title { flex-basis: calc(100% - 44px); }
  .tt-row .tt-loc { flex-basis: 100%; order: 9; }
  .tt-row .tt-time { flex: 1 1 110px; min-width: 0; }
}

/* 학생 시간표 (관리자) */
.tt-grid { display: grid; margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tt-dh { text-align: center; font-size: 12.5px; font-weight: 500; padding: 6px 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-soft); }
.tt-gutter { position: relative; }
.tt-gutter span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10.5px; color: var(--faint); }
.tt-gutter span:first-child { transform: none; }
.tt-col { position: relative; border-left: 1px solid var(--line-soft);
  background-image: repeating-linear-gradient(to bottom, transparent 0 43px, var(--line-soft) 43px 44px); }
.tt-block { position: absolute; overflow: hidden; border-radius: 4px; padding: 2px 4px; font-size: 11px; line-height: 1.3; }
.tt-block b, .tt-block span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-block b { font-weight: 600; }
.tt-detail { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.tt-person ul { margin: 4px 0 0; padding-left: 18px; }
.chip .dot { display: inline-block; margin-right: 5px; vertical-align: 0; }

/* 논문 끌어다 놓기 */
.dropping { position: relative; }
.drop-veil { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 82%, transparent); border: 2px dashed var(--accent); border-radius: 10px; }
.drop-veil > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 26px; border-radius: 10px; background: var(--bg); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12); }
.drop-veil b { font-size: 15px; font-weight: 600; }
.drop-veil span { font-size: 12.5px; color: var(--muted); }
.drop-veil .icon svg { width: 22px; height: 22px; }

/* 프로젝트 연결도 */
.modal.full { max-width: none; width: calc(100vw - 32px); height: calc(100vh - 48px); padding: 16px 18px; display: flex; flex-direction: column; }
.overlay:has(.modal.full) { padding: 24px 16px; }
.modal.full > :not(.close) { flex: 1; min-height: 0; }
.pg-board { display: flex; flex-direction: column; height: 100%; }
.pg-bar { display: flex; align-items: center; gap: 12px; padding-right: 40px; margin-bottom: 10px; flex-wrap: wrap; }
.pg-bar h2 { margin: 0; }
.pg-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); cursor: pointer; }
.pg-main { flex: 1; min-height: 0; display: flex; gap: 12px; }
.pg-scroll { flex: 1; min-width: 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pg-sizer { position: relative; overflow: hidden; }
.pg-canvas { position: relative; transform-origin: 0 0; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px; }
.pg-zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.pg-zoom .icon-only { width: 28px; font-size: 15px; }
.pg-zoom-val { min-width: 52px; font-variant-numeric: tabular-nums; }
.pg-svg { position: absolute; inset: 0; color: var(--muted); overflow: visible; }
.pg-labels, .pg-nodes { position: absolute; inset: 0; pointer-events: none; }
.pg-labels > *, .pg-nodes > * { pointer-events: auto; }
.pg-edge { stroke: currentColor; stroke-width: 1.6; }
.pg-edge.on { stroke: var(--accent); color: var(--accent); stroke-width: 2.4; }
.pg-hit { stroke: transparent; stroke-width: 14; cursor: pointer; }
.pg-shared { stroke: var(--faint); stroke-width: 1.4; stroke-dasharray: 5 5; }
.pg-shared.on { stroke: var(--accent); }
.pg-temp { display: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; color: var(--accent); }
.pg-label { position: absolute; transform: translate(-50%, -50%); max-width: 150px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; z-index: 2; }
.pg-label.empty { color: var(--faint); font-style: italic; }
.pg-label.shared { color: var(--muted); border-style: dashed; }
.pg-label.on { border-color: var(--accent); color: var(--accent); }
.pg-node { position: absolute; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); cursor: grab; user-select: none; touch-action: none; z-index: 3; }
.pg-node b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-node span { font-size: 12px; color: var(--muted); }
.pg-node.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pg-node.moving { cursor: grabbing; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16); z-index: 5; }
.pg-node.target { border-color: var(--accent); background: var(--accent-soft); }
.pg-node.archived { opacity: 0.55; border-style: dashed; }
.pg-handle { position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); cursor: crosshair; touch-action: none; }
.pg-handle:hover { background: var(--accent); }
.pg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); vertical-align: -1px; }
.pg-panel { width: 290px; flex: none; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.pg-panel h3 { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.pg-panel select, .pg-panel input { width: 100%; }
.pg-route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 10px; }
.pg-presets { margin: 6px 0 12px; }
.pg-presets .chip { font-size: 12px; }
.pg-help { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.pg-dir { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pg-rel-list { margin: 0; padding-left: 4px; list-style: none; font-size: 13px; line-height: 1.8; }
@media (max-width: 760px) {
  .pg-main { flex-direction: column; }
  .pg-panel { width: auto; max-height: 40%; }
}
