/* ===== 화면(도구) 색 ===== */
:root {
  --desk: #e3e7ed;
  --bar: #ffffff;
  --bar-line: #cfd5de;
  --ui-text: #1b1f27;
  --ui-muted: #5b6472;
  --accent: #1747b5;
  --accent-soft: #e4ebfa;
  --warn-bg: #fff4d6;
  --warn-line: #e3c46a;

  /* 종이(인쇄물) 색: 테마와 상관없이 늘 흰 종이 */
  --paper: #ffffff;
  --ink: #16191f;
  --grid: #2a2e35;
  --blue: #1747b5;
  --red: #d1242f;
  --sat: #1747b5;
  --out: #f3f4f6;
  --tagtext: #5d6675;

  --font: "Noto Sans KR", "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --desk: #1a1e25;
    --bar: #232832;
    --bar-line: #363d4a;
    --ui-text: #e6e9ee;
    --ui-muted: #a3acb9;
    --accent: #7ea2f2;
    --accent-soft: #2a3550;
    --warn-bg: #3a3320;
    --warn-line: #7a6630;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --desk: #1a1e25;
  --bar: #232832;
  --bar-line: #363d4a;
  --ui-text: #e6e9ee;
  --ui-muted: #a3acb9;
  --accent: #7ea2f2;
  --accent-soft: #2a3550;
  --warn-bg: #3a3320;
  --warn-line: #7a6630;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--desk);
  color: var(--ui-text);
  font-family: var(--font);
  font-size: 14px;
}
button, select { font: inherit; color: inherit; }

/* ===== 상단 바 ===== */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 16px;
  background: var(--bar);
  border-bottom: 1px solid var(--bar-line);
}
.bar-left, .bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.monthnav { display: flex; align-items: center; gap: 4px; }
.monthnav { position: relative; }
.monthlabel {
  font-size: 18px; font-weight: 700; min-width: 8.5em; text-align: center; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 3px 8px; cursor: pointer;
}
.monthlabel:hover, .monthlabel[aria-expanded="true"] { border-color: var(--bar-line); background: var(--accent-soft); }

/* 월 선택판 */
.monthpicker {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 26;
  width: 290px;
  padding: 12px;
  background: var(--bar);
  border: 1px solid var(--bar-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(20, 30, 50, .2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mp-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mp-m {
  position: relative;
  padding: 9px 0;
  border: 1px solid var(--bar-line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.mp-m:hover { background: var(--accent-soft); }
.mp-m.saved::after { content: ""; position: absolute; top: 4px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.mp-m.today { border-color: var(--accent); }
.mp-m.cur { background: var(--accent); color: var(--bar); border-color: var(--accent); font-weight: 700; }
.mp-m.cur::after { background: var(--bar); }
.mp-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ui-muted); }
.mp-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-right: 3px; }
.mp-foot .btn { padding: 5px 10px; font-size: 13px; }
.iconbtn {
  border: 1px solid var(--bar-line);
  background: transparent;
  border-radius: 6px;
  width: 34px; height: 34px;
  cursor: pointer;
  color: var(--ui-muted);
}
.iconbtn:hover { color: var(--ui-text); background: var(--accent-soft); }
.iconbtn.small { width: 26px; height: 26px; font-size: 12px; border-color: transparent; }
.savestate {
  font-size: 12.5px;
  color: var(--ui-muted);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px dashed var(--bar-line);
}
.previewpick { display: flex; align-items: center; gap: 6px; color: var(--ui-muted); font-size: 13px; }
.previewpick select {
  padding: 6px 8px;
  border: 1px solid var(--bar-line);
  border-radius: 6px;
  background: var(--bar);
  color: var(--ui-text);
  max-width: 13em;
}
.btn {
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--bar-line);
  background: var(--bar);
  cursor: pointer;
  font-weight: 500;
}
.btn:hover { background: var(--accent-soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
:root[data-theme="dark"] .btn.primary { color: #10141b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #10141b; } }
button:focus-visible, select:focus-visible, [contenteditable]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ===== 안내 줄 ===== */
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px auto 0;
  padding: 8px 12px;
  max-width: 1180px;
  width: calc(100% - 32px);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
}
.notice p { margin: 0; }

/* 사용법 (3단계) */
.guide {
  position: relative;
  margin: 12px auto 0;
  max-width: 1180px;
  width: calc(100% - 32px);
  padding: 14px 44px 12px 16px;
  background: var(--bar);
  border: 1px solid var(--bar-line);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.6;
}
.guide #hintClose { position: absolute; top: 8px; right: 8px; }
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 22px;
}
.steps li { counter-increment: step; display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; }
.steps li::before {
  content: counter(step);
  grid-row: span 3;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bar);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.steps b { font-size: 14.5px; }
.steps p { margin: 2px 0 0; color: var(--ui-muted); }
.steps u { text-decoration: none; color: var(--ui-text); font-weight: 700; }
.steps .eg { font-size: 12.5px; }
.guide .colors { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--bar-line); color: var(--ui-muted); font-size: 12.5px; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ui-text); }
.notice .btn { padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.notice .acts { display: flex; gap: 6px; }
.chip { font-weight: 500; background: #e3f4e1; color: #2d4a2a; border-radius: 4px; padding: 0 3px; white-space: nowrap; }
.chip.y { background: #fff1c7; color: #5a4a14; }
.c-blue { color: var(--accent); font-weight: 700; }
.c-red { color: #e0505a; font-weight: 700; }

/* ===== 자주 쓰는 일정 버튼 줄 ===== */
.snipbar {
  position: sticky;
  top: var(--bar-h, 57px);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  margin: 12px auto 0;
  max-width: 1180px;
  width: calc(100% - 32px);
  padding: 8px 12px;
  background: var(--bar);
  border: 1px solid var(--bar-line);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(20, 30, 50, .06);
}
.snip-label { font-size: 12.5px; color: var(--ui-muted); font-weight: 500; }
.snipchips { display: flex; flex-wrap: wrap; gap: 6px; }
.snipchips:not(.work):not(.colors) { flex: 1; }
.snip.color { font-weight: 700; padding: 4px 10px; }
.snip.c-black { color: var(--ui-text); }
.snip.c-blue { color: #1747b5; }
.snip.c-red { color: #d1242f; }
.snip.color.in { background: var(--accent-soft); border-color: currentColor; }
.snip.color.in::before { content: "✓ "; }
.snip-sep { width: 1px; align-self: stretch; background: var(--bar-line); margin: 0 2px; }
.snip-tools { display: flex; gap: 14px; margin-left: auto; }
.linkbtn.danger { color: #b3261e; }
.snip-help { flex-basis: 100%; margin: 0; }
.snipbar.editing .snip-help::before { content: "지금 고치는 칸에 넣어요 · "; color: var(--accent); font-weight: 700; }
.snip.work { border-style: dashed; }
.snip.in { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.snip.in::before { content: "✓ "; }
.snip {
  border: 1px solid var(--bar-line);
  background: var(--desk);
  color: var(--ui-text);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.snip:hover { border-color: var(--accent); color: var(--accent); }
.snip.on { background: var(--accent); border-color: var(--accent); color: var(--bar); }
body[data-view="people"] .snipbar, body[data-view="login"] .snipbar { display: none; }
.sniprows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sniprow { display: grid; grid-template-columns: 9em 1fr 34px; gap: 8px; align-items: start; }
.sniprow input, .sniprow textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--bar-line); border-radius: 6px; background: var(--bar); color: var(--ui-text); font: inherit; font-size: 13.5px;
}
.sniprow textarea { resize: vertical; line-height: 1.45; }
@media (max-width: 560px) { .sniprow { grid-template-columns: 1fr 34px; } .sniprow textarea { grid-column: 1; } }

/* ===== 책상 위 종이 ===== */
.desk { padding: 16px 16px 48px; }
.sheet-wrap { width: max-content; margin: 0 auto; }

.sheet {
  width: 297mm;
  height: 210mm;
  padding: 8mm 9mm 7mm;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 30, 50, .18), 0 8px 28px rgba(20, 30, 50, .12);
  display: flex;
  flex-direction: column;
  gap: 1.6mm;
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.34;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 제목줄 */
.s-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 4mm; }
.s-title {
  grid-column: 2;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
  padding: 0 2mm;
}
.s-name { grid-column: 3; justify-self: end; font-size: 13px; white-space: nowrap; padding-bottom: 2px; }
.s-name .blank { display: inline-block; min-width: 26mm; border-bottom: 1px solid var(--ink); color: #9aa1ac; text-align: center; font-size: 10px; }
.s-guide { text-align: center; font-size: 11.5px; white-space: nowrap; overflow: hidden; }

/* 달력 */
.cal {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: .6fr repeat(5, 1fr) .6fr;
  border-top: 1.4px solid var(--grid);
  border-left: 1.4px solid var(--grid);
}
.cal > * { border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); min-width: 0; min-height: 0; }
.cal > .c-sat, .cal > .hd.c-sat { border-right-width: 1.4px; }
.cal > .lastrow { border-bottom-width: 1.4px; }
.hd {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  background: #f1f3f6;
  text-align: center;
  padding: 0 1mm;
  white-space: nowrap;
  overflow: hidden;
}
.hd.c-sun { color: var(--red); }
.hd.c-sat { color: var(--sat); }

.cell { display: flex; flex-direction: column; padding: 1mm 1.4mm 1.2mm; position: relative; }
.cell.out { background: var(--out); }
.cell-head { display: flex; align-items: baseline; gap: 1.5mm; font-size: 11.5px; line-height: 1.2; min-height: 1.2em; }
.dnum { font-weight: 700; font-variant-numeric: tabular-nums; }
.c-sun .dnum, .cell.holiday .dnum { color: var(--red); }
.c-sat:not(.holiday) .dnum { color: var(--sat); }
.hname { color: var(--red); font-weight: 700; font-size: 11px; }
.cell-body { position: relative; flex: 1; min-height: 0; overflow: hidden; margin-top: .6mm; }
/* 토·일요일 빈 칸: 왼쪽 아래 → 오른쪽 위 대각선 한 줄 (인쇄에도 나옴, 날짜는 왼쪽 위라 안 가려짐) */
.cell.hatch {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cline x1='0' y1='100' x2='100' y2='0' stroke='%23555b66' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.cell.hatch.editing { background-image: none; }

/* 여러 줄 텍스트 (칸·안내문 공통) */
.lines { white-space: pre-wrap; }
.ln { min-height: 1.34em; }
.ln.blue { color: var(--blue); }
.ln.red { color: var(--red); }
.ln.tagged { border-radius: 2px; }
.ln .tg { color: var(--tagtext); }
.ed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: transparent;
  caret-color: var(--ink);
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.ed::selection { background: rgba(23, 71, 181, .28); color: transparent; }

/* 하단 안내문 */
.s-foot { display: flex; flex-direction: column; gap: .8mm; }
.s-notes { position: relative; min-height: 1.34em; max-height: 13mm; overflow: hidden; }
.s-mine { font-size: 11.5px; font-weight: 700; }
.s-mine.ghost { font-weight: 400; color: #9aa1ac; font-size: 10px; }

/* 편집 상태 표시 (화면에서만) */
.editable { cursor: text; }
.cell.editable:hover, .s-notes.editable:hover, [contenteditable]:hover { box-shadow: inset 0 0 0 1.5px #a9bde8; }
.cell.editable:not(.editing):hover::after {
  content: "눌러서 고치기";
  position: absolute;
  right: 1mm; top: .8mm;
  font-size: 9px;
  color: #fff;
  background: #1747b5;
  border-radius: 3px;
  padding: 0 4px;
  pointer-events: none;
}
.cell.editing, .s-notes.editing { box-shadow: inset 0 0 0 2px var(--accent) !important; }
[contenteditable]:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.cell.overflow .cell-body { box-shadow: inset 0 -2px 0 #e38b8b; }
.picking .cell.in { cursor: crosshair; }
.picking .cell.in:hover { box-shadow: inset 0 0 0 2px var(--red); background: #fff7f7; }
.cell.picked { box-shadow: inset 0 0 0 2px var(--red) !important; background: #fff1f1; }
.cell.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: #dfe8fb; } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .cell.flash { animation: none; } }

/* 칸 보조 버튼 */
.celltools {
  position: fixed;
  z-index: 30;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bar);
  border: 1px solid var(--bar-line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(20, 30, 50, .18);
}
.celltools button {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.celltools button:hover { background: var(--accent-soft); color: var(--accent); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #1f2430;
  color: #f1f3f6;
  font-size: 13.5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  max-width: calc(100% - 32px);
}
.toast button { background: none; border: 0; color: #9ec0ff; font-weight: 700; cursor: pointer; padding: 0; }


/* ===== 화면 전환 ===== */
body[data-view="login"] .bar,
body[data-view="login"] #hint,
body[data-view="login"] #notice,
body[data-view="login"] .desk,
body[data-view="people"] #hint,
body[data-view="people"] .desk,
body[data-view="people"] .monthnav,
body[data-view="people"] .previewpick,
body[data-view="people"] .printwrap,
body[data-view="people"] .popwrap,
body[data-view="people"] #helpBtn,
body[data-view="people"] #peopleBtn { display: none !important; }
body.loading .sheet { opacity: .45; transition: opacity .2s; }

/* 저장 상태 */
.savestate[data-kind="ok"] { color: #2c7a45; border-style: solid; border-color: #b9dcc4; }
.savestate[data-kind="busy"] { color: var(--ui-muted); }
.savestate[data-kind="bad"] { color: #b3261e; border-style: solid; border-color: #eab5b1; font-weight: 700; }
.holidaywarn {
  font-size: 12px;
  color: #8a5a00;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 999px;
  padding: 2px 9px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

/* 칸 오른쪽 위 근무시간 (고치는 화면에서만) */
.cell-head .wh { margin-left: auto; font-size: 9px; font-weight: 500; color: #6a7383; background: #f1f3f6; border-radius: 3px; padding: 0 3px; white-space: nowrap; }
.cell-head .wh:empty { display: none; }
.cell.match { box-shadow: inset 0 0 0 2px #e3b400; background: #fffbe6; }

/* 자동 완성 */
.suggest {
  position: fixed;
  z-index: 31;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  color: #16191f;
  border: 1px solid var(--bar-line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(20, 30, 50, .2);
  font-size: 13px;
  line-height: 1.4;
  max-height: 260px;
  overflow-y: auto;
}
.suggest li { padding: 4px 8px; border-radius: 5px; cursor: pointer; }
.suggest li[data-i]:hover, .suggest li.on { background: #e4ebfa; }
.suggest li .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest li.hint { cursor: default; color: #7a8290; font-size: 11.5px; padding-top: 6px; border-top: 1px dashed #d6dbe3; margin-top: 2px; }

/* 꼬리표 딱지 (고치는 화면, 인쇄에는 안 나옴) */
.ln .tgc {
  display: inline-block;
  font-size: .78em;
  line-height: 1.25;
  font-weight: 700;
  color: #3b4452;
  background: rgba(255, 255, 255, .7);
  border-radius: 3px;
  padding: 0 3px;
  margin-right: 3px;
  vertical-align: .08em;
}

/* 개인별 인쇄 창 */
.popwrap { position: relative; }
.printwrap { position: relative; }
.printpanel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 25;
  width: min(330px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bar);
  border: 1px solid var(--bar-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(20, 30, 50, .2);
  font-size: 13.5px;
  line-height: 1.5;
}
.printpanel p { margin: 0; }
.printpanel .check { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.printpanel small { color: var(--ui-muted); }
.printpanel .acts { display: flex; justify-content: flex-end; gap: 6px; }
.printpanel .field { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.printpanel select {
  padding: 6px 8px; border: 1px solid var(--bar-line); border-radius: 6px; background: var(--bar); color: var(--ui-text); font: inherit;
}
.printpick {
  max-height: 220px; overflow-y: auto; border: 1px solid var(--bar-line); border-radius: 6px; padding: 6px 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px;
}
.printpick label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.pp-acts { grid-column: 1 / -1; display: flex; gap: 12px; padding-bottom: 4px; border-bottom: 1px dashed var(--bar-line); margin-bottom: 2px; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; font-size: 12.5px; }
.pp-head { display: flex; align-items: center; justify-content: space-between; }
.small { font-size: 12.5px; }
.hourspanel, .historypanel, .replacepanel { width: min(380px, calc(100vw - 32px)); }
.printpanel .field input { padding: 7px 9px; border: 1px solid var(--bar-line); border-radius: 6px; background: var(--bar); color: var(--ui-text); font: inherit; font-weight: 400; }
.hours-wrap { max-height: 50vh; overflow-y: auto; border: 1px solid var(--bar-line); border-radius: 6px; }
.hours { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hours th { position: sticky; top: 0; background: var(--bar); text-align: left; font-weight: 500; color: var(--ui-muted); font-size: 12.5px; padding: 5px 8px; border-bottom: 1px solid var(--bar-line); }
.hours td { padding: 4px 8px; border-bottom: 1px solid var(--bar-line); }
.hours .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.warnline { color: #8a5a00; }
.historylist { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; }
.historylist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bar-line); font-size: 13.5px; }
.historylist .btn { padding: 4px 10px; font-size: 12.5px; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 인쇄용 종이 묶음: 화면에서는 안 보이는 곳에 두고 글자 크기만 맞춤 */
.printarea { position: absolute; left: -10000px; top: 0; }
.s-roster { position: relative; max-height: 24mm; overflow: hidden; border-top: 1px dashed #9aa1ac; padding-top: .6mm; }
.s-name b { font-size: 15px; }

/* ===== 참여자 화면 ===== */
.peopleview {
  max-width: 760px;
  margin: 16px auto 64px;
  padding: 20px 20px 24px;
  width: calc(100% - 32px);
  background: var(--bar);
  border: 1px solid var(--bar-line);
  border-radius: 12px;
  line-height: 1.55;
}
.peopleview h1 { font-size: 22px; margin: 0; }
.peopleview h2 { font-size: 17px; margin: 28px 0 4px; padding-top: 18px; border-top: 1px solid var(--bar-line); }
.pv-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--bar-line); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs [role="tab"] {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ui-muted);
  font-weight: 500;
}
.tabs [role="tab"]:hover { background: var(--accent-soft); color: var(--ui-text); }
.tabs [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--bar); }
.pv-titlerow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 18px; }
.pv-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
label.btn { display: inline-block; }
.peopleview.dropping { outline: 3px dashed var(--accent); outline-offset: -8px; }
.importbox {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.importbox p { margin: 0; }
.importlist { margin: 0; padding-left: 1.4em; font-size: 13.5px; }
.importbox .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.gtable tr > td:first-child { width: 32%; }
.groupnotes { margin-top: 12px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.groupcounts { margin: 0; padding-left: 1.2em; color: var(--ui-text); }
.groupnotes .warn { margin: 0; padding: 6px 10px; border-radius: 6px; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.pv-help { color: var(--ui-muted); font-size: 13.5px; margin: 10px 0 12px; }
.muted { color: var(--ui-muted); }
.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { text-align: left; font-weight: 500; color: var(--ui-muted); font-size: 12.5px; padding: 4px 6px; border-bottom: 1px solid var(--bar-line); }
.ptable td { padding: 0; border-bottom: 1px solid var(--bar-line); }
.ptable td.num, .ptable th.num { width: 2.6em; text-align: right; padding-right: 10px; color: var(--ui-muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ptable td:last-child { width: 34px; text-align: center; }
.ptable .pause { width: 5.5em; text-align: center; font-size: 12.5px; color: var(--ui-muted); white-space: nowrap; }
.ptable .pause label { cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.ptable tr.paused input:not([type="checkbox"]) { color: var(--ui-muted); text-decoration: line-through; }
.ptable input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ui-text);
  font: inherit;
  padding: 8px 6px;
}
.ptable input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.ptable tr > td:nth-child(2) { width: 34%; }
.pv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.tagsummary { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.tagsummary .sum { padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); }
.tagsummary .sum.muted { background: transparent; border: 1px dashed var(--bar-line); }
.holidaylist { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.holidaylist li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.holidaylist .date { font-variant-numeric: tabular-nums; color: var(--ui-muted); }
.holidayform { display: flex; flex-wrap: wrap; gap: 8px; }
.holidayform input, .logincard input {
  padding: 7px 9px;
  border: 1px solid var(--bar-line);
  border-radius: 6px;
  background: var(--bar);
  color: var(--ui-text);
  font: inherit;
}
.holidayform input:not([type="date"]) { flex: 1; min-width: 10em; }

/* ===== 로그인 ===== */
.loginview { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.logincard {
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  background: var(--bar);
  border: 1px solid var(--bar-line);
  border-radius: 12px;
}
.logincard h1 { margin: 0; font-size: 22px; }
.logincard p { margin: 0; color: var(--ui-muted); font-size: 13.5px; }
.logincard .btn { padding: 9px; }
.logincard .err { color: #b3261e; min-height: 1.4em; }

/* ===== 인쇄 ===== */
@page { size: A4 landscape; margin: 0; }
@media print {
  .ui { display: none !important; }
  body, .desk { background: #fff; padding: 0; margin: 0; }
  .sheet-wrap { zoom: 1 !important; width: auto; margin: 0; }
  .sheet { box-shadow: none; break-after: page; height: 209.5mm; overflow: hidden; }
  .sheet:last-child { break-after: auto; }
  body.printing .desk { display: none !important; }
  body.printing .printarea { position: static; }
  .cell.out { background: #fff; }
  .ln.tagged { background: none !important; }
  .editable:hover, .cell.editing, .s-notes.editing { box-shadow: none !important; }
  .cell.editable:hover::after { content: none !important; }
  .cell-head .wh { display: none; }
  .cell.match { box-shadow: none; background: none; }
  .s-name .blank, .s-mine.ghost { visibility: hidden; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
