/* Hermes Inbox — workbench layout modelled on VS Code / Zed: title bar, activity bar, side bar,
   editor, auxiliary (Hermes) bar, status bar. Dense by default: no outer margins, no card gutters. */
[hidden] { display: none !important; }
:root {
  --bg: #ffffff; --bg2: #f6f7f9; --bg3: #eceef2; --fg: #1f2329; --mut: #6b7280; --line: #e3e5e9;
  --acc: #4f46e5; --acc-bg: #eef0ff; --ok: #15803d; --no: #b91c1c; --warn: #b45309; --sel: #e4e7fb;
  --lw: 300px; --rw: 380px; --tb: 36px; --sb: 24px; --ab: 46px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1d22; --bg2: #202329; --bg3: #2a2e36; --fg: #e5e7eb; --mut: #9aa3b2; --line: #30343c;
    --acc: #8b83f7; --acc-bg: #2b2a4a; --ok: #4ade80; --no: #f87171; --warn: #fbbf24; --sel: #33355a;
    color-scheme: dark;
  }
}

/* Manual theme override — data-theme on <html> wins over OS preference */
[data-theme="dark"] {
  --bg: #1b1d22; --bg2: #202329; --bg3: #2a2e36; --fg: #e5e7eb; --mut: #9aa3b2; --line: #30343c;
  --acc: #8b83f7; --acc-bg: #2b2a4a; --ok: #4ade80; --no: #f87171; --warn: #fbbf24; --sel: #33355a;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #ffffff; --bg2: #f6f7f9; --bg3: #eceef2; --fg: #1f2329; --mut: #6b7280; --line: #e3e5e9;
  --acc: #4f46e5; --acc-bg: #eef0ff; --ok: #15803d; --no: #b91c1c; --warn: #b45309; --sel: #e4e7fb;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
@font-face { font-family: "Pretendard"; src: url(/static/vendor/PretendardVariable.woff2) format("woff2-variations"), url(/static/vendor/PretendardVariable.woff2) format("woff2");
  font-weight: 45 920; font-style: normal; font-display: swap; }
:root { --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "D2Coding", Menlo, Consolas, monospace; }
body { background: var(--bg); color: var(--fg); font: 14px/1.6 var(--font); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
a { color: var(--acc); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 6px; padding: 6px 12px; background: var(--acc); color: #fff; font-weight: 600; }
button.ghost, .icon { background: transparent; color: var(--fg); font-weight: 400; }
button.ok { background: var(--ok); } button.no { background: var(--no); } button.sec { background: var(--bg3); color: var(--fg); }
input[type=text], input[type=password], input[type=search], textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
input:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; }
textarea { min-height: 64px; resize: vertical; }
code { font-size: 12px; background: var(--bg3); padding: 0 4px; border-radius: 4px; }
.mut { color: var(--mut); } .err { color: var(--no); }
.chip { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--bg3); font-size: 11px; line-height: 18px; white-space: nowrap; }
.s-결재, .s-완료 { color: var(--ok); } .s-반려 { color: var(--no); } .s-대기 { color: var(--warn); }

/* ── workbench grid ─────────────────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-rows: var(--tb) minmax(0, 1fr) var(--sb); height: 100vh; overflow: hidden; }
.titlebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 8px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; white-space: nowrap; color: var(--fg); }
.tb-search { justify-self: center; width: min(760px, 100%); }   /* (760: room for "📝 문서 · 💬 대화" as its grey text — app.js tbTitle, owner 2026-11-10) */
.tb-search input { padding: 3px 10px; background: var(--bg); text-align: center; }
.tb-search input::placeholder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-right { display: flex; gap: 2px; align-items: center; }
.icon { width: 28px; height: 28px; padding: 0; border-radius: 6px; display: inline-grid; place-items: center; font-size: 15px; color: var(--mut); }
.icon:hover { background: var(--bg3); color: var(--fg); } .icon.on { color: var(--fg); background: var(--bg3); }
.workbench { display: grid; grid-template-columns: var(--ab) var(--lw) 4px minmax(0, 1fr) 4px var(--rw); min-height: 0; }
.activity { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; background: var(--bg2); border-right: 1px solid var(--line); }
.activity .icon { width: 36px; height: 36px; position: relative; } .activity .sv { width: 22px; height: 22px; }
/* 📥 홈 — the menu's top, a little apart from the menus under it */
.activity .ab-home { display: grid; place-items: center; font-size: 20px; line-height: 1; text-decoration: none; margin-bottom: 4px; }
.activity .ab-home::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -4px; height: 1px; background: var(--line); }
.activity .icon.on::before { content: ""; position: absolute; left: -5px; top: 6px; bottom: 6px; width: 2px; background: var(--acc); border-radius: 2px; }
.activity .badge { position: absolute; right: 1px; bottom: 1px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--acc); color: #fff; font-size: 10px; line-height: 15px; text-align: center; padding: 0 3px; }
.activity .spacer { flex: 1; }
.sidebar, .aux { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg2); }
.sidebar { border-right: 1px solid var(--line); } .aux { border-left: 1px solid var(--line); }
.sash { cursor: col-resize; position: relative; z-index: 3; margin: 0 -2px; }
.sash:hover, .dragging .sash.active { background: var(--acc); opacity: .5; }
.dragging, .dragging * { user-select: none; cursor: col-resize !important; } .dragging iframe { pointer-events: none; }
.pane-head { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); flex: none; }
.pane-head .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-head .icon { width: 24px; height: 24px; font-size: 13px; }
.pane-body { flex: 1; overflow: auto; min-height: 0; }
.view { display: none; flex-direction: column; min-height: 0; flex: 1; }
html.v-inbox .view-inbox, html.v-explorer .view-explorer, html.v-library .view-library, html.v-search .view-search, html.v-recent .view-recent, html.v-bookmarks .view-bookmarks, html.v-services .view-services, html.v-mail .view-mail, html.v-settings .view-settings, html.v-chats .view-chats { display: flex; }
/* 💬 왼쪽 채팅 목록 = 오른쪽 패널의 대화 목록 서랍 (chat.js moves .hc-drawer in, owner 2026-11-19): the same 검색 · ＋ 새 대화 · 카테고리 칩 · rows,
   always open here (the chat's own code hides it after a pick) */
.view-chats .chats-body { display: flex; flex-direction: column; overflow: hidden; }
.view-chats .hc-drawer, .view-chats .hc-drawer[hidden] { display: flex !important; flex-direction: column; flex: 1; min-height: 0; max-height: none; overflow: hidden; border: 0; background: transparent; animation: none; }
.view-chats .hc-drawer > * { order: 3; }
.view-chats .hc-drawer > .hc-dhead { order: 0; display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px 10px 6px; position: static; background: transparent; }
.view-chats .hc-drawer > .hc-dhead > :is(b, .mut, .hc-dtr, .hc-dnewc, .hc-lfold) { display: none !important; }
.view-chats .hc-drawer > .hc-dhead > .hc-dsearch { display: block; flex: 1 1 auto; min-width: 0; height: 30px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 12.5px; }
.view-chats .hc-drawer > .hc-dhead > .hc-dsearch:focus { outline: none; border-color: var(--acc); }
.view-chats .hc-drawer > .hc-dfoot { order: 1; display: flex; position: static; padding: 2px 10px 6px; }
.view-chats .hc-drawer > .hc-dfoot > :not(.hc-dnew) { display: none !important; }
.view-chats .hc-drawer > .hc-dfoot > .hc-dnew:not([hidden]) { display: inline-flex !important; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 32px; padding: 0 12px;
  border: 1px dashed color-mix(in srgb, var(--acc) 45%, var(--line)); border-radius: 8px; background: var(--bg); color: var(--acc); font: inherit; font-size: 13px; font-weight: 600; box-shadow: none; cursor: pointer; }
.view-chats .hc-drawer > .hc-dfoot > .hc-dnew:hover { background: var(--acc-bg); border-style: solid; }
.view-chats .hc-drawer > .hc-agf { order: 2; display: flex; flex-wrap: nowrap; gap: 6px; padding: 4px 10px 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex-shrink: 0; }
.view-chats .hc-drawer > .hc-agf[hidden] { display: none !important; }
.view-chats .hc-drawer > .hc-agf::-webkit-scrollbar { display: none; }
.view-chats .hc-drawer > .hc-agf > button { flex: none; white-space: nowrap; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 16px; padding: 5px 13px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 20.8px; cursor: pointer; }
.view-chats .hc-drawer > .hc-agf > button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.view-chats .hc-drawer > .hc-magp { display: none !important; }
.view-chats .hc-drawer .hc-list { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px !important; }

/* states: hide / maximize */
/* Every state keeps the same six tracks as plain lengths (only the editor is 1fr), so the browser can
   animate grid-template-columns between them; hidden panes shrink to 0px and fade instead of vanishing. */
html.sb-off .workbench { grid-template-columns: var(--ab) 0px 0px minmax(0, 1fr) 4px var(--rw); }
html.aux-off .workbench { grid-template-columns: var(--ab) var(--lw) 4px minmax(0, 1fr) 0px 0px; }
html.sb-off.aux-off .workbench, html.max-editor .workbench { grid-template-columns: var(--ab) 0px 0px minmax(0, 1fr) 0px 0px; }
html.max-aux .workbench { grid-template-columns: var(--ab) 0px 0px minmax(0, 1fr) 0px calc(100vw - var(--ab)); }
.workbench { transition: grid-template-columns .26s cubic-bezier(.2, .8, .2, 1); }
.sidebar, .aux, .editor, .sash { overflow: hidden; transition: opacity .2s ease, visibility 0s linear 0s; }
html.sb-off .sidebar, html.sb-off .sash-l, html.aux-off .aux, html.aux-off .sash-r,
html.max-editor .sidebar, html.max-editor .sash, html.max-editor .aux,
html.max-aux .sidebar, html.max-aux .sash, html.max-aux .editor {
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .16s ease, visibility 0s linear .26s; }
body.dragging .workbench, html.no-anim .workbench, html.no-anim .sidebar, html.no-anim .aux, html.no-anim .editor { transition: none !important; }
.sidebar .view, .aux .apane { min-width: 220px; }

/* ── side bar lists ─────────────────────────────────────────────────────────────────────────── */
.sec-head { display: flex; align-items: center; gap: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--fg); cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--bg2); z-index: 1; }
.sec-head .n { margin-left: auto; } .sec-head::before { content: "▾"; width: 12px; color: var(--mut); }
details.sec:not([open]) > .sec-head::before { content: "▸"; }
details.sec > summary { list-style: none; } details.sec > summary::-webkit-details-marker { display: none; }
.items { list-style: none; margin: 0 0 6px; padding: 0; }
.items a { display: block; padding: 3px 12px 3px 20px; color: var(--fg); text-decoration: none; border-left: 2px solid transparent; }
.items a:hover { background: var(--bg3); } .items a.on { background: var(--sel); border-left-color: var(--acc); }
.items .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items .s { display: flex; gap: 6px; font-size: 11px; color: var(--mut); white-space: nowrap; overflow: hidden; }
.empty { padding: 4px 20px; color: var(--mut); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree .row { display: flex; align-items: center; gap: 4px; height: 22px; padding-right: 8px; white-space: nowrap; color: var(--fg); cursor: pointer; text-decoration: none; }
.tree .row:hover { background: var(--bg3); text-decoration: none; } .tree .row.on { background: var(--sel); }
.tree .tw { width: 14px; flex: none; color: var(--mut); text-align: center; font-size: 10px; }
.tree .nm { overflow: hidden; text-overflow: ellipsis; }
.filter { padding: 4px 8px 6px; flex: none; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 8px 6px; } .chips a.on { background: var(--acc); color: #fff; }

/* ── editor ─────────────────────────────────────────────────────────────────────────────────── */
.editor { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.tabs { display: flex; align-items: stretch; height: 35px; background: var(--bg2); border-bottom: 1px solid var(--line); flex: none; }
.tab { display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--bg); border-right: 1px solid var(--line); border-top: 2px solid var(--acc); max-width: 60%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.tab-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.tab-actions a, .tab-actions button { font-size: 12px; padding: 3px 9px; border-radius: 5px; background: var(--bg3); color: var(--fg); font-weight: 500; text-decoration: none; white-space: nowrap; }
.tab-actions a.primary, .tab-actions button.primary { background: var(--acc); color: #fff; }
.crumbs { display: flex; align-items: center; gap: 4px; padding: 3px 14px; font-size: 12px; color: var(--mut); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; flex: none; }
.crumbs a { color: var(--mut); } .crumbs a:hover { color: var(--fg); } .crumbs .sep { opacity: .6; } .crumbs .meta { margin-left: auto; }
.editor-body { flex: 1; overflow: auto; min-height: 0; }
.editor-body.fill { overflow: hidden; display: flex; flex-direction: column; }
.editor-body.fill iframe { flex: 1; width: 100%; border: 0; min-height: 0; }
.doc { padding: 16px 28px 48px; width: 100%; }
.doc h1 { font-size: 22px; margin: 4px 0 12px; } .doc h2 { font-size: 17px; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); } .doc h3 { font-size: 14px; margin: 16px 0 6px; }
.doc table { border-collapse: collapse; margin: 8px 0; } .doc th, .doc td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg2); } .doc blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid var(--acc); background: var(--bg2); }
.doc pre { white-space: pre-wrap; background: var(--bg2); padding: 10px; border-radius: 6px; }
.doc img { max-width: 100%; max-height: 70vh; cursor: zoom-in; }   /* (max-height: a phone screenshot written as a path does not fill the page — owner 2026-11-10) */
body.iv-on { overflow: hidden; }

.iv-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 400; }
.iv-wrap { position: fixed; inset: 0; overflow: hidden; z-index: 401; cursor: grab; }
.iv-wrap * { pointer-events: none; }
.iv-wrap img { position: absolute; top: 0; left: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.iv-wrap.panning { cursor: grabbing; }
.iv-tb { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.35); z-index: 402; }
.iv-tb button { min-width: 34px; height: 30px; padding: 0 10px; border: 1px solid transparent; background: none; color: var(--fg); font-size: 14px; cursor: pointer; border-radius: 7px; font-family: inherit; }
.iv-tb button:hover { background: var(--bg2); border-color: var(--line); }
.iv-tb .iv-pct { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--mut); }
.fm { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 28px; font-size: 12px; color: var(--mut); border-bottom: 1px solid var(--line); background: var(--bg2); }
.fm b { color: var(--fg); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 100%; }
.split > .main { min-width: 0; }
.panel { border-left: 1px solid var(--line); background: var(--bg2); padding: 12px 14px; position: sticky; top: 0; align-self: start; max-height: 100%; overflow: auto; }
.panel h4 { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; color: var(--mut); letter-spacing: .05em; } .panel h4:first-child { margin-top: 0; }
.panel .row2 { display: flex; gap: 6px; } .panel .row2 > * { flex: 1; }
.panel ul { list-style: none; padding: 0; margin: 0; } .panel li { padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12px; } .kv dt { color: var(--mut); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.flash { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; background: var(--acc-bg); }
.flash.err { background: color-mix(in srgb, var(--no) 14%, var(--bg)); color: var(--fg); }
.form { padding: 12px 28px 40px; }
.form h2 { font-size: 15px; margin: 18px 0 6px; } .form h3 { font-size: 13px; margin: 16px 0 4px; font-weight: 600; }
.field { margin: 6px 0 10px; } .field > label, .field > .lbl { display: block; font-size: 12px; color: var(--mut); margin-bottom: 3px; }
.opt { display: inline-flex; gap: 6px; align-items: center; margin: 2px 16px 2px 0; }
.note { font-size: 12px; color: var(--mut); margin: 4px 0; }
.grid-table { width: 100%; border-collapse: collapse; }
.grid-table th { white-space: nowrap; position: sticky; top: 0; background: var(--bg2); font-size: 11px; text-transform: uppercase; color: var(--mut); text-align: left; padding: 5px 14px; border-bottom: 1px solid var(--line); z-index: 1; }
.grid-table td { padding: 4px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid-table td.name { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.grid-table tr:hover td { background: var(--bg2); }
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 100%; }
.dash section { overflow: auto; }
.dash section { border-right: 1px solid var(--line); min-width: 0; } .dash h3 { margin: 0; padding: 8px 14px; font-size: 12px; text-transform: uppercase; color: var(--mut); border-bottom: 1px solid var(--line); background: var(--bg2); }
.dash .items a { padding: 6px 14px; border-bottom: 1px solid var(--line); }

/* ── Hermes (auxiliary bar) ─────────────────────────────────────────────────────────────────── */
.ctx { padding: 0 12px 6px; font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
#chat-log { flex: 1; overflow-y: auto; padding: 4px 12px 8px; min-height: 0; }
.cm { margin: 8px 0; overflow-wrap: anywhere; }
.cm-user { margin-left: 15%; padding: 6px 10px; border-radius: 10px; background: var(--acc); color: #fff; white-space: pre-wrap; }
.cm-assistant { padding: 2px 0; } .cm-assistant .cm-body > :first-child { margin-top: 0; } .cm-body p { margin: .35em 0; } .cm-body pre { white-space: pre-wrap; background: var(--bg3); padding: 8px; border-radius: 6px; }
.cm-tools .chip { margin: 0 4px 4px 0; }
#chat-form { padding: 8px 12px 10px; border-top: 1px solid var(--line); flex: none; }
#chat-form textarea { min-height: 56px; max-height: 40vh; }
.chat-hint { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11px; color: var(--mut); }
.chat-empty { color: var(--mut); padding: 8px 0; }

/* ── status bar ─────────────────────────────────────────────────────────────────────────────── */
.statusbar { display: flex; align-items: center; gap: 14px; padding: 0 10px; background: var(--acc); color: #fff; font-size: 12px; white-space: nowrap; overflow: hidden; }
.statusbar a { color: #fff; } .statusbar .r { margin-left: auto; opacity: .85; }

/* ── xlsx table viewer ──────────────────────────────────────────────────────────────────────── */
.xl-wrap { overflow: auto; } table.xl { border-collapse: collapse; table-layout: fixed; font-size: 12px; width: max-content; }
table.xl td, table.xl th { border: 1px solid var(--line); padding: 2px 6px; vertical-align: top; overflow: hidden; }
table.xl thead th { position: sticky; top: 0; background: var(--bg2); z-index: 1; text-align: center; font-weight: 500; color: var(--mut); }
table.xl tbody th { position: sticky; left: 0; background: var(--bg2); color: var(--mut); font-weight: 400; text-align: right; }
.xl-dd { color: var(--acc); font-size: 10px; } .xl-tabs { padding: 6px 14px; } .card { padding: 8px 14px; }
.card h2 { font-size: 14px; margin: 6px 0; }

/* ── standalone pages (login, anonymous link) ───────────────────────────────────────────────── */
.solo { display: grid; grid-template-rows: var(--tb) minmax(0, 1fr) var(--sb); height: 100vh; }
.solo .titlebar { grid-template-columns: auto 1fr auto; }
.center-card { max-width: 380px; margin: 12vh auto; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.center-card h1 { font-size: 18px; margin: 0 0 12px; }
/* password box with a 👁 show/hide button (login, password setup) */
.pw-wrap { position: relative; } .pw-wrap input[type=password], .pw-wrap input[type=text] { padding-right: 36px; }
.pw-wrap .pw-eye { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
.pw-eye .pw-hide, .pw-eye[aria-pressed=true] .pw-show { display: none; } .pw-eye[aria-pressed=true] .pw-hide { display: block; }

/* ── narrow screens: side and Hermes become overlays ───────────────────────────────────────── */
@media (max-width: 900px) {
  .workbench, html.sb-off .workbench, html.aux-off .workbench, html.sb-off.aux-off .workbench { grid-template-columns: var(--ab) 0 0 minmax(0, 1fr) 0 0; }
  .sidebar, .aux, .sash { display: none; }
  html.m-sb .sidebar { display: flex; position: fixed; top: var(--tb); bottom: var(--sb); left: var(--ab); width: min(86vw, 360px); z-index: 20; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
  html.m-aux .aux { display: flex; position: fixed; top: var(--tb); bottom: var(--sb); right: 0; width: min(94vw, 460px); z-index: 20; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
  .split { grid-template-columns: minmax(0, 1fr); } .panel { position: static; border-left: 0; border-top: 1px solid var(--line); }
  .doc, .form { padding-left: 14px; padding-right: 14px; } .tb-search { display: none; }
}

.sv { display: block; } .i-min { display: none; }
html.max-editor [data-cmd="max-editor"] .i-max, html.max-aux [data-cmd="max-aux"] .i-max { display: none; }
html.max-editor [data-cmd="max-editor"] .i-min, html.max-aux [data-cmd="max-aux"] .i-min { display: block; }
@media (max-width: 1100px) { .dash { grid-template-columns: minmax(0, 1fr); height: auto; } }
/* fixed grid slots: hidden panes must not let the others slide into their columns */
.workbench > .activity { grid-column: 1; grid-row: 1; } .workbench > .sidebar { grid-column: 2; grid-row: 1; }
.workbench > .sash-l { grid-column: 3; grid-row: 1; } .workbench > .editor { grid-column: 4; grid-row: 1; }
.workbench > .sash-r { grid-column: 5; grid-row: 1; } .workbench > .aux { grid-column: 6; grid-row: 1; }
.choice { display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px; margin: 3px 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); cursor: pointer; }
.choice:hover { border-color: var(--acc); } .choice input { margin-top: 3px; flex: none; } .choice span { min-width: 0; overflow-wrap: anywhere; }
.choice:has(input:checked) { border-color: var(--acc); background: var(--acc-bg); }
.panel .lbl { font-size: 12px; color: var(--mut); margin-bottom: 2px; }
/* auxiliary bar tabs: Hermes · 채널 · 담당자 */
.aux-tabs { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 6px; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; scrollbar-width: none; }
.aux-tabs::-webkit-scrollbar { display: none; }
.aux-tabs .spacer { flex: 1; }
.atab { background: transparent; color: var(--mut); font-weight: 600; font-size: 12px; padding: 6px 10px; border-radius: 0; border-bottom: 2px solid transparent; }
.atab:hover { color: var(--fg); }
html.at-hermes [data-atab="hermes"], html.at-channel [data-atab="channel"], html.at-dm [data-atab="dm"] { color: var(--fg); border-bottom-color: var(--acc); }
.apane { display: none; flex-direction: column; flex: 1; min-height: 0; }
html.at-hermes .apane-hermes { display: flex; }
html:not(.at-hermes) .only-hermes { display: none; }
.bz-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); font-size: 12px; flex: none; }
.bz-head select { font: inherit; padding: 2px 4px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--fg); max-width: 60%; }
.bz-log { flex: 1; overflow-y: auto; min-height: 0; padding: 4px 0 8px; }
 .bz-body { overflow-wrap: anywhere; } .bz-body p { margin: .2em 0; } .bz-body pre { white-space: pre-wrap; background: var(--bg3); padding: 6px; border-radius: 6px; }
.bz-form { padding: 8px 12px 10px; border-top: 1px solid var(--line); flex: none; } .bz-form textarea { min-height: 52px; max-height: 35vh; }
.bz-reply { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); margin-bottom: 4px; } .bz-reply span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-ctx { display: flex; gap: 4px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 70%; }
 .tb-left { display: flex; align-items: center; gap: 2px; } .tb-left .brand { margin-right: 8px; } .icon:disabled { opacity: .35; cursor: default; background: transparent; }
.tbadge { margin-left: 4px; display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--no); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.bz-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; } .bz-rx:empty { display: none; }
.bz-rx .rx { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; height: 22px; border-radius: 11px; background: var(--bg3); color: var(--fg); font-size: 12px; font-weight: 500; border: 1px solid transparent; }
.bz-rx .rx.me { border-color: var(--acc); background: var(--acc-bg); } .bz-rx img { width: 16px; height: 16px; }
 .bz-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .bz-img { max-width: 220px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line); }
.bz-file { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); }
.bz-form { position: relative; } .bz-mention { position: absolute; left: 12px; right: 12px; bottom: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); max-height: 220px; overflow: auto; z-index: 5; }
.bz-mention .mi { padding: 5px 10px; cursor: pointer; } .bz-mention .mi.on, .bz-mention .mi:hover { background: var(--sel); }
.bz-filechip { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 4px; } .bz-clip { width: 26px; height: 26px; }
/* Hermes (LibreChat-style) */
.lc-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex: none; }
.lc-sess { flex: 1; min-width: 0; text-align: left; background: var(--bg3); color: var(--fg); font-weight: 600; font-size: 12px; padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lc-model { max-width: 46%; font: inherit; font-size: 12px; padding: 3px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.lc-drawer { border-bottom: 1px solid var(--line); max-height: 45%; overflow: auto; flex: none; background: var(--bg); }
.lc-dhead { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; font-size: 12px; position: sticky; top: 0; background: var(--bg); }
.lc-list { list-style: none; margin: 0; padding: 0 0 6px; } .lc-list li { display: flex; align-items: center; } .lc-list li.on { background: var(--sel); }
.lc-list a { flex: 1; min-width: 0; display: block; padding: 4px 12px; color: var(--fg); text-decoration: none; } .lc-list a:hover { background: var(--bg3); }
.lc-list .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lc-list .s { font-size: 11px; color: var(--mut); }
.lc-list .lc-del { visibility: hidden; } .lc-list li:hover .lc-del { visibility: visible; }
.cm-assistant { position: relative; } .cm-act { display: flex; gap: 6px; margin-top: 2px; visibility: hidden; } .cm-assistant:hover .cm-act { visibility: visible; }
.cm-act button { background: transparent; color: var(--mut); font-size: 11px; padding: 0 4px; font-weight: 500; } .cm-act button:hover { color: var(--fg); }
/* Buzz admin panels */
.bz-chsel { max-width: 45%; } .bz-rel { display: flex; gap: 4px; align-items: center; color: var(--mut); white-space: nowrap; margin-left: auto; }
.bz-panel { border-bottom: 1px solid var(--line); padding: 8px 12px; background: var(--bg); max-height: 50%; overflow: auto; flex: none; font-size: 12px; }
 /* project picker + notifications */
.proj { margin-left: 8px; font: inherit; font-weight: 600; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); max-width: 180px; }
.noti-wrap { position: relative; } #noti-btn { position: relative; }
.nbadge { position: absolute; right: -2px; top: -2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--no); color: #fff; font-size: 10px; line-height: 15px; text-align: center; }
.noti { position: absolute; right: 0; top: 32px; width: min(460px, 92vw); max-height: 70vh; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); z-index: 50; }
.noti-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.noti-chips { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; } .noti-chips .chip { color: var(--fg); text-decoration: none; cursor: pointer; } .noti-chips .chip.on { background: var(--acc); color: #fff; }
.noti-read, .noti-push { font-size: 12px; padding: 2px 6px; color: var(--acc); }
.noti-list { list-style: none; margin: 0; padding: 0; overflow: auto; }
.noti-list a { display: flex; gap: 8px; align-items: flex-start; padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.noti-list a:hover { background: var(--bg2); } .noti-list a.new { background: var(--acc-bg); }
.noti-list .ni { width: 18px; text-align: center; flex: none; } .noti-list .nb { flex: 1; min-width: 0; }
.noti-list .t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noti-list .s { display: block; font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noti-list .nt { font-size: 11px; color: var(--mut); flex: none; }
/* same-name files: format chips */
.fmts { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.fmt { display: inline-block; padding: 0 5px; margin-left: 3px; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; line-height: 15px; color: var(--mut); text-transform: uppercase; text-decoration: none; cursor: pointer; background: var(--bg); }
.fmt:hover { color: var(--acc); border-color: var(--acc); text-decoration: none; } .fmt.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.tab-actions .fmts a.fmt { padding: 0 6px; font-size: 11px; line-height: 18px; background: var(--bg); }
.tab-actions .fmts a.fmt.on { background: var(--acc); color: #fff; }

/* small motion for tab switches and overlays */
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes slidein-l { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slidein-r { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
html.at-hermes .apane-hermes, html.v-inbox .view-inbox, html.v-explorer .view-explorer, html.v-library .view-library, html.v-search .view-search, html.v-recent .view-recent, html.v-bookmarks .view-bookmarks, html.v-services .view-services { animation: fadein .18s ease; }
.noti:not([hidden]), .lc-drawer:not([hidden]), .bz-panel:not([hidden]) { animation: fadein .16s ease; }
@media (max-width: 900px) {
  html.m-sb .sidebar { animation: slidein-l .2s ease; visibility: visible; opacity: 1; }
  html.m-aux .aux { animation: slidein-r .2s ease; visibility: visible; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* answering status */
.dots { display: inline-flex; gap: 2px; font-style: normal; vertical-align: middle; }
.dots b { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot 1s infinite ease-in-out; }
.dots b:nth-child(2) { animation-delay: .15s; } .dots b:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
/* terminal panel (bottom of the editor, VS Code style) */
:root { --th: 280px; }
.tpanel { flex: none; height: 0; display: flex; flex-direction: column; border-top: 0 solid var(--line); background: var(--bg); overflow: hidden;
  transition: height .26s cubic-bezier(.2, .8, .2, 1); position: relative; }
html.term-on .tpanel { height: var(--th); border-top-width: 1px; }
html.term-on.term-max .tpanel { height: 100%; }
html.term-on.term-max .editor > .tabs, html.term-on.term-max .editor > .crumbs, html.term-on.term-max .editor > .editor-body,
html.term-on.term-max .editor > .etabs, html.term-on.term-max .editor > .epane, html.term-on.term-max .editor > .egroups { display: none !important; }
body.dragging .tpanel, html.no-anim .tpanel { transition: none; }
.tsash { position: absolute; left: 0; right: 0; top: 0; height: 5px; cursor: row-resize; z-index: 3; } .tsash:hover { background: var(--acc); opacity: .5; }
.thead { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); flex: none; font-size: 12px; }
.ttitle { font-weight: 700; font-size: 11px; letter-spacing: .05em; color: var(--mut); text-transform: uppercase; }
.ttabs { display: flex; gap: 2px; overflow-x: auto; } .thead .spacer { flex: 1; }
.ttab { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 5px; cursor: pointer; color: var(--mut); white-space: nowrap; }
.ttab.on { background: var(--bg3); color: var(--fg); } .ttab .x { width: 18px; height: 18px; font-size: 11px; visibility: hidden; } .ttab:hover .x, .ttab.on .x { visibility: visible; }
.tbody { flex: 1; min-height: 0; position: relative; }
.tviews, .tview { position: absolute; inset: 0; } .tview { padding: 4px 0 0 8px; }
.tview .xterm { height: 100%; } .tview .xterm-viewport { background: transparent !important; }
.tlogin { max-width: 520px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.tlogin .row2 { display: flex; gap: 6px; } .tlogin input { flex: 1; } .tlogin .err { color: var(--no); min-height: 1em; }
/* settings */
.settings { padding: 16px 24px 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 14px; align-items: start; }
.settings > p { grid-column: 1 / -1; margin: 0 0 4px; }
.set { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.set > header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 14px; }
.set .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mut); flex: none; }
.set.ok .dot { background: var(--ok); } .set.warn .dot { background: var(--warn); } .set.err .dot { background: var(--no); } .set.loading .dot { animation: pulse 1s infinite; }
.set .st-sum { flex: 1; font-size: 12px; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.set.err .st-sum { color: var(--no); } .set.warn .st-sum { color: var(--warn); }
.set-body { padding: 8px 12px 12px; }
.set-rows { width: 100%; border-collapse: collapse; font-size: 12.5px; } .set-rows td { padding: 4px 6px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.set-rows .k { color: var(--mut); white-space: nowrap; width: 1%; } .set-rows .v { overflow-wrap: anywhere; } .set-rows .s { width: 1%; text-align: center; }
.set-rows tr.ok .s { color: var(--ok); } .set-rows tr.warn .s { color: var(--warn); } .set-rows tr.err .s { color: var(--no); } .set-rows tr.err .v { color: var(--no); }
.set-vars { display: grid; gap: 6px; margin-top: 8px; } .set-var { display: grid; grid-template-columns: 130px 1fr auto; gap: 6px; align-items: center; font-size: 12px; }
.set-var label { color: var(--mut); } .set-var input[readonly] { background: var(--bg2); color: var(--mut); }
.set-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .sa { display: inline-flex; gap: 4px; } .sa-in { width: 170px; }
.set-acts button { font-size: 12px; padding: 5px 10px; }
.set-out { margin: 8px 0 0; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; white-space: pre-wrap; max-height: 320px; overflow: auto; }
.tree-refresh.spinning { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 자료실 view, file actions, context menu, text editor */
.tree .st-root > .row .st-off { margin-left: auto; font-size: 10px; color: var(--no); }
.tree .row { position: relative; }
.tree .row-acts { display: none; margin-left: auto; gap: 1px; flex: none; }
.tree .row:hover .row-acts, .tree .row:focus-within .row-acts { display: inline-flex; }
.tree .row-acts button { border: 0; background: none; padding: 0 3px; height: 18px; font-size: 12px; line-height: 18px; color: var(--mut); cursor: pointer; border-radius: 3px; }
.tree .row-acts button:hover { background: var(--bg2); color: var(--fg); }
.tree .rn { flex: 1; min-width: 60px; height: 19px; font: inherit; padding: 0 4px; border: 1px solid var(--acc); border-radius: 3px; background: var(--bg); color: var(--fg); outline: none; }
.pane-foot { flex: none; padding: 5px 12px; font-size: 11px; color: var(--mut); border-top: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctxmenu { position: fixed; z-index: 1000; min-width: 160px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.ctxmenu button { text-align: left; border: 0; background: none; padding: 6px 10px; border-radius: 5px; font: inherit; font-size: 13px; color: var(--fg); cursor: pointer; }
.ctxmenu button:hover { background: var(--sel); }
.fedit { display: flex; flex: 1; min-height: 0; height: 100%; }
.fe-ta { flex: 1; width: 100%; border: 0; outline: none; resize: none; padding: 16px 24px; background: var(--bg); color: var(--fg);
  font: 14px/1.65 ui-monospace, "SF Mono", "D2Coding", Menlo, Consolas, monospace; tab-size: 4; }
.fe-state { font-size: 12px; margin-right: 6px; }

/* /system — BSM-CLIENT integrated */
.sys { display: flex; flex-direction: column; min-height: 100%; }
.sys-tabs { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 2px; padding: 6px 16px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.sys-tabs button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--mut); border-bottom: 2px solid transparent; cursor: pointer; }
.sys-tabs button.on { color: var(--fg); border-bottom-color: var(--acc); font-weight: 600; }
.sys-tabs .cnt { margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; }
.sys-tabs .sp { flex: 1; } .sys-upd { font-size: 12px; white-space: nowrap; flex: none; }
/* narrow editor (side panels open): tabs scroll sideways, the refresh button never gets cut off */
.sys-tabs { overflow-x: auto; scrollbar-width: none !important; } .sys-tabs::-webkit-scrollbar { display: none; }
.sys-tabs button { white-space: nowrap; flex: none; padding-left: 10px; padding-right: 10px; }
.sys-tabs .sys-re { flex: none; padding: 4px 10px; }
.sys-pane { padding: 16px 20px 40px; font-size: 14px; }
.sys-pane h4 { margin: 18px 0 8px; font-size: 13px; }
.sys-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sys-head b { font-size: 17px; }
.sys-err { padding: 16px; border: 1px solid var(--no); border-radius: 10px; color: var(--no); }
.sys-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.sys-bar select, .sys-bar button, .sv-acts button, .sv-acts a { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); cursor: pointer; text-decoration: none; }
.sys-pane button.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.sys-pane button:disabled { opacity: .5; cursor: default; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; margin-bottom: 12px; }
.g-grid.two { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.g-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); min-width: 0; }
.g-card h4 { margin: 0 0 6px; font-size: 12px; color: var(--mut); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-big { font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; } .g-big small { font-size: 14px; color: var(--mut); margin-left: 2px; }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-bar { height: 6px; border-radius: 3px; background: var(--bg3); overflow: hidden; margin: 6px 0 4px; flex: 1; min-width: 60px; }
.g-bar i { display: block; height: 100%; background: var(--ok); transition: width .4s ease; }
.g-bar.warn i { background: var(--warn); } .g-bar.err i { background: var(--no); }
.g-sub { font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; }
.g-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 4px 0; }
.g-name { width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-val { white-space: nowrap; color: var(--mut); } .g-val.warn { color: var(--warn); } .g-val.err { color: var(--no); font-weight: 600; }
.chart { width: 100%; height: 120px; display: block; } .chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch-legend { display: flex; gap: 12px; font-size: 12px; margin-bottom: 4px; } .ch-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.sv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; color: var(--fg); text-decoration: none; }
.sv-badge { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; line-height: 18px; font-weight: 600; background: var(--bg3); color: var(--mut); }
.sv-badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.sv-badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.sv-badge.err { background: color-mix(in srgb, var(--no) 16%, transparent); color: var(--no); }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .err-t { color: var(--no); }
.svc { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.sv-title { font-size: 15px; } .sv-meta { font-size: 13px; margin-top: 3px; }
.sv-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.sv-boot { font-size: 12px; color: var(--mut); display: inline-flex; align-items: center; gap: 4px; }
.sv-log, .lg-out { grid-column: 1 / -1; margin: 6px 0 0; max-height: 420px; overflow: auto; padding: 10px 12px; border-radius: 8px; background: var(--bg2);
  font: 12px/1.5 ui-monospace, "SF Mono", "D2Coding", Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.lg-out { max-height: calc(100vh - 230px); min-height: 300px; }
.lg-WARN { color: var(--warn); } .lg-ERROR { color: var(--no); font-weight: 600; }
.sys-t { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.sys-t th, .sys-t td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sys-t th { color: var(--mut); font-weight: 600; font-size: 12px; } .sys-t.kv th { width: 160px; }
.sys-toast { position: fixed; right: 20px; bottom: 40px; z-index: 1000; padding: 10px 14px; border-radius: 8px; background: var(--fg); color: var(--bg); font-size: 13px; opacity: 0; transform: translateY(8px); transition: all .25s ease; }
.sys-toast.on { opacity: 1; transform: none; } .sys-toast.bad { background: var(--no); color: #fff; }
@media (max-width: 700px) { .svc { grid-template-columns: 1fr; } .sv-acts { justify-content: flex-start; } .g-grid.two { grid-template-columns: 1fr; } }
.sys-t td:not(.mut) { white-space: nowrap; } .g-card + .sys-bar { margin-top: 12px; }

/* drag & drop */
.dz-on { outline: 2px dashed var(--acc); outline-offset: -4px; background: color-mix(in srgb, var(--acc) 6%, transparent); }
.tree .row.dz-row { background: color-mix(in srgb, var(--acc) 22%, transparent); }
.dnd-toast { position: fixed; left: 50%; bottom: 36px; z-index: 1000; transform: translate(-50%, 8px); padding: 8px 14px; border-radius: 8px; background: var(--fg); color: var(--bg);
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.dnd-toast.on { opacity: 1; transform: translate(-50%, 0); } .dnd-toast.bad { background: var(--no); color: #fff; }

/* /storage */
.stg { padding: 16px 24px 48px; max-width: 1100px; font-size: 14px; }
.stg h3 { margin: 24px 0 10px; font-size: 15px; }
.stg-item { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.stg-ic { font-size: 22px; text-align: center; } .stg-main .mut { font-size: 12px; margin-top: 2px; word-break: break-all; }
.stg-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stg-acts a, .stg-acts button, .stg-fa button, .stg-type { font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); cursor: pointer; text-decoration: none; }
.stg button.primary { background: var(--acc); border-color: var(--acc); color: #fff; } .stg button:disabled { opacity: .5; }
.stg-out { grid-column: 1 / -1; margin: 6px 0 0; max-height: 300px; overflow: auto; padding: 8px 10px; border-radius: 8px; background: var(--bg2); font: 12px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; }
.stg-types { display: flex; flex-wrap: wrap; gap: 8px; }
.stg-type { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.stg-type.on { border-color: var(--acc); background: var(--acc-bg); }
.stg-form { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; max-width: 640px; }
.stg-form h4 { margin: 0; } .stg-form p { margin: 0; font-size: 13px; }
.stg-form label { display: grid; gap: 4px; font-size: 13px; } .stg-form label.chk { display: flex; align-items: center; gap: 6px; }
.stg-form input:not([type=checkbox]), .stg-form textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.stg-form textarea { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.stg-fa { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .stg-msg { font-size: 13px; white-space: pre-wrap; }
@media (max-width: 700px) { .stg-item { grid-template-columns: 36px 1fr; } .stg-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.stg-oauth { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.stg-step { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.stg-step > b { width: 20px; height: 20px; border-radius: 50%; background: var(--acc); color: #fff; font-size: 11px; display: inline-grid; place-items: center; flex: none; }
.stg-step .stg-cb { flex: 1; min-width: 260px; font: 12px ui-monospace, Menlo, monospace; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.stg-manual { font-size: 13px; } .stg-manual summary { cursor: pointer; color: var(--mut); } .stg-manual ol { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; }
.stg code { font-size: 12px; background: var(--bg3); padding: 1px 5px; border-radius: 4px; word-break: break-all; }


/* typography unified with the Hermes chat (Pretendard · 15px/1.72 for reading, 13–14px for chrome) */
.items a { padding: 4px 12px 4px 20px; font-size: 13.5px; } .items .s { font-size: 12px; }
.tree .row { height: 26px; font-size: 13.5px; } .tree .tw { font-size: 11px; }
.pane-head { font-size: 11.5px; letter-spacing: .04em; }
.sec-head { font-size: 11.5px; padding: 4px 8px; }
.tab-actions a, .tab-actions button { font-size: 13px; padding: 4px 10px; }
.crumbs { font-size: 13px; padding: 5px 16px; }
.doc { font-size: 15px; line-height: 1.72; padding: 20px 32px 56px; }
.doc p, .doc li { margin: .45em 0; } .doc ul, .doc ol { padding-left: 1.4em; }
.doc h1 { font-size: 1.6em; line-height: 1.3; margin: .2em 0 .7em; } .doc h2 { font-size: 1.3em; line-height: 1.35; margin: 1.4em 0 .5em; }
.doc h3 { font-size: 1.12em; margin: 1.2em 0 .4em; } .doc h4 { font-size: 1em; margin: 1em 0 .3em; }
.doc table { font-size: .93em; } .doc th, .doc td { padding: 7px 11px; }
.doc code { font-family: var(--mono); font-size: .88em; } .doc pre { font-family: var(--mono); font-size: 13px; line-height: 1.55; padding: 12px 14px; border-radius: 10px; }
.doc blockquote { border-radius: 0 8px 8px 0; padding: 6px 14px; }
.fm { font-size: 13px; padding: 8px 32px; }
.kv { font-size: 13px; gap: 4px 12px; }
.panel h4 { font-size: 12px; } .field > label, .field > .lbl { font-size: 13px; } .note { font-size: 13px; }
.form h2 { font-size: 16px; } .form h3 { font-size: 14px; }
.grid-table { font-size: 14px; } .grid-table th { font-size: 12px; } .dash h3 { font-size: 12.5px; }
.chip { font-size: 12px; line-height: 20px; }
code { font-family: var(--mono); font-size: .9em; }
.set, .sys-pane, .stg { font-size: 14px; }

/* Buzz channel / DM: the same reading style as the Hermes chat */
.bz-log { padding: 6px 0 10px; }
  .bz-body { font-size: 15px; line-height: 1.68; color: var(--fg); }
.bz-body p { margin: .3em 0; } .bz-body ul, .bz-body ol { margin: .3em 0; padding-left: 1.3em; } .bz-body li { margin: .15em 0; }
.bz-body h1, .bz-body h2, .bz-body h3, .bz-body h4 { font-size: 1.05em; margin: .7em 0 .3em; line-height: 1.4; }
.bz-body a { color: var(--acc); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.bz-body code { font-family: var(--mono); font-size: .86em; background: var(--bg3); padding: .1em .35em; border-radius: 5px; }
.bz-body pre { font-family: var(--mono); font-size: 13px; line-height: 1.55; padding: 10px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); overflow-x: auto; white-space: pre-wrap; }
.bz-body pre code { background: transparent; padding: 0; }
.bz-body blockquote { margin: .4em 0; padding: 2px 12px; border-left: 3px solid var(--line); color: var(--mut); }
.bz-body table { border-collapse: collapse; font-size: .92em; margin: .4em 0; display: block; overflow-x: auto; } .bz-body th, .bz-body td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }
.bz-body hr { border: 0; border-top: 1px solid var(--line); margin: .8em 0; }
.bz-head { font-size: 13px; padding: 7px 12px; } .bz-panel { font-size: 13px; }
.bz-form textarea { font-size: 15px; line-height: 1.6; font-family: var(--font); }
 .bz-reply { font-size: 13px; }

/* editor tabs (VS Code style): one strip, one pane per open document / tool page */
.etabs { display: flex; align-items: stretch; height: 38px; flex: none; background: var(--bg2); border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.etabs::-webkit-scrollbar { height: 3px; } .etabs::-webkit-scrollbar-thumb { background: var(--line); }
.etab { display: flex; align-items: center; gap: 7px; padding: 0 6px 0 12px; min-width: 110px; max-width: 240px; flex: none; cursor: pointer; user-select: none;
  border-right: 1px solid var(--line); border-top: 2px solid transparent; color: var(--mut); font-size: 13.5px; position: relative; }
.etab:hover { background: var(--bg3); color: var(--fg); }
.etab.on { background: var(--bg); color: var(--fg); border-top-color: var(--acc); font-weight: 600; margin-bottom: -1px; }
.etab .ei { flex: none; font-size: 14px; } .etab .et { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etab .ex { flex: none; width: 22px; height: 22px; padding: 0; border-radius: 5px; background: transparent; color: var(--mut); font-size: 16px; line-height: 20px; font-weight: 400; visibility: hidden; }
.etab:hover .ex, .etab.on .ex { visibility: visible; } .etab .ex:hover { background: var(--bg3); color: var(--fg); }
/* 참고하기: a document tab → a reference of the channel / chat box (owner 2026-11-01) */
.etab .er { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border-radius: 5px; background: transparent; color: var(--mut); visibility: hidden; }
.etab:hover .er, .etab.on .er { visibility: visible; } .etab .er:hover { background: var(--bg3); color: var(--acc); }
.etab .er { cursor: grab; } .etab .er:active { cursor: grabbing; }
/* a 🪝 hook on its way: the chat boxes that take it light up */
body.ref-dragging .hc-composer { outline: 2px dashed color-mix(in srgb, var(--acc) 55%, transparent); outline-offset: -3px; border-radius: 10px; }
.etab .eo { flex: none; width: 22px; height: 22px; padding: 0; border-radius: 5px; background: transparent; color: var(--mut); font-size: 13px; line-height: 20px; visibility: hidden; }
.etab:hover .eo { visibility: visible; } .etab .eo:hover { background: var(--bg3); color: var(--fg); }
@media (max-width: 900px) { .etab .eo { display: none; } }
.epane { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
.epane[hidden] { display: none !important; }
.epane > .tabs { display: contents; } .epane .tab { display: none; }
.epane .tab-actions { grid-column: 2; grid-row: 1; margin: 0; padding: 4px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.epane .tab-actions:empty { display: none; }
.epane > .crumbs { grid-column: 1; grid-row: 1; border-bottom: 1px solid var(--line); }
.epane > .editor-body { grid-column: 1 / -1; grid-row: 2; }
.epane:not(:has(> .crumbs)) .tab-actions { grid-column: 1 / -1; justify-content: flex-end; }
.etab .ed { flex: none; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; color: var(--mut); }

/* Buzz message footer: reactions + tools below the text, never over it */
.bz-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; opacity: 0; transition: opacity .12s ease; }
.bz-tools .act { visibility: visible; background: transparent; color: var(--acc); font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin: 0; }
.bz-tools .act:hover { background: var(--bg3); }
@media (hover: none) { .bz-tools { opacity: 1; } }
html:fullscreen [data-cmd="fullscreen"] { color: var(--acc); background: var(--acc-bg); }

/* document paths and @mentions in Buzz / Hermes messages */
a.doclink { color: var(--acc); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; overflow-wrap: anywhere; }
.mention { display: inline-block; padding: 0 5px; border-radius: 5px; background: var(--acc-bg); color: var(--acc); font-weight: 650; line-height: 1.45; }
.mention.me { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }

/* exec-approval popup */
.apv { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: rgba(0,0,0,.35); animation: fadein .15s ease; }
.apv[hidden] { display: none !important; }
.apv-card { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--bg); color: var(--fg); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 2px solid var(--warn); padding: 18px 20px; display: grid; gap: 12px; font-size: 14px; }
.apv-head { display: flex; gap: 12px; align-items: flex-start; } .apv-ic { font-size: 26px; line-height: 1; } .apv-head b { font-size: 16px; }
.apv-head > div { flex: 1; } .apv-who { font-size: 13px; margin-top: 2px; }
.apv-left { font: 600 14px var(--mono); color: var(--warn); padding: 3px 8px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 14%, transparent); white-space: nowrap; }
.apv-left.urgent { color: #fff; background: var(--no); animation: apvpulse 1s infinite; }
@keyframes apvpulse { 50% { opacity: .6; } }
.apv-cmd { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font: 13px/1.55 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto; }
.apv-reason { font-size: 13px; line-height: 1.55; max-height: 90px; overflow: auto; }
.apv-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.apv-b { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg2); color: var(--fg); border: 1px solid var(--line); font-weight: 500; text-align: left; }
.apv-b img { width: 28px; height: 28px; flex: none; } .apv-b span { display: grid; line-height: 1.25; } .apv-b small { font-size: 11.5px; color: var(--mut); }
.apv-b:hover { border-color: var(--acc); background: var(--acc-bg); } .apv-deny:hover { border-color: var(--no); background: color-mix(in srgb, var(--no) 10%, transparent); }
.apv-b:disabled { opacity: .5; }
.apv-foot { display: flex; gap: 8px; align-items: center; } .apv-foot .apv-n { margin-right: auto; font-size: 13px; }
.apv-foot .ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); font-weight: 500; padding: 5px 12px; }
.apv-msg { font-size: 13px; color: var(--acc); min-height: 1em; } .apv-msg:empty { display: none; }
@media (max-width: 640px) { .apv-acts { grid-template-columns: 1fr 1fr; } }
.sys-tabs .sys-re { margin-left: 10px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font-size: 13px; font-weight: 500; }
.sys-tabs .sys-re.busy { opacity: .6; } .sys-tabs .sys-re:hover { background: var(--bg3); }

/* Notion-like markdown editor (Milkdown Crepe) in the inbox look */
.fedit.fe-md { flex-direction: column; overflow: auto; }
.fe-md .crepe-host { flex: 1; min-height: 0; }
.fe-md .crepe-host .milkdown {
  --crepe-color-background: var(--bg); --crepe-color-on-background: var(--fg); --crepe-color-surface: var(--bg2); --crepe-color-surface-low: var(--bg3);
  --crepe-color-on-surface: var(--fg); --crepe-color-on-surface-variant: var(--mut); --crepe-color-outline: var(--line); --crepe-color-primary: var(--acc);
  --crepe-color-secondary: var(--acc-bg); --crepe-color-on-secondary: var(--fg); --crepe-color-inverse: var(--fg); --crepe-color-on-inverse: var(--bg);
  --crepe-color-inline-code: var(--no); --crepe-color-error: var(--no); --crepe-color-hover: var(--bg3); --crepe-color-selected: var(--sel);
  --crepe-color-inline-area: var(--bg3); --crepe-base-font-size: 15px;
  --crepe-font-title: var(--font); --crepe-font-default: var(--font); --crepe-font-code: var(--mono);
  background: var(--bg);
}
.fe-md .crepe-host .milkdown .ProseMirror { padding: 24px 72px 120px; line-height: 1.72; }
.fe-md .crepe-host .milkdown .ProseMirror h1 { font-size: 1.6em; } .fe-md .crepe-host .milkdown .ProseMirror h2 { font-size: 1.3em; }
.fe-md .crepe-host .milkdown .ProseMirror h3 { font-size: 1.12em; }
.fe-note { margin: 8px 16px 0; padding: 8px 12px; border-radius: 8px; font-size: 13px; background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.fe-fm { margin: 10px 16px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); font-size: 13px; }
.fe-fm summary { padding: 6px 12px; cursor: pointer; color: var(--mut); }
.fe-fm textarea { display: block; width: 100%; min-height: 120px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; background: var(--bg); font: 13px/1.6 var(--mono); padding: 10px 12px; resize: vertical; }
.fe-loading { padding: 24px 32px; }
@media (max-width: 900px) { .fe-md .crepe-host .milkdown .ProseMirror { padding: 16px 24px 80px; } }
.fe-md .crepe-host .milkdown .ProseMirror { max-width: none; }
.fe-md .crepe-host .milkdown .ProseMirror :is(h1, h2, h3, h4, h5, h6) { font-weight: 700; letter-spacing: -0.01em; }
.fe-md .crepe-host .milkdown .ProseMirror h2 { border-bottom: 1px solid var(--line); padding-bottom: 4px; }

/* terminal groups: split panes with draggable dividers */
.tviews { display: block; }
.tgroup { position: absolute; inset: 0; display: flex; flex-direction: row; }
.tgroup.col { flex-direction: column; } .tgroup[hidden] { display: none; }
.tcell { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid transparent; }
.tgroup > .tcell:only-child .tchead { display: none; }
.tcell.on { border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.tchead { display: flex; align-items: center; gap: 2px; height: 24px; padding: 0 4px 0 10px; font-size: 12px; color: var(--mut); flex: none; border-bottom: 1px solid var(--line); }
.tchead .sp { flex: 1; } .tchead .icon { width: 22px; height: 22px; font-size: 12px; visibility: hidden; }
.tcell:hover .tchead .icon, .tcell.on .tchead .icon { visibility: visible; } .tcell.on .tchead { color: var(--fg); }
.tcell .tview { position: relative; inset: auto; flex: 1; min-height: 0; }
.tsplit { flex: none; width: 5px; cursor: col-resize; background: var(--line); background-clip: content-box; padding: 0 2px; }
.tgroup.col > .tsplit { width: auto; height: 5px; cursor: row-resize; padding: 2px 0; }
.tsplit:hover, body.dragging .tsplit:active { background-color: var(--acc); }

/* terminal panel on the right of the editor */
html.term-right .editor { display: grid; grid-template-columns: minmax(0, 1fr) 0px; grid-template-rows: auto minmax(0, 1fr); }
html.term-right.term-on .editor { grid-template-columns: minmax(0, 1fr) var(--tw, 560px); }
html.term-right .editor > .egroups { grid-column: 1; grid-row: 1 / span 2; }
html.term-right .tpanel { grid-column: 2; grid-row: 1 / span 2; height: auto !important; border-top-width: 0 !important; border-left: 1px solid var(--line); transition: none; }
html.term-right .tsash { top: 0; bottom: 0; left: 0; right: auto; width: 5px; height: auto; cursor: col-resize; }
html.term-right.term-on.term-max .editor { grid-template-columns: 0px minmax(0, 1fr); }
.etabs-close { flex: none; align-self: center; margin-right: 6px; padding: 3px 10px; border-radius: 6px;
  background: var(--bg2); color: var(--mut); font-size: 12.5px; font-weight: 500; border: 1px solid var(--line); box-shadow: -8px 0 8px var(--bg2); }
.etabs-close:hover { color: var(--fg); background: var(--bg3); } .etabs-close[hidden] { display: none; }

/* content width: full (default) or narrow (comfortable reading, centred) */
.etabs-width { flex: none; align-self: center; margin-right: 6px; padding: 3px 10px; border-radius: 6px;
  background: var(--bg2); color: var(--mut); font-size: 12.5px; font-weight: 500; border: 1px solid var(--line); box-shadow: -8px 0 8px var(--bg2); white-space: nowrap; }
.etabs-width:hover { color: var(--fg); background: var(--bg3); } .etabs-width.on { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
html.w-narrow { --read-w: 880px; }
html.w-narrow .editor-body .doc, html.w-narrow .editor-body .form { max-width: var(--read-w); margin-left: auto; margin-right: auto; }
html.w-narrow .editor-body .fm { padding-left: max(32px, calc((100% - var(--read-w)) / 2 + 32px)); padding-right: max(32px, calc((100% - var(--read-w)) / 2 + 32px)); }
html.w-narrow .fe-md .crepe-host .milkdown .ProseMirror { max-width: calc(var(--read-w) + 144px); margin: 0 auto; }
html.w-narrow .fe-fm, html.w-narrow .fe-note { max-width: var(--read-w); margin-left: auto; margin-right: auto; }
html.w-narrow .fedit:not(.fe-md) .fe-ta { padding-left: max(24px, calc((100% - var(--read-w)) / 2)); padding-right: max(24px, calc((100% - var(--read-w)) / 2)); }
.etabs-acts { position: sticky; right: 0; margin-left: auto; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 10px;
  background: var(--bg2); box-shadow: -10px 0 10px var(--bg2); }
.etabs-acts > button { margin: 0; box-shadow: none; }
/* 활성 탭 고정 (owner 2026-11-19): the strip still scrolls sideways, but the tab in front stays in view — held at the left or the right
   edge (inside ☰ and the 도구 buttons: app.js --etl / --eta) when scrolled past */
.etabs:not(.hc-tabs) > .etab.on { position: sticky; left: var(--etl, 0px); right: var(--eta, 0px); z-index: 1; box-shadow: 0 0 0 1px var(--line); }
.etabs:not(.hc-tabs) > .etabs-acts { z-index: 2; }
.tab-actions .w-toggle { background: var(--bg3); color: var(--fg); border: 0; } .tab-actions .w-toggle.on { color: var(--acc); background: var(--acc-bg); }

/* animate full ↔ narrow: every width is a length on both sides (100% ↔ 880px), so it can transition */
.editor-body .doc, .editor-body .form { max-width: 100%; margin-left: auto; margin-right: auto; transition: max-width .38s cubic-bezier(.2, .8, .2, 1); }
.editor-body .fm, .fedit:not(.fe-md) .fe-ta { transition: padding .38s cubic-bezier(.2, .8, .2, 1); }
.fe-md .crepe-host .milkdown .ProseMirror { max-width: 100%; margin: 0 auto; transition: max-width .38s cubic-bezier(.2, .8, .2, 1); }
.fe-fm, .fe-note { transition: max-width .38s cubic-bezier(.2, .8, .2, 1); }
html:not(.w-narrow) .fe-fm, html:not(.w-narrow) .fe-note { max-width: 100%; }
html.w-narrow .fe-fm, html.w-narrow .fe-note { margin-left: auto; margin-right: auto; }
html.no-anim .editor-body .doc, html.no-anim .editor-body .form, html.no-anim .editor-body .fm, html.no-anim .fe-ta, html.no-anim .ProseMirror { transition: none !important; }
.tab-actions .w-toggle { transition: background .2s ease, color .2s ease; }

/* content full screen (max-editor): only the document toolbar and the content; Esc returns */
.app { transition: grid-template-rows .26s cubic-bezier(.2, .8, .2, 1); }
html.max-editor .app { grid-template-rows: 0px minmax(0, 1fr) 0px; }
html.max-editor .titlebar, html.max-editor .statusbar, html.max-editor .activity { overflow: hidden; border: 0; }
html.max-editor .workbench { grid-template-columns: 0px 0px 0px minmax(0, 1fr) 0px 0px; }
html.max-editor .egroup > .etabs, html.max-editor .editor > .tpanel { display: none !important; }
html.max-editor.term-right .editor { grid-template-columns: minmax(0, 1fr) 0px; }
.tab-actions .max-toggle { background: var(--bg3); color: var(--fg); border: 0; transition: background .2s ease, color .2s ease; }
.tab-actions .max-toggle.on { background: var(--acc); color: #fff; }
/* the frontmatter box / notice keep the text width in narrow mode (a flex column with auto margins shrank them to their content) */
.fe-md .fe-fm, .fe-md .fe-note { box-sizing: border-box; width: calc(100% - 32px); align-self: center; }
html.w-narrow .fe-md .fe-fm, html.w-narrow .fe-md .fe-note { width: min(calc(100% - 32px), var(--read-w)); }
.inbox-refresh.spinning { animation: spin .8s linear infinite; }

/* Buzz: floating jump-to-bottom (new messages) */
.apane.bz { position: relative; }
@keyframes jumpin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }


/* Buzz panes: .bz-main holds the usual column; in focus mode a thread pane opens on the right (Buzz/Mattermost) */
.bz-tlog { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0 12px; }
.bz-tform { flex: none; padding: 10px 14px 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.bz-tform textarea { font: 15px/1.6 var(--font); min-height: 64px; resize: vertical; }
.bz-tsum { display: inline-flex; margin: 0 14px 6px 14px; padding: 3px 10px; border-radius: 6px; background: transparent; color: var(--acc); font-size: 13px; font-weight: 600; border: 1px solid transparent; }
.bz-tsum:hover { background: var(--acc-bg); border-color: color-mix(in srgb, var(--acc) 30%, transparent); }
.bz-tsum.new { background: var(--acc-bg); }

/* ── focus mode (chat maximised): a messenger. Hermes = conversation list | chat; channel/DM = messages | thread.
   Column widths (--fcl, --ftw) are dragged with .fsash and kept as window fractions like the other panels. ── */
html.max-aux .app { grid-template-rows: 0px minmax(0, 1fr) 0px; }
html.max-aux .titlebar, html.max-aux .statusbar, html.max-aux .activity { overflow: hidden; border: 0; }
html.max-aux .workbench { grid-template-columns: 0px 0px 0px 0px 0px 100vw; }
html.max-aux .aux { border-left: 0; }
html.max-aux .aux-tabs { height: 42px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.fsash { display: none; }
html.max-aux .fsash { display: block; flex: none; width: 5px; cursor: col-resize; position: relative; z-index: 2; background: transparent; }
html.max-aux .fsash::after { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 1px; background: var(--line); }
html.max-aux .fsash:hover::after, body.dragging .fsash.active::after { left: 1px; width: 3px; background: var(--acc); }
/* Hermes: list | chat */
html.max-aux.at-hermes .hc { display: grid; grid-template-columns: var(--fcl, 280px) 5px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
html.max-aux .hc > .hc-drawer, html.max-aux .hc > .hc-drawer[hidden] { display: flex !important; flex-direction: column; grid-column: 1; grid-row: 1 / span 3;
  max-height: none; height: 100%; border: 0; background: var(--bg2); overflow: hidden; }
html.max-aux .hc > .hc-drawer .hc-list { flex: 1; overflow-y: auto; }
html.max-aux .hc > .fsash { grid-column: 2; grid-row: 1 / span 3; }
html.max-aux .hc > .hc-head { grid-column: 3; grid-row: 1; justify-content: center; height: 48px; }
html.max-aux .hc > .hc-log { grid-column: 3; grid-row: 2; }
html.max-aux .hc > .hc-composer { grid-column: 3; grid-row: 3; width: 100%; max-width: 880px; margin: 0 auto; padding: 6px 20px 22px; }
html.max-aux .hc-dhead { position: static; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 14px 10px; background: transparent; }
html.max-aux .hc-scope { display: flex; gap: 4px; } html.max-aux .hc-scope a { white-space: nowrap; flex: 1; text-align: center; }
html.max-aux .hc-list li { margin: 0 8px; border-radius: 8px; }
/* channel / DM: messages | thread */
html.max-aux .apane.bz { flex-direction: row; }
html.max-aux .apane.bz:not(.thread-open) > .fsash { display: none; }
@media (max-width: 900px) {
  html.max-aux.at-hermes .hc { grid-template-columns: minmax(0, 1fr); }
  html.max-aux .hc > .hc-drawer, html.max-aux .hc > .fsash { display: none !important; } html.max-aux .hc > * { grid-column: 1 !important; }
  }

/* document popup (chat focus mode) */
.docpop { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; background: rgba(0,0,0,.32); animation: fadein .15s ease; }
.docpop[hidden] { display: none !important; }
.docpop-card { width: min(1100px, calc(100vw - 48px)); height: calc(100vh - 64px); display: flex; flex-direction: column; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.3); overflow: hidden; }
.docpop-head { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--line); background: var(--bg2); flex: none; }
.docpop-t { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docpop-tab { padding: 4px 12px; border-radius: 6px; background: var(--bg3); color: var(--fg); font-size: 13px; font-weight: 500; }
.docpop-body { flex: 1; min-height: 0; display: flex; }
.docpop-body .docpop-pane { flex: 1; min-height: 0; }
@media (max-width: 700px) { .docpop-card { width: 100vw; height: 100vh; border-radius: 0; } }

/* focus mode: channel / 담당자 list on the left of the channel and DM tabs */
html.max-aux:is(.at-channel, .at-dm) .aux { display: grid; grid-template-columns: var(--fnv, 250px) 5px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
html.max-aux:is(.at-channel, .at-dm) .aux > .aux-tabs { grid-column: 1 / -1; grid-row: 1; }
html.max-aux:is(.at-channel, .at-dm) .aux > .apane { grid-column: 3; grid-row: 2; min-width: 0; }
    /* the side list replaces the pickers */
@media (max-width: 900px) { html.max-aux:is(.at-channel, .at-dm) .aux { grid-template-columns: minmax(0, 1fr); }
  html.max-aux:is(.at-channel, .at-dm) .aux > .apane { grid-column: 1; }  }

/* editor groups (split by dragging tabs) */
.egroups { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: row; }
.egroups.col { flex-direction: column; }
.egroup { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; flex: 1 1 0; }
.egroups.multi .egroup:not(.focus) .etab.on { border-top-color: color-mix(in srgb, var(--acc) 35%, transparent); }
.egroups.multi .egroup:not(.focus) > .etabs { background: color-mix(in srgb, var(--bg2) 70%, var(--bg)); }
.gsash { flex: none; width: 5px; cursor: col-resize; position: relative; z-index: 3; }
.gsash::after { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 1px; background: var(--line); }
.egroups.col > .gsash { width: auto; height: 5px; cursor: row-resize; } .egroups.col > .gsash::after { left: 0; right: 0; top: 2px; bottom: auto; width: auto; height: 1px; }
.gsash:hover::after, .gsash.active::after { background: var(--acc); width: 3px; left: 1px; } .egroups.col > .gsash:hover::after { height: 3px; width: auto; top: 1px; left: 0; }
.gdrop { position: absolute; z-index: 20; pointer-events: none; background: color-mix(in srgb, var(--acc) 16%, transparent); border: 2px solid color-mix(in srgb, var(--acc) 55%, transparent);
  border-radius: 6px; transition: all .12s ease; top: 38px; left: 0; right: 0; bottom: 0; }
.gdrop[hidden] { display: none; }
.gdrop[data-z="left"] { right: 50%; } .gdrop[data-z="right"] { left: 50%; } .gdrop[data-z="bottom"] { top: calc(38px + (100% - 38px) / 2); } .gdrop[data-z="top"] { bottom: 50%; }
.etab.dropbefore { box-shadow: inset 3px 0 0 var(--acc); }
body.tab-dragging .epane { pointer-events: none; }   /* so iframes (Collabora) don't swallow the drag */
.etabs-split { padding: 3px 9px; border-radius: 6px; background: var(--bg2); color: var(--mut); font-size: 13px; border: 1px solid var(--line); }
.etabs-split:hover { color: var(--fg); background: var(--bg3); }

/* editor groups adapt to their own width (container queries): narrow groups stack the approval panel,
   put the document tools on their own scrollable row, and use tighter page margins */
.egroup { container-type: inline-size; container-name: eg; }
.etabs-close.icon-only { padding: 3px 9px; font-size: 13px; }
@container eg (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .panel { order: -1; position: static; max-height: none; border-left: 0; border-bottom: 1px solid var(--line); }
}
@container eg (max-width: 680px) {
  .epane { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .epane .tab-actions { grid-column: 1; grid-row: 1; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .epane .tab-actions::-webkit-scrollbar { display: none; }
  .epane > .crumbs { grid-column: 1; grid-row: 2; }
  .epane > .editor-body { grid-column: 1; grid-row: 3; }
  .epane:not(:has(> .crumbs)) .tab-actions { justify-content: flex-start; }
  .doc { padding: 16px 20px 40px; font-size: 14.5px; }
  .fm { padding: 8px 20px; }
  .form { padding: 10px 20px 32px; }
  .doc h1 { font-size: 1.4em; }
  .etab { min-width: 90px; }
}
@container eg (max-width: 440px) {
  .tab-actions .w-toggle, .tab-actions .max-toggle { font-size: 0; padding: 4px 8px; }
  .tab-actions .w-toggle::before { content: "↔"; font-size: 13px; } .tab-actions .max-toggle::before { content: "⛶"; font-size: 13px; }
}
.egroups.multi > .egroup { min-width: 240px; }
.egroups.multi.col > .egroup { min-width: 0; min-height: 160px; }
@container eg (max-width: 860px) {
  .dash { grid-template-columns: minmax(0, 1fr); height: auto; }   /* Inbox: 결재 대기 · 자료 요청 · 최근 처리 stacked */
  .dash section { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .editor-body .doc table { display: block; overflow-x: auto; }
}

/* ══ phones (≤700px): readable type, ≥40px touch targets, one thing at a time. Desktop sizes are untouched. ══ */
.m-only { display: none !important; }
.m-backdrop { display: none; }
@media (max-width: 700px) {
  :root { --tb: 52px; --sb: 0px; --ab: 0px; }
  .d-only { display: none !important; }
  .m-only { display: inline-grid !important; }
  body { font-size: 16px; }
  input, textarea, select { font-size: 16px !important; }          /* iOS zooms into smaller inputs */
  .app { grid-template-rows: var(--tb) minmax(0, 1fr) 0px; height: 100dvh; }
  .statusbar { display: none; }
  /* header: ☰ · logo · project · bell · chat */
  .titlebar { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 0 6px; padding-top: env(safe-area-inset-top, 0px); }
  .tb-search { display: none; }
  .tb-left { gap: 4px; min-width: 0; } .tb-right { gap: 2px; }
  .titlebar .icon { width: 42px; height: 42px; font-size: 18px; } .titlebar .sv { width: 22px; height: 22px; }
  .brand { font-size: 16px; white-space: nowrap; }
  .proj { max-width: 38vw; height: 36px; padding: 0 6px; }
  /* the editor gets the whole width; the activity bar + side bar become one drawer from the left */
  .workbench, html.sb-off .workbench, html.aux-off .workbench, html.sb-off.aux-off .workbench, html.max-editor .workbench, html.max-aux .workbench {
    grid-template-columns: 0 0 0 minmax(0, 1fr) 0 0; }
  .activity { display: none; }
  html.m-sb .activity { display: flex; position: fixed; z-index: 31; top: var(--tb); bottom: 0; left: 0; width: 56px; background: var(--bg2); border-right: 1px solid var(--line);
    animation: slidein-l .2s ease; padding: 8px 0 env(safe-area-inset-bottom, 8px); }
  html.m-sb .activity .icon { width: 48px; height: 48px; } html.m-sb .activity .sv { width: 24px; height: 24px; }
  html.m-sb .sidebar { left: 56px; top: var(--tb); bottom: 0; width: min(calc(100vw - 96px), 360px); z-index: 30; }
  html.m-aux .aux { top: var(--tb); bottom: 0; width: 100vw; z-index: 30; }
  .m-backdrop { position: fixed; inset: var(--tb) 0 0 0; z-index: 25; background: rgba(0,0,0,.35); }
  html.m-sb .m-backdrop, html.m-aux .m-backdrop { display: block; animation: fadein .15s ease; }
  /* touch-friendly lists */
  .pane-head { height: 46px; font-size: 12.5px; } .pane-head .icon { width: 40px; height: 40px; font-size: 16px; }
  .items a { padding: 10px 14px 10px 18px; font-size: 15.5px; } .items .s { font-size: 13px; }
  .sec-head { font-size: 12.5px; padding: 10px 12px; }
  .tree .row { height: 42px; font-size: 15.5px; } .tree .tw { width: 22px; font-size: 13px; }
  .tree .row-acts { display: inline-flex; } .tree .row-acts button { width: 34px; height: 34px; font-size: 15px; }
  .filter input { height: 42px; }
  /* editor: one group at a time, bigger tabs */
  .egroup:not(.focus) { display: none !important; } .gsash { display: none !important; }
  .egroups.multi > .egroup { min-width: 0; }
  .etabs { height: 46px; } .etab { min-width: 120px; max-width: 70vw; font-size: 14.5px; padding-left: 14px; }
  .etab .ex { visibility: visible; width: 34px; height: 34px; font-size: 20px; }
  .etabs-split { display: none; }
  .etabs-close { font-size: 13.5px; padding: 6px 12px; }
  .tab-actions a, .tab-actions button { font-size: 14px; padding: 8px 12px; min-height: 36px; }
  .crumbs { font-size: 13.5px; padding: 6px 14px; }
  .doc { font-size: 16.5px; line-height: 1.75; padding: 18px 16px 64px; }
  .doc h1 { font-size: 1.45em; } .doc h2 { font-size: 1.25em; }
  .fm { font-size: 13.5px; padding: 8px 16px; max-height: 30vh; overflow: auto; }
  .form { padding: 12px 16px 40px; } .panel { padding: 14px 16px; }
  .choice { padding: 10px 12px; font-size: 15.5px; } .choice input { width: 20px; height: 20px; }
  .panel button, .form button { min-height: 44px; font-size: 15.5px; }
  .dash { grid-template-columns: minmax(0, 1fr); } .dash .items a { padding: 12px 16px; }
  /* chat & messenger */
  .aux-tabs { height: 48px; } .aux-tabs .atab { font-size: 15px; padding: 0 14px; height: 48px; } .aux-tabs .icon { width: 42px; height: 42px; }
  .hc { --hc-font: 16px; } .hc-head { height: 50px; } .hc-sess { font-size: 15.5px; }
  .hc-composer { padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .hc-send, .hc-stop { width: 42px; height: 42px; } .hc-hint, .hc-ctxm span { display: none; }
  .hc-list .t { font-size: 15.5px; } .hc-list li a { padding: 12px 14px; }
  .bz-body { font-size: 16px; }   .bz-tools { opacity: 1; }  .bz-tools .act { font-size: 14px; padding: 6px 10px; }
  .bz-head { min-height: 46px; font-size: 14px; } .bz-form { padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .bz-form button, .bz-tform button { min-height: 40px; padding: 0 16px; }
  /* overlays and popups */
  .apv-card { width: 100vw; max-height: 100dvh; border-radius: 0; } .apv-acts { grid-template-columns: 1fr 1fr; } .apv-b { min-height: 56px; }
  .docpop-card { width: 100vw; height: 100dvh; border-radius: 0; }
  .noti { position: fixed; left: 0; right: 0; top: var(--tb); width: auto; max-height: calc(100dvh - var(--tb)); border-radius: 0; }
  .ctxmenu button { padding: 12px 16px; font-size: 15.5px; }
  /* terminal: full width, taller default; split/position controls hidden */
  .tsplitbtn, .tpos { display: none !important; }
  html.term-on .tpanel { height: min(60dvh, var(--th)); }
  /* settings / system / storage: single column */
  .settings, .sys-pane, .stg { padding: 12px; } .g-grid, .g-grid.two { grid-template-columns: minmax(0, 1fr); }
  .sys-tabs { overflow-x: auto; } .sys-tabs button { padding: 10px 12px; font-size: 14.5px; white-space: nowrap; }
}
@media (max-width: 700px) { .tab-actions .w-toggle { display: none; } }

/* phones in focus mode (html.imm): content only; header/tools slide down on a small scroll up, the message box
   slides up when pulling past the bottom of a conversation */
@media (max-width: 700px) {
  html.imm.max-aux .aux { top: 0 !important; bottom: 0; }
  html.imm .aux-tabs { position: fixed; top: 0; left: 0; right: 0; z-index: 36; background: var(--bg); transform: translateY(-100%); transition: transform .22s ease; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
  html.imm .hc-head { position: fixed; top: calc(var(--atabs-h, 48px) - 1px); left: 0; right: 0; z-index: 35; background: var(--bg);
    transform: translateY(calc(-100% - var(--atabs-h, 48px))); transition: transform .22s ease; box-shadow: 0 2px 10px rgba(0,0,0,.10); }
  html.imm.imm-head .aux-tabs, html.imm.imm-head .hc-head { transform: none; }
  html.imm .hc-composer, html.imm .bz-tform { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--bg);
    max-width: none !important; margin: 0 !important; transform: translateY(110%); transition: transform .22s ease; box-shadow: 0 -2px 12px rgba(0,0,0,.12); }
  html.imm.imm-input .hc-composer, html.imm.imm-input .bz-tform { transform: none; }
  html.imm.imm-input .hc-log, html.imm.imm-input .bz-log, html.imm.imm-input .bz-tlog { padding-bottom: 170px; }
  html.imm .hc > .hc-drawer, html.imm .hc > .fsash { display: none !important; }
  /* documents */
  html.imm.max-editor .epane > .tabs > .tab-actions, html.imm.max-editor .epane .tab-actions { position: fixed; top: 0; left: 0; right: 0; z-index: 36; background: var(--bg);
    transform: translateY(-100%); transition: transform .22s ease; box-shadow: 0 2px 10px rgba(0,0,0,.12); padding: 6px 10px; }
  html.imm.max-editor .epane > .crumbs { position: fixed; top: 50px; left: 0; right: 0; z-index: 35; background: var(--bg2);
    transform: translateY(calc(-100% - 50px)); transition: transform .22s ease; }
  html.imm.max-editor.imm-head .epane .tab-actions, html.imm.max-editor.imm-head .epane > .crumbs { transform: none; }
}
@media (max-width: 700px) {   /* BSM (시스템) tabs follow the header in phone focus mode */
  html.imm.max-editor .sys-tabs { position: fixed; top: 50px; left: 0; right: 0; z-index: 34; background: var(--bg); padding: 0 8px;
    transform: translateY(calc(-100% - 50px)); transition: transform .22s ease; box-shadow: 0 2px 10px rgba(0,0,0,.10); }
  html.imm.max-editor.imm-head .sys-tabs { transform: none; }
}

/* phones: header, tabs and document tools fold away while reading down (html.ahide), back on scroll up */
@media (max-width: 700px) {
  .egroup > .etabs { transition: height .22s ease, border-width .22s ease; }
  .epane .tab-actions, .epane > .crumbs { max-height: 64px; transition: max-height .22s ease, padding .22s ease, opacity .22s ease; }
  html.ahide:not(.imm) .app { grid-template-rows: 0px minmax(0, 1fr) 0px; }
  html.ahide:not(.imm) .titlebar { overflow: hidden; border-bottom-width: 0; }
  html.ahide:not(.imm) .egroup > .etabs { height: 0; border-bottom-width: 0; overflow: hidden; }
  html.ahide:not(.imm) .epane .tab-actions, html.ahide:not(.imm) .epane > .crumbs { max-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; opacity: 0; overflow: hidden; }
  html.ahide:not(.imm) .sys-tabs { display: none; }
}

/* phones: the conversation list is a shaded sheet over the chat (opened with ☰), also in focus mode */
@media (max-width: 900px) {
  html .hc > .hc-drawer:not([hidden]) { display: flex !important; flex-direction: column; position: absolute; left: 0; right: 0; top: 50px; z-index: 30;
    max-height: min(72dvh, 560px); height: auto; grid-column: auto !important; grid-row: auto !important;
    background: color-mix(in srgb, var(--bg2) 88%, var(--fg) 6%); border-bottom: 1px solid var(--line); box-shadow: 0 14px 32px rgba(0,0,0,.22);
    border-radius: 0 0 14px 14px; overflow: hidden; animation: fadein .15s ease; }
  html .hc > .hc-drawer:not([hidden]) .hc-list { flex: 1; overflow-y: auto; }
  html .hc > .hc-drawer[hidden], html.max-aux .hc > .hc-drawer[hidden] { display: none !important; }
  html .hc-list li.on { background: color-mix(in srgb, var(--acc) 18%, transparent); }
  html.max-aux.at-hermes .hc { grid-template-columns: minmax(0, 1fr) !important; }
  html.max-aux .hc > .fsash { display: none !important; }
  html.max-aux .hc > .hc-head, html.max-aux .hc > .hc-log, html.max-aux .hc > .hc-composer { grid-column: 1 !important; }
  html.imm .hc > .hc-drawer:not([hidden]) { top: calc(var(--atabs-h, 48px) + 50px); }   /* under the slid-in tabs + header */
}

/* phones, normal mode: reading a conversation down folds the header and the message box (html.chide) */
@media (max-width: 900px) {
  .aux-tabs, .hc-head, .hc-composer, .bz-tform { transition: max-height .22s ease, padding .22s ease, opacity .2s ease; }
  html.chide:not(.imm) .aux-tabs, html.chide:not(.imm):not(.cbot) .hc-composer, html.chide:not(.imm):not(.cbot) .bz-tform {   /* .cbot: at the bottom of a conversation the message box stays */
    max-height: 0 !important; min-height: 0 !important; height: auto !important; padding-top: 0 !important; padding-bottom: 0 !important;
    border-width: 0 !important; opacity: 0; overflow: hidden !important; }
  .aux-tabs, .hc-head { max-height: 64px; } .hc-composer, .bz-tform { max-height: 340px; }
}
@media (max-width: 700px) {
  html.chide:not(.imm) .app { grid-template-rows: 0px minmax(0, 1fr) 0px; }
  html.chide:not(.imm) .titlebar { overflow: hidden; border-bottom-width: 0; }
  html.chide:not(.imm).m-aux .aux { top: 0; }
  html.chide:not(.imm) .m-backdrop { inset: 0; }
  /* a channel opened as a tab in the main area: the tab strip and the pane head fold with the header */
  html.chide:not(.imm):not(.m-aux):not(.m-sb) .egroup > .etabs { height: 0; border-bottom-width: 0; overflow: hidden; }
  html.chide:not(.imm):not(.m-aux):not(.m-sb) .epane .tab-actions, html.chide:not(.imm):not(.m-aux):not(.m-sb) .epane > .crumbs { height: 0 !important; min-height: 0 !important; max-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; opacity: 0; overflow: hidden; }
}

/* (the shared phone composer shape — .chat-composer-box / composer-* — lives in the 📱 mshell section below: it is a
   phone-only look; on a PC the chat box keeps chat.css) */

/* phones: chat composer — context line, a roomy input, then [model][ … ][■][↑] */
@media (max-width: 700px) {
  .hc-box { padding: 8px 10px 8px; border-radius: 18px; }
  .hc-ctx { font-size: 12.5px; padding: 0 2px 6px; }
  .hc-here { font-size: 12px; padding: 4px 9px; }
  .hc-input { min-height: 44px; font-size: 16px; line-height: 1.5; padding: 4px 2px; }
  .hc-bar { gap: 8px; margin-top: 4px; }
  .hc-bar .hc-model { flex: 0 1 auto; max-width: 46%; height: 36px; font-size: 14px !important; padding: 0 8px; border-radius: 10px; }
  .hc-bar .hc-hint { display: block !important; flex: 1; min-width: 0; height: 0; visibility: hidden; }   /* spacer: buttons to the right */
  .hc-bar .hc-ctxm { flex: none; } .hc-bar .hc-ctxm i { width: 40px; }
  .hc-bar .hc-send, .hc-bar .hc-stop { flex: none; width: 42px; height: 42px; font-size: 18px; }
  /* phones: two rows — [model ★ PC] / [context meter ··· 📷 📎 ↑] */
  .hc-bar .hc-model { order: 0; flex: 1 1 0; max-width: none; }
  .hc-bar .hc-setdef { order: 1; font-size: 0; padding: 0 10px; height: 36px; } .hc-bar .hc-setdef::before { content: "★"; font-size: 15px; }
  .hc-bar .hc-pc { order: 2; padding: 0 10px; height: 36px; }
  .hc-bar .hc-hint { order: 3; flex: 0 0 100% !important; }   /* invisible line break */
  .hc-bar .hc-ctxm { order: 4; }
  .hc-bar .hc-scr { order: 4; height: 36px; font-size: 13px; }
  .hc-bar .hc-shot { order: 5; margin-left: auto; } .hc-bar .hc-attach { order: 6; }
  .hc-bar .hc-stop, .hc-bar .hc-send { order: 7; }
  .bz-form .chat-hint { gap: 10px; } .bz-form textarea { min-height: 52px; }
}

/* phones: the menu drawer also opens over a document in focus mode (swipe right) */
@media (max-width: 700px) {
  html.max-editor.m-sb .sidebar { opacity: 1; visibility: visible; pointer-events: auto; }
  html.imm.m-sb .sidebar, html.imm.m-sb .activity, html.imm.m-sb .m-backdrop { top: 0; }
}
/* phones: BSM (시스템) tables scroll sideways inside the page instead of widening it */
@media (max-width: 700px) {
  .sys, .sys-pane { min-width: 0; max-width: 100vw; overflow-x: hidden; }
  .sys-pane .sys-t { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sys-pane .sys-t.kv { display: table; table-layout: fixed; }
  .sys-pane .sys-t.kv th { width: 34%; } .sys-pane .sys-t.kv td { white-space: normal; overflow-wrap: anywhere; }
  .sys-pane pre, .sys-pane .sys-bar { max-width: 100%; overflow-x: auto; }
}

/* phones: document tables — wide ones become cards (one per row); the table view keeps a sticky first column */
.mt-toggle { display: none; }
@media (max-width: 700px) {
  .doc table { font-size: .9em; word-break: keep-all; overflow-wrap: anywhere; }
  .editor-body .doc table:not(.mt-cards) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .doc table:not(.mt-cards) th, .doc table:not(.mt-cards) td { min-width: 5.5em; }
  .doc table:not(.mt-cards) th:first-child, .doc table:not(.mt-cards) td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); box-shadow: 1px 0 0 var(--line); }
  .doc table:not(.mt-cards) th:first-child { background: var(--bg2); }
  .mt-toggle { display: inline-flex; margin: 10px 0 0; padding: 4px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--mut); font: inherit; font-size: 12.5px; }
  .doc table.mt-cards, .doc table.mt-cards > thead, .doc table.mt-cards > tbody, .doc table.mt-cards tr, .doc table.mt-cards td, .doc table.mt-cards th { display: block; }
  .doc table.mt-cards { border: 0; margin: 4px 0 12px; font-size: 1em; overflow: visible; }
  .doc table.mt-cards tr.mt-head { display: none; }
  .doc table.mt-cards tr { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 4px 14px; background: var(--bg2); }
  .doc table.mt-cards td, .doc table.mt-cards th { border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; min-width: 0;
    display: grid; grid-template-columns: minmax(4.5em, 32%) minmax(0, 1fr); gap: 12px; text-align: left; }
  .doc table.mt-cards td:last-child, .doc table.mt-cards th:last-child { border-bottom: 0; }
  .doc table.mt-cards td::before, .doc table.mt-cards th::before { content: attr(data-label); color: var(--mut); font-size: .86em; font-weight: 600; }
  .doc table.mt-cards td:first-child, .doc table.mt-cards th:first-child { font-weight: 650; }
  .doc table.mt-cards td:empty { display: none; }
}

/* 보고서 (보고함) */
.items a.rp-new .t { font-weight: 650; }
.rp-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--acc); vertical-align: middle; }
.chip.rp-kind { font-size: 11px; padding: 0 6px; margin-right: 4px; }
.sec-head .rp-n { background: var(--acc); color: #fff; }
select.mv-proj { height: 28px; max-width: 170px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; padding: 0 6px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; display: flex; gap: 12px; align-items: center;
  max-width: min(92vw, 520px); padding: 10px 16px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: fadein .18s ease; transition: opacity .4s ease; }
.toast a { color: inherit; font-weight: 650; text-decoration: underline; } .toast.out { opacity: 0; }
.chip.rc-new { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, transparent); } .chip.rc-mod { color: var(--mut); }
/* Inbox dashboard: 결재 대기 · 자료 요청 · 보고서 on top, 최근 문서 · 최근 자료실 · 최근 처리 below */
.dash { grid-auto-rows: minmax(0, 1fr); }
.dash section:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
@container eg (max-width: 860px) { .dash { grid-auto-rows: auto; } }

/* 전체 프로젝트 현황 (Inbox, all projects) */
.home { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.home > .dash { flex: 1; min-height: 360px; height: auto; }
.ov { border-bottom: 1px solid var(--line); background: var(--bg); }
.ov-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.ov-head .ov-re { margin-left: auto; width: 26px; height: 26px; }
.ov-body { padding: 0; } .ov-body.mut { padding: 12px 14px; }
.ov-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ov-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.ov-t th, .ov-t td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: top; }
.ov-t thead th { font-size: 11.5px; color: var(--mut); font-weight: 600; }
.ov-t tbody th a { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-weight: 650; }
.ov-t tbody th { position: sticky; left: 0; background: var(--bg); z-index: 1; }
.ov-c b { display: block; font-size: 14.5px; font-weight: 650; } .ov-c b small { font-size: 11.5px; font-weight: 500; color: var(--mut); }
.ov-c span { font-size: 11.5px; color: var(--mut); }
.ov-c.hot span { color: #16a34a; } .ov-c.warm span { color: #d97706; } .ov-c.off b { color: var(--mut); font-weight: 500; }
.ov-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.ov-dot.hot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); } .ov-dot.warm { background: #f59e0b; } .ov-dot.cold { background: #94a3b8; }
@media (max-width: 700px) { .ov-t th, .ov-t td { padding: 7px 9px; } .home > .dash { min-height: 0; } }

/* 내부 저장소: server folder picker */
.stg-pathrow { display: flex; gap: 6px; } .stg-pathrow input { flex: 1; min-width: 0; }
.stg-browse { border: 1px solid var(--line); border-radius: 8px; margin: 4px 0 10px; overflow: hidden; background: var(--bg); }
.stg-browse .sb-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 13px; overflow-x: auto; white-space: nowrap; }
.stg-browse .sb-bar a { text-decoration: none; color: var(--fg); } .stg-browse .sb-crumbs { display: flex; gap: 4px; }
.stg-browse .sb-list { list-style: none; margin: 0; padding: 4px 0; max-height: 260px; overflow-y: auto; }
.stg-browse .sb-list li { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.stg-browse .sb-list li a { flex: 1; padding: 7px 0; color: var(--fg); text-decoration: none; font-size: 14px; }
.stg-browse .sb-list li:hover { background: var(--bg3); } .stg-browse .sb-list li.no a { color: var(--mut); } .stg-browse .sb-list li span { font-size: 11.5px; }
.stg-browse .sb-foot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg2); }
.stg-browse .sb-cur { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.stg-browse .sb-why { padding: 0 10px 8px; font-size: 12.5px; background: var(--bg2); }

/* 📷 screenshot */
.hc-shot, .hc-attach { border: 0; background: none; font-size: 16px; padding: 0 6px; cursor: pointer; opacity: .8; } .hc-shot:hover, .hc-attach:hover { opacity: 1; }
.shot-menu { position: fixed; z-index: 95; display: flex; flex-direction: column; min-width: 230px; padding: 4px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); box-shadow: 0 10px 28px rgba(0,0,0,.2); animation: fadein .12s ease; }
.shot-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.shot-menu button:hover { background: var(--bg3); } .shot-menu small { color: var(--mut); font-size: 11.5px; }
html.shooting * { animation: none !important; transition: none !important; }

/* attached images: thumbnails in the AI composer and messages, preview in the Buzz file chip */
.hc-thumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 2px; }
.hc-thumb { position: relative; display: block; width: 88px; height: 66px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg2); }
.hc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-thumb-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; line-height: 20px; padding: 0; cursor: pointer; }
.hm-bubble .hc-thumbs { padding: 8px 0 2px; } .hm-bubble .hc-thumb { width: 180px; height: 120px; }
.hc-thumb.hc-file { width: auto; height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--bg2); }
.hc-thumb.hc-file .f-ic { font-size: 20px; line-height: 1; }
.hc-thumb.hc-file .f-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.hm-bubble .hc-thumb.hc-file { height: 46px; max-width: 260px; }
.bz-filechip { align-items: center; gap: 8px; }
/* exec-approval requests in channels / DMs: real buttons, the answered one marked */
 @keyframes bzflash { 0%, 60% { background: color-mix(in srgb, #f59e0b 28%, transparent); } 100% { background: transparent; } }

/* 프로젝트 관리 */
.prj { padding: 20px 24px 60px; max-width: 980px; font-size: 14px; }
.prj-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; background: var(--bg); }
.prj-item.def { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); background: color-mix(in srgb, var(--acc) 4%, var(--bg)); }
.prj-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.prj-name { font: inherit; font-size: 16px; font-weight: 650; border: 1px solid transparent; border-radius: 6px; padding: 4px 8px; background: transparent; color: var(--fg); min-width: 0; }
.prj-name:hover, .prj-name:focus { border-color: var(--line); background: var(--bg2); }
.prj-key { font-family: ui-monospace, monospace; font-size: 12px; }
.prj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.prj-grid label, .prj-info { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--mut); }
.prj-grid select, .prj-grid input { font: inherit; font-size: 14px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); }
.prj-info a { color: var(--fg); font-size: 14px; } .prj-info .chip { display: inline-block; margin: 0 4px 4px 0; color: var(--fg); }
.prj-acts { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.prj-acts button { height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; }
.prj-acts button.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.prj-form { border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }
@media (max-width: 700px) { .prj { padding: 12px; } .prj-grid { grid-template-columns: minmax(0, 1fr); } }

/* 프로젝트 현황: AI progress summary under each project row */
.ov-t tr.ov-sum td { padding: 0 12px 10px 33px; border-bottom: 1px solid var(--line); white-space: normal; position: static; }
.ov-t tbody tr.ov-pre > * { border-bottom: 0; }
.ov-sum-t { font-size: 13px; line-height: 1.55; color: var(--fg); max-width: 1100px; }
.ov-sum-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; margin-top: 2px; }
.ov-sum-re { border: 0; background: none; color: var(--mut); cursor: pointer; font-size: 12px; padding: 0 4px; } .ov-sum-re:hover { color: var(--acc); }
@media (max-width: 700px) { .ov-t tr.ov-sum td { padding-left: 9px; } }

.prj-folder { align-self: flex-start; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; cursor: pointer; }
.prj-folder:hover { border-color: var(--acc); }
.prj-folders { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; }
.prj-folders button { text-align: left; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: 13.5px; cursor: pointer; }
.prj-folders button:disabled { color: var(--mut); cursor: default; } .prj-folders button:hover:not(:disabled) { background: var(--bg3); }
.prj-team { margin-top: 12px; } .prj-team-h { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--mut); margin-bottom: 6px; }
.prj-tr { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.4fr) 30px; gap: 8px; align-items: center; margin-bottom: 6px; }
.prj-tr input[type=radio] { width: 17px; height: 17px; accent-color: var(--acc); }
.prj-tr input.prj-tn, .prj-tr select { font: inherit; font-size: 14px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); min-width: 0; }
.prj-x { height: 30px; border: 0; background: none; color: var(--mut); cursor: pointer; font-size: 14px; } .prj-x:hover { color: #dc2626; }
.prj-add { margin-top: 2px; border: 1px dashed var(--line); border-radius: 7px; background: none; color: var(--mut); padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; } .prj-add:hover { color: var(--acc); border-color: var(--acc); }
.ov-sum-t { display: flex; gap: 24px; flex-wrap: wrap; }
.ov-sum-col { flex: 1 1 320px; min-width: 0; } .ov-sum-col b { display: block; font-size: 11.5px; color: var(--mut); margin-bottom: 2px; letter-spacing: .02em; }
.ov-sum-col.td b { color: #d97706; } .ov-sum-col div { padding-left: 2px; }
@media (max-width: 700px) { .ov-sum-t { gap: 8px; } }
.kv a.doc-dm, .kv a.doc-ch { color: var(--fg); text-decoration: none; border-bottom: 1px dashed var(--line); }
.kv a.doc-dm small, .kv a.doc-ch small { color: var(--acc); font-size: 11px; margin-left: 2px; } .kv a.doc-dm:hover, .kv a.doc-ch:hover { border-bottom-color: var(--acc); }
.stg-browse .sb-list li.sb-file { color: var(--mut); font-size: 13px; padding: 4px 10px 4px 26px; cursor: default; }
.stg-browse .sb-list li.sb-file span:first-child { color: var(--fg); opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stg-browse .sb-list li.sb-file:hover { background: none; }

/* search page: content hits */
.srch-h { margin: 18px 14px 6px; font-size: 13px; color: var(--mut); } .srch { list-style: none; margin: 0; padding: 0 14px 20px; }
.srch li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .srch li a { color: var(--fg); text-decoration: none; font-weight: 600; }
.srch .snip { font-size: 12.5px; color: var(--mut); margin-top: 3px; line-height: 1.45; }

/* 내부 저장소 folder picker: a modal with folders left, files right */
.sb-modal { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadein .12s ease; }
.sb-card { width: min(1000px, 100%); height: min(78vh, 760px); display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); overflow: hidden; }
/* 외부 저장소 추가 modal: a short card; the credential form keeps its own look inside */
.sb-card.sb-small { width: min(560px, 100%); height: auto; max-height: min(88vh, 820px); }
.sb-card.sb-small .stg-form { margin: 0; border: 0; border-radius: 0; max-width: none; overflow-y: auto; }
.sb-card.sb-small .stg-add-t { font-weight: 600; }
.sb-card .sb-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 14px; overflow-x: auto; white-space: nowrap; }
.sb-card .sb-bar a { text-decoration: none; color: var(--fg); } .sb-card .sb-crumbs { display: flex; gap: 4px; } .sb-card .sb-x { margin-left: auto; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--mut); }
.sb-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.sb-col { min-height: 0; display: flex; flex-direction: column; } .sb-col + .sb-col { border-left: 1px solid var(--line); }
.sb-col h4 { margin: 0; padding: 8px 14px; font-size: 12px; color: var(--mut); border-bottom: 1px solid var(--line); background: var(--bg); }
.sb-card .sb-list { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; flex: 1; }
.sb-card .sb-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; }
.sb-card .sb-list li a { flex: 1; padding: 8px 0; color: var(--fg); text-decoration: none; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-card .sb-list li:hover { background: var(--bg3); } .sb-card .sb-list li.no a { color: var(--mut); } .sb-card .sb-list li span { font-size: 12px; }
.sb-card .sb-list li.sb-file { padding: 6px 14px; cursor: default; } .sb-card .sb-list li.sb-file:hover { background: none; }
.sb-card .sb-list li.sb-file span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); opacity: .85; font-size: 14px; }
.sb-card .sb-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg2); }
.sb-card .sb-cur { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sb-card .sb-why { padding: 0 14px 10px; font-size: 12.5px; background: var(--bg2); }
.sb-card .sb-foot button.primary { height: 36px; padding: 0 16px; }
@media (max-width: 700px) { .sb-modal { padding: 0; } .sb-card { height: 100%; border-radius: 0; } .sb-cols { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } .sb-col + .sb-col { border-left: 0; border-top: 1px solid var(--line); } }
.sb-card .sb-filter { flex: 1; min-width: 160px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; }
.sb-card .sb-filter:focus { border-color: var(--acc); outline: none; }
@media (max-width: 700px) { .sb-card .sb-bar { flex-wrap: wrap; } .sb-card .sb-filter { flex-basis: 100%; order: 9; } }

/* folder picker: views, column mode, preview, copy dialog */
.sb-card .sb-views { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.sb-card .sb-views button { border: 0; background: var(--bg); color: var(--mut); width: 32px; height: 30px; cursor: pointer; font-size: 14px; }
.sb-card .sb-views button.on { background: var(--acc); color: #fff; }
.sb-cols.with-prev { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.2fr); }
.sb-cols.columns { display: flex; overflow-x: auto; overflow-y: hidden; }
.sb-colx { flex: 0 0 260px; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.sb-colx h4 { margin: 0; padding: 8px 12px; font-size: 12px; color: var(--mut); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sb-colx h4 small { font-weight: 400; }
.sb-card .sb-list li.on { background: color-mix(in srgb, var(--acc) 14%, transparent); }
.sb-card .sb-list li .sb-arr { color: var(--mut); font-size: 13px; } .sb-colx .sb-list li a { font-size: 13.5px; padding: 6px 0; }
.sb-card .sb-list li.sb-file { cursor: pointer; } .sb-card .sb-list li.sb-file:hover { background: var(--bg3); }
.sb-card .sb-list li.sb-file .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); opacity: .9; font-size: 14px; }
.sb-colx .sb-list li.sb-file .nm { font-size: 13.5px; } .sb-colx .sb-list li.sb-file > span.mut { display: none; }
.sb-att { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font-size: 12px; padding: 2px 6px; cursor: pointer; flex: none; opacity: .75; }
.sb-att:hover { opacity: 1; border-color: var(--acc); }
.sb-prev { flex: 1 1 380px; min-width: 300px; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg2); }
.sb-pv-h { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 13px; }
.sb-pv-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-prev img { max-width: 100%; max-height: 100%; object-fit: contain; margin: auto; display: block; padding: 10px; }
.sb-prev iframe { flex: 1; border: 0; width: 100%; } .sb-prev pre { flex: 1; margin: 0; padding: 12px; overflow: auto; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; background: var(--bg); }
.sb-copy { position: absolute; z-index: 5; width: 330px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 12px 32px rgba(0,0,0,.25); font-size: 13.5px; }
.sb-copy label { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 12px; color: var(--mut); }
.sb-copy select, .sb-copy input { font: inherit; font-size: 14px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); }
.sb-copy-a { display: flex; align-items: center; gap: 8px; margin-top: 10px; } .sb-copy-a button { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; }
.sb-copy-a button.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.sb-card { position: relative; }
@media (max-width: 700px) { .sb-cols.with-prev { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; } .sb-prev { min-width: 0; min-height: 40vh; border-left: 0; border-top: 1px solid var(--line); } .sb-colx { flex-basis: 220px; } }
.sb-card .sb-title { font-weight: 650; white-space: nowrap; }
.sb-card .sb-foot { flex-wrap: wrap; } .sb-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mut); }
.sb-name-i { height: 32px; width: 220px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; }
.sb-ro { display: flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; } .sb-msg { font-size: 12.5px; }
@media (max-width: 700px) { .sb-card .sb-cur { flex-basis: 100%; } .sb-name-i { width: 150px; } }
.lr-bar { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.lr-bar button { border: 0; border-radius: 7px; padding: 5px 12px; background: var(--acc); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.stg-oauth .stg-note { line-height: 1.6; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, #f59e0b 12%, var(--bg)); border: 1px solid color-mix(in srgb, #f59e0b 40%, var(--line)); }
.stg-oauth .stg-cb { flex: 1; min-width: 0; height: 36px; font-size: 14px; }

/* 대화 검색 */
.cs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; height: 100%; }
.cs section { min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); } .cs section:last-child { border-right: 0; }
.cs h3 { position: sticky; top: 0; margin: 0; padding: 9px 16px; font-size: 13px; color: var(--mut); background: var(--bg2); border-bottom: 1px solid var(--line); z-index: 1; }
.cs ul { list-style: none; margin: 0; padding: 0; } .cs li.mut { padding: 14px 16px; }
.cs-hit { padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; } .cs-hit:hover, .cs-hit:focus { background: var(--bg3); outline: none; }
.cs-h { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; min-width: 0; } .cs-h b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.cs-h .mut { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cs-t { margin-left: auto; flex: none; }
.cs-role { flex: none; font-size: 11.5px; padding: 0 7px; border-radius: 9px; background: var(--bg3); color: var(--mut); }
.cs-s { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--fg); opacity: .85; } .cs-s mark { background: color-mix(in srgb, #f59e0b 35%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.hm.hm-flash { animation: bzflash 2.4s ease; }
@media (max-width: 900px) { .cs { grid-template-columns: minmax(0, 1fr); height: auto; } .cs section { border-right: 0; } }

/* 설정 › 기본 설정 */
.bs-card { max-width: 920px; } .bs-card h4 { margin: 18px 0 6px; font-size: 14px; } .bs-card h4:first-child { margin-top: 4px; } .bs-card p.mut { margin: 0 0 8px; font-size: 12.5px; line-height: 1.55; }
.bs-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 6px 0; }
.bs-row label { font-size: 13px; color: var(--mut); } .bs-row input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; min-width: 0; }
.bs-row input[type=password] { grid-column: 2 / span 2; max-width: 360px; }
.bs-chk { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 8px 0 0 178px; color: var(--mut); }
.bs-acts { display: flex; align-items: center; gap: 10px; margin: 10px 0 0 178px; } .bs-acts button { height: 34px; padding: 0 16px; }
.pf-card { width: min(640px, 100%); } .pf-list { flex: 1; overflow-y: auto; }
@media (max-width: 700px) { .bs-row { grid-template-columns: minmax(0, 1fr) auto; } .bs-row label { grid-column: 1 / -1; } .bs-row input[type=password] { grid-column: 1 / -1; max-width: none; } .bs-chk, .bs-acts { margin-left: 0; } }
/* one-line tabs in 설정 (eight of them): scroll sideways instead of wrapping letters */
.sys-tabs { overflow-x: auto; scrollbar-width: thin; } .sys-tabs button, .sys-tabs .sys-re { white-space: nowrap; flex: none; }

/* 설정 › 구성 (stack.js) */
#stack h4 { margin-top: 22px; }
.st-tw { overflow-x: auto; }
.st-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-t th, .st-t td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.st-t .st-url { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.st-t .st-acts { white-space: nowrap; text-align: right; }
.st-t .st-acts button { margin-left: 4px; }
.st-form { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.st-profs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; max-height: 300px; overflow: auto;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 4px 0 8px; }
.st-prof { display: flex; gap: 6px; align-items: baseline; font-size: 13px; min-width: 0; }
.st-prof .st-pn { font-weight: 600; white-space: nowrap; }
.st-prof .mut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.st-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.st-opt { display: flex; flex-direction: column; gap: 2px; min-width: 130px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; }
.st-opt input { display: none; }
.st-opt.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc) inset; }
.st-opt:has(input:disabled) { opacity: .55; cursor: default; }
.st-links { margin: 4px 0 0 18px; font-size: 13px; }
.st-note { font-size: 12px; }
#stack .bs-acts button, .st-t th, .st-t td:nth-child(4) { white-space: nowrap; }
#stack .bs-acts { flex-wrap: wrap; }

/* phones: one frame without transitions while bars fold in place (keep() in app.js shifts the scroll instead) */
html.notr *, html.notr *::before, html.notr *::after { transition: none !important; }

/* phones: bars fade + slide out before the layout folds (html.barsout), and back in after it unfolds (html.barsin) */
@media (max-width: 900px) {
  html.barsout :is(.titlebar, .aux-tabs, .egroup > .etabs, .epane .tab-actions, .epane > .crumbs) {
    opacity: 0 !important; transform: translateY(-12px); transition: opacity .2s ease, transform .2s ease !important; }
  html.barsin :is(.titlebar, .aux-tabs, .egroup > .etabs, .epane .tab-actions, .epane > .crumbs) { animation: bar-in-top .2s ease; }
}
@keyframes bar-in-top { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes bar-in-bottom { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* phones, focus mode: the chat title row (☰ 대화 목록 / 채널 / 스레드 제목) always stays at the top, in the flow;
   the tab bar slides in over it when shown */
@media (max-width: 700px) {
  html.imm .hc-head { position: relative !important; top: auto !important; transform: none !important; box-shadow: none; z-index: 2; }
  html.imm .hc > .hc-drawer:not([hidden]) { top: 50px; }
}

/* 🌐 브라우저 · 🖥 데스크톱 탭 (inbox_desktop.py) */
.desk-frame, .br-frame { flex: 1; width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.desk-frame { background: #2d2d2d; }
.br { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.br-bar { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); flex: none; }
.br-bar .br-url { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font-size: 13px; }
.br-bar button, .br-bar .br-out { height: 30px; padding: 0 10px; white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none; }
.br-hint { padding: 10px 12px; font-size: 13px; color: var(--mut); }
@media (max-width: 700px) { .br-bar .br-desk { font-size: 0; } .br-bar .br-desk::before { content: "🖥"; font-size: 15px; } }
.br-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.br-via { padding: 4px 12px; font-size: 12px; border-bottom: 1px solid var(--line); flex: none; }
.tab-actions .pdf-conv, .tab-actions .lib-up { height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font-size: 12px; cursor: pointer; white-space: nowrap; }
.tab-actions .pdf-conv:hover, .tab-actions .lib-up:hover { border-color: var(--acc); color: var(--acc); }
.tab-actions .pdf-conv:disabled, .tab-actions .lib-up:disabled { opacity: .6; cursor: progress; }

/* 설정 › 대시보드 › AI 라우터 (OmniRoute, omni.js) */
.omni { margin-top: 18px; }
.om-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.om-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.om-head h4 { margin: 0; } .om-head .om-msg { flex: 1; font-size: 12.5px; } .om-link { text-decoration: none; padding: 3px 10px; border-radius: 6px; }
.om-block { margin-top: 14px; } .om-block h5 { margin: 0 0 6px; font-size: 13px; color: var(--mut); }
.om-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.om-tile { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.om-tile span { font-size: 11.5px; color: var(--mut); } .om-tile b { font-size: 18px; }
.om-days { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin: 10px 0 4px; }
.om-day { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--mut); }
.om-day i { display: block; width: 18px; background: var(--acc); border-radius: 3px 3px 0 0; opacity: .8; }
.om-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 900px) { .om-two { grid-template-columns: 1fr; } }
.om-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.om-t th, .om-t td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.om-t .om-url { font-family: ui-monospace, monospace; font-size: 11.5px; word-break: break-all; }
.om-acts { white-space: nowrap; text-align: right; } .om-acts button { margin-left: 4px; }
.om-steps { font-size: 12px; } .om-step { font-family: ui-monospace, monospace; }
.om-acts-row { display: flex; gap: 8px; margin-top: 8px; }
.om-add { margin-top: 8px; } .om-add summary { cursor: pointer; color: var(--acc); font-size: 13px; }
.om-form, .om-ed { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-width: 640px; }
.om-form label, .om-ed label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.om-form input, .om-ed input, .om-ed select { flex: 1; min-width: 0; }
.om-ed { border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-width: none; } .om-ed h5 { margin: 0; }
.om-chain { display: flex; flex-direction: column; gap: 4px; }
.om-sline { display: flex; align-items: center; gap: 6px; font-family: ui-monospace, monospace; font-size: 12px; counter-increment: step; }
.om-chain { counter-reset: step; } .om-sline::before { content: counter(step) "."; color: var(--mut); width: 18px; } .om-sline span { flex: 1; }
.om-pick { display: flex; gap: 6px; flex-wrap: wrap; } .om-pick select, .om-pick input { min-width: 180px; flex: 1; }
.om-note { font-size: 11.5px; margin: 4px 0 0; }
.om-prov td:nth-child(4), .om-t th { white-space: nowrap; }

/* 메신저 (left view): 채널 | 담당자 DM panes moved from the chat panel */
html.v-messenger .view-messenger { display: flex; }
.view-messenger .msg-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.view-messenger .apane { display: none; }
.activity [data-view="messenger"] { position: relative; }
.activity .mbadge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }

/* 프로젝트 대시보드 (a project's Inbox home) */
.pdash { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.pd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .pd-head b { font-size: 15px; } .pd-head .pd-at { margin-left: auto; font-size: 12px; }
.pd-head .pd-re.spin { animation: spin 1s linear infinite; }
.pd-intro { font-size: 13.5px; line-height: 1.6; margin-bottom: 10px; } .pd-intro p { margin: 0 0 2px; }
.pd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pd-card { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.pd-card h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--mut); font-weight: 700; }
.pd-card ul { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.55; } .pd-card li { margin: 2px 0; }
.pd-facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pd-fact { display: flex; flex-direction: column; padding: 4px 6px; border-radius: 6px; background: var(--bg2); min-width: 0; }
.pd-fact b { font-size: 17px; line-height: 1.2; } .pd-fact span { font-size: 11.5px; color: var(--mut); } .pd-fact i { font-style: normal; font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .pd-grid { grid-template-columns: minmax(0, 1fr); } }

/* phones / tablets: the 메신저 uses the whole screen beside the activity rail (like the AI chat), not a 360px drawer */
@media (max-width: 900px) {
  html.m-sb.v-messenger .sidebar { left: 56px; right: 0; width: auto; max-width: none; top: var(--tb); bottom: 0; box-shadow: none; }
  html.m-sb.v-messenger .activity { display: flex; position: fixed; z-index: 31; top: var(--tb); bottom: 0; left: 0; width: 56px; background: var(--bg2); border-right: 1px solid var(--line); flex-direction: column; align-items: center; }
  html.m-sb.v-messenger .m-backdrop { display: none; }
  html.m-sb.v-messenger .view-messenger .bz-head { flex-wrap: wrap; row-gap: 4px; }
  html.m-sb.v-messenger .view-messenger .bz-form textarea { font-size: 16px; }   /* iOS: no zoom on focus */
  html.imm.m-sb.v-messenger .sidebar { top: 0; }
}
.view-messenger .bz-log { overflow-x: hidden; }
.view-messenger .bz-body { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.view-messenger .bz-body pre, .view-messenger .bz-body table { max-width: 100%; overflow-x: auto; }
.view-messenger .bz-rx, .view-messenger .bz-tools { flex-wrap: wrap; }
.pd-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }   /* follows the editor width, not the window */
.pd-facts-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.pd-fact span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .pd-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); } }

/* phones: 메신저 full width, the activity rail only after ☰ (m-rail) */
@media (max-width: 900px) {
  html.m-sb.v-messenger .sidebar { left: 0; }
  html.m-sb.v-messenger:not(.m-rail) .activity { display: none; }
  html.m-sb.v-messenger.m-rail .activity { display: flex; z-index: 32; box-shadow: 4px 0 18px rgba(0,0,0,.18); }
  html.m-sb .activity [data-atab="hermes"], html.m-sb .activity [data-view="chats"], html.m-sb .activity [data-view="messenger"] { display: none !important; }
}
/* ⌘↩ 메신저 전체화면: the 메신저 takes the workbench, channel / 담당자 list on its left */

/* phones: header 메신저 button + project picker modal */
.proj-btn { display: none; }
@media (max-width: 900px) {
  .titlebar .proj { display: none; }
  .proj-btn { display: inline-flex; align-items: center; max-width: 42vw; height: 36px; margin-left: 4px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-msgs { position: relative; }
  .m-msgs .mbadge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
  html.m-sb.v-messenger .m-msgs { color: var(--acc); background: var(--sel); border-radius: 8px; }
}
.proj-modal .sb-card { width: min(92vw, 420px); max-height: 80vh; display: flex; flex-direction: column; }
.proj-modal .pm-list { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.proj-modal .pm-list button { width: 100%; text-align: left; padding: 12px 14px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 15px; cursor: pointer; }
.proj-modal .pm-list button:hover, .proj-modal .pm-list button.on { background: var(--sel); color: var(--acc); font-weight: 600; }
.proj-modal .pm-manage { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

/* 메신저: always the current project's channel — no channel picker, just its name */
.view-messenger .bz-chsel { display: none !important; }
/* focus mode lists every channel on the left (the normal view keeps showing only the current project's channel) */

/* 메신저 집중모드(Ctrl+Enter): 채널·담당자 | 메시지 | 스레드 — the same messages | thread split as the chat focus mode */
body.dragging .fsash.active::after { left: 1px; width: 3px; background: var(--acc); }

/* phones, on-screen keyboard open (html.kb-open): the app is the visible area — header on top, input above the keyboard */
@media (max-width: 900px) {
  html.kb-open, html.kb-open body { overflow: hidden; }
  html.kb-open .app { height: var(--vvh); transform: translateY(var(--vvt)); }
  html.kb-open.m-aux .aux, html.kb-open.m-sb .sidebar, html.kb-open.m-sb .activity { bottom: 0; }
}
/* phones: a tap on the 메신저 conversation folds the header and the message box (html.chide), another tap brings them back */
@media (max-width: 900px) {
  html.chide:not(.imm).m-sb.v-messenger .sidebar, html.chide:not(.imm).m-sb.v-messenger .activity { top: 0; }
  html.chide:not(.imm):not(.cbot).m-sb.v-messenger .view-messenger .bz-form,
  html.chide:not(.imm).m-sb.v-messenger .view-messenger > .pane-head { display: none; }
}
.om-tw { overflow-x: auto; max-height: 360px; overflow-y: auto; } .om-recent td, .om-recent th { white-space: nowrap; }
.noti-push.on { color: var(--ok); }

/* 이미지 뷰어 (imgview.js): fit / zoom / pan */
.imgv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.imgv-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg2); flex: none; font-size: 13px; }
.imgv-bar button { padding: 3px 9px; border-radius: 6px; }
.imgv-pct { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.imgv-hint { margin-left: auto; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* flex + margin:auto centres the image on each axis that fits, and starts at the edge (scrollable) on an axis that overflows */
.imgv-stage { flex: 1; min-height: 0; overflow: auto; display: flex; padding: 8px; background: var(--bg3); cursor: zoom-in; touch-action: pan-x pan-y; }
.imgv.zoomed .imgv-stage { cursor: grab; touch-action: none; }
.imgv.zoomed .imgv-stage:active { cursor: grabbing; }
.imgv-stage img { display: block; flex: none; max-width: none; margin: auto; user-select: none; -webkit-user-drag: none; background: repeating-conic-gradient(#0000 0 25%, #8882 0 50%) 0 0 / 16px 16px; }
@media (max-width: 900px) { .imgv-hint { display: none; } }
/* image modal (imgview.js): a card over the dimmed page (not full screen) */
.lb { position: fixed; inset: 0; z-index: 1600; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 44px 48px; animation: fadein .15s ease; }
.lb .imgv { width: min(100%, 1400px); height: 100%; max-height: 100%; background: #1c1e24; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.55); border: 1px solid #ffffff1a; }
.lb .imgv-bar { background: #23262d; border-bottom: 1px solid #ffffff12; color: #e5e7eb; padding: 8px 10px; }
.lb .imgv-bar button, .lb .imgv-bar a { color: #e5e7eb; background: transparent; border: 1px solid #ffffff22; text-decoration: none; padding: 3px 9px; border-radius: 6px; }
.lb .imgv-bar button:hover, .lb .imgv-bar a:hover { background: #ffffff14; }
.lb .lb-name { margin-left: 10px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; opacity: .85; }
.lb .imgv-stage { background: #1c1e24; }
@media (max-width: 900px) { .lb { padding: 12px 8px; } .lb .imgv { border-radius: 10px; } }
.doc img, .hm-body img, .bz-log img, .bz-tlog img, .hc-thumb img { cursor: zoom-in; }
.imgv-stage { cursor: zoom-in; }
/* 메신저 모아보기 (전체 채널 / 전체 DM): each thread is labelled with where it lives */
.view-messenger .pane-head .msg-max { margin-left: 4px; width: 26px; height: 26px; padding: 0; font-size: 15px; color: var(--mut); border-radius: 6px; }
.view-messenger .pane-head .msg-max:hover, .view-messenger .pane-head .msg-max.on { color: var(--fg); background: var(--bg3); }

/* PDF (pdfview.js): iframe on desktop; PDF.js pages on phones */
.pdfv { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.pdfv > iframe { flex: 1; width: 100%; border: 0; }
.pdfv-bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg2); flex: none; font-size: 13px; }
.pdfv-bar button, .pdfv-bar a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); text-decoration: none; font: inherit; }
.pdfv-pct { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.pdfv-info { margin-left: auto; font-size: 12px; }
.pdfv-pages { flex: 1; min-height: 0; overflow: auto; background: var(--bg3); padding: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; -webkit-overflow-scrolling: touch; }
.pdfv-page { flex: none; margin: 0 auto; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); max-width: none; }
.pdfv-page canvas { display: block; }
/* 자동 선택 규칙 (autorules.js) */
.ar .bs-row { align-items: center; } .ar .bs-row input[type=number] { width: 110px; }
.ar .ar-hint { font-size: 12px; margin-left: 8px; }
.ar .ar-routes input { width: 100%; min-width: 120px; } .ar .ar-routes .ar-rctx { width: 110px; min-width: 0; }
.ar .ar-src input { width: 90px; }
.ar .ar-kws { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 900px) { .ar .ar-kws { grid-template-columns: 1fr; } }
.ar .ar-kw textarea, .ar .ar-test { width: 100%; font-family: var(--mono, monospace); font-size: 12px; }
.ar .ar-chg { background: color-mix(in srgb, #f59e0b 16%, transparent); }
.ar .ar-tout { display: inline-block; margin-left: 8px; line-height: 1.6; }
.ar .bs-row .ar-hint { grid-column: 2 / -1; margin: -4px 0 4px; } .ar .bs-row input[type=number] { justify-self: start; }

/* 설정: big tabs in the document toolbar (.tabs), sub-tabs as the first row of each tab, card groups, profile groups */
/* the big tabs sit in the document toolbar (.tab-actions, next to ☰ 전체화면): tabs on the left, tools on the right */
.tab-actions:has(.sys-tabs) { justify-content: flex-start !important; gap: 8px; }
.tab-actions .sys-tabs { order: -1; position: static; display: flex; align-items: stretch; gap: 0; padding: 0; border: 0; background: none; flex: 1 1 auto; min-width: 0; overflow-x: auto; align-self: stretch; }
.tab-actions .sys-tabs button { padding: 4px 12px; margin: 0; font-size: 13.5px; background: none; border: 0; border-radius: 0; color: var(--mut); font-weight: 500; box-shadow: none; }
.tab-actions .sys-tabs button.on { color: var(--fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--acc); }
.tab-actions .sys-tabs button:hover { color: var(--fg); background: none; }
.tab-actions .sys-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tab-actions .sys-tools .sys-upd { font-size: 12px; white-space: nowrap; }
.tab-actions .sys-tools .sys-re { padding: 3px 9px; border: 1px solid var(--line); background: var(--bg); }
.tab-actions .sys-tools .sys-re.busy { opacity: .6; cursor: progress; }
.sys-re i { display: inline-block; font-style: normal; } .sys-re.busy i { animation: spin .8s linear infinite; }
.sec-tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; padding: 10px 24px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sec-tabs::-webkit-scrollbar { display: none; }
.sec-tabs button { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--mut); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.sec-tabs button.on { background: var(--acc-bg); color: var(--acc); border-color: color-mix(in srgb, var(--acc) 35%, transparent); font-weight: 600; }
.sec-tabs .cnt { margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; }
.ssec[hidden], .settings [data-grp][hidden] { display: none !important; }
.sys-top > .bs-card, .sys-top > section, .sys-top > .ssec > .omni, .sys-top > .ssec > .bs-card, .sys-top .set-note { margin-left: 24px; margin-right: 24px; }
.set-note { font-size: 12.5px; margin-top: 14px; }
.set-cards { padding: 8px 24px 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 14px; align-items: start; }
.set-note { font-size: 12.5px; margin-top: 12px; }
.set > header .set-go { font-size: 12px; color: var(--acc); text-decoration: none; white-space: nowrap; margin-left: auto; }
.set > header .set-go + .set-re { margin-left: 4px; }
.st-pg { border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; background: var(--bg); }
.st-pg > summary { display: flex; align-items: center; gap: 10px; padding: 6px 10px; cursor: pointer; list-style: none; }
.st-pg > summary::-webkit-details-marker { display: none; }
.st-pg > summary::before { content: "▸"; color: var(--mut); font-size: 11px; } .st-pg[open] > summary::before { content: "▾"; }
.st-pg > .st-prof { padding-left: 32px; }
@media (max-width: 900px) { .sys-top > .bs-card, .sys-top > section, .sys-top > .ssec > .omni, .sys-top > .ssec > .bs-card, .sys-top .set-note { margin-left: 12px; margin-right: 12px; } .set-cards { padding: 8px 12px 24px; } .sec-tabs { padding-left: 12px; padding-right: 12px; } .tab-actions .sys-tools .sys-upd { display: none; } }
/* profile groups: one per row (the old grid squeezed them), no inner scroll */
.st-profs:has(.st-pg) { display: block; max-height: none; overflow: visible; }
.st-pg > summary .bs-chk { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.st-pg[open] { padding-bottom: 6px; }
.st-pg .st-prof { display: flex; gap: 10px; align-items: baseline; padding: 3px 10px 3px 32px; }
/* 점검: a card managed in another tab shows its state only (no editable values there) */
.settings .set:has(.set-go) .set-vars { display: none; }
/* sub-tabs scroll: land below the sticky sub-tab row */
.sys-top .ssec, .sys-top .set-group, .sys-top .settings { scroll-margin-top: 64px; }

/* ── 설정 화면 공통 입력 요소: 선택칸·입력칸·버튼의 높이·모서리·색을 하나로 (네이티브 select가 튀던 것) ── */
#sys select, #sys .bs-row input:not([type=checkbox]):not([type=radio]), #sys input.sa-in, #sys .set-var input, #sys .sa select,
#sys .ar input:not([type=checkbox]):not([type=radio]), #sys .om input:not([type=checkbox]):not([type=radio]), #sys .sys-bar select, #sys .sys-bar input:not([type=checkbox]) {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background-color: var(--bg); color: var(--fg);
  font: inherit; font-size: 14px; min-width: 0; box-sizing: border-box; box-shadow: none; }
#sys select { -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
#sys select:focus, #sys input:not([type=checkbox]):not([type=radio]):focus { outline: 2px solid color-mix(in srgb, var(--acc) 35%, transparent); outline-offset: 0; border-color: var(--acc); }
#sys .bs-row select { width: 100%; }
#sys button.sec, #sys .bs-row > button, #sys .sys-bar button:not(.primary), #sys .set-acts button {
  height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg2); color: var(--fg); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
#sys button.sec:hover, #sys .bs-row > button:hover, #sys .sys-bar button:not(.primary):hover, #sys .set-acts button:hover { background: var(--bg3); }
#sys button.primary { height: 34px; padding: 0 16px; border: 1px solid var(--acc); border-radius: 7px; background: var(--acc); color: #fff; font-size: 13.5px; font-weight: 600; }
#sys button:disabled { opacity: .55; cursor: default; }
#sys .st-t button.sec, #sys .svc button, #sys .set-var button { height: 30px; padding: 0 11px; font-size: 13px; }
#sys .bs-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0 178px; }
#sys .st-pa { margin: 10px 0 0; } #sys .st-pa .bs-chk { margin: 0; }
#sys .st-profs { margin-top: 6px; }
@media (max-width: 700px) { #sys .bs-acts { margin-left: 0; } }
#sys .omni table button, #sys .ar table button, #sys .om button.sec { height: 30px; padding: 0 11px; font-size: 13px; }
/* narrow screens: the provider table scrolls sideways instead of breaking addresses letter by letter */
#sys .st-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#sys .st-t { min-width: 560px; } #sys .st-t .st-url { white-space: nowrap; }
#sys .st-pg > summary b { white-space: nowrap; } #sys .st-pg > summary > .mut { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* toasts: top right, stacked (newest at the bottom of the stack), click opens the item */
.toasts { position: fixed; top: 52px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.tst { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13.5px; line-height: 1.45; animation: tst-in .2s ease; transition: opacity .25s, transform .25s; }
.tst.link { cursor: pointer; } .tst.link:hover { border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
.tst.bad { border-color: color-mix(in srgb, var(--no) 50%, var(--line)); } .tst.bad .tst-i { color: var(--no); }
.tst.out { opacity: 0; transform: translateX(16px); }
.tst-i { flex: none; font-size: 16px; line-height: 20px; }
.tst-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tst-t { font-weight: 600; overflow-wrap: anywhere; } .tst-s { color: var(--mut); font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tst-x { flex: none; border: 0; background: none; color: var(--mut); font-size: 13px; padding: 0 4px; line-height: 20px; cursor: pointer; }
.tst-x:hover { color: var(--fg); }
@keyframes tst-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .toasts { top: 60px; right: 8px; width: calc(100vw - 16px); } }

/* terminal tab (/term): xterm fills the tab */
.editor-body.fill > .term-page, .epane .term-page { height: 100%; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.term-page .term-view { flex: 1; min-height: 0; padding: 6px 0 0 8px; }
.term-page .term-view .xterm { height: 100%; overflow: hidden; }
.term-page .xterm-screen { will-change: transform; }
.term-page .tlogin { margin: 24px; display: grid; gap: 8px; max-width: 420px; }
.term-page .tlogin .row2 { display: flex; gap: 8px; } .term-page .tlogin .err { color: var(--no); font-size: 13px; }

/* terminal dock: a tab group below the editor groups (⌃` hides / shows, ⤢ = 터미널 집중 모드) */
.edock, .dsash { display: none; }
/* the dock slides: while it exists it stays in the layout and only its height (and opacity) changes */
html.dock-has .edock { display: flex; flex-direction: row; flex: none; height: 0; min-height: 0; overflow: hidden; opacity: 0;
  border-top: 0 solid var(--line); transition: height .24s cubic-bezier(.2,.8,.2,1), opacity .18s ease; }
html.dock-has.dock-on .edock { height: var(--dockh, 35%); min-height: 90px; opacity: 1; border-top-width: 1px; }
html.dock-has .edock > .egroup { flex: 1 1 0; min-height: 0; }
body.dragging .edock { transition: none; }   /* resizing with the sash follows the pointer */
html.dock-on .dsash { display: block; flex: none; height: 5px; margin-top: -3px; cursor: row-resize; position: relative; z-index: 3; }
html.dock-on .dsash:hover, .dsash.active { background: color-mix(in srgb, var(--acc) 35%, transparent); }
html.dock-max .egroups, html.dock-max .dsash { display: none !important; }
html.dock-has.dock-max .edock { flex: 1 1 auto; height: auto; border-top: 0; }
.etabs-acts .dock-btn { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px; background: none; color: var(--mut); cursor: pointer; }
.etabs-acts .dock-btn:hover { background: var(--bg3); color: var(--fg); }
/* a terminal tab: no document toolbar (the dock has ⤢ 집중 · ⌄ 숨기기) */
.epane:has(.term-page) > .tab-actions, .epane:has(.term-page) > .tabs > .tab-actions { display: none !important; }
.edock .etab { min-width: 92px; flex-shrink: 0; } .edock .etabs { overflow-x: auto; scrollbar-width: none; } .edock .etabs::-webkit-scrollbar { display: none; } .edock .etabs-acts { flex: none; }
/* 채팅 모델 선택 옆 ★ 기본으로 — 기본이 아닌 모델을 골랐을 때만 보임 */
.hc-setdef { flex: 0 0 auto; border: 1px solid var(--line, #ddd); background: none; border-radius: 8px; height: 28px; padding: 0 8px; font-size: 12px; color: var(--mut, #666); cursor: pointer; white-space: nowrap; }
.hc-setdef:hover { color: var(--fg, #111); border-color: var(--acc, #888); }
.hc-setdef[hidden] { display: none; }
/* 새 대화 업무 제안: 지금 탭 기준 여러 안 */
.hc-sugs { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; width: 100%; max-width: 440px; text-align: left; }
.hc-sug { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--line, #ddd); border-radius: 10px; background: var(--bg2, transparent); color: var(--fg, inherit); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.hc-sug:hover, .hc-sug.on { border-color: var(--acc, #8b83f7); }
.hc-sug .sk { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--chip, rgba(127,127,127,.15)); color: var(--mut, #666); white-space: nowrap; }
.hc-sug.k-now .sk { background: rgba(239, 68, 68, .14); color: #dc2626; }
.hc-sug.k-can .sk { background: rgba(99, 102, 241, .14); color: #6366f1; }
.hc-sug.k-good .sk { background: rgba(16, 185, 129, .14); color: #059669; }
.hc-sug .sa { flex: 1 1 auto; min-width: 0; }
/* 푸터: 모델 선택 · 단축키 플로터 */
.statusbar #sbar-models, .statusbar .sbar-keys { border: 0; background: none; color: #fff; font: inherit; font-size: 12px; padding: 0 6px; height: 100%; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.statusbar #sbar-models:hover, .statusbar .sbar-keys:hover, .statusbar .sbar-keys.on { background: rgba(255,255,255,.16); }
.statusbar .r + .sbar-keys { margin-left: 2px; }
.sbar-pop, .keys-pop { position: fixed; z-index: 9000; background: var(--bg, #fff); color: var(--fg, #111); border: 1px solid var(--line, #ddd); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.22); font-size: 13px; }
.sbar-pop[hidden], .keys-pop[hidden] { display: none; }
.model-pop { width: 340px; max-height: min(60vh, 520px); display: flex; flex-direction: column; }
.model-pop .mp-h { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line, #ddd); }
.model-pop .mp-h .mut { font-size: 11px; }
.model-pop .mp-l { overflow: auto; padding: 4px; }
.model-pop .mp-i { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.model-pop .mp-i:hover:not(:disabled) { background: var(--sel, rgba(127,127,127,.15)); }
.model-pop .mp-i:disabled { cursor: default; }
.model-pop .mp-i.on { color: var(--acc, #6366f1); font-weight: 600; }
.model-pop .mp-i .ms { flex: 0 0 auto; font-size: 11px; opacity: .7; }
.keys-pop { right: 10px; width: min(620px, calc(100vw - 20px)); max-height: 70vh; overflow: auto; }
.keys-pop .kp-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line, #ddd); position: sticky; top: 0; background: inherit; }
.keys-pop .kp-x { border: 0; background: none; color: inherit; cursor: pointer; opacity: .7; }
.keys-pop .kp-b { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; padding: 10px 14px 14px; }
.keys-pop section h4 { margin: 8px 0 4px; font-size: 11px; color: var(--mut, #666); font-weight: 600; }
.keys-pop section div { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.keys-pop kbd { flex: 0 0 auto; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 1px 5px; border: 1px solid var(--line, #ccc); border-bottom-width: 2px; border-radius: 5px; background: var(--bg2, rgba(127,127,127,.08)); }
/* 브라우저 탭: 주소줄이 탭 도구모음 안에 (전체화면 버튼 옆) */
.tab-actions:has(> .br-bar) { justify-content: stretch; }
.tab-actions > .br-bar { flex: 1; min-width: 0; padding: 0; border: 0; gap: 6px; order: -1; }   /* 주소줄 왼쪽, 전체화면은 오른쪽 끝 */
.tab-actions > .br-bar .br-url { height: 26px; }
.tab-actions > .br-bar button, .tab-actions > .br-bar .br-out { height: 26px; padding: 0 9px; }
.tab-actions > .br-bar .br-reload { min-width: 0; }
.tab-actions > .br-bar ~ * { flex: none; }
/* 자동 선택 규칙 — 외부 모델 프로바이더 카드 */
.ar .ar-pv { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.ar .ar-pv.off { opacity: .55; }
.ar .ar-pvh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .ar .ar-pvh .ar-btns { margin-left: auto; }
.ar .ar-pvs { margin: 6px 0; font-size: 13px; }
.ar .ar-mrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.ar .ar-mno { width: 18px; color: var(--mut); } .ar .ar-mt { flex: 2 1 200px; min-width: 160px; } .ar .ar-ml { flex: 1 1 120px; min-width: 100px; }
.ar .ar-cond { white-space: nowrap; font-size: 13px; } .ar .ar-mmin { width: 70px; } .ar .ar-mrow .ar-btns { margin-left: auto; white-space: nowrap; }
.ar .ar-btns button { padding: 2px 8px; margin-left: 2px; }
.ar .ar-wal { width: 100px; margin: 0 6px; }
.ar .ar-now { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--acc, #4f46e5) 8%, transparent); }
.ar .ar-lad { margin: 6px 0 0 18px; font-size: 13px; }

/* 브라우저 탭: ← → ☆ · 사이드 메뉴 ⭐ 즐겨찾기 */
.tab-actions > .br-bar .br-back, .tab-actions > .br-bar .br-fwd, .tab-actions > .br-bar .br-star { padding: 0 8px; min-width: 0; }
.br-bar .br-star.on { color: #f5b301; }
#bm-list li { position: relative; }
#bm-list li .bm-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); opacity: 0; font-size: 11px; }
#bm-list li:hover .bm-del { opacity: .7; } #bm-list li .bm-del:hover { opacity: 1; }
#bm-list .bu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-tip { font-size: 11px; padding: 6px 12px; }
.tab-actions > .br-bar .br-url { min-width: 160px; }
.tab-actions > .br-bar .br-desk { font-size: 0; padding: 0 8px; } .tab-actions > .br-bar .br-desk::before { content: "🖥"; font-size: 14px; }
/* 🤝 공유 브라우저 */
.br-view .live { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.br-view .live-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; cursor: default; user-select: none; -webkit-user-drag: none; }
.br-view .live-ime { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; resize: none; pointer-events: none; }
.br-hint .lv-st { margin-left: 6px; color: var(--mut, #888); }
.br-hint .lv-follow { margin-left: auto; float: right; font-size: 11px; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.br-bar .br-live.on { background: var(--acc-bg, rgba(99,102,241,.15)); color: var(--acc, #6366f1); }
.br-hint .lv-copy, .br-hint .lv-kbd { margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line, #ddd); background: var(--bg, #fff); color: var(--fg, #111); cursor: pointer; }
.br-hint .lv-kbd[hidden] { display: none; }
.br-view .live-img { touch-action: none; }
.om-adj { margin-top: 4px; font-size: 12px; color: var(--warn, #b45309); } .ar .ar-adjchk { display: block; margin: 6px 0 10px; }
/* 🧩 PC 브라우저 연결 */
.ext-pop { width: 380px; padding: 0 14px 12px; font-size: 13px; }
.ext-pop .xp-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 6px; }
.ext-pop .xp-x { border: 0; background: none; cursor: pointer; color: inherit; opacity: .7; }
.ext-pop p { margin: 6px 0; } .ext-pop .xp-st { margin: 8px 0 2px; } .ext-pop .xp-tab { font-size: 12px; word-break: break-all; }
.ext-pop .xp-steps { margin: 8px 0; padding-left: 18px; font-size: 12px; } .ext-pop .xp-steps li { margin: 3px 0; }
.ext-pop code { font-size: 11px; padding: 0 4px; border-radius: 4px; background: var(--bg3, rgba(127,127,127,.12)); }
.ext-pop .xp-code { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.ext-pop .xp-c { font: 600 18px ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.br-bar .br-ext.on { color: #059669; }
.hc-pc { flex: 0 0 auto; border: 1px solid var(--line, #ddd); background: none; border-radius: 8px; height: 28px; padding: 0 8px; font-size: 12px; color: var(--mut, #666); cursor: pointer; }
.hc-pc.on { color: var(--acc, #6366f1); border-color: var(--acc, #6366f1); background: var(--acc-bg, rgba(99,102,241,.1)); }
.hc-pc[hidden] { display: none; }
/* 📄 현재 문서 첨부 토글 (chat.js scrBtn): 회색 = 보내지 않음, 진한색 = 함께 보냄 */
.hc-scr { flex: 0 1 auto; min-width: 0; max-width: 220px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line, #ddd); background: none; border-radius: 8px;
  height: 28px; padding: 0 8px; font-size: 12px; color: var(--mut, #999); opacity: .7; cursor: pointer; }
.hc-scr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-scr.on { color: var(--fg, #111); border-color: var(--fg, #111); opacity: 1; font-weight: 600; }
.hc-scr[hidden], .hc.hc-ro .hc-scr { display: none !important; }
/* 브라우저 보기 방식: 직접 · 프록시 · 공유 */
.tab-actions > .br-bar .br-modes { display: inline-flex; flex: none; border-radius: 7px; overflow: hidden; border: 1px solid var(--line, #ddd); }
.tab-actions > .br-bar .br-modes .br-mode { border-radius: 0; height: 24px; padding: 0 8px; font-size: 11.5px; background: var(--bg, #fff); color: var(--mut, #666); }
.tab-actions > .br-bar .br-modes .br-mode + .br-mode { border-left: 1px solid var(--line, #ddd); }
.tab-actions > .br-bar .br-modes .br-mode.on { background: var(--acc, #6366f1); color: #fff; }
.tab-actions > .br-bar .br-modes .br-vp { border-radius: 0; height: 24px; padding: 0 8px; font-size: 11.5px; background: var(--bg, #fff); color: var(--mut, #666); }
.tab-actions > .br-bar .br-modes .br-vp + .br-vp { border-left: 1px solid var(--line, #ddd); }
.tab-actions > .br-bar .br-modes .br-vp.on { background: var(--acc, #6366f1); color: #fff; }
/* 화면: PC · 모바일 (static/desktop.js fitVp) */
.br-stage { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.br-dev { position: absolute; inset: 0; }
.br-dev > .br-frame { width: 100%; height: 100%; }
.br-view.emu .br-stage { background: var(--line, #e5e7eb); }
.br-view.emu .br-dev { background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,.18); }
.br-view.drag .br-frame { pointer-events: none; }   /* the frame must not take the mouse while an edge is dragged */
.br-rs { display: none; position: absolute; touch-action: none; }
.br-view.emu .br-rs { display: block; }
.br-rs::after { content: ""; position: absolute; border-radius: 3px; background: var(--mut, #888); opacity: .45; }
.br-rs:hover::after, .br-view.drag .br-rs::after { opacity: .9; }
.br-rs-r { top: 0; right: -16px; width: 16px; height: 100%; cursor: ew-resize; }
.br-rs-r::after { left: 5px; top: calc(50% - 22px); width: 5px; height: 44px; }
.br-rs-b { left: 0; bottom: -16px; height: 16px; width: 100%; cursor: ns-resize; }
.br-rs-b::after { top: 5px; left: calc(50% - 22px); height: 5px; width: 44px; }
.br-rs-c { right: -18px; bottom: -18px; width: 18px; height: 18px; cursor: nwse-resize; }
.br-rs-c::after { left: 4px; top: 4px; width: 9px; height: 9px; border-radius: 2px; }
.br-devbar { display: none; position: absolute; left: 0; right: 0; top: 0; height: 34px; align-items: center; justify-content: center; gap: 6px;
             font-size: 12px; background: var(--bg, #fff); border-bottom: 1px solid var(--line, #ddd); }
.br-view.emu .br-devbar { display: flex; }
.br-devbar select, .br-devbar input { height: 24px; font-size: 12px; border: 1px solid var(--line, #ddd); border-radius: 5px; background: var(--bg, #fff); color: var(--fg, #222); }
.br-devbar input { width: 62px; padding: 0 4px; text-align: center; }
.br-devbar button { height: 24px; padding: 0 8px; }
.br-hint.br-block { padding: 24px 16px; text-align: center; }
.br-block .bb-t { margin-bottom: 12px; }
.br-block .bb-b { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.br-block .bb-b button { height: 30px; padding: 0 12px; }
/* 좁은 탭: 이동(Enter로 됨)·↗·🖥는 숨기고 주소줄과 보기 방식을 남김 */
.epane .tab-actions:has(> .br-bar) { container-type: inline-size; }
@container (max-width: 680px) {
  .br-bar button[type=submit], .br-bar .br-out, .br-bar .br-desk { display: none !important; }
  .br-bar .br-url { min-width: 100px !important; }
}
@container (max-width: 520px) { .br-bar .br-star, .br-bar .br-ext { display: none !important; } }
.hm-approval .ap-st { margin-top: 8px; font-size: 12.5px; color: var(--mut, #666); }
.hm-approval.sent .ap-b button { opacity: .5; cursor: default; }
/* 승인 카드: 한국어 요약 · 위험도 · 의견, 원문은 접어 두기 */
.hm-approval .ap-ko { margin: 6px 0 8px; }
.hm-approval .ap-sum { font-size: 14px; line-height: 1.55; }
.hm-approval .ap-op { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; font-size: 13px; color: var(--fg, #222); }
.hm-approval .ap-risk { flex: none; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.hm-approval .ap-risk.r-low { background: rgba(16,185,129,.15); color: #059669; }
.hm-approval .ap-risk.r-mid { background: rgba(245,158,11,.18); color: #b45309; }
.hm-approval .ap-risk.r-high { background: rgba(239,68,68,.15); color: #dc2626; }
.hm-approval .ap-flags { margin: 6px 0 0; padding-left: 4px; list-style: none; font-size: 12.5px; color: #b45309; }
.hm-approval .ap-wait { font-size: 12.5px; color: var(--mut, #777); }
.hm-approval .ap-raw { margin: 4px 0 8px; font-size: 12.5px; }
.hm-approval .ap-raw summary { cursor: pointer; color: var(--mut, #666); }
.hm-approval .ap-raw[open] summary { margin-bottom: 6px; }
.hm-approval .ap-raw pre { max-height: 260px; overflow: auto; }
.hm-approval .ap-by { margin-top: 4px; font-size: 11px; color: var(--mut, #999); }
/* 👁 감시 — header icon + popover */
.watch-wrap { position: relative; display: inline-flex; }
#watch-btn { position: relative; }
#watch-btn .wdot { position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 2px var(--bg2, #fff); }
#watch-btn[data-level="ok"] .wdot { background: #10b981; }
#watch-btn[data-level="warn"] .wdot { background: #f59e0b; }
#watch-btn[data-level="bad"] .wdot { background: #ef4444; }
#watch-btn[data-level="off"] svg { opacity: .55; }
#watch-btn .wbadge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; line-height: 15px; text-align: center; }
.watch-pop { position: fixed; z-index: 9000; width: min(440px, calc(100vw - 16px)); max-height: min(78vh, 720px); overflow: auto; background: var(--bg, #fff); color: var(--fg, #111);
  border: 1px solid var(--line, #ddd); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.22); font-size: 13px; }
.watch-pop[hidden] { display: none; }
.watch-pop .wp-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line, #ddd); background: inherit; }
.watch-pop .wp-gap { flex: 1; }
.watch-pop .wp-sw { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; cursor: pointer; }
.watch-pop .ghost { border: 0; background: none; color: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.watch-pop .ghost:hover { background: var(--bg3, rgba(127,127,127,.12)); }
.watch-pop .wp-meta { padding: 8px 12px 0; font-size: 12px; color: var(--mut, #666); }
.watch-pop .wp-err { margin-top: 4px; color: #dc2626; }
.watch-pop .wp-run { color: var(--acc, #6366f1); }
.watch-pop .wp-acts { display: flex; gap: 8px; align-items: center; padding: 10px 12px; flex-wrap: wrap; }
.watch-pop .wp-acts .primary, .watch-pop .wp-acts .sec { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; text-decoration: none; display: inline-flex; align-items: center; }
.watch-pop .wp-list { list-style: none; margin: 0; padding: 0 8px 10px; }
.watch-pop .wp-empty { padding: 16px 8px; color: var(--mut, #777); text-align: center; }
.watch-pop .wp-f { border: 1px solid var(--line, #e3e3e3); border-left-width: 4px; border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.watch-pop .wp-f.sev-high { border-left-color: #ef4444; } .watch-pop .wp-f.sev-mid { border-left-color: #f59e0b; } .watch-pop .wp-f.sev-low { border-left-color: #10b981; }
.watch-pop .wp-f.new { background: var(--acc-bg, rgba(99,102,241,.05)); }
.watch-pop .wp-f.focus { box-shadow: 0 0 0 2px var(--acc, #6366f1); }
.watch-pop .wf-h { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.watch-pop .wf-sev { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--bg3, rgba(127,127,127,.15)); }
.watch-pop .wf-t { margin-left: auto; font-size: 11px; color: var(--mut, #888); }
.watch-pop details { margin: 6px 0 0; } .watch-pop summary { cursor: pointer; font-size: 12px; color: var(--mut, #666); }
.watch-pop .wf-d { white-space: pre-wrap; margin: 6px 0; font-size: 12.5px; }
.watch-pop .wf-s { margin: 4px 0; font-size: 12.5px; }
.watch-pop .wf-r { font-size: 12px; }
.watch-pop .wf-b { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.watch-pop .wf-b button { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12px; }
.watch-pop .wp-form { padding: 6px 12px 0; }
.watch-pop .wp-form h4 { margin: 12px 0 6px; font-size: 12px; color: var(--mut, #666); }
.watch-pop .wp-form label { display: block; margin: 6px 0; font-size: 12.5px; }
.watch-pop .wp-form select { display: block; width: 100%; margin-top: 3px; }
.watch-pop .wp-row { display: flex; gap: 10px; } .watch-pop .wp-row label { flex: 1; }
.watch-pop .wp-tip { font-size: 11.5px; color: var(--mut, #888); margin: 4px 0; }
.watch-pop .wp-kinds { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12.5px; }
.watch-pop .wp-kinds th, .watch-pop .wp-kinds td { padding: 3px 6px; border-bottom: 1px solid var(--line, #eee); text-align: center; }
.watch-pop .wp-kinds th:first-child, .watch-pop .wp-kinds td:first-child { text-align: left; }
/* 푸터: GPU 가동 상태 */
.statusbar .sbar-gpu { display: inline-flex; gap: 10px; align-items: center; font-size: 12px; white-space: nowrap; }
.statusbar .sbar-gpu .g { display: inline-flex; align-items: center; gap: 4px; }
.statusbar .sbar-gpu .gb { display: inline-block; width: 38px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); overflow: hidden; }
.statusbar .sbar-gpu .gb b { display: block; height: 100%; background: #fff; transition: width .4s ease; }
.statusbar .sbar-gpu .g-mid .gb b { background: #fde68a; }
.statusbar .sbar-gpu .g-hi .gb b { background: #fca5a5; }
@media (max-width: 1100px) { .statusbar .sbar-gpu .g { font-size: 0; gap: 3px; } .statusbar .sbar-gpu .gb { width: 30px; } .statusbar .sbar-gpu .g::after { content: attr(data-u); font-size: 12px; } }
/* 채팅 진행 상태: 자세한 줄 · 생각 과정 */
.hm-working .w-det { white-space: pre-line; margin-top: 3px; font-size: 11.5px; color: var(--mut, #888); line-height: 1.5; }
.hm-working .w-det:empty { display: none; }
.st.st-think .st-line { cursor: pointer; }
.st.st-think .st-arg { color: var(--mut, #888); }
.st.st-think pre { white-space: pre-wrap; font-size: 12px; max-height: 260px; overflow: auto; }
.hm-working { flex-wrap: wrap; }
.hm-working .w-det { flex: 0 0 100%; padding-left: 22px; }
/* 프록시: 로그인(OAuth)은 공유 브라우저로 */
.br-view .br-signin { margin: 10px; padding: 12px 14px; border: 1px solid #f59e0b; border-radius: 10px; background: rgba(245,158,11,.08); font-size: 13px; }
.br-view .br-signin .bs-t { font-weight: 600; margin-bottom: 4px; }
.br-view .br-signin .bs-d { color: var(--mut, #555); margin-bottom: 10px; }
.br-view .br-signin .bs-b { display: flex; gap: 8px; flex-wrap: wrap; }
.br-view .br-signin button { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; }
/* 🧭 서버 서비스 */
#svc-list .t { display: flex; align-items: center; gap: 6px; }
.svd { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.svd.on { background: #10b981; } .svd.off { background: #d1d5db; }
.sec-head .svc-set { margin-left: auto; text-decoration: none; opacity: .6; font-size: 12px; padding: 0 4px; }
.sec-head .svc-set:hover { opacity: 1; }
#svc-manage .svm-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 6px 0 10px; font-size: 13px; }
#svc-manage .svm-ex { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 10px; }
#svc-manage .svm-ex input { flex: 1; max-width: 320px; }
#svc-manage .svm-t { width: 100%; border-collapse: collapse; font-size: 13px; }
#svc-manage .svm-t th, #svc-manage .svm-t td { padding: 4px 6px; border-bottom: 1px solid var(--line, #eee); text-align: left; }
#svc-manage .svm-t td input[type=text] { width: 100%; min-width: 140px; }
#svc-manage .svm-t tr.hid td { opacity: .5; }
#svc-manage .ghost { border: 0; background: none; cursor: pointer; padding: 1px 5px; color: inherit; }
.view-services .pane-head .svc-n { margin-left: 6px; }
.view-services .pane-head .svc-set { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
/* 💬 메신저 탭 (/messenger) — the same pane as the side panel; wide tabs show list | thread */
.msg-tab { height: 100%; min-height: 0; display: flex; }
.msg-tab > .bz { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: row; position: relative; }
.msg-tab > .bz:not(.thread-open) > .fsash { display: none; }
   /* the 메신저 header ⧉ opens it */
/* 메신저 탭: 메시지 | 스레드 사이 크기 조절 손잡이 (폭은 전체화면 메신저와 같은 --ftw를 씀) */
.msg-tab > .bz.thread-open > .fsash { display: block; flex: none; width: 6px; cursor: col-resize; position: relative; z-index: 2; background: transparent; }
.msg-tab > .bz.thread-open > .fsash::after { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 1px; background: var(--line); }
.msg-tab > .bz.thread-open > .fsash:hover::after, body.dragging .msg-tab .fsash.active::after { left: 1px; width: 3px; background: var(--acc); }

/* Buzz: agents put details under a "▼ 상세" line — folded (inbox.py _buzz_md_render) */
/* 사이드 메신저 = 채널 + 담당자 목록 (고르면 메신저 탭). 전체화면(집중 모드)은 그대로 목록 | 메시지 | 스레드 */
html:not(.max-msg) .view-messenger > .msg-body { display: none; }
html:not(.max-msg) .view-messenger .msg-totab { display: none; }

/* 설정 › 에이전트·메신저 › 메신저 › 업무 점검 (workcycle.js) */
.wc-p { border: 1px solid var(--line); border-radius: 9px; margin: 8px 0; background: var(--bg); }
.wc-p > summary { cursor: pointer; padding: 9px 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 13.5px; }
.wc-p[open] > summary { border-bottom: 1px solid var(--line); }
.wc-body { padding: 8px 12px 12px; }
.wc-body h5 { margin: 16px 0 6px; font-size: 13px; }
.wc-on { display: inline-flex; gap: 6px; align-items: center; margin: 4px 0 8px; font-weight: 600; }
.wc-num { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mut); }
.wc-num input { width: 80px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; }
.wc-tip { font-size: 12px; }
.wc-dev { display: flex; gap: 6px; min-width: 0; }
.wc-dev input { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; min-width: 0; flex: 1; }
.wc-row { margin: 8px 0; } .wc-row label { display: block; font-size: 13px; color: var(--mut); margin-bottom: 4px; }
.wc-extra { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; resize: vertical; }
.wc-teams { line-height: 1.9; }
.wc-acts { margin-left: 0; }
.wc-t td { font-size: 12.5px; vertical-align: top; } .wc-t .wc-txt { max-width: 520px; white-space: pre-wrap; word-break: break-word; }
.wc-reps { margin: 0; padding-left: 18px; font-size: 12.5px; } .wc-reps li { margin: 3px 0; }
@media (max-width: 700px) { .wc-p .bs-row { grid-template-columns: 1fr; } .wc-tip { display: none; } }
.wc-checker, .wc-period { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; max-width: 100%; }
.wc-when { white-space: nowrap; } .wc-ext { font-size: 12.5px; margin: 2px 0 6px; }
.wc-set { font-size: 12px; font-weight: 400; margin-left: 6px; }
.wc-readme { margin-top: 18px; padding-top: 10px; border-top: 1px dashed var(--line); }
.wr-rules { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* 📝 문서 작성 정보 (static/docprov.js): a quiet line under the document */
.doc-prov { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -32px 32px 20px; padding: 10px 0 0; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--mut); }
.doc-prov:empty { display: none; }
.doc-prov span { white-space: nowrap; }
.doc-prov i { font-style: normal; opacity: .75; }
.doc-prov b { font-weight: 500; color: inherit; }

/* a stack: editor groups split across the main direction (top / bottom inside a column, or side by side inside a row) */
.estack { display: flex; flex-direction: row; min-width: 0; min-height: 0; flex: 1 1 0; }
.estack.v { flex-direction: column; }
.egroups.multi .estack > .egroup { min-width: 0; min-height: 0; }
.estack.v > .egroup { min-height: 120px; }
.gsash.gs-v { width: auto; height: 5px; cursor: row-resize; }
.gsash.gs-v::after { left: 0; right: 0; top: 2px; bottom: auto; width: auto; height: 1px; }
.gsash.gs-v:hover::after, .gsash.gs-v.active::after { height: 3px; width: auto; top: 1px; left: 0; }
.egroups.multi > .estack:not(.v) { min-height: 160px; } .egroups.multi:not(.col) > .estack { min-width: 240px; }

/* content full screen shows only the group being worked in: other editor groups, their dividers and the dock step aside */
html.max-editor .egroups .egroup:not(.focus), html.max-editor .egroups .gsash { display: none !important; }
html.max-editor .estack:not(:has(> .egroup.focus)) { display: none !important; }
html.max-editor .egroups .egroup.focus, html.max-editor .estack:has(> .egroup.focus) { flex: 1 1 0 !important; min-width: 0 !important; }
html.max-editor .editor:not(:has(.edock .egroup.focus)) :is(.edock, .dsash) { display: none !important; }
html.max-editor .editor:has(.edock .egroup.focus) .egroups { display: none !important; }
html.max-editor .edock:has(.egroup.focus) .egroup:not(.focus), html.max-editor .edock:has(.egroup.focus) .gsash { display: none !important; }

/* chat: an answer that used the shared browser / the desktop gets buttons to bring them up (chat.js stepsEl) */
.hc-open { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.hc-open-b { height: 24px; padding: 0 9px; font-size: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); color: var(--fg); cursor: pointer; }
.hc-open-b:hover { border-color: var(--acc); color: var(--acc); }

/* footer: what the GPU is working on (app.js jobsPaint, /api/status-models jobs) */
.sbar-jobs { margin-left: 10px; font-size: 12px; color: var(--mut); white-space: nowrap; max-width: 72ch; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
.sbar-jobs.busy { color: var(--fg); }

/* GPU model swap approval popup (app.js approvalsPaint) */
.ap-pop { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.28); }
.ap-box { width: min(520px, calc(100vw - 32px)); background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.ap-box b { font-size: 15px; } .ap-t { margin: 10px 0 4px; line-height: 1.6; font-size: 14px; } .ap-left { font-size: 12.5px; margin: 0 0 12px; }
.ap-acts { display: flex; flex-wrap: wrap; gap: 8px; } .ap-acts button { height: 34px; padding: 0 14px; }

/* exec approval popup: the plain explanation first, the command under 상세 보기 */
.apv-ko { margin: 8px 0 6px; } .apv-sum { margin: 0 0 6px; font-size: 15px; line-height: 1.55; font-weight: 600; }
.apv-op { margin: 0 0 4px; font-size: 13.5px; line-height: 1.55; } .apv-risk { display: inline-block; padding: 1px 8px; border-radius: 10px; margin-right: 6px; font-size: 12px; font-weight: 650; }
.apv-risk.r-lo { background: color-mix(in srgb, #16a34a 18%, transparent); color: #15803d; } .apv-risk.r-mid { background: color-mix(in srgb, #d97706 20%, transparent); color: #b45309; }
.apv-risk.r-hi { background: color-mix(in srgb, #dc2626 20%, transparent); color: #b91c1c; }
.apv-flags { margin: 4px 0 0; padding-left: 4px; list-style: none; font-size: 12.5px; } .apv-flags li { margin: 2px 0; }
.apv-by { font-size: 11.5px; margin-top: 4px; }
.apv-more { margin: 6px 0 8px; } .apv-more > summary { cursor: pointer; font-size: 12.5px; color: var(--mut); }
.apv-more[open] > summary { margin-bottom: 6px; }
.ap-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; }
.ap-sel { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; max-width: 100%; }
.ap-all { display: inline-flex; align-items: center; gap: 4px; }
.ap-pick.ext::after { content: "⚠ 고른 모델은 대화 내용을 외부로 보냅니다(고르면 동의한 것으로 봅니다)"; flex-basis: 100%; font-size: 12px; color: #b45309; }
/* 자동 선택 v2 */
.v2-combos .v2-note { width: 100%; min-width: 220px; box-sizing: border-box; font: inherit; }
.v2-combos .v2-steps { font-size: 11px; line-height: 1.35; margin-top: 2px; }
.v2-row.off { opacity: .55; }
.v2-li { display: flex; align-items: center; gap: 6px; margin: 3px 0; flex-wrap: wrap; }
.v2-li select { max-width: 100%; }
.ar-legacy > summary { cursor: pointer; }
.v2-combos th:first-child, .v2-combos td:first-child { width: 44px; text-align: center; }
.v2-combos td:first-child .bs-chk { margin: 0; justify-content: center; }
.v2-combos td:nth-child(2) { width: 34%; }
/* 자동 선택 — 답변의 선택 과정 */
.hm-meta { position: relative; }
.hm-auto { background: none; border: 0; padding: 0 2px; cursor: pointer; font: inherit; }
.hm-auto:hover { text-decoration: underline; }
.hm-meta { flex-wrap: wrap; }
.hm-route { flex-basis: 100%; box-sizing: border-box; max-height: 50vh; overflow: auto;
  margin-top: 4px; padding: 8px 10px; font-size: 12px; font-weight: normal; background: var(--bg, #fff); color: var(--fg, inherit);
  border: 1px solid var(--line, #ddd); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.hm-route[hidden] { display: none; }
.hm-route-h { line-height: 1.45; margin-bottom: 4px; }
.hm-route ol { margin: 4px 0 0 18px; padding: 0; }
.hm-route li { margin: 3px 0; line-height: 1.45; }

/* 📄 기반 문서 under an AI answer (chat.js msgEl): a click opens the document in the main window */
.hm-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0 2px; font-size: 12px; }
.hm-src-b { border: 1px solid var(--line); background: var(--bg2); color: var(--fg, #111); border-radius: 999px; padding: 1px 9px; font-size: 12px; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.hm-src-b:hover { border-color: var(--acc); color: var(--acc); }
/* 📄 답변은 문서로: the card of the conversation's document under an answer */
.hm-doc { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; margin: 8px 0 2px; padding: 9px 12px; text-align: left;
  border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px; background: var(--bg2); color: var(--fg, #111); cursor: pointer; font: inherit; }
.hm-doc:hover { border-color: var(--acc); }
.hm-doc-i { font-size: 20px; flex: none; }
.hm-doc-m { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hm-doc-m b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-doc-m .mut { font-size: 12px; }
.hm-doc-s { font-size: 12.5px; opacity: .8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-doc-o { flex: none; font-size: 12.5px; color: var(--acc); }

/* an AI answer already replied to (chat.js markAnswered): its choice list is history, not a pending question */
.hm-assistant.answered .steps-list, .hm-assistant.answered .steps-go, .hm-assistant.answered .steps-head { display: none; }

/* 🧾 점검 under an AI answer (chat.js msgEl): the finish check's score and one-line verdict */
.hm-review { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 6px 0 0; font-size: 12px; color: var(--mut); }
.hm-review .hm-rv-k { font-weight: 600; }
.hm-review .hm-rv-s { color: #d97706; letter-spacing: .5px; white-space: nowrap; }
.hm-review.s1 .hm-rv-s, .hm-review.s2 .hm-rv-s { color: var(--no, #dc2626); }
.hm-review.s5 .hm-rv-s { color: #16a34a; }
.gr-card .gr-name { font-weight: 600; min-width: 180px; }
.gr-card .gr-note { width: 100%; box-sizing: border-box; margin: 4px 0; }

/* 💳 API left · ▶ models in use (static/usage.js) */
.statusbar .sbar-api, .statusbar .sbar-inuse { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; opacity: .92; }
.statusbar .sbar-api { max-width: 60ch; }
.statusbar .sbar-api.low { color: #fde68a; font-weight: 600; }
.statusbar .sbar-inuse.busy { font-weight: 600; }
@media (max-width: 900px) { .statusbar .sbar-api, .statusbar .sbar-inuse { display: none; } }

/* 한글 문서 (kordoc) in the viewer: tables keep their merged cells */
.kd-doc .kd-table table { border-collapse: collapse; margin: 8px 0 14px; width: 100%; }
.kd-doc .kd-table td, .kd-doc .kd-table th { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; text-align: left; }
.kd-doc .kd-table th { background: var(--bg2); }
/* 한글 문서 pages as laid out (kordoc render → SVG per page, inbox.py render_file) */
.kd-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px 16px 48px; background: var(--bg2); min-height: 100%; }
.kd-page { margin: 0; width: min(900px, 100%); background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.kd-page img { display: block; width: 100%; height: auto; }
.kd-page.big { padding: 28px 20px; text-align: center; font-size: 13px; }

/* 📧 메일 (static/mail.js · inbox_mail.py) */
.view-mail .mail-q { margin: 6px 8px; width: calc(100% - 16px); }
/* 사이드 메뉴 검색 (즐겨찾기 · 서버 서비스): the same box as 메일 검색 */
.sidebar .side-q { display: block; margin: 6px 8px; width: calc(100% - 16px); box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
.sidebar .side-q:focus { outline: none; border-color: var(--acc); }
.sidebar .side-none { margin: 6px 12px; font-size: 12.5px; }
.view-mail .mail-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 8px 6px; }
.view-mail .mail-chips .chip.err { color: var(--no); }
.mail-item { display: flex; flex-direction: column; gap: 1px; }
.mail-item .t { display: flex; justify-content: space-between; gap: 8px; }
.mail-item .mf { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .mt { color: var(--mut); font-size: 11px; white-space: nowrap; }
.mail-item .ms { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .mx { font-size: 11.5px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail-item.unread .mf, .mail-item.unread .ms { font-weight: 700; }
.mail-item.bulk { opacity: .7; }
.mail-doc .mail-head h1 { margin-bottom: 4px; }
.mail-doc .mail-head > div { font-size: 13px; margin: 2px 0; }
.mail-sum { margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--acc); background: var(--bg2); font-size: 13px; }
.mail-atts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mail-att { border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; text-decoration: none; }
.mail-html { display: block; width: 100%; min-height: 160px; height: 70vh; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin-top: 10px; }
.mail-text { white-space: pre-wrap; word-break: break-word; font: inherit; margin-top: 12px; }
.mail-note { font-size: 11.5px; }
.mail-compose { display: flex; flex-direction: column; gap: 8px; max-width: 860px; }
.mail-compose label { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--mut); }
.mail-compose input, .mail-compose select, .mail-compose textarea { font: inherit; color: var(--fg); }
.mail-compose textarea { min-height: 320px; }
.mail-bar, .ma-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail-by { font-size: 12px; color: var(--warn, #d97706); }
.ma-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 8px; }
.ma-form label { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--mut); }
.ma-form .ma-bar, .ma-form .ma-cert { grid-column: 1 / -1; }
.ma-cert { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--bg2); }
.ma-cert code { word-break: break-all; font-size: 11.5px; }
@media (max-width: 700px) { .ma-form { grid-template-columns: 1fr; } }
.ma-form input, .ma-form select, .mail-compose input, .mail-compose select, .mail-compose textarea, .view-mail .mail-q {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
.ma-em { display: flex; gap: 6px; } .ma-em input { flex: 1; min-width: 0; }
.ma-found { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.ma-cand { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.ma-cand.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 7%, transparent); }
.ma-cand.off { opacity: .7; }
.ma-cand .ma-use { align-self: flex-start; margin-top: 2px; }
.ma-cnote { font-size: 12px; margin: 0; }
/* 메일 계정 폼 (v2): one grid — full rows for the address / candidates / bar, label above field, host + port side by side */
.ma-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 10px; align-items: start; }
.ma-form .ma-full { grid-column: 1 / -1; }
.ma-form .ma-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ma-form .ma-row[hidden], .ma-form .ma-guide[hidden] { display: none; }
.ma-form .ma-row > label { font-size: 12.5px; color: var(--mut); }
.ma-form input, .ma-form select { box-sizing: border-box; height: 36px; width: 100%; min-width: 0; }
.ma-form .ma-em { display: flex; gap: 8px; } .ma-form .ma-em input { flex: 1; } .ma-form .ma-em button { height: 36px; white-space: nowrap; }
.ma-form .ma-hp { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }
.ma-form .ma-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ma-guide { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; background: var(--bg2); }
.ma-guide ol { margin: 6px 0; padding-left: 18px; } .ma-guide li { margin: 3px 0; }
.ma-code { font-size: 18px; letter-spacing: 2px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 700px) { .ma-form { grid-template-columns: 1fr; } }
.ma-edit-note { border-left: 3px solid var(--acc); background: var(--bg2); padding: 6px 10px; font-size: 12.5px; border-radius: 4px; }
.mail-acc .ma-acts { white-space: nowrap; text-align: right; }
/* 메일 계정 · 서버 서비스 cards in the common .set layout (header · padded body · set-rows) */
.set .set-desc { margin: 4px 0 10px; font-size: 12.5px; line-height: 1.6; }
.set .mail-acc td { vertical-align: middle; padding: 8px 6px; }
.set .mail-acc td:first-child { width: 34%; } .set .mail-acc td:first-child b { font-weight: 600; }
.set .mail-acc .err { color: var(--no); font-size: 12px; word-break: break-word; }
.set .ma-add { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.set .ma-add > summary { cursor: pointer; font-size: 13px; padding: 4px 0; color: var(--acc); }

/* 📧 메일 UI v2 — avatars · date groups · categories · tasks · composer rows · Tom Select chips (vendor/tom-select 2.4.3) */
.mail-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700;
  color: hsl(var(--h, 210) 55% 35%); background: hsl(var(--h, 210) 70% 90%); letter-spacing: 0; }
html[data-theme="dark"] .mail-av { color: hsl(var(--h, 210) 70% 82%); background: hsl(var(--h, 210) 35% 26%); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .mail-av { color: hsl(var(--h, 210) 70% 82%); background: hsl(var(--h, 210) 35% 26%); } }
.mail-item { flex-direction: row; align-items: flex-start; gap: 9px; border-left: 3px solid transparent; }
.mail-item .mb { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.mail-item.unread .mf::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); margin-right: 5px; vertical-align: 1px; }
.mail-item.c-중요 { border-left-color: #f59e0b; }
.mail-item.c-스팸 { opacity: .55; }
.mail-item.kb { outline: 2px solid var(--acc); outline-offset: -2px; }
#mail-list .mail-grp { position: sticky; top: 0; z-index: 1; padding: 6px 12px 3px; font-size: 11px; font-weight: 700; color: var(--mut); background: var(--bg2); }
.view-mail .mail-chips .chip.cat { border-style: dashed; }
.view-mail .mail-chips .chip.cat.on, .view-mail .mail-chips .chip.on { border-style: solid; }
.view-mail .mail-tasks { margin: 0 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.mail-tasks .mt-h { font-size: 11.5px; font-weight: 700; padding: 5px 9px; color: var(--mut); border-bottom: 1px solid var(--line); }
.mail-tasks .mt-i { display: flex; gap: 8px; padding: 5px 9px; font-size: 12px; text-decoration: none; color: var(--fg); }
.mail-tasks .mt-i:hover { background: var(--bg3); }
.mail-tasks .mt-d { color: var(--mut); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-tasks .mt-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tasks .s-proposed .mt-t b { color: #d97706; font-weight: 700; }
/* reading a mail */
.mail-doc .mail-head h1 { font-size: 21px; line-height: 1.35; }
.mail-from { display: flex; gap: 10px; align-items: center; margin: 10px 0 4px; }
.mail-from .mail-av { width: 38px; height: 38px; font-size: 14px; }
.mail-from .mf-w { min-width: 0; flex: 1; }
.mail-from .mf-w > div { font-size: 13px; margin: 1px 0; overflow-wrap: anywhere; }
.mail-from .mf-d { float: right; font-size: 12px; }
.mail-att { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 5px; border-radius: 8px; background: var(--bg); color: var(--fg); max-width: 300px; }
.mail-att:hover { border-color: var(--acc); }
.mail-att .an { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-att .ft, .mail-atts-ed .ft { font-style: normal; font-size: 9.5px; font-weight: 800; padding: 4px 5px; border-radius: 5px; background: var(--bg3); color: var(--mut); min-width: 28px; text-align: center; }
.mail-fwd { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--acc); border-radius: 8px; background: var(--bg2); display: flex; flex-direction: column; gap: 8px; }
.mail-fwd label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--mut); }
.mail-fwd select, .mail-fwd textarea { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
/* composer */
.mail-compose { gap: 0; }
.mail-compose .mc-rows { border: 1px solid var(--line); border-radius: 10px 10px 0 0; background: var(--bg); }
.mail-compose .mc-row { display: flex; align-items: center; gap: 8px; padding: 2px 10px; border-bottom: 1px solid var(--line); min-height: 38px; }
.mail-compose .mc-row:last-child { border-bottom: 0; }
.mail-compose .mc-k { flex: none; width: 74px; font-size: 12.5px; color: var(--mut); }
.mail-compose .mc-row > input, .mail-compose .mc-row > select { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; padding: 6px 2px !important; outline: none; }
.mail-compose .mc-row > .ts-wrapper { flex: 1; min-width: 0; }
.mail-compose .mc-cc { display: none; } .mail-compose .mc-cc.open { display: flex; }
.mail-compose .mc-cc-t { font-size: 12px; padding: 2px 8px; }
.mail-compose .mail-suggest { padding: 6px 10px; font-size: 12px; border-bottom: 1px solid var(--line); background: var(--bg2); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mail-compose .mail-suggest[hidden] { display: none; }
.mail-compose .mc-tabs { display: flex; gap: 2px; align-items: center; padding: 4px 6px 0; border: 1px solid var(--line); border-top: 0; background: var(--bg2); }
.mail-compose .mc-tabs button { border: 0; background: none; padding: 5px 10px; border-radius: 6px 6px 0 0; font-size: 12.5px; color: var(--mut); cursor: pointer; }
.mail-compose .mc-tabs button.on { background: var(--bg); color: var(--fg); font-weight: 600; }
.mail-compose .mc-hint { margin-left: auto; font-size: 11.5px; padding-right: 6px; }
.mail-compose kbd { font: 10.5px var(--mono, monospace); padding: 0 4px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--bg); }
.mail-compose .mail-bodywrap { position: relative; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: var(--bg); }
.mail-compose .mail-bodywrap textarea { width: 100%; box-sizing: border-box; min-height: 360px; border: 0 !important; border-radius: 0 0 10px 10px; resize: vertical; padding: 12px 14px !important; line-height: 1.65; outline: none; display: block; }
.mail-compose .mc-preview { min-height: 360px; padding: 12px 16px; font-size: 14px; line-height: 1.65; }
.mail-compose .mc-preview table { border-collapse: collapse; } .mail-compose .mc-preview td, .mail-compose .mc-preview th { border: 1px solid var(--line); padding: 4px 8px; }
.mail-compose .mail-ghost { position: absolute; right: 12px; bottom: 10px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--bg3); color: var(--mut); animation: mailPulse 1.2s ease-in-out infinite; }
@keyframes mailPulse { 50% { opacity: .5; } }
.mail-compose .mc-drop { position: absolute; inset: 0; display: grid; place-items: center; border: 2px dashed var(--acc); border-radius: 0 0 10px 10px; background: color-mix(in srgb, var(--bg) 85%, transparent); font-weight: 600; color: var(--acc); }
.mail-compose .mc-drop[hidden], .mail-compose .mail-ghost[hidden], .mail-compose .mc-preview[hidden] { display: none; }
.mail-compose .mail-atts-ed { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mail-compose .mail-atts-ed:empty { display: none; }
.mail-compose .mail-atts-ed .mail-att { padding: 4px 4px 4px 5px; }
.mail-compose .mail-bar { margin-top: 10px; }
.mail-compose .mail-up { cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 6px; }
.mail-compose .mail-up:hover, .mail-compose .mail-save:hover { background: var(--bg3); }
.mail-compose .mc-chat { margin-left: auto; font-size: 11.5px; }
.mail-compose .mail-review { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--acc); border-radius: 10px; background: var(--bg2); }
.mail-compose .mail-review h4 { margin: 0 0 6px; }
.mail-compose .mail-review .rv-i { font-size: 13px; padding: 3px 0; color: #b45309; }
.mail-compose .mail-review .rv-s { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; }
.mail-ac { position: absolute; z-index: 30; margin-top: 2px; min-width: 260px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.15); display: flex; flex-direction: column; }
.mail-ac button { text-align: left; border: 0; background: none; padding: 6px 10px; font-size: 13px; color: var(--fg); cursor: pointer; } .mail-ac button:hover { background: var(--bg3); }
.ma-prefs { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 4px; font-size: 13px; }
/* Tom Select, themed with Inbox tokens */
.mail-compose .ts-wrapper .ts-control { border: 0; background: transparent; padding: 4px 2px; box-shadow: none; color: var(--fg); font: inherit; gap: 4px; min-height: 30px; }
.mail-compose .ts-wrapper.focus .ts-control { box-shadow: none; }
.mail-compose .ts-wrapper .ts-control > input { color: var(--fg); font: inherit; min-width: 8rem; }
.mail-compose .ts-wrapper.multi .ts-control > div { margin: 0; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg3); color: var(--fg); font-size: 12.5px; }
.mail-compose .ts-wrapper.multi .ts-control > div.active { background: var(--acc); border-color: var(--acc); color: #fff; }
.mail-compose .ts-dropdown { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.15); margin-top: 4px; font-size: 13px; }
.mail-compose .ts-dropdown .active { background: var(--bg3); color: var(--fg); }
.mail-compose .ts-dropdown .option, .mail-compose .ts-dropdown .create, .mail-compose .ts-dropdown .no-results { padding: 6px 10px; }
@media (max-width: 700px) { .mail-compose .mc-hint, .mail-compose .mc-chat { display: none; } .mail-compose .mc-k { width: 56px; } }
#mail-list .mail-item { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; }
#mail-list .mail-item .mail-av { margin-top: 2px; }
.view-mail .mail-chips .chip.cat { border-style: solid; }
.view-mail .mail-chips .chip.cat:first-of-type { margin-left: 0; }
.view-mail .mail-tasks { max-height: 200px; overflow: auto; }
.mail-item.phish .ms { color: var(--no); }
.mail-phish { margin: 10px 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--no); background: color-mix(in srgb, var(--no) 10%, var(--bg)); color: var(--fg); font-size: 13.5px; line-height: 1.55; }
.mail-phish b { color: var(--no); }
.view-mail .mail-chips { gap: 4px 5px; }
.view-mail .mail-chips .brk { flex-basis: 100%; height: 0; }
.view-mail .mail-chips .chip, .view-mail .mail-chips .chip.cat { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 1px 9px; font-size: 12px; text-decoration: none; box-shadow: none; outline: 0; }
.view-mail .mail-chips .chip:hover { border-color: var(--acc); }
.view-mail .mail-chips .chip.on { background: var(--acc); border-color: var(--acc); color: #fff; }
/* 🛡 메일 보안 표시 · 외부 이미지 · 점검 미리보기 · 서명 */
.mail-sec { margin: 6px 0; font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mail-sec .sec-c { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); }
.mail-sec .sec-c.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.mail-sec .sec-c.bad { color: var(--no); border-color: var(--no); }
.mail-sec .sec-c.mut { color: var(--mut); }
.mail-sec .sec-w { flex-basis: 100%; margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--bg2); color: var(--warn); line-height: 1.6; }
.mail-sec .sec-w.hot { background: color-mix(in srgb, var(--no) 10%, var(--bg)); color: var(--no); }
.mail-imgbar { margin: 10px 0 0; font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail-compose .rv-pre { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.mail-compose .rv-pre .mut { display: inline-block; width: 64px; }
.mail-compose .rv-sig { margin: 4px 0 0; font: inherit; font-size: 12.5px; white-space: pre-wrap; color: var(--mut); }
.set .ma-sig { margin: 8px 0; } .set .ma-sig > summary { cursor: pointer; font-size: 13px; }
.set .ma-sig select, .set .ma-sig textarea { display: block; margin: 6px 0; width: 100%; max-width: 520px; box-sizing: border-box; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
/* 메일함 · 보낸편지함 · 수신 확인 */
.view-mail .mail-boxes { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.view-mail .mail-boxes .mbx { font-size: 12px; padding: 3px 8px; border-radius: 6px; color: var(--fg); text-decoration: none; }
.view-mail .mail-boxes .mbx:hover { background: var(--bg3); }
.view-mail .mail-boxes .mbx.on { background: var(--sel); font-weight: 700; }
.view-mail .mail-boxes .mbx-set { margin-left: auto; color: var(--mut); }
.view-mail .mail-chips[hidden] { display: none; }
.mail-item .rc { font-size: 11.5px; } .mail-item .rc.ok { color: var(--ok); font-weight: 600; }
.mail-rc { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: var(--bg2); font-size: 13px; }
.mail-rc table { margin-top: 6px; font-size: 12px; }
.mail-compose .mc-rcpt { font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; color: var(--mut); cursor: pointer; }
.mail-move, .mail-cat { max-width: 150px; }
.set .ma-rules { margin: 8px 0; } .set .ma-rules > summary { cursor: pointer; font-size: 13px; }
.set .ma-rules .mr-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; font-size: 13px; }
.set .ma-rules input, .set .ma-rules select { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
.set .ma-rules .mr-box { display: inline-flex; gap: 2px; align-items: center; padding: 1px 4px 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
.mail-route { margin: 6px 0; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail-why { font-size: 12px; margin-left: 6px; }
.mail-item.deal { border-left-color: #16a34a; } .mail-item.deal .mf { color: var(--ok); }

/* a document tab's header (path | toolbar on one row): the toolbar never grows past its group — with many buttons
   (mail: 답장·전달·AI·옮기기·중요 …) it scrolls sideways inside the group instead of drawing over the next group */
.epane { grid-template-columns: minmax(120px, 1fr) minmax(0, max-content); }
.epane .tab-actions { min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.epane .tab-actions::-webkit-scrollbar { display: none; }
.epane .tab-actions > * { flex-shrink: 0; }
@container eg (max-width: 680px) { .epane { grid-template-columns: minmax(0, 1fr); } }
/* 메일 v4 — 첨부 카드 · 헤더 ⋯ 메뉴 · 주고받은 메일 · 작성기 하단 · 첨부 추천 · 임시 보관함 */
.mail-atts .mail-att, .mail-atts-ed .mail-att { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); max-width: 360px; overflow: hidden; }
.mail-att .att-v { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 5px 8px 5px 5px; color: var(--fg); text-decoration: none; background: none; border: 0; font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.mail-att .att-v:hover { background: var(--bg3); }
.mail-att .att-v .an { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mail-att .att-v .mut { white-space: nowrap; font-size: 11.5px; }
.mail-att .att-d { align-self: stretch; display: grid; place-items: center; padding: 0 9px; border-left: 1px solid var(--line); color: var(--mut); text-decoration: none; font-size: 13px; }
.mail-att .att-d:hover { background: var(--bg3); color: var(--acc); }
.mail-att.big { border-style: dashed; }
.mail-atts-ed .mail-att { padding: 3px 4px 3px 5px; gap: 6px; font-size: 12.5px; }
/* header: labels → icons when the pane is narrow; the rest under ⋯ */
.epane .tab-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.epane .tab-actions::-webkit-scrollbar { display: none; }
.mail-acts { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.epane:has(.mail-doc) { container-type: inline-size; container-name: mailpane; }
@container mailpane (max-width: 720px) { .mail-acts .lbl { display: none; } }
.mail-more { position: relative; }
.mail-more > summary { list-style: none; cursor: pointer; font-size: 14px; padding: 2px 9px; border-radius: 5px; background: var(--bg3); line-height: 1.4; }
.mail-more > summary::-webkit-details-marker { display: none; }
.mail-more[open] > summary { background: var(--sel); }
.mail-more .mm-menu { position: fixed; z-index: 60; margin-top: 4px; min-width: 230px; padding: 6px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); transform: translateX(calc(-100% + 30px)); }
.mail-more .mm-menu button { text-align: left; }
.mail-more .mm-menu label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.mail-more .mm-menu select { max-width: 150px; }
/* 주고받은 메일 */
.mail-thread { margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.mail-thread > summary { cursor: pointer; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.mail-thread .th-i { display: grid; grid-template-columns: 88px minmax(110px, 200px) 1fr auto; gap: 10px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--fg); text-decoration: none; }
.mail-thread .th-i:hover { background: var(--bg3); }
.mail-thread .th-i.me { background: var(--sel); font-weight: 600; }
.mail-thread .th-i.out .th-w { color: var(--acc); }
.mail-thread .th-d { color: var(--mut); font-variant-numeric: tabular-nums; }
.mail-thread .th-w, .mail-thread .th-s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-thread .th-s { color: var(--mut); } .mail-thread .th-a { color: var(--mut); font-size: 11.5px; }
@media (max-width: 700px) { .mail-thread .th-i { grid-template-columns: 70px 1fr; } .mail-thread .th-s, .mail-thread .th-a { display: none; } }
/* composer: width · suggestions · bottom bar */
.mail-compose { transition: max-width .15s; }
.mail-compose .mc-width { margin-left: 8px; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; font-size: 11.5px; padding: 2px 8px; color: var(--mut); cursor: pointer; }
.mail-compose .mail-attsug { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 12.5px; }
.mail-compose .mail-attsug[hidden] { display: none; }
.mail-compose .mail-attsug .as-i { display: inline-flex; align-items: center; gap: 2px; border: 1px dashed var(--line); border-radius: 999px; padding: 1px 2px 1px 10px; max-width: 320px; }
.mail-compose .mail-attsug .as-i a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); text-decoration: none; }
.mail-compose .mail-attsug .as-add { padding: 0 7px; font-weight: 700; color: var(--acc); }
.mail-compose .mail-ainote { margin-top: 8px; padding: 6px 10px; border-left: 3px solid var(--acc); background: var(--bg2); font-size: 12.5px; }
.mail-compose .mail-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.mail-compose .mail-bar .mb-l { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mail-compose .mail-bar .mail-send { margin-right: 6px; height: 34px; padding: 0 16px; }
.mail-compose .mail-bar .mb-ic { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: none; font-size: 16px; cursor: pointer; padding: 0; }
.mail-compose .mail-bar .mb-ic:hover { background: var(--bg3); }
.mail-compose .mail-bar .mc-rcpt { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; height: 34px; padding: 0 8px; border-radius: 8px; font-size: 12.5px; color: var(--mut); cursor: pointer; white-space: nowrap; }
.mail-compose .mail-bar .mc-rcpt:hover { background: var(--bg3); }
.mail-compose .mail-bar .mc-rcpt input { margin: 0; }
.mail-compose .mail-bar .mail-msg { margin-left: 6px; font-size: 12px; }
.mail-compose .mail-bar .mc-chat { margin-left: auto; font-size: 11.5px; }
.mail-item.draft { position: relative; }
.mail-item.draft .dr-x { position: absolute; right: 6px; top: 6px; opacity: 0; padding: 0 6px; }
.mail-item.draft:hover .dr-x { opacity: 1; }
#mail-list .mail-item.here { background: var(--sel); }
.mail-item .mstar { border: 0; background: none; padding: 0 3px 0 0; font-size: 13px; cursor: pointer; opacity: .45; line-height: 1; }
.mail-item .mstar.on { opacity: 1; } .mail-item .mstar:hover { opacity: 1; transform: scale(1.15); }
.mail-star { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 1px 10px; font-size: 12.5px; cursor: pointer; margin-right: 6px; }
.mail-star.on { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, var(--bg)); font-weight: 600; }
/* 🤖 AI 분석 card (mail tab) */
.mail-insight { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.mail-insight .mi-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mail-insight .mi-top .mail-star { margin: 0; }
.mail-insight .mi-cat { padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.mail-insight .mi-why { color: var(--mut); }
.mail-insight .mi-ttl { margin-left: auto; color: var(--mut); font-size: 11.5px; }
.mail-insight .mi-sum { margin: 0; padding: 10px 14px 4px; font-size: 13.5px; line-height: 1.6; }
.mail-insight .mi-rows { padding: 4px 14px 8px; }
.mail-insight .mi-row, .mail-insight .mail-sec { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 13px; border-top: 1px dashed var(--line); margin: 0; background: none; }
.mail-insight .mi-row:first-child { border-top: 0; }
.mail-insight .mi-k { color: var(--mut); font-size: 12px; white-space: nowrap; }
.mail-insight .mi-v { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; line-height: 1.5; }
.mail-insight .mi-v .mail-buzz, .mail-insight .mi-btns button { font-size: 12px; padding: 3px 10px; }
.mail-insight .mi-st { color: var(--mut); font-size: 12px; }
.mail-insight .mi-btns { display: inline-flex; gap: 4px; }
.mail-insight .mi-src { flex-basis: 100%; font-size: 12px; color: var(--mut); }
.mail-insight .mi-src > summary { cursor: pointer; display: inline; } .mail-insight .mi-src[open] > summary { margin-right: 6px; }
.mail-insight .pill { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--bg3); color: var(--mut); }
.mail-insight .pill.hot, .mail-insight .pill.bad { background: color-mix(in srgb, var(--no) 15%, var(--bg)); color: var(--no); }
.mail-insight .pill.warm { background: color-mix(in srgb, #f59e0b 18%, var(--bg)); color: #b45309; }
.mail-insight .mail-sec { padding: 8px 14px; background: var(--bg2); border-top: 1px solid var(--line); }
.mail-insight .mail-sec .sec-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mail-insight .mail-sec .sec-w { grid-column: 2; margin: 2px 0 0; padding: 0; background: none; font-size: 12px; color: var(--warn); }
.mail-insight .mail-sec .sec-w.hot { color: var(--no); }
.mail-insight .mail-sec.hot { background: color-mix(in srgb, var(--no) 8%, var(--bg)); }
.mail-doc > .mail-head > .mail-sec { margin: 8px 0; }
@media (max-width: 600px) { .mail-insight .mi-row, .mail-insight .mail-sec { grid-template-columns: 1fr; gap: 2px; } .mail-insight .mail-sec .sec-w { grid-column: 1; } }
.mail-insight { container-type: inline-size; container-name: insight; }
.mail-star, .mail-star.on { color: var(--fg) !important; white-space: nowrap; }
.mail-insight button { white-space: nowrap; }
@container insight (max-width: 520px) {
  .mail-insight .mi-row, .mail-insight .mail-sec { grid-template-columns: 1fr; gap: 3px; }
  .mail-insight .mail-sec .sec-w { grid-column: 1; }
  .mail-insight .mi-ttl { display: none; }
}
.mail-from .mf-d { float: none; margin-left: 8px; }
.set .ma-ai { margin: 10px 0 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.set .ma-ai label { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.set .ma-ai select { max-width: 320px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
.set .ma-dl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin: 4px 0; }
/* 📅 메일 업무 — side link + its own tab */
.view-mail .mail-tasks { max-height: none; border: 0; background: none; margin: 0 8px 6px; }
.view-mail .mail-tasks .mt-link { display: block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 12.5px; color: var(--fg); text-decoration: none; }
.view-mail .mail-tasks .mt-link:hover { border-color: var(--acc); }
.view-mail .mail-tasks .mt-link .hot { color: var(--no); font-weight: 600; }
.mail-tasks-page { max-width: 900px; }
.mail-tasks-page .mt-group { margin: 18px 0; }
.mail-tasks-page .mt-group h3 { margin: 0 0 8px; font-size: 15px; }
.mail-tasks-page .mt-card { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: start; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.mail-tasks-page .mt-card.s-proposed { border-left: 3px solid #f59e0b; } .mail-tasks-page .mt-card.s-open { border-left: 3px solid var(--acc); }
.mail-tasks-page .mt-card.s-done { opacity: .65; }
.mail-tasks-page .mt-due { font-size: 13px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.mail-tasks-page .mt-title { font-weight: 600; font-size: 13.5px; }
.mail-tasks-page .mt-mail { display: block; margin-top: 3px; font-size: 12.5px; color: var(--mut); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tasks-page .mt-mail:hover { color: var(--acc); }
.mail-tasks-page .mt-why { font-size: 12px; margin-top: 3px; }
.mail-tasks-page .mt-route { margin-top: 4px; } .mail-tasks-page .mt-route button { font-size: 12px; padding: 2px 8px; }
.mail-tasks-page .pill { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--bg3); color: var(--mut); }
.mail-tasks-page .pill.hot, .mail-tasks-page .pill.bad { background: color-mix(in srgb, var(--no) 15%, var(--bg)); color: var(--no); }
.mail-tasks-page .pill.warm { background: color-mix(in srgb, #f59e0b 18%, var(--bg)); color: #b45309; }
.mail-tasks-page .mt-act { display: flex; gap: 4px; } .mail-tasks-page .mt-act button { white-space: nowrap; font-size: 12px; padding: 3px 10px; }
@media (max-width: 700px) { .mail-tasks-page .mt-card { grid-template-columns: 1fr; } }
.mail-tasks-page .mt-card { grid-template-columns: 140px minmax(0, 1fr) auto; }
.mail-tasks-page .mt-body { min-width: 0; }
.mail-tasks-page .mt-title, .mail-tasks-page .mt-why { overflow-wrap: anywhere; }
.mail-tasks-page .mt-act { flex: none; justify-self: end; }
@container mailtasks (max-width: 640px) { .mail-tasks-page .mt-card { grid-template-columns: 1fr; } .mail-tasks-page .mt-act { justify-self: start; } }
.mail-tasks-page { container-type: inline-size; container-name: mailtasks; }

/* mail: 대용량 첨부 (보내기) — link instead of inside the mail */
.mail-atts-ed .att-bigtag { margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent, #2563eb) 14%, transparent); color: var(--accent, #2563eb); white-space: nowrap; }
.mail-atts-ed .att-bignote { flex-basis: 100%; font-size: 12px; margin-top: 4px; }
.ma-big { margin-top: 10px; }
.ma-big summary { cursor: pointer; }
.ma-big .mb-list { margin-top: 6px; display: grid; gap: 4px; font-size: 13px; }
.ma-big .mb-i { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; border-top: 1px solid var(--line, #e5e7eb); }
.ma-big .mb-i .an { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ma-big .mb-i .mut { font-size: 12px; }

/* mail: 작성기 — full-bleed (fills the tab, no card) + 보내기 전 확인 dialog */
.doc.mail-doc { padding: 0; max-width: none; width: 100%; height: 100%; display: flex; flex-direction: column; }
.doc.mail-doc > .mail-html, .doc.mail-doc > .mail-head, .doc.mail-doc > .mail-imgbar { flex-shrink: 0; }   /* long header (phone) must not squeeze the body frame down to min-height */
.mail-doc .mail-compose { max-width: none !important; flex: 1; min-height: 100%; display: flex; flex-direction: column; gap: 0; background: var(--bg); }
.mail-doc .mail-compose .mc-rows { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.mail-doc .mail-compose .mc-row { padding: 2px 20px; min-height: 44px; }
.mail-doc .mail-compose .mc-k { width: 84px; }
.mail-doc .mail-compose .mail-suggest { padding: 6px 20px; }
.mail-doc .mail-compose .mc-tabs { border: 0; border-bottom: 1px solid var(--line); padding: 4px 14px 0; }
.mail-doc .mail-compose .mail-bodywrap { flex: 1; display: flex; flex-direction: column; border: 0; border-radius: 0; min-height: 260px; }
.mail-doc .mail-compose .mail-bodywrap textarea { flex: 1; min-height: 260px; height: 100%; border-radius: 0; resize: none; padding: 16px 20px !important; font-size: 15px; }
.mail-doc .mail-compose .mc-preview { flex: 1; padding: 16px 24px; }
.mail-doc .mail-compose .mc-drop { border-radius: 0; }
.mail-doc .mail-compose .mail-atts-ed { margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); }
.mail-doc .mail-compose .mail-attsug { margin: 0; padding: 8px 20px; border-top: 1px dashed var(--line); }
.mail-doc .mail-compose .mail-ainote { margin: 0 20px 8px; }
.mail-doc .mail-compose .mail-bar { position: sticky; bottom: 0; z-index: 3; margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); background: var(--bg2); }
@media (max-width: 700px) { .mail-doc .mail-compose .mc-row, .mail-doc .mail-compose .mail-bar, .mail-doc .mail-compose .mail-atts-ed, .mail-doc .mail-compose .mail-attsug { padding-left: 12px; padding-right: 12px; }
  .mail-doc .mail-compose .mail-bodywrap textarea { padding: 12px !important; } }

.mail-compose .mail-review { position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 16px; border: 0; border-radius: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; }
.mail-compose .mail-review[hidden] { display: none; }
.mail-review .rv-sheet { width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--bg); color: var(--fg); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); overflow: hidden; }
.mail-review .rv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.mail-review .rv-head b { font-size: 16px; }
.mail-review .rv-head .mut { font-size: 12.5px; margin-top: 2px; }
.mail-review .rv-body { overflow: auto; padding: 4px 20px 8px; }
.mail-review .rv-state { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.mail-review .rv-state.ok { background: color-mix(in srgb, #16a34a 12%, transparent); color: var(--fg); }
.mail-review .rv-state.warn { background: color-mix(in srgb, #f59e0b 16%, transparent); }
.mail-review .rv-state ul { margin: 6px 0 0; padding-left: 20px; }
.mail-review .rv-state li { margin: 2px 0; }
.mail-review .rv-sec { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.mail-review .rv-sec:last-child { border-bottom: 0; }
.mail-review .rv-sec h5 { margin: 0 0 8px; font-size: 12.5px; color: var(--mut); font-weight: 600; }
.mail-review .rv-r { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.mail-review .rv-k { color: var(--mut); font-size: 12.5px; }
.mail-review .rv-v { overflow-wrap: anywhere; }
.mail-review .rv-att { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 5px 0; }
.mail-review .rv-att .an { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-review .rv-att .mut { font-size: 12px; white-space: nowrap; }
.mail-review .rv-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--bg3); white-space: nowrap; }
.mail-review .rv-tag.big { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc); }
.mail-review .rv-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bg2); font-size: 12.5px; line-height: 1.6; }
.mail-review .rv-sub { font-size: 12px; color: var(--mut); margin: 6px 0 4px; }
.mail-review .rv-sig { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--bg2); font: inherit; font-size: 12.5px; white-space: pre-wrap; }
.mail-review .rv-bigbox { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; display: grid; gap: 3px; }
.mail-review .rv-fine { font-size: 12px; margin-top: 4px; }
.mail-review .rv-s { display: flex; flex-wrap: wrap; gap: 4px; }
.mail-review .rv-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg2); }
.mail-review .rv-foot button { height: 36px; padding: 0 18px; }
@media (max-width: 560px) { .mail-compose .mail-review { padding: 0; place-items: end stretch; } .mail-review .rv-sheet { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .mail-review .rv-att { grid-template-columns: auto minmax(0, 1fr) auto; } .mail-review .rv-att .mut { display: none; } }
.mail-review .rv-att .ft { font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 4px; background: var(--bg3); color: var(--mut); }
/* preview / long body: the body area grows with its content instead of shrinking under the bottom bar */
.mail-doc .mail-compose > *, .mail-doc .mail-compose .mail-bodywrap { flex-shrink: 0; }
.mail-doc .mail-compose .mail-bodywrap { flex: 1 0 auto; }
.mail-doc .mail-compose .mc-preview { overflow-wrap: anywhere; }

/* 📎 새 자료 분류 (/triage) */
.triage-page .tg-card { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 10px 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.triage-page .tg-card.focus { border-color: var(--accent, #4f46e5); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #4f46e5) 25%, transparent); }
.triage-page .tg-card.busy { opacity: .6; pointer-events: none; }
.triage-page .tg-card.s-done, .triage-page .tg-card.s-sent, .triage-page .tg-card.s-memo, .triage-page .tg-card.s-ignored { opacity: .75; }
.triage-page .tg-task { font-weight: 600; }
.triage-page .tg-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.triage-page .tg-text { width: 100%; box-sizing: border-box; font: inherit; }

/* ↓ 아래로 over the chat list while the owner reads above (chat.js) */
.hc-tobottom { position: absolute; z-index: 6; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font-size: 12.5px; box-shadow: 0 2px 10px rgba(0,0,0,.15); cursor: pointer; }
.hc-tobottom:hover { border-color: var(--acc); color: var(--acc); }
.hc-tobottom.live::after { content: " · 답변 중"; color: var(--acc); }
.hc-tobottom[hidden] { display: none; }
.tg-set { display: flex; flex-direction: column; gap: 8px; }
.tg-set label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tg-set select { max-width: 100%; }
/* 🔔 결재·입력 요청 still waiting: pinned on top */
.noti-list a.pending { border-left: 3px solid #e5484d; }
.noti-list a.pending .s::after { content: ""; }

/* toasts: bottom centre (top right covered the chat panel), stacked upward — newest nearest the status bar */
.toasts { top: auto; right: auto; left: 50%; bottom: calc(36px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); }
.tst.out { transform: translateY(12px); }
@keyframes tst-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* phones: at the top under the title bar (the keyboard and the chat box live at the bottom) */
@media (max-width: 900px) {
  .toasts { top: calc(56px + env(safe-area-inset-top, 0px)); bottom: auto; right: auto; left: 50%; width: calc(100vw - 16px); flex-direction: column-reverse; }
  .tst.out { transform: translateY(-12px); }
  .tst { animation-name: tst-in-top; }
}
@keyframes tst-in-top { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* 📱 phones: the chat composer is just [📎 | text box | ↑]; the model picker, ★, 🧩 PC and the context meter live in the
   chat header (static/chat-mobile.js moves them); 현재 화면 and the 📷 screenshot button are hidden */
@media (max-width: 700px) {
  .hc .hc-shot, .hc .hc-hint { display: none !important; }
  .hc .hc-ctx { font-size: 11.5px; padding: 0 4px 3px; }   /* phones: document title only (owner request) */
  .hc .hc-ctx-full { display: none; } .hc .hc-ctx-short { display: inline !important; }
  .hc .hc-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; column-gap: 6px; padding: 6px 6px 6px 4px; }
  .hc .hc-box > :not(.hc-inwrap):not(.hc-input):not(.hc-bar) { grid-column: 1 / -1; }   /* anything else (attachment chips …) takes a full row */
  .hc .hc-bar { display: contents; }
  .hc .hc-box .hc-attach { grid-column: 1; grid-row: 1; align-self: end; width: 40px; height: 42px; border: 0; background: none; font-size: 19px; padding: 0; }
  .hc .hc-box > .hc-inwrap, .hc .hc-box > .hc-input { grid-column: 2; grid-row: 1; min-width: 0; }   /* (chat.js wraps the box for its grey suggestion) */
  .hc .hc-box .hc-input { min-height: 42px; max-height: 40vh; padding: 9px 4px; }
  .hc .hc-box .hc-send, .hc .hc-box .hc-stop { grid-column: 3; grid-row: 1; align-self: end; }
  .hc-head { gap: 6px; }
  .hc-head .hc-status { font-size: 0; gap: 0; padding: 0 4px; flex: none; } .hc-head .hc-status .dots { font-size: 12px; }   /* 답변 중: the dots only */
  .hc-head .hc-sess { min-width: 0; flex: 0 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .hc-head-tools { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
  .hc-head-tools .hc-model { flex: 0 1 auto; min-width: 96px; max-width: 42vw; height: 32px; font-size: 13px !important; padding: 0 6px; border-radius: 9px; }
  .hc-head-tools .hc-setdef { font-size: 0; height: 32px; padding: 0 9px; } .hc-head-tools .hc-setdef::before { content: "★"; font-size: 14px; }
  .hc-head-tools .hc-pc { height: 32px; padding: 0 8px; font-size: 12px; }
  .hc-head-tools .hc-ctxm span { display: none; } .hc-head-tools .hc-ctxm i { width: 28px; }
}
/* 📱 the composer's swipe-up panel (chat-mobile.js): a grip, 현재 화면 · 📷 · 📎, and a big text box */
.hc-grip, .hc-mpanel { display: none; }
@media (max-width: 700px) {
  .hc-grip { display: block; width: 44px; height: 14px; margin: 0 auto 2px; padding: 0; border: 0; background: none; position: relative; }
  .hc-grip::before { content: ""; position: absolute; left: 7px; right: 7px; top: 5px; height: 4px; border-radius: 2px; background: var(--line); }
  .hc-grip.on::before { background: var(--acc); }
  .hc-mpanel:not([hidden]) { display: block; margin: 0 2px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); }
  .hc-mpanel .mp-here { font-size: 12.5px; color: var(--mut); padding: 0 2px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .hc-mpanel .mp-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .hc .hc-mpanel .mp-row button { flex: 1 1 0; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
    color: var(--fg) !important; font-size: 13.5px !important; line-height: 1.2; padding: 0 6px; white-space: nowrap; text-indent: 0; }
  .hc.m-big .hc-box .hc-input { min-height: 40vh; max-height: 60vh; }
}
/* 📱 chat header: no conversation title (☰ only — the model picker sits there); the list: ✕ always, swipe left = 삭제 */
@media (max-width: 700px) {
  .hc-head .hc-sess .hc-title { display: none; }
  .hc-head .hc-sess { flex: none; }
  .hc-list li { position: relative; overflow: hidden; }
  .hc-list li > a { flex: 1 1 auto; min-width: 0; transition: transform .18s ease; }
  .hc-list .x { display: none; }   /* 📱 no ✕ in the row (owner 2026-11-03): a swipe left shows 삭제 */
  .hc-list li { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }   /* a long press = the row's menu, not text selection */
  .hc-list .hc-rn input { -webkit-user-select: text; user-select: text; }
  .hc-list .hc-rn input { height: 36px; font-size: 15px; } .hc-list .hc-rn .icon { width: 40px; height: 40px; font-size: 17px; }
  .hc-list li.rn-on .x { display: none; }
  .hc-list li.sw > a { transform: translateX(-72px); }
  .hc-list li.sw .x { display: flex; align-items: center; justify-content: center; position: absolute; right: 0; top: 0; bottom: 0; height: auto; width: 76px; opacity: 1; border-radius: 0;
    background: var(--no, #dc2626); color: #fff; font-size: 0; }
  .hc-list li.sw .x::before { content: "삭제"; font-size: 15px; font-weight: 600; }
}

/* the chat's tab strip has its own ＋ (새 대화 탭): the header's ＋ steps aside while the strip shows */
.hc:has(> .hc-tabs:not([hidden])) > .hc-head .hc-new { display: none; }

/* 📱 phones: text and touch targets big enough to read and hit (≈14–16px text, ≈40px targets) */
@media (max-width: 700px) {
  .hc .hm-body { font-size: 16px; line-height: 1.65; }
  .hc .hm-meta { font-size: 14px; }
  .hc .hc-steps summary, .hc .st-line { font-size: 14px; min-height: 40px; }
  .hc .st-note, .hc .st-think .st-line { font-size: 14px; }
  .hc .hm-act { flex-wrap: nowrap; gap: 2px; max-width: 100%; }   /* (buttons shrink rather than push the row past the screen) */
  .hc .hm-act button { flex: 0 1 44px; min-width: 0; min-height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .hc .hm-act .hm-ic { display: block; } .hc .hm-act .hm-lb { display: none; }
  .hc .steps-list li { font-size: 15.5px; padding: 10px 12px; }
  .hc .steps-go { font-size: 15px; min-height: 42px; padding: 0 18px; }
  .hc .hm-review { font-size: 13.5px; }
  .hc .hm-src { font-size: 13.5px; } .hc .hm-src-b { font-size: 14px; padding: 5px 12px; max-width: 100%; }
  .hc .hc-open-b { font-size: 14px; min-height: 36px; padding: 0 12px; }
  .hc .hc-head .icon { width: 40px; height: 40px; font-size: 18px; } .hc .hc-head .icon svg { width: 20px; height: 20px; }
  .hc .hc-head .hc-sess { font-size: 18px; min-height: 40px; padding: 0 8px; }
  .hc-head-tools .hc-model { height: 36px; font-size: 14px !important; }
  .hc-head-tools .hc-setdef, .hc-head-tools .hc-pc { height: 36px; } .hc-head-tools .hc-setdef::before { font-size: 16px; } .hc-head-tools .hc-pc { font-size: 13px; }
  .hc .hc-tab { font-size: 14px; min-height: 40px; max-width: 190px; padding: 6px 8px 6px 10px; }
  .hc .hc-tab .x { opacity: .8; font-size: 15px; padding: 4px 6px; }
  .hc .hc-tab-new, .hc .hc-tab-more { font-size: 20px; min-width: 40px; }
  .hc .hc-list .s { font-size: 13px; }
  /* editor tabs and the document toolbar */
  .etab { font-size: 14px; min-height: 40px; } .etab .ex { width: 30px; height: 30px; font-size: 18px; visibility: visible; }
  .epane .tab-actions a, .epane .tab-actions button, .epane .tab-actions select { font-size: 14px; min-height: 36px; }
  .epane > .crumbs { font-size: 13.5px; }
}

/* 📱 phones: the AI chat's bottom input (.hc-composer) is never hidden — no fold (chide), no bars-out, no immersive slide.
   It only changes size (chat-mobile.js: swipe up / grip = big, idle 4 s or swipe down = small bar). */
@media (max-width: 900px) {
  html .hc > .hc-composer.hc-composer.hc-composer {
    opacity: 1 !important; transform: none !important; display: block !important; visibility: visible !important;
    max-height: none !important; min-height: 0 !important; height: auto !important; overflow: visible !important;
    border-width: 0 !important; padding-top: 6px !important; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
  html.imm .hc > .hc-composer.hc-composer.hc-composer { position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; z-index: 35; background: var(--bg); }
}

/* 📱 composer size change animates: the text box grows/shrinks smoothly, the tool panel fades/slides in and out */
@media (max-width: 900px) {
  .hc .hc-box .hc-input { transition: min-height .28s cubic-bezier(.2,.8,.2,1), max-height .28s cubic-bezier(.2,.8,.2,1); }
  .hc .hc-grip::before { transition: background-color .25s ease; }
  .hc .hc-mpanel:not([hidden]) { animation: mpanel-in .28s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom center; }
  @keyframes mpanel-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .hc .hc-box .hc-input, .hc .hc-grip::before, .hc .hc-mpanel:not([hidden]) { transition: none !important; animation: none !important; }
}

/* 📱 phones: a roomier composer — a bigger text box, equal top/bottom padding, and the grey autocomplete lines up with the typed text */
@media (max-width: 900px) {
  html .hc > .hc-composer.hc-composer.hc-composer { padding-top: 8px !important; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
  .hc .hc-box { padding: 10px 10px 10px !important; }
  /* one line = 24px text + 14px top + 14px bottom = 52px exactly → no leftover space under the text */
  .hc .hc-box { align-items: center !important; padding: 6px 8px !important; }
  .hc .hc-box .hc-input { min-height: 52px; max-height: 40vh; font-size: 16px; line-height: 24px; padding: 14px 4px; }
  .hc .hc-box .hc-attach, .hc .hc-box .hc-send, .hc .hc-box .hc-stop { align-self: center !important; }
  .hc .hc-box .hc-inwrap { display: block; }
  .hc .hc-ghost { white-space: pre-wrap; overflow: hidden; }
  .hc .hc-ghost .g-key { font-size: 12px; line-height: 18px; }
  .hc.m-big .hc-box .hc-input { min-height: 42vh; max-height: 60vh; }
}
/* 📱 AI 채팅: no ☰ button — the conversation list is a full-width sheet rising from the bottom, opened by a swipe up on the
   input box or the 새 대화 pill (mshell.js), closed by a sideways swipe (app.js) or tapping outside it */
@media (max-width: 900px) {
  html .hc > .hc-head .hc-sess { display: none !important; }
  /* full width, rising from the bottom (owner 2026-11-03) */
  html .hc > .hc-drawer:not([hidden]) { left: 0; right: 0; width: auto; top: 50px; bottom: 0;
    max-height: none; border-radius: 16px 16px 0 0; border: 0; border-top: 1px solid var(--line); box-shadow: 0 -12px 32px rgba(0,0,0,.2);
    animation: ms-dup .32s cubic-bezier(.2,.8,.2,1) both; }
  html.imm .hc > .hc-drawer:not([hidden]) { top: 0; }
  html.max-aux .hc > .hc-drawer:not([hidden]) { display: flex !important; }
}
/* 📱 작업공간 ↔ 채널 swipe (app.js seg): the other side's page beside the conversation, and the still copy that slides out */
   /* 작업공간 ↔ 채널 sliding: the pill shows again once it has arrived */
.hc-title.ms-tfade { animation: ms-tfade .32s ease; }
@keyframes ms-tfade { from { opacity: 0; } to { opacity: 1; } }
/* 📱 the list opened by a swipe up (mshell.js openConvList): rises from the bottom */
@keyframes ms-dup { from { transform: translateY(100%); opacity: .5; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) {
  html .hc > .hc-drawer.ms-dup:not([hidden]) { animation: ms-dup .3s cubic-bezier(.2,.8,.2,1) both !important; }
}
@media (prefers-reduced-motion: reduce) { html .hc > .hc-drawer.ms-dup:not([hidden]) { animation: none !important; } }

/* 📱 phones: ☰ menu = floating button at the bottom-left; the header ☰ is gone; hidden while the menu (drawer / rail) is open */
.m-fab { display: none; }
@media (max-width: 700px) {
  .titlebar .m-menu { display: none !important; }
  .m-fab { display: grid; place-items: center; position: fixed; z-index: 40; left: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--fab-lift, 0px));
    width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--acc, #2563eb);
    box-shadow: 0 6px 18px rgba(0,0,0,.28); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: transform .18s ease, opacity .18s ease; }
  .m-fab:active { transform: scale(.92); }
  html.m-sb:not(.v-messenger) .m-fab, html.m-rail .m-fab, html.kb-open .m-fab { opacity: 0; transform: scale(.6); pointer-events: none; }
  /* room so the button never covers the last line of a list */
  .home > .dash { flex: 0 0 auto; padding-bottom: 84px; }
}

/* 📱 phones: the Inbox dashboard has no sideways scroll — 프로젝트 현황 rows become cards (label above each number) */
@media (max-width: 700px) {
  .home, .home .ov, .home .ov-body { max-width: 100%; overflow-x: hidden; }
  .ov-scroll { overflow-x: hidden; }
  .ov-t, .ov-t tbody { display: block; width: 100%; }
  .ov-t thead { display: none; }
  .ov-t tbody tr:not(.ov-sum) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 6px; padding: 8px 10px 4px; border-top: 1px solid var(--line); }
  .ov-t tbody tr:not(.ov-sum) > th { grid-column: 1 / -1; position: static; padding: 2px 0 6px; border: 0; background: none; }
  .ov-t tbody tr:not(.ov-sum) > td { padding: 4px 0; border: 0; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  .ov-t tbody tr:not(.ov-sum) > td::before { display: block; font-size: 11px; color: var(--mut); font-weight: 600; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(1)::before { content: "문서"; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(2)::before { content: "자료실"; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(3)::before { content: "AI 채팅"; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(4)::before { content: "채널 (7일)"; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(5)::before { content: "담당자"; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(6)::before { content: "토큰 (7일)"; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(7)::before { content: "대기"; }
  .ov-t tbody tr:not(.ov-sum) > td:nth-of-type(5) { grid-column: span 2; }
  .ov-t tr.ov-sum { display: block; }
  .ov-t tr.ov-sum td { display: block; padding: 2px 10px 10px; }
  .ov-sum-col { flex: 1 1 100%; }
  .ov-sum-col div, .ov-c span, .ov-c b { overflow-wrap: anywhere; }
}

/* 📱 AI 채팅 open: no 📎 in the box; the input box is narrower and the ☰ button docks at its left (app.js: html.fab-dock, --fab-dock).
   Big composer = the phone's photos/videos (chat-mobile.js .mp-gal) */
@media (max-width: 700px) {
  .hc .hc-box .hc-attach { display: none !important; }
  .hc .hc-box { grid-template-columns: minmax(0, 1fr) auto !important; }
  .hc .hc-box > .hc-inwrap, .hc .hc-box > .hc-input { grid-column: 1 !important; }
  .hc .hc-box .hc-send, .hc .hc-box .hc-stop { grid-column: 2 !important; }
  html.fab-dock .hc > .hc-composer > .hc-box { margin-left: 62px; }   /* only the input row makes room for ☰; the gallery panel keeps the full width */
  /* ☰ sits exactly where it sits on the content panels (left 14px · bottom 16px · 52px) */
  html.fab-dock .m-fab { left: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; }
  html.fab-dock.kb-open .m-fab { opacity: 1; transform: none; pointer-events: auto; }
  html.fab-dock.m-sb .m-fab, html.fab-dock.m-rail .m-fab { opacity: 0; transform: scale(.6); pointer-events: none; }
  .hc-mpanel .mp-gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: 34vh; overflow-y: auto; margin-bottom: 8px; }
  .hc .hc-mpanel .mp-gal > button { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    background: var(--bg); color: var(--fg) !important; font-size: 12.5px !important; text-indent: 0; min-height: 0; }
  .hc-mpanel .mp-gadd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-style: dashed !important; }
  .hc-mpanel .mp-gadd b { font-size: 22px; line-height: 1; font-weight: 400; }
  .hc-mpanel .mp-gi img, .hc-mpanel .mp-gi video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
  .hc-mpanel .mp-gi .mp-vid { position: absolute; left: 5px; bottom: 4px; font-style: normal; font-size: 11px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
  .hc-mpanel .mp-gi .mp-ck { position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
    background: rgba(0,0,0,.25); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
  .hc-mpanel .mp-gi.sel { outline: 3px solid var(--acc, #2563eb); outline-offset: -3px; }
  .hc-mpanel .mp-gi.sel .mp-ck { background: var(--acc, #2563eb); }
  .hc-mpanel .mp-gi:not(.sel) img, .hc-mpanel .mp-gi:not(.sel) video { opacity: .55; }
  .hc .hc-mpanel .mp-row .mp-attach { background: var(--acc, #2563eb); border-color: transparent; color: #fff !important; font-weight: 600; }
  .hc .hc-mpanel .mp-row .mp-attach:disabled { opacity: .45; }
  .hc.m-big .hc-box .hc-input { min-height: 18vh !important; }
}

/* phones: JuiceSSH-style key bar under the terminal and the shared browser (app.js InboxKeyBar) */
.kbar { flex: none; display: flex; flex-direction: column; gap: 3px; padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background: #3d5257; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.kbar-r { display: flex; gap: 3px; }
.kbar button { flex: 1 1 0; min-width: 0; height: 34px; padding: 0 2px; border: 0; border-radius: 4px; background: #5b7479; color: #fff; font: 600 12px/1 ui-monospace, Menlo, monospace; letter-spacing: -.2px; -webkit-tap-highlight-color: transparent; }
.kbar button.nar { flex: .55 1 0; }
.kbar button:active, .kbar button.on { background: #8fb3b8; color: #102326; }
.term-page.has-kbar .term-view { padding-bottom: 2px; }
/* phones: a tap on the terminal folds the header and the key bar together (html.ahide · focus mode: html.kbhide) */
@media (max-width: 900px) { html.ahide:not(.imm) .kbar, html.imm.kbhide .kbar { display: none; } .term-page .term-view, .term-page .xterm-screen { touch-action: none; } }
.br-view.has-kbar { display: flex; flex-direction: column; }
.br-hint .lv-kbd.on { border-color: var(--acc, #8b83f7); color: var(--acc, #8b83f7); }

/* 📱 phones: the chat has ONE header row — the AI tab strip (AI · ⤢ · ✕) is gone; ✕ moves into the chat header
   (chat-mobile.js), next to the model picker */
@media (max-width: 700px) {
  html .aux > .aux-tabs { display: none !important; }
  .hc-head .hc-mclose { flex: none; }
}

/* 📱 대화 목록 시트: ＋ 새 대화 button at the top of the list */
.hc-dnew { display: none; }
.hc-dfoot { display: none; }
.hc-qhide { display: none !important; }   /* a list row the 🔍 검색 leaves out */
@media (max-width: 900px) {
  .hc-drawer .hc-dhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  /* every list ends in a floating bar: [🔍 검색 · ＋ 새 대화 / ＋ 채널 만들기] (chat.js .hc-dfoot, owner 2026-11-03) */
  .hc-drawer > .hc-dfoot { display: flex; align-items: center; gap: 8px; position: absolute; z-index: 5; left: 12px; right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)); pointer-events: none; animation: fadein .2s ease; }
  .hc-dfoot > * { pointer-events: auto; }
  .hc-dq { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 25px;
    background: var(--bg); box-shadow: 0 6px 18px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.08); color: var(--mut); }
  .hc-dq:focus-within { border-color: var(--acc); }
  .hc-dq input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--fg); font-size: 16px; }
  .hc-dfoot > .hc-dnew { flex: none; display: inline-flex; align-items: center; gap: 6px; position: static; width: auto; height: 50px;
    padding: 0 18px; margin: 0; border: 0; border-radius: 25px; background: var(--acc, #2563eb); color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12); -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
  .hc-dfoot > .hc-dnew[hidden] { display: none; }
  .hc-dfoot > .hc-dnew:active { transform: scale(.96); }
  .hc-drawer .hc-list { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }   /* the last row clears the bar */
     /* its button floats: nothing left to show until the form opens */
}
/* 📱 대화 목록 top right: ⇆ 좌우로 밀어 닫기 · ✕ (chat.js) in place of "고르면 이어서 대화합니다" */
.hc-dtr { display: none; }
@media (max-width: 900px) {
  .hc-drawer .hc-dhead > .mut { display: none; }
  .hc-drawer .hc-dhead > b { order: 0; }
  .hc-drawer .hc-dtr { display: flex; align-items: center; gap: 6px; order: 1; margin-left: auto; }
  .hc-dhint { font-size: 12px; color: var(--mut); white-space: nowrap; }
  .hc-dclose { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--fg); font-size: 16px; line-height: 1; cursor: pointer; }
  .hc-dclose:active { background: var(--bg3); }
}
@media (max-width: 700px) {   /* the phone's focus mode (max-aux) stacks the head: keep title · ✕ on one row */
  html.max-aux .hc-drawer .hc-dhead { flex-direction: row; flex-wrap: wrap; align-items: center; }
  html .hc > .hc-drawer.ms-ddown:not([hidden]) { animation: ms-ddown .24s cubic-bezier(.4,0,.8,.4) both !important; }
}
@keyframes ms-ddown { from { transform: none; opacity: 1; } to { transform: translateY(100%); opacity: .5; } }
/* 📱 대화 목록 시트: opaque (no chat text bleeding through), the ☰ FAB hidden while it is open, room at the bottom */
@media (max-width: 900px) {
  html .hc > .hc-drawer:not([hidden]) { background: var(--bg2) !important; }
  html .hc > .hc-drawer:not([hidden]) .hc-list { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  html:has(.apane-hermes .hc-drawer:not([hidden])) .m-fab { opacity: 0 !important; pointer-events: none !important; }
}

/* 📱 big composer: 갤러리 · 촬영 · 파일 = round buttons stacked above the ☰ FAB (chat-mobile.js .m-acts);
   picked files attach at once. No gallery panel, no 첨부 / ↕ 작게 buttons. */
.m-acts { display: none; }
@media (max-width: 700px) {
  .hc-mpanel { display: none !important; }
  .m-acts:not([hidden]) { display: flex; flex-direction: column; gap: 10px; position: fixed; z-index: 41; left: 14px;
    bottom: calc(16px + 52px + 12px + env(safe-area-inset-bottom, 0px)); animation: m-acts-in .2s ease both; }
  .m-acts button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg2); color: var(--fg);
    box-shadow: 0 4px 14px rgba(0,0,0,.22); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .m-acts button b { font-size: 19px; line-height: 1; font-weight: 400; }
  .m-acts button span { font-size: 10px; line-height: 1.1; }
  .m-acts button:active { transform: scale(.92); }
  .m-acts.busy button { opacity: .45; pointer-events: none; }
  html:not(.fab-dock) .m-acts, html.m-sb .m-acts, html.m-rail .m-acts { display: none !important; }
}
@keyframes m-acts-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .m-acts:not([hidden]) { animation: none; } }

/* 📱 big composer, GPT-style: grey round buttons (no border, white outline icons) 카메라 · 사진 · 파일 above ☰;
   the big text box is exactly as tall as that icon column (chat-mobile.js fitBig → --big-h) */
@media (max-width: 700px) {
  .m-acts:not([hidden]) { gap: 12px; }
  .m-acts button { width: 52px; height: 52px; border: 0; background: #3a3a3a; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
  .m-acts button svg { display: block; width: 24px; height: 24px; }
  html .hc.m-big .hc-box .hc-input { min-height: var(--big-h, 18vh) !important; max-height: var(--big-h, 60vh) !important; height: var(--big-h, auto) !important; }
}

/* keyboard clipboard-panel images: Chromium on Android hands the keyboard's image to a textarea only when it is
   marked rich-editable (-webkit-user-modify: read-write) — the image then arrives as a paste event with the file. */
@media (max-width: 900px) { .hc-input { -webkit-user-modify: read-write; } }

.hc-ctx-short { display: none; }   /* desktop shows the full 📍 현재 화면 line */

/* AI 채팅 as an editor tab (/chat): fills the pane like a 메신저 tab; splits · moves · resizes with the editor groups */
.chat-tab { height: 100%; min-height: 0; display: flex; }
.chat-tab > .hc { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.chat-tab > .hc .hc-log { flex: 1; min-height: 0; overflow-y: auto; }
.chat-tab > .hc .hc-composer { flex: none; }
.hc-totab { font-size: 15px; line-height: 1; }

/* ═══ 📱 phones (≤700px) — owner 2026-10-28: header only on pull-down, no tab strip (bottom→top tab sheet),
   big floating ☰ that turns into ⚙ while the menu is open, menu panels full screen ═══ */
@media (max-width: 700px) {
  /* header: hidden until pulled down (html.m-head), then it floats over the content */
  html.m-phone .app { grid-template-rows: 0px minmax(0, 1fr) 0px !important; }
  /* the fixed titlebar leaves the grid flow, so pin the workbench to the 1fr row (else it auto-places into the 0px row) */
  html.m-phone .app > .workbench { grid-row: 2; }
  html.m-phone body:not(.solo) .titlebar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: calc(52px + env(safe-area-inset-top, 0px));
    overflow: visible !important; border-bottom: 1px solid var(--line) !important; box-shadow: 0 6px 20px rgba(0,0,0,.18);
    transform: translateY(-110%); transition: transform .22s ease; }
  html.m-phone.m-head body:not(.solo) .titlebar { transform: none; }
  /* everything that used to sit under the header starts at the top */
  html.m-phone.m-sb .sidebar, html.m-phone.m-sb .activity, html.m-phone.m-aux .aux, html.m-phone .m-backdrop { top: 0 !important; }
  html.m-phone .hc > .hc-drawer:not([hidden]) { top: 50px; }
  /* no tab strip on phones — the tab sheet replaces it */
  html.m-phone .egroup > .etabs { display: none !important; }
  /* menu: each panel full screen (rail 56px + panel to the right edge) */
  html.m-phone.m-sb .sidebar { left: 56px !important; right: 0 !important; width: auto !important; max-width: none !important; box-shadow: none; }
  html.m-phone.m-sb.v-messenger .sidebar { left: 0 !important; }
  html.m-phone.m-sb:not(.v-messenger) .m-backdrop { display: none !important; }
  html.m-phone.m-sb .activity { padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  /* the header pulled down pushes the full-screen panels below it (the chat header stays reachable) */
  html.m-phone.m-head.m-sb .sidebar, html.m-phone.m-head.m-sb .activity, html.m-phone.m-head.m-aux .aux { top: calc(52px + env(safe-area-inset-top, 0px)) !important; transition: top .22s ease; }
  html.m-phone.m-sb .sidebar .pane-head { padding-top: env(safe-area-inset-top, 0px); }
  /* the floating menu button: bigger, always there, ⚙ while the menu is open */
  html.m-phone .m-fab { width: 60px !important; height: 60px !important; left: 16px !important; z-index: 70;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px) + var(--fab-lift, 0px)) !important; }
  html.m-phone.fab-dock .m-fab { bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important; }
  html.m-phone .m-fab svg { width: 28px; height: 28px; }
  html.m-phone .m-fab .fab-gear { display: none; }
  html.m-phone.m-sb:not(.v-messenger) .m-fab, html.m-phone.fab-dock.m-sb:not(.v-messenger) .m-fab { opacity: 1 !important; transform: none !important; pointer-events: auto !important; background: #3a3a3a; }
  html.m-phone.m-sb:not(.v-messenger) .m-fab .fab-menu { display: none; }
  html.m-phone.m-sb:not(.v-messenger) .m-fab .fab-gear { display: block; animation: fabspin .3s ease; }
  html.m-phone.fab-dock .hc > .hc-composer > .hc-box { margin-left: 70px; }
  html.m-phone .m-acts { bottom: calc(14px + 60px + 12px + env(safe-area-inset-bottom, 0px)) !important; left: 20px !important; }
  /* the menu's own lists leave room for the button */
  html.m-phone.m-sb .sidebar .pane-body, html.m-phone.m-sb .sidebar .items { padding-bottom: 92px; }
  /* the open-tabs sheet (bottom → top) */
  .m-tabsheet { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,0); transition: background .2s ease; display: flex; align-items: flex-end; }
  .m-tabsheet[hidden] { display: none; }
  .m-tabsheet.in { background: rgba(0,0,0,.4); }
  .mts-card { width: 100%; max-height: 86dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .m-tabsheet.in .mts-card { transform: none; }
  .mts-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 4px; }
  .mts-head { display: flex; align-items: center; gap: 8px; padding: 6px 14px 10px; border-bottom: 1px solid var(--line); }
  .mts-head b { flex: 1; font-size: 16px; } .mts-n { color: var(--mut); font-weight: 500; }
  .mts-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
  .mts-modes button, .mts-closeall { height: 34px; padding: 0 10px; border: 0; background: var(--bg); color: var(--fg); font: inherit; font-size: 13.5px; }
  .mts-modes button.on { background: var(--acc); color: #fff; }
  .mts-closeall { border: 1px solid var(--line); border-radius: 9px; color: var(--mut); }
  .mts-body { overflow-y: auto; padding: 8px 10px 16px; -webkit-overflow-scrolling: touch; }
  .mts-it { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 44px 8px 10px; border-radius: 12px; }
  .mts-it.on { background: color-mix(in srgb, var(--acc) 14%, transparent); }
  .mts-ic { font-size: 20px; flex: none; width: 28px; text-align: center; }
  .mts-t { display: flex; flex-direction: column; min-width: 0; }
  .mts-t b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mts-t i { font-style: normal; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mts-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--mut); font-size: 16px; }
  .mts-body.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mts-body.grid .mts-it { flex-direction: column; align-items: stretch; gap: 6px; min-height: 0; height: 172px; padding: 10px; border: 1px solid var(--line); background: var(--bg2); overflow: hidden; }
  .mts-body.grid .mts-it.on { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 40%, transparent); }
  .mts-body.grid .mts-ic { text-align: left; }
  .mts-body.grid .mts-x { top: 4px; transform: none; width: 34px; height: 34px; }
  .m-tabsheet .mts-body.grid .mts-it .mts-pv { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 4; flex: none; overflow: hidden; font-size: 11.5px; line-height: 16px; height: 64px; max-height: 64px; color: var(--mut); overflow-wrap: anywhere; }
}
@keyframes fabspin { from { transform: rotate(-90deg); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mts-card, html.m-phone .titlebar, .m-tabsheet { transition: none !important; } html.m-phone .m-fab .fab-gear { animation: none !important; } }

/* ═══ 📱 phone shell (≤700px, owner 2026-10-29 — static/mshell.js, chat-mobile.js) ═══
   main panel = the open tab between a fixed header [⚙ | kind · title | ⋮] and a fixed footer of four tabs
   [메뉴 · 문서함 · 탭 · 알림] (titles only; swiped up = a sheet, ←/→ between its tabs). 메신저 ← · → AI 채팅 are
   full screen over it. Both composers: one line [＋ | text | ↑], two tiers (text / tool row) while typing.
   Replaces the pull-down header, the ☰ FAB, the bottom-swipe tab sheet and the big-composer buttons. */
.ms-head, .ms-foot, .ms-dim, .ms-tools, .ms-tabline, .m-plus, .m-att { display: none; }
@media (max-width: 700px) {
  html.mshell { --msh: calc(48px + env(safe-area-inset-top, 0px)); --msf: calc(22px + env(safe-area-inset-bottom, 0px)); }   /* 하단 서랍: 닫혀 있을 때는 손잡이만 (owner 2026-11-08) */
  html.mshell.mshell .app { grid-template-rows: var(--msh) minmax(0, 1fr) var(--msf) !important; }
  html.mshell .app > .workbench { grid-row: 2; }
  html.mshell body:not(.solo) .titlebar, html.mshell .m-fab, html.mshell .m-acts, html.mshell .m-tabsheet { display: none !important; }
  html.mshell .epane .tab-actions { display: none !important; }        /* the tab's tools live under ⋮ */
  /* header */
  html.mshell .ms-head { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; align-items: center; position: fixed; top: 0; left: 0; right: 0; z-index: 29;
    height: var(--msh); padding-top: env(safe-area-inset-top, 0px); background: var(--bg); border-bottom: 1px solid var(--line); }
  .ms-hb { width: 44px; height: 44px; margin: 0 3px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--fg); display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
  .ms-hb:active, .ms-title:active { background: var(--bg3); }
  html.ms-tools-on .ms-more { background: var(--bg3); }
  .ms-title { min-width: 0; height: 44px; padding: 0 6px; border: 0; border-radius: 12px; background: none; color: var(--fg); display: flex; flex-direction: column;
    align-items: center; justify-content: center; line-height: 1.2; -webkit-tap-highlight-color: transparent; }
  .ms-kind { font-style: normal; font-size: 11.5px; color: var(--mut); white-space: nowrap; }
  .ms-t { max-width: 100%; font-size: 15.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* the AI 채팅 (작업공간 · 채널) and the 메신저 under the same header as a document (owner 2026-11-08): their own header bars go,
     their buttons are under ⋮ (mshell.js openTools) */
  html.mshell:not(.mst).m-aux .ms-head, html.mshell:not(.mst).m-sb.v-messenger .ms-head { z-index: 47; }
  html.mshell.m-phone:not(.mst).m-aux .aux, html.mshell.m-phone:not(.mst).m-sb.v-messenger .sidebar { top: var(--msh) !important; }
  html.mshell:not(.mst) .aux .hc > .hc-head, html.mshell:not(.mst).m-sb.v-messenger .view-messenger .pane-head { display: none !important; }
  html.mshell:not(.mst) .aux .hc > .hc-drawer:not([hidden]) { top: 0 !important; }
    .ms-tools .ms-hcx .hc-aa { display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; height: auto !important; min-height: 46px; margin: 2px 0 !important; padding: 4px 8px !important; border-radius: 12px !important; position: static !important; }
  .ms-tools .ms-hcx .hc-aa button { width: auto !important; min-height: 36px !important; }
  .ms-tools .ms-hcx button.icon { display: flex !important; align-items: center; gap: 10px; }
  .ms-tools .ms-tl { font-size: 15px; }
  /* ⋮ the tab's tools */
  html.mshell .ms-tools:not([hidden]) { display: flex; flex-direction: column; gap: 2px; position: fixed; z-index: 62; top: calc(var(--msh) + 4px); right: 8px; width: min(80vw, 310px);
    max-height: 72dvh; overflow-y: auto; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.28); animation: fadein .12s ease; }
  .ms-tools .tab-actions { display: flex !important; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px; overflow: visible; padding: 0; margin: 0; border: 0; background: none; position: static; transform: none; max-height: none; opacity: 1; }
  .ms-tools .tab-actions > *, .ms-tools .tab-actions span { flex-wrap: wrap; }
  .ms-tools a, .ms-tools button, .ms-tools select { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px;
    background: none; color: var(--fg); font-size: 15px; text-align: left; text-decoration: none; gap: 8px; }
  .ms-tools .tab-actions :is(a, button, select) { width: 100% !important; max-width: none !important; min-height: 44px !important; margin: 0 !important; padding: 8px 12px !important;
    border: 0 !important; border-radius: 10px !important; background: none !important; color: var(--fg) !important; font-size: 15px !important; box-shadow: none !important; }
  .ms-tools .tab-actions select { border: 1px solid var(--line) !important; background: var(--bg2) !important; }
  .ms-tools a:active, .ms-tools button:active { background: var(--bg3); }
  .ms-tools-x { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
  .ms-tools-x [data-t="close"] { color: var(--no, #dc2626); }
  .ms-tools-empty { padding: 12px; color: var(--mut); font-size: 14px; }
  /* footer = the top of a sheet that is pushed down so only its titles show */
  html.mshell .ms-foot { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 29; height: min(82dvh, 720px);
    background: var(--bg); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -3px 14px rgba(0,0,0,.08);
    transform: translateY(calc(100% - var(--msf))); transition: transform .26s cubic-bezier(.2,.8,.2,1); touch-action: none; }
  html.mshell.ms-open .ms-foot, html.mshell.ms-drag .ms-foot { z-index: 86; box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
  html.mshell.ms-open .ms-foot { transform: none; }
  html.mshell.m-sb:not(.v-messenger) .ms-foot { z-index: 46; }      /* over a menu panel (메일 · 탐색기 …) */
  html.mshell.kb-open:not(.ms-open) .ms-foot { display: none; }
  .ms-grip { flex: none; height: 22px; position: relative; cursor: pointer; }
  .ms-grip::before { content: ""; position: absolute; left: 50%; top: 9px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
  .ms-grip.on::after { content: ""; position: absolute; left: calc(50% + 26px); top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--no, #dc2626); }   /* 알림이 있을 때 */
  .ms-ftabs { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 32px; }
  .ms-ftabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 2px; border: 0; background: none;
    color: var(--mut); font-size: 13px; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
  .ms-ftabs .i { font-size: 13px; }
  .ms-ftabs button.on { color: var(--fg); font-weight: 700; }
  .ms-ftabs button.on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 3px; border-radius: 2px; background: var(--acc); }
  .ms-ftabs .n { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--bg3); color: var(--fg); font-size: 10.5px; font-weight: 700; line-height: 17px; }
  .ms-ftabs [data-k="noti"] .n { background: var(--no, #dc2626); color: #fff; }
  .ms-view { flex: 1; min-height: 0; overflow: hidden; border-top: 1px solid var(--line); margin-top: 4px; padding-bottom: env(safe-area-inset-bottom, 0px); touch-action: pan-y; }
  .ms-track { display: flex; height: 100%; transition: transform .26s cubic-bezier(.2,.8,.2,1); will-change: transform; }
  .ms-panel { flex: 0 0 100%; width: 100%; min-width: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
  .ms-pb { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 8px 16px; }
  .ms-ph { flex: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 10px 4px 16px; }
  .ms-ph b { flex: 1; min-width: 0; font-size: 16px; } .ms-ph .mut { font-weight: 500; }
  .ms-refresh { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--mut); font-size: 19px; }
  html.mshell .ms-dim { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.42); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  html.mshell.ms-open .ms-dim { opacity: 1; pointer-events: auto; }
  /* lists in the sheet */
  .ms-list { list-style: none; margin: 0; padding: 0; }
  .ms-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--fg); text-align: left; }
  .ms-list button:active { background: var(--bg3); }
  .ms-list .ic { flex: none; width: 30px; font-size: 21px; text-align: center; }
  .ms-list .tx { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
  .ms-list .tx b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms-list .tx i { font-style: normal; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms-list .tx em { font-style: normal; font-size: 12.5px; color: var(--mut); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
  .ms-sec { padding: 12px 12px 4px; font-size: 12px; font-weight: 700; color: var(--mut); }
  .ms-wait { padding: 14px 12px; font-size: 14px; color: var(--mut); }
  .ms-projrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
  .ms-projrow span { font-size: 13px; color: var(--mut); flex: none; }
  .ms-proj { flex: 1; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); color: var(--fg); }
  .ms-logout { margin: 0; padding: 12px 10px 4px; }
  .ms-logout button { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--mut); font-size: 14px; }
  .ms-search { flex: none; margin: 0; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg2); }
  .ms-q { width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 23px; background: var(--bg); color: var(--fg); font-size: 16px; }
  .ms-q:focus { outline: none; border-color: var(--acc); }
  /* 첨부 sheet (.ms-ref — the ＋ of a composer, or a swipe up under the chat box; owner 2026-11-10): a row of big buttons
     [사진 · 카메라 · 파일] on top, then 문서함 (열린 문서 first) | 저장소 with a ＋ at the right of each document · 자료; no 알림, no 탭.
     It comes up part way (html.ms-half): the buttons and the top of the lists — a drag or scroll up brings the rest */
  .ms-refhint, .ms-attrow { display: none; }
  .ms-foot.ms-ref .ms-attrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: none; padding: 2px 12px 10px; }
  .ms-attrow button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; border: 1px solid var(--line); border-radius: 14px;
    background: var(--bg2); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
  .ms-attrow button:active { background: var(--bg3); }
  .ms-attrow .i { display: grid; place-items: center; height: 26px; color: var(--fg); }
  .ms-foot.ms-ref .ms-ftabs [data-k="noti"], .ms-foot.ms-ref .ms-panel[data-k="noti"], .ms-foot.ms-ref .ms-ftabs [data-k="tabs"], .ms-foot.ms-ref .ms-panel[data-k="tabs"] { display: none; }
  .ms-foot.ms-ref .ms-ftabs { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
  .ms-foot.ms-ref .ms-refhint { display: block; flex: none; padding: 2px 16px 6px; font-size: 12.5px; color: var(--mut); }
  .ms-foot.ms-ref .ms-docs .sec-head .n { margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--bg3); font-size: 10.5px; line-height: 17px; text-align: center; }
  html.mshell.ms-open.ms-half .ms-foot { --ms-peek: min(48dvh, 440px); transform: translateY(calc(100% - var(--ms-peek))); }
  html.mshell.ms-open.ms-half .ms-dim { opacity: .6; }
  .ms-refadd { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto; padding: 0; border: 1px solid var(--line); border-radius: 50%;
    background: var(--bg); color: var(--acc); }
  .ms-refadd.on { border-color: var(--acc); background: var(--acc); color: #fff; }
  .ms-refadd:active { transform: scale(.92); }
  .ms-docs .items li.ms-refli { display: flex; align-items: center; gap: 6px; padding-right: 4px; }
  .ms-docs .items li.ms-refli > a { flex: 1; min-width: 0; }
  .ms-store .tree .row > .ms-refadd, .ms-docs .tree .row > .ms-refadd { width: 32px; height: 32px; margin-left: auto; }
  .ms-store .tree .row:has(.ms-refadd) > .row-acts, .ms-docs .tree .row:has(.ms-refadd) > .row-acts { margin-left: auto; }
  .ms-store .tree .row > .ms-refadd, .ms-docs .tree .row > .ms-refadd { margin-left: auto !important; }   /* ＋ always at the right edge (the ✎ 🗑 are hidden) */
  .ms-tab .ms-refadd { margin-left: 8px; }
  /* 저장소 (탐색기 + 자료실 trees moved in from the side bar) */
  .ms-store .tree .row, .ms-docs .tree .row { border-radius: 10px; }
  .ms-store .ms-tslot, .ms-docs .ms-tslot { margin-bottom: 6px; }
  .ms-store .ms-list { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
  .ms-store .tree .row-acts, .ms-docs .tree .row-acts { display: none !important; }   /* 이름 바꾸기 · 삭제 = a long press on the row */
  .ms-store .tree .row, .ms-docs .tree .row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .ms-lt, .ms-docs .items a { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  /* long-press preview */
  .ms-pv { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(0,0,0,.55); }
  .ms-pvc { display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: 86dvh; background: var(--bg); color: var(--fg); border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
  .ms-pvh { display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 16px; border-bottom: 1px solid var(--line); }
  .ms-pvh .tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
  .ms-pvh .tx b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ms-pvh .tx i { font-style: normal; font-size: 12px; color: var(--mut); }
  .ms-pvh .x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: var(--mut); }
  .ms-pvb { flex: 1; min-height: 120px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .ms-pvb > img, .ms-pvb > video { display: block; width: 100%; height: auto; background: #000; }
  .ms-pvb > audio { display: block; width: calc(100% - 32px); margin: 24px 16px; }
  .ms-pvb > .doc { padding: 12px 16px 20px; font-size: 14.5px; }
  .ms-pvb > pre { margin: 0; padding: 12px 16px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
  .ms-pvnone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; color: var(--mut); font-size: 14px; }
  .ms-pvnone span { font-size: 48px; }
  /* its actions: a row like the footer's tabs (icon over a short label, equal widths) */
  .ms-pvf { display: flex; padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
  .ms-pvf button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px; padding: 0 2px;
    border: 0; border-radius: 10px; background: none; color: var(--fg); font: inherit; font-size: 12px; -webkit-tap-highlight-color: transparent; }
  .ms-pvf button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .ms-pvf button:active { background: var(--sel); }
  .ms-pvf button[data-a="open"] { color: var(--acc); font-weight: 600; }
  .ms-pvf button[data-a="del"] { color: #d1242f; }
  .ms-pvrn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
  .ms-pvrn input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--acc); border-radius: 8px; background: var(--bg); color: var(--fg); font-size: 16px; }
  .ms-pvrn button { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--mut); }
  .ms-pvrn .ok { color: var(--acc); }
  .ms-latest { display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; }
  .ms-latest > .ms-sec { padding-top: 4px; }
  .ms-lt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--bg2); color: var(--fg); text-align: left; font: inherit; }
  .ms-lt:active { background: var(--sel); }
  .ms-lt .th { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--bg); font-size: 28px; }
  .ms-lt .th img { width: 100%; height: 100%; object-fit: cover; }
  .ms-lt .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .ms-lt .tx b { font-size: 14px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
  .ms-lt .tx i { font-style: normal; font-size: 12px; color: var(--mut); }
  /* 문서함 (the Inbox lists) */
  .ms-docs .sec { border: 0; } .ms-docs .sec-head { padding: 10px 8px; }
  .ms-docs .items a { padding: 10px 10px; border-radius: 10px; }
  /* 탭 (list | gallery) */
  .ms-modes { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
  .ms-modes button, .ms-closeall { height: 34px; padding: 0 10px; border: 0; background: var(--bg); color: var(--fg); font-size: 13.5px; }
  .ms-modes button.on { background: var(--acc); color: #fff; }
  .ms-closeall { flex: none; border: 1px solid var(--line); border-radius: 9px; color: var(--mut); }
  .ms-tab { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 46px 8px 10px; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
  .ms-tab:active { background: var(--bg3); }
  .ms-tab.on { background: color-mix(in srgb, var(--acc) 14%, transparent); }
  .ms-tab .ic { flex: none; width: 28px; font-size: 20px; text-align: center; }
  .ms-tab .tx { display: flex; flex-direction: column; min-width: 0; }
  .ms-tab .tx b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms-tab .tx i { font-style: normal; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms-tab .x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--mut); font-size: 16px; }
  .ms-tabs.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
  .ms-tabs.grid .ms-tab { flex-direction: column; align-items: stretch; gap: 6px; height: 170px; padding: 10px; border: 1px solid var(--line); background: var(--bg2); overflow: hidden; }
  .ms-tabs.grid .ms-tab.on { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 40%, transparent); }
  .ms-tabs.grid .ms-tab .ic { text-align: left; }
  .ms-tabs.grid .ms-tab .tx { padding-right: 26px; }
  .ms-tabs.grid .ms-tab .x { top: 4px; transform: none; width: 34px; height: 34px; }
  .ms-tabs.grid .pv { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; font-size: 11.5px; line-height: 16px; color: var(--mut); overflow-wrap: anywhere; }
  /* 알림: the bell panel inside the sheet */
  html.mshell .ms-panel > .noti.ms-in { position: static !important; inset: auto !important; display: flex !important; flex-direction: column; flex: 1; min-height: 0; width: auto !important;
    max-height: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; }
  html.mshell .ms-panel > .noti.ms-in .noti-head { flex-wrap: wrap; row-gap: 6px; padding: 8px 12px; }
  html.mshell .ms-panel > .noti.ms-in .noti-chips { order: 5; flex: 1 1 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  html.mshell .ms-panel > .noti.ms-in .noti-head > b { flex: 1; font-size: 16px; }
  html.mshell .ms-panel > .noti.ms-in .noti-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
  /* menu panels (메일 · 탐색기 · 저장소 …): full width, no rail, above the footer */
  html.mshell.m-sb:not(.v-messenger) .activity { display: none !important; }
  html.mshell.m-sb:not(.v-messenger) .sidebar { left: 0 !important; right: 0 !important; width: auto !important; bottom: var(--msf) !important; height: auto !important; }
  html.mshell.m-sb .sidebar .pane-body, html.mshell.m-sb .sidebar .items { padding-bottom: 16px; }

  /* ── 채팅 입력 상자, one shape for two places (owner 2026-11-10): .chat-composer-box = idle one line [＋ | text | ↑], two
     tiers (text grows / tool row … ↑) while the cursor is in it. Worn by the AI 채팅 composer (.hc-box — inbox.py, the ＋ from
     chat-mobile.js) and the 문서 입력창 (.adc-box — chat.js; its ＋ is phone-only).
     Parts: .composer-plus · .composer-input · .composer-bar (holds .composer-send / .composer-stop). Open = .m-open on the pane
     (.hc) or the document form (.adc). (The drawer's 채팅 입력 독 of 2026-11-10 was removed the same day.)
     Change the look HERE — all three follow; the hc-/ms-/adc- names below and in chat.css are only each place's extras. ── */
  html.mshell .hc > .hc-composer > .hc-box { margin-left: 0 !important; }
  html.mshell .chat-composer-box { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto !important; align-items: end !important; column-gap: 2px; padding: 4px 5px !important; border-radius: 24px; }
  html.mshell .chat-composer-box > .composer-plus { display: grid; place-items: center; grid-column: 1 !important; grid-row: 1 !important; }
  html.mshell .chat-composer-box > .hc-inwrap, html.mshell .chat-composer-box > .composer-input { grid-column: 2 !important; grid-row: 1 !important; }   /* (chat.js wraps the box for its grey suggestion) */
  html.mshell .chat-composer-box > .hc-ctx { display: none !important; }
  html.mshell .chat-composer-box > .composer-bar { display: contents !important; }
  html.mshell :is(.hc, .adc):not(.m-open) .composer-bar > :not(.composer-send):not(.composer-stop) { display: none !important; }
  html.mshell .chat-composer-box .composer-send, html.mshell .chat-composer-box .composer-stop { grid-column: 3 !important; grid-row: 1 !important; align-self: end !important; width: 42px; height: 42px; margin: 1px; }
  html.mshell :is(.hc, .adc):not(.m-open) .chat-composer-box .composer-input { min-height: 44px !important; max-height: 44px !important; height: 44px !important; padding: 10px 4px !important; line-height: 24px; overflow: hidden; }
  .m-plus, .composer-plus { width: 42px; height: 42px; margin: 1px; padding: 0; border: 0; border-radius: 50%; background: var(--bg2); color: var(--fg); font-size: 22px; line-height: 1; -webkit-tap-highlight-color: transparent; }
  .m-plus:active, .composer-plus:active { background: var(--bg3); }
  /* focused = two tiers: text (grows) / [＋ | tool row … ↑]. The ＋ stays (owner 2026-11-10): a tap on it = the 첨부 방식 menu
     (.m-plusmenu — 사진 · 카메라 · 파일 · 클립보드 · 경로 …); the chat's inline tool icons (.m-att) are folded into that menu */
  html.mshell .m-open .chat-composer-box { grid-template-columns: auto minmax(0, 1fr) !important; border-radius: 18px; padding: 6px 8px 6px !important; }
  html.mshell .m-open .chat-composer-box > .composer-plus { display: grid !important; grid-column: 1 !important; grid-row: 2 !important; align-self: center !important; width: 36px; height: 36px; margin: 4px 2px 0 0; background: none; }
  html.mshell .m-open .chat-composer-box > .hc-inwrap, html.mshell .m-open .chat-composer-box > .composer-input { grid-column: 1 / -1 !important; }
  html.mshell .m-open .chat-composer-box .composer-input { min-height: 72px !important; max-height: 40vh !important; padding: 8px 4px !important; }
  html.mshell .m-open .chat-composer-box > .composer-bar { display: flex !important; flex-wrap: nowrap !important; grid-column: 2 !important; grid-row: 2 !important; align-items: center; gap: 4px; min-width: 0; padding-top: 4px;
    overflow-x: auto; scrollbar-width: none; }
  html.mshell .m-open .chat-composer-box .m-att { display: none !important; }
  html.mshell .m-open .chat-composer-box > .composer-bar::-webkit-scrollbar { display: none; }
  html.mshell .m-open .composer-bar > .composer-send, html.mshell .m-open .composer-bar > .composer-stop { position: sticky; right: 0; margin-left: auto; flex: none; box-shadow: -8px 0 8px var(--bg); }
  /* the AI 채팅's own extras */
  html.mshell .hc .m-att [data-a="clip"] { order: 9; }
  html.mshell .hc:not(.m-open) .hc-ghost { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
  html.mshell .hc.m-open .hc-bar .hc-model { flex: 0 1 auto; min-width: 84px; max-width: 132px; height: 36px; font-size: 13.5px !important; padding: 0 6px; border-radius: 10px; }
  html.mshell .hc.m-open .hc-bar .hc-setdef { font-size: 0; height: 36px; padding: 0 9px; flex: none; } html.mshell .hc.m-open .hc-bar .hc-setdef::before { content: "★"; font-size: 15px; }
  html.mshell .hc.m-open .hc-bar .hc-pc { height: 36px; padding: 0 8px; font-size: 13px; flex: none; }
  html.mshell .hc.m-open .hc-bar .hc-ctxm { flex: none; } html.mshell .hc.m-open .hc-bar .hc-ctxm span { display: none; } html.mshell .hc.m-open .hc-bar .hc-ctxm i { width: 28px; }
  html.mshell .hc .m-att { display: none; }   /* (its buttons are the ＋ menu's items — never shown inline, owner 2026-11-10) */
  html.mshell .hc.m-open .m-att button, html.mshell .hc .hc-box .m-att .hc-attach { display: grid !important; place-items: center; width: 38px; height: 38px; padding: 0; border: 0;
    border-radius: 50%; background: none; color: var(--fg); font-size: 18px; }
  html.mshell .hc.m-open .m-att button:active { background: var(--bg3); }
  .m-att.busy { opacity: .45; pointer-events: none; }
  /* the tab the AI looks at (tap = pick another) */
  html.mshell .aux .ms-tabline { display: flex; align-items: center; gap: 5px; max-width: calc(100% - 12px); height: 26px; margin: 3px 6px 0; padding: 0 8px; border: 0; border-radius: 13px;
    background: none; color: var(--mut); font-size: 12.5px; -webkit-tap-highlight-color: transparent; }
  html.mshell .aux .ms-tabline:active { background: var(--bg3); }
  .ms-refrow { display: none; }
  html.mshell .aux .ms-refrow { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 3px 4px 0; }
  html.mshell .aux .ms-refrow > .ms-tabline { flex: 0 1 auto; min-width: 0; margin: 0 auto; }
  .ms-rfh { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 6px; border: 0; border-radius: 13px; background: none;
    color: var(--mut); font: inherit; font-size: 11.5px; font-weight: 500; -webkit-tap-highlight-color: transparent; }
  .ms-rfh:active { background: var(--bg3); }
  .ms-tabline .tx { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms-tabline .ic, .ms-tabline .ar { flex: none; }

  /* ── 메신저 composer, the same shape ── */
  html.mshell.mshell.mshell body .bz .bz-form.bz-form { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; column-gap: 2px;
    max-height: none !important; opacity: 1 !important; overflow: visible !important; margin: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); padding: 4px 5px !important;
    border: 1px solid var(--line) !important; border-radius: 24px; background: var(--bg); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
  html.mshell body .bz .bz-form:focus-within { border-color: var(--acc) !important; }
  html.mshell body .bz .bz-form > * { grid-column: 1 / -1; }
  html.mshell body .bz .bz-form > .bz-reply { grid-row: 1; } html.mshell body .bz .bz-form > .bz-filechip { grid-row: 2; }
  html.mshell body .bz .bz-form > .m-plus { display: grid; place-items: center; grid-column: 1; grid-row: 3; }
  html.mshell body .bz .bz-form > textarea { grid-column: 2; grid-row: 3; min-height: 44px !important; max-height: 44px; height: 44px; padding: 10px 4px; border: 0 !important;
    background: none; box-shadow: none !important; outline: none; resize: none; font-size: 16px; line-height: 24px; overflow: hidden; }
  html.mshell body .bz .bz-form > .chat-hint { display: contents !important; }
  html.mshell body .bz .bz-form:not(.m-open) > .chat-hint > :not(.m-send) { display: none !important; }
  html.mshell body .bz .bz-form .m-send { grid-column: 3; grid-row: 3; width: 42px; height: 42px; min-height: 0 !important; margin: 1px; padding: 0 !important; border: 0; border-radius: 50%;
    background: var(--acc); color: #fff; font-size: 0 !important; }
  html.mshell body .bz .bz-form .m-send::before { content: "↑"; font-size: 20px; font-weight: 700; }
  html.mshell body .bz .bz-form.m-open { grid-template-columns: minmax(0, 1fr) auto; border-radius: 18px; padding: 6px 8px !important; }
  html.mshell body .bz .bz-form.m-open > .m-plus { display: none; }
  html.mshell body .bz .bz-form.m-open > textarea { grid-column: 1 / -1; min-height: 72px !important; max-height: 40vh; height: auto; overflow-y: auto; padding: 8px 4px; }
  html.mshell body .bz .bz-form.m-open > .chat-hint { display: flex !important; grid-column: 1 / -1; grid-row: 4; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  html.mshell body .bz .bz-form.m-open > .chat-hint > .icon { width: 38px; height: 38px; flex: none; }
  html.mshell body .bz .bz-form.m-open .m-send { flex: none; margin-left: auto; position: sticky; right: 0; }
}
/* 📱 phone shell: line icons (GPT-style) instead of emoji — mshell.js P / chat-mobile.js */
@media (max-width: 700px) {
  .ms-kind { display: inline-flex; align-items: center; gap: 4px; }
  .ms-kind svg { flex: none; }
  .ms-ftabs button { flex-direction: row; gap: 5px; font-size: 13px; }
  .ms-ftabs .i { display: grid; place-items: center; }
  .ms-ftabs button.on .i { color: var(--fg); }
  .ms-list .ic, .ms-tab .ic { display: grid; place-items: center; color: var(--fg); font-size: 0; }
  .ms-list button:active .ic { color: var(--acc); }
  .ms-tabs.grid .ms-tab .ic { justify-content: start; }
  .ms-tab .x, .ms-refresh { display: grid; place-items: center; }
  .ms-modes button { display: inline-flex; align-items: center; gap: 5px; }
  .ms-tools-x button svg, .ms-logout button svg { flex: none; }
  .ms-logout button { display: flex; align-items: center; justify-content: center; gap: 6px; }
  .ms-tabline .ic, .ms-tabline .ar { display: grid; place-items: center; }
  .m-plus { display: grid; place-items: center; font-size: 0; }
  html.mshell .hc .m-att .hc-attach svg { display: block; }
  /* send = a dark round button with a white arrow, like GPT */
  html.mshell .hc .hc-box .hc-send, html.mshell body .bz .bz-form .m-send { display: grid !important; place-items: center; border: 0; border-radius: 50%;
    background: var(--fg) !important; color: var(--bg) !important; font-size: 0 !important; }
  html.mshell .hc .hc-box .hc-send::before, html.mshell body .bz .bz-form .m-send::before { content: ""; display: block; width: 20px; height: 20px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5.5 11.5 12 5l6.5 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5.5 11.5 12 5l6.5 6.5'/%3E%3C/svg%3E") center / contain no-repeat; }
  html.mshell .hc .hc-box .hc-send:disabled { opacity: .35; }
  html.mshell .hc .hc-box .hc-stop { display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fg) !important; color: var(--bg) !important; font-size: 0 !important; }
  html.mshell .hc .hc-box .hc-stop::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: currentColor; }
  html.mshell .hc .hc-box .hc-stop[hidden] { display: none !important; }
  html.mshell .hc .hc-box .hc-send[hidden] { display: none !important; }
}
@media (max-width: 700px) {   /* neutral (GPT-like) selection instead of the accent fill */
  .ms-modes button.on { background: var(--bg3); color: var(--fg); font-weight: 600; }
  .ms-tab.on { background: var(--bg3); }
  .ms-ftabs button.on::after { background: var(--fg); }
}
@media (max-width: 700px) {   /* input boxes: neutral border and soft shadow (GPT-like), no accent outline */
  html.mshell .hc .hc-box, html.mshell.mshell.mshell body .bz .bz-form.bz-form { border-color: var(--line) !important; box-shadow: 0 1px 6px rgba(0,0,0,.06), 0 0 0 .5px rgba(0,0,0,.04); }
  html.mshell .hc .hc-box:focus-within, html.mshell body .bz .bz-form:focus-within { border-color: color-mix(in srgb, var(--fg) 28%, var(--line)) !important; box-shadow: 0 2px 12px rgba(0,0,0,.10); }
}

/* 설정 › 에이전트·메신저 › 스킬 학습 (skilllearn.js) */
.sl h5 { margin: 18px 0 6px; font-size: 13.5px; } .sl h6 { margin: 12px 0 4px; font-size: 12.5px; }
.sl-tip { font-weight: 400; font-size: 12px; }
.sl-bar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; font-size: 13px; }
.sl-bar-row label { display: inline-flex; gap: 6px; align-items: center; color: var(--mut); }
.sl-q { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; min-width: 200px; flex: 1; max-width: 360px; }
.sl-all { font-size: 13px; margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sl-t td { font-size: 12.5px; } .sl-t select { max-width: 220px; }
.sl-txt { max-width: 460px; white-space: pre-wrap; word-break: break-word; }
.sl-sub { font-size: 11.5px; margin-top: 2px; } .sl-when { white-space: nowrap; }
.sl-m { font-family: ui-monospace, monospace; font-size: 11.5px; padding: 1px 5px; border-radius: 5px; background: var(--acc-bg); color: var(--acc); white-space: nowrap; }
.sl-m.sl-loc { background: var(--bg3); color: var(--fg); }
.sl-bar { display: inline-block; width: 80px; height: 7px; border-radius: 4px; background: var(--bg3); vertical-align: middle; overflow: hidden; }
.sl-bar i { display: block; height: 100%; background: var(--ok); }
.sl-detail { border: 1px solid var(--acc); border-radius: 9px; padding: 10px 12px; margin: 10px 0; background: var(--bg); }
.sl-dh { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; } .sl-dh .sl-x { margin-left: auto; }
.sl-diff { max-height: 55vh; overflow: auto; font-size: 12px; line-height: 1.45; background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; }
.sl-diff .add { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); display: inline-block; width: 100%; }
.sl-diff .del { color: var(--no); background: color-mix(in srgb, var(--no) 10%, transparent); display: inline-block; width: 100%; }
.sl-diff .at { color: var(--acc); } .sl-diff .h { color: var(--mut); }
.sl-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
#sys button.sl-danger { color: var(--no); }
.sl-scroll { overflow-x: auto; } .sl-scroll .sl-t { min-width: 640px; } .sl-txt { min-width: 220px; }
.sys-t.sl-t td:not(.mut) { white-space: normal; } .sys-t.sl-t td.sl-txt { white-space: pre-wrap; } .sys-t.sl-t .sl-when, .sys-t.sl-t .sl-m { white-space: nowrap; }
/* 📱 메뉴 = full-screen pane left of the main panel; 메신저 list = a footer tab (owner 2026-10-29) */
.ms-mpane { display: none; }
@media (max-width: 700px) {
  html.mshell.ms-menu .ms-mpane { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 32; background: var(--bg); padding-top: env(safe-area-inset-top, 0px); }
  .ms-mpane .ms-mph { border-bottom: 1px solid var(--line); }
  .ms-mwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .ms-mpane .ms-search { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .ms-bznav li { height: auto !important; min-height: 46px; font-size: 15.5px !important; gap: 12px !important; padding: 0 12px !important; border-radius: 10px !important; }
  .ms-bznav li .av { width: 28px !important; height: 28px !important; font-size: 13px !important; border-radius: 8px !important; }
  .ms-bznav li.on { background: var(--bg3) !important; color: var(--fg) !important; }
  .ms-bznav li.on .h, .ms-bznav li.on .av { color: var(--mut) !important; }
  .ms-bznav details summary { font-size: 13px; padding: 10px 12px 6px; }
}
/* 📱 설정: its section tabs (일반 · AI · 에이전트·메신저 · 시스템 · 점검) stay visible; the desktop footer sits at the top of the page */
@media (max-width: 700px) {
  html.mshell .epane .tab-actions:has(> .sys-tabs) { display: flex !important; padding: 0; overflow-x: auto; }
  html.mshell .epane .tab-actions:has(> .sys-tabs) > :not(.sys-tabs) { display: none !important; }
  html.mshell .epane .tab-actions > .sys-tabs { position: static; flex: 1; min-width: 0; padding: 0 8px; }
  html.mshell .epane .tab-actions > .sys-tabs button { font-size: 14.5px; padding: 12px 12px; }
  html.mshell .statusbar.ms-status { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px 8px; position: static; height: auto; min-height: 0;
    margin: 10px 12px 4px; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; overflow: visible; }
  html.mshell .statusbar.ms-status > * { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  html.mshell .statusbar.ms-status > button, html.mshell .statusbar.ms-status > span, html.mshell .statusbar.ms-status > a { min-height: 30px; display: inline-flex; align-items: center; }
  html.mshell .statusbar.ms-status .r, html.mshell .statusbar.ms-status .sbar-keys { display: none !important; }
}
@media (max-width: 700px) {
  html.mshell .statusbar.ms-status { flex-direction: column; align-items: stretch; gap: 2px; background: var(--bg2) !important; color: var(--fg) !important; border: 1px solid var(--line); }
  html.mshell .statusbar.ms-status::before { content: "상태"; font-size: 12px; font-weight: 700; color: var(--mut); padding: 0 2px 4px; }
  html.mshell .statusbar.ms-status > * { flex: none; width: 100%; color: var(--fg) !important; background: none !important; border: 0 !important; padding: 4px 2px !important; text-align: left; justify-content: flex-start; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: none !important; }
  html.mshell .statusbar.ms-status > * + * { border-top: 1px solid var(--line) !important; }
}
@media (max-width: 700px) { html.mshell .statusbar.ms-status * { color: inherit; } }
.sl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 10px; }
.sl-tabs button { border: 0; background: none; padding: 7px 12px; font: inherit; font-size: 13.5px; color: var(--mut); cursor: pointer; border-bottom: 2px solid transparent; }
.sl-tabs button.on { color: var(--fg); border-bottom-color: var(--acc); font-weight: 600; } .sl-cnt { color: var(--warn); font-size: 12px; }
.si-chips { gap: 6px; } .si-chip { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.si-chip.on { background: var(--acc-bg); border-color: var(--acc); color: var(--acc); }
.si-row.on td { background: var(--sel); }
.si-pre { max-height: 220px; }
.si-trs { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; margin: 4px 0; }
.si-tr { font-size: 12px; margin: 3px 0; white-space: pre-wrap; word-break: break-word; } .si-tr.tool { color: var(--mut); } .si-tr b { font-size: 11px; color: var(--acc); }
.si-content { width: 100%; box-sizing: border-box; font-family: ui-monospace, monospace; font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg2); color: var(--fg); resize: vertical; }
.si-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; margin: 8px 0; font-size: 12.5px; }
.si-cols > div { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; } .si-cols label { display: block; margin: 2px 0; }
.si-addf { margin: 6px 0; } .si-build { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 6px; }
@media (max-width: 700px) { .si-cols { grid-template-columns: 1fr; } }
.sys-t.si-t td.sl-txt { white-space: normal; } .sys-t.si-t td:last-child, .sys-t.si-t th { white-space: nowrap; } .si-t td:nth-child(3) { min-width: 70px; }
/* 📱 chat (owner 2026-10-29): header = [☰ list · conversation title · ＋]; no ⧉ (to tab) and no 🧩 PC on a phone */
@media (max-width: 700px) {
  html.mshell .aux .hc-head .hc-totab, html.mshell .aux .hc .hc-pc { display: none !important; }
  html.mshell .aux .hc > .hc-head { display: flex; align-items: center; gap: 4px; padding: 0 6px; }
  html.mshell .aux .hc > .hc-head .hc-sess { display: flex !important; align-items: center; gap: 8px; flex: 1 1 auto !important; min-width: 0; height: 44px; padding: 0 8px !important;
    border: 0; border-radius: 12px; background: none; color: var(--fg); font-size: 16px !important; font-weight: 650; text-align: left; }
  html.mshell .aux .hc > .hc-head .hc-sess:active { background: var(--bg3); }
  html.mshell .aux .hc > .hc-head .hc-sess .hc-title { display: block !important; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  html.mshell .aux .hc > .hc-head .m-listic { display: grid; place-items: center; flex: none; }
  html.mshell .aux .hc > .hc-head .hc-new { flex: none; display: grid !important; place-items: center; }
}
/* 📱 chat header: [☰ title · ⚙ · ＋]; the header wears the picked agent's colour (--ag, chat.css) — the agent is picked in ⚙ 채팅 설정 */
@media (max-width: 700px) {
  html.mshell .aux .hc .hc-agents { display: none !important; }
  html.mshell .aux .hc > .hc-head { background: linear-gradient(180deg, color-mix(in srgb, var(--ag) 16%, var(--bg)), color-mix(in srgb, var(--ag) 6%, var(--bg)));
    border-bottom: 2px solid color-mix(in srgb, var(--ag) 55%, transparent); transition: background .25s, border-color .25s; }
  html.mshell .aux .hc > .hc-head .hc-new { color: var(--ag); }
}
@media (max-width: 700px) {   /* two-tier composer: the tool row fits in one line (no sideways scroll); ↑ always inside the box at the right */
  html.mshell .hc.m-open .hc-bar { overflow: visible !important; gap: 2px !important; align-items: center !important; }
  html.mshell .hc.m-open .hc-bar > .hc-send, html.mshell .hc.m-open .hc-bar > .hc-stop { position: static !important; box-shadow: none !important; margin: 0 0 0 auto !important;
    align-self: center !important; width: 40px !important; height: 40px !important; }
  html.mshell .hc.m-open .hc-bar .hc-ctxm { display: none !important; }
  html.mshell .hc.m-open .m-att button, html.mshell .hc .hc-box .m-att .hc-attach { width: 36px !important; height: 36px !important; }
  html.mshell .hc.m-open .hc-bar .hc-model { flex: 0 1 112px !important; min-width: 0 !important; height: 34px; border-radius: 17px; padding: 0 8px; background: var(--bg2); border: 1px solid var(--line); }
  html.mshell .hc.m-open .hc-bar .hc-setdef { height: 34px; width: 34px; padding: 0 !important; border-radius: 50%; }
  html.mshell .hc .hc-box { overflow: hidden; }
}
/* 📱 메신저 composer = the chat's: tool row [사진 · 카메라 · 📎 · 📋] … ↑, and the 문서 line under the box */
@media (max-width: 700px) {
  html.mshell body .bz .bz-form .bz-clip, html.mshell body .bz .bz-form .bz-shot, html.mshell body .bz .bz-form .bz-ctx { display: none !important; }
  html.mshell body .bz .bz-form .m-att { display: none; }
  html.mshell body .bz .bz-form.m-open .m-att { display: inline-flex !important; gap: 2px; flex: none; }
  html.mshell body .bz .bz-form .m-att button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--fg); }
  html.mshell body .bz .bz-form .m-att button:active { background: var(--bg3); }
  html.mshell body .bz .bz-form > .ms-docline { display: flex; grid-column: 1 / -1; grid-row: 6; margin: 2px 2px 0; }
  html.mshell body .bz .bz-form.m-open > .chat-hint { overflow: visible !important; }
  html.mshell body .bz .bz-form .m-send { width: 40px !important; height: 40px !important; }
  .ms-tabline .dx { margin-left: 2px; border-radius: 50%; }
  .ms-docline.on { color: var(--fg); }
  /* a document line outside the chat */
  html.mshell .ms-docline { display: flex; align-items: center; gap: 5px; max-width: 100%; height: 26px; padding: 0 8px; border: 0; border-radius: 13px;
    background: none; color: var(--mut); font-size: 12.5px; -webkit-tap-highlight-color: transparent; }
  /* 문서함: the sticky section titles sit flush at the top (no strip of the list showing above them) */
  .ms-docs { padding-top: 0 !important; }
  .ms-docs .sec-head { top: 0 !important; margin-top: 0; }
  .ms-docs .sec { margin: 0; }
}
/* 📱 설정 = grouped list (Claude app style) → a section full screen with ‹ 설정 */
.ms-setlist, .ms-sback { display: none; }
@media (max-width: 700px) {
  html.mshell .epane.ms-slist .editor-body > :not(.ms-setlist) { display: none !important; }
  html.mshell .epane.ms-slist .editor-body > .ms-setlist { display: block; padding: 6px 14px 32px; }
  html.mshell .epane:is(.ms-slist, .ms-sdet) .tab-actions:has(> .sys-tabs) { display: none !important; }
  html.mshell .epane.ms-sdet .sec-tabs { display: none !important; }
  html.mshell .epane.ms-sdet .editor-body > .ms-sback { display: flex; align-items: center; gap: 4px; position: sticky; top: 0; z-index: 5; height: 48px; padding: 0 8px;
    background: var(--bg); border-bottom: 1px solid var(--line); }
  .ms-sback button { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 8px 0 2px; border: 0; border-radius: 10px; background: none; color: var(--fg); font-size: 15px; }
  .ms-sback b { flex: 1; min-width: 0; text-align: center; margin-right: 64px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms-sh { padding: 18px 8px 8px; font-size: 13px; font-weight: 600; color: var(--mut); }
  .ms-sgrp { border-radius: 18px; background: var(--bg2); overflow: hidden; }
  .ms-sgrp.ms-sstatus { margin-top: 8px; background: none; }
  .ms-sgrp.ms-sstatus .statusbar.ms-status { margin: 0; border-radius: 18px; }
  .ms-srow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 8px 16px; border: 0; background: none; color: var(--fg); font-size: 16.5px; text-align: left; }
  .ms-srow + .ms-srow { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
  .ms-srow:active { background: var(--bg3); }
  .ms-srow .ic { flex: none; width: 26px; display: grid; place-items: center; }
  .ms-srow .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .ms-srow .tx i { font-style: normal; font-size: 13.5px; color: var(--mut); }
  .ms-srow .ar { flex: none; display: grid; place-items: center; color: var(--mut); }
  .ms-srow.ms-sout { color: var(--no, #dc2626); }
}
@media (max-width: 700px) { html.mshell .epane.ms-sdet .ssec.ms-hide { display: none !important; } }
/* 설정 on a phone: a row folds its section open right under it (mshell.js setFold) */
@media (max-width: 700px) {
  html.mshell .ms-srow .ar { transition: transform .15s; }
  html.mshell .ms-srow.open .ar { transform: rotate(90deg); color: var(--acc); }
  html.mshell .ms-srow.open { font-weight: 600; }
  html.mshell :is(.ms-sacc, .ms-sghost) { padding: 4px 6px 12px; background: var(--bg); border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-sizing: border-box; }
  html.mshell :is(.ms-sacc, .ms-sghost) + .ms-srow { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
  html.mshell .ms-sghost { pointer-events: none; }
  html.mshell :is(.ms-sacc, .ms-sghost) #sys { min-height: 0; }
  html.mshell :is(.ms-sacc, .ms-sghost) :is(.sec-tabs, .ssec.ms-hide, .ms-empty) { display: none !important; }
  html.mshell .ms-srow .ar { transition: transform .24s cubic-bezier(.2,.7,.2,1); }
}

/* 🖥 설정 on a wide screen (mshell.js setnav, ChatGPT-style): left navigation + one section under a big title */
.sn-nav, .sn-title { display: none; }
@media (min-width: 701px) {
  .editor-body.sn-on { display: grid; grid-template-columns: 248px minmax(0, 1fr); overflow: hidden !important; padding: 0 !important; }
  .editor-body.sn-on > .sn-nav { display: flex; flex-direction: column; min-height: 0; padding: 14px 10px 10px; background: var(--bg2); border-right: 1px solid var(--line); }
  .editor-body.sn-on > #sys { min-height: 0; overflow-y: auto; padding: 0 clamp(20px, 5%, 64px) 48px; }
  .editor-body.sn-on > #sys > * { max-width: 880px; margin-left: auto; margin-right: auto; }
  .epane:has(.editor-body.sn-on) .tab-actions > .sys-tabs, .editor-body.sn-on .sys-top > .sec-tabs { display: none !important; }
  .editor-body.sn-on .ssec.ms-hide, .editor-body.sn-on #sys [data-grp].ms-hide { display: none !important; }
  .sn-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; margin-bottom: 8px; border-radius: 21px; background: var(--bg3); color: var(--mut); }
  .sn-search input { flex: 1; min-width: 0; border: 0 !important; outline: none; background: none !important; color: var(--fg); font-size: 15px; box-shadow: none !important; padding: 0; }
  .sn-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .sn-h { padding: 14px 10px 6px; font-size: 13px; color: var(--mut); }
  .sn-it { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--fg);
    font-size: 14.5px; text-align: left; cursor: pointer; }
  .sn-it svg { flex: none; color: var(--fg); opacity: .85; }
  .sn-it span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sn-it:hover { background: color-mix(in srgb, var(--bg3) 70%, transparent); }
  .sn-it.on { background: var(--bg3); font-weight: 600; }
  .sn-it[hidden], .sn-g[hidden] { display: none; }
  .sn-none { padding: 16px 12px; font-size: 13.5px; color: var(--mut); }
  .editor-body.sn-on .sn-title { display: block; margin: 36px auto 22px; font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
  /* content: soft rounded cards like the reference */
  .editor-body.sn-on #sys .bs-card, .editor-body.sn-on #sys section.set { border: 1px solid var(--line); border-radius: 16px; box-shadow: none; background: var(--bg); }
  .editor-body.sn-on #sys h3, .editor-body.sn-on #sys h4 { font-size: 16px; font-weight: 600; }
}
@media (min-width: 701px) {
  .editor-body.sn-on > .sn-nav { background: var(--bg); }
  .sn-it { font-weight: 400; } .sn-it.on { font-weight: 600; }
  .editor-body.sn-on .sn-title { text-align: left; }
  .editor-body.sn-on #sys .bs-card, .editor-body.sn-on #sys section.set { padding: 20px 24px; margin-bottom: 20px; }
  .editor-body.sn-on #sys .bs-card > h3:first-child, .editor-body.sn-on #sys .bs-card > h4:first-child { margin-top: 0; }
}
@media (min-width: 701px) { .editor-body.sn-on > #sys > * { width: 100%; align-self: stretch; box-sizing: border-box; } .editor-body.sn-on > #sys .sys-top > * { max-width: none; } }
/* settings: a card whose sections are all hidden (another section picked) is hidden too */
.editor-body.sn-on .ms-empty, .epane.ms-sdet .ms-empty { display: none !important; }

/* 🖥 설정 inside a section (ChatGPT-style): headings above, one rounded card of rows [name · description | control] with hairlines */
@media (min-width: 701px) {
  .editor-body.sn-on #sys .bs-card { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
  .editor-body.sn-on #sys .bs-body { padding: 0; }
  .editor-body.sn-on #sys .ssec > h3, .editor-body.sn-on #sys .ssec > h4 { margin: 34px 0 14px; font-size: 17px; font-weight: 600; }
  .editor-body.sn-on #sys .ssec:first-child > h3, .editor-body.sn-on #sys .ssec:first-child > h4 { margin-top: 6px; }
  .editor-body.sn-on .sn-card { border: 1px solid var(--line); border-radius: 16px; padding: 4px 24px; background: var(--bg); }
  .editor-body.sn-on .sn-card > p.mut, .editor-body.sn-on .sn-card > .mut:first-child { margin: 14px 0 4px; font-size: 13.5px; line-height: 1.6; }
  .editor-body.sn-on .sn-card .bs-row { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(220px, 44%) auto; align-items: center; gap: 12px;
    padding: 16px 0; margin: 0; border-top: 1px solid var(--line); }
  .editor-body.sn-on .sn-card > .bs-row:first-child, .editor-body.sn-on .sn-card > p + .bs-row { border-top: 0; }
  .editor-body.sn-on .sn-card .bs-row > label { font-size: 15px; color: var(--fg); font-weight: 500; }
  .editor-body.sn-on .sn-card .bs-row > :not(label):not(button) { min-width: 0; width: 100%; }
  .editor-body.sn-on .sn-card .bs-row > button { justify-self: end; }
  .editor-body.sn-on .sn-card .bs-row > :only-child, .editor-body.sn-on .sn-card .bs-row > label:last-child { grid-column: 1 / -1; }
  .editor-body.sn-on .sn-card .bs-row input, .editor-body.sn-on .sn-card .bs-row select { border-radius: 10px; }
  .editor-body.sn-on .sn-card .bs-chk { display: flex; align-items: center; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
  .editor-body.sn-on .sn-card .bs-acts { display: flex; align-items: center; gap: 12px; justify-content: flex-end; padding: 14px 0 16px; margin: 0; border-top: 1px solid var(--line); }
  .editor-body.sn-on .sn-card .bs-acts > .bs-msg { margin-right: auto; }
  /* status cards (section.set): the header is the heading; the body is the card; table rows = name | value */
  .editor-body.sn-on #sys section.set { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; margin: 0 0 30px; }
  .editor-body.sn-on #sys section.set > header { display: flex; align-items: center; gap: 8px; padding: 6px 2px 12px; border: 0; background: none; font-size: 17px; }
  .editor-body.sn-on #sys section.set > header b { font-size: 17px; font-weight: 600; }
  .editor-body.sn-on #sys section.set > .set-body { border: 1px solid var(--line); border-radius: 16px; padding: 4px 24px; background: var(--bg); }
  .editor-body.sn-on #sys .set-rows { width: 100%; border-collapse: collapse; }
  .editor-body.sn-on #sys .set-rows tr + tr > * { border-top: 1px solid var(--line); }
  .editor-body.sn-on #sys .set-rows th, .editor-body.sn-on #sys .set-rows td { padding: 15px 0; border-bottom: 0; background: none; vertical-align: middle; }
  .editor-body.sn-on #sys .set-rows th { width: 38%; text-align: left; font-size: 15px; font-weight: 500; color: var(--fg); }
  .editor-body.sn-on #sys .set-rows td { font-size: 14px; color: var(--mut); text-align: right; overflow-wrap: anywhere; }
  .editor-body.sn-on #sys .set-body > .set-acts:not(:empty) { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 0 16px; border-top: 1px solid var(--line); }
  .editor-body.sn-on #sys .set-body > .set-desc { margin: 14px 0; }
  .editor-body.sn-on #sys .set-cards { display: block; }
  .editor-body.sn-on #sys .set-note { margin: 6px 2px 20px; }
}
@media (min-width: 701px) {
  .editor-body.sn-on > #sys { container-type: inline-size; container-name: snsys; }
  .editor-body.sn-on .sn-card .bs-row { grid-template-columns: minmax(150px, 1fr) minmax(0, 1.4fr) auto; }
}
/* a narrow settings column (side panels open): name above, control under it */
@container snsys (max-width: 640px) {
  .sn-card .bs-row { grid-template-columns: minmax(0, 1fr) auto !important; row-gap: 8px !important; }
  .sn-card .bs-row > label { grid-column: 1 / -1; }
  .set-rows th, .set-rows td { display: block; width: auto !important; text-align: left !important; }
  .set-rows th { padding: 14px 0 2px !important; } .set-rows td { padding: 0 0 14px !important; border-top: 0 !important; }
  .set-rows tr + tr > td { border-top: 0 !important; }
}
@media (min-width: 701px) {
  .editor-body.sn-on #sys .set-rows th { text-align: left !important; padding-left: 0 !important; }
  .editor-body.sn-on #sys .set-rows td { padding-right: 0 !important; }
  .editor-body.sn-on #sys .set-body > .set-acts { background: none !important; border-radius: 0; margin: 0; padding-left: 0; padding-right: 0; }
  .editor-body.sn-on #sys .set-vars:not(:empty) { padding: 10px 0; border-top: 1px solid var(--line); }
  .editor-body.sn-on .sn-card .bs-acts > .bs-msg { order: -1; margin-right: auto; }
}
@media (min-width: 701px) {   /* status rows are td.k | td.v | td.s */
  .editor-body.sn-on #sys .set-rows td.k { width: 38%; text-align: left !important; font-size: 15px; font-weight: 500; color: var(--fg); padding-left: 0 !important; }
  .editor-body.sn-on #sys .set-rows td.v { text-align: right !important; }
  .editor-body.sn-on #sys .set-rows td.s { width: 22px; text-align: right !important; padding-left: 8px !important; }
  .editor-body.sn-on .sn-card > :empty:not(input):not(select):not(textarea) { display: none; }
}
@container snsys (max-width: 640px) { .set-rows td.k, .set-rows td.v { display: block; width: auto !important; text-align: left !important; } .set-rows td.s { display: none; } }

/* 🖥 설정: one type scale across every menu (AI · 에이전트·메신저 had 10–13px text, mono model names, small labels) */
@media (min-width: 701px) {
  .editor-body.sn-on #sys { font-size: 14px; }
  .editor-body.sn-on #sys :is(td, th) { font-size: 14px !important; line-height: 1.5; }
  .editor-body.sn-on #sys th { font-size: 13px !important; font-weight: 600; color: var(--mut); }
  .editor-body.sn-on #sys :is(td, th) :is(b, a, span, div, small):not(code):not(.badge):not(.dot) { font-size: inherit !important; }
  .editor-body.sn-on #sys td :is(.mut, .sl-sub, .v2-steps) { font-size: 13px !important; }
  .editor-body.sn-on #sys :is(.bs-row, .wc-row, .om-form, .om-block, .wc-body, .wc-readme) > label,
  .editor-body.sn-on #sys :is(.bs-chk, .st-opt, .st-prof) { font-size: 14.5px !important; }
  .editor-body.sn-on #sys :is(.st-opt, .st-prof) :is(b, span) { font-size: inherit !important; }
  .editor-body.sn-on #sys :is(.st-opt, .st-prof) .mut { font-size: 13px !important; }
  .editor-body.sn-on #sys :is(p, span, div).mut, .editor-body.sn-on #sys :is(.wc-tip, .ar-hint, .st-sum) { font-size: 13px !important; }
  .editor-body.sn-on #sys h5 { font-size: 15px !important; font-weight: 600; margin: 22px 0 10px; }
  .editor-body.sn-on #sys h5 .mut { font-size: 13px !important; font-weight: 400; }
  .editor-body.sn-on #sys :is(button.sec, .bs-acts button, .set-acts button, td button) { font-size: 13.5px !important; }
  .editor-body.sn-on #sys :is(li, .ar-cond, .ok-t, .err-t, .warn-t, .wc-num) { font-size: 14px !important; }
  .editor-body.sn-on #sys :is(.om-day span, .om-tile span) { font-size: 12px !important; }
  .editor-body.sn-on #sys :is(input, select, textarea) { font-size: 14px !important; }
  /* model names, steps and URLs in the body font; only code / pre stay monospace */
  .editor-body.sn-on #sys :is(.sl-m, .om-step, .om-url, .st-t td) { font-family: var(--font) !important; font-size: 13.5px !important; }
  .editor-body.sn-on #sys code { font-size: .9em !important; }
  /* action rows start at the left edge of the card (no offset under the labels) */
  .editor-body.sn-on #sys .sn-card .bs-acts { margin-left: 0 !important; }
}
@media (min-width: 701px) { .editor-body.sn-on #sys summary, .editor-body.sn-on #sys summary * { font-size: 14px !important; } .editor-body.sn-on #sys summary .mut { font-size: 13px !important; } }
/* 🖥 설정 · AI 라우터 / 자동 선택 규칙: headings above, one card per block (mshell.js omCards) */
@media (min-width: 701px) {
  .editor-body.sn-on #sys .om-sec.sn-omsec { border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
  .editor-body.sn-on #sys .om-sec.sn-omsec > h4, .editor-body.sn-on #sys .om-head { margin: 6px 0 4px; }
  .editor-body.sn-on #sys .om-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .editor-body.sn-on #sys .om-head h4 { margin: 0; font-size: 17px; }
  .editor-body.sn-on #sys .om-block.sn-omblk { border: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; box-shadow: none !important; }
  .editor-body.sn-on #sys .om-block.sn-omblk h5, .editor-body.sn-on #sys .sn-omsec details.om-block > summary h5 { margin: 30px 0 12px !important; font-size: 16px !important; }
  .editor-body.sn-on #sys .sn-card.sn-om { padding: 14px 24px 16px; margin-bottom: 4px; }
  .editor-body.sn-on #sys .sn-card.sn-om > :first-child { margin-top: 0; }
  .editor-body.sn-on #sys .sn-card.sn-om > :last-child { margin-bottom: 0; }
  .editor-body.sn-on #sys .sn-card.sn-om .bs-acts { border-top: 1px solid var(--line); margin-top: 12px; padding: 14px 0 0; }
  .editor-body.sn-on #sys .sn-omsec details.om-block { border: 0 !important; padding: 0 !important; background: none !important; margin-top: 30px; }
  .editor-body.sn-on #sys .sn-omsec details.om-block > summary { list-style: none; cursor: pointer; }
  .editor-body.sn-on #sys .sn-omsec details.om-block > summary h5 { display: inline; }
  .editor-body.sn-on #sys .sn-omsec > .bs-acts { position: sticky; bottom: 0; z-index: 3; margin-top: 24px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px;
    background: var(--bg); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
}
@media (min-width: 701px) {
  .editor-body.sn-on #sys .sn-card .bs-chk { margin-left: 0 !important; padding-left: 0 !important; justify-content: flex-start; }
  .editor-body.sn-on #sys .sn-card > .bs-chk:first-child { border-top: 0; padding-top: 4px; }
  .editor-body.sn-on #sys .sn-card .bs-acts { margin-left: 0 !important; padding-left: 0 !important; }
}
/* toasts: swipe to close (app.js) — the finger drives it, no page scroll underneath */
.tst { touch-action: none; }
/* 📱 composers (AI 채팅 · 서랍 입력 독 — the shared .chat-composer-box — · 메신저), one line: ＋ and ↑ the same size, the same 6px
   from the box edge on every side, text centred between */
@media (max-width: 700px) {
  html.mshell :is(.hc, .adc):not(.m-open) .chat-composer-box, html.mshell.mshell.mshell body .bz .bz-form.bz-form:not(.m-open) { border-radius: 27px !important; padding: 6px !important; column-gap: 6px !important; align-items: center !important; }
  html.mshell .chat-composer-box .composer-input, html.mshell body .bz .bz-form > textarea { display: block !important; }   /* inline-block left a descender gap under it */
  html.mshell :is(.hc, .adc):not(.m-open) .chat-composer-box .composer-input, html.mshell body .bz .bz-form:not(.m-open) > textarea {
    min-height: 40px !important; max-height: 40px !important; height: 40px !important; padding: 8px 2px !important; line-height: 24px !important; }
  html.mshell .hc:not(.m-open) .hc-box .hc-ghost { padding: 8px 2px !important; line-height: 24px !important; }
  html.mshell body .bz .bz-form:not(.m-open) > textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.mshell :is(.hc, .adc):not(.m-open) .chat-composer-box > .composer-plus, html.mshell :is(.hc, .adc):not(.m-open) .chat-composer-box .composer-send, html.mshell :is(.hc, .adc):not(.m-open) .chat-composer-box .composer-stop,
  html.mshell body .bz .bz-form:not(.m-open) > .m-plus, html.mshell body .bz .bz-form:not(.m-open) .m-send {
    width: 40px !important; height: 40px !important; margin: 0 !important; align-self: center !important; }
}
/* 📱 AI 채팅: ＋ 새 대화 — a full-width bar over the end of the conversation, right above the composer (mshell.js), only at the bottom */
.ms-newchat { display: none; }
@media (max-width: 700px) {
  html.mshell .aux .hc:not(:has(.hc-log .hc-empty)) > .hc-log { padding-bottom: 76px; }   /* room for the bar at the end */
  html.mshell .aux .hc > .ms-newchat.on { display: flex; align-items: center; justify-content: center; gap: 8px; position: absolute; left: 12px; right: 12px; z-index: 3;
    height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--fg); font-size: 16px; font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,.08); -webkit-tap-highlight-color: transparent; animation: fadein .15s ease; }
  html.mshell .aux .hc > .ms-newchat.on:active { background: var(--bg3); }
  html.mshell .aux .hc.m-open > .ms-newchat { display: none; }
  .ms-newchat .ms-nbh { position: absolute; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 2px;
    font-size: 11.5px; font-weight: 500; color: var(--mut); pointer-events: none; }
  .ms-newchat .ms-nbh.l { left: 14px; } .ms-newchat .ms-nbh.r { right: 14px; }
}
/* 📱 mail: the subject and sender get room to breathe (they ran edge to edge, tight under the bar) */
@media (max-width: 700px) {
  .mail-doc .mail-head { padding: 14px 16px 6px; }
  .mail-doc .mail-head h1 { margin: 0 0 12px !important; font-size: 20px; line-height: 1.42; letter-spacing: -.01em; }
  .mail-doc .mail-head .mail-from { gap: 10px; }
}
/* 📱 pinch: only the tab's content zooms (mshell.js sets --cz on the scroll body); the page itself never zooms */
@media (max-width: 700px) {
  html.mshell, html.mshell body { touch-action: pan-x pan-y; }
  html.mshell .epane .editor-body.ms-cz > * { zoom: var(--cz, 1); width: var(--cw) !important; min-width: var(--cw) !important; max-width: none !important; flex: none !important; }   /* magnified, not reflowed: pan around */
  html.mshell .epane .editor-body.ms-cz { overflow: auto !important; }
}
/* messenger: a final answer's details — a plain 펼치기 / 숨기기, the folded text reads like the rest (no indent, same size) */
details.bz-fold { margin: 4px 0 0; padding: 0; font-size: inherit; color: inherit; background: none; cursor: auto; }
details.bz-fold > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 14px;
  font-size: 12.5px; color: var(--mut); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
details.bz-fold > summary::-webkit-details-marker { display: none; }
details.bz-fold > summary:hover { color: var(--fg); background: var(--bg2); }
details.bz-fold > summary .bz-f-c, details.bz-fold[open] > summary .bz-f-o { display: none; }
details.bz-fold[open] > summary .bz-f-c { display: inline; }
details.bz-fold > summary .bz-f-o::after { content: " ▾"; } details.bz-fold[open] > summary .bz-f-c::after { content: " ▴"; }
details.bz-fold[open] { display: flex; flex-direction: column-reverse; }   /* open: the text, then 숨기기 under it */
details.bz-fold[open] > summary { align-self: flex-start; margin-top: 4px; }
details.bz-fold > .bz-fold-body { margin: 0; padding: 0; border: 0; font-size: inherit; }

/* ── 채팅 집중 모드: ☰ = 대화 목록 열기/닫기 · ◫ = 오른쪽에 채팅 칸 추가 (chat.js splits). The main chat's grid takes the
   columns as list | sash | main [| sash | column]…; .hc-splits is display:contents so its sashes and columns are grid items. */
@media (min-width: 901px) {
html.max-aux.at-hermes .aux > .hc { grid-template-columns: var(--fcl, 280px) 5px var(--hc-cols, minmax(0, 1fr)); grid-template-rows: auto auto minmax(0, 1fr) auto; }
html.max-aux.at-hermes.hc-list-off .aux > .hc { grid-template-columns: 0px 0px var(--hc-cols, minmax(0, 1fr)); }
html.max-aux.hc-list-off .aux > .hc > .fsash { display: none !important; }
/* the list slides in / out (owner 2026-11-06): its column's width animates while chat.js marks the toggle (hc-list-anim — not while
   dragging the divider); folded, it stays laid out but invisible (no focus, no clicks) */
html.max-aux.hc-list-anim.at-hermes .aux > .hc { transition: grid-template-columns .24s cubic-bezier(.2,.8,.2,1); }
html.max-aux.at-hermes .aux > .hc > .hc-drawer { overflow: hidden; min-width: 0; transition: opacity .2s ease, visibility 0s; }
html.max-aux.at-hermes .aux > .hc > .hc-drawer > * { min-width: var(--fcl, 280px); }
html.max-aux.at-hermes.hc-list-off .aux > .hc > .hc-drawer { visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s .24s; }
html.max-aux:not(.at-hermes).hc-list-off .aux > .hc > .hc-drawer { display: none !important; }
/* 집중 모드 (owner 2026-11-06): the header row runs over the list too — the list (docked or floating) starts under it */
html.max-aux.at-hermes .aux > .hc > .hc-tabs { grid-column: 1 / 4; }
html.max-aux.at-hermes .aux > .hc > .hc-drawer, html.max-aux.at-hermes .aux > .hc > .fsash { grid-row: 2 / -1; }
/* [작업공간 | 채널] at the top of the list; on the 채널 side the list is the 메신저 rooms (chat.js hc-dr-ch · .hc-drooms) */
/* the drawer's header = one row: [검색] [작업공간 | 채널] [«] (owner 2026-11-06) */
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 8px 40px 8px 10px; }
.hc-dsearch { display: none; }
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead > .hc-dsearch { display: block; flex: 1 1 auto; min-width: 0; height: 28px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 12.5px; cursor: text; }
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead > .hc-dsearch:focus { outline: none; border-color: var(--acc); }
   /* the header's box searches the rooms */
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead > :is(b, .mut) { display: none; }   /* "대화 목록 · 고르면 이어서 대화합니다" off (owner 2026-11-06) */
/* ☰ hovered while folded: the list floats over the chat, under the header (chat.js hc-list-peek / -peekout) */
@keyframes hc-peek-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
html.max-aux.at-hermes.hc-list-off.hc-list-peek .aux > .hc > .hc-drawer { position: absolute; top: 0; left: 0;   /* (its grid area starts under the header row) */
  bottom: 8px; z-index: 30;
  width: var(--fcl, 280px); height: auto; visibility: visible; opacity: 1; transform: none; border: 1px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); animation: hc-peek-in .18s cubic-bezier(.2,.8,.2,1); transition: opacity .18s ease, transform .18s ease; }
html.max-aux.at-hermes.hc-list-off.hc-list-peek.hc-list-peekout .aux > .hc > .hc-drawer { opacity: 0; transform: translateX(-16px); pointer-events: none; }
html.max-aux .aux > .hc > .hc-drawer, html.max-aux .aux > .hc > .fsash { grid-row: 1 / -1; }
html.max-aux .aux > .hc > .hc-tabs { grid-column: 3; grid-row: 1; }
html.max-aux .aux > .hc > .hc-head { grid-row: 2; }
html.max-aux .aux > .hc > .hc-log { grid-row: 3; }
html.max-aux .aux > .hc > .hc-composer { grid-row: 4; }
}
.hc-splits { display: none; }
html.max-aux.at-hermes .hc-splits { display: contents; }
html.max-aux .hc-splits > * { grid-row: 1 / -1; }
html.max-aux.at-hermes .hc.hc-sp { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
html.max-aux .hc.hc-sp > .hc-drawer.hc-drawer, html.max-aux .hc.hc-sp > .hc-drawer.hc-drawer[hidden] { display: none !important; }
html.max-aux .hc.hc-sp > .hc-log { flex: 1; min-height: 0; }
html.max-aux .hc.hc-sp > .hc-head { justify-content: center; height: 48px; }
/* the editor's tab strip (chat.js tabsPaint, focus mode): same height, tabs, ◫ · 모두 닫기 / ✕, drop marks and drop zones */
.hc-tabs.etabs { gap: 0; padding: 0; height: 38px; background: var(--bg2); scrollbar-width: none; position: relative; }
/* [작업공간 | 채널] ☰ at the strip's start (owner 2026-11-04), held at the left edge while the tabs scroll */
.hc-tabs.etabs > .hc-etlead { position: sticky; left: 0; z-index: 3; flex: none; display: flex; align-items: center; padding-left: 6px; background: var(--bg2); box-shadow: 8px 0 8px var(--bg2); }
.hc-etlead > .etabs-list { position: static; box-shadow: none; }
.hc-tabs.etabs > .hc-et-ghost { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 1; }
.hc-tabs.etabs::-webkit-scrollbar { display: none; }
/* every chat tab has one fixed width — not by its title, the number of tabs or which one is in front (owner 2026-11-04);
   more tabs than fit scroll (☰ lists them all) */
.hc-tabs.etabs > .hc-et { flex: 0 0 auto; width: 160px; min-width: 0; max-width: none; padding-left: 10px; gap: 5px; }
/* the side panel (not 집중 모드): no 💬 icon, a little narrower — the title is what tells the tabs apart */
html:not(.max-aux) .hc-tabs.etabs > .hc-et { width: 140px; } html:not(.max-aux) .hc-tabs.etabs > .hc-et .ei { display: none; }
.hc-et .dot { display: none; flex: none; width: 7px; height: 7px; border-radius: 50%; }
.hc-et.run .dot { display: block; background: var(--acc); animation: hc-tab-pulse 1.2s ease-in-out infinite; }
.hc-et.unread .dot { display: block; background: #e5484d; } .hc-et.unread .et { color: var(--fg); font-weight: 600; }
.hc-et.dropbefore { box-shadow: inset 3px 0 0 var(--acc); } .hc-et.dropafter { box-shadow: inset -3px 0 0 var(--acc); }
html.max-aux .aux > .hc > .hc-gdrop { grid-column: 3; grid-row: 1 / -1; }
.hc-gdrop[data-z="left"] { right: 50%; } .hc-gdrop[data-z="right"] { left: 50%; }
html.max-aux .hc-splits > .gsash { align-self: stretch; }
/* several columns: the one not in focus has the faded strip of an editor group out of focus */
html.hc-split-on.max-aux :is(.aux > .hc, .hc-sp):not(.hc-fcs) > .hc-tabs .hc-et.on { border-top-color: color-mix(in srgb, var(--acc) 35%, transparent); }
html.hc-split-on.max-aux :is(.aux > .hc, .hc-sp):not(.hc-fcs) > .hc-tabs.etabs { background: color-mix(in srgb, var(--bg2) 70%, var(--bg)); }
@media (max-width: 900px) {
  html.max-aux .hc-splits { display: none !important; }
}

/* 집중 모드 대화 목록: « (list header) folds it, » (chat header, folded only) unfolds it — ☰ does both too */
.hc-lfold, .hc-lopen { display: none; }
@media (min-width: 901px) {
  html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead { position: relative; padding-right: 44px; }
  html.max-aux.at-hermes:not(.hc-list-off) .hc-lfold { display: inline-flex; position: absolute; top: 50%; transform: translateY(-50%); right: 8px; }
  html.max-aux.at-hermes.hc-list-off .aux > .hc > .hc-head .hc-lopen { display: inline-flex; flex: none; margin-right: 2px; }
  :is(.hc-lfold, .hc-lopen) { width: 30px; height: 30px; padding: 0; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: var(--mut); cursor: pointer; }
  :is(.hc-lfold, .hc-lopen):hover { background: var(--bg3); color: var(--fg); }
}

/* 채팅 집중 모드 헤더 한 줄 (owner 2026-11-06): no "AI" row and no title row — each column's tab strip is its only header;
   its head (답변 중 · 모두 승인 · ⚙ · #) sits at the strip's right end (chat.js sets --hch-w = the head's width so the tabs
   stop before it), and the panel's ⛶ · ✕ sit at the far right of the rightmost column. The title is the tab; ☰ is in the strip. */
@media (min-width: 901px) {
  html.max-aux.at-hermes .aux { position: relative; }
  html.max-aux.at-hermes .aux > .aux-tabs { position: absolute; top: 0; right: 0; z-index: 6; height: 38px; padding: 0 4px; gap: 0; background: var(--bg2); }
  html.max-aux.at-hermes .aux > .aux-tabs .atab, html.max-aux.at-hermes .aux > .aux-tabs .spacer { display: none; }
  html.max-aux.at-hermes .aux > .aux-tabs .icon { width: 30px; height: 30px; }
  html.max-aux.at-hermes .aux > .aux-tabs [data-cmd="close-aux"] { display: none; }   /* 닫기 off in 집중 모드 (owner 2026-11-06): ⛶ leaves it */
  html.max-aux.at-hermes .aux > .hc, html.max-aux.at-hermes .hc.hc-sp { position: relative; }
  html.max-aux.at-hermes :is(.aux > .hc, .hc.hc-sp) > .hc-tabs:not([hidden]) + .hc-head {
    position: absolute; top: 0; right: var(--hch-r, 0px); z-index: 5; height: 38px; width: auto; max-width: 60%;
    justify-content: flex-end; gap: 6px; padding: 0 6px 0 8px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg2); }
  html.max-aux.at-hermes .aux > .hc > .hc-tabs:not([hidden]) + .hc-head { grid-column: 3; grid-row: 1; }
  html.max-aux.at-hermes :is(.aux > .hc, .hc.hc-sp) > .hc-tabs:not([hidden]) + .hc-head :is(.hc-sess, .hc-lopen) { display: none !important; }
  html.max-aux.at-hermes :is(.aux > .hc, .hc.hc-sp) > .hc-tabs:not([hidden]) + .hc-head > * { flex: none; }
  html.max-aux.at-hermes :is(.aux > .hc, .hc.hc-sp) > .hc-tabs:not([hidden]) + .hc-head { container-type: normal; }   /* sized by its content (chat.css: inline-size = 0 wide here) */
  html.max-aux.at-hermes :is(.aux > .hc, .hc.hc-sp) > .hc-tabs:not([hidden]) { padding-right: calc(var(--hch-w, 0px) + var(--hch-r, 0px)); }
  /* the rightmost column also leaves room for ⛶ · ✕ */
  html.max-aux.at-hermes:not(.hc-split-on) .aux > .hc, html.max-aux.at-hermes .hc-splits > .hc-sp:last-child { --hch-r: 40px; }
  html.max-aux.at-hermes:not(.hc-split-on) .aux > .hc > .hc-tabs[hidden] + .hc-head { padding-right: 44px; }
  /* 채널 side, the 메신저 list docked at the right: the message box is centred in the room left of it, not under it */
}

/* documents: a long unbroken path / URL / inline code wraps instead of widening the page (phones scrolled sideways, owner 2026-10-30) */
.doc { overflow-wrap: break-word; }
.doc :not(pre) > code, .doc a { overflow-wrap: anywhere; }
/* 📱 send / stop: the arrow centred — as a grid, the hidden label text ("보내기", "↑") was a second row and pushed the arrow up (owner 2026-10-30) */
@media (max-width: 700px) {
  html.mshell .hc .hc-box .hc-send, html.mshell .hc .hc-box .hc-stop, html.mshell body .bz .bz-form .m-send { display: flex !important; align-items: center; justify-content: center; line-height: 0; }
  html.mshell .hc .hc-box .hc-send::before, html.mshell .hc .hc-box .hc-stop::before, html.mshell body .bz .bz-form .m-send::before { flex: none; }
  html.mshell .hc .hc-box .hc-send[hidden], html.mshell .hc .hc-box .hc-stop[hidden] { display: none !important; }
}
/* 📱 ＋ in the composer: its attach tools as a small menu above it (mshell.js MPlusMenu) */
.m-plusmenu { position: fixed; z-index: 90; min-width: 180px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  box-shadow: 0 8px 28px rgba(0,0,0,.18); display: flex; flex-direction: column; animation: fadein .12s ease; }
.m-plusmenu button { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent;
  color: var(--fg); font-size: 15.5px; text-align: left; -webkit-tap-highlight-color: transparent; }
.m-plusmenu button:active { background: var(--bg3); }
.m-plusmenu svg { flex: none; width: 21px; height: 21px; color: var(--mut); }
/* 📱 새 대화 → which agent (chat.js newPick) */
.hc-agpick-h { padding: 8px 14px 6px; font-size: 13px; color: var(--mut); }
.hc-agpick button { min-height: 58px; }
.hc-agpick .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hc-agpick .tx b { font-size: 15.5px; font-weight: 600; } .hc-agpick .tx i { font-style: normal; font-size: 12.5px; color: var(--mut); }
.hc-agpick button.on { background: var(--bg2); } .hc-agpick .ck { flex: none; color: var(--acc); font-weight: 700; }
/* 설정 · 업무 점검 (owner 2026-10-30): label | control, the tip on its own line under the control — as a third column the
   tip took the room and squeezed checkboxes into a vertical strip; controls share one width */
@media (min-width: 701px) {
  #sys :is(.wc-body, .wc-readme) .bs-row { grid-template-columns: 170px minmax(0, 1fr); row-gap: 3px; margin: 12px 0; align-items: center; }
  #sys :is(.wc-body, .wc-readme) .bs-row > .wc-tip { grid-column: 2; line-height: 1.45; }
  #sys :is(.wc-body, .wc-readme) .bs-row > select { width: 100%; max-width: 440px; justify-self: start; }
  #sys :is(.wc-body, .wc-readme) .bs-row > :is(.wc-num, .bs-chk) { justify-self: start; }
  #sys :is(.wc-body, .wc-readme) .wc-num select { width: 220px; }
  #sys :is(.wc-body, .wc-readme) .bs-row > .wc-dev { max-width: 440px; }
  #sys .wc-body > .wc-ext { margin-left: 178px; max-width: 440px; }
  #sys .wc-body > .wc-on { margin: 4px 0 6px; }
  #sys :is(.wc-body, .wc-readme) .bs-chk { margin-left: 0; }
}
/* … and in a narrow card (the settings tab beside the chat), the label goes above its control */
#sys .wc-body { container-type: inline-size; }
@container (max-width: 600px) {
  #sys :is(.wc-body, .wc-readme) .bs-row { grid-template-columns: minmax(0, 1fr) !important; row-gap: 4px; }
  #sys :is(.wc-body, .wc-readme) .bs-row > .wc-tip { grid-column: 1; }
  #sys .wc-body > .wc-ext { margin-left: 0; }
}
/* labels line up with their control, not with control + tip */
#sys :is(.wc-body, .wc-readme) .bs-row { align-items: start; }
#sys :is(.wc-body, .wc-readme) .bs-row > label:first-child { line-height: 34px; }
#sys :is(.wc-body, .wc-readme) .bs-row > :is(.bs-chk, .wc-num) { min-height: 34px; margin: 0; display: inline-flex; align-items: center; }
@container (max-width: 600px) { #sys :is(.wc-body, .wc-readme) .bs-row > label:first-child { line-height: 1.4; } }
/* 설정: the save bar of the section on screen sits in a dock of its own at the pane's right (owner 2026-10-30) — outside the
   settings column, so it never covers a setting; a narrow pane puts the dock under the settings instead (mshell.js snDock) */
@media (min-width: 701px) {
  .editor-body.sn-on.sd-has { grid-template-columns: 248px minmax(0, 1fr) 176px; }
  .editor-body.sn-on.sd-has.sd-row { grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .editor-body.sn-on.sd-has.sd-row > .sn-nav { grid-row: 1 / span 2; }
  .editor-body.sn-on > .sn-dock { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 0; padding: 16px 14px 20px;
    border-left: 1px solid var(--line); background: var(--bg2); }
  .editor-body.sn-on > .sn-dock[hidden] { display: none; }
  .editor-body.sn-on.sd-row > .sn-dock { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    padding: 10px 16px; border-left: 0; border-top: 1px solid var(--line); }
  .sn-dock .sd-t { font-size: 12px; color: var(--mut); line-height: 1.4; overflow-wrap: anywhere; }
  .sn-dock button { min-height: 36px; padding: 6px 12px; border-radius: 9px; font-size: 13.5px; line-height: 1.3; word-break: keep-all; white-space: normal; }
  .sn-dock button.sec { border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
  .sn-dock .sd-msg { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
  .sn-dock .sd-msg:not([class*="ok"]):not([class*="err"]):not([class*="warn"]) { color: var(--mut); }
  .sn-dock .sd-msg:empty { display: none; }
  .editor-body.sd-row .sn-dock .sd-t { margin-right: auto; }
  /* the original bar stays in place as an invisible marker (its position says which settings it saves) */
  #sys .bs-acts.sd-docked { visibility: hidden; height: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; position: static !important; box-shadow: none !important; }
}

/* ── 설정 › AI 라우터 (omni.js, redesign owner 2026-10-30): status line · tabs [콤보 | 프로바이더 | 사용량 | 호출 기록] ── */
.omr { container-type: inline-size; display: flex; flex-direction: column; gap: 12px; }
#sys .omr.om-sec { border: 0; padding: 0; background: none; }
.omr-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.omr-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.omr-stat b { font-size: 15px; } .omr-stat .mut { font-size: 13px; }
.omr-top .om-msg { font-size: 13px; }
.omr-ib { height: 34px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; text-decoration: none; font-size: 13px; }
.omr-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--mut); }
.omr-dot.ok { background: var(--ok); } .omr-dot.warn { background: var(--warn); } .omr-dot.err { background: var(--no); } .omr-dot.off { background: var(--line); }
#sys .omr-lead { margin: 0; font-size: 13px; line-height: 1.6; }
.omr-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.omr-tabs button { position: relative; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--mut); font-size: 14px; font-weight: 500; white-space: nowrap; border-radius: 0; }
.omr-tabs button.on { color: var(--fg); border-bottom-color: var(--acc); font-weight: 600; }
.omr-tabs button:hover { color: var(--fg); }
.omr-bad { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); vertical-align: 2px; }
.omr-pane { display: flex; flex-direction: column; gap: 10px; }
.omr-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.omr-sp { flex: 1; }
.omr-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); min-width: 0; }
.omr-list { display: flex; flex-direction: column; gap: 8px; }
.omr-sub { font-size: 12.5px; font-weight: 600; color: var(--mut); margin: 0 0 8px; }
.omr-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--bg3); color: var(--fg); font-size: 12px; white-space: nowrap; }
.omr-chip.loc { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.omr-chip.ext { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc); }
.omr-chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.omr-sm { height: 30px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; }
.omr-del:hover { color: var(--no); }
/* 콤보 */
.omr-ch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.omr-name { font-size: 15px; }
.omr-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; }
.omr-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; max-width: 100%; min-width: 0; }
.omr-steps li.ar { border: 0; padding: 0 2px; color: var(--mut); }
.omr-steps .n { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); font-size: 11px; color: var(--mut); flex: none; }
.omr-steps .pv { font-size: 11px; font-weight: 600; flex: none; }
.omr-steps .loc .pv { color: var(--ok); } .omr-steps .ext .pv { color: var(--acc); }
.omr-steps .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.omr-ed { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 14%, transparent); display: flex; flex-direction: column; gap: 8px; max-width: none; margin: 0; }
.omr-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 12px; margin: 4px 0 0; max-width: none; }
.omr-form label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 12.5px; color: var(--mut); }
#sys .omr-form :is(input, select), #sys .omr .om-pick :is(input, select) { height: 36px; width: 100%; box-sizing: border-box; }
.omr .om-chain { gap: 6px; }
.omr .om-sline { padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font); font-size: 13px; background: var(--bg2); }
.omr .om-sline::before { width: 20px; }
.omr .om-sline .omr-pv { flex: none; font-size: 11.5px; font-weight: 600; } .omr .om-sline .omr-pv.loc { color: var(--ok); } .omr .om-sline .omr-pv.ext { color: var(--acc); }
.omr .om-sline .omr-m { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.omr .om-sline button { height: 28px; min-width: 30px; padding: 0 6px; }
.omr .om-pick { padding: 8px; border: 1px dashed var(--line); border-radius: 8px; }
.omr .om-pick select, .omr .om-pick input { flex: 1 1 200px; min-width: 0; }
.omr .om-pick button { height: 36px; }
#sys .omr-note { margin: 0; font-size: 12.5px; }
.omr .om-acts-row { margin-top: 2px; }
/* 프로바이더 */
.omr-prov { display: flex; align-items: center; gap: 12px; }
.omr-pi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.omr-url { font-size: 12.5px; overflow-wrap: anywhere; } .omr-perr { font-size: 12.5px; overflow-wrap: anywhere; }
.omr-pa { display: flex; gap: 6px; flex: none; }
.omr .om-add { margin: 0; } .omr .om-add summary { font-size: 14px; font-weight: 500; }
.omr .om-add[open] summary { margin-bottom: 10px; }
.omr .om-add .om-acts-row { margin-top: 10px; }
/* 사용량 */
.omr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.omr-tile { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; }
.omr-tile span { font-size: 12px; color: var(--mut); } .omr-tile b { font-size: 20px; font-weight: 700; }
.omr-days { display: flex; align-items: flex-end; gap: 6px; height: 130px; overflow-x: auto; }
.omr-day { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.omr-day i { display: block; width: 70%; max-width: 28px; border-radius: 4px 4px 0 0; background: var(--acc); opacity: .85; }
.omr-day em { font-style: normal; font-size: 10.5px; color: var(--mut); white-space: nowrap; }
.omr-day span { font-size: 11px; color: var(--mut); }
.omr-two { display: grid; grid-template-columns: 1fr; gap: 10px; }
@container (min-width: 760px) { .omr-two { grid-template-columns: 1fr 1fr; } }
.omr-ut { overflow-x: auto; } .omr-ut .om-t { width: 100%; }
.omr-ut .om-t td:first-child { overflow-wrap: anywhere; }
.omr-ut .om-t :is(td, th):not(:first-child) { text-align: right; white-space: nowrap; }
/* 호출 기록 */
.omr-row { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.omr-sub + .omr-row { border-top: 0; padding-top: 2px; }
.omr-t { flex: none; width: 76px; font-size: 12.5px; color: var(--mut); font-variant-numeric: tabular-nums; padding-top: 2px; }
.omr-rm { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.omr-meta { font-size: 12px; }
.omr-why { font-size: 12.5px; color: var(--mut); margin-top: 2px; }
.omr-st { flex: none; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.omr-st.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); } .omr-st.err { color: var(--no); background: color-mix(in srgb, var(--no) 12%, transparent); }
@container (max-width: 520px) {
  .omr-prov { flex-wrap: wrap; } .omr-pa { width: 100%; justify-content: flex-end; }
  .omr-t { width: 54px; }
}
#sys .omr input:not([type=checkbox]):not([type=radio]) { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; box-sizing: border-box; }
#sys .omr input:focus { outline: 2px solid color-mix(in srgb, var(--acc) 40%, transparent); outline-offset: 0; border-color: var(--acc); }
.omr-ch { flex-wrap: nowrap; align-items: flex-start; }
.omr-cn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.omr-ca { display: flex; gap: 6px; flex: none; }
.omr-chatpick { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mut, #888); cursor: pointer; white-space: nowrap; }
.omr-chatpick input { margin: 0; }
.omr-stat { flex: 1 1 220px; }
.omr-top .om-msg { order: 9; flex-basis: 100%; } .omr-top .om-msg:empty { display: none; }
/* 메신저 모아보기: 보낼 채널·담당자 고르기, #채널 자동완성 */
.bz-pick .sb-card { height: auto; width: min(92vw, 420px); max-height: 70vh; }
.bz-pick .bzp-text { padding: 8px 14px; font-size: 13px; color: var(--mut); border-bottom: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; max-height: 4.5em; overflow: hidden; }
.bz-pick .pm-list button { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; font-size: 14px; }
.bz-pick .pm-list button:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.bz-pick .bzp-sub, .bz-mention .mi-sub { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-mention .mi { display: flex; gap: 8px; }
#skill-learn .sa-cfg { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }

/* PC, normal layout: no separate "AI" row — the chat's tab strip is the panel's top row and the panel's ⛶ · ✕ sit at
   its right end (the "AI" button stays in the DOM: scripts click it to bring the chat panel up) */
@media (min-width: 901px) {
  html:not(.max-aux) .aux { position: relative; }
  html:not(.max-aux) .aux > .aux-tabs { position: absolute; top: 0; right: 0; z-index: 4; height: 38px; padding: 0 4px; gap: 0;
    border-bottom: 1px solid var(--line); background: var(--bg2); }
  html:not(.max-aux) .aux > .aux-tabs .atab, html:not(.max-aux) .aux > .aux-tabs .spacer { display: none; }
  html:not(.max-aux) .aux > .aux-tabs .icon { width: 30px; height: 30px; }
  html:not(.max-aux) .aux > .hc > .hc-tabs.etabs { margin-right: 68px; }
  html:not(.max-aux) .aux > .hc > .hc-tabs[hidden] + .hc-head { padding-right: 72px; }
}

/* 뷰어 동영상·음성 미리보기 (render_file .mediav) */
.mediav { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 0; background: #000; }
.mediav video { max-width: 100%; max-height: 100%; }
.mediav.audio { height: auto; padding: 24px 12px; background: var(--bg3); }
.mediav audio { width: min(640px, 100%); }
/* ── Inbox 홈 대시보드: 왼쪽 프로젝트 목록 + 카드 칸 (2026-10-31) ── */
.chip.rp-newchip { display: none; }
.home.hb { display: flex; flex-direction: row; height: 100%; min-height: 0; overflow: hidden; }
.hb-rail { flex: none; width: 188px; padding: 18px 10px; border-right: 1px solid var(--line); background: var(--bg2); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.hb-rh { padding: 0 12px 8px; font-size: 12px; color: var(--mut); }
.hb-rail button { text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 14.5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-rail button:hover { background: var(--bg3); }
.hb-rail button.on { background: var(--sel); color: var(--acc); font-weight: 650; }
.hb-main { flex: 1; min-width: 0; overflow: auto; padding: 22px 26px 30px; }
.hb-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 24px; align-items: start; }
.hb-sec h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--fg); text-transform: none; background: none; border: 0; padding: 0; display: flex; align-items: baseline; gap: 0; white-space: pre; }
.hb-sec h3 .hb-n { font-weight: 600; } .hb-sec h3.hb-non .hb-n, .hb-sec h3.hb-non > span + * { display: none; }
.hb-sec h3 .wc-set { margin-left: auto; font-size: 12px; font-weight: 400; }
.hb-sec .items { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.hb-sec .items > li[hidden] { display: none; }
.hb-sec .items a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .12s, box-shadow .12s; }
.hb-sec .items a:hover { background: var(--bg); border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); box-shadow: 0 3px 10px rgba(0,0,0,.07); }
.hb-sec .items .t { font-size: 15px; font-weight: 600; line-height: 1.4; }
.hb-sec .items .s { margin-top: 8px; gap: 8px; align-items: center; font-size: 12.5px; }
.hb-sec .items .s > span:not(.chip) { overflow: hidden; text-overflow: ellipsis; }
.hb-sec .chip { padding: 0 8px; border-radius: 6px; font-size: 12px; line-height: 21px; font-weight: 600; }
.hb-sec[data-k="apv"] .chip { background: color-mix(in srgb, #f59e0b 16%, var(--bg)); color: #b45309; }
.hb-sec[data-k="req"] .chip { background: color-mix(in srgb, #6366f1 14%, var(--bg)); color: #4f46e5; }
.hb-sec[data-k="rep"] .chip.rp-newchip { display: inline-block; background: color-mix(in srgb, #22c55e 16%, var(--bg)); color: #15803d; }
.hb-sec[data-k="rep"] .rp-dot { display: none; }
.hb-sec[data-k="rep"] .items a:not(.rp-new) .t { font-weight: 500; }
.hb-empty { padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--mut); font-size: 13px; }
.hb-more { margin-top: 10px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--acc); font: inherit; font-size: 13px; cursor: pointer; }
.hb-more:hover { background: var(--bg3); }
.hb-ov { margin-bottom: 30px; }   /* the summary sits above the board (owner 2026-11-01) */
.hb-ov .ov { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hb-ov .ov[hidden], .hb-ov > div[hidden] { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hb-sec[data-k="apv"] .chip { color: #fbbf24; }
  :root:not([data-theme="light"]) .hb-sec[data-k="req"] .chip { color: #a5b4fc; }
  :root:not([data-theme="light"]) .hb-sec[data-k="rep"] .chip.rp-newchip { color: #4ade80; }
}
:root[data-theme="dark"] .hb-sec[data-k="apv"] .chip { color: #fbbf24; }
:root[data-theme="dark"] .hb-sec[data-k="req"] .chip { color: #a5b4fc; }
:root[data-theme="dark"] .hb-sec[data-k="rep"] .chip.rp-newchip { color: #4ade80; }
@container eg (max-width: 1020px) { .hb-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container eg (max-width: 720px) {
  .home.hb { flex-direction: column; overflow: auto; }
  .hb-rail { width: auto; flex-direction: row; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; gap: 6px; scrollbar-width: none; } .hb-rail::-webkit-scrollbar { display: none; }
  .hb-rh { display: none; }
  .hb-rail button { flex: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 13.5px; }
  .hb-rail button.on { border-color: var(--acc); }
  .hb-main { overflow: visible; padding: 16px; }
  .hb-board { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
/* ── 입력창: 📁 경로 넣기 창, 💡 추천 문구, 모바일 메신저 ＋ 위치 (2026-10-31) ── */
.pp-modal .pp-card { width: min(640px, 100%); height: min(70vh, 640px); display: flex !important; flex-direction: column; }
.pp-card > * { flex: none; } .pp-card > .pp-list { flex: 1 1 auto; }
.pp-card .pp-crumbs { padding: 8px 14px 0; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow-x: auto; }
.pp-card .pp-crumbs a { color: var(--acc); text-decoration: none; }
.pp-card .pp-q { box-sizing: border-box; width: calc(100% - 28px); margin: 8px 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; }
.pp-card .pp-list { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 0 6px 6px; overflow-y: auto; }
.pp-card .pp-list li { display: flex; align-items: baseline; gap: 10px; padding: 0 8px; border-radius: 8px; }
.pp-card .pp-list li:hover { background: var(--bg3); }
.pp-card .pp-list li a { flex: 1; min-width: 0; padding: 8px 0; color: var(--fg); text-decoration: none; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-card .pp-list li > span { flex: none; max-width: 45%; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-card .pp-list li.mut { padding: 10px; }
.pp-card .pp-hint { padding: 8px 14px; font-size: 12px; border-top: 1px solid var(--line); }
.hc-pathbtn { border: 0; background: none; font-size: 15px; padding: 0 6px; cursor: pointer; opacity: .8; } .hc-pathbtn:hover { opacity: 1; }
.hc-bar .hc-pathbtn { padding: 0 4px; }
@media (max-width: 700px) {
  .pp-modal .pp-card { height: 100%; }
  .hc .hc-pathbtn { display: none !important; }   /* phones: the ＋ menu has 📁 */
  /* 메신저: ＋ moves down beside 문서 선택 — the one-line box gets the whole width */
  html.mshell body .bz .bz-form:not(.m-open) > textarea { grid-column: 1 / 3 !important; padding-left: 10px !important; }
  html.mshell body .bz .bz-form:not(.m-open) > .m-plus { grid-column: 1; grid-row: 6; width: 30px !important; height: 30px !important; min-height: 0 !important; min-width: 0 !important; margin: 2px 0 0 4px !important; align-self: center !important; }
  html.mshell body .bz .bz-form:not(.m-open) > .m-plus svg { width: 18px; height: 18px; }
  html.mshell body .bz .bz-form:not(.m-open) > .ms-docline { grid-column: 2 / -1; justify-self: start; }
}

/* ☰ open-tab list at the left of the tab strip */
.etabs-list { position: sticky; left: 0; z-index: 2; flex: none; align-self: stretch; padding: 0 11px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--bg2); color: var(--mut); font-size: 15px; box-shadow: 8px 0 8px var(--bg2); cursor: pointer; }
.etabs-list:hover { color: var(--fg); background: var(--bg3); }
.ctxmenu.tablist { max-height: 60vh; overflow-y: auto; min-width: 220px; max-width: min(460px, 92vw); }
.ctxmenu.tablist button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctxmenu.tablist button.on { color: var(--acc); font-weight: 600; }
html.mshell .etabs-list { display: none; }

/* 메신저 (owner 2026-11-17): back in the left sidebar menu — the activity bar's 메신저 (phones: the ☰ 메뉴's 메신저) opens the
   room list (msgrooms.js) in the sidebar, a room opens in the chat panel's 채널 side. The chat panel's own 메신저 서랍 (# button,
   its docked list) is put away on every screen, so the list lives in one place. (2026-11-04 ~ 11-17 it was the other way round.) */
/* 📱 the footer's 설정 sheet: the status bar on top (mshell.js placeStatus) */
@media (max-width: 700px) { .ms-sgrp.ms-fstatus { margin: 2px 6px 10px; } .ms-sgrp.ms-fstatus:empty { display: none; } }

/* ⚙ 설정 menu in the sidebar (owner 2026-11-01): tabs → sections; while it shows, the page drops its own section list */
.view-settings .set-q { display: block; width: calc(100% - 20px); margin: 6px 10px 4px; }
.view-settings .set-menu a { padding-left: 24px; }
.view-settings .set-menu a.on { font-weight: 600; }
.view-settings .set-none { padding: 10px 14px; }
@media (min-width: 701px) {   /* the settings menu lives in the menu panel only (owner 2026-11-01), never inside the page */
  .editor-body.sn-on { grid-template-columns: minmax(0, 1fr) !important; }
  .editor-body.sn-on > .sn-nav { display: none !important; }
  /* 저장 · 적용 dock: a narrow column on the right with its buttons one under another (owner 2026-11-01: less room) */
  /* … a wide pane only; a narrow one (mshell.js sd-row, under 760px) puts it in a row under the settings (owner 2026-11-02) */
  .editor-body.sn-on.sd-has:not(.sd-row) { grid-template-columns: minmax(0, 1fr) 124px !important; grid-template-rows: none !important; }
  .editor-body.sn-on:not(.sd-row) > .sn-dock { grid-column: 2; grid-row: 1; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    justify-content: flex-end; padding: 14px 10px 18px; border-left: 1px solid var(--line); border-top: 0; }
  .editor-body.sn-on:not(.sd-row) .sn-dock button { width: 100%; }
  .editor-body.sn-on.sd-has.sd-row { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) auto !important; }
  .editor-body.sn-on.sd-row > .sn-dock { grid-column: 1; grid-row: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: 6px 8px; padding: 8px 12px; border-left: 0; border-top: 1px solid var(--line); }
  .editor-body.sn-on.sd-row .sn-dock button { width: auto; min-height: 32px; padding: 5px 12px; white-space: nowrap; }
  .editor-body.sn-on.sd-row .sn-dock .sd-msg { flex: 1 1 100%; order: 9; text-align: right; }
}
/* 저장소 › 모니터링 폴더 */
.stg-wl { margin-top: 2px; }
.stg-wt { grid-column: 1 / -1; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.stg-wt[hidden] { display: none; }
.stg-wsel { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.stg-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 13px; }
.stg-chip button { border: 0; background: none; color: var(--mut, #888); cursor: pointer; padding: 0 4px; }
.stg-wnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.stg-wnav button, .stg-wdirs button { font: inherit; font-size: 13px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); cursor: pointer; }
.stg-wnav button.primary { background: var(--accent, #2563eb); color: #fff; border-color: transparent; }
.stg-wnav button:disabled { opacity: .5; cursor: default; }
.stg-wdirs { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; margin-bottom: 8px; }

/* 📥 프로젝트 menu (header Inbox): while it shows on a wide screen, the dashboard drops its own 프로젝트 list */
html.v-projects .view-projects { display: flex; }
.view-projects .proj-menu a.on { background: var(--sel); border-left-color: var(--acc); font-weight: 600; }
.home.hb > .hb-rail { display: none !important; }   /* projects are picked in the menu panel (header 📥 Inbox), owner 2026-11-01 */
/* 📊 프로젝트 현황 charts (app.js vizHtml): headline tiles + one bar chart per measure; one hue (a single series) */
.ovz { --viz-bar: #2a78d6; --viz-track: color-mix(in srgb, var(--fg) 7%, transparent); padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 14px; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .ovz { --viz-bar: #3987e5; } }
:root[data-theme="dark"] .ovz { --viz-bar: #3987e5; }
.ovz-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ovz-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.ovz-tile .k { font-size: 12px; color: var(--mut); }
.ovz-tile b { font-size: 22px; font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; }
.ovz-tile .s { font-size: 11.5px; color: var(--mut); }
.ovz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.ovz-chart { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.ovz-chart figcaption { font-size: 12.5px; font-weight: 600; color: var(--fg); margin-bottom: 2px; }
.ovz-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 64px; align-items: center; gap: 8px; font-size: 12px; padding: 2px 0; border-radius: 4px; }
.ovz-row:hover { background: var(--bg3); }
.ovz-n { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovz-track { height: 10px; border-radius: 4px; background: var(--viz-track); overflow: hidden; }
.ovz-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--viz-bar); }
.ovz-v { color: var(--mut); text-align: right; font-variant-numeric: tabular-nums; }
@container eg (max-width: 880px) { .ovz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container eg (max-width: 560px) { .ovz-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) { .ovz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ovz-grid { grid-template-columns: minmax(0, 1fr); } }
/* 설정 › 로컬 모델 (owner 2026-11-01): the list does 설치 · 삭제 — the cards' own copies are not shown twice */
section.set[data-sec="ollama"] .set-acts .sa:has([data-act="pull"]), section.set[data-sec="ollama"] .set-acts .sa:has([data-act="rm"]),
section.set[data-sec="chat-model"] .set-acts .sa:has([data-act="pull"]), section.set[data-sec="chat-model"] .set-acts .sa:has([data-act="progress"]),
section.set[data-sec="chat-model"] .set-acts .sa:has([data-act="rm"]) { display: none; }
.mm-pull { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; justify-content: flex-start !important; }
#ai-local .sys-t td:nth-child(6) { max-width: 110px; font-size: 11px; overflow-wrap: anywhere; }
#ai-local .sys-t { width: 100%; table-layout: auto; }
.mm-pull .mm-pin { flex: 1; min-width: 200px; height: 30px; }
.mm-out { max-height: 220px; overflow: auto; font-size: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.mm-acts { white-space: nowrap; } .mm-acts .mm-del { margin-left: 4px; font-size: 12px; padding: 2px 6px; }
.mm-acts .mm-del:hover { color: var(--no, #b91c1c); }
.mm-alias { margin-top: 10px; } .mm-alias summary { cursor: pointer; color: var(--mut); font-size: 13px; }

/* 업무 점검 › 깨우기 조건 (static/workcycle.js wakeBlock) */
.wc-wake { margin: 14px 0 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.wc-wake h5 { margin: 0 0 8px; }
.wc-wake .wk-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 0; border-top: 1px dashed var(--line); }
.wc-wake .wk-r > .bs-chk { min-width: 150px; }
.wc-wake .wk-r .wc-num input { width: 110px; }
.wc-wake select { height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: inherit; }
.wc-wake .wk-r .wc-tip { flex: 1 1 220px; }
.wc-wake .wk-last { margin-top: 8px; font-size: 13px; }
.wc-wake .wk-last ul { margin: 4px 0 0; padding-left: 18px; }

/* 📱 edge strips over a frame (🖥 데스크톱 · 🌐 브라우저): they take the swipe that would start inside the iframe */
.edge-swipe { display: none; }
@media (max-width: 900px) {
  .has-edge-swipe { position: relative; }
  .edge-swipe { display: block; position: absolute; top: 0; bottom: 0; width: 22px; z-index: 6; touch-action: pan-y; background: transparent; }
  .edge-swipe.l { left: 0; }
  .edge-swipe.r { right: 0; }
}

/* 🖥 데스크톱 탭: 화면 확대 버튼 + 키 바(터미널과 같은 .kbar) */
.has-dz { position: relative; }
.dz-bar { position: absolute; top: 8px; right: 30px; z-index: 7; display: flex; gap: 2px; padding: 2px; border-radius: 16px; background: rgba(30,30,30,.72); backdrop-filter: blur(4px); opacity: .55; transition: opacity .15s; }
.dz-bar:hover, .dz-bar.on, .dz-bar:active { opacity: 1; }
.dz-bar button { min-width: 30px; height: 28px; padding: 0 8px; border: 0; border-radius: 14px; background: transparent; color: #fff; font: 600 14px/1 ui-monospace, Menlo, monospace; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.dz-bar button:active { background: rgba(255,255,255,.25); }
.dz-bar .pct { font-size: 12px; min-width: 46px; }
@media (max-width: 900px) { .has-edge-swipe > .edge-swipe { bottom: var(--kbh, 0px); } }

/* 🔔 ⚙ 알림 설정 (in the bell panel) + toast position (알림 설정 › 토스트 위치; phones keep theirs) */
.noti-set.on { color: var(--acc); }
.noti-cfg { overflow: auto; padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.noti-cfg[hidden], .noti-list[hidden], .noti-chips[hidden] { display: none; }
.nc-sec { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; border-top: 1px solid var(--line); }
.nc-sec:first-child { border-top: 0; }
.nc-sec label { display: flex; align-items: center; gap: 8px; }
.nc-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nc-tip { color: var(--mut); font-size: 12px; }
.nc-pos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nc-pos button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 6px 4px; font-size: 12px; cursor: pointer; }
.nc-pos button i { position: relative; width: 44px; height: 26px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg2); }
.nc-pos button i::after { content: ""; position: absolute; width: 16px; height: 6px; border-radius: 2px; background: var(--mut); }
.nc-pos [data-pos^="t"] i::after { top: 3px; } .nc-pos [data-pos^="b"] i::after { bottom: 3px; }
.nc-pos [data-pos$="l"] i::after { left: 3px; } .nc-pos [data-pos$="r"] i::after { right: 3px; } .nc-pos [data-pos$="c"] i::after { left: 13px; }
.nc-pos button.on { border-color: var(--acc); background: var(--acc-bg); color: var(--acc); } .nc-pos button.on i::after { background: var(--acc); }
.nc-kinds { border-collapse: collapse; width: 100%; } .nc-kinds th, .nc-kinds td { padding: 3px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.nc-kinds th:first-child, .nc-kinds td:first-child { text-align: left; } .nc-kinds th { font-weight: 600; color: var(--mut); font-size: 12px; }
.nc-acts { display: flex; gap: 6px; align-items: center; padding-top: 6px; } .nc-gap { flex: 1; }
@media (min-width: 901px) {
  .toasts[data-pos="tl"], .toasts[data-pos="tc"], .toasts[data-pos="tr"] { top: 52px; bottom: auto; flex-direction: column; }
  .toasts[data-pos="bl"], .toasts[data-pos="br"] { transform: none; }
  .toasts[data-pos="tl"], .toasts[data-pos="bl"] { left: 16px; right: auto; transform: none; }
  .toasts[data-pos="tr"], .toasts[data-pos="br"] { right: 16px; left: auto; transform: none; }
  .toasts[data-pos="tc"] { left: 50%; right: auto; transform: translateX(-50%); }
}
/* 메일 계정 선택: pane header */
.view-mail .pane-head .title { display: flex; align-items: center; min-width: 0; }
.view-mail .pane-head .mail-acct { max-width: 100%; min-width: 0; height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; }
.view-mail .pane-head .mail-acct:hover, .view-mail .pane-head .mail-acct:focus { border-color: var(--acc); outline: 0; }
@media (max-width: 700px) { .view-mail .pane-head .mail-acct { height: 34px; font-size: 14px; } }
/* 받는 사람 ⇄ 참조 끌어 옮기기 */
.mail-compose .ts-wrapper.multi .ts-control > div.item[draggable] { cursor: grab; }
.mail-compose .ts-wrapper .ts-control > div.item.mc-dragging { opacity: .4; }
.mail-compose .ts-wrapper.mc-dropin { outline: 2px dashed var(--acc); outline-offset: 2px; border-radius: 6px; }
/* 메신저 room list (msgrooms.js, owner 2026-11-04) — KakaoTalk-style: avatar · name (members) · last message · time · unread */
.view-messenger.rooms-on .msg-totab, .view-messenger.rooms-on .msg-max, .view-messenger.rooms-on .msg-body { display: none !important; }

/* chat icons (owner 2026-11-04): line SVGs of the phone shell's family in place of emoji */
.hc svg.ic { display: block; flex: none; }
.hc .hc-shot, .hc .hc-attach, .hc .hc-gear, .hc .hc-totab { display: inline-grid; place-items: center; }
.hc .hc-shot, .hc .hc-attach, .hc .hc-pathbtn { color: var(--mut); } .hc .hc-pathbtn { display: inline-grid; place-items: center; } .hc .hc-shot:hover, .hc .hc-attach:hover { color: var(--fg); }   /* emoji ignored the buttons' white text; a line icon takes it */
.hc .hc-pc, .hc .hc-dnew { display: inline-flex; align-items: center; gap: 4px; }
.hc .hc-sess { display: inline-flex; align-items: center; gap: 6px; } .hc .hc-sess-ic { display: inline-grid; color: var(--mut); }
.hc .etabs-split, .hc .etabs-list, .hc .etab .ex, .hc .hc-dclose { display: inline-grid; place-items: center; }

/* 📁 경로 넣기 (owner 2026-11-04): the phone's 자료 panel as a modal — segmented [문서함 · 저장소 · 탭], line icons, list rows */
.pp2 .pp-card { width: min(560px, 100%); height: min(76vh, 680px); display: flex !important; flex-direction: column; border-radius: 16px; animation: pp2-in .16s ease-out; }
@keyframes pp2-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.pp2-head { display: flex; align-items: center; padding: 14px 14px 6px 18px; } .pp2-head b { flex: 1; font-size: 15.5px; }
.pp2-x { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--mut); cursor: pointer; } .pp2-x:hover { background: var(--bg3); color: var(--fg); }
.pp2-seg { display: flex; gap: 2px; margin: 4px 16px 8px; padding: 3px; border-radius: 10px; background: var(--bg3); }
.pp2-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--mut); font: inherit; font-size: 13px; cursor: pointer; transition: background .15s, color .15s; }
.pp2-seg button.on { background: var(--bg); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.pp2-q { display: flex; align-items: center; gap: 8px; margin: 0 16px 6px; padding: 0 12px; height: 38px; border-radius: 10px; background: var(--bg2); color: var(--mut); }
.pp2-q input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 14px; }
.pp2-crumbs { display: flex; align-items: center; gap: 4px; padding: 4px 16px 6px; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow-x: auto; }
.pp2-crumbs[hidden] { display: none; } .pp2-crumbs a { color: var(--acc); text-decoration: none; } .pp2-crumbs i { font-style: normal; opacity: .6; }
.pp2-crumbs button { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 2px; border: 0; border-radius: 6px; background: var(--bg3); color: var(--fg); cursor: pointer; }
.pp2-body { flex: 1 1 auto !important; min-height: 0; overflow-y: auto; padding: 0 8px 8px; }
.pp2-sec { padding: 12px 10px 4px; font-size: 12px; font-weight: 600; color: var(--mut); }
.pp2-list { list-style: none; margin: 0; padding: 0; }
.pp2-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.pp2-row:hover { background: var(--bg2); }
.pp2-row .ic { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--bg3); color: var(--mut); overflow: hidden; }
.pp2-row .ic img { width: 100%; height: 100%; object-fit: cover; }
.pp2-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pp2-row .tx b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp2-row .tx i { font-style: normal; font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp2-row .go { flex: none; color: var(--mut); display: inline-grid; }
.pp2-wait { padding: 28px 10px; text-align: center; color: var(--mut); font-size: 13px; }
.pp2-hint { flex: none; padding: 10px 18px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mut); }
@media (max-width: 700px) { .pp2 .pp-card { height: 100%; border-radius: 0; } }

/* the 메신저 room list shown in the chat's 채널 · 에이전트 drawer (owner 2026-11-04): search always open there */
/* 📱 the send button draws its own arrow (::before above): the desktop line icon (chat.js) stays out (owner 2026-11-04) */
html.mshell .hc .hc-box .hc-send svg.ic { display: none; }
/* 📱 (owner 2026-11-04) a chat with more tools in its row (채널 작업공간: 담당 · 참고 · PC …) no longer runs past the screen:
   what does not fit goes to a second line, ↑ stays at the right end */
@media (max-width: 700px) {
  html.mshell .hc.m-open .hc-bar { flex-wrap: wrap !important; row-gap: 4px !important; max-width: 100%; }
  html.mshell .hc.m-open .hc-bar > * { min-width: 0; max-width: 100%; }
     /* (shown only on the 채널 side, chat.css) */
  html.mshell .aux .hc, html.mshell .aux .hc .hc-composer { max-width: 100vw; overflow-x: hidden; }
}

/* 집중 모드 목록 서랍: 작업공간 (전체 · Hermes · Claude Code · OpenCode) filter chips drawn as the 메신저's room chips
   (전체 · 안읽음 · 채널 · DM — .mr-chip, owner 2026-11-06), the 채널 side's own chips as they are */
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-agf { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 6px; }
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-agf[hidden] { display: none !important; }
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-agf button { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 16px; padding: 5px 13px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 20.8px; cursor: pointer; }
html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-agf button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ── PC 입력창 (owner 2026-11-06/07, Claude 앱처럼): the box is one rounded line [＋ | 입력 | 보내기] — on one line all three
   on the same centre line, a longer text grows the box and ＋ · 보내기 stay at its bottom; under it one row, flush with the
   box's right edge: [첨부·참고 …] … 모델 · 승인 방식 · PC · 컨텍스트 링. The bar's tools (📷 📎 경로) live in the ＋ menu. ── */
@media (min-width: 701px) {
  .hc .hc-box { --hb-u: 36px;   /* the row under the box: 30px + 6px gap */
    position: relative; display: grid !important; grid-template-columns: 48px minmax(0, 1fr) 48px; grid-template-rows: auto auto auto; align-items: end;
    border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; border-radius: 0 !important; }
  .hc .hc-box::before { content: ""; grid-column: 1 / -1; grid-row: 1 / 3; align-self: stretch; border: 1px solid var(--line); border-radius: 24px; background: var(--bg);
    box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: border-color .15s; }
  .hc .hc-box:focus-within::before { border-color: var(--acc); }
  .hc:not([data-agent="hermes"]) .hc-box::before { border-color: color-mix(in srgb, var(--ag) 55%, var(--line)); box-shadow: 0 2px 12px color-mix(in srgb, var(--ag) 14%, transparent); }
  .hc:not([data-agent="hermes"]) .hc-box:focus-within::before { border-color: var(--ag); }
  .hc.busy .hc-box::before { border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); }
  .hc .hc-box > * { position: relative; }
  .hc .hc-box > :not(.m-plus):not(.hc-inwrap):not(.hc-bar) { grid-column: 2 / 4; grid-row: 1; margin: 10px 12px 0 0; }   /* (anything else: over the text, in the box) */
  /* ＋ and 보내기: 32px in a 48px line — centred on a one-line box, at the bottom of a taller one */
  .hc .hc-box > .m-plus { display: grid !important; place-items: center; grid-column: 1; grid-row: 2; justify-self: end; width: 32px; height: 32px; margin: 0 0 8px; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: var(--fg); cursor: pointer; }
  .hc .hc-box > .m-plus:hover { background: var(--bg3); }
  .hc .hc-box > .m-plus svg { width: 20px; height: 20px; }
  .hc .hc-box > .hc-inwrap { grid-column: 2; grid-row: 2; min-width: 0; }
  .hc .hc-box .hc-input { display: block; box-sizing: border-box; min-height: 48px; padding: 12px 8px 12px 6px; line-height: 24px; }   /* (block: no baseline gap under it) */
  .hc .hc-bar > :is(.hc-send, .hc-stop) { position: absolute; right: 8px; bottom: calc(var(--hb-u) + 8px); width: 32px; height: 32px; margin: 0; }
  /* the row under the box */
  .hc .hc-bar { grid-column: 1 / -1; grid-row: 3; display: flex !important; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 2px;
    height: 30px; margin-top: 6px; padding: 0 4px 0 8px; min-width: 0; position: static !important; }
  .hc .hc-bar > :is(.hc-hint, .hc-shot, .hc-attach, .hc-pathbtn, .m-att) { display: none !important; }
  .hc .hc-bar > .hc-scr { order: 0; height: 28px; margin: 0; }
  .hc .hc-bar > .hc-bsp { order: 1; flex: 1 1 0; min-width: 4px; }   /* left: 첨부 · 승인 상태 · 답변 중 | right: 모델 … */
  .hc .hc-bar > .hc-setdef { order: 2; }  .hc .hc-bar > .hc-mode { order: 4; }
  .hc .hc-bar > .hc-pc { order: 5; } .hc .hc-bar > .hc-ctxm { order: 6; } .hc .hc-bar > :is(.hc-send, .hc-stop) { order: 9; }
  /* 승인 상태 · 답변 중 under the box (chat.js moves them here from the header) */
  .hc .hc-bar > .hc-aa { order: 0; flex: none; height: 26px; margin: 0; font-size: 12px; }
  .hc .hc-bar > .hc-aa[hidden], .hc .hc-bar > .hc-status[hidden] { display: none !important; }
  .hc .hc-bar > .hc-status { display: none !important; }   /* 답변 중 is not shown under the box (owner 2026-11-17) */
  .hc .hc-bar > .hc-aa .aa-btn { height: 26px; padding: 0 8px; font-size: 13px; }
  .hc .hc-bar > .hc-status { order: 0; flex: none; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; margin: 0; border-radius: 13px; font-size: 12px; white-space: nowrap; }
  .hc .hc-bar > :is(.hc-model, .hc-setdef, .hc-mode, .hc-pc, .hc-ctxm) { flex: none; height: 28px; margin: 0; }
  .hc .hc-bar > :is(.hc-model, .hc-mode, .hc-pc, .hc-setdef):not([hidden]) { display: inline-flex; }
  .hc .hc-bar > :is(.hc-model, .hc-mode, .hc-pc, .hc-setdef) { -webkit-appearance: none; appearance: none; align-items: center; gap: 5px;
    padding: 0 8px; border: 0 !important; border-radius: 8px; background: transparent !important; box-shadow: none !important; color: var(--fg);
    font: inherit; font-size: 13px; line-height: 28px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; cursor: pointer; width: auto !important; }
  .hc .hc-bar > :is(.hc-model, .hc-mode, .hc-pc, .hc-setdef):hover, .hc .hc-bar > .hc-mode.open { background: var(--bg3) !important; }
  .hc .hc-bar > :is(.hc-mode, .hc-pc, .hc-setdef)[hidden] { display: none !important; }
  .hc .hc-bar > .hc-mode[data-m="all"] { color: var(--warn, #b7791f); }
  .hc .hc-bar > .hc-pc { color: var(--mut); } .hc .hc-bar > .hc-pc.on { color: var(--acc); }
  .hc .hc-bar > .hc-pc svg { width: 15px; height: 15px; flex: none; }
  .hc .hc-bar > .hc-setdef { color: var(--mut); font-size: 12px; }
  /* 컨텍스트: a ring (how full), the numbers in its tooltip */
  .hc .hc-bar > .hc-ctxm { display: inline-grid; place-items: center; width: 28px; }
  .hc .hc-bar > .hc-ctxm[hidden] { display: none; }
  .hc .hc-bar > .hc-ctxm > span, .hc .hc-bar > .hc-ctxm b, .hc .hc-bar > .hc-ctxm u { display: none; }
  .hc .hc-bar > .hc-ctxm > i { width: 16px; height: 16px; border-radius: 50%; overflow: visible;
    background: conic-gradient(var(--ok) calc(var(--p, 0) * 1%), var(--bg3) 0);
    -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px); mask: radial-gradient(circle, transparent 5px, #000 5.5px); }
  .hc .hc-bar > .hc-ctxm.warn > i { background: conic-gradient(var(--warn) calc(var(--p, 0) * 1%), var(--bg3) 0); }
  .hc .hc-bar > .hc-ctxm.err > i { background: conic-gradient(var(--no) calc(var(--p, 0) * 1%), var(--bg3) 0); }
}
/* the ＋ and 승인 방식 menus (PC) */
.hc-pmenu, .hc-mmenu { min-width: 240px; }
.hc-pmenu button, .hc-mmenu button { min-height: 40px; }
.hc-pmenu .hc-pk, .hc-mmenu .hc-pk, .hc-slash .hc-pk { margin-left: auto; padding-left: 16px; font: 12px var(--mono, monospace); color: var(--mut); background: none; border: 0; }
.hc-mmenu { min-width: 300px; }
.hc-mm-h { padding: 6px 14px 4px; font-size: 12px; color: var(--mut); }
.hc-mmenu .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; text-align: left; }
.hc-mmenu .tx b { font-weight: 600; font-size: 14px; } .hc-mmenu .tx i { font-style: normal; font-size: 12px; color: var(--mut); }
.hc-mmenu .ck { width: 16px; color: var(--acc); font-weight: 700; text-align: center; }
.hc-mmenu button { align-items: center; min-height: 56px; padding: 8px 14px; gap: 10px; }
@media (max-width: 700px) { .hc .hc-bar > .hc-mode { display: none !important; } }   /* phones: the 승인 방식 stays in ⚙ 채팅 설정 */
/* 슬래시 명령어 목록 (chat.js slPaint) */
.hc-slash { max-height: 50vh; overflow-y: auto; }
.hc-slash button { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 12px; }
.hc-slash button.on { background: var(--bg3); }
.hc-slash .sl-k { flex: none; min-width: 84px; font: 600 13px var(--mono, monospace); color: var(--fg); }
.hc-slash .sl-d { flex: 1; min-width: 0; font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 문서함 · 자료실에서 가져오기: the preview before 가져오기 (app.js InboxPickPath({attach})) */
.pp2-pv { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pp2-pvh { display: flex; align-items: center; gap: 8px; }
.pp2-pvh b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pp2-pvback { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--fg); cursor: pointer; }
.pp2-pvback:hover { background: var(--bg3); }
.pp2-pvb { height: min(40vh, 400px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px; }
.pp2-pvb img { display: block; max-width: 100%; max-height: 100%; margin: 0 auto; object-fit: contain; }
.pp2-pvb iframe { width: 100%; height: 100%; border: 0; }
.pp2-pvb pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.55 var(--mono, monospace); }
.pp2-pvf { display: flex; align-items: center; gap: 10px; }
.pp2-pvf .mut { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 모델 선택 (owner 2026-11-07): the bar's model is a button opening the 모델 menu (chat.js mBtn) — the native select stays as the state */
.hc-mbtn { display: none; }
@media (min-width: 701px) {
  .hc .hc-bar > .hc-model { display: none !important; }
  .hc .hc-bar > .hc-mbtn:not([hidden]) { display: inline-block; order: 3; flex: 0 1 auto; min-width: 60px; max-width: 240px; height: 28px; padding: 0 8px; margin: 0;
    border: 0; border-radius: 8px; background: transparent; color: var(--fg); font: inherit; font-size: 13px; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .hc .hc-bar > .hc-mbtn:hover { background: var(--bg3); }
  .hc.hc-ro .hc-bar > .hc-mbtn { display: none !important; }
}
.hc-modmenu { min-width: 300px; max-width: 380px; max-height: calc(100vh - 140px); display: flex; flex-direction: column; }
.hc-modmenu .hc-mlist { flex: 1; min-height: 0; overflow-y: auto; }
.hc-modmenu .hc-mlist button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 14px; }
.hc-modmenu .hc-mlist .tx { flex: 1; min-width: 0; text-align: left; font-size: 13.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-modmenu .ck { width: 16px; color: var(--acc); font-weight: 700; text-align: center; }
.hc-mm-g { padding: 10px 14px 4px; font-size: 11.5px; font-weight: 600; color: var(--mut); }
.hc-mfind { margin: 2px 10px 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
/* 구독 한도: one row per subscription — 5시간 · 7일 남은 % as small bars */
.hc-quota { display: flex; flex-direction: column; gap: 6px; margin: 2px 10px 6px; padding: 8px 10px; border-radius: 10px; background: var(--bg2); }
.hc-q-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.hc-q-n { flex: none; min-width: 78px; font-weight: 600; color: var(--fg); }
.hc-q-p { display: inline-flex; align-items: center; gap: 5px; color: var(--mut); cursor: help; }
.hc-q-p i { font-style: normal; } .hc-q-p em { font-style: normal; font-weight: 600; color: var(--fg); min-width: 30px; }
.hc-q-p u { position: relative; display: inline-block; width: 42px; height: 5px; border-radius: 3px; background: var(--bg3); overflow: hidden; text-decoration: none; }
.hc-q-p b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ok, #2f9e44); }
.hc-q-p.mid b { background: var(--warn, #e8a33d); } .hc-q-p.low b { background: var(--no, #e5484d); } .hc-q-p.low em { color: var(--no, #e5484d); }

/* 목록 서랍 머리: « 접기 → 새 대화 (owner 2026-11-07) */
.hc-dnewc { display: none; }
@media (min-width: 901px) {
  html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead > .hc-dnewc { display: inline-flex; position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    width: 30px; height: 30px; padding: 0; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: none; color: var(--fg); cursor: pointer; }
  html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead > .hc-dnewc:hover { background: var(--bg3); }
  html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead > .hc-lfold { display: none !important; }
}

/* 엔진별 테마 색 (owner 2026-11-07): each engine its own colour (--ag) — the box, 보내기, ＋ / 모델 / 승인 방식 hover, the tab in front,
   the context ring and the answer avatar follow it. Hermes = the accent, Claude Code = Claude orange, OpenCode = teal, Codex = green,
   Gemini CLI = blue; any other CLI engine = violet */
.hc { --ag: var(--acc); }
.hc[data-agent="claude"] { --ag: #d97757; } .hc[data-agent="opencode"] { --ag: #0e9488; }
.hc[data-agent="codex"] { --ag: #10a37f; } .hc[data-agent="gemini"] { --ag: #4285f4; }
.hc[data-agent]:not([data-agent="hermes"]):not([data-agent="claude"]):not([data-agent="opencode"]):not([data-agent="codex"]):not([data-agent="gemini"]) { --ag: #8b5cf6; }
/* 메신저 입력창 테마 (owner 2026-11-07): the 채널 side (채널 · DM · 스레드 · 전체 채널) has its own colour — not the engine's (chat.js hc-msg) */
.hc.hc-msg[data-agent], .hc.hc-msg { --ag: #db2777 !important; }
.hc .hc-send { background: var(--ag); border-color: var(--ag); }
@media (min-width: 701px) {
  .hc .hc-box::before, .hc.busy .hc-box::before { border-color: color-mix(in srgb, var(--ag) 40%, var(--line)); }
  .hc .hc-box:focus-within::before { border-color: var(--ag); }
  .hc .hc-box > .m-plus:hover, .hc .hc-bar > :is(.hc-mbtn, .hc-mode, .hc-pc):hover { background: color-mix(in srgb, var(--ag) 12%, transparent) !important; }
  .hc .hc-bar > .hc-ctxm > i { background: conic-gradient(var(--ag) calc(var(--p, 0) * 1%), var(--bg3) 0); }
  .hc .hc-bar > .hc-pc.on { color: var(--ag); }
}
.hc-tabs.etabs > .hc-et.on { border-top-color: var(--ag); }
/* 채팅 패널 탭 기능 삭제 (owner 2026-11-19 "필요할 경우 문서탭으로 이동"): the panel keeps one conversation (chat.js TABS_MAX) — its tab is
   the title only, no ✕ */
.aux > .hc > .hc-tabs.etabs > .hc-et .ex { display: none !important; }
.hc-tabs.etabs > .hc-et.run .dot { background: var(--ag); }
.hm[data-agent="codex"] .hm-av, .hm-av[data-av="codex"] { background: #10a37f; } .hm[data-agent="gemini"] .hm-av, .hm-av[data-av="gemini"] { background: #4285f4; }

/* 가져오기: a checkbox at the right of each file, the 선택 bar, the preview as a popup over the list (owner 2026-11-07) */
.pp2-li { display: flex; align-items: center; gap: 4px; }
.pp2-li > .pp2-row { flex: 1; min-width: 0; }
.pp2-ckw { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; }
.pp2-ckw:hover { background: var(--bg3); }
.pp2-ckw input { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: var(--acc); }
.pp2-selbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.pp2-selbar[hidden] { display: none; }
.pp2-seln { flex: 1; font-size: 13px; font-weight: 600; }
.pp2-card, .pp-card { position: relative; }
.pp2-pop { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 24px; background: rgb(0 0 0 / .45); animation: fadein .12s ease; }
.pp2-pop > .pp2-pv { width: min(1280px, 100%); height: 100%; max-height: 100%; padding: 14px 16px; border-radius: 14px; background: var(--bg); box-shadow: 0 18px 48px rgba(0,0,0,.3); }
.pp2-pop .pp2-pvb { flex: 1; height: auto; min-height: 0; }
.pp2-pop .pp2-pvb img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.pp2-pvsel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pp2-pvsel input { width: 16px; height: 16px; margin: 0; accent-color: var(--acc); }
/* 추가 지시 · 대기열: the words, the attachments as thumbnails at the right */
.st-steer.st-hasatt { display: flex; align-items: center; gap: 10px; }
.st-steer .st-stx { flex: 1; min-width: 0; }
.st-steer > .hc-thumbs, .hq-item > .hq-th { flex: none; margin: 0; flex-wrap: nowrap; }
.st-steer > .hc-thumbs .hc-thumb, .hq-item > .hq-th .hc-thumb { width: 44px; height: 44px; }
.st-steer > .hc-thumbs .hc-thumb.hc-file, .hq-item > .hq-th .hc-thumb.hc-file { width: auto; max-width: 120px; height: 32px; }
.hq-now { display: inline-flex; align-items: center; gap: 4px; } .hq-now svg { flex: none; }   /* 지금 보내기: the paper-plane icon beside the words */

/* a narrow chat (the side panel): the row under the box keeps its icons, counts and time — the words go (owner 2026-11-07) */
@media (min-width: 701px) {
  .hc .hc-composer { container-type: inline-size; container-name: hcc; }
  @container hcc (max-width: 620px) {
    .hc .hc-bar > .hc-aa :is(.aa-w, .aa-lb) { display: none; }
    .hc .hc-bar > .hc-status { font-size: 0; gap: 4px; padding: 0 8px; }
    .hc .hc-bar > .hc-status > * { font-size: 12px; }
    .hc .hc-bar > .hc-mbtn:not([hidden]) { max-width: 120px; }
  }
  @container hcc (max-width: 440px) {
    .hc .hc-bar > .hc-aa .aa-off { display: none; }
    .hc .hc-bar > .hc-pc { font-size: 0; gap: 0; } .hc .hc-bar > .hc-pc svg { width: 16px; height: 16px; }
    .hc .hc-bar > .hc-status .dots { display: none; } .hc .hc-bar > .hc-status { padding: 0 6px; }
    .hc .hc-bar > .hc-mbtn:not([hidden]) { min-width: 40px; max-width: 96px; }
  }
}

/* ⚙ 채팅 설정 under the box, right end (where the PC toggle was — PC 연결 is a section of ⚙) */
@media (min-width: 701px) {
  .hc .hc-bar > .hc-gear { order: 7; flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; margin: 0; border: 0; border-radius: 8px; background: transparent; color: var(--mut); cursor: pointer; }
  .hc .hc-bar > .hc-gear:hover { background: color-mix(in srgb, var(--ag) 12%, transparent); color: var(--fg); }
  .hc .hc-bar > .hc-gear svg { width: 17px; height: 17px; }
  .hc .hc-bar > .hc-pc { display: none !important; }
}
/* the composer's menus (＋ · 승인 방식 · 모델 · 슬래시): every row is a full-width target with a hover (owner 2026-11-07) */
:is(.hc-pmenu, .hc-mmenu, .hc-modmenu, .hc-slash) button { width: 100%; box-sizing: border-box; border-radius: 8px; cursor: pointer; text-align: left; }
:is(.hc-pmenu, .hc-mmenu, .hc-modmenu, .hc-slash) button:hover { background: var(--bg3); }
:is(.hc-pmenu, .hc-mmenu, .hc-modmenu) button.on { background: color-mix(in srgb, var(--acc) 10%, transparent); }
.hc-modmenu .hc-mlist { padding: 0 4px; }

/* ⚙ 채팅 설정 — the composer's menus' look (owner 2026-11-07): one rounded card, sections as headed groups with thin dividers,
   choices as full-width rows (hover · picked tint) instead of bare radios, controls 30px high with 8px corners */
.cs-ov { background: rgb(0 0 0 / .32); }
.cs-dlg { width: min(640px, 100%); max-height: 88vh; gap: 0; padding: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.28); }
.cs-dlg > .aa-h { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.cs-dlg > .aa-h b { font-size: 15px; }
.cs-dlg > .aa-h .aa-x { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 16px; }
.cs-dlg > .aa-h .aa-x:hover { background: var(--bg3); color: var(--fg); }
.cs-dlg .cs-body { gap: 0; padding: 4px 8px 12px; }
.cs-dlg .cs-sec { gap: 6px; padding: 14px 10px 14px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.cs-dlg .cs-sec:last-child { border-bottom: 0; }
.cs-dlg .cs-sec h4 { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--mut); letter-spacing: .01em; }
.cs-dlg .cs-note { font-size: 12px; }
.cs-dlg .cs-opt { align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; flex-wrap: nowrap; }
.cs-dlg .cs-opt:hover { background: var(--bg3); }
.cs-dlg .cs-opt:has(input:checked) { background: color-mix(in srgb, var(--acc) 9%, transparent); }
.cs-dlg .cs-opt input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--acc); }
.cs-dlg .cs-opt .mut { font-size: 12px; }
.cs-dlg .cs-type { margin-left: 26px; padding: 4px 8px; border-radius: 6px; } .cs-dlg .cs-type:hover { background: var(--bg3); }
.cs-dlg :is(button.sec, button.primary, button.ghost) { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.cs-dlg .cs-row :is(select, input[type=text]) { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.cs-dlg .cs-row :is(select, input[type=text]):focus { outline: none; border-color: var(--acc); }
/* 엔진 · 계정: one row per engine — icon · name/desc · account (연결됨 · 해제 / 연결) · 사용 switch · ✕ */
.cs-engs { display: flex; flex-direction: column; margin: 2px -10px 4px; }
.cs-eng { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 38px 28px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.cs-eng:hover { background: var(--bg3); }
.cs-eng.off .cs-eng-tx, .cs-eng.off .cs-eng-ic { opacity: .5; }
.cs-eng-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--bg2); font-size: 15px; }
.cs-eng-tx { display: flex; flex-direction: column; min-width: 0; } .cs-eng-tx b { font-size: 13.5px; font-weight: 600; }
.cs-eng-tx i, .cs-eng-ac i { font-style: normal; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-eng-ac { display: flex; align-items: center; gap: 8px; font-size: 12px; justify-self: end; min-width: 0; max-width: 260px; }
.cs-eng-ac i { max-width: 140px; }
.cs-eng-ac button { height: 26px !important; padding: 0 10px !important; font-size: 12px !important; }
.cs-eng-x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--mut); cursor: pointer; }
.cs-eng-x:hover { background: color-mix(in srgb, var(--no, #e5484d) 12%, transparent); color: var(--no, #e5484d); }
.cs-sw { position: relative; display: inline-block; width: 34px; height: 20px; cursor: pointer; }
.cs-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.cs-sw span { position: absolute; inset: 0; border-radius: 10px; background: var(--line); transition: background .15s; }
.cs-sw span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.cs-sw input:checked + span { background: var(--acc); } .cs-sw input:checked + span::after { transform: translateX(14px); }
.cs-sw input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.cs-engadd-row select { max-width: 200px; }
.cs-engmsg { padding: 6px 10px; border-radius: 8px; background: var(--bg2); } .cs-engmsg[hidden] { display: none; }

/* 집중 모드의 터미널 팝업 (app.js termPop): the terminal dock floats over the chat */
.term-pop-bg { position: fixed; inset: 0; z-index: 1490; background: rgb(0 0 0 / .38); animation: fadein .12s ease; }
.term-pop-x { position: fixed; top: calc(7vh - 40px); left: calc(50% + min(560px, 46vw) - 34px); width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--bg); color: var(--fg); font-size: 16px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.term-pop-x:hover { background: var(--bg3); }
html.max-aux.term-pop.dock-has .edock { position: fixed; top: 7vh; left: 50%; transform: translateX(-50%); z-index: 1500; width: min(1120px, 92vw); height: 80vh !important;
  min-height: 0; opacity: 1; display: flex !important; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); box-shadow: 0 24px 64px rgba(0,0,0,.35); transition: none; }
/* 에이전트 · 엔진 · 계정 (one section): a radio on each row picks this chat's agent — the row itself is the target */
.cs-engs.cs-pick .cs-eng { grid-template-columns: 18px 30px minmax(0, 1fr) auto 38px 28px; }
.cs-engs.cs-pick .cs-eng.can { cursor: pointer; }
.cs-engs .cs-eng.on { background: color-mix(in srgb, var(--acc) 9%, transparent); }
.cs-engpick { width: 16px; height: 16px; margin: 0; accent-color: var(--acc); cursor: pointer; } .cs-engpick:disabled { cursor: default; opacity: .4; }
.cs-eng-ac > .mut { font-size: 11.5px; }
/* 집중 모드 헤더 (owner 2026-11-07): no ＋ (the list drawer's ✎ makes a 새 대화) and no # (its 작업공간 | 채널 has the rooms) */
@media (min-width: 901px) {
  html.max-aux.at-hermes :is(.aux > .hc, .hc.hc-sp) > .hc-tabs .hc-tab-new { display: none !important; }
}
/* PC 일반 화면 헤더 (owner 2026-11-07): no # either — the list drawer's 작업공간 | 채널 (☰) has the rooms */
/* 집중 모드 한 줄 헤더 (owner 2026-11-07): no "채널" path words beside ⛶ — the tab already names the place */
/* 대화 목록: ⚡ 캐시 중 | 다른 대화 (chat.js loadList) */
.hc-list > .hc-lsec:first-child { border-top: 0; margin-top: 0; }
.hc-list > .hc-lsec-warm { color: #b7791f; }
/* ✎ 새 대화 moved to the header, right of ☰ (owner 2026-11-07): the drawer's header keeps 검색 · 작업공간|채널 only */
@media (min-width: 901px) {
  html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead > .hc-dnewc { display: none !important; }
  html.max-aux.at-hermes .aux > .hc > .hc-drawer .hc-dhead { padding-right: 10px !important; }
}
.hc-etlead > .hc-et-new { position: static; box-shadow: none; }
.hc-etlead > :is(.hc-et-list, .hc-et-new):hover { color: var(--fg); background: var(--bg3); }
.hc-etlead > .hc-et-new { display: inline-flex; align-items: center; justify-content: center; }
/* PC 일반 화면도 (owner 2026-11-07): ✎ beside ☰ makes a 새 대화 — no ＋ at the strip's end */
@media (min-width: 701px) {
  .aux > .hc > .hc-tabs.etabs .hc-tab-new { display: none !important; }
}
/* PC 일반 화면 헤더 한 줄 (owner 2026-11-07, like 집중 모드): the title row goes — its # sits at the strip's right end before ⛶ ✕,
   ☰ in the strip opens the conversation list (under the strip), ✎ makes a 새 대화 */
@media (min-width: 901px) {
  html:not(.max-aux) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head {
    position: absolute; top: 0; right: 68px; z-index: 5; height: 38px; width: auto; max-width: 50%; padding: 0 4px; gap: 2px; justify-content: flex-end;
    border: 0; border-bottom: 1px solid var(--line); background: var(--bg2); container-type: normal; }
  html:not(.max-aux) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head > * { flex: none; }
  html:not(.max-aux) .aux > .hc > .hc-tabs.etabs:not([hidden]) { padding-right: var(--hch-w, 0px); }
}
/* 엔진 선택 under the box, left of 모델 (chat.js eBtn) */
.hc-ebtn { display: none; }
@media (min-width: 701px) {
  .hc .hc-bar > .hc-ebtn:not([hidden]) { display: inline-block; order: 3; flex: 0 1 auto; min-width: 50px; max-width: 160px; height: 28px; padding: 0 8px; margin: 0;
    border: 0; border-radius: 8px; background: transparent; color: var(--ag); font: inherit; font-size: 13px; font-weight: 600; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .hc .hc-bar > .hc-ebtn:hover { background: color-mix(in srgb, var(--ag) 12%, transparent); }
  .hc.hc-ro .hc-bar > .hc-ebtn { display: none !important; }
  @container hcc (max-width: 440px) { .hc .hc-bar > .hc-ebtn:not([hidden]) { max-width: 80px; } }
}
.hc-engmenu .hc-eng-more { border-top: 1px solid var(--line) !important; margin-top: 4px; border-radius: 0 0 8px 8px; }
.hc-engmenu .hc-eng-more .tx { display: flex; flex-direction: column; gap: 2px; } .hc-engmenu .hc-eng-more i { font-style: normal; font-size: 12px; color: var(--mut); }
/* 채널 선택 버튼 under the box (chat.js dchBtn): 엔진 선택 버튼과 같은 UI, 전체 채널 화면 유지 + 보낼 채널만 변경 */

/* PC 일반 화면: the conversation list as a drawer (owner 2026-11-07, like 집중 모드) — it slides in from the right over the chat,
   under the header; 검색 at its top; a click outside, Esc or a pick puts it away (chat.js) */
@keyframes hc-dw-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 701px) {
  html:not(.max-aux) .aux > .hc > .hc-drawer:not([hidden]) { position: absolute; top: 38px; right: 0; left: auto; bottom: 0; z-index: 30; width: min(320px, 88%); max-height: none;
    display: flex; flex-direction: column; border: 0; border-left: 1px solid var(--line); border-radius: 12px 0 0 12px; background: var(--bg2);
    box-shadow: -8px 0 28px rgba(0,0,0,.16); animation: hc-dw-in .18s cubic-bezier(.2,.8,.2,1); }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-list { flex: 1; min-height: 0; overflow-y: auto; }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-dhead { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 10px 10px 6px; }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-dhead > :is(b, .mut) { display: none; }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-dhead > .hc-dsearch { display: block; flex: 1 1 auto; min-width: 0; height: 30px; box-sizing: border-box; padding: 0 10px;
    border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 12.5px; }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-dhead > .hc-dsearch:focus { outline: none; border-color: var(--acc); }
}
/* PC 일반 화면 서랍 = 집중 모드 서랍 (owner 2026-11-07): [검색] [작업공간 | 채널] at its top, the 채널 side's rooms in it, the
   messenger-style filter chips */
@media (min-width: 701px) {
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-agf { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 6px; }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-agf[hidden] { display: none !important; }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-agf button { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 16px; padding: 5px 13px;
    font: inherit; font-size: 13px; font-weight: 600; line-height: 20.8px; cursor: pointer; }
  html:not(.max-aux) .aux > .hc > .hc-drawer .hc-agf button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
}

/* ══ 📱 M2 — the new phone shell (owner 2026-11-07, docs/mobile-nav-design.md; mshell.js M2; on with ?mstack=1 → html.mst) ══ */
.m2-head, .m2-bar, .m2-pages, .m2-dim, .m2-lay, .m2-menu, .m2-sheet { display: none; }
@media (max-width: 700px) {
  html.mst { --msh: calc(52px + env(safe-area-inset-top, 0px)); --msf: calc(44px + env(safe-area-inset-bottom, 0px)); }
  html.mst .ms-head, html.mst .ms-foot, html.mst .ms-dim, html.mst .ms-tools, html.mst .ms-mpane, html.mst .ms-refrow, html.mst .ms-newchat, html.mst .m-backdrop { display: none !important; }
  /* header [‹ · title] and bar [⋯ · handle] */
  html.mst .m2-head { display: flex; align-items: center; gap: 2px; position: fixed; top: 0; left: 0; right: 0; height: var(--msh); box-sizing: border-box; padding: env(safe-area-inset-top, 0px) 14px 0 4px;
    z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
  .m2-back { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--fg); }
  .m2-back:active { background: var(--bg3); } .m2-back.off { opacity: .3; }
  .m2-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.mst .m2-bar { display: flex; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; height: var(--msf); box-sizing: border-box; padding: 0 8px env(safe-area-inset-bottom, 0px);
    z-index: 50; background: var(--bg); border-top: 1px solid var(--line); touch-action: none; }
  html.mst.kb-open .m2-bar { display: none; }
  .m2-more { flex: none; width: 44px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--fg); }
  .m2-more:active { background: var(--bg3); }
  .m2-grip { flex: 1; height: 40px; position: relative; border: 0; background: none; }
  .m2-grip i, .m2-mgrip i { position: absolute; left: 50%; top: 50%; width: 40px; height: 5px; margin: -2px 0 0 -20px; border-radius: 3px; background: var(--line); }
  .m2-bar.dot .m2-grip i::after { content: ""; position: absolute; right: -14px; top: -1px; width: 7px; height: 7px; border-radius: 50%; background: var(--no, #dc2626); }
  .m2-sp { flex: none; width: 44px; }
  /* pages of its own, the side views and the chat: between the header and the bar */
  html.mst .m2-pages { display: block; position: fixed; left: 0; right: 0; top: var(--msh); bottom: var(--msf); z-index: 40; pointer-events: none; }
  .m2-page { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); pointer-events: auto; }
  .m2-page[hidden] { display: none; }
  .m2-pb { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .m2-pact { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--bg); }
  .m2-pact:empty { display: none; }
  .m2-pact > button { height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; font-weight: 600; }
  .m2-chips { display: flex; gap: 6px; margin-right: auto; }
  .m2-chips button { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14px; font-weight: 600; }
  .m2-chips button.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
  html.mst.m-sb .sidebar, html.mst.m-aux .aux { top: var(--msh) !important; bottom: var(--msf) !important; left: 0 !important; right: 0 !important; width: auto !important; max-width: none !important; box-shadow: none !important; }
  html.mst.m-sb .activity { display: none !important; }
  html.mst.imm .hc > .hc-composer.hc-composer.hc-composer { bottom: var(--msf) !important; padding-bottom: 8px !important; }
  html.mst.kb-open.imm .hc > .hc-composer.hc-composer.hc-composer { bottom: 0 !important; }
  html.mst .epane.m2-over { position: relative; z-index: 3; background: var(--bg); box-shadow: -8px 0 24px rgba(0,0,0,.14); }
  html.mst .m2-page.m2-over { z-index: 3; box-shadow: -8px 0 24px rgba(0,0,0,.14); }
  /* the action panel: a document's 결재 | 반려 (입력 완료 | 임시 저장) right above the bar */
  html.mst .epane aside.panel .row2.m2-act { position: fixed; left: 10px; right: 10px; bottom: calc(var(--msf) + 8px); z-index: 22; display: flex; gap: 8px; margin: 0 !important; padding: 8px;
    border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.16); }
  html.mst .epane aside.panel .row2.m2-act > button { flex: 1; min-width: 0; height: 50px; margin: 0; border-radius: 13px; font-size: 16.5px; font-weight: 700; }
  html.mst .epane.m2-hasact .editor-body { padding-bottom: 96px !important; }
  /* dim · the layover (상위 목록, from the left) · the 메뉴 서랍 · ⋯ 도구 */
  html.mst .m2-dim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  html.mst.m2-layon .m2-dim, html.mst.m2-ovon .m2-dim { opacity: 1; pointer-events: auto; }
  html.mst .m2-lay.on { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: 86%; max-width: 420px; z-index: 61; background: var(--bg);
    box-shadow: 8px 0 30px rgba(0,0,0,.22); padding-top: env(safe-area-inset-top, 0px); }
  .m2-lh { flex: none; display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--line); }
  .m2-lup { flex: none; width: 40px; height: 40px; margin-left: -8px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--fg); }
  .m2-lup[hidden] { display: none; }
  .m2-lt { font-size: 17px; font-weight: 700; } .m2-lt .mut, .m2-title .mut { font-weight: 500; }
  .m2-lb { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom, 0px); }
  html.mst .m2-menu.on, html.mst .m2-sheet.on { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 62; background: var(--bg);
    border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25); padding-bottom: env(safe-area-inset-bottom, 0px); }
  html.mst .m2-menu.on { max-height: min(86dvh, 720px); } html.mst .m2-sheet.on { max-height: 72dvh; }
  .m2-mgrip { flex: none; height: 20px; position: relative; }
  .m2-mbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 6px; }
  .m2-grid { list-style: none; margin: 0; padding: 4px 2px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 2px; }
  .m2-grid[hidden], .m2-res[hidden] { display: none; }
  .m2-grid button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 6px; border: 0; border-radius: 14px; background: none; color: var(--fg); font: inherit; }
  .m2-grid button:active { background: var(--bg3); }
  .m2-grid .ic { position: relative; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: var(--bg2); }
  .m2-grid b { max-width: 100%; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m2-grid .n { position: absolute; top: -5px; right: -8px; min-width: 19px; height: 19px; box-sizing: border-box; padding: 0 5px; border: 2px solid var(--bg); border-radius: 10px; background: var(--bg3); color: var(--fg);
    font-size: 10.5px; font-weight: 700; line-height: 15px; text-align: center; }
  .m2-grid .n[hidden] { display: none; }
  .m2-grid :is([data-k="noti"], [data-k="msg"]) .n { background: var(--no, #dc2626); color: #fff; }
  .m2-mfoot { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
  .m2-q { margin: 0; } .m2-q input { width: 100%; height: 44px; box-sizing: border-box; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); color: var(--fg); font: inherit; font-size: 16px; }
  .m2-mrow { display: flex; gap: 8px; }
  .m2-proj { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); color: var(--fg); font: inherit; }
  .m2-proj b { flex: 1; min-width: 0; text-align: left; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m2-proj svg { flex: none; color: var(--mut); }
  .m2-out { margin: 0; } .m2-out button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: none; color: var(--mut); }
  .m2-sbody { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px; }
  .m2-sbody .tab-actions { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 2px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; position: static !important; }
  .m2-sbody :is(a, button, select) { width: 100% !important; max-width: none !important; min-height: 46px !important; margin: 0 !important; padding: 8px 12px !important; border: 0 !important; border-radius: 10px !important;
    background: none !important; color: var(--fg) !important; font-size: 15px !important; box-shadow: none !important; text-align: left !important; justify-content: flex-start !important; }
  .m2-sbody select { border: 1px solid var(--line) !important; background: var(--bg2) !important; }
  .m2-sx { flex: none; display: flex; flex-direction: column; padding: 4px 8px 6px; border-top: 1px solid var(--line); }
  .m2-sx button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--fg); font: inherit; font-size: 15px; text-align: left; }
  .m2-sx button:active, .m2-sbody :is(a, button):active { background: var(--bg3) !important; }
  /* rows · groups (pages and layovers) */
  .m2-rows { display: flex; flex-direction: column; }
  .m2-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; box-sizing: border-box; padding: 8px 16px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
    border-radius: 0; box-shadow: none; background: none; color: var(--fg); font: inherit; text-align: left; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .m2-row:active { background: var(--bg3); } .m2-row.on { background: var(--bg2); }
  .m2-row .ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--bg2); font-size: 18px; overflow: hidden; }
  .m2-row .ic img { width: 100%; height: 100%; object-fit: cover; }
  .m2-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .m2-row .tx b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m2-row .tx i { font-style: normal; font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m2-row .st { flex: none; padding: 2px 8px; border-radius: 8px; background: var(--bg3); color: var(--mut); font-size: 12px; font-weight: 600; }
  .m2-row .st.w { background: color-mix(in srgb, #f59e0b 16%, var(--bg)); color: #b45309; }
  .m2-row .tm { flex: none; align-self: flex-start; padding-top: 2px; font-size: 12px; color: var(--mut); }
  .m2-row .x, .m2-row .go { flex: none; width: 40px; height: 40px; margin-right: -8px; display: grid; place-items: center; border-radius: 10px; color: var(--mut); }
  .m2-row.pend { box-shadow: inset 3px 0 0 var(--no, #dc2626); }
  .m2-row.new .tx b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--acc); vertical-align: middle; }
  .m2-grp > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 16px 16px 8px; font-size: 13px; font-weight: 700; color: var(--mut); cursor: pointer; }
  .m2-grp > summary::-webkit-details-marker { display: none; }
  .m2-grp > summary::after { content: "▸"; margin-left: auto; font-weight: 400; } .m2-grp[open] > summary::after { content: "▾"; }
  .m2-grp > summary em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg3); color: var(--fg); font-size: 11.5px; line-height: 20px; text-align: center; }
  .m2-none { padding: 48px 16px; text-align: center; color: var(--mut); font-size: 14px; }
  /* 프로젝트 popup over the drawer */
  .m2-pp { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px calc(130px + env(safe-area-inset-bottom, 0px)); }
  .m2-ppbg { position: absolute; inset: 0; background: rgba(0,0,0,.28); }
  .m2-ppc { position: relative; width: 100%; max-width: 420px; max-height: 60dvh; overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--bg); box-shadow: 0 12px 40px rgba(0,0,0,.28); }
  .m2-pph { padding: 10px 12px 6px; font-size: 13px; font-weight: 700; color: var(--mut); }
  .m2-pp ul { list-style: none; margin: 0; padding: 0; }
  .m2-pp li button { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 6px 12px; border: 0; border-radius: 10px; background: none; color: var(--fg); font: inherit; text-align: left; }
  .m2-pp li button .ic, .m2-pp .ck { flex: none; display: inline-grid; color: var(--mut); }
  .m2-pp li button b { flex: 1; font-size: 15.5px; font-weight: 500; }
  .m2-pp li button.on b, .m2-pp .ck { color: var(--acc); font-weight: 700; }
}

/* ── 📑 문서 목차 (owner 2026-11-08; app.js): [메타데이터, short] ─── [목차] left of a document — a column on a wide pane,
   a panel over the text on a narrow one (☰ 목차 at the bottom left) and on a phone (the header's left button) ── */
.dtoc, .dtoc-open { display: none; }
.epane.has-dtoc > .editor-body > .fm { display: none; }
.epane.has-dtoc { position: relative; }
.epane.has-dtoc.dtoc-side > .dtoc { display: flex; position: absolute; left: 0; top: var(--dtoc-top, 0); height: var(--dtoc-h, 100%); width: var(--dtoc-w, 264px); box-sizing: border-box; z-index: 2; }
.epane.has-dtoc.dtoc-side > .editor-body { margin-left: var(--dtoc-w, 264px); }
/* ↔ the panel's width, dragged at its edge (app.js, owner 2026-11-10; kept in localStorage, a double click puts 264px back) */
.dtoc-sash { display: none; position: absolute; top: var(--dtoc-top, 0); height: var(--dtoc-h, 100%); left: calc(var(--dtoc-w, 264px) - 3px); width: 7px; z-index: 3; cursor: col-resize; touch-action: none; }
.epane.has-dtoc.dtoc-side > .dtoc-sash { display: block; }
.dtoc-sash:hover, .dtoc-sash.on { background: color-mix(in srgb, var(--acc) 35%, transparent); }
.epane.has-dtoc:not(.dtoc-side) .tab-actions > .dtoc-open.in-ta { display: inline-flex; align-items: center; }
.epane.has-dtoc.dtoc-on .dtoc-open.in-ta { background: var(--bg3); }
.epane.has-dtoc:not(.dtoc-side) > .dtoc-open { display: inline-flex; align-items: center; gap: 4px; position: absolute; left: 14px; bottom: 16px; z-index: 6; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 17px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.12); cursor: pointer; }
.epane.has-dtoc.dtoc-on:not(.dtoc-side) > .dtoc { display: flex; position: absolute; top: 0; bottom: 0; left: 0; width: min(320px, 86%); z-index: 30; box-shadow: 8px 0 30px rgba(0,0,0,.2); animation: slidein-l .18s ease; }
.dtoc { flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 10px 24px; background: var(--bg2); border-right: 1px solid var(--line); font-size: 13px; }
.dtoc-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; padding: 2px 6px 12px; border-bottom: 1px solid var(--line); }
.dtoc-title { font-size: 14px; line-height: 1.35; color: var(--fg); }
.dtoc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dtoc-chips span { padding: 1px 7px; border-radius: 6px; background: var(--bg3); color: var(--mut); font-size: 11.5px; line-height: 19px; }
.dtoc-by { color: var(--mut); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtoc-sum { margin: 0; color: var(--fg); font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.dtoc-sum.open { display: block; -webkit-line-clamp: unset; }
.dtoc-chat { align-self: flex-start; font-size: 12.5px; color: var(--acc); text-decoration: none; }
.dtoc-links { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.dtoc-links a { color: var(--acc); text-decoration: none; } .dtoc-links a:hover { text-decoration: underline; }
.dtoc-links .dtoc-nolink { color: var(--mut); }
.dtoc-all > summary { cursor: pointer; color: var(--mut); font-size: 12px; }
.dtoc-all dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 8px; margin: 6px 0 0; font-size: 12px; }
.dtoc-all dt { color: var(--mut); } .dtoc-all dd { margin: 0; word-break: break-all; }
.dtoc-h { padding: 4px 8px; font-size: 11.5px; font-weight: 700; color: var(--mut); letter-spacing: .04em; }
.dtoc-list a { display: block; padding: 5px 8px; border-radius: 7px; color: var(--fg); text-decoration: none; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtoc-list a.l1 { padding-left: 20px; font-size: 12.5px; } .dtoc-list a.l2 { padding-left: 32px; font-size: 12.5px; color: var(--mut); } .dtoc-list a.l3 { padding-left: 44px; font-size: 12px; color: var(--mut); }
.dtoc-list a:hover { background: var(--bg3); }
.dtoc-list a.on { background: color-mix(in srgb, var(--acc) 12%, transparent); color: var(--acc); font-weight: 600; }
.dtoc-none { padding: 6px 8px; color: var(--mut); font-size: 12.5px; }
/* 수정 이력 under the list (owner 2026-11-10): [판 · time] / the request, newest first */
/* 목차 · 수정 이력 fold on a tap of their heading (owner 2026-11-10) */
.dtoc-h[role=button] { display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; border-radius: 6px; }
.dtoc-h[role=button]::before { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .15s; }
.fold > .dtoc-h[role=button]::before { transform: rotate(-90deg); }
.dtoc-h[role=button]:hover { background: var(--bg3); }
.dtoc-sec.fold > :not(.dtoc-h), .dtoc-hist.fold > :not(.dtoc-h) { display: none !important; }
.dtoc-hist:not(:empty) { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.dtoc-hist a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; padding: 6px 8px; border-radius: 7px; color: var(--fg); text-decoration: none; }
.dtoc-hist a:hover { background: var(--bg3); }
.dtoc-hist b { font-size: 12px; font-weight: 700; color: var(--acc); }
.dtoc-hist .at { font-size: 11.5px; color: var(--mut); align-self: center; }
.dtoc-hist .rq { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 700px) { .dtoc-hist a { padding: 9px 10px; } .dtoc-hist b, .dtoc-hist .at { font-size: 13px; } .dtoc-hist .rq { font-size: 14px; } }
@media (max-width: 700px) {
  .epane.has-dtoc:not(.dtoc-side) > .dtoc-open, .epane.has-dtoc .tab-actions > .dtoc-open.in-ta { display: none !important; }   /* (the header's left button) */
  .epane.has-dtoc.dtoc-on:not(.dtoc-side) > .dtoc { position: fixed; top: var(--msh); bottom: var(--msf); width: 86%; z-index: 46; font-size: 15px; padding: 14px 12px 24px; }
  html.dtoc-shown .dtoc-hbtn { background: var(--bg3); }
  .dtoc-h[role=button] { padding: 8px; font-size: 13px; }
  html.mst .m2-head .dtoc-hbtn { flex: none; width: 44px; height: 44px; margin-right: -10px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--fg); }
  html.mst.dtoc-shown .m2-head .dtoc-hbtn { background: var(--bg3); }
  .dtoc-title { font-size: 16px; } .dtoc-chips span { font-size: 12.5px; line-height: 21px; } .dtoc-by, .dtoc-all > summary, .dtoc-all dl { font-size: 13px; } .dtoc-sum, .dtoc-chat, .dtoc-links { font-size: 14px; }
  .dtoc-list a { padding: 9px 10px; font-size: 15px; } .dtoc-list a.l1, .dtoc-list a.l2 { font-size: 14.5px; } .dtoc-list a.l3 { font-size: 14px; }
}
/* 간단 홈 (owner 2026-11-10): 전체 진척 숫자 · 프로젝트별 진척 · 지금 할 일 · 이어서 작업; the old board under 자세히 보기 */
.hs { max-width: 1180px; }
.hs-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.hs-ttl { font-size: 17px; font-weight: 700; } .hs-at { font-size: 12.5px; }
.hs-top .hs-re { margin-left: auto; width: 28px; height: 28px; }
.hs-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.hs-kpi > p { grid-column: 1 / -1; margin: 0; }
.hs-kpi.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }   /* + 📅 메일 업무 */
.hs-k { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.hs-k b { display: block; font-size: 24px; font-weight: 700; line-height: 1.15; }
.hs-k span { font-size: 12.5px; color: var(--mut); } .hs-k span i { font-style: normal; margin-left: 4px; }
.hs-k.c-acc b { color: var(--acc); } .hs-k.c-warn b { color: var(--warn); } .hs-k.c-no b { color: var(--no); } .hs-k.c-ok b { color: var(--ok); }
button.hs-k { background: var(--bg); }
.hs-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--bg3); overflow: hidden; vertical-align: middle; }
.hs-bar i { display: block; height: 100%; border-radius: 3px; background: var(--acc); }
.hs-bar.big { grid-column: 1 / -1; display: block; height: 8px; margin-top: -2px; }
.hs-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.hs-sec h3 { margin: 0 0 10px; font-size: 15px; font-weight: 650; text-transform: none; background: none; border: 0; padding: 0; color: var(--fg); }
.hs-sec h3 .hs-n { color: var(--warn); margin-left: 4px; }
.hs-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hs-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hs-p + .hs-p { border-top: 1px solid var(--line); }
.hs-p > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 7em) minmax(0, 1fr) auto; grid-template-areas: "dot name bar bs" ". line line line"; align-items: center; gap: 4px 10px; padding: 11px 14px; cursor: pointer; }
.hs-p > summary::-webkit-details-marker { display: none; }
.hs-p > summary:hover { background: var(--bg2); }
.hs-p > summary .ov-dot { grid-area: dot; }
.hs-pn { grid-area: name; font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-pb { grid-area: bar; display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.hs-pb .hs-bar { flex: 1; max-width: 220px; } .hs-pc { font-weight: 650; min-width: 3em; }
.hs-bs { grid-area: bs; display: flex; gap: 4px; }
.hs-b { font-size: 11.5px; padding: 0 7px; line-height: 20px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
.hs-b.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.hs-b.no { color: var(--no); border-color: color-mix(in srgb, var(--no) 45%, var(--line)); }
.hs-b.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.hs-l { grid-area: line; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-p[open] > summary { background: var(--bg2); }
.hs-p[open] .hs-l { display: none; }
.hs-pbody { padding: 4px 14px 12px 33px; background: var(--bg2); }
.hs-pcols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hs-pbody h5 { margin: 4px 0 2px; font-size: 12px; color: var(--mut); font-weight: 650; }
.hs-pbody ul { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.5; } .hs-pbody li { overflow-wrap: anywhere; } .hs-pbody p { margin: 0; font-size: 13px; }
.hs-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hs-acts .sec { padding: 4px 11px; font-size: 12.5px; border-radius: 8px; text-decoration: none; color: var(--fg); }
.hs-ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hs-ul > li + li { border-top: 1px solid var(--line); }
.hs-ul a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--fg); text-decoration: none; min-width: 0; }
.hs-ul a:hover { background: var(--bg2); }
.hs-tx { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-meta { flex: none; font-size: 12px; max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-kind { flex: none; font-size: 11.5px; padding: 0 7px; line-height: 20px; border-radius: 10px; border: 1px solid var(--line); }
.hs-kind.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.hs-kind.no { color: var(--no); border-color: color-mix(in srgb, var(--no) 45%, var(--line)); }
.hs-none { padding: 12px; font-size: 13px; }
.hs-all { width: 100%; padding: 9px; border: 0; background: none; color: var(--acc); font: inherit; font-size: 13px; cursor: pointer; } .hs-all:hover { background: var(--bg2); }
.hs-more { margin-top: 28px; max-width: 1180px; }
.hs-more > summary { cursor: pointer; padding: 10px 0; font-size: 13.5px; font-weight: 600; color: var(--mut); border-top: 1px solid var(--line); }
.hs-more > summary:hover { color: var(--fg); }
.hs-more[open] > summary { margin-bottom: 14px; }
@media (max-width: 900px) { .hs-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .hs-kpi, .hs-kpi.n5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
  .hs-k { padding: 10px 12px; } .hs-k b { font-size: 21px; }
  .hs-p > summary { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dot name bs" ". bar bar" ". line line"; padding: 11px 12px; }
  .hs-pb .hs-bar { max-width: none; }
  .hs-pbody { padding: 4px 12px 12px 12px; } .hs-pcols { grid-template-columns: 1fr; gap: 6px; }
  .hs-ul a { padding: 12px; } .hs-tx { font-size: 14.5px; }
}
/* 숫자 = 탭 (owner 2026-11-10): a tap lists that figure's items on the right */
button.hs-k { text-align: left; font: inherit; color: var(--fg); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
button.hs-k:hover { border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
button.hs-k.on { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 22%, transparent); }
button.hs-k.on span::after { content: " ›"; color: var(--acc); }
.hs-ul > li.hs-g { display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: var(--bg2); font-size: 12.5px; }
.hs-g .hs-go { margin-left: auto; }
.hs-go { border: 1px solid var(--line); background: var(--bg); color: var(--acc); border-radius: 7px; padding: 0 9px; line-height: 22px; font: inherit; font-weight: 700; cursor: pointer; }
.hs-tx.two { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; }
.hs-kind.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.hs-ul a .hs-kind { align-self: flex-start; margin-top: 1px; }
.hs-ag .hs-bar { flex: none; width: 60px; } .hs-gn { min-width: 2.6em; text-align: right; }
.hs-ag .hs-tx b { font-weight: 600; } .hs-ag .hs-tx .mut { font-size: 12.5px; }
@media (max-width: 700px) { button.hs-k.on span::after { content: " ↓"; } .hs-ul > li.hs-g { padding: 9px 12px; } .hs-go { line-height: 28px; padding: 0 12px; } }
/* narrow: the picked figure's list right under the figures, then 프로젝트별 진척, then 이어서 작업 */
@media (max-width: 900px) {
  .hs-cols { display: flex; flex-direction: column; gap: 24px; }
  .hs-side { display: contents; }
  .hs-todo { order: 0; } .hs-proj { order: 1; } .hs-recent { order: 2; }
  .hs-cols > .hs-sec, .hs-side > .hs-sec { min-width: 0; width: 100%; }
}
/* 📱 속성 · 목차 서랍: the browser's own sideways gestures stay out (owner 2026-11-10 — → in it opened the menu / went back) */
@media (max-width: 700px) { .epane.has-dtoc.dtoc-on:not(.dtoc-side) > .dtoc { touch-action: pan-y; overscroll-behavior: contain; } }
/* 🕘 변경 이력 in the 속성 패널 (owner 2026-11-10) */
.dtoc-vh { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-size: 12.5px; cursor: pointer; }
.dtoc-vh:hover { background: var(--bg3); }
.dtoc-vh[hidden] { display: none; }
@media (max-width: 700px) { .dtoc-vh { font-size: 14px; padding: 7px 12px; } }
/* the 첨부 drawer's own row from the 문서 입력창 (owner 2026-11-10, mshell.js openAttach extra): 메모 · 사이드채팅 · 설정 */
@media (max-width: 700px) {
  .ms-extrow { display: none; }
  .ms-foot.ms-ref .ms-extrow:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px; flex: none; padding: 2px 12px 8px; }
  .ms-extrow button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--fg); font: inherit; font-size: 14.5px; }
  .ms-extrow button:active { background: var(--bg3); }
  .ms-extrow .i { font-size: 16px; }
}

/* 📱 no bottom drawer (owner 2026-11-10): the handle and its strip are gone — the page runs to the bottom. The same sheet still
   comes up for the ＋ (첨부 · 문서 정보), and 탭 · 알림 · 문서함 open alone as a popup under the header (.ms-pop, mshell.js) */
@media (max-width: 700px) {
  html.mshell:not(.mst) { --msf: env(safe-area-inset-bottom, 0px); }
  html.mshell:not(.mst):not(.ms-open):not(.ms-drag) .ms-foot { transform: translateY(100%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; }
  html.mshell:not(.mst) .ms-foot .ms-grip.on::after { display: none; }
  .ms-ftabs button[hidden] { display: none !important; }
  html.mshell.ms-open .ms-foot.ms-pop { top: calc(var(--msh) + 6px); bottom: auto; left: 8px; right: 8px; height: min(72dvh, 640px); border: 1px solid var(--line); border-radius: 14px;
    transform: none; box-shadow: 0 12px 36px rgba(0,0,0,.22); animation: ms-popin .16s ease-out; }
  .ms-foot.ms-pop :is(.ms-grip, .ms-attrow, .ms-extrow, .ms-ftabs, .ms-refhint) { display: none !important; }
  @keyframes ms-popin { from { opacity: 0; transform: translateY(-8px); } }
  .ms-more.ms-dot { position: relative; }
  .ms-more.ms-dot::after { content: ""; position: absolute; right: 8px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--no, #dc2626); }
  .ms-tools-x .ms-tn { margin-left: 6px; color: var(--no, #dc2626); font-weight: 700; }
  /* 문서 정보: the document's dtoc drawer, at home in the sheet */
  .ms-panel[data-k="info"] { overflow-y: auto; }
  .ms-panel[data-k="info"] > .dtoc.ms-in { display: block !important; position: static !important; inset: auto !important; width: auto !important; height: auto !important; max-height: none !important;
    transform: none !important; animation: none !important; box-shadow: none !important; border: 0 !important; padding: 8px 14px 24px !important; background: none !important; z-index: auto !important; }
}
@media (max-width: 700px) { .ms-foot.ms-oninfo .ms-refhint { display: none !important; } }
@media (max-width: 700px) {   /* the popup as tall as what it holds (up to its max) */
  html.mshell.ms-open .ms-foot.ms-pop { height: auto; max-height: min(72dvh, 640px); }
  .ms-foot.ms-pop .ms-view { flex: 0 1 auto; min-height: 0; display: flex; }
  .ms-foot.ms-pop .ms-track { height: auto; min-height: 0; transform: none !important; }
  .ms-foot.ms-pop .ms-panel { height: auto; max-height: min(72dvh, 640px); overflow-y: auto; }
}

/* 📱 문서 일반 모드 (owner 2026-11-10): the path stays under the header, also in the old focus mode (imm) — nothing folds by a tap */
@media (max-width: 700px) {
  html.mshell:not(.mst):not(.m-read).imm.max-editor .epane > .crumbs { position: static !important; transform: none !important; box-shadow: none !important; }
}
/* 📖 집중 읽기 (owner 2026-11-10, mshell.js — ⋮ 집중 읽기): only the header over the text; it hides reading down, comes back reading up.
   The path, the 문서 입력창, the request card and every editing tool are gone; paragraphs are not picked (chat.js) */
@media (max-width: 700px) {
  html.mshell.m-read:not(.mst):not(.m-aux):not(.m-sb) .app { grid-template-rows: 0px minmax(0, 1fr) var(--msf) !important; }
  html.mshell.m-read:not(.mst):not(.m-aux):not(.m-sb) .epane .editor-body { padding-top: calc(var(--msh) + 10px) !important; }
  html.mshell.m-read:not(.mst):not(.m-aux):not(.m-sb) :is(.epane > .crumbs, .epane .adc, .epane .adc-req, .adc-rail, .adc-side, .adc-rpanel, .dtoc-open, .adc-hunk-bar, .adc-ebar, .adc-grip, .adc-live) { display: none !important; }
  html.mshell.m-read:not(.mst):not(.m-aux):not(.m-sb) .adc-sel { outline: none !important; background: none !important; }
  html.mshell .ms-head { transition: transform .22s ease; }
  html.mshell.m-read.ms-hd-off:not(.mst):not(.m-aux):not(.m-sb):not(.ms-open):not(.ms-menu):not(.ms-tools-on) .ms-head { transform: translateY(-100%); }
  .ms-tools-x [data-t="read"].on { font-weight: 700; }
}

/* 📱 ⓘ 문서 정보 in the header, left of ⋮ (owner 2026-11-10): the right column holds both */
@media (max-width: 700px) {
  html.mshell .ms-head { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .ms-hr { display: flex; align-items: center; }
  .ms-hr .ms-hb[hidden] { display: none; }
  .ms-hr .ms-info { margin-right: -4px; }
  .ms-head:has(.ms-info:not([hidden])) .ms-title { margin-left: 40px; }   /* (the title stays centred) */
}

/* 📱 작업공간 서랍 (owner 2026-11-11, mshell.js .ms-wdw): closed = only its handle at the bottom of the screen (the strip --msf);
   a tap / drag up = part way (.ms-whalf — the sheet is shorter, so the list's own [🔍 검색 · ＋ 새 대화] bar stays in view), a
   drag up = the rest. Inside: the AI 채팅's own 대화 목록 (.hc-drawer, moved in while open — the 작업공간 우→좌 list). The pages,
   the AI 채팅 and the 메신저 end above the handle; with the keyboard up it steps aside */
.ms-wdw, .ms-wdim { display: none; }
@media (max-width: 700px) {
  html.mshell:not(.mst) { --msf: calc(22px + env(safe-area-inset-bottom, 0px)); }
  html.mshell.kb-open:not(.mst) { --msf: 0px; }
  html.mshell.m-phone:not(.mst):not(.kb-open).m-aux .aux, html.mshell.m-phone:not(.mst):not(.kb-open).m-sb .sidebar { bottom: var(--msf) !important; }
  html.mshell:not(.mst) .ms-wdw { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 49; height: min(56dvh, 500px);
    background: var(--bg2); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,.06); overflow: hidden;
    transform: translateY(calc(100% - var(--msf))); transition: transform .26s cubic-bezier(.2,.8,.2,1), height .26s cubic-bezier(.2,.8,.2,1); touch-action: none; }
  html.mshell.ms-wopen .ms-wdw { z-index: 88; transform: none; height: min(86dvh, 760px); box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
  html.mshell.ms-wopen.ms-whalf .ms-wdw { height: min(56dvh, 500px); }
  html.mshell.kb-open .ms-wdw { height: calc(100dvh - var(--msh) - 8px) !important; }   /* typing in 🔍 검색: over everything, the bar above the keyboard */
  html.mshell.kb-open:not(.ms-wopen) .ms-wdw, html.mshell:is(.ms-open, .ms-menu):not(.ms-wopen) .ms-wdw { display: none; }
  .ms-wgrip { flex: none; position: relative; height: 22px; width: 100%; padding: 0; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
  .ms-wgrip i { position: absolute; left: 50%; top: 9px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--mut); opacity: .55; }
  .ms-wb { flex: 1; min-height: 0; position: relative; }
  .ms-wb > .hc-drawer:not([hidden]) { display: flex !important; flex-direction: column; position: absolute; inset: 0; max-height: none; overflow: hidden; border: 0; background: none; animation: none !important; }
  .ms-wb > .hc-drawer .hc-list { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .ms-wb > .hc-drawer .hc-dtr { display: none !important; }   /* (밀어서 닫기 · ✕: the sheet's handle and a drag down do that) */
  .ms-wb > .hc-drawer .hc-dhead { padding-top: 2px; }
  html.mshell:not(.mst) .ms-wdim { display: block; position: fixed; inset: 0; z-index: 87; background: rgba(0,0,0,.42); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  html.mshell.ms-wopen .ms-wdim { opacity: 1; pointer-events: auto; }
  html.mshell.ms-wopen.ms-whalf .ms-wdim { opacity: .6; }
}

/* Mermaid 도식 (app.js): the drawing in place of the code block */
pre.mmd { white-space: normal; background: transparent !important; border: 0 !important; padding: 4px 0 !important; overflow-x: auto; text-align: center; }
pre.mmd > .mmd-view svg { max-width: 100%; height: auto; }
.code-wrap.mmd-wrap > .code-bar { display: none; }

/* 📝 주석 (owner 2026-11-12): [^1] marks a small raised number; the notes gather at the end of the document under 주석 */
.doc sup[id^="fnref"] a, .doc .footnote-ref { text-decoration: none; font-size: .78em; padding: 0 2px; color: var(--acc, #4f46e5); font-weight: 600; }
.doc .footnote { margin-top: 28px; font-size: 13.5px; color: var(--mut); }
.doc .footnote > hr { border: 0; border-top: 1px solid var(--line); margin: 0 0 6px; }
.doc .footnote::before { content: "주석"; display: block; font-weight: 600; color: var(--fg); margin: 0 0 4px; font-size: 13px; }
.doc .footnote > hr + * { margin-top: 0; }
.doc .footnote ol { padding-left: 1.6em; margin: 0; list-style: none; counter-reset: fn; }
.doc .footnote li { margin: 4px 0; position: relative; counter-increment: fn; }
/* 주석 번호 = 누르면 그 주석을 쓴 블록으로 (app.js) */
.doc .footnote li::before { content: counter(fn) "."; position: absolute; left: -1.6em; width: 1.4em; text-align: right; cursor: pointer; color: var(--acc, #4f46e5); }
.doc .footnote li:hover::before { text-decoration: underline; }
.doc > .fn-flash:not(sup) { background: color-mix(in srgb, #f5b301 18%, transparent); border-radius: 4px; transition: background .6s; }
.doc .footnote li p { margin: 0; }
.doc .footnote-backref { text-decoration: none; margin-left: 4px; color: var(--mut); }
.doc .footnote li.fn-flash, .doc sup.fn-flash { background: color-mix(in srgb, #f5b301 22%, transparent); border-radius: 4px; transition: background .6s; }

/* 📝 주석 팝업 (app.js): the note of a clicked footnote number, right there */
.doc a.footnote-ref, sup.fn-ref { cursor: pointer; }
.fn-pop { position: fixed; z-index: 1000; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg);
  box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13.5px; line-height: 1.55; max-height: 50vh; overflow: auto; }
.fn-pop-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 4px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--mut); }
.fn-pop-h button { border: 0; background: none; color: var(--mut); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.fn-pop-h button:hover { background: var(--bg3); color: var(--fg); }
.fn-pop-b { padding: 8px 12px 10px; }
.fn-pop-b p { margin: 0; }

/* ✎ 목차의 수정된 곳 (app.js markChanges) */
.dtoc-list a.chg { position: relative; padding-right: 30px; }
.dtoc-list a.chg::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 14px; margin-top: -7px; border-radius: 2px; background: var(--ok, #16a34a); }
.dtoc-list a.chg::after { content: attr(data-chg); position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  border-radius: 8px; background: color-mix(in srgb, var(--ok, #16a34a) 16%, transparent); color: var(--ok, #16a34a); font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.dtoc-sec > .dtoc-h[data-chg]:not([data-chg=""])::after { content: " · " attr(data-chg); color: var(--ok, #16a34a); font-weight: 600; }

/* 속성 · 목차 · 변경 이력 (owner 2026-11-12): three sections with the same foldable heading, a line between them */
.dtoc > .dtoc-sec + .dtoc-sec, .dtoc > .dtoc-hist + .dtoc-sec, .dtoc > .dtoc-sec + .dtoc-hist:not(:empty) { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dtoc-psec > .dtoc-meta { margin-bottom: 0; padding-bottom: 4px; border-bottom: 0; }
.dtoc-chips { align-items: center; }
.dtoc-chips .dtoc-chat { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font-size: 11.5px; line-height: 19px; text-decoration: none; }
.dtoc-chips .dtoc-chat:hover { background: var(--bg3); }
.dtoc-sum.open { white-space: pre-line; }
.dtoc-vsec[hidden] { display: none; }
.dtoc-vsec .dtoc-vver { margin-left: 4px; font-weight: 600; color: var(--mut); }
.dtoc-vsec > .dtoc-vhbox { padding: 2px 4px 0; }
.dtoc-vsec > .dtoc-vhbox { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }

/* 🖼 문서의 이미지 · 도식: double click → the viewer (imgview.js) */
.doc img, .doc .mmd-view svg { cursor: zoom-in; }
.lb-svg .imgv-stage { cursor: grab; }
.lb-svg .lb-svgbox { display: inline-block; margin: auto; padding: 12px; border-radius: 8px; background: var(--bg); }
.lb-svg .lb-svgbox svg { display: block; max-width: none; height: auto; }

/* 답변 중 [💬 사이드채팅 · ■ 중지 (· ↑ 글이 있으면)] (owner 2026-11-12 "답변 중일 때는 중지 버튼과 사이드채팅 버튼을 표시") —
   chat.js marks the box data-run="2" (two buttons) or "3" (+ ↑); 사이드채팅 is a plain round line button, ■ stays the dark one */
.hc .hc-btwbtn { display: grid; place-items: center; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--fg); cursor: pointer; }
.hc .hc-btwbtn:hover { background: var(--bg3); }
.hc .hc-btwbtn[hidden] { display: none !important; }
@media (min-width: 701px) {
  .hc .hc-box[data-run="2"] { grid-template-columns: 48px minmax(0, 1fr) 84px; }
  .hc .hc-box[data-run="3"] { grid-template-columns: 48px minmax(0, 1fr) 120px; }
  .hc .hc-bar > .hc-btwbtn { position: absolute; right: 44px; bottom: calc(var(--hb-u) + 8px); width: 32px; height: 32px; margin: 0; }
  .hc .hc-box[data-run="3"] .hc-bar > .hc-stop { right: 44px; }
  .hc .hc-box[data-run="3"] .hc-bar > .hc-btwbtn { right: 80px; }
}
@media (max-width: 700px) {
  .hc .hc-btwbtn { width: 42px; height: 42px; order: 7; }
  .hc .hc-box[data-run="2"] { grid-template-columns: minmax(0, 1fr) auto auto !important; }
  .hc .hc-box[data-run="3"] { grid-template-columns: minmax(0, 1fr) auto auto auto !important; }
  .hc .hc-box .hc-btwbtn { grid-column: 2 !important; grid-row: 1; align-self: end; }
  .hc .hc-box[data-run] .hc-stop { grid-column: 3 !important; }
  .hc .hc-box[data-run="3"] .hc-send { grid-column: 4 !important; }
  html.mshell .hc.m-open .hc-bar > .hc-btwbtn { position: static !important; margin: 0 0 0 auto !important; align-self: center !important; width: 40px !important; height: 40px !important; }
  html.mshell .hc.m-open .hc-box[data-run] .hc-bar > :is(.hc-stop, .hc-send) { margin: 0 !important; }
  /* 📱 the one-line box [＋ | 글 | 💬 ■ (↑)]: the bar's other tools stay hidden, 💬 sits left of ■ */
  html.mshell .hc:not(.m-open) .chat-composer-box .composer-bar > .hc-btwbtn:not([hidden]) { display: grid !important; }
  html.mshell .hc:not(.m-open) .chat-composer-box[data-run="2"] { grid-template-columns: auto minmax(0, 1fr) auto auto !important; }
  html.mshell .hc:not(.m-open) .chat-composer-box[data-run="3"] { grid-template-columns: auto minmax(0, 1fr) auto auto auto !important; }
  html.mshell .hc:not(.m-open) .chat-composer-box .hc-btwbtn { grid-column: 3 !important; grid-row: 1 !important; width: 40px !important; height: 40px !important; margin: 0 !important; align-self: center !important; }
  html.mshell .hc:not(.m-open) .chat-composer-box[data-run] .composer-stop { grid-column: 4 !important; }
  html.mshell .hc:not(.m-open) .chat-composer-box[data-run="3"] .composer-send { grid-column: 5 !important; }
}

/* 🖥 no header on the PC (owner 2026-11-12, app.js html.notb): the titlebar takes no row; its tools sit in the activity bar;
   🔍 / Ctrl+P drops it down over the page (html.tb-peek) */
html.notb { --tb: 0px; }
html.notb .titlebar { overflow: hidden; border: 0; }
html.notb .app > .titlebar { grid-row: 1; } html.notb .app > .workbench { grid-row: 2; } html.notb .app > .statusbar { grid-row: 3; }   /* (pinned: the dropped-down fixed header leaves the grid flow) */
.sq-pop { display: none; }
html.notb.tb-peek .sq-pop { display: flex; justify-content: center; align-items: flex-start; position: fixed; inset: 0; z-index: 9600; padding-top: 14vh; background: rgba(0,0,0,.18); }
.sq-pop .sq-card { width: min(640px, 90vw); padding: 12px 14px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.sq-pop .sq-h { margin: 0 2px 8px; font-size: 13px; font-weight: 700; } .sq-pop .sq-h .mut { font-weight: 400; font-size: 12px; margin-left: 6px; }
.sq-pop .tb-search { display: block !important; width: 100%; margin: 0; }
.sq-pop .tb-search input { height: 40px; padding: 0 14px; font-size: 15px; text-align: left; border-radius: 10px; }
html.notb .activity .ab-tool { display: inline-flex; margin: 0; }
html.notb .activity form.ab-tool .icon { width: 36px; height: 36px; }
html.notb .activity .noti { position: fixed; left: calc(var(--ab) + 6px); right: auto; top: auto; bottom: calc(var(--sb) + 8px); }
html.notb .statusbar > select.sb-proj { display: block !important; flex: none; height: 18px; max-width: 160px; margin: 0; padding: 0 4px; border: 1px solid rgba(255,255,255,.45); border-radius: 4px;
  background: rgba(255,255,255,.14); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
html.notb .statusbar > select.sb-proj:hover { background: rgba(255,255,255,.24); }
html.notb .statusbar > select.sb-proj option { color: var(--fg); background: var(--bg); }

/* 🧰 문서 도구 → 도구 button + pop-up (owner 2026-11-13, app.js .ta-more / .ta-pop) */
.tab-actions .ta-more { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--bg); }
.tab-actions .ta-more[aria-expanded="true"] { background: var(--acc-bg); color: var(--acc); border-color: color-mix(in srgb, var(--acc) 35%, var(--line)); }
.tab-actions .ta-car { font-size: 10px; opacity: .6; }
.tab-actions .ta-pop { position: fixed; z-index: 9500; display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 200px; max-height: 70vh; overflow: auto;
  padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.tab-actions .ta-pop[hidden] { display: none; }
.tab-actions .ta-pop > :is(a, button) { display: flex !important; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; height: 34px; min-height: 0; margin: 0 !important; padding: 0 10px !important; border: 0; border-radius: 6px; line-height: 1; font-weight: 500;
  background: transparent; color: var(--fg); font-size: 13px; text-align: left; }
.tab-actions .ta-pop > :is(a, button):hover { background: var(--bg3); }
.tab-actions .ta-pop > :is(.w-toggle.on, .max-toggle.on) { background: var(--acc-bg); color: var(--acc); }
.tab-actions .ta-pop > select { width: 100%; margin: 2px 0; padding: 6px 8px; font-size: 13px; }
.tab-actions .ta-pop > .fmts { display: flex; gap: 4px; padding: 6px 10px; }
.tab-actions .ta-pop > :not(a, button, select, .fmts) { padding: 4px 10px; }

/* 💬 전체 폭 문서: the 문서 입력창 behind a floating button at the pane's bottom right (owner 2026-11-13, app.js .adc-fab / .adc-popon) */
.adc-fab { display: none; }
html:not(.w-narrow):not(.mshell) .epane > .adc-fab { display: grid; place-items: center; position: absolute; right: 22px; bottom: 22px; z-index: 40; width: 52px; height: 52px; padding: 0;
  border: 0; border-radius: 50%; background: var(--acc); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: pointer; transition: transform .15s ease; }
html:not(.w-narrow):not(.mshell) .epane > .adc-fab:hover { transform: scale(1.06); }
html:not(.w-narrow):not(.mshell) .epane > .adc-fab.on { background: var(--bg); color: var(--fg); border: 1px solid var(--line); }
html:not(.w-narrow):not(.mshell) .epane:has(.adc.adc-busy) > .adc-fab::after { content: ""; position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: #f59e0b; box-shadow: 0 0 0 2px var(--bg); animation: adc-pulse 1.2s ease-in-out infinite; }
html:not(.w-narrow):not(.mshell) .epane .adc:not(.adc-popon) > .adc-box, html:not(.w-narrow):not(.mshell) .epane .adc:not(.adc-popon):not(.adc-editmode) > .adc-dock { display: none !important; }   /* (a paragraph being edited keeps its 저장 · 서식 bar) */
/* (the box out: the round button stays — ⌄ 숨기기 at the same place, owner 2026-11-13) */
.adc-hidebox { display: none; }
html:not(.w-narrow):not(.mshell) .epane .adc .hc-bar > .adc-hidebox { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-left: auto; height: 24px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--mut); font: inherit; font-size: 12px; cursor: pointer; }
html:not(.w-narrow):not(.mshell) .epane .adc .hc-bar > .adc-hidebox:hover { color: var(--fg); background: var(--bg3); }

/* 설정 view's bottom: 테마 · 로그아웃 (owner 2026-11-13, app.js .set-acct) */
.view-settings .set-acct { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.view-settings .set-acct form { margin: 0; }
.view-settings .set-acct .set-acct-b { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 6px;
  background: none; color: var(--fg); font: inherit; font-size: 13px; font-weight: 400; text-align: left; cursor: pointer; }
.view-settings .set-acct .set-acct-b:hover { background: var(--bg3); }
.view-settings .set-acct .set-acct-b svg { width: 17px; height: 17px; flex: none; }
.view-settings .set-acct .set-acct-b svg[hidden] { display: none; }

/* 왼쪽 줄 도구 pop-up: 브라우저 · 데스크톱 · 터미널 (owner 2026-11-13, app.js .ab-tools / .ab-tpop) */
.activity .ab-tools.on { background: var(--bg3); }
.ab-tpop { position: fixed; z-index: 9500; display: flex; flex-direction: column; gap: 2px; min-width: 170px; padding: 6px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.ab-tpop[hidden] { display: none; }
.ab-tpop .ab-ti { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 6px;
  background: none; color: var(--fg); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.ab-tpop .ab-ti:hover { background: var(--bg3); }
.ab-tpop .ab-ti .sv { width: 18px; height: 18px; flex: none; }

/* 🗂 탐색기 = 프로젝트 + 저장소 (owner 2026-11-13, app.js html.exlib) */
.view-explorer .exlib-h { display: flex; align-items: center; gap: 4px; height: 28px; margin-top: 6px; padding: 0 6px 0 8px; color: var(--mut); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.view-explorer .exlib-h:first-child { margin-top: 0; }
.view-explorer .exlib-st { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; height: 34px; }
.view-explorer .exlib-h .t { flex: 1; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 4px; }
.view-explorer .exlib-h .t::before { content: ""; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .15s; }
.view-explorer .exlib-h.fold .t::before { transform: rotate(-90deg); }
.view-explorer .exlib-h .icon { width: 24px; height: 24px; font-size: 13px; }
.view-explorer .exlib-rc { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; height: 34px; }
.view-explorer .exlib-rcb .sec-head { padding-left: 14px; }

/* 🌐 HTML 미리보기 (owner 2026-11-13): the file drawn in a sandboxed frame (no scripts); 도구 › 📄 원문 shows its text */
.htmlv { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 24px; }
.htmlv-f { width: 100%; height: calc(100vh - 230px); min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: #fff; resize: vertical; }

/* ＋ 새 문서 in the document tab strip (owner 2026-11-13, app.js .etabs-new) */
.etabs-acts .etabs-new { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px; margin-right: 4px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--fg); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.etabs-acts .etabs-new:hover { background: var(--bg3); }
.etabs-acts .etabs-new span { font-size: 14px; line-height: 1; }

/* 🌐 ```html 스니펫 (owner 2026-11-13): drawn in a frame inside its <pre>; 코드 at the corner shows the code instead */
pre.hsn { position: relative; white-space: normal; padding: 0 !important; background: transparent !important; border: 0 !important; overflow: visible; }
pre.hsn > code { display: none; }
pre.hsn.hsn-code { white-space: pre; padding: 12px 14px !important; padding-top: 34px !important; background: var(--bg2) !important; overflow-x: auto; }
pre.hsn.hsn-code > code { display: block; }
pre.hsn.hsn-code > .hsn-view { display: none; }
.hsn-view .hsn-f { display: block; width: 100%; height: 160px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.hsn-tog { position: absolute; top: 6px; right: 6px; z-index: 1; font: inherit; font-size: 11.5px; line-height: 1; padding: 5px 9px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--mut); cursor: pointer; opacity: .85; }
.hsn-tog:hover { opacity: 1; color: var(--fg); }

/* 좁은 폭 ↔ 전체 폭, animated both ways (owner 2026-11-13, app.js toggleWidth → html.wn-anim for ~0.5 s) */
html.wn-anim .epane > .editor-body { transition: margin-left .38s cubic-bezier(.2, .8, .2, 1), padding-right .38s cubic-bezier(.2, .8, .2, 1) !important; }
html.wn-anim .epane.has-dtoc.dtoc-side > .dtoc { animation: wn-in-l .38s cubic-bezier(.2, .8, .2, 1); }
html.wn-anim .epane > .adc-rpanel:not([hidden]) { animation: wn-in-r .38s cubic-bezier(.2, .8, .2, 1); }
@keyframes wn-in-l { from { transform: translateX(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wn-in-r { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.wn-anim .epane > .editor-body { transition: none !important; } html.wn-anim .epane > :is(.dtoc, .adc-rpanel) { animation: none; } }
/* 📱 탐색기 sections: thumb-sized heads and buttons (owner 2026-11-13 "모바일 버전에도") */
@media (max-width: 700px) {
  .view-explorer .exlib-h { height: 40px; font-size: 13px; }
  .view-explorer :is(.exlib-st, .exlib-rc) { height: 46px; }
  .view-explorer .exlib-h .icon { width: 40px; height: 40px; font-size: 16px; }
}

/* 👁 보기 도구 (owner 2026-11-13, app.js — the 👁 보기 도구 block): every document on the PC, with the side panels shown or hidden (속성 패널 숨기기) */
html:not(.vm-w):not(.mshell) .editor-body.vm-on > .fm { padding-left: 32px; padding-right: 32px; }   /* (전체: the title line over the text, not the 880px reading width) */
.vm-bar, .vm-layer { display: none; }
/* the desk and the sheet: the pane's background a shade darker, the document on it as a page of its own */
html:not(.mshell) .editor-body.vm-on { --vm-desk: color-mix(in srgb, var(--bg2) 55%, var(--bg3)); }
html:not(.mshell) .editor-body.vm-paged { background: var(--vm-desk); }   /* (the desk only under the sheets: 페이지 나눔) */
html:not(.mshell) .editor-body.vm-paged > .fm { background: transparent; border-bottom-color: transparent; }
html:not(.mshell) .editor-body.vm-on > .doc { width: auto; max-width: none; }   /* 페이지 나눔 off: a plain document (only the chosen 폭) */
html:not(.mshell) .editor-body.vm-paged > .doc { margin-top: 18px; margin-bottom: 40px; }
html.vm-w:not(.mshell) .editor-body.vm-on > .doc { margin-left: auto; margin-right: auto; box-sizing: content-box; width: var(--vm-w); max-width: none; flex: none; }   /* (폭 = the text's own width, kept even past the tab: it scrolls sideways — owner 2026-11-13) */
html.vm-w:not(.mshell) .editor-body.vm-on { overflow-x: auto; }
html:not(.mshell) .editor-body > .vm-bar { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 6px;
  min-height: 36px; padding: 4px 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--mut); }
.vm-bar .vm-lbl { font-weight: 600; letter-spacing: .02em; }
.vm-bar .vm-st { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 8px; }
.vm-bar .vm-st.busy { color: var(--acc); } .vm-bar .vm-st.ok { color: #1f9d55; } .vm-bar .vm-st.bad { color: #d64545; }
.vm-bar .vm-st a { color: var(--acc); font-weight: 600; text-decoration: underline; }
.vm-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--acc) 25%, transparent); border-top-color: var(--acc); animation: vm-spin .8s linear infinite; flex: none; }
@keyframes vm-spin { to { transform: rotate(360deg); } }
.vm-bar .vm-wbox { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; height: 26px; border-radius: 6px; cursor: default; }
.vm-bar .vm-wbox:hover { background: var(--bg2); }
.vm-bar .vm-wr { width: 84px; height: 18px; margin: 0; accent-color: var(--acc); cursor: pointer; }
.vm-bar .vm-wsel { height: 24px; max-width: 150px; padding: 0 4px; font: inherit; font-size: 12px; color: var(--fg); background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.vm-bar .vm-wnum { width: 68px; height: 24px; padding: 0 6px; font: inherit; font-size: 12px; color: var(--fg); background: var(--bg); border: 1px solid var(--acc); border-radius: 6px; }
.vm-bar .vm-wnum[hidden], .vm-bar .vm-wdel[hidden], .vm-bar .vm-wsel[hidden] { display: none; }
.vm-bar .vm-wdel { height: 22px; padding: 0 6px; margin: 0; font-size: 11px; color: var(--mut); background: none; border: 1px solid transparent; border-radius: 6px; cursor: pointer; box-shadow: none; }
.vm-bar .vm-wbtns { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.vm-bar .vm-wbtns[hidden] { display: none; }
.vm-bar .vm-wbtns .vm-wb { height: 24px; padding: 0 9px; border-color: var(--line); }
.vm-inpanel .vm-wbtns { display: flex; padding: 0 2px; }
.vm-inpanel .vm-wbtns .vm-wb { flex: 1 1 auto; justify-content: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.vm-bar .vm-wdel:hover { color: #d64545; border-color: color-mix(in srgb, #d64545 40%, transparent); }
.vm-bar .vm-wv { min-width: 46px; font-variant-numeric: tabular-nums; color: var(--fg); }
.vm-bar .vm-t, .vm-bar .vm-x { display: inline-flex; align-items: center; gap: 4px; height: 26px; margin: 0; padding: 0 9px; border-radius: 6px; border: 1px solid transparent;
  background: none; color: var(--mut); font: inherit; box-shadow: none; cursor: pointer; white-space: nowrap; }
.vm-bar .vm-t:hover, .vm-bar .vm-x:hover { color: var(--fg); background: var(--bg2); }
.vm-bar .vm-t:disabled { opacity: .5; cursor: progress; }
.vm-bar .vm-t.on { color: var(--acc); background: var(--acc-bg); border-color: color-mix(in srgb, var(--acc) 30%, transparent); }
.vm-bar .vm-t[hidden] { display: none; }
.vm-bar .vm-pages { margin-left: 2px; font-variant-numeric: tabular-nums; }
.vm-bar .vm-x { padding: 0 8px; }
.vm-pset { position: relative; display: inline-flex; } .vm-pset[hidden] { display: none; }
.vm-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; gap: 8px; width: 230px; padding: 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0, 0, 0, .16); color: var(--fg); }
.vm-pop[hidden] { display: none; }
.vm-pop-h { font-weight: 700; font-size: 13px; }
.vm-pop label { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mut); }
.vm-pop select { height: 28px; font: inherit; color: var(--fg); background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.vm-pop-n { font-size: 11.5px; color: var(--mut); line-height: 1.5; }
/* 폭: a set width centres the text */
html.vm-w .editor-body .form { max-width: var(--vm-w); margin-left: auto; margin-right: auto; }
html.vm-w .editor-body .fm { padding-left: max(32px, calc((100% - var(--vm-w)) / 2 + 32px)); padding-right: max(32px, calc((100% - var(--vm-w)) / 2 + 32px)); }
html.vm-w .fe-md .crepe-host .milkdown .ProseMirror { max-width: calc(var(--vm-w) + 144px); margin: 0 auto; }
/* 문단: one layer over the scroller, never in the way of a click */
.editor-body:has(> .vm-layer) { position: relative; }
html:not(.mshell) .vm-layer { display: block; position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 2; }
.vm-layer > div { position: absolute; }
.vm-pn { width: 26px; text-align: right; font-size: 10.5px; line-height: 24px; color: color-mix(in srgb, var(--mut) 75%, transparent); font-variant-numeric: tabular-nums; }
.vm-pn::before { content: attr(data-n); }
.vm-psep { height: 0; border-top: 1px dotted color-mix(in srgb, var(--mut) 30%, transparent); }
/* 페이지: sheets of paper behind the document itself (app.js sheets()): the text on them as it is, the gaps between them in the desk colour */
.vm-back { display: none; }
html:not(.mshell) .editor-body.vm-paged > .vm-back { display: block; position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 0; }
.vm-back > .vm-sheetbg { position: absolute; background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .10), 0 8px 26px rgba(0, 0, 0, .10); border-radius: 2px; }
.vm-layer > .vm-sheetmask { background: var(--bg); }
.vm-layer > .vm-pno { height: 16px; text-align: center; font-size: 11px; line-height: 16px; color: var(--mut); font-variant-numeric: tabular-nums; }
.vm-layer > .vm-pno::before { content: attr(data-n); }
html:not(.mshell) .editor-body.vm-paged > .doc { position: relative; z-index: 1; background: transparent !important; border-color: transparent !important; box-shadow: none !important; border-radius: 0 !important; }
.vm-layer > .vm-gapmask { background: var(--vm-desk, var(--bg2)); }
/* 쪽 목록 (app.js thumbs()): the 속성 패널's 페이지 tab */
.dtoc.dtoc-tabbed[data-tab="pages"] > [data-k="pages"]:not([hidden]) { display: block !important; }
.dtoc-pgsec .vm-thumbs-in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0 20px; }
/* 📱 모바일 보기 (app.js devFit()): the document pane turns into the chosen device's screen */
.vm-bar .vm-devbox { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 8px; }
.vm-inpanel .vm-devbox { display: flex; padding: 4px 2px; }
.vm-bar .vm-dkind { display: inline-flex; gap: 4px; flex: 1 1 auto; }
.vm-bar .vm-dkind .vm-dk { flex: 1; justify-content: center; height: 24px; padding: 0 8px; border-color: var(--line); }
.vm-bar .vm-dsel[hidden] { display: none; }
.vm-bar .vm-dsel { flex: 1 1 140px; height: 24px; font: inherit; font-size: 12px; color: var(--fg); background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; }
.vm-bar .vm-drot { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; cursor: pointer; }
.vm-bar .vm-drot[hidden] { display: none; }
.vm-bar.vm-isdev :is(.vm-wbox, .vm-wbtns) { display: none !important; }
html:not(.mshell) .editor-body.vm-devmode { background: var(--vm-desk, var(--bg2)); }
html:not(.mshell) .editor-body.vm-devmode > .fm { display: none; }
html:not(.mshell) .editor-body.vm-devmode > .doc { background: var(--bg); border-radius: 22px; box-shadow: 0 0 0 7px #1b1b1b, 0 0 0 8px #444, 0 10px 30px rgba(0, 0, 0, .25); }
.editor-body.vm-devmode > .doc table { display: block; max-width: 100%; overflow-x: auto; }
.editor-body.vm-devmode > .doc :is(img, svg) { max-width: 100%; height: auto; }
.vm-layer > .vm-devlbl { text-align: center; font-size: 12px; line-height: 18px; color: var(--mut); }
.vm-layer > .vm-devlbl::before { content: attr(data-n); }
.vm-th { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 11px; color: var(--mut); font-variant-numeric: tabular-nums; }
.vm-th-pg { position: relative; flex: none; overflow: hidden; background: var(--bg); border-radius: 2px; outline: 2px solid transparent; outline-offset: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 3px 10px rgba(0, 0, 0, .08); transition: outline-color .15s; }
.vm-th:hover .vm-th-pg { outline-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.vm-th.on .vm-th-pg { outline-color: var(--acc); }
.vm-th.on > span { color: var(--acc); font-weight: 700; }
.vm-th-pg > .vm-thmini { position: absolute !important; left: 0; top: 0; transform-origin: 0 0; overflow: hidden !important; pointer-events: none; background: var(--bg) !important;
  padding: 0 !important; margin: 0 !important; contain: strict; }
.vm-thmini > div { position: relative !important; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
  background: none !important; box-shadow: none !important; }
.vm-tb { position: absolute; display: block; border-radius: 1px; }
.vm-tb-t { background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--fg) 30%, transparent) 0 1px, transparent 1px 2.6px); }
.vm-tb-h { background: color-mix(in srgb, var(--fg) 62%, transparent); max-width: 60%; }
.vm-tb-box { border: 1px solid color-mix(in srgb, var(--fg) 32%, transparent); background: color-mix(in srgb, var(--fg) 6%, transparent); }
html:not(.mshell) .editor-body.vm-paged { overflow-x: auto; }
.vm-bar .vm-wbox.off { opacity: .55; }
/* 페이지: where the pages break, a dashed line across the sheet with the next page's number (nothing inside .doc) */
.vm-pbrk { height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--acc) 55%, transparent); }
.vm-pbrk::after { content: attr(data-n); position: absolute; right: 8px; top: -9px; padding: 0 6px; font-size: 10.5px; line-height: 16px; border-radius: 8px;
  background: var(--bg); color: var(--acc); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); font-variant-numeric: tabular-nums; }
.vm-printframe { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; visibility: hidden; }
/* no fade at the foot in 보기 모드 (owner 2026-11-13): the 문서 입력창 is behind 💬, its strip shows the desk */
html:not(.mshell) .editor-body > .adc:not(.adc-popon) { background: transparent; }
html:not(.mshell) .editor-body > .adc::before { display: none; }

/* the 보기 도구 in the 속성 패널's 도구 tab (owner 2026-11-13): one column, above the document tools */
html:not(.mshell) .dtoc .vm-bar.vm-inpanel { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 2px 0 12px; margin: 0 0 10px; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--mut); }
.vm-inpanel .vm-lbl { font-size: 11.5px; color: var(--mut); padding: 0 2px; }
.vm-inpanel .vm-st { margin: 0; padding: 0 2px; white-space: normal; overflow: visible; flex-wrap: wrap; }
.vm-inpanel .vm-st:empty { display: none; }
.vm-inpanel .vm-wbox { display: flex; flex-wrap: wrap; height: auto; padding: 4px 2px; gap: 6px; }
.vm-inpanel .vm-wsel { flex: 1 1 140px; max-width: none; }
.vm-inpanel .vm-wr { flex: 1 1 80px; width: auto; }
.vm-inpanel .vm-mode { display: flex; gap: 4px; }
.vm-inpanel .vm-mode .vm-t { flex: 1; justify-content: center; padding: 0 6px; }
.vm-inpanel > .vm-t, .vm-inpanel .vm-pset > .vm-t { justify-content: flex-start; width: 100%; }
.vm-inpanel .vm-pset { display: flex; flex-direction: column; }
.vm-inpanel .vm-pop { position: static; width: auto; margin-top: 6px; box-shadow: none; }
.vm-bar:not(.vm-inpanel) .vm-mode { display: inline-flex; gap: 2px; }
/* 채팅 패널 탭 줄의 「이 탭만 남기기 · 모두 닫기」 smaller (owner 2026-11-13) */
/* one look for the strip buttons — 문서 탭 줄 (＋ 새 문서 · 이 탭만 남기기 · 모두 닫기) and 채팅 탭 줄 (이 탭만 남기기 · 모두 닫기)
   (owner 2026-11-13 "문서탭과 채팅탭의 버튼 크기와 스타일을 통일") */
.etabs-acts > :is(.etabs-new, .etabs-close:not(.icon-only)), .hc .etabs-acts > :is(.etabs-close.hc-et-only, .etabs-close.hc-et-close:not(.icon-only)) {
  display: inline-flex !important; align-items: center; gap: 3px; flex: none; align-self: center; box-sizing: border-box; height: 24px; margin: 0 4px 0 0 !important; padding: 0 9px !important;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); color: var(--mut); font: inherit; font-size: 12px !important; font-weight: 500; line-height: 1 !important;
  white-space: nowrap; box-shadow: none; cursor: pointer; }
.etabs-acts > :is(.etabs-new, .etabs-close:not(.icon-only)):hover, .hc .etabs-acts > :is(.etabs-close.hc-et-only, .etabs-close.hc-et-close:not(.icon-only)):hover { color: var(--fg); background: var(--bg3); }
.etabs-acts > .etabs-new span { font-size: 13px; }

/* 문서 헤더 → 속성 패널 맨 위 (owner 2026-11-13, app.js .dtoc-head): 경로 · 크기 · 날짜 · 이력, then 도구 */
.dtoc .dtoc-head { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 8px; padding: 0 2px 10px; border-bottom: 1px solid var(--line); }
.dtoc .dtoc-head > .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; height: auto; min-height: 0; margin: 0; padding: 0 4px; border: 0; background: none;
  font-size: 12px; line-height: 1.5; white-space: normal; overflow: visible; }
.dtoc .dtoc-head > .crumbs > * { flex: none; max-width: 100%; }
.dtoc .dtoc-head > .tab-actions { display: flex; justify-content: flex-start; margin: 0; padding: 0 2px; border: 0; background: none; }

/* 채팅 탭 줄 (owner 2026-11-13): 오른쪽에는 [☰ 목록 | ⛶ 집중 모드]만 — 새 대화는 목록 안에, 이 탭만 남기기 · 모두 닫기는 빼고,
   패널 ✕는 문서 탭 줄의 「채팅」 버튼(.etabs-aux)으로 */
html:not(.mshell):not(.max-aux) .aux .hc-tabs .etabs-acts { display: none !important; }
html:not(.mshell):not(.max-aux) .aux .hc-tabs .hc-et-new { display: none !important; }
html:not(.mshell) .aux > .aux-tabs > [data-cmd="close-aux"] { display: none; }
.etabs-acts > .etabs-aux.on { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); background: var(--acc-bg); }
/* 목록 서랍 (PC, owner 2026-11-13): ＋ 새 대화 at the top (right under 검색), the agent filter chips in one line that scrolls sideways */
html:not(.mshell):not(.max-aux) .aux .hc-drawer > * { order: 3; }
html:not(.mshell):not(.max-aux) .aux .hc-drawer > .hc-dhead { order: 0; }
html:not(.mshell):not(.max-aux) .aux .hc-drawer > .hc-dfoot { order: 1; display: flex; position: static; padding: 2px 10px 6px; pointer-events: auto; }
html:not(.mshell):not(.max-aux) .aux .hc-drawer > .hc-agf { order: 2; }
html:not(.mshell) .aux .hc-drawer > .hc-dfoot > :not(.hc-dnew) { display: none !important; }
html:not(.mshell) .aux .hc-drawer > .hc-dfoot > .hc-dnew:not([hidden]) { display: inline-flex !important; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 32px; padding: 0 12px;
  border: 1px dashed color-mix(in srgb, var(--acc) 45%, var(--line)); border-radius: 8px; background: var(--bg); color: var(--acc); font: inherit; font-size: 13px; font-weight: 600; box-shadow: none; cursor: pointer; }
html:not(.mshell) .aux .hc-drawer > .hc-dfoot > .hc-dnew:hover { background: var(--acc-bg); border-style: solid; }
html:not(.mshell) .aux .hc-drawer > .hc-agf { flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex-shrink: 0; }
html:not(.mshell) .aux .hc-drawer > .hc-agf::-webkit-scrollbar { display: none; }
html:not(.mshell) .aux .hc-drawer > .hc-agf > * { flex: none; white-space: nowrap; }
/* (owner 2026-11-13) the panel's ✕ left the corner: the strip keeps room for ⛶ only — ☰ sits right beside it; 채팅 패널 버튼 = 아이콘만 */
.etabs-acts > .etabs-aux { padding: 0 7px !important; }
.etabs-acts > .etabs-aux svg { width: 15px; height: 15px; }

/* 💬 채팅 탭 줄: [탭 …] … [☰ ⛶] — app.js .hc-rbtns (owner 2026-11-13 "다시 만드세요"); the old corner bar and the strip's own ☰ are hidden */
@media (min-width: 901px) {
  html:not(.max-aux):not(.mshell) .aux > .aux-tabs { display: none !important; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs { margin-right: 0 !important; padding-right: 0 !important; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs[hidden] + .hc-head { padding-right: 0; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs .hc-et-list { display: none !important; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs > .hc-rbtns { display: flex; }
}
/* 💬 채팅 패널 헤더 = [제목 ……… 도구] (owner 2026-11-19 "헤더 디자인을 다시 적용 — 제목 - 도구"; the panel has no tabs now): the one tab
   is off, the title row lies over the whole strip — the title at the left (no ☰: the list is the left sidebar's 채팅), the head's
   buttons and ⛶ (.hc-rbtns) at the right */
@media (min-width: 901px) {
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs > :is(.hc-et, .hc-etlead, .hc-et-ghost) { display: none !important; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) { padding-right: 0 !important; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head { left: 0; right: 44px; max-width: none; justify-content: flex-start; padding: 0 2px 0 6px; border-bottom: 0; background: transparent; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head > .hc-sess { display: flex !important; flex: 1 1 auto !important; min-width: 0; height: 30px; padding: 0 8px; border-radius: 0; font-size: 13.5px; font-weight: 600;
    background: transparent !important; cursor: default; pointer-events: none; }   /* (owner 2026-11-19 "텍스트로") the title as text, not a button */
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head > .hc-sess .hc-title { display: block !important; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head > .hc-sess .hc-sess-ic { display: none !important; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head > .hc-new { display: none !important; }   /* (owner 2026-11-19: no 새 대화 here — the left 채팅 list has it) */
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head > .hc-totab { display: inline-grid !important; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--mut); cursor: pointer; }
  html:not(.max-aux):not(.mshell) .aux > .hc > .hc-tabs.etabs:not([hidden]) + .hc-head > .hc-totab:hover { color: var(--fg); background: var(--bg3); }
}
.hc-totab { display: none; }
.hc-rbtns { display: none; position: sticky; right: 0; z-index: 3; flex: none; align-items: center; gap: 2px; margin-left: auto; padding: 0 6px 0 8px; background: var(--bg2); }
.hc-rbtns .hc-rb { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--mut); cursor: pointer; }
.hc-rbtns .hc-rb:hover { background: var(--bg3); color: var(--fg); }
.hc-rbtns .hc-rb:focus-visible { outline: 2px solid color-mix(in srgb, var(--acc) 45%, transparent); outline-offset: 0; }

/* 📑 속성 패널: 도구 (펼침) → [속성 | 목차 | 이력] 탭 → 그 탭의 내용 (owner 2026-11-13) */
.dtoc .dtoc-head > .tab-actions { flex-wrap: wrap; gap: 4px; }
.dtoc .dtoc-head > .tab-actions > :is(a, button) { display: inline-flex; align-items: center; gap: 3px; height: 24px; margin: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--fg); font: inherit; font-size: 11.5px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; }
.dtoc .dtoc-head > .tab-actions > :is(a, button):hover { background: var(--bg3); }
.dtoc .dtoc-head > .tab-actions > :is(.w-toggle.on, .max-toggle.on) { background: var(--acc-bg); color: var(--acc); }
.dtoc .dtoc-head > .tab-actions > select { height: 24px; max-width: 100%; padding: 0 6px; font-size: 11.5px; border-radius: 6px; }
.dtoc .dtoc-head > .tab-actions > .fmts { display: inline-flex; gap: 3px; }
.dtoc .dtoc-tabs { display: flex; gap: 2px; margin: 0 0 8px; padding: 2px; border-radius: 8px; background: var(--bg3); }
.dtoc .dtoc-tabs > button { flex: 1; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--mut); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.dtoc .dtoc-tabs > button.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.dtoc.dtoc-tabbed > [data-k] { display: none !important; }
.dtoc.dtoc-tabbed[data-tab="prop"] > [data-k="prop"], .dtoc.dtoc-tabbed[data-tab="toc"] > [data-k="toc"],
.dtoc.dtoc-tabbed[data-tab="hist"] > [data-k="hist"], .dtoc.dtoc-tabbed[data-tab="hist"] > [data-k="ver"]:not([hidden]) { display: block !important; }
.dtoc.dtoc-tabbed .dtoc-sec > .dtoc-h { display: none !important; }
.dtoc.dtoc-tabbed .dtoc-hist { margin-top: 0; padding-top: 0; border-top: 0; }
.dtoc.dtoc-tabbed :is(.dtoc-sec, .dtoc-hist).fold > :not(.dtoc-h) { display: revert !important; }
.dtoc .dtoc-hnone { display: none; padding: 8px; color: var(--mut); font-size: 12.5px; }
.dtoc.dtoc-tabbed[data-tab="hist"]:has(> .dtoc-hist:empty):has(> .dtoc-vsec[hidden]) > .dtoc-hnone { display: block; }

/* 도구 탭 (owner 2026-11-13): the tools as a list — one tool per row, like a menu */
.dtoc.dtoc-tabbed[data-tab="tools"] > [data-k="tools"] { display: block !important; }
.dtoc .dtoc-tsec > .tab-actions { display: flex !important; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 0; border: 0; background: none; }
.dtoc .dtoc-tsec > .tab-actions > :is(a, button) { display: flex !important; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; height: 32px; margin: 0; padding: 0 10px;
  border: 0; border-radius: 7px; background: transparent; color: var(--fg); font: inherit; font-size: 13px; font-weight: 400; line-height: 1; text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.dtoc .dtoc-tsec > .tab-actions > :is(a, button):hover { background: var(--bg3); }
.dtoc .dtoc-tsec > .tab-actions > :is(.w-toggle.on, .max-toggle.on) { background: var(--acc-bg); color: var(--acc); }
.dtoc .dtoc-tsec > .tab-actions > select { width: 100%; height: 32px; margin: 2px 0; padding: 0 8px; font-size: 13px; border-radius: 7px; }
.dtoc .dtoc-tsec > .tab-actions > .fmts { display: flex; gap: 4px; padding: 4px 10px; }
.dtoc .dtoc-tsec > .tab-actions > .fmts a.fmt { height: 22px; padding: 0 8px; }
/* (owner 2026-11-13) 속성 탭: 「속성 전체 n」 접기 없이 모두 · 이력 탭: 안쪽 스크롤 없이 패널과 함께 · 보기 모드의 ☰ 버튼은 아이콘만 */
.dtoc.dtoc-tabbed .dtoc-all > summary { display: none; }
.dtoc.dtoc-tabbed .dtoc-all dl { margin-top: 2px; }
.dtoc.dtoc-tabbed .dtoc-vsec > .dtoc-vhbox, .dtoc.dtoc-tabbed .dtoc-vsec :is(.adc-vh, .adc-vh-list) { max-height: none !important; overflow: visible !important; }
.epane.dtoc-headin.has-dtoc:not(.dtoc-side) > .dtoc-open { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }

/* 📑 오른쪽 패널의 「요청」: 상자·여백을 줄여 글이 더 보이게 (owner 2026-11-13) — 테두리·바탕 없이 한 줄 머리 + 촘촘한 목록, 안쪽 스크롤 없음 */
.adc-rpanel { padding: 10px 10px 14px !important; }
.adc-rpanel .adc-rp-req .adc-req { margin: 0 0 8px !important; }
.adc-rpanel .adc-rp-req .adc-req-c { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.adc-rpanel .adc-rp-req .adc-req-one { gap: 6px; min-height: 22px; }
.adc-rpanel .adc-rp-req .adc-req-k { padding: 0 6px; font-size: 11px; line-height: 18px; }
.adc-rpanel .adc-rp-req .adc-req-all { margin: 4px 0 0; max-height: none; overflow: visible; }
.adc-rpanel .adc-rp-req .adc-req-all li { gap: 1px; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; line-height: 1.45; }
.adc-rpanel .adc-rp-req .adc-req-all li + li { margin-top: 2px; }
.adc-rpanel .adc-rp-req .adc-req-all li.on { background: color-mix(in srgb, var(--bg3) 70%, transparent); font-weight: 500; }
.adc-rpanel .adc-rp-req .adc-req-tag { font-size: 10.5px; }

/* ⌄ 입력창 숨기기 at →← 좁은 폭 too (owner 2026-11-13): the box shows by default; 숨기기 puts it behind the 💬 (.adc-boxoff) */
html.w-narrow:not(.mshell) .epane .adc .hc-bar > .adc-hidebox { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-left: auto; height: 24px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--mut); font: inherit; font-size: 12px; cursor: pointer; }
html.w-narrow:not(.mshell) .epane .adc .hc-bar > .adc-hidebox:hover { color: var(--fg); background: var(--bg3); }
html.w-narrow:not(.mshell) .epane .adc.adc-boxoff > .adc-box, html.w-narrow:not(.mshell) .epane .adc.adc-boxoff:not(.adc-editmode) > .adc-dock { display: none !important; }
html.w-narrow:not(.mshell) .epane:has(.adc.adc-boxoff) > .adc-fab { display: grid; place-items: center; position: absolute; right: 22px; bottom: 22px; z-index: 40; width: 52px; height: 52px; padding: 0;
  border: 0; border-radius: 50%; background: var(--acc); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: pointer; transition: transform .15s ease; }
html.w-narrow:not(.mshell) .epane:has(.adc.adc-boxoff) > .adc-fab:hover { transform: scale(1.06); }

/* 🖼 그림 · 도면 넘겨 보기 (owner 2026-11-13, imgview.js .lb-gal): thumbnails on the left, ‹ › on the picture's sides */
.lb.lb-gal { grid-template-columns: 136px minmax(0, 1fr); gap: 12px; place-items: stretch; }
.lb.lb-gal .imgv { width: 100%; position: relative; }
.lb-thumbs { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 8px; border-radius: 14px; background: #1c1e24; border: 1px solid #ffffff1a; box-shadow: 0 24px 80px rgba(0,0,0,.45); scrollbar-width: thin; }
.lb-th { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex: none; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: transparent; color: #cbd5e1; cursor: pointer; }
.lb-th:hover { background: #ffffff10; }
.lb-th.on { border-color: var(--acc, #6366f1); background: #ffffff14; color: #fff; }
.lb-th-img { display: grid; place-items: center; height: 76px; overflow: hidden; border-radius: 5px; background: #2a2d35; }
.lb-th-img img { max-width: 100%; max-height: 76px; object-fit: contain; display: block; }
.lb-th-img svg { width: 100%; height: 76px; background: #fff; }
.lb-th-cap { font-size: 11.5px; text-align: center; line-height: 1.2; }
.lb-nav { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 44px; height: 64px; padding: 0; border: 0; border-radius: 10px; background: rgba(0,0,0,.35);
  color: #fff; font-size: 34px; line-height: 1; cursor: pointer; opacity: .75; transition: opacity .15s, background .15s; }
.lb-nav:hover { opacity: 1; background: rgba(0,0,0,.55); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (max-width: 700px) { .lb.lb-gal { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 92px; } .lb.lb-gal .lb-thumbs { order: 2; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .lb-th { width: 84px; } .lb-th-img { height: 56px; } .lb-th-img img { max-height: 56px; } .lb-th-img svg { height: 56px; } }
.lb.lb-swap { animation: none; }   /* 넘겨 볼 때는 다시 페이드인하지 않음 */

/* 원본 → 텍스트 | 편집기 (owner 2026-11-13): segmented pick in the edit view's tools */
.fe-seg { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg2); vertical-align: middle; }
.fe-seg .fe-m { border: 0; background: transparent; padding: 3px 10px; border-radius: 5px; font-size: 12.5px; color: var(--mut, #888); cursor: pointer; }
.fe-seg .fe-m.on { background: var(--bg); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* 속성 패널 머리: 🕘 이력 · 💬 대화 나란히 한 줄 (owner 2026-11-13) — 크기·날짜는 그 위 줄 */
.dtoc .dtoc-head > .crumbs > .meta { flex-basis: 100%; }
.dtoc .dtoc-head > .crumbs > :is(.adc-crumbvh, .adc-crumbcv) { margin: 2px 0 0; }
.dtoc .dtoc-head > .crumbs > .adc-crumbcv { margin-left: 2px; }

/* 문서(속성 패널) 버튼 = 채팅 버튼과 같은 크기 (owner 2026-11-13 "문서 버튼과 패널 버튼 크기를 같게"): 52px 원, 바닥에서 22px */
.epane.dtoc-headin.has-dtoc:not(.dtoc-side) > .dtoc-open { width: 52px; height: 52px; left: 22px; bottom: 22px; box-shadow: 0 6px 20px rgba(0,0,0,.18); transition: transform .15s ease; }
.epane.dtoc-headin.has-dtoc:not(.dtoc-side) > .dtoc-open:hover { transform: scale(1.06); }
.epane.dtoc-headin.has-dtoc:not(.dtoc-side) > .dtoc-open svg { width: 22px; height: 22px; }

/* 📌 패널 고정 (owner 2026-11-13, app.js .dtoc-pin): the panel button's place and size — shown on the open panel (고정) and the pinned one (고정 풀기) */
.dtoc-pin { display: none; }
html:not(.mshell) .epane.has-dtoc:is(.dtoc-on, .dtoc-side) > .dtoc-pin { display: grid; place-items: center; position: absolute; left: 22px; bottom: 22px; z-index: 35; width: 52px; height: 52px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--fg); box-shadow: 0 6px 20px rgba(0,0,0,.18); cursor: pointer; transition: transform .15s ease; }
html:not(.mshell) .epane.has-dtoc:is(.dtoc-on, .dtoc-side) > .dtoc-pin:hover { transform: scale(1.06); }
html:not(.mshell) .epane.has-dtoc > .dtoc-pin.on { background: var(--acc); color: #fff; border-color: var(--acc); }
html:not(.mshell) .epane.has-dtoc.dtoc-on:not(.dtoc-side) > .dtoc-open { visibility: hidden; }   /* (the pin takes its place while the panel is open) */
html:not(.mshell) .epane.has-dtoc:is(.dtoc-on, .dtoc-side) > .dtoc { padding-bottom: 92px; }   /* (the last rows scroll clear of the pin) */

/* ↔ 속성 패널 폭 하나 (owner 2026-11-13 "서랍(고정 안함), 패널(고정함) 모두 크기 동일, 드래그로 조정"): the drawer takes the pinned
   panel's width (--dtoc-w, dragged · kept in localStorage dtoc-w) and its right edge drags it too */
html:not(.mshell) .epane.has-dtoc.dtoc-on:not(.dtoc-side) > .dtoc { width: min(var(--dtoc-w, 264px), 86%); }
html:not(.mshell) .epane.has-dtoc.dtoc-on:not(.dtoc-side) > .dtoc-sash { display: block; top: 0; bottom: 0; height: auto; z-index: 31; }

/* ⬆ 입력창이 나와 있으면 패널 버튼(☰ · 📌)은 그 위로 (owner 2026-11-13, app.js --adc-lift) */
html:not(.mshell) .epane.has-dtoc > :is(.dtoc-open, .dtoc-pin) { margin-bottom: var(--adc-lift, 0px); transition: margin-bottom .18s ease, transform .15s ease; }

/* 💬 입력창 플로팅 (owner 2026-11-13 "채팅입력창이 플로팅으로 표시되도록"): no white strip across the pane — the box alone floats over the
   text as a card; the text beside it stays visible and clickable */
html:not(.mshell) .editor-body > .adc.adc-popon { background: transparent; pointer-events: none; }
html:not(.mshell) .editor-body > .adc.adc-popon > * { pointer-events: auto; }
html:not(.mshell) .editor-body > .adc.adc-popon > .adc-box { background: var(--bg); border-radius: 18px; box-shadow: 0 10px 34px rgba(0,0,0,.18), 0 0 0 1px var(--line); padding-bottom: 4px; }
html:not(.mshell):not(.w-narrow) .editor-body > .adc.adc-popon { padding-left: 86px; padding-right: 86px; }   /* (room for the ☰ / 📌 button at the left — it stays at its place) */

/* 💬 / ⌄ one button at one place (owner 2026-11-13 "보이기 버튼과 같은 위치에 숨기기 버튼, 입력창 숨기기 버튼은 삭제"): at →← 좁은 폭 too;
   the box keeps clear of it on the right */
.epane .adc .hc-bar > .adc-hidebox { display: none !important; }
html.w-narrow:not(.mshell) .epane:has(> .editor-body > .adc) > .adc-fab { display: grid; place-items: center; position: absolute; right: 22px; bottom: 22px; z-index: 40; width: 52px; height: 52px; padding: 0;
  border: 0; border-radius: 50%; background: var(--acc); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: pointer; transition: transform .15s ease; }
html.w-narrow:not(.mshell) .epane > .adc-fab:hover { transform: scale(1.06); }
html:not(.mshell) .epane > .adc-fab.on { background: var(--bg); color: var(--fg); border: 1px solid var(--line); }
html.w-narrow:not(.mshell) .editor-body > .adc:not(.adc-boxoff) { padding-right: 86px; }
/* 아래에서 나오고 아래로 사라지기 (owner 2026-11-13, app.js .adc-in / .adc-out) */
@keyframes adc-up { from { transform: translateY(calc(100% + 40px)); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes adc-down { from { transform: none; opacity: 1; } to { transform: translateY(calc(100% + 40px)); opacity: 0; } }
/* (owner 2026-11-13 "입력창이 올라올 때 블록 나누기·편집 저장 도구도 같이 나옴"): the edit dock is not part of it */
html:not(.mshell) .editor-body > .adc.adc-in > .adc-box { animation: adc-up .26s cubic-bezier(.2, .8, .2, 1); }
html:not(.mshell) .editor-body > .adc.adc-out > .adc-box { animation: adc-down .2s ease-in forwards; }
/* 속성 서랍 닫힘 (owner 2026-11-13, app.js .dtoc-closing) */
@keyframes slideout-l { from { transform: none; opacity: 1; } to { transform: translateX(-40px); opacity: 0; } }
html:not(.mshell) .epane.has-dtoc.dtoc-on.dtoc-closing:not(.dtoc-side) > .dtoc { animation: slideout-l .18s ease-in forwards; }
html:not(.mshell) .epane.has-dtoc.dtoc-closing > :is(.dtoc-sash, .dtoc-pin) { visibility: hidden; }
html.w-narrow:not(.mshell) .epane:has(> .editor-body > .adc) > .adc-fab.on { background: var(--bg); color: var(--fg); border: 1px solid var(--line); }
/* the floating card at →← 좁은 폭 too: no strip, the box alone */
html:not(.mshell) .editor-body > .adc { pointer-events: none; }
html:not(.mshell) .editor-body > .adc > * { pointer-events: auto; }
html:not(.mshell) .editor-body > .adc > .adc-box { background: var(--bg); border-radius: 18px; box-shadow: 0 10px 34px rgba(0,0,0,.18), 0 0 0 1px var(--line); padding-bottom: 4px; }
html.w-narrow:not(.mshell) .editor-body > .adc { background: transparent; }
/* 속성 패널 버튼 = AI패널 버튼 모양 (owner 2026-11-14 "패널 버튼 모양을 통일 — 작은 모양"): a 40px round at the bottom left, shown with the
   panel too (it hides it again — app.js sideToggle); the 📌 고정 button is gone (the panel shows / hides on its own) */
html:not(.mshell) .epane.dtoc-headin.has-dtoc > .dtoc-open { display: grid; place-items: center; position: absolute; left: 22px; bottom: 28px; z-index: 36; width: 40px; height: 40px;
  padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--mut); box-shadow: 0 4px 14px rgba(0,0,0,.12); transform: none; cursor: pointer; }
html:not(.mshell) .epane.dtoc-headin.has-dtoc > .dtoc-open svg { width: 19px; height: 19px; }
html:not(.mshell) .epane.dtoc-headin.has-dtoc > .dtoc-open:hover { background: var(--bg2); color: var(--fg); transform: none; }
html:not(.mshell) .epane.dtoc-headin.has-dtoc > .dtoc-open.on { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
html:not(.mshell) .epane.dtoc-headin.has-dtoc.dtoc-on > .dtoc-open { visibility: visible; }
html:not(.mshell) .epane.has-dtoc > .dtoc-pin { display: none !important; }
html:not(.mshell) .epane.has-dtoc:is(.dtoc-on, .dtoc-side) > .dtoc { padding-bottom: 80px; }
/* 🔐 승인 대기 on the round 💬 (owner 2026-11-14 "승인 요청 팝업이 뜨지 않아 막힘" — chat.js .adc-fab-apv): a badge that pulses; a click opens the request */
html:not(.mshell) .epane > .adc-fab.adc-fab-apv { display: grid !important; }
.epane > .adc-fab.adc-fab-apv::before { content: "🔐"; position: absolute; top: -6px; left: -6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: var(--no, #e5484d); font-size: 12px; box-shadow: 0 0 0 2px var(--bg); animation: adc-apv-pulse 1.4s ease-in-out infinite; }
@keyframes adc-apv-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .epane > .adc-fab.adc-fab-apv::before { animation: none; } }
/* 💬 입력창 버튼 = 패널 버튼 모양 (owner 2026-11-14 "채팅입력창의 디자인 및 크기도 패널 버튼과 같게"): 40px, white with a line, the
   accent only while the box is out (.on); the ◨ AI패널 button sits just left of it (chat.css .adc-rptg right 72px) */
html:not(.mshell) .epane > .adc-fab { width: 40px !important; height: 40px !important; right: 22px !important; bottom: 28px !important; padding: 0 !important;
  border: 1px solid var(--line) !important; background: var(--bg) !important; color: var(--mut) !important; box-shadow: 0 4px 14px rgba(0,0,0,.12) !important; transform: none !important; }
html:not(.mshell) .epane > .adc-fab:hover { background: var(--bg2) !important; color: var(--fg) !important; }
html:not(.mshell) .epane > .adc-fab.on { color: var(--acc) !important; border-color: color-mix(in srgb, var(--acc) 45%, var(--line)) !important; }
html:not(.mshell) .epane > .adc-fab svg { width: 19px; height: 19px; }
html:not(.mshell) .epane:has(.adc.adc-busy) > .adc-fab::after { top: -2px !important; right: -2px !important; width: 10px !important; height: 10px !important; }
/* (owner 2026-11-14 "속성 패널 버튼이 문서 내용을 가리고, AI패널·채팅입력창 버튼이 수정안 목록을 일부 가립니다"): the round buttons float
   over the pane's bottom corners (left 22 · right 22/72 · bottom 28, 40px) — the document's last line (작성 · 담당 · 모델) and the
   AI패널's last rows get room under them so they scroll clear */
html:not(.mshell) .epane:has(> :is(.adc-fab, .dtoc-open)) .doc-prov { margin-bottom: 84px; }
html:not(.mshell) .epane > .adc-rpanel { padding-bottom: 84px; }
/* 🤖 AI 작업 n회 on the 작성 정보 line and its list, 판 by 판 (owner 2026-11-14 — docprov.js) */
.doc-prov > .doc-prov-sum { height: 22px; padding: 0 9px; border: 1px solid var(--line); border-radius: 11px; background: none; color: inherit; font: inherit; font-size: inherit; cursor: pointer; white-space: nowrap; }
.doc-prov > .doc-prov-sum:hover, .doc-prov > .doc-prov-sum.on { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
.doc-prov-hist { list-style: none; margin: -12px 32px 20px; padding: 0; font-size: 12.5px; color: var(--mut); }
.doc-prov-hist li { display: grid; grid-template-columns: 52px minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.doc-prov-hist li b { color: var(--fg); font-weight: 600; }
.doc-prov-hist li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:not(.mshell) .epane:has(> :is(.adc-fab, .dtoc-open)) .doc-prov:has(+ .doc-prov-hist:not([hidden])) { margin-bottom: 20px; }
html:not(.mshell) .epane:has(> :is(.adc-fab, .dtoc-open)) .doc-prov-hist:not([hidden]) { margin-bottom: 84px; }
.doc-prov > .doc-prov-sum { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }   /* (never past the line — owner 2026-11-14) */
/* ⬇ 작성 정보 at the pane's bottom when the document is short (owner 2026-11-14 "빈 문서 화면을 정리하세요" — docprov.js pin) */
.editor-body > .doc-prov { margin-top: calc(-32px + var(--prov-push, 0px)); }
/* 📐 도면 크기 (owner 2026-11-14): "<!-- 블록: w:640 -->" under a diagram → --mmd-w on its <pre> (inbox.py _al_apply) */
pre.mmd[style*="--mmd-w"] > .mmd-view svg { width: var(--mmd-w) !important; max-width: 100% !important; height: auto; }

/* 탐색기 여러 개 선택 · 임시 탭 (2026-11-14): ⌘/Shift-click rows; a one-click document opens in an italic preview tab */
.tree .row.sel { background: color-mix(in srgb, var(--acc) 18%, transparent); }
.tree .row.sel.on { background: color-mix(in srgb, var(--acc) 26%, var(--sel)); }
.etab.pv .et { font-style: italic; }
/* 페이지 보기 (owner 2026-11-14 "페이지 보기 후 블록을 선택하면 화면이 틀어집니다"): the sheets are measured again on every change
   (a block picked, the AI패널 opening) — the page-break margins taken off and put back. With the browser's scroll anchoring on, taking
   them off moved the scroll mid-measure, so the breaks came out too far down (a gap in the middle of a block, the scroll jumping) */
html:not(.mshell) .editor-body.vm-paged { overflow-anchor: none; }

/* 🖼 탐색기 미리보기 (2026-11-15, app.js exPreview): a picked picture / video at the bottom of the panel */
.expv { flex: none; display: flex; flex-direction: column; max-height: 45%; min-height: 0; border-top: 1px solid var(--line); background: var(--bg2); }
.expv[hidden] { display: none; }
.expv-h { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; font-size: 12px; flex: none; }
.expv-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.expv-open { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 4px; padding: 1px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.expv-open:hover { border-color: var(--acc); color: var(--acc); }
.expv-x { width: 24px; height: 24px; font-size: 12px; }
.expv-b { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px 8px; overflow: hidden; }
.expv-b img, .expv-b video { max-width: 100%; max-height: min(38vh, 380px); object-fit: contain; border-radius: 4px; display: block; }
.expv-b img { background: repeating-conic-gradient(var(--bg3) 0 25%, transparent 0 50%) 0 0 / 14px 14px; }
.expv-b video { width: 100%; background: #000; }
.expv-err { margin: 12px 0; font-size: 12px; }
/* 📎 여러 파일 끌기의 끌림 표시 (owner 2026-11-15) */
.drag-n { position: fixed; left: -1000px; top: -1000px; padding: 6px 12px; border-radius: 8px; background: var(--acc, #4f46e5); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* 🌐 게시 (2026-11-15, app.js + inbox_publish.py): the dialog */
.pubdlg { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pubdlg-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.pubdlg-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.pubdlg-h b { font-size: 15px; } .pubdlg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.pubdlg-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; font-size: 13.5px; }
.pubdlg-intro { margin: 0; font-size: 13px; }
.pubdlg-live { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, #16a34a 40%, var(--line)); background: color-mix(in srgb, #16a34a 8%, transparent); border-radius: 8px; }
.pubdlg-live.off { border-color: var(--line); background: var(--bg2); }
.pubdlg-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; flex: none; } .pubdlg-live.off .pubdlg-dot { background: var(--mut); }
.pubdlg-u { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .pubdlg-u .mut { font-size: 12px; }
.pubdlg-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--acc); }
.pubdlg-f { display: flex; flex-direction: column; gap: 5px; } .pubdlg-f > span { font-weight: 600; font-size: 12.5px; } .pubdlg-f small { font-size: 11.5px; }
.pubdlg-slug { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--bg); }
.pubdlg-slug > span { padding: 0 2px 0 9px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.pubdlg-slug input { flex: 1; min-width: 0; border: 0; padding: 8px 9px 8px 0; font: inherit; background: none; color: inherit; outline: none; }
.pubdlg-slug:focus-within { border-color: var(--acc); }
.pubdlg-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pubdlg select, .pubdlg-at, .pubdlg-pw { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: var(--bg); color: inherit; }
.pubdlg-acc { display: flex; flex-direction: column; gap: 6px; } .pubdlg-acc label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.pubdlg-pw { margin-top: 4px; }
.pubdlg-err { margin: 0; color: #dc2626; font-size: 13px; }
.pubdlg-btns { display: flex; align-items: center; gap: 8px; } .pubdlg-btns .sp { flex: 1; }
.pubdlg-btns button, .pubdlg-copy { padding: 7px 14px; border-radius: 7px; font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.pubdlg-btns .primary { background: var(--acc); border-color: var(--acc); color: #fff; } .pubdlg-btns .primary:disabled { opacity: .6; }
.pubdlg-stop { color: #dc2626 !important; }
/* 📝 블로그용 복사 (owner 2026-11-20) */
.blogdlg { width: min(760px, 100%); }
.blog-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.blog-title { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-weight: 600; background: var(--bg); color: inherit; }
.blog-row button, .blog-zip { padding: 7px 14px; border-radius: 7px; font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--fg); text-decoration: none; }
.blog-row .blog-cb { background: var(--acc); border-color: var(--acc); color: #fff; }
.blog-pv { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; }
.blog-pv img { max-width: 100%; height: auto; max-height: 240px; }
.blog-note { margin: 0; font-size: 12.5px; line-height: 1.55; } .blog-note a { word-break: break-all; }

/* 🖌 사진 편집 (Filerobot, imgview.js openEditor): the editor in a card over the dimmed page; full screen on phones */
.lb.lb-edit { padding: 3vh 3vw; }
.lb.lb-edit .fie-box { width: min(100%, 1500px); height: 100%; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.55); color: #1f2328; }
.lb .imgv-bar .imgv-edit { font-weight: 600; }
@media (max-width: 760px) { .lb.lb-edit { padding: 0; } .lb.lb-edit .fie-box { border-radius: 0; } }
/* 🕘 편집 기록 (imgview.js history): ‹ 원본 · 수정 n회 후 … › in the popup bar; an earlier version is marked amber */
.lb .imgv-hist { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 4px; border-radius: 8px; border: 1px solid #ffffff1a; }
.lb .imgv-hist .ih-lbl { font-size: 12px; min-width: 88px; text-align: center; white-space: nowrap; opacity: .9; }
.lb .imgv-hist.old { border-color: #f59e0b; background: #f59e0b1f; }
.lb .imgv-hist.old .ih-lbl { color: #fbbf24; opacity: 1; }
.lb .imgv-hist .ih-restore { border-color: #f59e0b !important; color: #fbbf24 !important; font-weight: 600; }
.lb .imgv-bar button:disabled { opacity: .35; cursor: default; }
@media (max-width: 760px) { .lb .imgv-hist .ih-lbl { min-width: 0; } .lb .imgv-hist .ih-restore { padding: 3px 6px; } }
/* 📄 문서 뷰어 탭 (.imgv not in a popup): the same ‹ › · 되돌리기 · ✎ 편집 in the light/dark bar */
.imgv-hist { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 4px; border-radius: 8px; border: 1px solid var(--line); }
.imgv-hist .ih-lbl { font-size: 12px; min-width: 88px; text-align: center; white-space: nowrap; }
.imgv-hist.old { border-color: #f59e0b; background: #f59e0b1f; }
.imgv-hist.old .ih-lbl { color: #b45309; font-weight: 600; }
.imgv-hist .ih-restore { border: 1px solid #f59e0b; color: #b45309; font-weight: 600; }
.imgv-bar .imgv-edit { font-weight: 600; }
.imgv-bar button:disabled { opacity: .35; cursor: default; }
@media (max-width: 760px) { .imgv-hist .ih-lbl { min-width: 0; } .imgv-bar { flex-wrap: wrap; } }
html[data-theme="dark"] .imgv-hist.old .ih-lbl, html[data-theme="dark"] .imgv-hist .ih-restore { color: #fbbf24; }
/* (narrow tab: the bar wraps onto a second line instead of squeezing its buttons) */
.imgv:not(.lb-v) > .imgv-bar { flex-wrap: wrap; row-gap: 4px; }
.imgv-bar button, .imgv-bar .ih-lbl { white-space: nowrap; flex: none; }
.imgv:not(.lb-v) .imgv-hist .ih-restore { background: #f59e0b; border-color: #f59e0b; color: #fff; }
/* 📝 문서 본문 그림 도구 막대(.dimg-bar) 안의 편집 기록 (imgview.js dihSync): ‹ 현재 · 수정 n회 › 되돌리기 */
.dimg-bar .dimg-hist { display: inline-flex; align-items: center; gap: 2px; }
.dimg-bar .dimg-hist .ih-lbl { font-size: 12px; white-space: nowrap; padding: 0 4px; color: var(--mut, #6b7280); }
.dimg-bar .dimg-hist button:disabled { opacity: .35; cursor: default; }
.dimg-bar .dimg-hist.old .ih-lbl { color: #b45309; font-weight: 600; }
html[data-theme="dark"] .dimg-bar .dimg-hist.old .ih-lbl { color: #fbbf24; }
.dimg-bar .dimg-hist .ih-restore { background: #f59e0b; color: #fff; font-weight: 600; margin-left: 2px; }
.dimg-bar .dimg-hist .ih-restore:hover { background: #d97706; }
img.dih-old { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* 📌 상위 폴더 고정 (owner 2026-11-15 "탐색기, 저장소등에서 상위 폴더를 고정되도록"): scrolling inside an open folder, its row and
   its parents' rows stay at the top of the panel, stacked (VS Code sticky scroll); each lets go when its folder ends. PC only */
@media (min-width: 701px) {
  html:not(.mshell) .sidebar .tree li:has(> ul:not([hidden])) > .row { position: sticky; top: calc(var(--d, 0) * 26px); z-index: calc(30 - var(--d, 0)); background: var(--bg2); }   /* (the sidebar's own colour — owner 2026-11-15 "음영을 바꾸지 마세요") */
  html:not(.mshell) .sidebar .tree li:has(> ul:not([hidden])) > .row:hover { background: var(--bg3); }
  html:not(.mshell) .sidebar .tree li:has(> ul:not([hidden])) > .row.on { background: var(--sel); }
}

/* ⭐ 즐겨찾기 (2026-11-15, app.js InboxFavs): the star in the path row, like its 🕘 이력 · 💬 대화 neighbours */
.crumbs .fav-star { margin-left: 8px; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--mut); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.crumbs .fav-star:hover { color: var(--fg); background: var(--bg2); }
.crumbs .fav-star.on { color: #d97706; border-color: color-mix(in srgb, #d97706 45%, var(--line)); }
.crumbs .fav-star[hidden] { display: none; }
.etabs-fav { font-size: 16px; line-height: 1; color: var(--mut); }
.etabs-fav.on { color: #d97706; }

/* 속성 패널 + 수정안 패널 하나로 (owner 2026-11-16, chat.js rpanel → .dtoc): the 선택한 블록 · 변경 · 수정안 · 첨삭 · 메모 above the
   panel's tabs, as one of its sections — not a column of its own at the right */
.dtoc > .adc-rpanel { position: static; flex: none; width: auto; z-index: auto; overflow: visible; margin: 0 0 10px; padding: 0 0 10px !important;
  border: 0; border-bottom: 1px solid var(--line); background: none; animation: none !important; }
.dtoc > .adc-rpanel[hidden] { display: none; }
.dtoc > .adc-rpanel::before { content: none !important; }

/* 이력 탭 (owner 2026-11-16, app.js data-k="chg" · chat.js chgInto): every AI 수정 · 적용, one group per request with a line
   between; a row goes to its block (gone: its place, shaded — .adc-ghost). 🕘 판 목록 (the old 이력 button's) under it */
.dtoc.dtoc-tabbed[data-tab="hist"] > [data-k="hist"], .dtoc.dtoc-tabbed[data-tab="hist"] > [data-k="ver"]:not(.vopen) { display: none !important; }
.dtoc.dtoc-tabbed[data-tab="hist"] > [data-k="chg"] { display: block !important; }
.dtoc.dtoc-tabbed[data-tab="hist"] > .dtoc-hnone { display: none !important; }
.dtoc-csec { display: none; }
.dtoc-csec .adc-chg-g + .adc-chg-g { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dtoc-csec .adc-chg-h { display: flex; flex-direction: column; gap: 1px; margin: 0 0 4px; }
.dtoc-csec .adc-chg-h b { font-size: 12.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dtoc-csec .adc-chg-h span { color: var(--mut); font-size: 11.5px; }
.dtoc-csec ol, .adc-side-done ol { list-style: none; margin: 0; padding: 0; }
:is(.dtoc-csec, .adc-side-done) li { display: flex; align-items: center; gap: 6px; padding: 4px 4px; border-radius: 6px; font-size: 12.5px; cursor: pointer; }
:is(.dtoc-csec, .adc-side-done) li:hover { background: var(--bg3); }
:is(.dtoc-csec, .adc-side-done) li .adc-sk { flex: none; padding: 0 5px; border-radius: 4px; font-size: 11px; line-height: 17px; background: var(--bg3); color: var(--mut); }
:is(.dtoc-csec, .adc-side-done) li.adc-k-add .adc-sk { background: color-mix(in srgb, #2e9e5b 16%, transparent); color: #2e9e5b; }
:is(.dtoc-csec, .adc-side-done) li.adc-k-del .adc-sk { background: color-mix(in srgb, #d0453a 14%, transparent); color: #d0453a; }
:is(.dtoc-csec, .adc-side-done) li.adc-k-mod .adc-sk { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc); }
:is(.dtoc-csec, .adc-side-done) li .adc-st2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.dtoc-csec, .adc-side-done) li.adc-undone .adc-st2 { color: var(--mut); text-decoration: line-through; }
:is(.dtoc-csec, .adc-side-done) li > button { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--mut); font: inherit; cursor: pointer; opacity: 0; }
:is(.dtoc-csec, .adc-side-done) li:hover > button, :is(.dtoc-csec, .adc-side-done) li > button:focus-visible { opacity: 1; }
:is(.dtoc-csec, .adc-side-done) li > button:hover { background: var(--bg); color: var(--fg); }
.dtoc-csec .adc-chg-none { padding: 8px; color: var(--mut); font-size: 12.5px; }
.dtoc-csec .dtoc-vopen { display: block; width: 100%; margin: 12px 0 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--mut); font: inherit; font-size: 12px; cursor: pointer; }
.dtoc-csec .dtoc-vopen:hover { background: var(--bg3); color: var(--fg); }
.adc-side-done .adc-done-req { margin: 0 0 6px; color: var(--mut); font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adc-rp-done[hidden] { display: none; }
/* the 변경 marks' own list (변경 n곳 · 확인) steps aside while the AI 수정 list is there — the same changes */
.adc-rp-done:not([hidden]):not(:empty) ~ .adc-rp-chg > .adc-side:not(.adc-side-prop) { display: none !important; }
/* 지운 · 다시 바뀐 곳 (chat.js chgGo): where it was, shaded */
.doc > .adc-ghost { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; padding: 8px 12px; border-radius: 8px; border-left: 3px solid color-mix(in srgb, var(--acc) 60%, transparent);
  background: color-mix(in srgb, var(--acc) 12%, transparent); font-size: 13px; animation: adc-flash 1.2s ease-out; }
.doc > .adc-ghost b { font-size: 12px; font-weight: 600; color: var(--acc); }
.doc > .adc-ghost span { color: var(--mut); text-decoration: line-through; }

/* (owner 2026-11-16) 수정안 목록 · 이력 탭: a change whose block is not in the document now — grey */
:is(.dtoc-csec, .adc-side-done) li.adc-gone .adc-st2 { color: var(--mut); opacity: .7; }
:is(.dtoc-csec, .adc-side-done) li.adc-gone .adc-sk { filter: grayscale(1); opacity: .7; }
/* 가운데 위 토스트 (chat.js chgToast): over the document pane, top middle */
.epane > .adc-ctoast { position: absolute; top: 14px; left: 50%; z-index: 30; display: flex; flex-direction: column; gap: 2px; max-width: min(560px, 80%);
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); box-shadow: 0 6px 22px rgba(0,0,0,.14); font-size: 13px;
  opacity: 0; transform: translate(-50%, -8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.epane > .adc-ctoast.on { opacity: 1; transform: translate(-50%, 0); }
.epane > .adc-ctoast span { color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the block a gone change sat after: shaded a moment */
.doc > .adc-wasat { background: color-mix(in srgb, var(--acc) 12%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc) 12%, transparent); border-radius: 4px; transition: background .4s, box-shadow .4s; }
.epane.dtoc-side > .adc-ctoast { left: calc(50% + var(--dtoc-w, 264px) / 2); }   /* (the text's middle, beside the 속성 패널) */

/* 설정 › AI › AI 로직 (ailogic.js) */
#ai-logic { container-type: inline-size; }
#ai-logic .al-t { min-width: 0; }   /* fits the pane: the cells wrap instead of a sideways scroll */
#ai-logic .al-t th, #ai-logic .al-t td { padding: 6px 7px; }
#ai-logic .al-t td { white-space: normal; }
#ai-logic .al-n { text-align: right; white-space: nowrap; }
#ai-logic .al-sub { font-size: 11.5px; margin-top: 2px; }
#ai-logic .al-g th { background: var(--bg2, rgba(127,127,127,.08)); color: var(--fg); font-size: 12.5px; padding-top: 10px; }
#ai-logic .al-row.on > td { background: var(--acc-bg); }
#ai-logic .al-c { font-family: var(--mono, monospace); font-size: 12px; }
#ai-logic .al-combo { font-size: 12.5px; width: 100%; max-width: 150px; }
#ai-logic .al-srv { max-width: 240px; }
#ai-logic .al-m { display: inline-block; font-size: 11.5px; border: 1px solid var(--line); border-radius: 10px; padding: 1px 7px; margin: 1px 3px 1px 0; overflow-wrap: anywhere; }
#ai-logic .al-hist > td { padding: 4px 0 12px 16px; }
#ai-logic .al-ht { min-width: 0; font-size: 12.5px; }
#ai-logic .al-ht td { white-space: normal; overflow-wrap: anywhere; }
/* a narrow pane (chat panel open): drop 실제로 응답한 모델 (also in the row's 호출 이력) and the logic's description */
@container (max-width: 760px) {
  #ai-logic .al-t:not(.al-bym) > thead th:nth-child(6), #ai-logic .al-t:not(.al-bym) > tbody > .al-row > td:nth-child(6),
  #ai-logic .al-bym > thead th:nth-child(5), #ai-logic .al-bym > tbody > .al-row > td:nth-child(5) { display: none; }
  #ai-logic .al-t:not(.al-bym) > tbody > .al-row > td:first-child .al-sub { display: none; }
}
@container (max-width: 520px) {
  #ai-logic .al-t:not(.al-bym) > thead th:nth-child(7), #ai-logic .al-t:not(.al-bym) > tbody > .al-row > td:nth-child(7),
  #ai-logic .al-bym > thead th:nth-child(6), #ai-logic .al-bym > tbody > .al-row > td:nth-child(6) { display: none; }
}
#ai-logic .al-bad td { background: rgba(220, 60, 60, .06); }
#ai-logic .al-tot { margin-left: 8px; }
/* AI 로직: a wide table — while it is the page shown (mshell.js go() sets #sys[data-snsec]), no 880px cap and less side padding */
@media (min-width: 701px) {
  .editor-body.sn-on > #sys[data-snsec="logic"] { padding-left: 16px; padding-right: 16px; }
  .editor-body.sn-on > #sys[data-snsec="logic"] > *, .editor-body.sn-on > #sys[data-snsec="logic"] .sys-top > * { max-width: none; }
  #sys[data-snsec="logic"] .ssec[data-sec="logic"] > .bs-card { margin-left: 0; margin-right: 0; }
}
#sys .ssec[data-sec="logic"] > .bs-card { max-width: none; }
#ai-logic a.al-m { color: inherit; text-decoration: none; } #ai-logic a.al-m:hover { border-color: var(--acc); color: var(--acc); }
#ai-logic .al-sep { width: 10px; }
#ai-logic .al-mt { font-size: 12.5px; margin: 4px 0 10px; }
#ai-logic .al-mt td { white-space: normal; overflow-wrap: anywhere; }
#ai-logic .al-mrow.on > td { background: var(--acc-bg); }
#ai-logic .al-mtot > td { font-weight: 600; border-top: 1px solid var(--line); }
#ai-logic .al-fm { font-size: 12.5px; margin: 2px 0 6px; } #ai-logic .al-fm a { margin-left: 8px; }
#ai-logic .al-lg { margin: 2px 0 8px; }
#ai-logic .al-sw { margin-right: 6px; vertical-align: -2px; } #ai-logic .al-sw input { margin: 0; cursor: pointer; }
#ai-logic .al-off > td { opacity: .6; } #ai-logic .al-off > td:first-child { opacity: 1; } #ai-logic .al-offt { font-size: 11.5px; }

/* 💬 문서 입력창 없음 (owner 2026-11-17 "문서탭 하단에 입력창이 올라오도록 되어있는데 해당 로직은 삭제"): on the PC the document's
   💬 opens its chat tab (app.js chatTab) — the box at the foot never shows, wide or narrow (its 저장 · 서식 bar while a paragraph is edited stays) */
html:not(.mshell) .epane .adc > .adc-box, html:not(.mshell) .epane .adc:not(.adc-editmode) > .adc-dock { display: none !important; }
/* 📌 선택한 블록 goes to the chat panel as a chip (chat.js SELF) — no list where the box used to be (owner 2026-11-17) */
html:not(.mshell) .epane .adc > .adc-insel { display: none !important; }
/* 변경 n곳 → 속성 패널 버튼의 숫자 배지 (owner 2026-11-17 "변경플로팅패널은 삭제 — 속성패널 버튼에 배지로 숫자만"; chat.js chgBadge) */
.dtoc-open { position: relative; }
.epane.has-dtoc > .dtoc-open { overflow: visible; }
.dtoc-open > .dtoc-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--acc, #2f6fed); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  pointer-events: none; box-shadow: 0 0 0 2px var(--bg, #fff); }

/* 보내는 중인 사용자 말풍선: 서버가 받기 전까지 흐리게 (chat.js send) */
.hm-pending .hm-bubble { opacity: .6; }
.hm-pending .hm-act { display: none; }   /* 서버 번호가 아직 없어 수정·삭제가 안 됨 */

/* 📝 편집기 주소 (editor.bs-soft.co.kr, owner 2026-11-20 "이 편집기를 별도의 서비스로"): the same Inbox shows only the editor —
   탐색기 · 최근 · 즐겨찾기, document tabs, the AI chat. The other parts of Inbox are hidden (their pages answer 404 there, inbox.py). */
html[data-site="editor"] .activity [data-view="inbox"], html[data-site="editor"] .activity [data-view="library"],
html[data-site="editor"] .activity [data-view="services"], html[data-site="editor"] .activity [data-view="mail"],
html[data-site="editor"] .activity [data-view="messenger"], html[data-site="editor"] .activity [data-view="settings"],
html[data-site="editor"] .activity a[href="/browser"], html[data-site="editor"] .activity a[href="/desktop"],
html[data-site="editor"] [data-cmd="toggle-term"], html[data-site="editor"] [data-cmd="open-messenger"],
html[data-site="editor"] .watch-wrap, html[data-site="editor"] .statusbar > a[href="/"], html[data-site="editor"] #sbar-models,
html[data-site="editor"] .m-msgs { display: none !important; }
/* 📝 편집기 = its own service (owner 2026-11-20 "별도의 저장공간 · 채팅목록 · 문서함으로 독립된 서비스처럼"): one project (Editor), so no
   project picker, no 자료실 · 저장소 (the 탐색기's 저장소 section), no 브라우저 즐겨찾기 · 사이드 검색 (the title bar searches its 문서) */
html[data-site="editor"] .titlebar .proj, html[data-site="editor"] .activity [data-view="bookmarks"],
html[data-site="editor"] .activity [data-view="search"], html[data-site="editor"] .activity [data-view="recent"],
html[data-site="editor"] .view-explorer .exlib-st, html[data-site="editor"] .noti-wrap { display: none !important; }
html[data-site="editor"] .view-explorer #libtree { display: none !important; }
html[data-site="editor"] .view-explorer .exlib-rcb li:not(:has(a[href*="b=editor"])) { display: none !important; }
