/* 9to6 워크 — 밝은 블루그레이 배경, 둥근 흰 카드, 파란 포인트 */
:root {
  --bg: #eef2f9; --surface: #ffffff; --surface-2: #f5f7fb; --surface-3: #eceff6; --line: #e3e8f2;
  --text: #1f2a44; --muted: #8a94ad; --muted-2: #5b6785;
  --brand: #3b5bdb; --brand-2: #e3e9fd; --brand-3: #f0f3fe; --brand-text: #ffffff;
  --ok: #1f9d55; --ok-bg: #e3f6ec; --warn: #b7791f; --warn-bg: #fdf3e1; --bad: #e5533d; --bad-bg: #fde9e6;
  --info: #3b5bdb; --info-bg: #e3e9fd;
  --bubble-in: #e6eefc; --bubble-out: #eef0f4;
  --radius: 20px; --radius-sm: 12px;
  --shadow: 0 2px 6px rgb(31 42 68 / .04), 0 8px 24px rgb(31 42 68 / .05);
  --shadow-pop: 0 6px 20px rgb(59 91 219 / .16);
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: light;
}
/* 다크: 기기 설정을 따르되, 내 정보 → 화면에서 밝게/어둡게를 고르면 그것 (html[data-theme]) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151f; --surface: #191e2b; --surface-2: #1f2534; --surface-3: #262d3f; --line: #2b3346;
    --text: #e6eaf3; --muted: #8590aa; --muted-2: #a9b2c8;
    --brand: #7d97ff; --brand-2: #26304d; --brand-3: #1f2740; --brand-text: #0f1320;
    --ok: #5fd394; --ok-bg: #173325; --warn: #f1bb62; --warn-bg: #3a2e17; --bad: #ff8a78; --bad-bg: #3d1f1b;
    --info: #7d97ff; --info-bg: #26304d; --bubble-in: #24304d; --bubble-out: #262d3f;
    --shadow: 0 2px 10px rgb(0 0 0 / .25); --shadow-pop: 0 6px 20px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #11151f; --surface: #191e2b; --surface-2: #1f2534; --surface-3: #262d3f; --line: #2b3346;
    --text: #e6eaf3; --muted: #8590aa; --muted-2: #a9b2c8;
    --brand: #7d97ff; --brand-2: #26304d; --brand-3: #1f2740; --brand-text: #0f1320;
    --ok: #5fd394; --ok-bg: #173325; --warn: #f1bb62; --warn-bg: #3a2e17; --bad: #ff8a78; --bad-bg: #3d1f1b;
    --info: #7d97ff; --info-bg: #26304d; --bubble-in: #24304d; --bubble-out: #262d3f;
    --shadow: 0 2px 10px rgb(0 0 0 / .25); --shadow-pop: 0 6px 20px rgb(0 0 0 / .4);
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---- 레이아웃 */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-radius: 0 28px 28px 0; padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; }
.brand b { display: block; font-size: 17px; letter-spacing: -.3px; }
.brand small { display: block; color: var(--muted); font-size: 11px; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #4c6ef5, #3b5bdb); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.logo.big { width: 64px; height: 64px; border-radius: 20px; font-size: 32px; margin-bottom: 14px; }
.nav .group { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 1px; color: var(--muted); padding: 14px 8px 8px; text-transform: uppercase; }
.nav .group::after { content: ""; width: 24px; height: 1px; background: var(--line); }
.navbox { background: var(--surface-2); border-radius: 14px; padding: 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted-2); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--brand); }
.nav a.on { color: var(--brand); font-weight: 700; background: var(--surface); box-shadow: 0 1px 3px rgb(31 42 68 / .06); }
.nav .ico { width: 20px; text-align: center; filter: grayscale(.2); }
.side-note { margin-top: 18px; background: var(--brand); color: #fff; border-radius: 16px; padding: 14px; font-size: 12px; line-height: 1.5; }
.side-note b { display: block; font-size: 13px; margin-bottom: 2px; }
.badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 6px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; }
.main { padding: 28px 32px; max-width: 1180px; width: 100%; }
.tabbar { display: none; }
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -4px 20px rgb(31 42 68 / .08); padding: 4px 6px env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 7px; font-size: 11px; color: var(--muted); text-decoration: none; position: relative; border-radius: 12px; }
  .tabbar a.on { color: var(--brand); font-weight: 700; }
  .tabbar a.on .ico { transform: translateY(-1px); }
  .tabbar .ico { font-size: 20px; line-height: 1.15; }
  .tabbar .badge { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; }
}

/* ---- 공통 */
h1 { font-size: 24px; margin: 0 0 18px; letter-spacing: -.5px; }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -.3px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.accent { background: var(--brand-3); box-shadow: none; border: 1px solid var(--brand-2); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.list-item { padding: 10px 0; border-top: 1px solid var(--line); }
.list-item:first-of-type { border-top: 0; }
.stat { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted-2); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info, .chip.brand { background: var(--brand-2); color: var(--brand); }
.avatar { position: relative; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #dbe4ff, #c5d3fd); color: var(--brand); display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; margin-right: 8px; vertical-align: middle; }
.avatar.chan-av { border-radius: 14px; background: var(--surface-3); color: var(--muted-2); }
.avatar .online { position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }

.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--text); min-height: 40px; transition: background .15s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-text); box-shadow: var(--shadow-pop); }
.btn.primary:hover { filter: brightness(1.07); background: var(--brand); }
.btn.danger { color: var(--bad); }
.btn.primary.danger { background: var(--bad); border-color: var(--bad); color: #fff; box-shadow: none; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 12px; min-height: 32px; font-size: 13px; border-radius: 10px; }
.btn.big { width: 100%; padding: 15px; font-size: 17px; border-radius: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; color: var(--muted-2); margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=month], input[type=search], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type=search] { background: var(--surface-2); border-color: transparent; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a94ad' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-2); }
input[readonly], textarea[readonly] { background: var(--surface-2); }
textarea { resize: vertical; min-height: 84px; }
.code-input { font-size: 26px !important; letter-spacing: 12px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check input, input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }

table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.t th, table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.t th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); border-bottom: 0; }
table.t th:first-child { border-radius: 10px 0 0 10px; }
table.t th:last-child { border-radius: 0 10px 10px 0; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--brand-3); }
.scroll-x { overflow-x: auto; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

.tabs { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.tab { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 11px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 4px rgb(31 42 68 / .08); }

#toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: #1f2a44; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); font-size: 14px; }
.toast.bad { background: var(--bad); }

.modal-back { position: fixed; inset: 0; z-index: 50; background: rgb(17 24 39 / .38); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 22px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 20px 60px rgb(17 24 39 / .25); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.banner { padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; font-size: 14px; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.info { background: var(--info-bg); color: var(--info); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }

/* ---- 로그인·가입·QR: 한 틀 (왼쪽 소개 + 오른쪽 카드). 같은 높이·위쪽 정렬이라 탭을 바꿔도 자리가 그대로 */
.login { min-height: 100vh; display: grid; justify-items: center; align-content: start; padding: clamp(24px, 9vh, 96px) 24px 32px; }
.login-box { width: min(920px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.login-art { background: linear-gradient(150deg, #4c6ef5 0%, #3b5bdb 55%, #364fc7 100%); color: #fff; border-radius: 28px; padding: 40px; min-height: 600px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-pop); position: relative; overflow: hidden; }
.login-art::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgb(255 255 255 / .08); top: -90px; right: -90px; }
.login-art .logo { background: #fff; color: var(--brand); margin-top: auto; }
.login-art h2 { font-size: 30px; margin: 18px 0 6px; }
.login-art p { margin: 0; opacity: .88; line-height: 1.55; }
.la-feats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.la-feats li { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .92; }
.la-feats svg { flex: none; width: 30px; height: 30px; padding: 7px; border-radius: 10px; background: rgb(255 255 255 / .14); }
.la-install { margin-top: 26px; align-self: flex-start; background: rgb(255 255 255 / .16); color: #fff; border: 1px solid rgb(255 255 255 / .28); box-shadow: none; }
.la-install:hover { background: rgb(255 255 255 / .26); }
.login-card { padding: 28px; display: flex; flex-direction: column; min-height: 600px; margin: 0; }
.login-card .tabs { margin-bottom: 18px; }
.login-card .tabs .tab { white-space: nowrap; }
.login-body { flex: 1; display: flex; flex-direction: column; }
.login-card .legal-links { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.login-done { margin: auto 0; display: grid; gap: 4px; justify-items: center; }
.login-done h3 { margin: 6px 0; }
.login-done .done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 32px; }
.login-done .btn { width: 100%; margin-top: 10px; }
.login > .card { width: min(440px, 100%); padding: 28px; }
.login .card h1 { text-align: center; }
.modal .inst-guide { margin: 0; padding: 0; box-shadow: none; background: transparent; }
@media (max-width: 860px) {
  .login { padding: 0 0 24px; }
  .login-box { grid-template-columns: 1fr; gap: 0; width: 100%; }
  .login-art { border-radius: 0 0 28px 28px; min-height: 0; padding: calc(env(safe-area-inset-top) + 28px) 24px 56px; }
  .login-art .logo { margin-top: 0; }
  .login-art h2 { font-size: 24px; margin-top: 12px; }
  .la-feats { display: none; }
  .la-install { margin-top: 16px; }
  .login-card { margin: -32px 16px 0; min-height: 0; padding: 22px; }
  .login > .card { margin: 24px 16px; width: calc(100% - 32px); }
}

/* 숫자 세 개 나란히 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 800px) { .stats .stat { font-size: 24px; } }

/* ---- 홈·출근 */
.clock { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.times div { background: var(--surface-2); border-radius: 16px; padding: 12px; text-align: center; }
.times b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
a.card.link { text-decoration: none; color: inherit; margin: 0; transition: box-shadow .15s, transform .15s; }
a.card.link:hover { box-shadow: var(--shadow-pop); transform: translateY(-1px); }

/* ---- 주간계획: 기존 HWP 양식 그대로의 표 */
.week-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -8px 0 14px; }
.wform.sheet { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; margin-bottom: 16px; }
.wform { --ln: #2b3446; color: var(--text); }
.wform table { width: 100%; border-collapse: collapse; }
.wform th, .wform td { border: 1px solid var(--ln); padding: 7px 9px; vertical-align: middle; font-size: 14px; }
.wform th { font-weight: 500; text-align: center; background: transparent; }
.whead { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.wtitle { font-size: 28px; font-weight: 800; letter-spacing: 10px; text-align: center; padding-top: 8px; }
.wperiod { text-align: center; margin-top: 10px; color: var(--muted-2); font-size: 14px; }
.wform .sign { width: 190px; flex: none; }
.wform .sign td { text-align: center; font-size: 12px; padding: 4px; }
.wform .sign .sign-l { width: 26px; line-height: 1.6; }
.wform .sign .box { height: 58px; position: relative; }
.sig b { display: block; font-size: 13px; }
.sig small { color: var(--muted); }
.stamp { display: inline-block; margin-top: 2px; border: 2px solid var(--bad); color: var(--bad); border-radius: 50%; width: 38px; height: 38px; line-height: 34px; font-size: 11px; font-weight: 800; transform: rotate(-12deg); }
.sig .stamp { position: absolute; right: 3px; bottom: 3px; width: 28px; height: 28px; line-height: 24px; font-size: 9.5px; opacity: .8; margin: 0; }
.stamp.bad { border-color: var(--bad); color: var(--bad); }
.winfo { margin-bottom: 14px; }
.winfo th { width: 15%; }
.winfo td { width: 35%; }
.wmain .c-lbl { width: 92px; }
.wmain .c-day { width: 58px; }
.wmain .c-note { width: 190px; }
.wmain td.lbl { text-align: center; line-height: 1.6; font-size: 13.5px; }
.wmain td.day { text-align: center; line-height: 1.3; }
.wmain td.day b { display: block; font-size: 15px; }
.wmain td.day small { color: var(--muted); font-size: 11px; }
.wmain td.note { text-align: center; }
.wmain .wcell { padding: 6px 10px; }
.wmain textarea, .wmain .wcell input[type=text] { border: 0; background: transparent; box-shadow: none; padding: 4px 2px; border-radius: 6px; min-height: 0; }
.wmain textarea { min-height: 70px; }
.wmain textarea:focus, .wmain .wcell input[type=text]:focus { background: var(--brand-3); box-shadow: none; }
.wlist { margin: 0; padding-left: 18px; }
.wlist li { margin: 2px 0; }
.pre { white-space: pre-wrap; min-height: 40px; }
.irow-in, .itext { display: flex; align-items: center; gap: 8px; }
.itext > span:nth-child(2), .irow-in > input { flex: 1; min-width: 0; }
.itext .bullet, .irow-in .bullet { align-self: flex-start; margin-top: 9px; }
.bullet { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; opacity: .7; }
.itext.done > span:nth-child(2) { text-decoration: line-through; color: var(--muted); }
.itext.removed > span:nth-child(2) { text-decoration: line-through; color: var(--bad); opacity: .8; }
.irow.is-removed td { background: var(--bad-bg); }
.irow.is-new td { background: var(--warn-bg); }
.add-cell { padding: 2px 6px !important; }
.add-btn { color: var(--brand); }
.tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.tag.add { background: var(--ok-bg); color: var(--ok); }
.tag.del { background: var(--bad-bg); color: var(--bad); }
.tag.new { background: var(--warn); color: #fff; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px 13px; }
a.att { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 9px; border-radius: 8px; background: var(--brand-3); color: var(--brand); text-decoration: none; max-width: 280px; }
a.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.att:hover { background: var(--brand-2); }
.note-in { display: flex; align-items: center; gap: 2px; justify-content: center; }
/* 항목 상태 색 */
.st { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.st-todo { background: var(--surface-3); color: var(--muted-2); }
.st-doing { background: var(--brand-2); color: var(--brand); }
.st-done { background: var(--ok-bg); color: var(--ok); }
.st-hold { background: var(--warn-bg); color: var(--warn); }
select.st-sel { width: auto; font-size: 13px; font-weight: 700; padding: 4px 26px 4px 10px; border-radius: 999px; border: 0; cursor: pointer; }
.action-bar { width: fit-content; max-width: 100%; margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; position: sticky; bottom: 12px; z-index: 5; background: var(--surface); padding: 12px; border-radius: 16px; box-shadow: var(--shadow-pop); margin-bottom: 16px; }
/* 진행 기록 */
.evday { margin-bottom: 14px; }
.evday-h { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--muted-2); margin-bottom: 6px; }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 10px; font-size: 14px; flex-wrap: wrap; }
.ev:nth-child(even) { background: var(--surface-2); }
.ev.click { cursor: pointer; }
.ev.click:hover { background: var(--brand-3); }
.ev-t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; width: 40px; flex: none; }
.ev-who { font-weight: 700; flex: none; }
.ev .ok { color: var(--ok); }
.ev .bad { color: var(--bad); }
.ev .st { font-size: 11px; padding: 1px 7px; }
.prog { display: grid; gap: 4px; min-width: 150px; }
.prog-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.today-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.today-item .itext.done { text-decoration: line-through; color: var(--muted); }

@media (max-width: 760px) {
  .wform.sheet { padding: 16px 12px; border-radius: 16px; }
  .wtitle { font-size: 20px; letter-spacing: 4px; }
  .whead { flex-direction: column; align-items: stretch; }
  .wform .sign { width: 100%; }
  .wmain thead { display: none; }
  .wmain, .wmain tbody, .wmain tr, .wmain td { display: block; width: auto; }
  .wmain colgroup { display: none; }
  .wmain td { border-width: 0 0 1px; }
  .wmain tr { border: 0; }
  .wmain td.lbl { text-align: left; background: var(--surface-2); font-weight: 700; padding: 8px 10px; margin-top: 10px; border-radius: 10px 10px 0 0; border: 0; }
  .wmain td.lbl br { display: none; }
  .wmain tr.irow { display: flex; flex-wrap: wrap; align-items: center; }
  .wmain tr.irow td.lbl, .wmain tr.irow td.day { flex-basis: 100%; }
  .wmain td.day { text-align: left; padding: 8px 10px 2px; border: 0; }
  .wmain td.day b, .wmain td.day small { display: inline; margin-right: 6px; }
  .wmain tr.irow td.wcell { flex: 1 1 100%; min-width: 0; border-bottom: 0; padding-bottom: 2px; }
  .wmain tr.irow td.note { flex: 1 1 100%; padding: 0 8px 8px; }
  .wmain tr.irow td.note:empty { display: none; }
  .note-in { justify-content: flex-end; }
  .wmain tr.irow td.note > .st { float: right; }
  .wmain tr.irow td.add-cell { flex-basis: 100%; }
  .wmain tr.srow td.note { display: none; }
}

/* 인쇄용 (종이) */
.paper { background: #fff; color: #000; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 14mm; font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; box-shadow: var(--shadow); --ln: #000; }
.paper th, .paper td { font-size: 12px; padding: 5px 7px; }
.paper .wtitle { font-size: 26px; letter-spacing: 8px; }
.paper .st { background: none !important; color: #000 !important; padding: 0; font-weight: 400; }
.paper .tag { background: none !important; color: #000 !important; padding: 0 2px; font-weight: 400; }
.paper .irow.is-removed td, .paper .irow.is-new td { background: none; }
.paper .itext.removed > span:nth-child(2) { color: #000; }
.paper a.att { background: none; color: #000; padding: 0; font-size: 11px; }
.print-bar { display: flex; gap: 8px; justify-content: center; padding: 14px; }
@media print {
  body { background: #fff; }
  .print-bar, .side, .tabbar, #toasts { display: none !important; }
  .main { padding: 0; max-width: none; }
  .shell { display: block; }
  .paper { width: auto; min-height: 0; padding: 0; box-shadow: none; }
  @page { size: A4; margin: 12mm; }
}

/* 아이콘 */
.ic { flex: none; vertical-align: middle; }
.nav .ico, .tabbar .ico { display: inline-grid; place-items: center; }
.head-ic { color: var(--muted); margin-right: 2px; }
.chat-head .nm { display: flex; align-items: center; gap: 4px; }
.side-note b { display: flex; align-items: center; gap: 6px; }
h2 .ic { vertical-align: -3px; }

/* ---- 채팅 */
.chat { display: grid; grid-template-columns: 340px 1fr; gap: 16px; height: calc(100vh - 56px); }
.chat-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow-y: auto; display: flex; flex-direction: column; padding: 18px 14px; }
.list-head h2 { font-size: 20px; margin-bottom: 12px; }
.chat-list .tools { display: flex; gap: 6px; margin: 12px 0 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.list-label { font-size: 11px; letter-spacing: 1px; color: var(--muted); margin: 10px 4px 8px; font-weight: 700; }
.chan { display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin-bottom: 8px; border-radius: 14px; cursor: pointer; text-decoration: none; color: var(--text); background: var(--surface-2); border: 1px solid transparent; transition: box-shadow .15s, border-color .15s; }
.chan:hover { border-color: var(--brand-2); }
.chan.unread { background: var(--brand-2); }
.chan.on { background: var(--surface); border-color: var(--brand); box-shadow: var(--shadow-pop); }
.chan .nm { font-weight: 700; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.chan .when { font-size: 11px; color: var(--muted); white-space: nowrap; }
.chan .pv { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.chan .col { min-width: 0; flex: 1; display: grid; gap: 2px; }
.chan .col > .row { min-width: 0; gap: 6px; }
.chan .col > .row > .nm { min-width: 0; }
.chan.unread .pv { color: var(--text); font-weight: 600; }
.chan .badge { margin-left: 6px; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.chat-head .nm { font-weight: 800; font-size: 20px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.4px; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 22px; }
.msg { display: flex; gap: 10px; padding: 5px 0; align-items: flex-start; }
.msg .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #dbe4ff, #c5d3fd); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 12px; }
.msg.cont { padding-top: 0; }
.msg.cont .av { visibility: hidden; height: 0; }
.msg .bd { min-width: 0; max-width: min(620px, 78%); display: flex; flex-direction: column; align-items: flex-start; }
.msg .who { font-weight: 700; font-size: 14px; color: var(--brand); }
.msg .tm { color: var(--muted); font-size: 11px; margin-left: 6px; font-weight: 400; }
.msg .tx { white-space: pre-wrap; word-break: break-word; background: var(--bubble-in); padding: 10px 14px; border-radius: 4px 18px 18px 18px; margin-top: 4px; }
.msg .tx.del { color: var(--muted); font-style: italic; background: transparent; padding: 2px 0; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .av { display: none; }
.msg.mine .bd { align-items: flex-end; }
.msg.mine .who { display: none; }
.msg.mine .tx { background: var(--bubble-out); border-radius: 18px 4px 18px 18px; }
.msg.mine .bd > div:first-child:not(.tx):not(.meetcard) { text-align: right; }
.msg .ops { visibility: hidden; align-self: center; }
.msg:hover .ops { visibility: visible; }
.msg img.att { max-width: min(320px, 100%); max-height: 280px; border-radius: 16px; display: block; margin-top: 6px; cursor: zoom-in; }
.file { display: inline-flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 9px 14px; margin-top: 6px; text-decoration: none; color: var(--text); }
.meetcard { border-radius: 16px; padding: 12px 14px; margin-top: 6px; display: inline-flex; gap: 12px; align-items: center; background: var(--brand-3); border: 1px solid var(--brand-2); }
.daysep { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); margin: 16px 0 8px; }
.daysep::before, .daysep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.composer { padding: 12px 16px; display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); }
.composer textarea { min-height: 44px; max-height: 160px; resize: none; background: var(--surface-2); border-color: transparent; border-radius: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.dot.on { background: var(--ok); }
@media (max-width: 800px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 84px - 32px - env(safe-area-inset-bottom)); }
  .chat.has-pane .chat-list { display: none; }
  .chat:not(.has-pane) .chat-pane { display: none; }
  .chat-head { padding: 12px 14px; }
  .chat-head .nm { font-size: 17px; }
  .msgs { padding: 10px 12px; }
  .msg .bd { max-width: 84%; }
  .composer .send-label { display: none; }
}
/* 휴대폰(터치)만: 메시지를 눌러야 버튼이 보인다. PC 의 좁은 오른쪽 채팅 패널은 마우스를 올리면 보인다 */
@media (max-width: 800px) and (pointer: coarse) {
  .msg .ops { display: none; }
  .msg.show-ops .ops { display: flex; visibility: visible; }
}
.composer .send-ico { display: none; }
@media (max-width: 800px) { .composer .send-ico { display: inline; } }

/* ---- 화상회의 */
.meet { position: fixed; inset: 0; z-index: 40; background: #000; display: flex; flex-direction: column; }
.meet .bar { display: flex; gap: 8px; padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); background: #111; color: #fff; align-items: center; }
.meet .frame { flex: 1; }
.meet .frame iframe { width: 100%; height: 100%; border: 0; }

/* ---- 홈: 출퇴근 + 오늘의 업무계획 */
/* 두 칸으로 나눌지는 화면 폭이 아니라 이 자리의 폭으로 정한다 — 왼쪽 메뉴·오른쪽 대화 칸이 열려 가운데가 좁으면 위아래로 (한 칸 440px 미만이면 — 업무계획 표의 업무내용 칸이 너무 좁아진다) */
.home-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.home-top .card { margin-bottom: 16px; }
.home-plan .today-item { align-items: flex-start; }
.home-plan .today-item .atts { margin-left: 13px; }
.home-plan h2 .ic { vertical-align: -3px; }
a.mini-stat { text-decoration: none; color: inherit; background: var(--surface-2); border-radius: 14px; padding: 12px; }
a.mini-stat:hover { background: var(--brand-3); }
@media (max-width: 900px) { .home-top { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .stats:has(.mini-stat) { grid-template-columns: 1fr 1fr; } }
/* 설정: 요일 선택 */
.daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick label { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-weight: 700; }
.daypick input { display: none; }
.daypick label:has(input:checked) { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.legal-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pol-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.checks { display: grid; gap: 8px; }
.remote-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* 연차 사용촉진 */
.promo { border: 1px solid var(--warn-bg); }
.notice { white-space: pre-wrap; background: var(--surface-2); border-radius: 12px; padding: 14px 16px; margin: 10px 0; font-size: 14px; line-height: 1.7; }
.plan-pick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.plan-pick h3 { font-size: 14px; }

/* ---- 드라이브 */
.drive-tabs { max-width: 420px; }
.drive-tabs .tab { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.quota { display: grid; gap: 4px; min-width: 220px; text-align: right; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 4px 0 10px; font-weight: 600; }
.crumbs a { color: var(--text); text-decoration: none; padding: 2px 6px; border-radius: 8px; }
.crumbs a:hover { background: var(--surface-3); }
.crumbs .sep { color: var(--muted); display: inline-flex; }
.drive-tools { margin-bottom: 12px; }
.drive-list { padding: 8px 12px; min-height: 240px; transition: box-shadow .15s, background .15s; }
.drive-list.drag { background: var(--brand-3); box-shadow: inset 0 0 0 2px var(--brand); }
.drop-hint { padding: 60px 20px; border: 2px dashed var(--line); border-radius: 16px; }
.fname { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.fname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-dir { color: #f2b13b; fill: #fde7b0; }
.fi-img { color: #8b5cf6; } .fi-sheet { color: #1f9d55; } .fi-slide { color: #e5733d; } .fi-doc { color: var(--brand); } .fi-file { color: var(--muted); }
.uploads { display: grid; gap: 6px; margin-bottom: 10px; }
.up-row { display: grid; grid-template-columns: 1fr 160px auto; gap: 10px; align-items: center; background: var(--surface); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow); }
.up-row.bad { color: var(--bad); }
.up-row .prog-bar i { transition: width .2s; background: var(--brand); }
.acl-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.acl-row select { width: auto; }
.show-m { display: none; }
@media (max-width: 700px) { .hide-m { display: none; } .show-m { display: block; } .quota { min-width: 0; width: 100%; text-align: left; } }
.office .frame > div { height: 100%; }

.side-logout { width: 100%; margin-top: 12px; justify-content: flex-start; color: var(--muted-2); background: var(--surface-2); border-color: transparent; }
.side-logout:hover { color: var(--bad); }

/* ---- 업무요청 포스트잇 */
.postits { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.postit { position: relative; border-radius: 4px 4px 18px 4px; padding: 16px 16px 12px; min-height: 170px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 8px 18px rgb(31 42 68 / .10); color: #2b2b2b; transform: rotate(-.6deg); }
.postit:nth-child(even) { transform: rotate(.6deg); }
.postit:hover { transform: rotate(0) translateY(-2px); }
.postit.c-yellow { background: #fff3a8; } .postit.c-pink { background: #ffd6e0; } .postit.c-mint { background: #c9f2dc; }
.postit.c-sky { background: #cfe6ff; } .postit.c-lavender { background: #e3d9ff; } .postit.c-peach { background: #ffdcc2; }
.postit.urgent { box-shadow: 0 0 0 2px #e5533d, 0 8px 18px rgb(229 83 61 / .25); }
.postit.closed { opacity: .55; transform: none; }
.urgent-tag { position: absolute; top: -9px; left: 12px; background: #e5533d; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.pi-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #5a5a5a; gap: 6px; }
.pi-who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-title { font-weight: 800; font-size: 15.5px; line-height: 1.35; word-break: break-word; }
.pi-body { font-size: 13px; white-space: pre-wrap; word-break: break-word; color: #3d3d3d; flex: 1; }
.pi-reject { font-size: 12px; color: #b3261e; }
.pi-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px dashed rgb(0 0 0 / .15); }
.pi-date { font-size: 12px; color: #5a5a5a; }
.dday { font-size: 11px; font-weight: 800; background: rgb(255 255 255 / .6); padding: 1px 7px; border-radius: 999px; }
.dday.today { background: #fff; color: #b7791f; } .dday.late { background: #e5533d; color: #fff; }
select.rq-sel { width: auto; font-size: 12.5px; font-weight: 700; padding: 3px 24px 3px 9px; border-radius: 999px; border: 0; background-color: rgb(255 255 255 / .75); color: #2b2b2b; }
.rq-chip { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgb(255 255 255 / .7); }
.rq-done { color: #1f9d55; } .rq-doing { color: #3b5bdb; } .rq-rejected { color: #e5533d; } .rq-cancelled { color: #888; }
.to-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; max-height: 160px; overflow-y: auto; }
.urgent-check { align-self: end; padding-bottom: 22px; }
.home-req { margin-bottom: 16px; }
.home-req h2 .ic { vertical-align: -3px; }
a.reqcard { display: grid; gap: 4px; text-decoration: none; color: #2b2b2b; background: #fff7c2; border-radius: 4px 4px 14px 4px; padding: 10px 14px; margin-top: 4px; max-width: 320px; }
a.reqcard.urgent { box-shadow: 0 0 0 2px #e5533d; }
.reqcard .rq-title { font-weight: 800; }

.att-note { font-size: 13px; color: var(--muted-2); background: var(--surface-2); border-left: 3px solid var(--brand); border-radius: 6px; padding: 5px 10px; margin: 6px 0 2px 13px; white-space: pre-wrap; word-break: break-word; }
.paper .att-note { background: none; border-left: 0; padding: 0; margin: 2px 0 0 13px; color: #000; font-size: 11px; }
.paper .att-note::before { content: "→ "; }
.list-item .att-note { margin: 0; flex: 1; }

/* 포스트잇 v2: 맨 위 태그(상태·수신), 파일, 피드백 */
.pi-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.postit .pi-who { font-size: 12px; color: #5a5a5a; font-weight: 700; }
.rq-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.rq-tag.read { background: #1f9d55; color: #fff; }
.rq-tag.unread { background: rgb(0 0 0 / .12); color: #444; }
.postit .rq-chip { background: #fff; }
.postit .dday { margin-left: auto; }
.pi-files { display: flex; flex-wrap: wrap; gap: 6px; }
a.pi-file { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 12px; font-weight: 600; color: #2b2b2b; text-decoration: none; background: rgb(255 255 255 / .65); border-radius: 8px; padding: 3px 8px; }
a.pi-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pi-file:hover { background: #fff; }
.pi-note { font-size: 12.5px; background: rgb(255 255 255 / .55); border-radius: 8px; padding: 5px 8px; color: #2b2b2b; }
.pi-note.bad { color: #b3261e; }
.pi-btn { color: #444; min-height: 28px; padding: 2px 6px; }
.pi-change { background: rgb(255 255 255 / .8); border: 0; color: #2b2b2b; min-height: 28px; font-size: 12.5px; }
/* 요청 보내기: 받는 사람 검색 */
.to-box { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin: 6px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.to-box input[type=search] { flex: 1; min-width: 160px; border: 0; background-color: transparent; box-shadow: none; padding-top: 6px; padding-bottom: 6px; }
.to-chip { gap: 2px; padding: 3px 4px 3px 10px; font-size: 13px; }
.chip .x, .to-chip .x { border: 0; background: none; cursor: pointer; display: inline-grid; place-items: center; color: inherit; padding: 2px; }
.to-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); margin-top: 4px; overflow: hidden; }
.to-results:empty { display: none; }
.to-res { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; cursor: pointer; }
.to-res:hover { background: var(--brand-3); }
.quick-due { margin: -6px 0 6px; gap: 6px; }
/* 채팅: 알림 채널, 안 읽은 사람 수 */
.avatar.notice-av { border-radius: 14px; background: #fff3c4; color: #b7791f; }
.msg .av.sys { background: #fff3c4; color: #b7791f; }
.bd-row { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.msg.mine .bd-row { flex-direction: row-reverse; }
.rc { color: #f2b13b; font-size: 11px; font-weight: 800; flex: none; min-width: 6px; }
.reqcard { display: grid; gap: 4px; color: #2b2b2b; background: #fff7c2; border-radius: 4px 4px 14px 4px; padding: 10px 14px; margin-top: 4px; max-width: 340px; }
.reqcard.urgent { box-shadow: 0 0 0 2px #e5533d; }
/* 노란 쪽지는 밝기와 상관없이 어두운 글씨 */
.reqcard .muted { color: #6b6b6b; }

/* 사이드바: 계정·Wi‑Fi·로그아웃은 맨 아래 */
@media (min-width: 801px) { .side { display: flex; flex-direction: column; } }
.side-bottom { margin-top: auto; padding-top: 16px; display: grid; gap: 10px; }
.side-bottom .side-note { margin-top: 0; }
.side-bottom .side-logout { margin-top: 0; }

/* 전화 수신 화면 */
.incoming { position: fixed; inset: 0; z-index: 90; background: rgb(17 24 39 / .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fadein .2s; }
.incoming-card { background: var(--surface); border-radius: 28px; padding: 30px 26px; width: min(360px, 100%); text-align: center; box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.incoming-card .logo { animation: pulse 1.2s infinite; }
.incoming-who { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.incoming .btn.big { width: 120px; }
.incoming .decline { color: var(--bad); }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes fadein { from { opacity: 0; } }
.rec-badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #333; color: #bbb; }
.rec-badge.on { background: #e5533d; color: #fff; }

/* 조직도 (트리) */
.org { overflow-x: auto; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding-left: 26px; position: relative; }
.org-tree { padding-left: 0; }
.org-tree li { position: relative; padding: 6px 0 6px 18px; }
.org-tree > li { padding-left: 0; }
.org-tree ul > li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.org-tree ul > li:last-child::before { bottom: auto; height: 26px; }
.org-tree ul > li::after { content: ""; position: absolute; left: 0; top: 26px; width: 16px; border-top: 2px solid var(--line); }
.org-root, .org-dept { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: var(--brand-2); color: var(--brand); }
.org-root .logo { width: 28px; height: 28px; font-size: 14px; border-radius: 9px; }
.org-dept { background: var(--surface-2); color: var(--text); }
.org-dept .ic { color: #f2b13b; }
button.org-person { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 7px 14px 7px 8px; cursor: pointer; text-align: left; }
button.org-person:hover { border-color: var(--brand); box-shadow: var(--shadow-pop); }
.org-person b { display: block; font-size: 14px; }
.org-person small { color: var(--muted); font-size: 12px; }
.org-person .avatar.sm { width: 34px; height: 34px; margin: 0; }
.org-empty { display: inline-block; padding: 6px 0; }
/* 회의록 */
.md h2 { font-size: 20px; margin: 4px 0 10px; } .md h3 { font-size: 16px; margin: 18px 0 8px; } .md h4 { font-size: 15px; margin: 14px 0 6px; }
.md ul { margin: 4px 0 8px; padding-left: 20px; } .md p { margin: 6px 0; } .md table { margin: 8px 0; }
.transcript { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.tr-line { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.tr-who { font-weight: 800; flex: none; min-width: 56px; }
.tr-who.c0 { color: #3b5bdb; } .tr-who.c1 { color: #e5733d; } .tr-who.c2 { color: #1f9d55; } .tr-who.c3 { color: #8b5cf6; } .tr-who.c4 { color: #d6336c; } .tr-who.c5 { color: #0c8599; }

/* 주간 업무계획서: 앱 테마(다크 모드 포함)와 상관없이 항상 흰 종이 문서 */
.wform.sheet {
  --surface: #ffffff; --surface-2: #f5f6f8; --surface-3: #eceef2; --line: #d7dbe3; --text: #111111;
  --muted: #6b7280; --muted-2: #4b5563; --brand-2: #e3e9fd; --brand-3: #f2f5ff; --ln: #1f1f1f;
  color-scheme: light; background: #fff; color: #111;
  max-width: 980px; margin: 0 auto 18px; padding: 44px 48px;
  border-radius: 4px; border: 1px solid #e3e5ea;
  box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 14px 40px rgb(15 23 42 / .10);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
.wform.sheet .wtitle { color: #000; }
.wform.sheet .wperiod, .wform.sheet .sig small, .wform.sheet td.day small { color: #555; }
.wform.sheet textarea, .wform.sheet input[type=text] { color: #111; }
.wform.sheet textarea::placeholder, .wform.sheet input::placeholder { color: #9aa0aa; }
.wform.sheet .irow.is-removed td { background: #fdecea; }
.wform.sheet .irow.is-new td { background: #fff4d6; }
@media (max-width: 760px) { .wform.sheet { padding: 18px 12px; border-radius: 4px; } }
a.banner.deadline { display: block; text-decoration: none; }
a.banner.deadline ul { margin: 6px 0 0; padding-left: 18px; }
/* 회의록: 참여자 태그 + 요약·주요 내용·결론 */
.people-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.person-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-2); color: var(--brand); font-weight: 700; font-size: 13px; padding: 3px 10px 3px 3px; border-radius: 999px; }
.person-tag .avatar.sm { width: 24px; height: 24px; font-size: 10px; margin: 0; background: #fff; }
.minutes-grid { display: grid; gap: 0; }
.minutes-summary { border-left: 4px solid var(--brand); }
.minutes-summary .md p { font-size: 15.5px; line-height: 1.7; }
.minutes-conclusion { border-left: 4px solid var(--ok); }

/* 주간계획 비고·진행률 */
.note-stack { display: grid; gap: 6px; justify-items: stretch; }
.note-stack .note-in { justify-content: center; }
.remark-in { width: 100%; font-size: 12.5px; padding: 5px 8px; border: 1px dashed #c3c9d4; border-radius: 6px; background: transparent; resize: vertical; }
.remark-in:focus { border-style: solid; border-color: var(--brand); outline: none; }
td.note .note-in .remark-in { flex: 1; min-width: 0; }
.remark-tx { font-size: 12.5px; color: #333; text-align: left; white-space: pre-wrap; word-break: break-word; }
.pct { font-size: 12px; font-weight: 700; color: var(--brand); min-width: 34px; text-align: right; }
.pbar { height: 5px; background: #e6e9ef; border-radius: 9px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--brand); border-radius: 9px; }
.prog-wrap { display: flex; align-items: center; gap: 6px; }
.prog-track { position: relative; flex: 1; height: 22px; display: flex; align-items: center; }
input[type=range].prog { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; padding: 0; border: 0; cursor: grab; position: relative; z-index: 1; touch-action: pan-y; }
input[type=range].prog:active { cursor: grabbing; }
input[type=range].prog::-webkit-slider-runnable-track { height: 6px; border-radius: 9px; background: linear-gradient(to right, var(--brand) var(--p), #e3e7ee var(--p)); }
input[type=range].prog::-moz-range-track { height: 6px; border-radius: 9px; background: linear-gradient(to right, var(--brand) var(--p), #e3e7ee var(--p)); }
input[type=range].prog::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
input[type=range].prog::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.prog-ticks { position: absolute; left: 10px; right: 10px; top: 50%; display: flex; justify-content: space-between; pointer-events: none; transform: translateY(-50%); }
.prog-ticks i { width: 2px; height: 10px; background: #c9cfda; border-radius: 1px; }
@media (max-width: 760px) { .wmain tr.srow td.note:has(textarea), .wmain tr.srow td.note:has(.remark-tx) { display: block; padding: 0 8px 8px; } }

/* 전화·회의 3초 녹음 고지 */
.fade-notice { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(15,20,30,.35); z-index: 200; transition: opacity .4s; padding: 16px; }
.fade-notice.out { opacity: 0; }
.fade-card { background: var(--surface); color: var(--text); border-radius: 16px; padding: 18px 20px 0; max-width: 420px; width: 100%; box-shadow: var(--shadow); overflow: hidden; }
.fade-bar { height: 4px; margin: 14px -20px 0; background: var(--brand); transform-origin: left; transform: scaleX(1); }
.fade-bar.go { transform: scaleX(0); transition: transform 3s linear; }

/* 일정 */
.cal-title { min-width: 104px; text-align: center; font-size: 17px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
.cal-w { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.cal-w.sun, .cal-cell.sun .cal-d { color: #e03131; }
.cal-w.sat, .cal-cell.sat .cal-d { color: var(--brand); }
.cal-cell { min-height: 104px; padding: 6px 6px 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: color-mix(in srgb, var(--line) 30%, transparent); }
.cal-cell.out .cal-d { opacity: .45; }
.cal-cell.sel { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.cal-d { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.today .cal-d { background: var(--brand); color: #fff !important; }
.cal-evs { display: grid; gap: 2px; margin-top: 3px; }
.cal-ev { display: block; width: 100%; text-align: left; border: 0; border-radius: 5px; padding: 2px 5px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-family: inherit; }
.cal-ev.shared { background: #e7ecff; color: #2c46b8; }
.cal-ev.personal { background: #e6f6ee; color: #1f7a4d; }
.cal-t { font-weight: 700; margin-right: 3px; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.cal-dots { display: none; gap: 3px; justify-content: center; margin-top: 4px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: #3fa66b; }
.cal-dots i.shared { background: var(--brand); }
.agenda-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 2px; cursor: pointer; font-family: inherit; color: inherit; }
.agenda-item:first-of-type { margin-top: 10px; }
.agenda-bar { width: 4px; align-self: stretch; border-radius: 4px; background: #3fa66b; }
.agenda-bar.shared { background: var(--brand); }
.ev-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.ev-body { white-space: pre-wrap; margin: 12px 0; padding: 12px; background: color-mix(in srgb, var(--line) 40%, transparent); border-radius: 10px; font-size: 14px; }
.ev-when { display: grid; gap: 8px; margin: 4px 0; }
.ev-when input[type=date], .ev-when input[type=time] { width: auto; }
.ev-lbl { width: 28px; }
@media (max-width: 760px) {
  .cal-cell { min-height: 52px; padding: 4px 2px; }
  .cal-d { margin: 0 auto; }
  .cal-evs { display: none; }
  .cal-dots { display: flex; }
  .cal-head { flex-wrap: wrap; gap: 8px; }
}

/* 게시판 */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.board-card { display: grid; gap: 6px; color: inherit; text-decoration: none; transition: transform .1s; }
.board-card:hover { transform: translateY(-2px); }
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.cat { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; font-family: inherit; color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.cat.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat.ghost { border-style: dashed; color: var(--muted); }
.post-list { display: grid; }
.post-row { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.post-row.pinned { background: color-mix(in srgb, #f59f00 8%, transparent); }
.post-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.post-meta { flex: none; }
.post-h { margin: 10px 0 6px; font-size: 22px; }
.post-body { white-space: pre-wrap; word-break: break-word; margin: 18px 0; line-height: 1.7; font-size: 15px; }
.post-editor { min-height: 240px; }
.perm-box { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.perm .to-box { margin-bottom: 4px; }
.cat-line { padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .post-meta { display: none; } }

/* 활동 로그 */
.log-list { display: grid; }
.log-day { padding: 10px 16px 4px; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; flex-wrap: wrap; }
a.log-row:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.log-who { min-width: 56px; }
.reqcard.invite { border-left: 3px solid var(--brand); }

/* 뒤로 가기 버튼 */
.back-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px 6px 8px; margin-bottom: 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: color .15s, border-color .15s; }
.back-btn:hover { color: var(--brand); border-color: var(--brand); }

/* 게시판: 왼쪽 게시판·카테고리, 오른쪽 목록·글 */
.bd-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.bd-side { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 10px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.bd-side-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.bd-side-h b { font-size: 15px; }
.bd-board { margin-bottom: 2px; }
.bd-board-name { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.bd-board-name span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-board-name:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.bd-board.on > .bd-board-name { color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }
.bd-count { font-size: 11px; color: var(--muted); font-weight: 500; }
.bd-cats { display: grid; gap: 1px; padding: 4px 0 8px 22px; margin-left: 8px; border-left: 2px solid var(--line); }
.bd-cat { display: flex; align-items: center; gap: 6px; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; font-family: inherit; }
.bd-cat:hover { color: var(--text); background: color-mix(in srgb, var(--line) 45%, transparent); }
.bd-cat.on { color: var(--brand); font-weight: 700; background: color-mix(in srgb, var(--brand) 8%, transparent); }
.bd-cat.ghost { font-size: 12.5px; margin-top: 4px; }
.bd-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.bd-head h1 { margin: 0 0 4px; }
.bd-crumb { font-size: 16px; color: var(--muted); font-weight: 600; }
.bd-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 12px; color: var(--muted); max-width: 360px; }
.bd-search input { border: 0; background: transparent; box-shadow: none; padding: 10px 0; }
.bd-list { padding: 0; overflow: hidden; }
.post-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; font-size: 14px; }
.post-row.head { font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 18px; background: color-mix(in srgb, var(--line) 30%, transparent); }
.post-title { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; min-width: 0; }
.post-title > span:not(.chip) { overflow: hidden; text-overflow: ellipsis; }
.post-title .ic { color: var(--muted); flex: none; }
.post-cat { color: var(--brand); font-size: 13px; flex: none; }
.post-meta { width: 80px; flex: none; color: var(--muted); font-size: 13px; }
.post-date { width: 64px; flex: none; color: var(--muted); font-size: 13px; text-align: right; }
/* 글 보기는 언제나 흰 종이 */
.post-paper { background: #fff; color: #1d2433; border-radius: 6px; box-shadow: 0 2px 14px rgb(15 23 42 / .10); padding: 36px 40px 30px; }
.post-paper .post-h { margin: 8px 0 12px; font-size: 24px; color: #111827; line-height: 1.35; }
.post-tags { display: flex; gap: 6px; align-items: center; min-height: 4px; }
.post-paper .post-cat { color: #3b5bdb; font-weight: 600; }
.post-info { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #6b7280; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; }
.post-info b { color: #1f2937; }
.post-perm { margin-top: 12px; font-size: 13px; color: #6b7280; background: #f4f6fa; border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 4px; }
.post-paper .post-body { color: #1f2937; margin: 24px 0; line-height: 1.8; font-size: 15px; min-height: 120px; white-space: pre-wrap; word-break: break-word; }
.post-files { border-top: 1px solid #e5e7eb; padding-top: 14px; display: grid; gap: 6px; }
.post-files-h { font-size: 12px; color: #6b7280; font-weight: 700; }
.post-file { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 8px; color: #1f2937; text-decoration: none; font-size: 13.5px; background: #fafbfc; }
.post-file:hover { border-color: #3b5bdb; color: #3b5bdb; }
.post-file small { margin-left: auto; color: #9ca3af; }
@media (max-width: 800px) {
  .bd-layout { grid-template-columns: 1fr; gap: 12px; }
  .bd-side { position: static; max-height: none; padding: 10px; }
  .bd-head { flex-wrap: wrap; }
  .post-meta { display: none; }
  .post-paper { padding: 22px 18px; }
}

/* 조직도 카드 — 채팅·전화·화상 바로가기 */
.org-card { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 4px 6px 4px 4px; }
.org-card button.org-person { border: 0; background: none; padding: 3px 8px 3px 4px; }
.org-card button.org-person:hover { box-shadow: none; }
.org-card:hover { border-color: var(--brand); box-shadow: var(--shadow-pop); }
.org-acts { display: flex; gap: 2px; padding-left: 6px; border-left: 1px solid var(--line); }
.org-act { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.org-act:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }

/* 채팅: 답장·멘션·반응 */
.composer-wrap { position: relative; }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); color: var(--brand); }
.reply-bar b { font-size: 13px; }
.reply-snip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; color: var(--muted); }
.mention-pop { position: absolute; bottom: 100%; left: 12px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 4px; min-width: 220px; margin-bottom: 6px; }
.mp-item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; color: var(--text); text-align: left; }
.mp-item.on, .mp-item:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; margin: 0; }
.quote { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 7%, transparent); border-radius: 6px; padding: 5px 10px; margin-top: 4px; cursor: pointer; font-family: inherit; max-width: 100%; color: var(--text); }
.quote b { font-size: 12px; color: var(--brand); }
.quote span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.mention { color: var(--brand); font-weight: 700; background: color-mix(in srgb, var(--brand) 12%, transparent); border-radius: 4px; padding: 0 2px; }
.msg.mention-me .tx { box-shadow: inset 3px 0 0 #f59f00; }
.msg.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { background: color-mix(in srgb, #f59f00 18%, transparent); } 100% { background: transparent; } }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text); }
.react span { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.react.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.react.on span { color: var(--brand); }
.ops { position: relative; }
.emoji-pop { position: fixed; z-index: 200; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; box-shadow: var(--shadow-pop); }
.emoji-pop button { border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 50%; width: 34px; height: 34px; }
.emoji-pop button:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); transform: scale(1.15); }

/* 홈: 오늘 일정 */
.today-evs { display: grid; gap: 4px; }
.today-ev { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 9px 8px; cursor: pointer; font-family: inherit; color: inherit; }
.today-ev:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.today-ev.past { opacity: .5; }
.today-ev.live { background: color-mix(in srgb, #2f9e44 8%, transparent); }
.te-time { width: 46px; flex: none; font-weight: 700; font-size: 14px; display: grid; }
.te-time small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.te-title { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.te-sub { display: flex; align-items: center; gap: 2px; margin-top: 2px; }

/* 통합 검색 */
.side-search { display: flex; align-items: center; gap: 8px; margin: 14px 4px 4px; padding: 0 12px; border-radius: 12px; background: var(--surface-2, color-mix(in srgb, var(--line) 40%, transparent)); color: var(--muted); }
.side-search input { border: 0; background: transparent; box-shadow: none; padding: 9px 0; font-size: 13.5px; }
.search-big { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 6px 6px 16px; margin-bottom: 14px; color: var(--muted); box-shadow: var(--shadow); }
.search-big input { border: 0; background: transparent; box-shadow: none; font-size: 16px; padding: 10px 0; }
.sr-sec { padding: 14px 16px; margin-bottom: 12px; }
.sr-sec h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 4px; }
.sr-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; border-radius: 8px; flex-wrap: wrap; }
.sr-row:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
mark { background: color-mix(in srgb, #fab005 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* 즐겨찾기 */
.lk-card { padding: 10px 14px; }
.lk-cat-h { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-radius: 10px; }
.lk-cat-h:hover { background: color-mix(in srgb, var(--line) 35%, transparent); }
.lk-cat.depth-0 > .lk-cat-h { font-size: 15px; }
.lk-cat.depth-0 { border-bottom: 1px solid var(--line); padding: 4px 0; }
.lk-cat.depth-0:last-child { border-bottom: 0; }
.lk-folder { display: grid; color: #f2b13b; flex: none; }
.lk-toggle { border: 0; background: none; width: 22px; height: 22px; display: grid; place-items: center; cursor: pointer; color: var(--muted); border-radius: 6px; transition: transform .15s; }
.lk-toggle .ic { color: var(--muted); }
.lk-toggle.open { transform: rotate(90deg); }
.lk-body { margin-left: 15px; padding-left: 16px; border-left: 2px solid var(--line); }
.lk-link { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; flex-wrap: wrap; }
.lk-link:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.lk-a { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; min-width: 0; }
.lk-a:hover .lk-title { color: var(--brand); text-decoration: underline; }
.lk-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); flex: none; }
.lk-title { font-weight: 600; font-size: 14px; }
.lk-host { color: var(--muted); font-size: 12px; }
.lk-note { flex-basis: 100%; padding-left: 34px; margin-top: -4px; }
.lk-ops { margin-left: auto; display: flex; opacity: 0; transition: opacity .15s; }
.lk-link:hover .lk-ops, .lk-cat-h:hover .btn { opacity: 1; }
.lk-cat-h .btn { opacity: .55; }
.lk-perm { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); background: color-mix(in srgb, var(--line) 50%, transparent); border-radius: 999px; padding: 1px 8px; max-width: 320px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lk-perm .ic { color: var(--muted) !important; }
.lk-empty { padding: 6px 4px; }
@media (max-width: 800px) { .lk-ops, .lk-cat-h .btn { opacity: 1; } .lk-perm { display: none; } }

/* 손님 초대 */
.guest-out { display: flex; gap: 6px; margin-top: 12px; }
.person-tag.guest { border-style: dashed; }
.person-tag small { color: var(--muted); }
.login.guest .card { max-width: 460px; }
.guest-notice { white-space: pre-line; font-size: 13px; background: color-mix(in srgb, var(--line) 35%, transparent); border-radius: 12px; padding: 12px 14px; margin-top: 8px; }

.msg-col { display: flex; flex-direction: column; min-width: 0; }
.msg.mine .msg-col { align-items: flex-end; }
.lk-note { margin-top: -6px; }
.login.guest { align-items: flex-start; padding-top: max(24px, env(safe-area-inset-top)); min-height: 100vh; overflow-y: auto; }

/* 휴대폰: 입력칸을 누를 때 iPhone 이 화면을 확대하지 않게 (16px 미만이면 확대한다) */
@media (pointer: coarse) {
  input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=number],
  input[type=search], input[type=url], input:not([type]), select, textarea { font-size: 16px; }
}
/* 아이폰 노치·홈 바 영역 */
.main { padding-top: max(28px, env(safe-area-inset-top)); }
@media (max-width: 800px) { .main { padding-top: max(16px, env(safe-area-inset-top)); } }

/* QR 로그인 */
.qr-box { display: grid; justify-items: center; gap: 6px; margin: 12px 0; }
.qr-frame { background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 2px 12px rgb(15 23 42 / .10); }
.qr-img { width: 220px; height: 220px; display: block; image-rendering: pixelated; transition: opacity .2s, filter .2s; }
.qr-img.dim { opacity: .15; filter: blur(2px); }
.qr-left { font-variant-numeric: tabular-nums; }
.qr-view { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 62vh; margin: 0 auto; width: 100%; }
.qr-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-aim { position: absolute; inset: 18% 14%; border: 3px solid rgb(255 255 255 / .9); border-radius: 18px; box-shadow: 0 0 0 999px rgb(0 0 0 / .35); }
.qr-req { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.qr-dev { display: flex; align-items: center; gap: 10px; }
.qr-entry { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dev-row:last-of-type { border-bottom: 0; }

/* 앱 안 브라우저(카톡 등) 안내 */
.inapp-banner { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #f59f00 14%, var(--surface)); border: 1px solid color-mix(in srgb, #f59f00 40%, transparent); margin: 6px 0 12px; }
.inapp-banner .btn { justify-self: start; }

/* 홈 인사말 + 오늘 날씨 */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.home-head h1 { margin: 0; }
.weather-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 14px 8px 10px; box-shadow: var(--shadow); font-family: inherit; color: var(--text); text-align: left; }
button.weather-chip { cursor: pointer; }
button.weather-chip:hover { border-color: var(--brand); }
.w-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #eef2fb; color: #6b7a99; }
.w-sun .w-ico { background: #fff4d6; color: #f08c00; }
.w-cloudSun .w-ico { background: #fff7e3; color: #e8a33b; }
.w-rain .w-ico, .w-storm .w-ico { background: #e3efff; color: #3b6fdb; }
.w-snow .w-ico { background: #eef6ff; color: #74a9e8; }
.w-top { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.w-now { font-weight: 700; font-size: 15px; }
.w-range { font-size: 12.5px; font-variant-numeric: tabular-nums; display: flex; gap: 4px; }
.w-min { color: #3b6fdb; font-weight: 600; }
.w-max { color: #e03131; font-weight: 600; }
.w-sep { color: var(--muted); }
.w-place { align-self: flex-end; margin-left: 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .w-ico { background: color-mix(in srgb, currentColor 16%, transparent); } }
:root[data-theme="dark"] .w-ico { background: color-mix(in srgb, currentColor 16%, transparent); }
@media (max-width: 520px) { .w-place { display: none; } .weather-chip { padding: 6px 10px 6px 6px; } .w-ico { width: 34px; height: 34px; } }

/* 주간계획 — 대표 업무요청 줄 */
.wreq { display: grid; gap: 4px; margin-bottom: 8px; }
.wreq-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 3px 0; border-bottom: 1px dashed #d5dae3; flex-wrap: wrap; }
.wreq-line:last-child { border-bottom: 0; }
.wreq-date { color: #6b7280; font-size: 12px; flex: none; min-width: 64px; }
.wreq-title { flex: 1; min-width: 0; }
.wreq-due, .wreq-note { color: #6b7280; font-size: 12px; }
button.wreq-st { border: 0; cursor: pointer; font-family: inherit; }

/* 끌어서 순서 바꾸기 */
.sortable { cursor: grab; }
.sortable.dragging { opacity: .45; outline: 2px dashed var(--brand); outline-offset: -2px; border-radius: 10px; }
.bd-drag-hint { padding: 10px 8px 2px; font-size: 11.5px; }

/* 즐겨찾기 (게시판 모양) */
.lk-side-cat { width: 100%; }
.lk-side-cat .lk-folder { color: #f2b13b; display: grid; }
.lk-crumb { cursor: pointer; }
.lk-crumb:hover { color: var(--brand); }
.lk-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; font-family: inherit; color: inherit; text-align: left; }
.lk-row:last-child { border-bottom: 0; }
.lk-row:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
button.lk-subcat { cursor: pointer; }
.lk-main { display: flex; flex-direction: column; min-width: 0; }
.lk-row .lk-a { flex: 1; min-width: 0; }
.lk-row .lk-ops { opacity: 0; }
.lk-row:hover .lk-ops { opacity: 1; }
@media (max-width: 800px) { .lk-row .lk-ops { opacity: 1; } }
.check.small-biz { align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; background: color-mix(in srgb, var(--brand) 4%, transparent); }
.check.small-biz input { margin-top: 3px; }
.lk-main .lk-note { padding-left: 0; margin-top: 1px; flex-basis: auto; }

/* 전화 화면 (휴대폰 통화처럼) — Jitsi 는 뒤에서 소리만 */
.frame.call-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.call-screen { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) 24px max(36px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 0%, #2c3e73 0%, #141a2e 60%, #0d1120 100%); color: #fff; }
.call-top { align-self: stretch; display: flex; justify-content: flex-end; }
.call-who { display: grid; justify-items: center; gap: 10px; margin-top: 8vh; }
.call-avatar { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; font-weight: 800;
  background: linear-gradient(135deg, #7d97ff, #3b5bdb); box-shadow: 0 0 0 0 rgb(125 151 255 / .5); animation: callpulse 1.8s infinite; }
.call-screen.live .call-avatar { animation: none; }
@keyframes callpulse { 0% { box-shadow: 0 0 0 0 rgb(125 151 255 / .55); } 100% { box-shadow: 0 0 0 28px rgb(125 151 255 / 0); } }
.call-name { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.call-status { font-size: 16px; color: rgb(255 255 255 / .72); font-variant-numeric: tabular-nums; }
.call-actions { display: flex; gap: 44px; margin-top: auto; margin-bottom: 36px; }
.call-btn { display: grid; justify-items: center; gap: 8px; background: none; border: 0; color: #fff; cursor: pointer; font-family: inherit; }
.call-btn .cb-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .16); backdrop-filter: blur(6px); transition: background .15s, transform .1s; }
.call-btn:active .cb-ico { transform: scale(.94); }
.call-btn.on .cb-ico { background: #fff; color: #141a2e; }
.call-btn .cb-label { font-size: 13px; color: rgb(255 255 255 / .85); }
.call-btn.end .cb-ico { width: 76px; height: 76px; background: #e5383b; }
.call-btn.end .cb-ico .ic { transform: rotate(0deg); }
.call-screen .rec-badge { background: rgb(229 56 59 / .18); color: #ffb3b5; }
.dev-list { display: grid; gap: 4px; margin: 6px 0 4px; }
.dev-pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font-family: inherit; }
.dev-pick.on { border-color: var(--brand); color: var(--brand); font-weight: 700; }

/* ---- 오른쪽 채팅 패널 (PC 넓은 화면, 1200px 이상) — 앱을 한 번 더 띄운 iframe */
:root { --dock-w: 380px; }
.dock { position: fixed; top: 0; right: 0; bottom: 0; width: var(--dock-w); z-index: 30; background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.dock-plan { flex: 3 1 0; min-height: 0; overflow-y: auto; padding: 10px; border-bottom: 1px solid var(--line); }
.dock-chat { flex: 7 1 0; min-height: 0; display: flex; }
.dock.calling .dock-plan { display: none; }   /* 통화 중엔 패널 전체를 통화에 */
.dock[hidden] { display: none; }
.dock-frame { flex: 1; width: 100%; height: 100%; border: 0; background: var(--bg); }
.dock.calling { z-index: 60; box-shadow: -8px 0 30px rgba(0, 0, 0, .25); }
body.has-dock .shell { margin-right: var(--dock-w); }
body.has-dock #toasts { left: calc(50% - var(--dock-w) / 2); }
@media (min-width: 1600px) { :root { --dock-w: 420px; } }

/* 패널 안쪽(iframe) 화면: 휴대폰처럼 목록 ↔ 대화, 아래 탭 없음 */
html.embed body { background: var(--bg); }
html.embed .chat { height: 100vh; height: 100dvh; grid-template-columns: 1fr; gap: 0; padding: 0; }
html.embed .chat-list, html.embed .chat-pane { border-radius: 0; box-shadow: none; }
html.embed .chat-list { padding: 14px 10px; }
html.embed .chat-head { padding: 12px 14px; }
html.embed .chat-head .nm { font-size: 17px; }
html.embed .chat-head .btn .send-label { display: none; }

/* ---- 용량 막대 (드라이브·관리자) */
.ubar { display: grid; gap: 8px; }
.ub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ub-num { font-size: 14px; } .ub-num b { font-size: 16px; }
.ub-track { display: flex; height: 12px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.ubar.compact .ub-track { height: 8px; }
.ub-seg { display: block; height: 100%; min-width: 0; transition: width .3s; }
.ub-seg + .ub-seg { box-shadow: inset 1px 0 0 rgb(255 255 255 / .5); }
.ubar.full .ub-num b { color: var(--bad); }
.ub-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2, inherit); }
.ub-key { display: inline-flex; align-items: center; gap: 6px; }
.ub-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.usage-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 14px; }
.usage-cards .card { padding: 16px 18px; margin: 0; }
@media (max-width: 760px) { .usage-cards { grid-template-columns: 1fr; } }
.st-row { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.st-row:first-child { border-top: 0; }
@media (max-width: 760px) { .st-row { grid-template-columns: 1fr; gap: 6px; } }
.usage-cards .card.on { outline: 2px solid var(--brand-2); }

/* ---- 기기 설정 카드 (홈) */
.setup-card { border: 1px solid var(--brand-2); }
.setup-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.setup-step:first-of-type { border-top: 0; }
.setup-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; background: var(--brand-3); color: var(--brand); }
.setup-step.done .setup-n { background: var(--ok); color: #fff; }
.setup-step.done b { color: var(--muted, #8a94a6); }
.setup-step .muted.small .btn { margin-left: 4px; }
@media (max-width: 600px) { .setup-step { flex-wrap: wrap; } .setup-step > .btn { margin-left: 40px; } }

/* 일일 업무계획 (홈·오른쪽 패널 위) — 주간계획서와 같은 흰 종이 양식 */
.wform.sheet.dplan { max-width: none; margin: 0; padding: 18px 20px; border-radius: 6px; }
.dplan .dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.dplan .wtitle { font-size: 18px; font-weight: 800; letter-spacing: .3em; text-align: left; }
.dplan .wperiod { font-size: 12.5px; margin-top: 2px; }
.dplan .c-st { width: 116px; }
.dplan .c-note { width: 34%; }
.dplan th { font-size: 13px; padding: 5px 8px; background: #f3f4f6; }
.dplan td { font-size: 14px; }
.dplan .dp-stc { text-align: center; }
.dplan .dp-st { display: flex; align-items: center; justify-content: center; gap: 4px; }
.dplan .dp-st .pct { font-size: 11.5px; color: #555; }
.dplan .dp-empty { text-align: center; color: #777; padding: 16px 8px; font-size: 13px; }
.dplan .itext.done span:last-child { text-decoration: line-through; color: #888; }
.dplan .remark-in { width: 100%; border: 0; background: transparent; font-size: 13px; padding: 2px 0; }
.dplan.compact { padding: 12px 12px 10px; min-height: 100%; box-shadow: none; }
.dplan.compact .wtitle { font-size: 15px; letter-spacing: .2em; }
.dplan.compact .dp-head { margin-bottom: 8px; }
.dplan.compact .c-st { width: 92px; }
.dplan.compact th, .dplan.compact td { padding: 5px 6px; font-size: 13px; }
.dplan.compact select.st-sel { font-size: 12px; padding: 3px 22px 3px 8px; }
.dplan.compact .dp-st .pct { display: none; }
/* 오른쪽 패널(iframe) 안에서는 메뉴·탭바를 절대 그리지 않는다 */
html.embed .side, html.embed .tabbar { display: none !important; }
.home-top .dplan { margin-bottom: 16px; }
.dplan .wtitle, .dplan .wperiod { text-align: left; }
.dplan .c-note { width: 28%; }

/* 메뉴 별 (넓은 화면 왼쪽 메뉴) */
.nav .navbox a { position: relative; }
.nav a .pin { position: absolute; left: -5px; top: 50%; transform: translateY(-50%); width: 16px; height: 18px; display: grid; place-items: center;
  border: 0; padding: 0; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; border-radius: 6px; }
.nav a:hover .pin, .nav a .pin:focus-visible { opacity: 1; }
.nav a .pin:hover { color: #f5b301; }
.nav a .pin.on { opacity: 1; color: #f5b301; }
.nav a .pin.on svg, .nav a .pin:hover svg { fill: currentColor; }

/* 전자문서 */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: var(--surface-2); }
.seal-box { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.seal-box img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; }
.trade-wrap { overflow-x: auto; margin-bottom: 8px; }
table.trade { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.trade th { font-size: 12px; color: var(--muted-2); text-align: left; padding: 6px 4px; }
table.trade td { padding: 3px 3px; }
table.trade input { padding: 7px 8px; }
table.trade input.num, table.trade td.num { text-align: right; }
table.trade { min-width: 980px; } table.trade td:nth-child(1) { width: 22%; } table.trade td:nth-child(2) { width: 9%; } table.trade td:nth-child(3) { width: 6%; } table.trade td:nth-child(4), table.trade td:nth-child(5), table.trade td:nth-child(7) { width: 11%; } table.trade td:nth-child(6) { width: 9%; }
.trade-total { display: flex; justify-content: flex-end; gap: 18px; padding: 12px 4px; font-size: 14px; color: var(--muted-2); }
.trade-total b { color: var(--text); font-size: 16px; }
textarea.mono-ish { font-size: 14px; line-height: 1.6; }
.place-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 6px 0; }
.pdf-pages { display: grid; gap: 18px; justify-items: center; }
.pdf-page { position: relative; width: min(100%, 820px); background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 8px 26px rgb(15 23 42 / .10); user-select: none; touch-action: none; }
.pdf-page > img { display: block; width: 100%; height: 100%; pointer-events: none; }
.pdf-no { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #888; }
.fbox { position: absolute; border: 2px solid; border-radius: 4px; cursor: move; display: flex; align-items: center; justify-content: center; min-width: 14px; min-height: 10px; }
.fbox .flabel { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; pointer-events: none; }
.fbox .fdel { position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #e5484d; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: none; }
.fbox:hover .fdel { display: block; }
.fbox .fsize { position: absolute; right: -5px; bottom: -5px; width: 12px; height: 12px; background: currentColor; border-radius: 3px; cursor: nwse-resize; }
.f-them-sign { color: #3b5bdb; border-color: #3b5bdb; background: rgb(59 91 219 / .10); }
.f-them-text { color: #0c8599; border-color: #0c8599; background: rgb(12 133 153 / .10); }
.f-them-date { color: #7048e8; border-color: #7048e8; background: rgb(112 72 232 / .10); }
.f-us-seal { color: #e03131; border-color: #e03131; background: rgb(224 49 49 / .08); }
.btn.f-them-sign, .btn.f-them-text, .btn.f-them-date, .btn.f-us-seal { background: var(--surface); }
.btn.primary.f-them-sign { background: #3b5bdb; } .btn.primary.f-them-text { background: #0c8599; } .btn.primary.f-them-date { background: #7048e8; } .btn.primary.f-us-seal { background: #e03131; }
.btn.primary.f-them-sign, .btn.primary.f-them-text, .btn.primary.f-them-date, .btn.primary.f-us-seal { color: #fff; border-color: transparent; }
.edoc-meta { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 16px; }
.edoc-meta small { display: block; color: var(--muted); font-size: 12px; }
.steps { display: flex; gap: 0; }
.step { flex: 1; position: relative; text-align: center; font-size: 13px; padding-top: 18px; }
.step i { position: absolute; top: 4px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--line); transform: translateX(-50%); }
.step::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { left: 50%; } .step:last-child::before { right: 50%; }
.step.done i { background: var(--ok); } .step i { z-index: 1; }
.step b { display: block; } .step small { color: var(--muted); font-size: 11px; }
td.ua { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-note { max-width: 420px; word-break: break-all; }
.fbox.ro { cursor: default; }
.review-pages { max-height: 52vh; overflow-y: auto; padding: 6px; background: var(--surface-2); border-radius: 12px; }
.modal:has(.review) { width: min(900px, 100%); }
.consent-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--warn-bg); font-weight: 600; cursor: pointer; }
.consent-row input { width: 20px; height: 20px; flex: none; }
.main { min-width: 0; }

/* 전자문서 — 종이 양식 그대로 쓰기 */
.ep-to .grid3 label.f { margin-bottom: 0; }
.wform.sheet.ep-paper { max-width: 900px; padding: 40px 44px; }
.ep-paper input.pin, .ep-paper select.pin-sel { border: 0; border-bottom: 1px dashed #b9c0cc; border-radius: 0; background: transparent; padding: 3px 2px; font: inherit; color: #111; min-height: 0; box-shadow: none; }
.ep-paper input.pin:focus, .ep-paper .pin-area:focus { outline: none; border-bottom-color: #3b5bdb; background: #f4f7ff; }
.ep-paper input.pin.big { font-size: 18px; font-weight: 700; width: 70%; }
.ep-paper input.pin.num { text-align: right; }
.ep-paper input[type=date].pin { width: auto; }
.ep-paper textarea.pin-wrap { display: block; width: 100%; resize: none; overflow: hidden; border: 0; border-bottom: 1px dashed #b9c0cc; border-radius: 0; background: transparent; padding: 3px 2px; font: inherit; line-height: 1.4; color: #111; min-height: 0; box-shadow: none; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.ep-paper textarea.pin-wrap:focus { outline: none; border-bottom-color: #3b5bdb; background: #f4f7ff; }
.ep-paper .pin-area { width: 100%; border: 1px dashed #c9cfd9; border-radius: 4px; background: #fff; padding: 8px 10px; font: inherit; color: #111; resize: vertical; }
.ep-title { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: .5em; margin-bottom: 18px; color: #000; }
.ep-meta { font-size: 13px; color: #333; margin-bottom: 8px; }
.ep-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.ep-to-box { border: 1px solid #1f1f1f; padding: 14px 14px 10px; display: grid; gap: 8px; align-content: start; font-size: 14px; }
.ep-to-name { font-size: 16px; }
.ep-say { margin-top: auto; padding-top: 8px; }
table.ep-sup { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ep-sup th, table.ep-sup td { border: 1px solid #1f1f1f; padding: 6px 8px; }
table.ep-sup th { width: 70px; font-weight: 500; background: #fafafa; }
table.ep-sup th.v { width: 22px; writing-mode: vertical-rl; letter-spacing: .4em; }
.ep-sealcell { position: relative; }
.ep-sealcell .in { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); color: #666; font-size: 12px; }
.ep-seal img { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; object-fit: contain; pointer-events: none; }
.seal-pick { position: absolute; right: 2px; bottom: -22px; font-size: 11px; padding: 1px 4px; width: auto; min-height: 0; border-radius: 6px; z-index: 1; }
.ep-sum { border: 1px solid #1f1f1f; background: #f2f4f8; padding: 9px 12px; font-size: 14px; margin: 26px 0 12px; }
table.ep-items { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ep-items th, table.ep-items td { border: 1px solid #1f1f1f; padding: 3px 4px; }
table.ep-items th { background: #e9edf5; font-weight: 600; padding: 6px 4px; }
table.ep-items td.c { text-align: center; }
table.ep-items input.pin, table.ep-items textarea.pin { width: 100%; border-bottom: 0; }
table.ep-items td { vertical-align: top; }
table.ep-items tr.ep-foot td { background: #f7f8fb; font-weight: 700; padding: 6px 10px; }
table.ep-items tr.ep-foot td.num { text-align: right; }
.ep-tools { margin: 10px 0; }
.ep-note { display: grid; gap: 8px; font-size: 14px; }
.ep-paper input.pin.ep-ctitle { display: block; width: 100%; text-align: center; font-size: 26px; font-weight: 800; margin-bottom: 22px; }
.ep-pre { font-size: 15px; line-height: 1.8; }
.ep-pre input.pin { width: 220px; font-weight: 700; }
.ep-body { min-height: 360px; font-size: 15px; line-height: 1.8; border-style: dashed; overflow: hidden; }
.ep-date { text-align: center; margin: 24px 0 16px; }
.ep-auto { color: #7048e8; border: 1px dashed #7048e8; padding: 2px 8px; border-radius: 4px; font-size: 13px; }
.ep-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.ep-signs h4 { margin: 0 0 6px; font-size: 16px; }
.ep-line { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #c7ccd6; padding: 8px 0 5px; font-size: 13.5px; position: relative; min-height: 34px; }
.ep-line > span:first-child { width: 78px; color: #555; flex: none; }
.ep-line .v { flex: 1; }
.ep-line i { color: #0c8599; font-style: normal; font-size: 12px; border: 1px dashed #0c8599; padding: 1px 6px; border-radius: 4px; }
.ep-line .in { color: #666; font-size: 12px; margin-right: 22px; }
.ep-line .ep-seal img { right: 4px; width: 52px; height: 52px; }
.ep-sealrow { margin-top: 10px; font-size: 12px; color: #555; }
.ep-sealrow .seal-pick { position: static; }
@media (max-width: 760px) { .ep-boxes, .ep-signs { grid-template-columns: 1fr; } .wform.sheet.ep-paper { padding: 20px 14px; } .ep-title { font-size: 22px; } }
.seal-list { display: grid; gap: 6px; }
.seal-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; }
.seal-item img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 8px; }
.fbox .fseal { position: absolute; left: 0; bottom: -24px; font-size: 11px; padding: 1px 4px; min-height: 0; width: auto; border-radius: 6px; cursor: pointer; }
.fbox .fimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .85; pointer-events: none; }
td.dl { white-space: nowrap; } td.dl .btn { margin-right: 4px; }
.file-pair { display: inline-flex; gap: 2px; }
table.edoc-list td:nth-child(1), table.edoc-list td:nth-child(2), table.edoc-list td:nth-child(5) { white-space: nowrap; }
.ep-sealcell .seal-pick { bottom: -20px; }
/* 견적·명세 품목: 번호 칸에 마우스를 올리면 × (줄 삭제) — 표 모양은 그대로 */
table.ep-items td.ep-no { position: relative; width: 4%; }
table.ep-items td.ep-no .del { display: none; position: absolute; inset: 2px; border: 0; border-radius: 4px; background: #fdecea; color: #e5484d; font-size: 16px; font-weight: 700; cursor: pointer; }
table.ep-items tr:hover td.ep-no .n { visibility: hidden; }
table.ep-items tr:hover td.ep-no .del, table.ep-items td.ep-no .del:focus { display: block; }
@media (pointer: coarse) { table.ep-items td.ep-no .del { display: block; background: transparent; color: #e5484d; font-size: 13px; } table.ep-items td.ep-no .n { visibility: hidden; } }
.ep-recv { font-weight: 700; font-size: 12px; letter-spacing: .2em; color: #333; }
.ep-recv-sign { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 20px; font-size: 14px; }
.ep-recv-sign span { width: 140px; border-bottom: 1px solid #333; height: 18px; }
.ep-date input.pin { width: auto; font-size: 15px; }
.ep-date .ep-auto { margin-left: 8px; }
.seal-def { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; color: var(--muted-2); }
.seal-def.on { background: var(--brand-2); color: var(--brand); border-color: transparent; font-weight: 700; }
.seal-def input { width: 14px; height: 14px; margin: 0; }
/* 종이 양식 — PDF 와 같은 모양 (A4 비율, 남색 머리띠, 맨 아래 회사명) */
.wform.sheet.ep-paper { aspect-ratio: 210 / 297; display: flex; flex-direction: column; padding: 30px 40px 22px; }
.ep-topline { height: 4px; background: #1f2a44; margin-bottom: 26px; }
.ep-title { margin-bottom: 2px; letter-spacing: .25em; }
.ep-sub { text-align: center; font-size: 11px; color: #6b7280; letter-spacing: .1em; margin-bottom: 18px; }
.ep-band { background: #1f2a44; color: #fff !important; font-weight: 700; font-size: 13px; padding: 6px 12px !important; text-align: left !important; letter-spacing: .2em; }
.ep-to-box { padding: 0 0 10px; border-color: #9aa3b5; gap: 6px; }
.ep-to-box > :not(.ep-band) { padding: 0 14px; }
.ep-to-box .ep-to-name { padding-top: 10px; }
.ep-to-box .ep-to-name input.pin.big { border-bottom: 1.5px solid #1f2a44; }
table.ep-sup th, table.ep-sup td { border-color: #9aa3b5; }
table.ep-sup th:not(.ep-band) { background: #eef1f7; width: 74px; }
.ep-sum { display: flex; align-items: stretch; padding: 0; border: 1.5px solid #1f2a44; background: #fff; font-size: 16px; }
.ep-sum .l { background: #1f2a44; color: #fff; width: 128px; display: grid; place-items: center; padding: 6px; line-height: 1.2; text-align: center; }
.ep-sum .l b { letter-spacing: .2em; font-size: 14px; } .ep-sum .l small { display: block; font-size: 10px; opacity: .85; }
.ep-sum .k { flex: 1; padding: 10px 14px; font-weight: 700; }
.ep-sum .w { padding: 10px 14px; font-weight: 700; }
table.ep-items th { background: #1f2a44; color: #fff; border-color: #1f2a44; }
table.ep-items td { border-color: #9aa3b5; }
table.ep-items tbody tr:nth-child(even) td { background: #f8f9fc; }
.ep-foot-co { margin-top: auto; padding-top: 24px; text-align: center; font-size: 14px; color: #333; }
table.ep-sup th.ep-band { background: #1f2a44; border-color: #1f2a44; }
/* 계약서 꼭 채울 항목 */
.ep-keys { border: 2px solid #f0b400; background: #fffbea; border-radius: 6px; padding: 12px 14px 8px; margin: 0 0 18px; display: grid; gap: 6px; }
.ep-k-head { font-weight: 800; color: #8a5a00; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ep-k-head small { font-weight: 400; color: #8a6d2a; font-size: 12px; }
.ep-k-row { display: flex; gap: 10px; align-items: center; }
.ep-k-l { width: 76px; flex: none; font-weight: 700; font-size: 13.5px; color: #333; }
.ep-k-v { flex: 1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; color: #333; }
.ep-paper .ep-k-in, .ep-paper input.pin.ep-k-in { background: #fff; border: 1.5px solid #e5c76b; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 14px; color: #111; min-height: 0; flex: 1; min-width: 120px; width: auto; }
.ep-paper .ep-k-in[type=date] { flex: none; }
.ep-paper select.ep-k-in { flex: none; min-width: 0; }
.ep-paper .ep-k-in.num { flex: none; width: 160px; text-align: right; }
.ep-paper .ep-k-in.empty { border-color: #e5484d; background: #fff5f5; }
.ep-paper textarea.ep-k-in { resize: vertical; }
.ep-k-words { color: #1f2a44; font-weight: 700; }
.ep-them2 { border-bottom: 1px solid #333; padding: 0 4px; }

/* 앱 설치 안내 */
.inst-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.inst-head img { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
ol.inst-steps { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; counter-reset: s; }
ol.inst-steps li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.45; counter-increment: s; }
ol.inst-steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.inst-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--surface); display: grid; place-items: center; color: var(--brand); }
.inst-guide { margin-top: 14px; padding: 14px 16px; }
.inst-guide > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 6px; }
.inst-guide > summary::-webkit-details-marker { display: none; }
.inst-guide > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.inst-mine { margin-top: 10px; }
.inst-mine > b { font-size: 13px; color: var(--muted-2); }
.inst-more { display: grid; gap: 4px; margin-top: 8px; }
.inst-more summary { cursor: pointer; font-size: 13px; color: var(--muted-2); padding: 4px 0; }
.inst-tips { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; color: var(--muted-2); }
.inst-tips b { color: var(--text); margin-right: 4px; }

/* 휴대폰: 아래 메뉴 4개, 내 정보는 홈 오른쪽 위, 다른 메뉴 목록은 숨김, 채팅방 안에서는 입력창만 */
.me-btn { display: none; }
.att-admin-btn { display: none; }
@media (max-width: 800px) {
  .me-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); color: var(--text); margin-left: auto; }
  .home-head .weather-row { order: 3; width: 100%; display: flex; gap: 8px; align-items: stretch; }
  .home-head .weather-row .weather { flex: 1; min-width: 0; }
  .home-head .weather-row .weather-chip { height: 100%; }
  .att-admin-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 12px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .att-admin-btn svg { color: var(--brand); }
  .me-menu { display: none; }
  body.chat-room .tabbar { display: none; }
  body.chat-room .main { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  body.chat-room .chat { height: 100%; gap: 0; }
  body.chat-room .chat-pane { border-radius: 0; box-shadow: none; }
}

/* 오늘 업무계획: 머리는 앱 카드, 표는 문서 양식 (흰 바탕·검은 줄) */
.card.dplan { padding: 18px 20px; }
.card.dplan .dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.card.dplan .dp-head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card.dplan .dp-date { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.dp-doc { background: #fff; color: #111; border-radius: 4px; }
table.dp-table { width: 100%; border-collapse: collapse; color: #111; table-layout: fixed; }
table.dp-table th, table.dp-table td { border: 1px solid #2b3446; padding: 7px 9px; vertical-align: middle; font-size: 14px; }
table.dp-table th { background: #eef1f6; font-weight: 600; font-size: 13px; text-align: center; letter-spacing: .1em; }
table.dp-table .itext { display: flex; gap: 6px; align-items: baseline; }
table.dp-table .bullet { width: 5px; height: 5px; border-radius: 50%; background: #111; flex: none; transform: translateY(-2px); }
table.dp-table .remark-in { color: #111; }
table.dp-table .remark-in::placeholder { color: #9aa0aa; }
table.dp-table select.st-sel { color-scheme: light; }
.card.dplan.compact { padding: 12px; margin: 0; box-shadow: none; min-height: 100%; }
.card.dplan.compact .dp-head h2 { font-size: 15px; }
.card.dplan.compact .dp-date { width: 100%; margin-left: 0; font-size: 12px; }
.card.dplan.compact table.dp-table th, .card.dplan.compact table.dp-table td { padding: 5px 6px; font-size: 13px; }
.edoc-bar { align-items: center; margin-bottom: 14px; } .edoc-bar .tabs { margin-bottom: 0; flex: 1; max-width: 480px; }
.edoc-search { flex: 1; min-width: 220px; max-width: 360px; margin-left: auto; }

/* 주간계획 가져오기 */
.modal:has(.wimp) { width: min(760px, 100%); }
.wimp-wait { padding: 18px 0; display: grid; gap: 10px; }
.wimp-list { display: grid; gap: 6px; max-height: 55vh; overflow-y: auto; }
.wimp-week { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.wimp-week summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.wimp-week summary select { width: auto; padding: 3px 8px; min-height: 0; }
.wimp-detail { margin-top: 8px; font-size: 13px; display: grid; gap: 4px; }
.wimp-detail ul { margin: 4px 0; padding-left: 18px; }
.wimp-bar { height: 8px; border-radius: 9px; background: var(--surface-3); overflow: hidden; } .wimp-bar i { display: block; height: 100%; background: var(--brand); transition: width .3s; }

/* 오른쪽 클릭 메뉴 */
.ctx-menu { position: fixed; z-index: 1000; min-width: 180px; padding: 5px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.ctx-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 7px;
  font: inherit; font-size: 14px; color: inherit; text-align: left; cursor: pointer; }
.ctx-item:hover, .ctx-item:focus-visible { background: var(--surface-3); outline: none; }
.ctx-item.danger { color: var(--bad); }
.ctx-item svg { flex: none; opacity: .75; }
.ctx-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.chan .pin-ico { color: var(--muted); display: inline-flex; margin-left: 4px; vertical-align: -2px; }
.chan { -webkit-touch-callout: none; }

/* ---- 게시판 HTML 본문 (보기·편집 같은 모양) */
.post-paper .post-body.post-html, .post-html { white-space: normal; }
.post-html > :first-child { margin-top: 0; }
.post-html p { margin: 0 0 .7em; }
.post-html h2 { font-size: 21px; margin: 1.2em 0 .5em; color: #111827; line-height: 1.35; }
.post-html h3 { font-size: 18px; margin: 1.1em 0 .45em; color: #111827; }
.post-html h4 { font-size: 16px; margin: 1em 0 .4em; color: #111827; }
.post-html ul, .post-html ol { padding-left: 1.5em; margin: 0 0 .8em; }
.post-html li { margin: .15em 0; }
.post-html blockquote { margin: .8em 0; padding: 8px 14px; border-left: 4px solid #c7d2fe; background: #f5f7ff; color: #374151; border-radius: 0 6px 6px 0; }
.post-html pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 13px; white-space: pre; }
.post-html code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.post-html a { color: #3b5bdb; text-decoration: underline; }
.post-html img { max-width: 100%; height: auto; border-radius: 6px; cursor: zoom-in; display: inline-block; vertical-align: top; }
.post-html hr { border: 0; border-top: 1px solid #e5e7eb; margin: 1.2em 0; }
.post-html table { border-collapse: collapse; width: 100%; margin: .8em 0; font-size: 14px; }
.post-body.post-html { overflow-x: auto; }
.post-html th, .post-html td { border: 1px solid #d1d5db; padding: 7px 10px; vertical-align: top; min-width: 60px; text-align: left; }
.post-html th { background: #f3f4f6; font-weight: 700; }

/* 편집기 */
.modal:has(.post-form) { width: min(920px, 100%); }
.post-form .pf-top { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.post-form .pf-top .field { margin-bottom: 8px; }
.rte { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; margin: 4px 0 8px; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  position: sticky; top: 0; z-index: 2; }
.rte-g { display: inline-flex; gap: 1px; padding-left: 6px; border-left: 1px solid var(--line); }
.rte-b { min-width: 30px; height: 30px; padding: 0 6px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: #374151;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; font: 600 14px/1 var(--font); }
.rte-b:hover { background: var(--surface-3); }
.rte-bar .rte-sel { width: auto; flex: none; margin: 0; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 6px; font-size: 13px; }
.rte-pal { position: relative; display: inline-flex; }
.rte-pop { position: absolute; top: 34px; left: 0; z-index: 5; display: flex; gap: 4px; padding: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 20px rgb(0 0 0 / .12); }
.rte-pop[hidden] { display: none; }
.rte-sw { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .12); cursor: pointer; font-size: 12px; color: #6b7280; padding: 0; }
.rte-tbl { display: inline-flex; gap: 1px; padding-left: 6px; border-left: 1px solid var(--line); }
.rte-tbl[hidden] { display: none; }
.rte-tbl .rte-b { font-size: 12px; color: var(--brand); }
.rte-area { min-height: 320px; max-height: 58vh; overflow-y: auto; padding: 18px 22px; outline: none; color: #1f2937; line-height: 1.75; font-size: 15px; word-break: break-word; }
.rte-area:empty::before { content: attr(data-placeholder); color: #9ca3af; }
.rte-area img { cursor: default; }
.rte-area td, .rte-area th { min-width: 60px; }
.perm-h { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted-2); margin: 6px 0 6px; }

/* 첨부: 그림 칸 + 파일 줄 */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.att-thumb { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; background: #fafbfc; cursor: zoom-in; text-align: left; }
.att-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #f3f4f6; }
.att-thumb span { padding: 0 8px 6px; font-size: 12px; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-thumb:hover { border-color: #3b5bdb; }
.post-file { padding: 4px 6px 4px 4px; }
.post-file .pf-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.post-file .pf-open span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-file .pf-open small { margin-left: auto; color: #9ca3af; flex: none; }
.post-file .pf-tag { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #3b5bdb; background: #eef2ff; padding: 2px 7px; border-radius: 99px; }

/* 미리보기 창 */
.pv-back { position: fixed; inset: 0; z-index: 900; background: rgb(10 14 24 / .88); display: flex; flex-direction: column; }
.pv-top { position: relative; z-index: 3; flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #fff; padding-top: max(10px, env(safe-area-inset-top)); background: rgb(10 14 24 / .6); }
.pv-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .18); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pv-close:hover { background: rgb(255 255 255 / .3); }
.pv-top .btn { color: #fff; border-color: rgb(255 255 255 / .25); background: rgb(255 255 255 / .08); }
.pv-title { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; font-weight: 600; }
.pv-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-title small { opacity: .6; font-weight: 400; flex: none; }
.pv-count { opacity: .7; font-size: 13px; flex: none; }
.pv-body { flex: 1; min-height: 0; display: flex; align-items: safe center; justify-content: safe center; padding: 0 56px 18px; overflow: auto; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; background: #fff; }
.pv-frame { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 6px; background: #fff; }
.pv-media { max-width: 100%; max-height: 100%; border-radius: 6px; background: #000; }
.pv-text { width: min(1000px, 100%); height: 100%; margin: 0; overflow: auto; background: #fff; color: #111827; padding: 18px 20px; border-radius: 6px; font: 13px/1.6 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.pv-none { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #e5e7eb; text-align: center; padding: 30px; background: rgb(255 255 255 / .06); border-radius: 14px; }
.pv-none .muted { color: #9ca3af; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgb(255 255 255 / .1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pv-nav:hover { background: rgb(255 255 255 / .2); }
.pv-nav.left { left: 6px; } .pv-nav.right { right: 6px; }
.pv-nav[hidden] { display: none; }
@media (max-width: 700px) {
  .pv-body { padding: 0 6px 10px; }
  .pv-nav { top: auto; bottom: 14px; transform: none; width: 40px; height: 40px; }
  .rte-area { min-height: 240px; padding: 14px; }
  .modal:has(.post-form) { padding: 16px; }
}
.file .file-open { display: inline-flex; gap: 8px; align-items: center; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; min-width: 0; }
.file .pf-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--brand); background: var(--brand-3); padding: 1px 7px; border-radius: 99px; }
.file .btn { padding: 4px 6px; }

/* 채팅 화면: 왼쪽 메뉴를 뺀 전체 폭 */
@media (min-width: 801px) {
  body.page-chat .main { max-width: none; padding: 20px 24px; }
  body.page-chat .chat { height: calc(100vh - 40px); grid-template-columns: minmax(300px, 360px) 1fr; }
}
.bd-lock { display: inline-flex; color: var(--muted); margin-left: 2px; }

/* ---- 휴대폰·PWA: 앱처럼 — 화면 전체가 출렁이지 않고, 내용(.main)만 스크롤. 위쪽은 상태 표시줄(노치)만큼 띄운다 */
@media (max-width: 800px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .shell { height: 100vh; height: 100dvh; min-height: 0; }
  .main { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
    padding-top: calc(env(safe-area-inset-top) + 14px); }
  /* 채팅 목록: 제목·찾기·버튼은 고정, 대화방 목록만 스크롤 */
  body.page-chat:not(.chat-room) .main { overflow: hidden; display: flex; flex-direction: column; }
  body.page-chat:not(.chat-room) .main > * { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body.page-chat .chat { flex: 1; min-height: 0; height: auto; }
  body.chat-room .main { overflow: hidden; display: flex; flex-direction: column; }
  body.chat-room .main > * { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .pv-top a.btn { padding: 6px 9px; font-size: 0; gap: 0; }
  .pv-top a.btn svg { margin: 0; }
}
.chat-list { overflow: hidden; }
.chat-list .chan-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 0 6px; }

/* ---- 게시판 정리: 왼쪽 목록 접기·펴기, 머리 한 줄 정렬 */
.bd-layout { transition: grid-template-columns .2s; }
.bd-layout.side-off { grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
.bd-layout.side-off .bd-side { display: none; }
.bd-shade { display: none; }
.bd-head { align-items: center; gap: 10px; min-height: 44px; }
.bd-head .bd-title { min-width: 0; }
.bd-head h1 { margin: 0; font-size: 22px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-head .bd-title .muted { margin-top: 2px; }
.bd-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.bd-toggle { flex: none; padding: 7px 9px; }
.bd-search { max-width: none; }
.bd-post-top { align-items: center; margin-bottom: 14px; }
.bd-post-top .back-btn { margin-bottom: 0; }
.bd-post-top > .row:last-child { margin-bottom: 0 !important; }
@media (max-width: 800px) {
  .bd-layout, .bd-layout.side-off { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* 휴대폰: 게시판 목록은 왼쪽에서 밀려 나오는 서랍 */
  .bd-layout .bd-side, .bd-layout.side-off .bd-side { display: block; position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(300px, 84vw);
    max-height: none; border-radius: 0 20px 20px 0; padding: calc(env(safe-area-inset-top) + 14px) 12px calc(env(safe-area-inset-bottom) + 14px);
    transform: translateX(0); transition: transform .22s ease; overflow-y: auto; }
  .bd-layout.side-off .bd-side { transform: translateX(-105%); box-shadow: none; }
  .bd-shade { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(15 20 30 / .35); transition: opacity .2s; }
  .bd-layout.side-off .bd-shade { opacity: 0; pointer-events: none; }
  .bd-head { flex-wrap: nowrap; }
  .bd-head h1 { font-size: 19px; }
  .bd-head .bd-title .muted { display: none; }
  .bd-actions .btn.ghost { padding: 6px; }
  .bd-actions .btn.primary { padding: 8px 12px; }
  .bd-search { margin-bottom: 10px; }
  .post-row { padding: 12px 14px; }
  .post-row.head { display: none; }
  .bd-drag-hint { display: none; }
}

/* 채팅 그림: 링크 상자가 그림 크기만큼만 (오른쪽 빈칸이 생기지 않게) */
.msg a.att-link { display: block; width: fit-content; max-width: min(320px, 62vw); line-height: 0; }
.msg a.att-link img.att { max-width: min(320px, 62vw); }
.msg a.att-link img.att { max-width: 100%; width: auto; height: auto; }
/* 보낼 첨부 모음 (보내기 전) */
.att-tray { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 0; border-top: 1px solid var(--line); }
.att-chip { position: relative; display: flex; align-items: center; gap: 6px; height: 64px; min-width: 64px; max-width: 200px; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); }
.att-chip img { height: 100%; width: auto; max-width: 120px; object-fit: cover; display: block; }
.att-chip .att-ic { padding-left: 10px; color: var(--muted); display: inline-flex; }
.att-chip .att-nm { font-size: 12px; padding-right: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip .att-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .6); color: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.att-tray + .composer { border-top: 0; }
/* 오른쪽 채팅 패널(좁은 iframe): 채팅방 안에서도 창 높이에 맞춘다 (입력창이 잘리지 않게) */
html.embed body.chat-room .chat, html.embed .chat { height: 100vh; height: 100dvh; }
html.embed, html.embed body { height: 100%; overflow: hidden; }
/* 오른쪽 채팅 패널(iframe): 높이 계산에 기대지 않고 창에 딱 붙인다 — 목록·대화창 모두 위아래 고정, 가운데만 스크롤 */
.chat { grid-template-rows: minmax(0, 1fr); }
html.embed .chat-list, html.embed .chat-pane { position: fixed; inset: 0; height: auto; }
html.embed .chat-pane { display: flex; flex-direction: column; }
html.embed .chat-pane > .chat-head, html.embed .chat-pane > .composer-wrap { flex: none; }
html.embed .chat-pane > .msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
html.embed .chat.has-pane .chat-list { display: none; }
html.embed .chat:not(.has-pane) .chat-pane { display: none; }
/* 메시지 속 링크 */
.msg .tx a.tx-link { color: var(--accent, #3b5bdb); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.msg.mine .tx a.tx-link { color: inherit; }
/* 전자문서 받는 분 칸: 이름·이메일·휴대폰·제목 (내부문서는 휴대폰 없음) */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; }
.ep-to .grid4 label.f { margin-bottom: 0; }
/* 전자문서: 우리 팀원 고르기 */
.ep-member-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); font-weight: 600; }
.ep-member-row svg { color: var(--brand); }
.ep-member-row select.ep-member { width: auto; min-width: 220px; font-weight: 400; }
/* 메이트: 회사 고르기·회사 가입 신청·약관 링크 */
.modal .actions:has(.co-opt) { flex-direction: column; align-items: stretch; }
.modal .actions .co-opt { justify-content: flex-start; text-align: left; }
.co-register { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.legal-links { text-align: center; margin: 12px 0 0; }
.legal-links a { color: var(--muted); }
/* 메이트 운영자 화면 */
body.opspage { background: var(--bg); }
.ops-page { max-width: 1280px; margin: 0 auto; padding: 24px 16px 48px; }
.ops-head { margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.ops-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ops-card { padding: 14px 16px; display: grid; gap: 4px; }
.ops-card b { font-size: 24px; }
.ops-card.warn b { color: #d97706; } .ops-card.ok b { color: var(--ok, #1f9d55); } .ops-card.bad b { color: var(--bad, #e5533d); }
.ops-table td, .ops-table th { white-space: nowrap; }
.ops-act { display: flex; gap: 6px; }
.ops-tabs { max-width: 680px; } .ops-tabs .tab { white-space: nowrap; }
/* 채팅: 한글은 낱말 단위로 줄바꿈 (낱말 중간에서 끊지 않음), 너무 긴 낱말·주소만 아무 곳에서나 */
.msg .tx { word-break: keep-all; overflow-wrap: anywhere; }
/* 채팅 첨부 파일: 넓게, 이름 두 줄까지 + 아래 줄 크기·보기, 내려받기 버튼은 오른쪽 따로 */
.msg .file { display: flex; width: min(380px, 100%); gap: 10px; align-items: center; box-sizing: border-box; }
.msg .file .file-open { flex: 1; min-width: 0; gap: 10px; }
.msg .file .file-open > svg { flex: none; color: var(--brand); }
.fo-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fo-name { word-break: keep-all; overflow-wrap: anywhere; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fo-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.msg .file > a.btn { flex: none; }
/* 채팅: 반응·답장·수정·삭제는 말풍선 위에 떠서 (자리를 차지하면 좁은 패널에서 말풍선이 줄어든다) */
.msg { position: relative; }
.msg .ops { position: absolute; top: -6px; right: 6px; z-index: 2; white-space: nowrap; padding: 2px; align-self: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.msg.mine .ops { right: auto; left: 6px; }
.chat-empty { height: 100%; min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 24px; } .chat-empty svg { color: var(--brand); opacity: .5; }

/* ---- 화면 밝기 선택 (내 정보) */
.theme-tabs { margin: 0; max-width: 420px; }

/* ---- 전자문서: 서류함 · 함께 보낼 서류 */
.lib-list { display: grid; gap: 6px; }
.lib-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.lib-no { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-text); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.lib-ext { font-size: 10.5px; font-weight: 800; color: var(--muted-2); background: var(--surface-3); border-radius: 6px; padding: 2px 6px; flex: none; }
.lib-name { font-weight: 700; color: var(--text); text-decoration: none; display: block; overflow-wrap: anywhere; }
.lib-name:hover { color: var(--brand); }
.ep-attach h3 { display: flex; align-items: center; gap: 4px; }
.ep-attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ep-att { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); min-width: 0; }
.ep-att.on { border-color: var(--brand); background: var(--brand-3); }
.ep-att input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.ep-att small { white-space: nowrap; }
.ep-att-names { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ep-att-names code { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }
.ep-with { margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.ep-with .ep-attach-list { margin-top: 8px; }
.ep-with .ep-att { align-items: center; max-width: 100%; }
.ep-with .ep-att-txt { min-width: 0; display: flex; flex-direction: column; }
.ep-with .ep-att small { white-space: normal; }

/* ---- 전자문서 휴대폰 */
.icon-btn { width: 42px; height: 42px; padding: 0; border-radius: 14px; }
.edoc-mhead { display: grid; gap: 12px; margin-bottom: 12px; }
.edoc-new { width: 100%; }
.edoc-cards { display: grid; gap: 10px; }
.edoc-card { display: grid; gap: 6px; text-decoration: none; color: var(--text); padding: 14px 16px; margin: 0; }
.edoc-card:active { transform: scale(.99); }
.edoc-card-title { font-size: 16px; overflow-wrap: anywhere; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sheet-back { place-items: end center; padding: 0; }
.modal.sheet { border-radius: 22px 22px 0 0; width: min(560px, 100%); padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheet-up .18s ease-out; }
@keyframes sheet-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.edoc-kinds { display: grid; gap: 8px; }
.edoc-kind { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.edoc-kind .lk-ico { width: 40px; height: 40px; border-radius: 12px; }
.edoc-kind b { display: block; font-size: 15.5px; }
.edoc-kind small { display: block; color: var(--muted-2); font-size: 12.5px; margin-top: 2px; }
.edoc-kind:active { background: var(--brand-3); }
@media (max-width: 760px) {
  .edoc-bar { display: grid; gap: 8px; }
  .edoc-bar .tabs { max-width: none; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .edoc-bar .tabs::-webkit-scrollbar { display: none; }
  .edoc-bar .tabs .tab { flex: none; white-space: nowrap; padding-left: 14px; padding-right: 14px; }
  .edoc-search { max-width: none; min-width: 0; margin: 0; }
  .ep-att { flex: 1 1 100%; }
}
/* 견적서·거래명세서 휴대폰: 품목 카드 */
.ep-mitems { display: grid; gap: 10px; margin-top: 12px; }
.ep-mitem { border: 1px solid #c9d0de; border-radius: 14px; padding: 10px 12px 12px; background: #fbfcfe; display: grid; gap: 8px; }
.ep-mi-head b { font-size: 14px; }
.ep-mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.ep-mf { display: grid; gap: 2px; min-width: 0; }
.ep-mf > span { font-size: 11.5px; color: #5b6785; font-weight: 600; }
.ep-paper .ep-mf input.pin, .ep-paper .ep-mf textarea.pin { width: 100%; font-size: 16px; padding: 6px 2px; }
table.ep-mfoot { margin-top: 10px; }
@media (max-width: 760px) {
  .ep-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .ep-actions { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; }
  .ep-actions > span { grid-column: 1 / -1; }
  .ep-actions .btn { width: 100%; }
  .ep-actions .btn.primary { grid-column: 1 / -1; min-height: 50px; font-size: 16px; }
  .ep-to .grid4 { grid-template-columns: 1fr; }
  .ep-sum { flex-wrap: wrap; font-size: 14px; }
  .ep-sum .l { width: 100%; padding: 8px; }
  .ep-sum .l b, .ep-sum .l small { display: inline; margin: 0 4px; }
  .ep-sum .k { flex: 1 1 100%; padding: 8px 12px 0; }
  .ep-sum .w { flex: 1 1 100%; padding: 2px 12px 10px; text-align: right; font-size: 18px; }
  .ep-tools { flex-wrap: wrap; gap: 8px; }
  .ep-paper input, .ep-paper select, .ep-paper textarea { font-size: 16px; }   /* 아이폰 확대 방지 */
}
/* 전자문서 진행 화면 휴대폰: 단계는 세로, 감사 기록은 카드 */
@media (max-width: 760px) {
  .ep-dactions { display: flex; flex-wrap: wrap; gap: 8px; }
  .ep-dactions .btn { flex: 1 1 auto; }
  .steps { flex-direction: column; gap: 0; padding-left: 4px; }
  .step { text-align: left; padding: 0 0 14px 24px; display: flex; align-items: baseline; gap: 8px; }
  .step i { top: 5px; left: 5px; transform: none; }
  .step::before, .step::after { display: none !important; }
  .step:not(:last-child) i::after { content: ""; position: absolute; left: 4px; top: 10px; width: 2px; height: 26px; background: var(--line); }
  .step.done:not(:last-child) i::after { background: var(--ok); }
  .step small { margin-left: auto; font-size: 12px; }
  .edoc-meta { grid-template-columns: 1fr 1fr; }
  table.edoc-audit thead { display: none; }
  table.edoc-audit, table.edoc-audit tbody, table.edoc-audit tr, table.edoc-audit td { display: block; width: 100%; }
  table.edoc-audit tr { padding: 10px 2px; border-bottom: 1px solid var(--line); }
  table.edoc-audit td { border: 0; padding: 1px 0; }
  table.edoc-audit td:nth-child(1) { font-size: 12px; color: var(--muted); }
  table.edoc-audit td:nth-child(2) { font-weight: 700; }
  table.edoc-audit td:nth-child(3), table.edoc-audit td:nth-child(4) { display: inline; font-size: 12px; color: var(--muted-2); margin-right: 8px; }
  table.edoc-audit td.ua { font-size: 11.5px; }
}

/* 서류함 유형 묶음 */
.lib-group { display: grid; gap: 6px; }
.lib-group + .lib-group { margin-top: 10px; }
.lib-ghead { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.lib-file-pick { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; min-width: 0; }
.lib-file-pick b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ep-att-txt { display: grid; min-width: 0; }
.ep-att-txt b { font-size: 14px; overflow-wrap: anywhere; }
.ep-att-txt small { color: var(--muted); font-size: 11.5px; }

/* 받는 사람: 즐겨찾기·최근 */
.ep-to-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ep-to-bar > b { margin-right: auto; font-size: 15px; }
.ct-wrap { display: grid; gap: 10px; }
.ct-list { display: grid; gap: 6px; max-height: min(55vh, 460px); overflow-y: auto; margin-top: 10px; }
.ct-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; color: var(--text); width: 100%; font: inherit; }
.ct-item b { display: block; overflow-wrap: anywhere; }
.ct-item small { display: block; }
.ct-pick { cursor: pointer; }
.ct-pick:hover, .ct-pick:active { border-color: var(--brand); background: var(--brand-3); }
.ct-av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-2); color: var(--brand); font-weight: 800; flex: none; }
.ct-item > .btn { flex: none; padding-left: 8px; padding-right: 8px; }
.ct-item .grow { flex: 1 1 0; min-width: 0; }
.ct-list { overflow-x: hidden; }
@media (max-width: 760px) {
  /* 전자문서 작성 중: 아래 메뉴를 숨기고 [삭제·미리보기·보내기] 막대를 화면 아래에 고정 */
  body.edoc-edit .tabbar { display: none; }
  body.edoc-edit .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.edoc-edit .ep-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface);
    box-shadow: 0 -4px 20px rgb(31 42 68 / .10); border-radius: 20px 20px 0 0; margin: 0;
    padding: 10px max(14px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right));
    display: flex; gap: 8px; align-items: center; }
  body.edoc-edit .ep-actions > span { display: none; }   /* 저장 상태는 숨김 (자동 저장) */
  body.edoc-edit .ep-actions .btn { width: auto; flex: none; min-height: 48px; }
  body.edoc-edit .ep-actions .btn.primary { flex: 1; grid-column: auto; min-height: 48px; }
  body.edoc-edit .ep-actions label.btn { display: none; }   /* PDF 첨부는 PC 에서 */
  .ep-head { margin-bottom: 8px !important; }
  .ep-att { padding: 8px 10px; }
  .ep-to-bar .btn { min-height: 34px; }
  .ep-attach .row.between { gap: 8px; }
}
.ct-list, .lib-list, .lib-group, .ep-mitems, .edoc-cards, .edoc-kinds { grid-template-columns: minmax(0, 1fr); }
.ct-sub { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  /* 받는 분 줄: 제목 한 줄 + 버튼 4개 한 줄 */
  .ep-to-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .ep-to-bar > b { grid-column: 1 / -1; margin: 0; }
  .ep-to-bar .btn { padding: 6px 4px; font-size: 13px; gap: 3px; }
}
/* 화면 모드: 밝은 · 다크 */
.theme-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: 10px; }
.theme-opt { display: grid; justify-items: center; gap: 8px; padding: 14px 10px 12px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.theme-opt.on { border-color: var(--brand); background: var(--brand-3); }
.theme-opt b { font-size: 14px; }
.theme-swatch { width: 100%; height: 54px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; border: 1px solid rgb(0 0 0 / .08); }
.theme-opt.light .theme-swatch { background: #eef2f9; color: #f5a524; }
.theme-opt.dark .theme-swatch { background: #11151f; color: #c9d4ff; }
.me-link a { position: relative; }
.me-gear { margin-left: auto; display: grid; place-items: center; color: var(--muted); }
.me-link a:hover .me-gear, .me-link a.on .me-gear { color: var(--brand); }

/* ---- 게시판: 투표·신청폼·댓글 */
.btn.xs { padding: 2px 8px; min-height: 26px; font-size: 12px; border-radius: 8px; gap: 3px; }
.post-title .post-cmt { color: var(--brand); font-weight: 700; font-size: 13px; flex: none; }
.post-title .post-tag { flex: none; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--brand-2); color: var(--brand); }
.post-title > span.post-cmt, .post-title > span.post-tag, .post-title > span.post-ico { overflow: visible; }
.post-title .post-ico { flex: none; display: grid; color: var(--brand); }
.bd-side-h .grow { flex: 1; }
.bd-order { display: grid; gap: 6px; }
.bd-order-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bd-order-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-num { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--brand); color: var(--brand-text); }

.bx-view { display: grid; gap: 14px; margin-top: 16px; }
.bx-card { padding: 16px 18px; min-width: 0; }
.bx-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bx-h .grow { flex: 1; }
.bx-h b { font-size: 15px; }
.bx-q { font-size: 16px; font-weight: 700; margin-bottom: 10px; word-break: break-word; }
.bx-poll { display: grid; gap: 8px; }
.bx-poll-opt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; overflow: hidden; font: inherit; }
.bx-poll-opt:hover:not(:disabled) { border-color: var(--brand); }
.bx-poll-opt:disabled { cursor: default; }
.bx-poll-opt.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.bx-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--brand) 14%, transparent); transition: width .35s; pointer-events: none; }
.bx-mark { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.bx-poll-opt.on .bx-mark { background: var(--brand); border-color: var(--brand); }
.bx-txt { position: relative; flex: 1; min-width: 0; display: grid; gap: 2px; word-break: break-word; }
.bx-txt small { color: var(--muted); font-size: 12px; }
.bx-cnt { position: relative; flex: none; font-size: 13px; }
.bx-foot { margin-top: 8px; }
.bx-done { display: flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; margin-bottom: 10px; }
.bx-choices { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 4px 0; }
.bx-table { overflow-x: auto; max-width: 100%; }
.bx-table td, .bx-table th { white-space: nowrap; }

.bx-part { display: grid; gap: 6px; margin: 4px 0; }
.bx-part:empty { display: none; }
.bx-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--brand) 5%, transparent); min-width: 0; }
.bx-chip > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-chip small { color: var(--muted); }
.bx-build { display: grid; gap: 4px; min-width: min(520px, 82vw); }
.bx-opts { display: grid; gap: 6px; }
.bx-opt-row { display: flex; align-items: center; gap: 8px; }
.bx-opt-row input { flex: 1; min-width: 0; }
.bx-fields { display: grid; gap: 10px; }
.bx-field { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.bx-field-top { display: flex; gap: 8px; align-items: center; }
.bx-field-top input { flex: 1; min-width: 0; }
.bx-field-top select { flex: none; width: auto; }
.bx-field-act { display: flex; align-items: center; gap: 4px; }
.bx-field-act .grow { flex: 1; }
.bx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-apply { display: grid; gap: 4px; min-width: min(440px, 82vw); }

.cm-list { display: grid; gap: 4px; margin-bottom: 12px; }
.cm-thread { border-bottom: 1px solid var(--line); padding: 6px 0; }
.cm-thread:last-child { border-bottom: 0; }
.cm { padding: 6px 0; min-width: 0; }
.cm-reply { margin-left: 22px; padding-left: 12px; border-left: 2px solid var(--line); }
.cm-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-head .grow { flex: 1; }
.cm-name { font-size: 14px; }
.cm.mine .cm-name { color: var(--brand); }
.cm-arrow { color: var(--muted); transform: scaleX(-1) rotate(180deg); }
.cm-body { margin: 4px 0 2px; white-space: pre-wrap; word-break: break-word; line-height: 1.6; font-size: 14px; }
.cm-to { color: var(--brand); font-weight: 600; }
.cm-edit { display: grid; gap: 6px; margin: 6px 0; }
.cm-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.cm-thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--surface-2); cursor: zoom-in; }
.cm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-file { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; max-width: 100%; }
.cm-file small { color: var(--muted); }
.cm-file a { color: var(--muted); display: grid; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish:hover { color: var(--brand); }
.cm-compose { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cm-compose.reply { margin: 6px 0 4px 22px; }
.cm-compose textarea { resize: vertical; min-height: 44px; }
.cm-who { font-size: 13px; color: var(--muted); }
.cm-compose .grow { flex: 1; }
@media (max-width: 800px) {
  .bx-card { padding: 14px; }
  .bx-two { grid-template-columns: 1fr; }
  .cm-reply { margin-left: 10px; padding-left: 10px; }
  .cm-compose.reply { margin-left: 10px; }
  .cm-tip { visibility: hidden; }
  .bx-field-top { flex-wrap: wrap; }
  .bx-field-top select { width: 100%; }
}

/* ---- 근태 상태 칩: 퇴근·휴일 */
.chip.out { background: color-mix(in srgb, #6b7a99 16%, transparent); color: color-mix(in srgb, #6b7a99 85%, var(--text)); }
.chip.off { background: color-mix(in srgb, #e05a7a 13%, transparent); color: #d0436a; }
.chip.xs { font-size: 10.5px; padding: 1px 6px; }
td.att-st { white-space: nowrap; }
td.att-st .chip + .chip { margin-left: 4px; }

/* ---- 근태 메모 (여러 개, 지우면 취소선) */
td.att-memo { cursor: pointer; min-width: 160px; max-width: 320px; }
td.att-memo:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.att-note { color: var(--muted); }
.att-m { line-height: 1.45; word-break: break-word; }
.att-m b { font-weight: 700; color: var(--muted-2); }
.att-m.del { text-decoration: line-through; color: var(--muted); }
.att-m-add { display: inline-block; margin-top: 2px; border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; opacity: 0; }
tr:hover .att-m-add, td.att-memo:focus-within .att-m-add { opacity: 1; color: var(--brand); }
@media (pointer: coarse) { .att-m-add { opacity: 1; } }
.memo-list { display: grid; gap: 8px; max-height: 46vh; overflow: auto; margin-bottom: 12px; }
.memo-it { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--surface-2); }
.memo-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.memo-h .btn { margin-left: auto; }
.memo-b { margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.memo-it.del .memo-b { text-decoration: line-through; color: var(--muted); }
.memo-new textarea { width: 100%; }

/* ---- 주간계획: 위쪽 뒤로가기, 제목 이름 → 직원 고르기 */
.wk-back { margin: 0 0 8px; }
.wk-back .back-btn { margin: 0; }
h1.wk-title { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wk-pick { position: relative; display: inline-flex; }
.wk-pick-btn { display: inline-flex; align-items: center; gap: 2px; font: inherit; color: var(--brand); background: none; border: 0; border-bottom: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); padding: 0 2px; cursor: pointer; }
.wk-pick-btn:hover, .wk-pick-btn.on { border-bottom-style: solid; }
.wk-pick-caret { display: inline-grid; transform: rotate(90deg); transition: transform .15s; }
.wk-pick-btn.on .wk-pick-caret { transform: rotate(-90deg); }
.wk-pop { position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 400; overflow: hidden; }
.wk-pop-q { width: calc(100% - 16px); margin: 8px; }
.wk-pop-list { max-height: min(360px, 55vh); overflow-y: auto; padding: 0 6px 6px; overscroll-behavior: contain; }
.wk-pop-it { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 10px; cursor: pointer; color: var(--text); font: inherit; }
.wk-pop-it:hover { background: var(--surface-2); }
.wk-pop-it.cur { background: var(--brand-2); }
.wk-pop-it .avatar.sm { margin: 0; flex: none; }
.wk-pop-it b { display: block; font-size: 14px; }
.wk-pop-it small { display: block; font-size: 12px; }

/* ---- 업무현황 (대표): 조직도 모양 + 직원 카드 */
.ws-sum { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ws-org .org-tree li > .ws-grid { margin-top: 2px; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.ws-card { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-left: 4px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; color: var(--text); text-decoration: none; min-width: 0; }
.ws-card:hover { border-color: var(--brand); box-shadow: var(--shadow-pop); }
.ws-card.ws-in, .ws-card.ws-off_work { border-left-color: var(--ok); }
.ws-card.ws-out { border-left-color: #8a96b0; }
.ws-card.ws-leave, .ws-card.ws-half { border-left-color: var(--brand); }
.ws-card.ws-absent { border-left-color: var(--bad); }
.ws-card.ws-no_out { border-left-color: var(--warn); }
.ws-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ws-h .avatar.sm { margin: 0; flex: none; }
.ws-who { min-width: 0; }
.ws-who b { display: block; font-size: 14px; }
.ws-who small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-att { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ws-items, .org-tree ul.ws-items { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 5px; }
.ws-items li { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.4; padding: 0 !important; }
.ws-items li::before, .ws-items li::after { display: none !important; }
.ws-items .st { font-size: 11px; padding: 1px 7px; flex: none; margin-top: 1px; }
.ws-items li .grow { min-width: 0; word-break: break-word; }
.ws-items li.del .grow { text-decoration: line-through; color: var(--muted); }
.st-removed { background: var(--surface-3); color: var(--muted); }
.ws-pct { font-size: 11px; color: var(--brand); font-weight: 700; flex: none; }
.ws-add { color: var(--brand); font-weight: 700; }
.ws-clip { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; color: var(--muted); font-size: 11px; }
.ws-empty { font-size: 13px; color: var(--muted); padding: 4px 0; }
.ws-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-bar { flex: 1; min-width: 60px; }
.ws-req { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; border-top: 1px dashed var(--line); padding-top: 7px; color: var(--muted-2); }
.ws-req .ic { flex: none; margin-top: 2px; color: var(--brand); }
.ws-req-it { display: block; }
.bad-t { color: var(--bad); }
@media (max-width: 640px) {
  .ws-org .org-tree ul { padding-left: 10px; }
  .ws-org .org-tree li { padding-left: 10px; }
  .ws-grid { grid-template-columns: 1fr; }
}
.att-t th, .att-t td:first-child { white-space: nowrap; }

/* ---- 서비스 점검 띠 (예정·진행) */
.maint-bar { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 8px); width: min(720px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4;
  background: var(--warn-bg); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); box-shadow: var(--shadow-pop); }
.maint-bar b { color: var(--warn); white-space: nowrap; }
.maint-bar.live { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.maint-bar.live b { color: var(--bad); }
.maint-x { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }

/* 근태 표 (휴대폰): 메모 칸을 숨기고 날짜·이름 줄 아래 한 줄로 */
.att-t.phone th.att-memo-h, .att-t.phone td.att-memo { display: none; }
.att-t.phone tr.has-memo > td, .att-t.phone tr:has(+ .memo-row) > td { border-bottom: 0; padding-bottom: 4px; }
.att-t tr.memo-row > td { padding-top: 0; font-size: 12.5px; cursor: pointer; white-space: normal; }
.att-t tr.memo-row .att-m-add { opacity: 1; color: var(--brand); }
.att-t.phone .att-hol { display: block; font-size: 11px; }

/* ---- 회사 주소 (9to6 워크): 로그인 화면 회사 이름, 가입 신청 주소 칸, 대문 회사 찾기 */
.la-company { margin: 4px 0 10px; font-size: 18px; font-weight: 800; display: grid; gap: 2px; }
.la-company small { font-size: 12.5px; font-weight: 500; opacity: .8; }
.la-note { margin-top: 18px !important; font-size: 13px; opacity: .8 !important; }
.sub-field { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.sub-field input { border: 0 !important; border-radius: 0 !important; flex: 1; min-width: 0; box-shadow: none !important; }
.sub-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.sub-suffix { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; white-space: nowrap; }
.sub-msg { min-height: 18px; margin-top: 4px; }
.ok-t { color: var(--ok); font-weight: 600; }
.find-out { display: grid; gap: 6px; margin: 4px 0 8px; }
a.btn.find-co { display: grid; justify-items: start; gap: 2px; text-align: left; padding: 10px 14px; height: auto; }
.find-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.find-sep::before, .find-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---- 9to6 워크 로고 (html.b9 — 다중 회사판에서 서버가 붙인다): 흰 칸에 9to6 works 글자 로고 */
.b9 .blogo { background: #fff url(/brand/9to6-mark.png) center / 82% auto no-repeat !important; color: transparent !important; font-size: 0 !important;
  box-shadow: inset 0 0 0 1px rgb(31 42 68 / .08); }
.b9 .brand .blogo { width: 44px; height: 44px; border-radius: 12px; }
.b9 .logo.big.blogo { width: 84px; height: 84px; border-radius: 22px; }

/* ---- 9to6 워크 요금제 카드 */
.plan-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 8px; }
.plan-col { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); }
.plan-col.cur { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.plan-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.plan-h b { font-size: 17px; }
.plan-h span { color: var(--muted); font-size: 13px; }
.plan-h i { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--brand); }
.plan-col table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.plan-col th { text-align: left; font-weight: 500; color: var(--muted); padding: 5px 0; }
.plan-col td { text-align: right; font-weight: 700; padding: 5px 0; }

/* ---- AI 비서 (9to6 워크) — 채팅 화면의 맨 위 방 (#/chat/ai) */
.ai-chan .avatar.ai-av-list { background: linear-gradient(135deg, #4c6ef5, #7494fc); color: #fff; }
.ai-chan .pv { color: var(--brand); }
.ai-head .ai-av { width: 34px; height: 34px; }
.ai-log { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
.ai-msg { display: flex; gap: 10px; align-items: flex-start; }
.ai-msg.user { justify-content: flex-end; }
.ai-av { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #4c6ef5, #7494fc); color: #fff; }
.ai-av.big { width: 60px; height: 60px; border-radius: 20px; margin: 0 auto 10px; box-shadow: 0 12px 28px -12px rgb(59 91 219 / .6); }
.ai-bubble { max-width: min(760px, 86%); border-radius: 18px; padding: 12px 16px; background: var(--surface-2); line-height: 1.65; word-break: break-word; }
.ai-msg.assistant .ai-bubble { border-top-left-radius: 6px; }
.ai-msg.user .ai-bubble { background: var(--brand); color: var(--brand-text); white-space: pre-wrap; border-top-right-radius: 6px; }
.ai-text p { margin: 0 0 6px; } .ai-text p:last-child { margin-bottom: 0; }
.ai-text ul { margin: 4px 0 8px; padding-left: 18px; } .ai-text li { margin: 2px 0; }
.ai-text .ai-h { font-weight: 800; margin: 8px 0 4px; }
.ai-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-link { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--brand); font-weight: 700; font-size: 13px; text-decoration: none; }
.ai-link:hover { border-color: var(--brand); }
.ai-used { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.ai-used span { display: inline-flex; align-items: center; gap: 3px; }
.ai-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ai-msg.user .ai-files .chip { background: rgb(255 255 255 / .2); color: inherit; }
.ai-confirm { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-bg); border-radius: 14px; }
.ai-confirm small { color: var(--warn); font-weight: 700; font-size: 12px; }
.ai-confirm b { display: block; font-size: 14px; margin-top: 2px; }
.ai-act-st { display: flex; gap: 6px; flex: none; }
.ai-empty { margin: auto; text-align: center; padding: 24px 6px; max-width: 640px; }
.ai-empty h2 { margin: 6px 0 4px; }
.ai-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; text-align: left; }
.ai-card-q { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--text); text-align: left; transition: border-color .15s, transform .15s; }
.ai-card-q:hover { border-color: var(--brand); transform: translateY(-1px); }
.ai-card-ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-2); color: var(--brand); }
.ai-card-q small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-scope { margin-top: 16px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 4px; }
.ai-wait { display: flex; align-items: center; gap: 5px; padding: 14px 16px; }
.ai-wait i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .5; animation: aiDot 1s infinite ease-in-out; }
.ai-wait i:nth-child(2) { animation-delay: .15s; } .ai-wait i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-wait i { animation: none; } }
.att-admin-btn.ai { color: var(--brand); }
@media (max-width: 640px) { .ai-log { padding: 12px; } .ai-bubble { max-width: 92%; } .ai-cards { grid-template-columns: 1fr; } }
/* 회의록 할 일 제안 */
.ai-actions .ai-act { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.ai-actions .ai-act b { display: block; }
@media (max-width: 640px) { .ai-actions .ai-act { flex-wrap: wrap; } }
/* 9to6: 외부 AI 연결 */
.ai-conn h3 { margin: 16px 0 6px; }
.ai-howto { padding-left: 18px; line-height: 1.7; color: var(--muted-2); }
.connect-card { justify-self: center; width: min(520px, 100%); }
.connect-card h1 { text-align: center; }
.connect-list { padding-left: 20px; line-height: 1.8; }
.connect-list.ok li::marker { content: "✓  "; color: var(--ok); }
.connect-list.no li::marker { content: "✕  "; color: var(--bad); }
/* 9to6 체험 회사 표시 */
.demo-ribbon { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); background: #1f2a44; color: #fff; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgb(0 0 0 / .2); pointer-events: none; opacity: .92; }
@media (max-width: 900px) { .demo-ribbon { bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); } }
/* 9to6: AI 앱 연결 타일 */
.ai-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 6px 0 12px; }
.ai-app { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.ai-app:hover:not(:disabled) { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.ai-app:disabled { opacity: .5; cursor: not-allowed; }
.ai-app-logo { flex: none; display: grid; place-items: center; border-radius: 14px; font-weight: 800; font-size: 20px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -1px; }
.ai-app-t { flex: 1; min-width: 0; display: grid; }
.ai-app-t small { color: var(--muted); font-size: 12px; }
.ai-app-k { font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-2); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.ai-steps { padding-left: 20px; line-height: 1.7; margin: 0 0 12px; }
.ai-code { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-top: 8px; background: var(--surface-2); }
.ai-code pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; font-size: 12px; max-height: 180px; overflow: auto; }
.ai-url summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.btn.block { display: flex; width: 100%; justify-content: center; }
@media (max-width: 640px) { .ai-head .ai-sub { display: none; } }
.ai-field { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; margin-top: 6px; background: var(--surface-2); }
.ai-field small { color: var(--muted); }
.ai-field span { font-size: 13px; word-break: break-all; }
@media (max-width: 520px) { .ai-field { grid-template-columns: 1fr auto; } .ai-field small { grid-column: 1 / -1; } }

/* ---- 계약서 + 견적서 함께: 양식 넘기기 */
.ep-pager { display: flex; align-items: stretch; gap: 8px; margin: 4px 0 12px; }
.ep-pager > .btn { flex: none; align-self: center; }
.ep-tabs { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; padding: 2px; scrollbar-width: thin; }
.ep-tab { position: relative; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 30px 8px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); cursor: pointer; min-width: 120px; }
.ep-tab b { font-size: 14px; }
.ep-tab small { color: var(--muted); font-size: 12px; }
.ep-tab.on { border-color: var(--brand); background: var(--brand-3); box-shadow: 0 0 0 1px var(--brand) inset; }
.ep-tab.add { flex-direction: row; align-items: center; gap: 6px; padding: 6px 10px; border-style: dashed; cursor: default; min-width: 0; }
.ep-tab-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; line-height: 1; padding: 2px 4px; }
.ep-tab-x:hover { color: var(--bad, #d33); }
.ep-embed { display: flex; justify-content: flex-end; min-height: 18px; }
.ep-qpick { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.ep-qpick .ep-att small { white-space: normal; }
@media (max-width: 700px) { .ep-tab { min-width: 104px; padding: 6px 26px 6px 10px; } .ep-tab b { font-size: 13px; } }

/* ---- 칸 놓기: 태그·필수/선택·체크박스·가운데 줄 */
.place-bar { display: flex; flex-direction: column; gap: 8px; }
.place-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.place-tags .btn.tag { border-radius: 999px; }
.place-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.place-opts .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.place-opts .chk input { width: 16px; height: 16px; accent-color: var(--brand); }
.place-opts .seg { display: inline-flex; align-items: center; gap: 4px; }
.f-them-check, .f-us-check { color: #2b8a3e; border-color: #2b8a3e; background: rgb(43 138 62 / .08); }
.f-them-strike, .f-us-strike { color: #c2255c; border-color: #c2255c; background: rgb(194 37 92 / .06); }
.btn.f-them-check, .btn.f-us-check, .btn.f-them-strike, .btn.f-us-strike { background: var(--surface); }
.btn.primary.f-them-check, .btn.primary.f-us-check { background: #2b8a3e; color: #fff; border-color: transparent; }
.btn.primary.f-them-strike, .btn.primary.f-us-strike { background: #c2255c; color: #fff; border-color: transparent; }
.fbox.f-us-check.on::after, .fbox.f-them-check::after { content: '✓'; font-weight: 800; font-size: 12px; line-height: 1; }
.fbox.f-them-check::after { opacity: .35; }
.fbox.f-us-strike::before, .fbox.f-them-strike::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid currentColor; }
.fbox.f-them-strike::before { border-top-style: dashed; }
.fbox.opt { border-style: dashed; opacity: .85; }
.fbox .fchip { position: absolute; left: -2px; top: -20px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; border: 1px solid currentColor;
  background: var(--surface); color: inherit; cursor: pointer; line-height: 1.4; white-space: nowrap; }
.fbox .fchip.opt { opacity: .8; border-style: dashed; }
.fbox .ftip { position: absolute; left: calc(100% + 4px); top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.f-them-check .fsize, .f-us-check .fsize { width: 6px; height: 6px; right: -4px; bottom: -4px; }
.ai-app-logo.img { border: 1px solid var(--line); }
.ai-app-logo.img img { display: block; }

/* 로그인·가입 왼쪽 소개: 위에 붙여 두고(탭을 바꿔도 안 움직임) 큰 아이콘 네 칸 */
.login-box { align-items: start; }
.login-art { justify-content: flex-start !important; }
.login-art .logo { margin-top: 0 !important; }
.login-art .la-install { margin-top: 28px; }
.la-home { display: inline-block; width: fit-content; border-radius: 22px; }
.la-home:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.la-tiles { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.la-tiles li { display: grid; justify-items: start; gap: 10px; padding: 18px; border-radius: 18px; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .16); }
.la-tiles svg { width: 44px; height: 44px; padding: 9px; border-radius: 13px; background: #fff; color: #3b5bdb; }
.la-tiles span { font-size: 16px; font-weight: 700; }
@media (max-width: 760px) { .la-tiles { display: none; } }
.danger-zone { border-color: color-mix(in srgb, var(--bad, #e5484d) 30%, var(--line)); } .danger-zone h2 { color: var(--bad, #e5484d); }
