/* 보고싫슈 — 결재판: 종이 · 먹 · 결재펜 파랑 · 인주 빨강 · 형광펜 (밝은 화면 전용) */
:root {
  --bg: #f2f4f1; --panel: #ffffff; --line: #d8ddd6; --rule: #e6eae4; --text: #1d2730; --muted: #66717a;
  --accent: #2443a0; --accent-soft: #e7ecf8; --accent-text: #ffffff;
  --seal: #d23a3a; --seal-soft: #fbe9e8; --hl: #ffe45c;
  --ok: #1d7a4c; --warn: #9a5a00; --warn-soft: #fff3dc; --err: #c0332f;
  color-scheme: light; /* 늘 밝은 화면 */
  --display: "Black Han Sans", "IBM Plex Sans KR", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid; grid-template-columns: 340px 1fr; background: var(--bg); color: var(--text);
  font: 15px/1.6 "IBM Plex Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  word-break: keep-all;
}
[hidden] { display: none !important; }
aside { background: var(--panel); border-right: 1px solid var(--line); padding: 20px; overflow-y: auto; }
main { padding: 24px; overflow-y: auto; min-width: 0; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 13px; margin: 0 0 8px; color: var(--muted); font-weight: 600; }
section { margin-bottom: 22px; }
label { display: block; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
input, select, textarea, button { font: inherit; color: var(--text); }
input, select {
  display: block; width: 100%; margin-top: 4px; padding: 7px 9px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
}
button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.linklike { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row.time label { flex: 1; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.hint.first { margin-top: 0; }
.ok { color: var(--ok); }
.err { color: var(--err); }
.muted { color: var(--muted); }

/* 머리 */
.apphead { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.who button { padding: 3px 10px; font-size: 12px; }

/* 자동 보고 카드 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
aside .card { background: var(--bg); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-row strong { font-size: 15px; }
.switch-row .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 46px; height: 26px; margin: 0; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 13px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + span { opacity: .45; }
.alert { margin-top: 12px; padding: 8px 10px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font-size: 12px; }
.status { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0; font-size: 13px; }
.status dt { color: var(--muted); }
.status dd { margin: 0; overflow-wrap: anywhere; }
#autoCard .row button { flex: 1; }

/* WBS */
#drop {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: 8px; background: var(--bg);
}
#drop.over { border-color: var(--accent); }
#drop span { font-size: 12px; color: var(--muted); }
.wbslist { list-style: none; margin: 8px 0 0; padding: 0; }
.wbslist li { display: flex; align-items: flex-start; gap: 8px; padding: 8px; margin-bottom: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.wbslist .grow { flex: 1; min-width: 0; }
.wbslist input { margin: 0 0 2px; padding: 4px 6px; background: var(--panel); font-size: 13px; }
.wbslist small { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.wbslist button { padding: 2px 8px; }
.warnings { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: var(--warn); }
.history { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.history li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.footnote { margin: 0; }

/* 본문 */
.mainhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.maintitle { font-size: 16px; color: var(--text); margin: 0; }
.maintitle.plan { margin-top: 32px; }
label.inline { display: flex; align-items: center; gap: 6px; margin: 0; }
label.inline input { width: auto; margin: 0; background: var(--panel); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.badge:empty { display: none; }
.badge.edited { background: var(--warn-soft); color: var(--warn); }
.formhint { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
#cards .card { margin-bottom: 12px; }
.cardtitle { font-weight: 600; margin-bottom: 8px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field label { margin-bottom: 4px; }
textarea {
  width: 100%; min-height: 150px; resize: vertical; padding: 10px; line-height: 1.6;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
}
.actions { align-items: center; }
#msg { font-size: 13px; color: var(--muted); }
#msg.ok { color: var(--ok); }
#msg.err { color: var(--err); }

/* 일자별 보고 달력 (월~금) */
.calhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.calnav { display: flex; align-items: center; gap: 6px; }
.calnav strong { min-width: 96px; text-align: center; font-size: 15px; }
.calnav button { padding: 4px 10px; }
.legend { margin-left: 8px; white-space: nowrap; }
.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
#calDow { margin-bottom: 6px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-day {
  display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: left;
  min-height: 96px; padding: 6px 8px; background: var(--panel); border-radius: 8px; overflow: hidden;
}
.cal-day.out { opacity: .4; }
.cal-day.actual { border-left: 3px solid var(--ok); }
.cal-day.missed { border-left: 3px solid var(--err); }
.cal-day.plan-past .cal-items { color: var(--muted); }
.calload { margin: 0 0 8px; font-size: 12px; color: var(--muted); min-height: 1em; }
.calload:empty { display: none; }
.badge.done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.missed { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.cal-day.has { border-left: 3px solid var(--accent); }
.cal-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day.selected { background: var(--accent-soft); }
.cal-num { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; }
.cal-num .st { margin-left: auto; }
.cal-items { font-size: 12px; line-height: 1.4; color: var(--text); min-width: 0; }
.cal-items > div { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cal-items > div + div { margin-top: 2px; }
.cal-items .more { color: var(--muted); }
.cal-items.none { color: var(--muted); }
.st { font-weight: 700; color: var(--muted); }
.st.ok { color: var(--ok); }
.st.err { color: var(--err); }
.tag { font-size: 10px; font-weight: 500; color: var(--accent-text); background: var(--accent); padding: 0 5px; border-radius: 8px; }
.tag.edited { background: var(--warn); }

/* 미리보기 창 */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 24px 16px; z-index: 10; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: 100%; max-width: 960px; max-height: 88vh; display: flex; flex-direction: column; padding: 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
#modalSub { margin-bottom: 12px; }
#modalBody { overflow: auto; }
.pv-render { font-size: 13px; background: #fff; color: #000; padding: 12px; border-radius: 6px; }
.pv-render table { border-collapse: collapse; width: 100%; margin-bottom: 10px; }
.pv-render td, .pv-render th { border: 1px solid #555; padding: 4px 8px; vertical-align: top; }

/* 로그인 */
body.login-page { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
.login-box h1 { font-size: 20px; margin: 0 0 6px; }
.login-sub { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box label { margin: 0; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
label.check input { width: auto; margin: 0; }
.login-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.login-box .primary { margin-top: 4px; padding: 10px; }
.login-msg { min-height: 20px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.login-msg.err { color: var(--err); }
.login-msg.ok { color: var(--ok); }

@media (max-width: 860px) {
  html, body { height: auto; }
  body { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  main { padding: 16px; }
  .cols { grid-template-columns: 1fr; }
  .cal { gap: 4px; }
  .cal-day { min-height: 72px; padding: 4px 5px; }
  .cal-items { font-size: 10.5px; }
  .cal-items > div { -webkit-line-clamp: 1; }
  .cal-items > div:nth-child(n+3) { display: none; }
  .cal-num .tag { display: none; }
  .legend { display: block; margin: 4px 0 0; }
}
.wbslist label.basedate { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; font-size: 11px; }
.wbslist label.basedate input { margin: 0; padding: 3px 6px; font-size: 12px; }
.wbslist label.basedate.need { color: var(--warn); font-weight: 600; }
.cal-asg { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-asg.k-leave, .cal-asg.k-off { background: var(--warn-soft); color: var(--warn); }
.cal-asg.k-internal { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.cal-asg.k-waiting { background: var(--bg); color: var(--muted); }
.cal-asg.nowbs { outline: 1px dashed var(--warn); }
.cal-day.leave { background: var(--bg); }
.wbslist label.assignkey { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; font-size: 11px; }
.wbslist label.assignkey select { margin: 0; padding: 3px 6px; font-size: 12px; background: var(--panel); }
.worksbox { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.worksbox-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.worksbox-head button { padding: 2px 10px; font-size: 12px; }
.workslist { list-style: none; margin: 0; padding: 0; font-size: 12px; line-height: 1.5; }
.workslist li { padding: 2px 0; overflow-wrap: anywhere; }
.workslist li.small { font-size: 11px; margin-top: 4px; }
label.check.notify { margin: 4px 0 2px; font-size: 13px; }
#notifyNote { margin-bottom: 10px; }


.mrow { margin: 0 0 16px; }
.mrow > strong { display: block; margin-bottom: 6px; }
.mcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mcol label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.mcol pre { margin: 0; white-space: pre-wrap; word-break: keep-all; font: 13px/1.5 inherit; font-family: inherit; padding: 8px; border: 1px solid var(--line, #d9dee7); border-radius: 8px; min-height: 60px; }
#monthlyCard { margin-top: 12px; }
@media (max-width: 720px) { .mcols { grid-template-columns: 1fr; } }

/* ---------- 왼쪽 메뉴 ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 19px; letter-spacing: -0.3px; }
.tagline { font-size: 12px; color: var(--muted); }
.who { padding-top: 6px; border-top: 1px solid var(--line); }
#autoCard { margin-bottom: 18px; }
.cardhead { margin-bottom: 10px; }
#autoCard .switch-row + .switch-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.quick { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 6px; align-items: center; margin: 4px 0 12px; }
.quick .alabel { font-size: 12px; color: var(--muted); padding-right: 4px; white-space: nowrap; }
.quick button { padding: 6px 8px; font-size: 13px; }
#postNow, #monthlyPost { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.status dd.err { color: var(--err); }
.duties { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.duty { display: flex; gap: 7px; align-items: center; margin: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1.3; color: var(--text); background: var(--panel); }
.duty input { flex: none; width: auto; margin: 0; accent-color: var(--accent); }
.duty span { flex: 1; min-width: 0; }
.duty.on { border-color: var(--accent); background: var(--accent-soft); }
.fold { border-top: 1px solid var(--line); padding: 2px 0; }
.fold:last-of-type { border-bottom: 1px solid var(--line); }
.fold > summary { list-style: none; cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary .count { margin-left: auto; font-weight: 400; font-size: 12px; }
.fold[open] { padding-bottom: 12px; }
.fold .worksbox { margin-top: 0; }
.fold #drop { margin-top: 10px; }
.fold .footnote { margin-top: 8px; }
@media (max-width: 420px) { .duties { grid-template-columns: 1fr; } }

/* 보고 안 한 것 */
.missedbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; }
.missedbar button { padding: 4px 10px; font-size: 12px; border-color: var(--warn); color: var(--warn); background: transparent; flex: none; }
.mlist { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow: auto; }
.mitem { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mitem label.check { margin: 0; align-items: flex-start; }
.mitem label.check small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.mright { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.mstatus.ok { color: var(--ok); } .mstatus.err { color: var(--err); }
.mbody { grid-column: 1 / -1; }
.mbody pre { margin: 6px 0 0; white-space: pre-wrap; font: 12px/1.5 inherit; font-family: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.mfoot { justify-content: flex-end; margin-top: 12px; }
/* ---------- 디자인: 결재판 (읽기 쉬운 판) ---------- */
/* 로고에만 굵은 제목 글꼴, 나머지는 IBM Plex Sans KR */
.brand h1 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: 0; line-height: 1.1; }
.tagline, .who, .hint, .switch-row .sub, .quick .alabel, label, .history, .workslist, .wbslist small, .cal-dow, .formhint { font-size: 13px; }
h2 { font-size: 14px; font-weight: 600; }
button { border-radius: 7px; min-height: 34px; }
button.primary, #postNow { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
aside { background: var(--bg); }
aside .card { background: var(--panel); border-radius: 12px; padding: 16px; }

/* 자동 보고 카드 */
.nextline { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.nextline span { font-size: 13px; color: var(--muted); }
.nextline strong { font-size: 20px; font-weight: 700; }
#autoCard .switch-row { margin-top: 14px; }
#autoCard .switch-row strong { font-size: 15px; }
.row.two { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 8px; }
.mini { display: flex; gap: 12px; margin-top: 4px; }
.linkbtn { border: 0; background: none; padding: 0; min-height: 0; color: var(--accent); font-size: 13px; font-weight: 600; }
.linkbtn:hover:not(:disabled) { text-decoration: underline; }
.lastline { margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lastline span { color: var(--text); }
.lastline span.ok { color: var(--ok); } .lastline span.err { color: var(--err); }
.missedbar { margin: 0 0 4px; }

/* 오늘 보고 */
.dayhero { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.dayhero-text { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.daytitle { font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--text); margin: 0; }
.datepick { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.datepick input { width: auto; margin: 0; padding: 3px 8px; font-size: 13px; background: var(--panel); }
.stamp:empty { display: none; }
.stamp {
  flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  border: 3px double var(--muted); color: var(--muted); font-weight: 700; font-size: 14px; line-height: 1.15;
  text-align: center; padding: 6px; transform: rotate(-8deg); user-select: none;
}
.stamp.done, .stamp.miss { border-color: var(--seal); color: var(--seal); }
.stamp.plan { border: 2px dashed var(--accent); color: var(--accent); }
.stamp.edited { border-color: var(--warn); color: var(--warn); }
.formhint { color: var(--muted); margin: 4px 0 14px; }
#cards .card { border-radius: 10px; padding: 16px 18px; }
.cardtitle { font-size: 15px; }
#cards .field > label { font-weight: 600; color: var(--text); font-size: 13px; margin-bottom: 6px; }
#cards textarea { font-size: 15px; line-height: 1.65; min-height: 120px; padding: 10px 12px; background: var(--bg); overflow: hidden; resize: none; }
#cards textarea:read-only { background: var(--panel); }

/* 달력 */
.maintitle { font-size: 18px; font-weight: 700; }
.calnav strong { font-size: 16px; font-weight: 700; min-width: 104px; white-space: nowrap; }
.cal-day { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; min-height: 104px; padding: 8px 9px; }
.cal-day:hover { border-color: var(--accent); }
.cal-day.actual, .cal-day.missed, .cal-day.has { border-left-width: 1px; border-left-color: var(--line); }
.cal-day.missed { border-color: var(--seal); }
.cal-day.today { box-shadow: none; border-color: var(--text); }
.cal-day.today .cal-num > span:first-child { background: linear-gradient(transparent 55%, var(--hl) 55%); padding: 0 2px; }
.cal-day.selected { background: var(--accent-soft); border-color: var(--accent); }
.cal-day.leave { background: var(--bg); }
.cal-day.out { opacity: 1; background: transparent; }
.cal-day.out .cal-num, .cal-day.out .cal-items, .cal-day.out .cal-asg { opacity: .7; }
.cal-num { font-size: 15px; gap: 6px; }
.cal-num .st { margin-left: auto; font-size: 15px; }
.cal-dow-inline { display: none; }
.cal-items { font-size: 13px; line-height: 1.45; }
.cal-asg { font-size: 12px; border-radius: 4px; padding: 1px 6px; }
.tag { background: var(--text); color: var(--panel); font-size: 11px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 9px; line-height: 1.5; }
.pill.miss { background: var(--seal-soft); color: var(--seal); }
.cal-num .pill { margin-left: auto; }
.legend { color: var(--muted); }
.legend .pill { margin-left: 6px; }

@media (max-width: 860px) {
  body { display: flex; flex-direction: column; }
  main { order: -1; }
  .daytitle { font-size: 22px; }
  .stamp { width: 62px; height: 62px; font-size: 12px; }
  .calhead { align-items: center; }
}
/* 폰: 달력을 날짜별 목록으로 */
@media (max-width: 600px) {
  #calDow { display: none; }
  .cal { grid-template-columns: 1fr; gap: 6px; }
  .cal-day.out { display: none; }
  .cal-day { min-height: 0; padding: 10px 12px; display: grid; grid-template-columns: 64px 1fr; gap: 2px 10px; }
  .cal-num { grid-row: span 2; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 18px; }
  .cal-num .st, .cal-num .pill { margin-left: 0; }
  .cal-num .tag { display: inline-block; }
  .cal-dow-inline { display: inline; font-size: 13px; font-weight: 400; color: var(--muted); }
  .cal-asg { justify-self: start; max-width: 100%; }
  .cal-items { font-size: 14px; }
  .cal-items > div { -webkit-line-clamp: 2; }
  .cal-items > div:nth-child(n+3) { display: -webkit-box; }
  .calnav { flex-wrap: nowrap; }
  .legend { display: block; margin: 6px 0 0; }
}

/* ---------- 냥비서: 큐티 테마 (배치는 그대로, 색·모서리·글꼴만) ---------- */
:root {
  --bg: #fff5f7; --panel: #ffffff; --line: #f6d9e1; --text: #3a2b2e; --muted: #85666d;
  --accent: #d6336c; --accent-soft: #ffe3ec; --accent-text: #ffffff;
  --seal: #e8590c; --seal-soft: #fff0e4; --hl: #ffd1e0;
  --ok: #2b8a3e; --warn: #a65c00; --warn-soft: #fff3dc; --err: #d9480f;
  --display: "Jua", "IBM Plex Sans KR", sans-serif;
  --cute: "Jua", "IBM Plex Sans KR", sans-serif;
}
body { background: var(--bg); }
aside { background: #fff0f4; border-right: 2px dashed var(--line); }
.brand { gap: 10px; }
.catlogo { flex: none; animation: nod 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes nod { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(-8deg); } 96% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .catlogo { animation: none; } }
.brand h1 { font-family: var(--cute); font-size: 30px; color: var(--accent); line-height: 1; }
.tagline { color: var(--muted); }
h2 { font-family: var(--cute); font-weight: 400; font-size: 17px; color: var(--text); }
.daytitle, .maintitle, .calnav strong, .nextline strong, .cardtitle { font-family: var(--cute); font-weight: 400; }
.daytitle { font-size: 30px; }
.maintitle { font-size: 22px; }
.nextline strong { font-size: 22px; color: var(--accent); }
aside .card, #cards .card { border: 2px solid var(--line); border-radius: 20px; box-shadow: 0 4px 0 var(--line); }
.cardtitle { font-size: 17px; }
button { border-radius: 999px; border-width: 1.5px; }
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button.primary, #postNow { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 3px 0 #a61e4d; }
button.primary:hover:not(:disabled), #postNow:hover:not(:disabled) { color: #fff; filter: brightness(1.05); }
button.primary:active, #postNow:active { transform: translateY(2px); box-shadow: 0 1px 0 #a61e4d; }
.linkbtn { border-radius: 0; box-shadow: none; }
.linkbtn:active { transform: none; }
input, select, textarea, #cards textarea { border-radius: 14px; border: 1.5px solid var(--line); }
#cards textarea { background: #fffafb; }
.switch span { background: #f1c7d3; }
.duty { border-radius: 999px; border: 1.5px solid var(--line); }
.duty.on { background: var(--accent-soft); border-color: var(--accent); }
.missedbar { border-radius: 16px; }
.fold > summary::before { content: "🐾"; font-size: 12px; transform: none !important; opacity: .55; }
.fold[open] > summary::before { opacity: 1; }
.stamp { border-color: var(--accent); color: var(--accent); font-family: var(--cute); font-weight: 400; font-size: 16px; }
.stamp.done { border-color: var(--accent); color: var(--accent); background: radial-gradient(circle, #fff 58%, var(--accent-soft) 59%); }
.stamp.miss { border-color: var(--seal); color: var(--seal); }
.cal-day { border: 1.5px solid var(--line); border-radius: 16px; }
.cal-day:hover { border-color: var(--accent); }
.cal-day.today { border-color: var(--accent); border-width: 2px; }
.cal-day.selected { background: var(--accent-soft); }
.cal-num { font-family: var(--cute); font-weight: 400; font-size: 17px; }
.cal-asg { border-radius: 999px; padding: 1px 8px; }
.cal-asg.k-internal { background: #e6f6ea; color: var(--ok); }
.tag { background: var(--accent); color: #fff; border-radius: 999px; }
.pill.miss { border-radius: 999px; }
.modal-box { border-radius: 24px; border: 2px solid var(--line); }
.login-box { border: 2px solid var(--line); border-radius: 24px; box-shadow: 0 6px 0 var(--line); }
.login-box .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.login-box h1 { font-family: var(--cute); font-weight: 400; font-size: 32px; color: var(--accent); margin: 0; }
@media (max-width: 860px) { .stamp { width: 66px; height: 66px; font-size: 13px; } }

/* ---------- 왼쪽 메뉴 정리: 카드는 스위치 2개 + 버튼 한 줄, 나머지는 한 줄씩 ---------- */
aside { display: flex; flex-direction: column; gap: 16px; }
aside > section, #autoCard { margin: 0; }
.apphead { margin-bottom: 0; }
#autoCard .switch-row { margin-top: 0; padding: 10px 0; }
#autoCard .switch-row + .switch-row { margin-top: 0; padding-top: 10px; border-top: 1px dashed var(--line); }
#autoCard .switch-row .sub { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; }
#autoCard .switch-row .sub .linkbtn { font-size: 13px; }
#autoCard .row.two { margin-top: 10px; }
#autoCard .lastline { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.missedbar { margin: 0 0 6px; }
.alert { margin: 0 0 8px; }
.assignline { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 13px; color: var(--muted); }
.assignline strong { color: var(--text); font-weight: 600; margin-right: 4px; }
.assignline button { flex: none; min-height: 30px; padding: 3px 12px; font-size: 13px; color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
aside h2 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.h2sub { font-family: "IBM Plex Sans KR", sans-serif; font-size: 12px; color: var(--muted); }
.duties { display: flex; flex-wrap: wrap; gap: 6px; }
.duty { position: relative; padding: 6px 12px; font-size: 13px; }
.duty input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.duty:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.duty.on { color: var(--accent); font-weight: 600; }
.duty.on span::before { content: "✓ "; }
aside .fold { border-top: 1px dashed var(--line); }
aside .fold:last-of-type { border-bottom: 1px dashed var(--line); }
aside .fold + .fold { margin-top: -16px; }
aside .fold > summary { font-size: 14px; color: var(--text); }
/* 공휴일: 낮잠 자는 냥이 칸 */
.cal-day.holiday {
  background: radial-gradient(circle at 88% 82%, #ffe3ec 0 18%, transparent 19%), repeating-linear-gradient(135deg, #fff7f9 0 10px, #fff0f4 10px 20px);
  border-style: dashed; border-color: #f5b8c9;
}
.cal-day.holiday .cal-num > span:first-child { color: var(--accent); }
.cal-asg.holiday { background: #fff; color: var(--accent); border: 1.5px solid #f5b8c9; }
.cal-items.holinap { display: flex; align-items: center; gap: 6px; color: var(--accent); font-family: var(--cute); font-size: 14px; }
.cal-items.holinap .nap { line-height: 0; flex: none; }
.cal-items.holinap .nap svg { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .cal-day.holiday .nap { animation: nap 2.8s ease-in-out infinite; display: inline-block; }
  @keyframes nap { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-6deg); } }
}

/* 배정별 담당업무 */
.dutyfor { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dutyfor select { flex: 1; min-width: 0; margin: 0; background: var(--panel); text-overflow: ellipsis; }
.dutyfor .linkbtn { flex: none; min-height: 34px; }
.duties.inherit .duty.on { border-style: dashed; background: var(--panel); }

/* 배정표 변경 알림(바뀐 게 있을 때만) */
.changebox { padding: 12px 14px; border: 2px solid #f5b8c9; border-radius: 18px; background: #fff; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.changebox > strong { font-family: var(--cute); font-weight: 400; font-size: 16px; color: var(--accent); }
.changebox .chg { display: flex; flex-wrap: wrap; gap: 2px 8px; overflow-wrap: anywhere; }
.changebox .chg b { color: var(--accent); }
.changebox .ask { padding-top: 8px; border-top: 1px dashed var(--line); flex-direction: column; gap: 6px; }
.changebox .ask button { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.changebox > .linkbtn { align-self: flex-end; min-height: 34px; }
.dutyspan { margin: -2px 0 8px 12px; font-size: 13px; color: var(--muted); }
